:root{--bg:#eef3f8;--card:#ffffff;--ink:#1a2940;--muted:#667892;--brand:#12395b;--brand2:#1f5b92;--line:#d8e1ec;--success:#e9f8ef;--error:#fdecec}
*{box-sizing:border-box}body{margin:0;font-family:Inter,Arial,sans-serif;background:var(--bg);color:var(--ink)}a{text-decoration:none;color:inherit}code{background:#edf2f7;padding:2px 6px;border-radius:6px}
.app-shell{display:grid;grid-template-columns:320px 1fr;min-height:100vh}.sidebar{position:sticky;top:0;align-self:start;min-height:100vh;max-height:100vh;overflow:auto;background:linear-gradient(180deg,var(--brand),#0f2740);color:#fff;padding:28px 22px;display:flex;flex-direction:column;gap:20px}.brand-block{padding:0 6px 14px;border-bottom:1px solid rgba(255,255,255,.12)}.brand-kicker{text-transform:uppercase;letter-spacing:.12em;font-size:11px;opacity:.75}.brand{font-size:22px;font-weight:800;margin-top:6px}.nav-menu{display:grid;gap:16px;padding-right:4px}.nav-group,.nav-section{display:grid;gap:12px;padding:14px;border-radius:20px;border:1px solid rgba(255,255,255,.08);background:rgba(255,255,255,.04)}.nav-heading{display:grid;gap:4px;padding:0 4px}.nav-label{padding:0;color:rgba(237,245,255,.72);font-size:11px;letter-spacing:.14em;text-transform:uppercase}.nav-hint{color:rgba(237,245,255,.64);font-size:12px;line-height:1.45}.nav-card-list,.nav-subnav{display:grid;gap:10px}.nav-link{display:grid;gap:4px;padding:14px 16px;min-height:56px;border-radius:14px;color:#edf5ff;border:1px solid transparent;background:rgba(255,255,255,.03);transition:background .15s ease,transform .15s ease,box-shadow .15s ease,border-color .15s ease}.nav-link-title{font-weight:700;line-height:1.25}.nav-link-meta{font-size:12px;line-height:1.45;color:rgba(237,245,255,.74)}.nav-section .nav-link{background:rgba(255,255,255,.05)}.sidebar nav a:hover,.sidebar nav a:focus-visible{background:rgba(255,255,255,.12);border-color:rgba(255,255,255,.14);box-shadow:0 10px 22px rgba(4,16,28,.16);transform:translateY(-1px);outline:none}.sidebar nav a.is-active{background:#fff;color:var(--brand);border-color:rgba(255,255,255,.2);box-shadow:0 14px 30px rgba(4,16,28,.22)}.sidebar nav a.is-active .nav-link-meta{color:#50667f}.sidebar-footer{margin-top:auto;display:grid;gap:10px;padding:14px;border-radius:18px;background:rgba(255,255,255,.04);border:1px solid rgba(255,255,255,.08)}
.content{padding:32px clamp(18px,3.5vw,42px);width:min(100%,1560px);margin:0 auto}.topbar{display:flex;justify-content:space-between;align-items:flex-start;gap:20px;flex-wrap:wrap;margin-bottom:26px}.topbar h1{margin:0 0 6px;font-size:32px}.topbar p{margin:0;color:var(--muted);max-width:900px}
.alert{padding:14px 16px;border-radius:12px;margin-bottom:18px}.alert.success{background:var(--success);color:#215c38}.alert.error{background:var(--error);color:#8a2b2b}
.cards,.grid{display:grid;gap:22px;margin-bottom:22px}.cards.four{grid-template-columns:repeat(4,1fr)}.grid.two{grid-template-columns:repeat(2,1fr)}.form-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:14px}.form-grid.three{grid-template-columns:repeat(3,1fr)}.form-grid.five{grid-template-columns:repeat(5,1fr)}
.card{background:var(--card);border-radius:20px;padding:24px;box-shadow:0 14px 42px rgba(16,42,67,.08);border:1px solid var(--line)}.card h2,.card h3{margin-top:0}.stat p{font-size:34px;font-weight:800;margin:8px 0}.stat span{color:var(--muted);font-size:13px;line-height:1.5}.stat.alt p{font-size:28px}
input,select,textarea,button{width:100%;padding:12px 14px;border-radius:12px;border:1px solid var(--line);font:inherit;background:#fff}textarea{resize:vertical;min-height:120px}label{display:block;margin:8px 0 6px;font-weight:600}.checkbox-row{display:flex;gap:18px;margin:10px 0 16px}.checkbox-row input{width:auto}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;font-weight:700;cursor:pointer}.btn.primary{background:var(--brand2);border-color:var(--brand2);color:#fff}.btn.secondary{background:#eff5fb;color:var(--brand);border-color:#c9d8ea}.btn.danger{background:#f8e7e7;color:#8a2b2b;border-color:#efc8c8}.btn.small{padding:8px 10px;width:auto}.btn.full{width:100%}
.badge{display:inline-block;padding:6px 10px;border-radius:999px;background:#edf4fc;color:#244a78;font-size:12px;font-weight:700}.muted{color:var(--muted)}.small{font-size:12px}.mt-12{margin-top:12px}.clean-list{padding-left:18px}.clean-list li{margin:10px 0}
table{width:100%;border-collapse:collapse}th,td{padding:14px 12px;border-bottom:1px solid var(--line);text-align:left;vertical-align:top}th{font-size:12px;text-transform:uppercase;letter-spacing:.06em;color:var(--muted)}
.auth-body{display:grid;place-items:center;min-height:100vh;background:linear-gradient(135deg,#0f2740,#204d77)}.auth-shell{width:min(460px,92vw)}.auth-card{background:#fff;border-radius:22px;padding:34px;box-shadow:0 24px 60px rgba(0,0,0,.18)}
.toolbar{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:16px}.toolbar-right{margin-left:auto}.inline-form{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.inline-form input,.inline-form select{min-width:140px}.pagination{display:flex;gap:8px;flex-wrap:wrap;margin-top:16px}.page-link{padding:9px 12px;border:1px solid var(--line);border-radius:10px;background:#fff}.page-link.active{background:var(--brand2);color:#fff;border-color:var(--brand2)}.preview-box{background:#f7fafd;border:1px dashed #bfd0e2;border-radius:14px;padding:16px;margin:14px 0}.preview-inner{margin-top:10px;padding-top:10px;border-top:1px solid #d6e3ef}
@media (max-width:1180px){.app-shell{grid-template-columns:290px 1fr}}
@media (max-width:1100px){.cards.four,.grid.two,.form-grid.five,.form-grid.three{grid-template-columns:1fr 1fr}.app-shell{grid-template-columns:1fr}.sidebar{position:static;min-height:auto;max-height:none;padding:20px 18px}.nav-menu{grid-template-columns:repeat(auto-fit,minmax(240px,1fr));align-items:start}.sidebar-footer{margin-top:0}.toolbar,.inline-form{display:grid;grid-template-columns:1fr}}
@media (max-width:720px){.cards.four,.grid.two,.form-grid,.form-grid.five,.form-grid.three{grid-template-columns:1fr}.content{padding:18px}.sidebar{padding:18px 16px}.nav-menu{grid-template-columns:1fr}.nav-group,.nav-section,.sidebar-footer{padding:12px}}
.form-grid-two-col-uneven{grid-template-columns:1.1fr .9fr}.stacked-badges{display:flex;flex-wrap:wrap;gap:6px}.conversation-grid{grid-template-columns:.95fr 1.05fr}.conversation-list{display:grid;gap:10px}.conversation-item{display:block;padding:14px;border:1px solid var(--line);border-radius:14px;background:#fbfdff}.conversation-item.active{border-color:var(--brand2);box-shadow:inset 0 0 0 1px var(--brand2)}.conversation-head,.conversation-meta{display:flex;justify-content:space-between;gap:12px}.conversation-preview{margin:8px 0;color:var(--ink)}.thread{display:grid;gap:12px;max-height:720px;overflow:auto;padding-right:4px}.bubble{padding:16px;border-radius:16px;max-width:86%;border:1px solid var(--line);background:#f8fbff}.bubble.outbound{margin-left:auto;background:#eef5ff;border-color:#cbdcf6}.bubble.inbound{margin-right:auto;background:#fff}.preview-subject{margin-top:8px;font-weight:700}.mini-chart{min-height:220px}.chart-bars{display:flex;align-items:flex-end;gap:12px;height:170px;padding:12px 4px 0}.chart-group{display:flex;align-items:flex-end;gap:4px}.chart-group-4{gap:3px}.bar{width:14px;border-radius:8px 8px 0 0;background:var(--brand)}.bar.unique_open_count{background:#4d7ca8}.bar.unique_click_count{background:#7ea2c8}.bar.bounced_count{background:#cc7d7d}.chart-label{font-size:11px;color:var(--muted);transform:rotate(-35deg);transform-origin:left top;margin-left:6px}.chart-legend{display:flex;gap:16px;margin-top:14px;color:var(--muted);font-size:12px;flex-wrap:wrap}.legend-chip{display:inline-block;width:10px;height:10px;border-radius:999px;margin-right:6px;background:var(--brand)}.legend-chip.unique_open_count{background:#4d7ca8}.legend-chip.unique_click_count{background:#7ea2c8}.legend-chip.bounced_count{background:#cc7d7d}@media (max-width:1100px){.conversation-grid,.form-grid-two-col-uneven{grid-template-columns:1fr}}
.builder-toolbar{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:10px}.builder-canvas{display:grid;gap:10px;margin-bottom:12px}.builder-block{border:1px solid var(--line);border-radius:14px;padding:12px;background:#fbfdff}.builder-block-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}.timeline-list{display:grid;gap:10px;max-height:520px;overflow:auto}.timeline-item{padding:12px;border:1px solid var(--line);border-radius:12px;background:#fbfdff}.permissions-grid{display:flex;flex-wrap:wrap;gap:8px;max-width:900px}.permission-pill{display:inline-flex;align-items:center;gap:8px;padding:8px 10px;border:1px solid var(--line);border-radius:999px;background:#f8fbff;font-size:12px}.permission-pill input{width:auto;margin:0}
.actions-cell{display:flex;gap:8px;flex-wrap:wrap}.card details summary{cursor:pointer;color:var(--brand);margin-bottom:8px}.card details[open] summary{margin-bottom:12px}.report-hero{display:flex;justify-content:space-between;align-items:center;gap:16px}

.tabs-inline{display:inline-flex;align-items:center;gap:8px;padding:8px 12px;border-radius:999px;background:#f4f8fc;border:1px solid var(--line)}
.template-picker{background:#fbfdff}
.composer-shell{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(320px,.8fr);gap:18px;align-items:start}
.stacked-panel{display:grid;gap:14px;align-content:start}
.builder-palette{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:12px}
.builder-dropzone{min-height:160px;padding:14px;border:1px dashed #bfd0e2;border-radius:16px;background:linear-gradient(180deg,#fbfdff,#f6faff)}
.builder-empty{display:grid;place-items:center;min-height:120px;text-align:center}
.builder-block{transition:border-color .15s ease,box-shadow .15s ease,transform .15s ease}
.builder-block.dragging{opacity:.72;transform:scale(.99)}
.builder-block.drag-over{border-color:var(--brand2);box-shadow:0 0 0 1px var(--brand2);background:#f3f8fe}
.builder-block-title{display:flex;align-items:center;gap:8px}
.drag-handle{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:8px;background:#edf4fc;color:#355d8d;font-size:12px}
.preflight-card{padding:18px;border:1px solid var(--line);border-radius:16px;background:linear-gradient(180deg,#ffffff,#f8fbff)}
.preflight-list{display:grid;gap:10px}
.preflight-row{display:grid;gap:4px;padding:12px 14px;border:1px solid var(--line);border-radius:14px;background:#fff}
.preflight-row strong{font-size:13px}
.preflight-row span{font-size:12px;color:var(--muted)}
.status-pass{border-color:#cfe7d8;background:#f5fcf7}
.status-warn{border-color:#f0dfb6;background:#fffaf0}
.status-error{border-color:#efc8c8;background:#fff5f5}
.alert-list{display:grid;gap:10px}
.alert-tile{padding:14px 16px;border-radius:14px;border:1px solid var(--line);background:#fff}
.alert-tile.ok{border-color:#cfe7d8;background:#f5fcf7}
.alert-tile.warn{border-color:#f0dfb6;background:#fffaf0}
.alert-tile.error{border-color:#efc8c8;background:#fff5f5}
.health-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}
.health-item{padding:14px 16px;border:1px solid var(--line);border-radius:14px;background:#fbfdff;display:grid;gap:4px}
.health-item strong{font-size:18px}
.compact-toolbar{margin-bottom:8px}
.bubble-meta{display:flex;gap:10px;flex-wrap:wrap;margin-top:10px;color:var(--muted);font-size:12px}
.stacked-on-mobile{display:flex;justify-content:space-between;align-items:center;gap:16px}
.builder-add{width:auto}
@media (max-width:1100px){.composer-shell,.health-grid{grid-template-columns:1fr 1fr}}
@media (max-width:720px){.composer-shell,.health-grid{grid-template-columns:1fr}.stacked-on-mobile{display:grid}}


.section-header{display:flex;justify-content:space-between;align-items:flex-start;gap:18px;flex-wrap:wrap;margin-bottom:16px}
.section-copy p{margin:6px 0 0;color:var(--muted);line-height:1.6}
.section-gap-sm{margin-bottom:14px}
.spaced-card{display:grid;gap:16px}
.roomy-grid{align-items:start}
.form-grid-three-balanced{grid-template-columns:repeat(3,minmax(0,1fr))}
.table-shell{overflow:auto;border:1px solid var(--line);border-radius:16px;background:#fff}
.table-shell table{min-width:980px}
.compact-table-shell table{min-width:760px}
.data-table tbody tr:hover{background:#fbfdff}
.toolbar-meta{display:flex;gap:14px;flex-wrap:wrap;margin-bottom:2px}
.empty-state-cell{text-align:center;padding:26px 18px}
.form-help{margin-top:-2px}
.align-end{align-items:flex-end}
.filters-row{max-width:1000px}
.compact-stats .card{min-height:160px}
.page-slider{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:14px;align-items:center;margin-top:18px;padding:16px;border:1px solid var(--line);border-radius:16px;background:linear-gradient(180deg,#fbfdff,#f6faff)}
.page-slider-main{display:grid;gap:10px}
.page-slider-copy{display:flex;justify-content:space-between;gap:14px;align-items:center;flex-wrap:wrap}
.page-slider input[type="range"]{padding:0;border:0;background:transparent;min-height:auto}
.contact-table td strong{display:block;margin-bottom:4px}
.workspace-hero{display:flex;justify-content:space-between;align-items:flex-start;gap:18px;flex-wrap:wrap;margin-bottom:18px}.workspace-hero h2{margin:0 0 6px}.workspace-hero p{margin:0;color:var(--muted);max-width:820px;line-height:1.6}.workspace-actions{display:flex;gap:10px;flex-wrap:wrap}.feature-list{display:grid;gap:10px;padding-left:18px;margin:0}.metric-strip{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.metric-chip{padding:14px 16px;border:1px solid var(--line);border-radius:14px;background:#fbfdff}.metric-chip strong{display:block;font-size:20px;margin-bottom:4px}.card table.compact th,.card table.compact td{padding:10px 12px}@media (max-width:1100px){.metric-strip{grid-template-columns:1fr}}
@media (max-width:1100px){.form-grid-three-balanced,.compact-stats{grid-template-columns:1fr 1fr}.page-slider{grid-template-columns:1fr}}
@media (max-width:720px){.toolbar-meta,.page-slider-copy{display:grid}.form-grid-three-balanced,.compact-stats{grid-template-columns:1fr}.table-shell table{min-width:760px}}

.commercial-campaign-card{display:grid;gap:18px}
.commercial-campaign-overview{display:grid;grid-template-columns:minmax(0,1.05fr) minmax(320px,.95fr);gap:18px;align-items:start;padding:18px;border:1px solid var(--line);border-radius:18px;background:linear-gradient(180deg,#ffffff,#f8fbff)}
.campaign-overview-copy{display:grid;gap:12px}
.studio-readiness-inline{display:grid;gap:14px;padding:16px;border:1px solid var(--line);border-radius:16px;background:#fff}
.section-toolbar{margin-top:4px}
.compact-list{margin:0;padding-left:18px}
@media (max-width:1100px){.commercial-campaign-overview{grid-template-columns:1fr}}

.mailbox-card{padding:18px}.mailbox-shell{display:grid;grid-template-columns:260px minmax(280px,360px) minmax(0,1fr);gap:18px;align-items:start}.mailbox-sidebar,.mailbox-list-panel,.mailbox-preview-panel{display:grid;gap:14px}.mail-folder-list{display:grid;gap:8px}.mail-folder-link{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:12px 14px;border:1px solid var(--line);border-radius:14px;background:#fbfdff}.mail-folder-link.active{border-color:var(--brand2);box-shadow:inset 0 0 0 1px var(--brand2);background:#eef5ff}.mail-folder-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;align-items:center}.mailbox-folder-form{display:grid;gap:10px}.mailbox-thread-actions{display:flex;flex-wrap:wrap;gap:8px}.mailbox-thread-actions form{display:inline-flex;gap:8px;align-items:center;flex-wrap:wrap}.mailbox-thread-actions select{min-width:170px}.mailbox-compose,.mailbox-reply{display:grid;gap:12px}.mailbox-empty{display:grid;place-items:center;min-height:220px;text-align:center}.mail-address{color:var(--muted);font-size:12px}.mailbox-count{font-weight:700;color:var(--brand)}@media (max-width:1350px){.mailbox-shell{grid-template-columns:240px 320px 1fr}}@media (max-width:1100px){.mailbox-shell{grid-template-columns:1fr}.mail-folder-row{grid-template-columns:1fr}}
