:root {
    color-scheme: light;
    --bg: #f3f6f2;
    --surface: #ffffff;
    --surface-2: #edf2ed;
    --ink: #111214;
    --muted: #68706b;
    --line: #dbe3db;
    --line-strong: #c7d2c7;
    --panel: #ffffff;
    --soft: #f3f6f2;
    --brand: #111214;
    --brand-dark: #000000;
    --accent: #c9ff3f;
    --accent-2: #00a884;
    --accent-ink: #111214;
    --danger: #b42318;
    --shadow: 0 18px 42px rgba(17, 18, 20, 0.08);
}

* {
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    color: var(--ink);
    background: var(--bg);
}

a {
    color: var(--brand);
}

.shell {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
}

.app-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 236px minmax(0, 1fr);
}

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    padding: 18px 14px;
    background: #ffffff;
    color: var(--ink);
    border-right: 1px solid var(--line);
}

.brand-block {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #fff;
    text-decoration: none;
    padding: 8px;
    border-radius: 8px;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--accent);
    color: var(--accent-ink);
    font-weight: 800;
}

.brand-block strong,
.brand-block small {
    display: block;
}

.brand-block small {
    margin-top: 3px;
    color: #a9b8b4;
    font-size: 12px;
}

.side-nav {
    display: grid;
    gap: 4px;
    margin-top: 24px;
}

.side-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 36px;
    padding: 8px 10px;
    border-radius: 8px;
    color: #c8d6d2;
    text-decoration: none;
    font-weight: 700;
}

.side-link:hover,
.side-link.active {
    background: var(--ink);
    color: #fff;
}

.workspace {
    min-width: 0;
}

.workspace-top {
    min-height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 12px 28px;
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 10;
}

.workspace-top h1 {
    margin: 0;
    font-size: 18px;
    line-height: 1.2;
}

.eyebrow {
    margin: 0 0 4px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.page {
    width: min(1360px, 100%);
    padding: 22px 28px 42px;
}

.topbar {
    background: var(--panel);
    border-bottom: 1px solid var(--line);
}

.topbar-inner {
    min-height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.brand {
    font-weight: 700;
    color: var(--ink);
    text-decoration: none;
}

.nav {
    display: flex;
    align-items: center;
    gap: 14px;
}

.nav a {
    color: var(--muted);
    font-weight: 700;
    text-decoration: none;
}

.nav a:hover {
    color: var(--brand);
}

.page {
    padding: 32px 0;
}

.auth-wrap {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 24px;
    width: min(100%, 420px);
}

.panel-wide {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 24px;
}

.card,
.table-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 1px 0 rgba(22, 32, 42, 0.02);
}

.card {
    padding: 18px;
}

.page-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 18px;
}

h1 {
    margin: 0 0 8px;
    font-size: 22px;
    line-height: 1.2;
}

h2 {
    margin: 0 0 12px;
    font-size: 16px;
}

p {
    color: var(--muted);
    line-height: 1.5;
}

label {
    display: block;
    margin: 16px 0 6px;
    font-weight: 700;
    font-size: 13px;
}

input,
select,
textarea {
    width: 100%;
    min-height: 38px;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    padding: 10px 12px;
    font: inherit;
    background: #fff;
}

input:focus,
select:focus,
textarea:focus {
    outline: 3px solid rgba(38, 93, 255, 0.14);
    border-color: var(--accent);
}

textarea {
    width: 100%;
    resize: vertical;
}

button,
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    border: 0;
    border-radius: 8px;
    padding: 8px 12px;
    background: var(--brand);
    color: #fff;
    font: inherit;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

button:hover,
.button:hover {
    background: var(--brand-dark);
}

.button-ghost {
    background: transparent;
    color: var(--brand);
    border: 1px solid var(--line);
}

.button-ghost:hover {
    background: var(--soft);
    color: var(--brand-dark);
}

.alert {
    border-radius: 8px;
    padding: 12px 14px;
    margin: 16px 0;
    background: #fff2f0;
    color: var(--danger);
    border: 1px solid #ffccc7;
}

.notice {
    border-radius: 8px;
    padding: 12px 14px;
    margin: 0 0 16px;
    background: #edf8f5;
    color: var(--brand-dark);
    border: 1px solid #b9e1d8;
}

.grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-top: 24px;
}

.metric {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 13px;
}

.metric strong {
    display: block;
    font-size: 20px;
    margin-top: 8px;
}

.muted {
    color: var(--muted);
}

.actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin: 16px 0;
}

.filters {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 180px 180px auto;
    gap: 10px;
    align-items: end;
}

.split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
    gap: 18px;
    align-items: start;
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

th {
    color: var(--muted);
    font-size: 11px;
    text-transform: uppercase;
}

tr:hover td {
    background: var(--surface-2);
}

.row-title {
    color: var(--ink);
    font-weight: 800;
    text-decoration: none;
}

.status {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    border-radius: 999px;
    padding: 3px 9px;
    background: #edf8f5;
    color: var(--brand-dark);
    font-size: 12px;
    font-weight: 800;
}

.status-muted {
    background: #edf1f4;
    color: var(--muted);
}

.status-danger {
    background: #fff2f0;
    color: var(--danger);
}

.inline-form {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.danger-button {
    background: var(--danger);
}

.danger-button:hover {
    background: #8f1d14;
}

.copy-box {
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px 12px;
    background: var(--soft);
    overflow-wrap: anywhere;
    color: var(--ink);
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 14px;
}

.pagination a {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 6px 10px;
    text-decoration: none;
    color: var(--ink);
    background: #fff;
    font-weight: 700;
}

.pagination a.active {
    background: var(--ink);
    color: #fff;
    border-color: var(--ink);
}

.pagination a.disabled {
    pointer-events: none;
    opacity: 0.45;
}

.pagination-gap {
    color: var(--muted);
    font-weight: 700;
}

.detail-grid {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 18px;
}

.profile-card {
    position: sticky;
    top: 104px;
}

.avatar {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: var(--accent);
    color: var(--accent-ink);
    font-weight: 900;
    font-size: 20px;
}

.field-list {
    display: grid;
    gap: 12px;
    margin-top: 18px;
}

.field-list div {
    display: grid;
    gap: 3px;
}

.field-list small {
    color: var(--muted);
    font-weight: 800;
    text-transform: uppercase;
}

.empty-state {
    padding: 34px;
    text-align: center;
    color: var(--muted);
}

.progress {
    width: 100%;
    height: 18px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--soft);
}

.progress div {
    height: 100%;
    background: var(--brand);
}

@media (max-width: 760px) {
    .grid {
        grid-template-columns: 1fr;
    }

    .app-shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
        height: auto;
    }

    .side-nav {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .workspace-top {
        position: static;
        padding: 18px;
        align-items: flex-start;
        flex-direction: column;
    }

    .page {
        padding: 18px;
    }

    .topbar-inner {
        align-items: flex-start;
        flex-direction: column;
        padding: 14px 0;
    }

    .split {
        grid-template-columns: 1fr;
    }

    .detail-grid,
    .filters {
        grid-template-columns: 1fr;
    }
}

/* Compact product scale overrides */
body {
    font-size: 14px;
}

.workspace-top h1 {
    font-size: 17px;
}

.page-head h2,
.panel-wide h2,
.card h2,
h2 {
    font-size: 16px;
}

h1 {
    font-size: 21px;
}

p {
    margin-top: 6px;
    margin-bottom: 10px;
}

.metric strong {
    font-size: 19px;
}

.panel-wide,
.card {
    padding: 16px;
}

.grid {
    gap: 12px;
    margin-top: 16px;
}

th,
td {
    padding: 9px 11px;
}

/* Premium product pass: Mailchimp-inspired restraint with Apple-like spacing */
:root {
    --bg: #f3f6f2;
    --surface: #ffffff;
    --surface-2: #edf2ed;
    --ink: #111214;
    --muted: #68706b;
    --line: #dbe3db;
    --line-strong: #c7d2c7;
    --brand: #111214;
    --brand-dark: #000000;
    --accent: #c9ff3f;
    --accent-2: #00a884;
    --accent-ink: #111214;
    --danger: #b3261e;
    --shadow: 0 18px 42px rgba(17, 18, 20, 0.08);
}

body {
    font-size: 13px;
    letter-spacing: 0;
    background:
        linear-gradient(180deg, #ffffff 0, var(--bg) 280px);
}

.app-shell {
    grid-template-columns: 224px minmax(0, 1fr);
}

.sidebar {
    background: #ffffff;
    color: var(--ink);
    border-right: 1px solid var(--line);
    box-shadow: 1px 0 0 rgba(0, 0, 0, 0.02);
}

.brand-block {
    color: var(--ink);
}

.brand-mark {
    background: var(--accent);
    color: var(--accent-ink);
    border: 1px solid #9fe12f;
}

.brand-block small {
    color: var(--muted);
}

.side-nav {
    margin-top: 30px;
}

.side-nav-bottom {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid var(--line);
}

.ses-quota-widget {
    display: grid;
    gap: 6px;
    padding: 9px 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.58);
    color: var(--muted);
    font-size: 11px;
}

.ses-quota-widget.is-muted {
    opacity: 0.72;
}

.ses-quota-head,
.ses-quota-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-width: 0;
}

.ses-quota-head span,
.ses-quota-line span,
.ses-quota-widget small {
    color: var(--muted);
    font-weight: 750;
}

.ses-quota-head strong,
.ses-quota-line strong {
    color: var(--ink);
    font-size: 11px;
    font-weight: 850;
    white-space: nowrap;
}

.ses-quota-meter {
    height: 5px;
    overflow: hidden;
    border-radius: 999px;
    background: var(--surface-2);
}

.ses-quota-meter span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--accent-2);
}

.sidebar-time-widget {
    display: grid;
    gap: 4px;
    margin-top: 8px;
    padding: 9px 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8faf7;
    color: var(--muted);
    font-size: 11px;
}

.sidebar-time-head {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--muted);
    font-weight: 800;
}

.sidebar-time-icon {
    width: 14px;
    height: 14px;
    color: var(--accent-2);
    flex: 0 0 auto;
}

.sidebar-time-widget strong {
    color: var(--ink);
    font-size: 17px;
    font-weight: 850;
    line-height: 1.1;
    letter-spacing: 0;
}

.sidebar-time-date {
    color: var(--ink);
    font-size: 11px;
    font-weight: 750;
}

.sidebar-time-widget small {
    display: grid;
    gap: 2px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
    line-height: 1.25;
}

.side-link {
    color: #303236;
    font-weight: 750;
    border: 1px solid transparent;
}

.side-link:hover {
    background: #f4f4f2;
    color: var(--ink);
}

.side-link.active {
    background: var(--ink);
    border-color: var(--ink);
    color: #fff;
}

.workspace-top {
    background: rgba(255, 255, 255, 0.84);
    min-height: 60px;
}

.workspace-top h1 {
    font-size: 20px;
    font-weight: 820;
}

.eyebrow {
    color: #8b8e92;
    font-size: 10px;
    letter-spacing: 0;
}

.page {
    max-width: 1280px;
    padding: 20px 28px 44px;
}

.page-head {
    margin-bottom: 14px;
}

.page-head h2 {
    font-size: 21px;
    font-weight: 760;
    letter-spacing: 0;
}

.page-head p {
    max-width: 620px;
    color: var(--muted);
}

.card,
.panel-wide,
.table-card,
.metric {
    border-color: var(--line);
    box-shadow: none;
}

.card,
.panel-wide {
    padding: 18px;
}

.table-card {
    background: #fff;
}

button,
.button {
    background: var(--ink);
    color: #fff;
    font-size: 13px;
    font-weight: 760;
    border: 1px solid var(--ink);
}

button:hover,
.button:hover {
    background: #000;
}

button:disabled,
.button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.button-ghost {
    background: #fff;
    color: var(--ink);
    border: 1px solid var(--line-strong);
}

.button-ghost:hover {
    background: #f4f4f2;
    color: var(--ink);
}

input,
select,
textarea {
    min-height: 36px;
    border-color: var(--line-strong);
    background: #fff;
    font-size: 13px;
}

input:focus,
select:focus,
textarea:focus {
    outline: 3px solid rgba(0, 168, 132, 0.18);
    border-color: var(--ink);
}

label {
    margin-top: 12px;
    color: #202226;
    font-size: 12px;
    font-weight: 760;
}

th {
    color: #74777c;
    font-size: 10px;
    font-weight: 800;
}

td {
    color: #202226;
}

tr:hover td {
    background: #fbfbfa;
}

.row-title {
    color: var(--ink);
}

.status {
    min-height: 22px;
    background: #eaf7e8;
    color: #166026;
    font-size: 11px;
}

.status-muted {
    background: #efefed;
    color: #5f6368;
}

.metric span {
    font-size: 11px;
}

.metric strong {
    font-size: 18px;
}

.grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.user-chip {
    font-size: 13px;
}

.empty-state {
    color: var(--muted);
}

/* Signature UI layer */
.icon,
.nav-icon,
.button-icon,
.metric-icon {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
}

.nav-icon {
    width: 17px;
    height: 17px;
}

.side-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.button-icon {
    width: 16px;
    height: 16px;
}

.hero {
    position: relative;
    overflow: hidden;
    min-height: 190px;
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.8fr);
    gap: 22px;
    padding: 26px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(201, 255, 63, 0.28), rgba(255, 255, 255, 0) 38%),
        #fff;
}

.hero h2 {
    max-width: 680px;
    margin: 0;
    font-size: 30px;
    line-height: 1.05;
    letter-spacing: 0;
}

.hero p {
    max-width: 620px;
    margin-top: 12px;
    font-size: 14px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.hero-panel {
    align-self: stretch;
    display: grid;
    gap: 10px;
}

.action-card {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 13px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.78);
    text-decoration: none;
    color: var(--ink);
}

.action-card:hover {
    background: #fff;
    border-color: var(--ink);
}

.action-icon {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: var(--accent);
    color: var(--accent-ink);
}

.action-card strong,
.action-card small {
    display: block;
}

.action-card small {
    margin-top: 2px;
    color: var(--muted);
}

.dashboard-command-bar {
    display: grid;
    grid-template-columns: minmax(132px, 190px) minmax(0, 1fr);
    gap: 10px;
    align-items: stretch;
    margin-bottom: 12px;
}

.dashboard-mini-brand {
    min-width: 0;
    min-height: 58px;
    display: grid;
    align-content: center;
    gap: 2px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.84);
}

.dashboard-mini-brand span {
    overflow: hidden;
    color: var(--muted);
    font-size: 10px;
    font-weight: 850;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

.dashboard-mini-brand strong {
    color: var(--ink);
    font-size: 15px;
    line-height: 1.1;
}

.dashboard-command-main {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.72);
}

.dashboard-primary-actions,
.dashboard-focus-metrics {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.dashboard-focus-metrics {
    justify-content: flex-end;
}

.dashboard-focus-metrics span {
    min-width: 86px;
    min-height: 38px;
    display: grid;
    align-content: center;
    gap: 1px;
    padding: 6px 9px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(247, 250, 249, 0.82);
}

.dashboard-focus-metrics small {
    color: var(--muted);
    font-size: 9px;
    font-weight: 850;
    text-transform: uppercase;
}

.dashboard-focus-metrics strong {
    color: var(--ink);
    font-size: 14px;
    line-height: 1.1;
}

.dashboard-focus-metrics .is-ok {
    border-color: rgba(0, 127, 130, 0.18);
}

.dashboard-focus-metrics .is-warning {
    border-color: rgba(180, 119, 0, 0.24);
    background: #fff9ed;
}

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-top: 14px;
}

.kpi-card {
    min-height: 112px;
    display: grid;
    align-content: space-between;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.kpi-card header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.kpi-card span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.kpi-card strong {
    font-size: 25px;
    letter-spacing: 0;
}

.kpi-card .metric-icon {
    width: 22px;
    height: 22px;
    color: var(--ink);
}

.ops-health-section {
    margin-top: 14px;
    margin-bottom: 14px;
}

.ops-health-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.ops-health-head h2,
.ops-health-head p {
    margin: 0;
}

.ops-health-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
}

.ops-health-card {
    min-height: 132px;
    display: grid;
    gap: 12px;
    padding: 13px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.ops-health-card-main {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.ops-health-icon {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: var(--surface-2);
    color: var(--brand);
}

.ops-health-icon .icon {
    width: 18px;
    height: 18px;
}

.ops-health-card h3 {
    margin: 0;
    font-size: 14px;
}

.ops-health-card p {
    margin: 3px 0 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.35;
}

.ops-health-card-side {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.ops-health-card-side strong {
    color: var(--ink);
    font-size: 18px;
}

.ops-health-card small {
    color: var(--muted);
    font-size: 11px;
    line-height: 1.35;
}

.section-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(320px, 0.7fr);
    gap: 16px;
    margin-top: 16px;
}

.timeline {
    display: grid;
    gap: 8px;
}

.timeline-item {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
}

.timeline-dot {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: var(--surface-2);
    color: var(--ink);
}

.table-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.table-title .icon {
    color: var(--brand);
}

.campaign-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 16px;
    align-items: start;
}

.campaign-main,
.campaign-side {
    min-width: 0;
}

.campaign-side {
    position: sticky;
    top: 80px;
}

.editor-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 12px;
}

.editor-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.editor-toolbar button {
    min-height: 30px;
    padding: 5px 9px;
    background: #fff;
    color: var(--ink);
    border: 1px solid var(--line-strong);
}

.editor-toolbar input {
    width: 180px;
    min-height: 30px;
    padding: 5px 9px;
    font-size: 12px;
}

.visual-editor {
    min-height: 420px;
    padding: 18px;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    background: #fff;
    overflow: auto;
}

.html-editor {
    display: none;
}

.html-editor-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.html-editor-head span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 850;
    text-transform: uppercase;
}

.html-editor-head .button {
    min-height: 32px;
    padding: 6px 10px;
    font-size: 12px;
}

.html-editor textarea {
    min-height: 420px;
    font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
    font-size: 12px;
    line-height: 1.55;
    tab-size: 2;
}

.campaign-preview {
    width: 100%;
    min-height: 360px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.page-studio {
    max-width: 1540px;
}

.studio-command {
    position: relative;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 12px 16px;
    margin-bottom: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.campaign-template-control,
.template-menu {
    position: relative;
    z-index: 45;
}

.template-menu[open],
.studio-command:has(.template-menu[open]) {
    z-index: 1200;
}

.template-menu .menu-popover {
    z-index: 1201;
    width: 320px;
    max-height: min(70vh, 460px);
    overflow: auto;
}

.studio-command h2 {
    margin: 0;
    font-size: 22px;
    line-height: 1.1;
}

.studio-command p {
    max-width: 720px;
}

.studio-command-actions,
.inline-submit {
    display: flex;
    align-items: center;
    gap: 10px;
}

.autosave-status {
    min-width: 92px;
    max-width: 190px;
    font-size: 12px;
    line-height: 1.2;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.autosave-status[data-state="saving"] {
    color: #256f8f;
}

.autosave-status[data-state="saved"] {
    color: #0f766e;
}

.autosave-status[data-state="local"] {
    color: #8a6a20;
}

.autosave-status[data-state="error"] {
    color: #b42318;
}

.inline-submit input {
    min-width: 0;
}

.studio-setup {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.75fr) 300px;
    gap: 12px;
    margin-bottom: 12px;
}

.studio-panel,
.designer-panel,
.builder-rail,
.preview-panel {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.studio-panel {
    padding: 14px;
}

.panel-title {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 12px;
}

.panel-title h3,
.designer-top h3,
.rail-section h3 {
    margin: 0;
    font-size: 15px;
}

.panel-title p,
.designer-top p {
    margin: 3px 0 0;
}

.step-dot {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: var(--accent);
    color: var(--accent-ink);
    border: 1px solid #9fe12f;
    font-weight: 900;
}

.setup-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px 12px;
}

.inbox-card {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: start;
    margin-top: 14px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfbfa;
}

.inbox-avatar {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: #111;
    color: #fff;
    font-weight: 900;
}

.inbox-card p {
    margin: 3px 0 0;
    color: var(--ink);
}

.inbox-card span {
    color: var(--muted);
}

.check-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.check-grid div {
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfbfa;
}

.check-grid small {
    display: block;
    color: var(--muted);
    font-weight: 800;
    text-transform: uppercase;
}

.check-grid strong {
    display: block;
    margin-top: 6px;
    font-size: 20px;
}

.check-list {
    display: grid;
    gap: 8px;
    margin-top: 12px;
}

.check-list p {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    color: var(--danger);
}

.preflight-premium-card {
    display: grid;
    gap: 10px;
    margin-top: 12px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.preflight-premium-card.is-low {
    background: #f4fbf8;
    border-color: #bfe3d9;
}

.preflight-premium-card.is-medium {
    background: #fffaf0;
    border-color: #efd9a6;
}

.preflight-premium-card.is-high {
    background: #fff7f5;
    border-color: #f0c2ba;
}

.preflight-premium-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.preflight-premium-head > div {
    display: grid;
    gap: 6px;
}

.preflight-premium-head strong {
    color: var(--ink);
    font-size: 14px;
}

.preflight-premium-head small {
    color: var(--muted);
    font-size: 11px;
    font-weight: 760;
    text-align: right;
}

.preflight-premium-list {
    display: grid;
    gap: 8px;
}

.preflight-premium-item {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr);
    gap: 8px;
    align-items: start;
    padding: 8px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.76);
}

.preflight-premium-item .icon {
    width: 17px;
    height: 17px;
    margin-top: 1px;
}

.preflight-premium-item.blocker {
    color: var(--danger);
}

.preflight-premium-item.warning {
    color: #8a5a00;
}

.preflight-premium-item strong,
.preflight-premium-item small {
    display: block;
}

.preflight-premium-item strong {
    font-size: 12px;
    line-height: 1.32;
}

.preflight-premium-item small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.35;
}

.builder-shell {
    display: grid;
    grid-template-columns: 250px minmax(480px, 1fr) minmax(360px, 0.9fr);
    gap: 12px;
    align-items: start;
}

.builder-rail,
.designer-panel,
.preview-panel {
    min-width: 0;
}

.builder-rail {
    position: sticky;
    top: 78px;
    padding: 14px;
}

.rail-section + .rail-section {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
}

.template-tile {
    width: 100%;
    display: grid;
    gap: 3px;
    justify-content: start;
    min-height: auto;
    margin-top: 8px;
    padding: 12px;
    background: #fff;
    color: var(--ink);
    border: 1px solid var(--line);
    text-align: left;
}

.template-tile:hover {
    background: #fbfbfa;
    border-color: var(--ink);
}

.template-tile span {
    color: var(--muted);
    font-weight: 500;
}

.block-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 10px;
}

.block-grid button {
    min-height: 72px;
    display: grid;
    place-items: center;
    gap: 5px;
    padding: 10px;
    background: #fff;
    color: var(--ink);
    border: 1px solid var(--line);
}

.block-grid button:hover {
    background: var(--accent);
    color: var(--accent-ink);
    border-color: #9fe12f;
}

.block-popover {
    width: 280px;
}

.block-popover-head {
    display: grid;
    gap: 2px;
    margin-bottom: 10px;
}

.block-popover-head strong {
    font-size: 13px;
}

.block-popover-head span {
    color: var(--muted);
    font-size: 12px;
}

.block-grid-compact {
    margin-top: 0;
}

.block-grid-compact button {
    min-height: 64px;
    cursor: grab;
}

.block-grid-compact button:active,
.composer-tool[draggable="true"]:active {
    cursor: grabbing;
}

.block-grid-compact .icon {
    width: 18px;
    height: 18px;
}

.rail-tools {
    display: grid;
    gap: 8px;
}

.rail-tools label {
    margin-top: 4px;
    font-size: 12px;
}

.rail-tools input {
    min-height: 36px;
    padding: 8px 10px;
    font-size: 13px;
}

.rail-hint {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.4;
}

.rail-action {
    width: 100%;
    min-height: 36px;
    margin: 2px 0 8px;
    padding: 8px 10px;
    background: var(--ink);
    color: #fff;
    border: 1px solid var(--ink);
}

.rail-action:hover {
    background: #303236;
    border-color: #303236;
}

.chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.chip-list button {
    min-height: 28px;
    padding: 5px 8px;
    background: #f4f4f2;
    color: var(--ink);
    border: 1px solid var(--line);
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 11px;
}

.designer-panel,
.preview-panel {
    padding: 14px;
}

.designer-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}

.segmented {
    display: inline-flex;
    padding: 3px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f4f4f2;
}

.segmented button {
    min-height: 28px;
    padding: 5px 9px;
    border: 0;
    background: transparent;
    color: var(--muted);
}

.segmented button.active {
    background: #fff;
    color: var(--ink);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.canvas-wrap {
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
}

.email-canvas {
    max-width: 700px;
    min-height: 640px;
    margin: 0 auto;
    padding: 14px;
    box-sizing: border-box;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow);
}

.email-canvas img {
    cursor: pointer;
}

.email-canvas a[data-soltek-link="text"] {
    color: #2563eb !important;
    text-decoration: none !important;
    cursor: pointer;
}

.email-canvas a[data-soltek-link="text"]:hover {
    color: #174ea6 !important;
}

.email-canvas img.is-selected-editor-image {
    outline: 3px solid #00a884;
    outline-offset: 3px;
    box-shadow: 0 0 0 6px rgba(0, 168, 132, 0.16);
}

.email-canvas [data-soltek-image-block].is-selected-editor-image-block {
    position: relative;
}

.email-canvas .is-selected-editor-component {
    outline: 3px solid #256f8f;
    outline-offset: 3px;
    box-shadow: 0 0 0 6px rgba(37, 111, 143, 0.14);
}

.component-config-panel {
    position: fixed;
    z-index: 1800;
    box-sizing: border-box;
    width: min(360px, calc(100vw - 24px));
    max-height: min(78vh, 620px);
    overflow: auto;
    overscroll-behavior: contain;
    border: 1px solid rgba(185, 202, 196, 0.96);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 22px 52px rgba(31, 45, 48, 0.22);
}

.component-config-panel[hidden] {
    display: none;
}

.component-config-head {
    position: sticky;
    top: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--line);
    background: #fff;
}

.component-config-head .eyebrow {
    margin: 0 0 3px;
}

.component-config-head strong {
    display: block;
    font-size: 14px;
}

.component-config-done {
    min-height: 32px;
    padding: 6px 11px;
    font-size: 12px;
}

.component-config-body {
    display: grid;
    gap: 9px;
    padding: 12px;
}

.component-config-body label {
    display: grid;
    gap: 5px;
    margin: 0;
    color: var(--muted);
    font-size: 11px;
    font-weight: 850;
}

.component-config-body input,
.component-config-body select {
    width: 100%;
    min-height: 34px;
    padding: 7px 9px;
    color: var(--ink);
    font-size: 12px;
    font-weight: 650;
}

.component-config-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.component-config-grid input[type="color"] {
    min-height: 36px;
    padding: 3px;
}

.component-config-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.component-config-actions .button,
.component-config-body > .button {
    min-height: 34px;
    padding: 7px 10px;
    font-size: 12px;
}

.component-danger {
    color: var(--danger);
}

.component-trash-button {
    width: 36px;
    min-width: 36px;
    min-height: 36px;
    border-color: #f0c8c3;
    background: #fff;
}

.component-trash-button:hover {
    color: #fff;
    border-color: var(--danger);
    background: var(--danger);
}

.component-trash-button .icon {
    width: 17px;
    height: 17px;
}

.component-style-toggle {
    width: 36px;
    min-width: 36px;
    min-height: 36px;
    color: #086f67;
    border-color: #bddbd5;
    background: #fff;
}

.component-style-toggle:hover,
.component-style-toggle.active,
.component-style-toggle[aria-pressed="true"] {
    color: #064f49;
    border-color: #78c6bb;
    background: #dff8f1;
}

.component-style-toggle .icon {
    width: 17px;
    height: 17px;
}

@media (max-width: 720px) {
    .component-config-panel {
        width: calc(100vw - 24px);
        max-height: calc(100vh - 24px);
    }
}

.email-canvas:focus {
    outline: 3px solid rgba(0, 168, 132, 0.18);
    border-color: var(--ink);
}

.email-canvas.is-drop-active {
    outline: 3px solid rgba(0, 168, 132, 0.24);
    border-color: var(--accent-2);
    background: #fbfff4;
}

.text-editor-panel {
    max-width: 700px;
    min-height: 640px;
    margin: 0 auto;
    padding: 18px;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow);
}

.text-editor-panel[hidden] {
    display: none;
}

.text-editor-panel label {
    margin-top: 0;
}

.text-editor-panel textarea {
    min-height: 560px;
    font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
    font-size: 13px;
    line-height: 1.5;
}

.plain-text-box {
    margin-top: 12px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfbfa;
}

.preview-panel {
    position: sticky;
    top: 78px;
}

.preview-stage {
    display: none;
}

.preview-stage.active {
    display: block;
}

.browser-bar {
    display: flex;
    align-items: center;
    gap: 7px;
    height: 34px;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-bottom: 0;
    border-radius: 8px 8px 0 0;
    background: #f4f4f2;
}

.browser-bar span {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: #d7d8d4;
}

.browser-bar strong {
    margin-left: 6px;
    color: var(--muted);
    font-size: 11px;
}

.campaign-preview-desktop {
    min-height: 720px;
    border-radius: 0 0 8px 8px;
}

.mobile-preview {
    display: none;
    justify-items: center;
}

.mobile-preview.active {
    display: grid;
}

.phone-shell {
    width: 320px;
    min-height: 700px;
    padding: 24px 10px 12px;
    border: 1px solid #0f1115;
    border-radius: 28px;
    background: #111;
    box-shadow: 0 18px 40px rgba(20, 20, 20, 0.18);
}

.phone-speaker {
    width: 72px;
    height: 6px;
    margin: 0 auto 14px;
    border-radius: 999px;
    background: #303236;
}

.campaign-preview-mobile {
    width: 100%;
    min-height: 640px;
    border: 0;
    border-radius: 18px;
}

.button-accent {
    background: var(--accent);
    color: var(--accent-ink);
    border-color: #9fe12f;
}

.button-accent:hover {
    background: #b8f72e;
    color: var(--accent-ink);
    border-color: #8acb24;
}

.compose-workspace {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    padding: 16px;
}

.composer-head {
    order: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.composer-head h3 {
    margin: 0;
    font-size: 18px;
}

.compose-toolbar {
    display: grid;
    gap: 8px;
    margin-bottom: 12px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.mail-toolbar {
    position: sticky;
    top: 72px;
    z-index: 6;
    order: 2;
    display: grid;
    gap: 6px;
    width: 100%;
    margin: 0 0 10px;
    padding: 8px 10px;
    border: 1px solid rgba(199, 210, 199, 0.9);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 12px 28px rgba(17, 18, 20, 0.08);
    backdrop-filter: blur(18px);
}

.composer-strip-main,
.inline-format-panel {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

.inline-format-panel {
    display: none;
    padding-top: 7px;
    border-top: 1px solid var(--line);
}

.template-control {
    display: flex;
    align-items: center;
    gap: 10px;
}

.template-control .eyebrow {
    margin: 0;
}

.template-menu > summary {
    width: auto;
    min-width: 0;
    padding: 0 10px;
    gap: 7px;
}

.template-menu > summary span:not(.sr-only) {
    font-size: 12px;
    font-weight: 780;
}

.composer-tool,
.toolbar-menu > summary {
    width: 34px;
    min-width: 34px;
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: #3a403c;
    font-size: 12px;
    font-weight: 760;
    list-style: none;
    cursor: pointer;
}

.composer-tool:hover,
.toolbar-menu > summary:hover,
.toolbar-menu[open] > summary,
.composer-tool.active {
    background: #edf4ed;
    color: var(--ink);
    border-color: #d3ded3;
}

.composer-tool.active {
    background: var(--ink);
    color: #fff;
    border-color: var(--ink);
}

.composer-tool .icon,
.toolbar-menu .icon {
    width: 17px;
    height: 17px;
}

.toolbar-separator {
    width: 1px;
    height: 22px;
    margin: 0 4px;
    background: var(--line);
}

.toolbar-font-control {
    width: auto;
    margin: 0 2px 0 0;
}

.toolbar-font-control select {
    width: 148px;
    min-height: 34px;
    padding: 6px 28px 6px 9px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 760;
}

.color-tool {
    position: relative;
}

.color-letter {
    font-size: 14px;
    font-weight: 850;
}

.color-dot {
    position: absolute;
    left: 9px;
    right: 9px;
    bottom: 6px;
    height: 3px;
    border-radius: 999px;
}

.text-color-dot {
    background: #111214;
}

.highlight-color-dot {
    background: var(--accent);
}

.toolbar-menu {
    position: relative;
}

.toolbar-menu > summary::-webkit-details-marker {
    display: none;
}

.toolbar-popover {
    position: absolute;
    top: calc(100% + 9px);
    left: 0;
    z-index: 20;
    width: 286px;
    display: grid;
    gap: 8px;
    padding: 12px;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 18px 45px rgba(17, 18, 20, 0.16);
}

.toolbar-popover label {
    margin: 0;
}

.toolbar-popover input {
    min-height: 34px;
    padding: 8px 10px;
    font-size: 12px;
}

.toolbar-popover textarea,
.toolbar-popover select {
    width: 100%;
    min-height: 34px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    font: inherit;
    font-size: 12px;
}

.toolbar-popover textarea {
    resize: vertical;
    line-height: 1.45;
}

.toolbar-popover .button {
    width: 100%;
}

.smart-block-popover {
    top: auto;
    bottom: calc(100% + 9px);
    width: 340px;
    max-height: min(78vh, 520px);
    overflow: auto;
}

.smart-block-menu.is-floating-smart-popover .smart-block-popover {
    position: absolute;
    top: var(--smart-popover-top, 96px);
    bottom: auto;
    left: var(--smart-popover-left, 12px);
    z-index: 70;
}

.smart-block-menu.is-floating-smart-popover {
    position: static;
}

.smart-block-popover.is-detached-smart-popover {
    position: fixed;
    top: var(--smart-popover-top, 96px);
    bottom: auto;
    left: var(--smart-popover-left, 12px);
    z-index: 1000;
    width: min(340px, calc(100vw - 24px));
}

.smart-block-popover-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding-bottom: 4px;
    border-bottom: 1px solid var(--line);
}

.smart-block-popover-head strong {
    font-size: 12px;
}

.smart-block-close {
    width: 28px;
    min-width: 28px;
    min-height: 28px;
    font-size: 12px;
    font-weight: 850;
}

.smart-block-row {
    display: grid;
    gap: 5px;
}

.smart-block-condition-row {
    grid-template-columns: 1fr 1fr;
}

.smart-block-condition-row label {
    grid-column: 1 / -1;
}

.smart-block-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.smart-block-menu > summary {
    color: #0f5f56;
}

[data-soltek-smart-block] {
    position: relative;
}

[data-soltek-smart-block].is-selected-smart-block {
    outline: 2px solid #0f766e;
    outline-offset: 2px;
}

.menu-popover {
    width: 270px;
    padding: 6px;
}

.menu-row {
    width: 100%;
    min-height: auto;
    display: grid;
    justify-content: stretch;
    gap: 2px;
    padding: 10px;
    border-radius: 8px;
    background: transparent;
    color: var(--ink);
    text-align: left;
}

.menu-row:hover {
    background: #edf4ed;
    color: var(--ink);
}

.menu-row strong {
    font-size: 13px;
}

.menu-row span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 500;
}

.token-popover {
    width: 292px;
    display: block;
    padding: 10px;
}

.token-popover-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.upload-status {
    margin-left: auto;
    padding-left: 8px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
}

.upload-status:empty {
    display: none;
}

.upload-status.is-loading {
    color: #6a7a00;
}

.upload-status.is-success {
    color: #007a5f;
}

.upload-status.is-error {
    color: var(--danger);
}

.tool-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfbfa;
}

.tool-title {
    color: #50545a;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    margin-right: 2px;
}

.tool-title-inline {
    margin-left: 10px;
}

.tool-chip {
    min-height: 30px;
    padding: 5px 9px;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
    font-size: 12px;
    font-weight: 700;
}

.tool-chip:hover {
    border-color: var(--ink);
    background: #fff;
}

.tool-chip-strong {
    background: var(--ink);
    color: #fff;
    border-color: var(--ink);
}

.tool-chip-strong:hover {
    background: #303236;
    border-color: #303236;
}

.token-chip {
    min-height: 28px;
    padding: 4px 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f4f4f2;
    color: var(--ink);
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 11px;
}

.static-token,
.placeholder-chip {
    display: inline-flex;
    align-items: center;
}

.token-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.import-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.import-summary-grid small {
    display: block;
    margin-bottom: 4px;
    color: var(--muted);
}

.import-summary-grid strong {
    display: block;
    font-size: 16px;
}

.import-target-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.import-target-choice {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fbfbf9;
}

.import-target-choice label {
    display: flex;
    gap: 8px;
    align-items: center;
    font-weight: 600;
}

.mapping-table select,
.mapping-table input {
    width: 100%;
}

.custom-field-box {
    display: grid;
    gap: 8px;
}

.is-hidden {
    display: none !important;
}

.tool-row input {
    min-height: 30px;
    padding: 6px 8px;
    font-size: 12px;
    width: 170px;
}

.tool-assets input {
    width: 210px;
}

.compose-canvas {
    order: 3;
    margin-top: 2px;
}

@media (max-width: 980px) {
    .import-summary-grid,
    .import-target-row {
        grid-template-columns: 1fr;
    }
}

.plain-text-box {
    order: 4;
}

.preview-workspace {
    display: grid;
    grid-template-columns: 340px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
}

.preview-side {
    display: grid;
    gap: 12px;
    position: sticky;
    top: 78px;
}

.preview-main {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    padding: 14px;
}

.compact-fields {
    gap: 8px;
    margin-top: 6px;
}

.compact-fields div {
    gap: 2px;
}

.compact-fields strong {
    color: #181b1f;
    font-size: 13px;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.campaign-console-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 10px;
}

.campaign-console-head h2 {
    margin: 0;
    font-size: 24px;
}

.campaign-sent-showcase {
    padding: 18px 20px;
    margin-bottom: 14px;
    border-color: rgba(12, 98, 116, 0.16);
    background:
        radial-gradient(circle at top left, rgba(14, 116, 144, 0.12), transparent 38%),
        linear-gradient(135deg, rgba(248, 252, 252, 0.98), rgba(255, 255, 255, 0.96));
}

.campaign-sent-showcase-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.campaign-sent-toolbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.campaign-bulk-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.campaign-bulk-actions span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 750;
    white-space: nowrap;
}

.campaign-bulk-actions strong {
    color: var(--ink);
}

.campaign-bulk-delete-button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.campaign-sent-title-wrap {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    min-width: 0;
}

.campaign-sent-icon {
    width: 46px;
    min-width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #0a6f83;
    background: linear-gradient(135deg, rgba(13, 148, 136, 0.16), rgba(14, 116, 144, 0.12));
    box-shadow: inset 0 0 0 1px rgba(12, 98, 116, 0.14);
}

.campaign-sent-icon .icon {
    width: 19px;
    min-height: 19px;
    margin: 0;
}

.campaign-sent-copy {
    min-width: 0;
}

.campaign-sent-copy .eyebrow {
    margin: 0 0 5px;
}

.campaign-sent-copy p:last-child {
    max-width: 780px;
    margin: 6px 0 0;
    color: var(--muted);
}

.campaign-sent-heading-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.campaign-sent-heading-row .table-title {
    margin: 0;
}

.campaign-sent-stack {
    margin-bottom: 16px;
}

.campaign-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
}

.campaign-tabs a {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 11px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
    text-decoration: none;
    font-weight: 760;
}

.campaign-tabs a.active {
    background: var(--ink);
    color: #fff;
    border-color: var(--ink);
}

.campaign-tabs strong {
    min-width: 22px;
    min-height: 22px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.08);
    font-size: 11px;
}

.campaign-tabs a.active strong {
    background: rgba(255, 255, 255, 0.16);
}

.campaign-console .actions {
    justify-content: flex-end;
}

.ab-create-actions {
    display: grid;
    grid-template-columns: repeat(2, max-content);
    align-items: center;
    justify-content: end;
    gap: 10px;
}

.progress-cell {
    min-width: 180px;
    display: grid;
    gap: 5px;
}

.campaign-ab-progress-summary {
    cursor: default;
}

.campaign-reschedule-form {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.campaign-reschedule-form input[type="datetime-local"] {
    width: 176px;
    min-height: 30px;
    padding: 5px 7px;
    font-size: 12px;
}

.campaign-reschedule-form .button {
    min-height: 30px;
    padding: 5px 9px;
}

.provider-progress-trigger {
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.provider-progress-trigger:hover .progress-track,
.provider-progress-trigger:focus-visible .progress-track {
    box-shadow: 0 0 0 2px rgba(0, 127, 130, 0.14);
}

.provider-progress-trigger:focus-visible {
    outline: 2px solid rgba(0, 127, 130, 0.55);
    outline-offset: 3px;
    border-radius: 8px;
}

.provider-rate-trigger {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    cursor: pointer;
}

.provider-rate-trigger:hover .metric-pill,
.provider-rate-trigger:focus-visible .metric-pill {
    box-shadow: 0 0 0 2px rgba(0, 127, 130, 0.14);
}

.provider-rate-trigger:focus-visible {
    outline: 2px solid rgba(0, 127, 130, 0.55);
    outline-offset: 3px;
    border-radius: 999px;
}

.progress-track {
    width: 100%;
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: #eceeeb;
}

.progress-track span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--accent);
}

.progress-cell small,
.send-progress-card p {
    margin: 0;
    color: var(--muted);
    font-size: 11px;
}

.send-rate-badge {
    color: var(--brand);
    font-weight: 850;
    white-space: nowrap;
}

.send-speed-muted {
    color: var(--muted);
    font-size: 10px;
    font-weight: 500;
    margin-left: 4px;
    white-space: nowrap;
}

.danger-text {
    color: var(--danger) !important;
}

.send-progress-card {
    display: grid;
    gap: 8px;
    margin-bottom: 12px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfbfa;
}

.progress-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.progress-meta strong {
    font-size: 18px;
}

.progress-meta span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

@media (max-width: 980px) {
    .hero,
    .section-grid,
    .kpi-grid,
    .campaign-layout,
    .studio-setup,
    .builder-shell,
    .setup-grid,
    .preview-workspace {
        grid-template-columns: 1fr;
    }

    .hero h2 {
        font-size: 24px;
    }

    .campaign-side {
        position: static;
    }

    .builder-rail,
    .preview-panel,
    .preview-side {
        position: static;
    }

    .studio-command {
        align-items: flex-start;
        flex-direction: column;
    }

    .composer-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .mail-toolbar {
        position: static;
    }

    .composer-strip-main,
    .inline-format-panel {
        align-items: center;
    }

    .upload-status {
        width: 100%;
        margin-left: 0;
        padding-left: 0;
    }

    .toolbar-group,
    .campaign-console-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .toolbar-popover {
        position: static;
        width: 100%;
        box-shadow: none;
    }

    .tool-assets input,
    .tool-row input {
        width: 100%;
    }

    .phone-shell {
        width: min(100%, 320px);
    }
}

/* 2026 campaign experience refresh */
:root {
    --bg: #f6f8f7;
    --surface: #ffffff;
    --surface-2: #eef4f2;
    --ink: #202328;
    --muted: #69736f;
    --line: #dde5e2;
    --line-strong: #c8d5d0;
    --panel: rgba(255, 255, 255, 0.78);
    --soft: #f0f6f3;
    --brand: #006d6f;
    --brand-dark: #004f52;
    --accent: #bdeee4;
    --accent-2: #ffc9b8;
    --accent-ink: #113c3d;
    --danger: #b42318;
    --shadow: 0 16px 34px rgba(31, 55, 49, 0.09);
}

body {
    color: var(--ink);
    background:
        linear-gradient(180deg, #ffffff 0, #f9fbfb 230px, var(--bg) 100%);
}

a {
    color: var(--brand);
}

.sidebar {
    background: rgba(255, 255, 255, 0.86);
    backdrop-filter: blur(18px);
}

.brand-mark {
    background: var(--accent);
    border-color: #8ddbcc;
}

.side-link {
    color: #35413d;
}

.side-link:hover {
    background: #eef5f2;
}

.side-link.active {
    background: #123f41;
    border-color: #123f41;
}

.workspace-top {
    background: rgba(255, 255, 255, 0.76);
    backdrop-filter: blur(20px);
}

button,
.button {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
}

button:hover,
.button:hover {
    background: var(--brand-dark);
    border-color: var(--brand-dark);
}

.button-ghost {
    background: rgba(255, 255, 255, 0.72);
    color: var(--ink);
    border-color: var(--line-strong);
}

.button-ghost:hover {
    background: #eef5f2;
    border-color: #aebfba;
}

.button-accent {
    background: var(--accent);
    color: var(--accent-ink);
    border-color: #8ddbcc;
}

.button-accent:hover {
    background: #a8e5d9;
    border-color: #79cdbc;
}

input,
select,
textarea {
    border-color: var(--line-strong);
    background: rgba(255, 255, 255, 0.9);
}

input:focus,
select:focus,
textarea:focus {
    outline: 3px solid rgba(0, 109, 111, 0.13);
    border-color: var(--brand);
}

.studio-command,
.studio-panel,
.compose-workspace,
.preview-main,
.table-card,
.card,
.panel-wide {
    border-color: rgba(200, 213, 208, 0.86);
    background: rgba(255, 255, 255, 0.76);
    box-shadow: 0 1px 0 rgba(31, 55, 49, 0.03);
    backdrop-filter: blur(18px);
}

.studio-command {
    align-items: stretch;
    padding: 12px;
}

.campaign-command-main {
    min-width: min(100%, 460px);
    display: grid;
    gap: 8px;
}

.campaign-stepper {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
}

.campaign-stepper span {
    min-height: 24px;
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 4px 8px;
    background: rgba(255, 255, 255, 0.72);
}

.campaign-stepper span.active {
    color: var(--accent-ink);
    background: var(--accent);
    border-color: #8ddbcc;
}

.campaign-stepper i {
    width: 42px;
    height: 2px;
    border-radius: 999px;
    background: var(--line-strong);
}

.campaign-name-field {
    margin: 0;
    display: grid;
    gap: 5px;
}

.campaign-name-field span {
    color: #818984;
    font-size: 10px;
    font-weight: 850;
    text-transform: uppercase;
}

.campaign-name-field input {
    min-height: 36px;
    padding: 6px 0;
    border: 0;
    border-bottom: 1px solid transparent;
    border-radius: 0;
    background: transparent;
    color: var(--ink);
    font-size: 22px;
    font-weight: 820;
}

.campaign-name-field input:focus {
    outline: 0;
    border-color: var(--brand);
}

.studio-command h2 {
    margin: 0;
    font-size: 22px;
}

.studio-command p {
    margin: 0;
}

.studio-command-actions {
    align-self: center;
}

.studio-setup-edit {
    grid-template-columns: minmax(360px, 0.95fr) minmax(360px, 1.05fr) minmax(280px, 0.7fr);
}

.studio-panel {
    padding: 13px;
}

.panel-title {
    margin-bottom: 10px;
}

.panel-title h3 {
    font-size: 14px;
}

.panel-title p {
    font-size: 12px;
}

.step-dot {
    width: 26px;
    height: 26px;
    background: var(--accent);
    border-color: #8ddbcc;
}

.identity-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 7px;
}

.identity-grid label,
.inbox-panel label {
    margin-top: 8px;
}

.inbox-card {
    margin-top: 10px;
    border-color: var(--line);
    background: rgba(247, 250, 249, 0.78);
}

.inbox-avatar {
    background: #123f41;
}

.audience-picker-button {
    width: 100%;
    min-height: 58px;
    display: grid;
    justify-content: stretch;
    gap: 4px;
    padding: 10px 12px;
    background: rgba(247, 250, 249, 0.86);
    color: var(--ink);
    border: 1px solid var(--line);
    text-align: left;
}

.audience-picker-button:hover {
    background: #eef5f2;
    border-color: var(--brand);
    color: var(--ink);
}

.audience-picker-button span {
    color: var(--muted);
    font-size: 12px;
}

.mini-metrics {
    gap: 6px;
    margin-top: 10px;
}

.mini-metrics div,
.check-grid div {
    padding: 8px;
    background: rgba(250, 252, 251, 0.82);
}

.mini-metrics strong,
.check-grid strong {
    margin-top: 3px;
    font-size: 17px;
}

.compact-notice,
.notice {
    padding: 9px 10px;
    background: #edf8f4;
    border-color: #bfe3d9;
}

.audience-modal[hidden] {
    display: none;
}

.audience-modal {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: grid;
    place-items: center;
    padding: 24px;
}

.audience-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(32, 35, 40, 0.32);
    backdrop-filter: blur(6px);
}

.audience-dialog {
    position: relative;
    z-index: 1;
    width: min(660px, 100%);
    max-height: min(760px, calc(100vh - 48px));
    display: grid;
    grid-template-rows: auto minmax(260px, 1fr) auto;
    gap: 10px;
    padding: 14px;
    border: 1px solid rgba(221, 229, 226, 0.95);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow);
    backdrop-filter: blur(22px);
}

.audience-dialog header,
.audience-dialog footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.audience-dialog header h2 {
    margin: 0;
    font-size: 20px;
}

.audience-dialog-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.audience-select-grid {
    display: grid;
    gap: 8px;
    min-height: 0;
    overflow: auto;
    padding-right: 4px;
}

body.has-list-delete-open {
    overflow: hidden;
}

body.has-provider-overlay-open {
    overflow: hidden;
}

.provider-stats-dialog {
    width: min(620px, 100%);
    grid-template-rows: auto minmax(0, 1fr);
}

.provider-stats-dialog header {
    align-items: flex-start;
}

.provider-stats-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.provider-stats-close span {
    display: block;
    font-size: 20px;
    line-height: 1;
}

.provider-stats-body {
    min-height: 0;
    overflow: auto;
    display: grid;
    align-content: start;
    gap: 8px;
    padding: 2px;
}

.provider-stats-body .provider-chart-list {
    gap: 10px;
}

.provider-stats-body .provider-chart-row {
    grid-template-columns: minmax(110px, 160px) minmax(150px, 1fr) auto minmax(120px, auto);
}

.list-delete-dialog {
    width: min(680px, 100%);
}

.list-delete-dialog-body {
    display: grid;
    gap: 12px;
    min-height: 0;
    overflow: auto;
}

.list-delete-preview {
    display: grid;
    gap: 8px;
    max-height: 220px;
    overflow: auto;
}

.list-delete-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(247, 250, 249, 0.9);
}

.list-delete-item strong {
    font-size: 13px;
    line-height: 1.35;
}

.list-delete-item small {
    color: var(--muted);
    font-size: 11px;
    white-space: nowrap;
}

.list-delete-confirm {
    display: grid;
    gap: 8px;
    padding: 12px;
    border: 1px dashed #d6b08c;
    border-radius: 12px;
    background: #fff8f1;
}

.list-delete-confirm p {
    margin: 0;
}

.audience-select-block {
    display: grid;
    gap: 4px;
    margin: 0;
}

.audience-select-block span,
.audience-exclude-toggle label {
    color: #202328;
    font-size: 12px;
    font-weight: 850;
}

.audience-select-block small,
.audience-exclude-toggle small {
    color: var(--muted);
    font-size: 12px;
}

.audience-multiselect {
    width: 100%;
    min-height: 250px;
    padding: 4px;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.94);
    font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
    font-size: 12px;
    line-height: 1.2;
}

.audience-multiselect option {
    padding: 2px 6px;
}

.audience-exclude-toggle {
    display: grid;
    gap: 2px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(247, 250, 249, 0.8);
}

.audience-exclude-toggle label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.audience-exclude-toggle input {
    width: 15px;
    min-height: 15px;
    padding: 0;
}

#excludeListBlock[hidden] {
    display: none;
}

.mail-toolbar {
    border-color: rgba(200, 213, 208, 0.92);
    background: rgba(255, 255, 255, 0.82);
}

.composer-tool:hover,
.toolbar-menu > summary:hover,
.toolbar-menu[open] > summary,
.composer-tool.active {
    background: #eaf6f2;
    border-color: #c7ddd6;
}

.toolbar-popover {
    border-color: rgba(200, 213, 208, 0.94);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 18px 38px rgba(31, 55, 49, 0.15);
}

.color-popover {
    width: 250px;
    gap: 10px;
}

.color-section {
    display: grid;
    gap: 6px;
}

.color-section > span,
.color-custom > span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
}

.color-grid {
    display: grid;
    grid-template-columns: repeat(8, 22px);
    gap: 5px;
}

.color-swatch {
    width: 22px;
    min-width: 22px;
    min-height: 22px;
    height: 22px;
    border: 1px solid rgba(40, 45, 48, 0.22);
    border-radius: 7px;
    padding: 0;
}

.color-swatch:hover {
    transform: translateY(-1px);
    border-color: var(--brand);
}

.recent-empty {
    grid-column: 1 / -1;
    color: var(--muted);
    font-size: 12px;
}

.color-custom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding-top: 8px;
    border-top: 1px solid var(--line);
}

.color-custom input[type="color"] {
    width: 38px;
    min-width: 38px;
    min-height: 28px;
    height: 28px;
    padding: 2px;
    border-radius: 8px;
}

.canvas-wrap {
    background: #ffffff;
}

.email-canvas {
    box-shadow: 0 14px 30px rgba(31, 55, 49, 0.12);
}

.review-layout {
    grid-template-columns: minmax(0, 1fr) 330px;
}

.preview-side-right {
    order: 2;
}

.email-simulation {
    min-width: 0;
}

.email-client-header {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: start;
    padding: 13px;
    margin-bottom: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(250, 252, 251, 0.9);
}

.email-client-header h2 {
    margin: 5px 0 0;
    font-size: 17px;
}

.email-client-header p {
    margin: 3px 0 0;
}

.email-client-line {
    overflow-wrap: anywhere;
}

.email-client-time {
    color: var(--muted);
    font-size: 12px;
}

.audience-summary-card {
    display: grid;
    gap: 3px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(247, 250, 249, 0.86);
}

.audience-summary-card span {
    color: var(--muted);
    font-size: 12px;
}

.field-hint {
    margin: 5px 0 0;
    font-size: 11px;
}

.field-popover-wrap {
    position: relative;
}

.field-popover-wrap input {
    padding-right: 44px;
}

.field-token-menu {
    position: absolute;
    top: 50%;
    right: 6px;
    transform: translateY(-50%);
}

.field-token-menu > summary {
    width: 30px;
    min-width: 30px;
    min-height: 30px;
    border-radius: 10px;
}

.toolbar-menu.is-disabled > summary {
    opacity: 0.34;
    cursor: default;
    pointer-events: none;
    background: transparent;
    border-color: transparent;
    color: #9aa19d;
}

.field-token-popover {
    right: 0;
    left: auto;
    width: min(292px, calc(100vw - 48px));
}

.campaign-theme-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    min-width: min(100%, 330px);
}

.theme-color-control {
    display: grid;
    gap: 4px;
    margin: 0;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(247, 250, 249, 0.86);
}

.theme-color-control span {
    font-size: 12px;
    font-weight: 820;
}

.theme-color-control small {
    color: var(--muted);
    font-size: 11px;
}

.theme-color-control input[type="color"] {
    width: 100%;
    min-width: 0;
    min-height: 38px;
    height: 38px;
    padding: 4px;
    border-radius: 10px;
    cursor: pointer;
}

button.token-chip,
.token-chip {
    background: #f6f7f8;
    border-color: var(--line-strong);
    color: var(--ink);
}

button.token-chip:hover,
button.token-chip:focus-visible,
.token-chip:hover,
.token-chip:focus-visible {
    background: #eceff2;
    border-color: #b9c4cb;
    color: var(--ink);
}

.preview-contact-nav {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 8px;
    align-items: center;
}

.preview-contact-nav strong {
    text-align: center;
    font-size: 13px;
}

.preview-contact-card {
    display: grid;
    gap: 4px;
    margin-top: 10px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: rgba(247, 250, 249, 0.86);
}

.preview-contact-card strong {
    font-size: 14px;
}

.preview-contact-card small {
    color: var(--muted);
    font-size: 11px;
}

.preview-field-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 10px;
}

.preview-field-card {
    display: grid;
    gap: 3px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.86);
}

.preview-field-card span,
.preview-field-card small {
    color: var(--muted);
    font-size: 11px;
}

.preview-field-card strong {
    overflow-wrap: anywhere;
    font-size: 13px;
}

.preview-field-card.is-empty strong {
    color: #8a908c;
}

.status-live {
    background: #edf8f5;
    color: var(--brand-dark);
}

.status-warning {
    background: #fff4dc;
    color: #8a5a00;
}

.campaign-subject-label,
.campaign-preheader-label {
    display: block;
}

.campaign-subject-label {
    margin-bottom: 4px;
    font-size: 12px;
    font-weight: 820;
    letter-spacing: 0.02em;
}

.campaign-preheader-label {
    margin-bottom: 4px;
    font-size: 11px;
    font-weight: 760;
    color: var(--muted);
    letter-spacing: 0.01em;
}

#subject,
.campaign-subject-input {
    font-size: 18px;
    font-weight: 760;
    letter-spacing: -0.01em;
}

#preheader,
.campaign-preheader-input {
    font-size: 14px;
    color: #65706c;
}

#preheader::placeholder,
.campaign-preheader-input::placeholder {
    color: #95a09b;
}

.inbox-card-copy {
    min-width: 0;
}

.inbox-preview-copy {
    display: grid;
    gap: 3px;
}

#inboxSubject,
.inbox-preview-subject {
    display: block;
    color: var(--ink);
    font-size: 15px;
    font-weight: 780;
    line-height: 1.24;
}

#inboxPreheader,
.inbox-preview-preheader {
    display: block;
    color: #7b837f;
    font-size: 12px;
    line-height: 1.38;
}

.token-popover-fields:empty {
    display: none;
}

.send-confirm-box {
    display: grid;
    gap: 10px;
    margin-top: 12px;
    padding: 12px;
    border: 1px solid #bfd9d2;
    border-radius: 12px;
    background: #f7fbfa;
}

.send-confirm-box strong {
    font-size: 15px;
}

.send-confirm-box p {
    margin: 0;
}

.send-confirm-metrics {
    display: grid;
    gap: 8px;
    margin-top: 2px;
    grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
}

.send-confirm-metric {
    position: relative;
    min-width: 0;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas:
        "icon label"
        "icon value";
    align-items: center;
    column-gap: 8px;
    padding: 9px;
    border: 1px solid #d7e7e2;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.82);
}

.send-confirm-metric::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 50%;
    bottom: calc(100% + 8px);
    z-index: 40;
    width: max-content;
    max-width: min(260px, 72vw);
    padding: 7px 9px;
    border: 1px solid #bfd9d2;
    border-radius: 8px;
    background: #123f3d;
    color: #ffffff;
    font-size: 12px;
    line-height: 1.3;
    font-weight: 760;
    box-shadow: 0 10px 22px rgba(18, 63, 61, 0.2);
    transform: translateX(-50%) translateY(4px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.send-confirm-metric:hover::after,
.send-confirm-metric:focus-within::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.send-confirm-metric-icon {
    grid-area: icon;
    display: inline-grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    color: #086f67;
    background: #dff8f1;
}

.send-confirm-metric-icon .icon {
    width: 17px;
    height: 17px;
}

.send-confirm-metric small {
    grid-area: label;
    min-width: 0;
    color: #6b7471;
    font-size: 10px;
    line-height: 1.15;
    font-weight: 900;
    text-transform: uppercase;
}

.send-confirm-metric strong {
    grid-area: value;
    min-width: 0;
    margin-top: 2px;
    font-size: 16px;
    line-height: 1.15;
    white-space: normal;
    overflow-wrap: anywhere;
}

.send-confirm-transport-icons .icon {
    width: 18px;
    height: 18px;
}

.send-confirm-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.send-submit-status {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    margin: 0;
    padding: 9px 10px;
    border: 1px solid #add8d1;
    border-radius: 10px;
    background: #e9f8f5;
    color: #0b5f58;
    font-size: 12px;
    line-height: 1.35;
    font-weight: 820;
}

.send-submit-status[hidden] {
    display: none !important;
}

.send-submit-status-icon {
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    color: #07736a;
}

.send-submit-status-icon .icon {
    width: 16px;
    height: 16px;
    animation: send-submit-pulse 1s ease-in-out infinite;
}

.send-confirm-box[aria-busy="true"],
.ab-launch-confirm-card[aria-busy="true"] {
    cursor: progress;
}

.send-confirm-box[aria-busy="true"] .send-confirm-actions,
.ab-launch-confirm-card[aria-busy="true"] .actions {
    opacity: 0.72;
}

@keyframes send-submit-pulse {
    0%,
    100% {
        opacity: 0.55;
        transform: scale(0.96);
    }
    50% {
        opacity: 1;
        transform: scale(1);
    }
}

.preview-personalization-inline {
    display: grid;
    gap: 10px;
    margin-bottom: 12px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(247, 250, 249, 0.92);
}

.preview-contact-sample-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.preview-contact-sample-head strong {
    display: block;
    font-size: 14px;
    line-height: 1.2;
}

.preview-contact-sample-head small {
    color: var(--muted);
    font-size: 12px;
    font-weight: 760;
    white-space: nowrap;
}

.preview-contact-strip {
    display: flex;
    gap: 8px;
    max-width: 100%;
    overflow-x: auto;
    padding: 2px 2px 8px;
    scrollbar-width: thin;
}

.preview-contact-chip {
    flex: 0 0 clamp(148px, 18vw, 220px);
    min-height: 58px;
    padding: 9px 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--text);
    cursor: pointer;
    text-align: left;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.preview-contact-chip strong,
.preview-contact-chip small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.preview-contact-chip strong {
    font-size: 13px;
    line-height: 1.25;
}

.preview-contact-chip small {
    margin-top: 4px;
    color: var(--muted);
    font-size: 11px;
}

.preview-contact-chip.active {
    border-color: var(--accent);
    background: rgba(183, 239, 229, 0.28);
    box-shadow: 0 0 0 2px rgba(15, 118, 110, 0.08);
}

.preview-contact-chip.is-loading {
    opacity: 0.72;
}

.preview-personalization-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px 12px;
    align-items: start;
}

.preview-inline-label {
    color: var(--muted);
    font-size: 11px;
    font-weight: 760;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.preview-contact-card {
    margin-top: 0;
}

.preview-contact-nav {
    min-width: 210px;
}

.preview-field-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    margin-top: 0;
}

.preview-field-card {
    background: rgba(255, 255, 255, 0.94);
}

#previewSubject {
    font-size: 18px;
    font-weight: 820;
    line-height: 1.2;
}

#previewPreheader {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
}

.mobile-preview.active {
    padding: 6px 0 2px;
}

.phone-shell {
    width: min(390px, 100%);
    min-height: 760px;
    padding: 18px 12px 14px;
    border: 1px solid #162127;
    border-radius: 34px;
    background: linear-gradient(180deg, #1a2127 0%, #11161b 100%);
    box-shadow: 0 22px 48px rgba(16, 20, 24, 0.24);
}

.phone-speaker {
    width: 88px;
    height: 5px;
    margin: 0 auto 12px;
    background: #313a44;
}

.campaign-preview-mobile {
    min-height: 712px;
    height: 712px;
    border-radius: 24px;
    background: #fff;
    overflow: hidden;
    box-shadow: inset 0 0 0 1px rgba(19, 33, 38, 0.08);
}

.campaign-runtime-card,
.dashboard-runtime-card {
    margin-bottom: 14px;
}

.runtime-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 12px;
}

.runtime-card-head h2,
.runtime-card-head p {
    margin: 0;
}

.runtime-card-head p {
    margin-top: 4px;
}

.runtime-card-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.runtime-list {
    display: grid;
    gap: 10px;
}

.runtime-row {
    display: grid;
    gap: 8px;
    padding: 11px 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(247, 250, 249, 0.82);
}

.runtime-row-ab,
.campaign-ab-group-row {
    border-color: #a9cfca;
    background: #f7fbfa;
}

.campaign-ab-group-row > td {
    background: #f7fbfa;
    border-color: #d5e8e5;
}

.runtime-row small {
    color: var(--muted);
    font-size: 11px;
}

.runtime-diagnostic {
    display: grid;
    gap: 5px;
    padding: 9px 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.runtime-diagnostic p {
    margin: 0;
    color: var(--ink);
    font-size: 12px;
    line-height: 1.35;
}

.runtime-count-grid,
.runtime-timeline {
    display: grid;
    gap: 6px;
}

.runtime-count-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.runtime-timeline {
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
}

.runtime-count-grid span,
.runtime-timeline span {
    min-width: 0;
    padding: 7px 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(250, 252, 251, 0.82);
}

.runtime-count-grid small,
.runtime-timeline small,
.runtime-count-grid strong,
.runtime-timeline strong {
    display: block;
}

.runtime-count-grid small,
.runtime-timeline small {
    color: var(--muted);
    font-size: 10px;
    font-weight: 820;
    text-transform: uppercase;
}

.runtime-count-grid strong,
.runtime-timeline strong {
    margin-top: 2px;
    overflow: hidden;
    color: var(--ink);
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.runtime-row-main,
.runtime-row-side {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.runtime-row-main {
    align-items: flex-start;
}

.runtime-row-main strong,
.runtime-row-side strong {
    color: var(--ink);
}

.runtime-row-main strong a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: inherit;
    text-decoration: none;
}

.runtime-row-main strong a:hover,
.runtime-row-main strong a:focus-visible {
    color: var(--brand);
}

.runtime-row-main span {
    color: var(--muted);
    font-size: 12px;
}

.runtime-row-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.runtime-row-actions .button {
    min-height: 30px;
    padding: 5px 10px;
}

.runtime-delete-form {
    margin: 0;
}

.runtime-delete-button {
    min-height: 30px;
    padding: 5px 9px;
    white-space: nowrap;
}

.runtime-progress {
    margin: 0;
}

.runtime-empty {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.dashboard-runtime-card .runtime-list {
    max-height: min(64vh, 680px);
    overflow-y: auto;
    padding-right: 2px;
}

.dashboard-runtime-card .runtime-row {
    grid-template-columns: minmax(220px, 1fr) minmax(132px, 0.36fr) auto;
    align-items: center;
    gap: 6px 10px;
    padding: 8px 10px;
    border-radius: 8px;
}

.dashboard-runtime-card .runtime-row-main {
    min-width: 0;
    display: grid;
    justify-content: stretch;
    gap: 2px;
}

.dashboard-runtime-card .runtime-row-main strong,
.dashboard-runtime-card .runtime-row-main span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-runtime-card .runtime-row-side {
    min-width: 128px;
    justify-content: flex-end;
}

.dashboard-runtime-card .runtime-row-actions {
    flex-wrap: nowrap;
}

.dashboard-runtime-card .runtime-progress,
.dashboard-runtime-card .runtime-row small {
    grid-column: 1 / -1;
}

.dashboard-runtime-card .runtime-progress {
    height: 5px;
}

.dashboard-sent-card {
    margin-top: 14px;
    margin-bottom: 16px;
}

.dashboard-sent-toolbar {
    margin: 0;
    padding: 12px 14px 8px;
}

.dashboard-sent-table {
    min-width: 760px;
}

.dashboard-sent-table th,
.dashboard-sent-table td {
    vertical-align: middle;
}

.dashboard-progress-cell {
    min-width: 132px;
}

.dashboard-metric-stack {
    display: grid;
    gap: 4px;
    white-space: nowrap;
}

.dashboard-sent-table .actions {
    justify-content: flex-end;
    gap: 6px;
    flex-wrap: nowrap;
}

@media (max-width: 780px) {
    .dashboard-command-bar {
        grid-template-columns: 1fr;
    }

    .dashboard-command-main {
        align-items: stretch;
        flex-direction: column;
    }

    .dashboard-primary-actions,
    .dashboard-focus-metrics {
        justify-content: stretch;
    }

    .dashboard-primary-actions .button {
        flex: 1 1 150px;
        justify-content: center;
    }

    .dashboard-focus-metrics span {
        flex: 1 1 96px;
    }

    .dashboard-runtime-card .runtime-row {
        grid-template-columns: 1fr;
    }

    .dashboard-runtime-card .runtime-row-side,
    .dashboard-runtime-card .runtime-row-actions {
        min-width: 0;
        justify-content: flex-start;
    }
}

.campaign-console-tools,
.campaign-control-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.campaign-control-row {
    align-items: stretch;
}

.campaign-inline-tools {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
    min-width: min(100%, 520px);
}

.campaign-search {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 1 260px;
}

.campaign-search input {
    max-width: 220px;
    min-height: 34px;
    padding: 7px 9px;
}

.campaign-purge-form {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
}

.campaign-purge-form select {
    width: 170px;
    min-height: 34px;
    padding: 7px 9px;
    font-size: 12px;
}

.campaign-console table {
    font-size: 12px;
}

.campaign-console th,
.campaign-console td {
    padding: 5px 8px;
    vertical-align: middle;
}

.campaign-row-title {
    gap: 7px;
    line-height: 1.15;
}

.campaign-row-subject {
    display: block;
    margin-top: 2px;
    color: #7b837f;
    font-size: 11px;
    line-height: 1.15;
}

.lists-layout {
    grid-template-columns: minmax(0, 1fr) 300px;
}

.lists-console table {
    font-size: 12px;
}

.lists-console th,
.lists-console td {
    padding: 5px 8px;
    vertical-align: middle;
}

.list-row-title {
    gap: 7px;
    line-height: 1.15;
}

.list-name-cell {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
}

.list-name-cell .list-row-title {
    min-width: 0;
}

.list-import-live {
    display: block;
    margin-top: 3px;
    white-space: nowrap;
    font-size: 12px;
}

.list-ab-source {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    flex: 0 1 auto;
    min-width: 0;
    max-width: 190px;
    color: #2b9bd7;
    font-size: 11px;
    font-weight: 850;
    line-height: 1.1;
    text-decoration: none;
    white-space: nowrap;
}

.list-ab-source:hover {
    color: #1078b7;
}

.list-ab-source .source-icon {
    width: 13px;
    height: 13px;
    flex: 0 0 auto;
}

.list-ab-source-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.list-ab-source small {
    color: #54bce8;
    font-size: 10px;
    font-weight: 850;
}

.list-ab-children-toggle {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-height: 22px;
    padding: 3px 7px;
    border: 1px solid #bde4f6;
    border-radius: 999px;
    background: #f2fbff;
    color: #187fad;
    font-size: 11px;
    font-weight: 850;
    line-height: 1;
}

.list-ab-children-toggle:hover,
.list-ab-children-toggle[aria-expanded="true"] {
    background: #dff5ff;
    color: #0b6f9e;
}

.list-ab-children-toggle .source-icon {
    width: 13px;
    height: 13px;
}

.list-ab-child-row td {
    background: #f8fbfa;
}

.list-ab-child-stack {
    display: grid;
    gap: 6px;
    padding: 6px 0;
}

.list-ab-child-item {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) auto auto minmax(130px, auto);
    align-items: center;
    gap: 12px;
    padding: 7px 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
}

.list-ab-child-title {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.list-ab-child-title .source-icon {
    width: 14px;
    height: 14px;
    color: #2b9bd7;
}

.list-create-card {
    padding: 14px;
}

.lists-bulk-toolbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 14px;
    border-bottom: 1px solid var(--line);
}

.lists-bulk-toolbar .table-title {
    margin: 0;
}

.lists-bulk-toolbar p {
    margin: 5px 0 0;
}

.list-create-card label {
    margin-top: 9px;
}

.list-create-card input {
    min-height: 34px;
    padding: 7px 9px;
}

.select-col {
    width: 30px;
}

.select-col input {
    width: 16px;
    min-height: 16px;
}

.metric-pill {
    display: inline-flex;
    min-width: 40px;
    justify-content: center;
    margin-right: 4px;
    padding: 1px 5px;
    border-radius: 7px;
    background: #dff5e8;
    color: #17683a;
    font-size: 11px;
    font-weight: 850;
}

.click-pill {
    background: #dff0f2;
    color: #0b6370;
}

.icon-button {
    width: 26px;
    min-width: 26px;
    min-height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
    text-decoration: none;
}

.icon-button:hover {
    background: #eef5f2;
    color: var(--brand);
    border-color: #b9cac4;
}

.icon-button .icon {
    width: 15px;
    height: 15px;
}

.danger-icon {
    color: var(--danger);
}

.campaign-report-page .studio-command {
    align-items: center;
}

.report-export-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    margin-bottom: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.report-export-strip .eyebrow {
    margin: 0;
}

.report-export-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.report-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 12px;
}

.report-metrics article {
    display: grid;
    gap: 3px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.78);
}

.report-metrics span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 850;
    text-transform: uppercase;
}

.report-metrics strong {
    font-size: 24px;
}

.report-metrics small {
    color: var(--muted);
}

.report-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.9fr);
    gap: 12px;
}

.provider-report-grid {
    display: grid;
    gap: 12px;
    margin-bottom: 12px;
}

.report-card {
    padding: 0;
}

.report-card header {
    padding: 14px;
    border-bottom: 1px solid var(--line);
}

.report-card header h2,
.report-card header p {
    margin: 0;
}

.report-card header p {
    margin-top: 3px;
}

.url-cell {
    max-width: 520px;
    overflow-wrap: anywhere;
}

.ab-test-create-grid {
    display: grid;
    gap: 18px;
}

.ab-settings-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ab-summary-grid {
    padding: 18px;
}

.ab-preview-variant-list {
    display: grid;
    gap: 10px;
}

.ab-preview-switch {
    justify-content: flex-start;
}

.ab-variant-winner td {
    background: rgba(204, 232, 120, 0.18);
}

.ab-criterion-switch {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ab-criterion-switch label {
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 10px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    font-size: 12px;
    font-weight: 700;
}

.ab-criterion-switch label.is-disabled {
    opacity: 0.6;
}

.ab-criterion-switch input {
    width: 14px;
    min-height: 14px;
    margin: 0;
}

.ab-results-list {
    display: grid;
    gap: 14px;
}

.ab-results-card {
    padding: 14px;
}

.ab-results-collapse {
    overflow: hidden;
}

.ab-results-collapse summary {
    list-style: none;
}

.ab-results-collapse summary::-webkit-details-marker {
    display: none;
}

.ab-results-row {
    display: grid;
    grid-template-columns: minmax(240px, 1.1fr) minmax(0, 1.8fr) auto auto;
    gap: 10px;
    align-items: center;
    padding: 11px 14px;
    cursor: pointer;
}

.ab-summary-delete-button {
    justify-self: end;
    min-height: 30px;
    padding: 5px 9px;
    white-space: nowrap;
}

.ab-summary-delete-button:hover {
    background: #fff1ef;
    border-color: rgba(179, 38, 30, 0.36);
    color: var(--danger);
}

.ab-results-row:hover {
    background: rgba(247, 250, 249, 0.92);
}

.dashboard-ab-head {
    margin-top: 18px;
}

.dashboard-ab-lite {
    margin-bottom: 16px;
}

.dashboard-ab-row {
    color: var(--ink);
    text-decoration: none;
}

.dashboard-ab-row:hover {
    border-color: rgba(12, 98, 116, 0.24);
}

.ab-results-row-main,
.ab-results-row-meta {
    min-width: 0;
}

.ab-results-row-main {
    display: flex;
    align-items: baseline;
    gap: 8px;
    overflow: hidden;
}

.ab-results-row-main strong {
    font-size: 13px;
    line-height: 1.2;
    white-space: nowrap;
}

.ab-results-row-main span,
.ab-results-row-meta {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ab-results-collapse[open] .ab-results-row {
    border-bottom: 1px solid var(--line);
    background: rgba(247, 250, 249, 0.92);
}

.ab-results-collapse-body {
    padding: 12px 14px 14px;
}

.ab-results-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.ab-results-top h3 {
    margin: 0;
    font-size: 16px;
}

.ab-results-top p {
    margin: 5px 0 0;
    font-size: 13px;
}

.ab-results-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.ab-results-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 12px;
}

.ab-results-grid > div,
.ab-meta-strip > div {
    display: grid;
    gap: 2px;
    padding: 9px 10px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: rgba(248, 251, 250, 0.92);
}

.ab-results-grid > div small,
.ab-meta-strip > div small {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.ab-results-grid > div strong,
.ab-meta-strip > div strong {
    font-size: 13px;
    line-height: 1.35;
}

.ab-domain-chart,
.provider-chart {
    display: grid;
    gap: 10px;
    margin: 0 0 12px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfbfa;
}

.ab-domain-chart header,
.provider-chart header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.ab-domain-chart h4,
.ab-domain-chart p,
.provider-chart h2,
.provider-chart h4,
.provider-chart p {
    margin: 0;
}

.ab-domain-chart h4,
.provider-chart h4 {
    font-size: 13px;
}

.provider-chart h2 {
    font-size: 16px;
}

.ab-domain-chart p,
.provider-chart p {
    margin-top: 2px;
    color: var(--muted);
    font-size: 12px;
}

.ab-domain-chart-list,
.provider-chart-list {
    display: grid;
    gap: 7px;
}

.ab-domain-chart-row,
.provider-chart-row {
    display: grid;
    grid-template-columns: minmax(96px, 150px) minmax(120px, 1fr) auto minmax(76px, auto);
    gap: 9px;
    align-items: center;
}

.ab-domain-chart-row strong,
.provider-chart-row strong {
    min-width: 0;
    font-size: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ab-domain-chart-row small,
.provider-chart-row small {
    color: var(--muted);
    font-size: 11px;
    text-align: right;
    white-space: nowrap;
}

.ab-domain-chart-track,
.provider-chart-track {
    height: 9px;
    overflow: hidden;
    border-radius: 999px;
    background: #e9eeeb;
}

.ab-domain-chart-track span,
.provider-chart-track span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #007f82, #a9eadf);
}

.provider-chart-compact {
    margin-bottom: 12px;
}

.ab-results-table th,
.ab-results-table td {
    padding: 8px 10px;
}

.ab-variant-compact {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 9px;
    align-items: center;
}

.variant-key-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    place-items: center;
    gap: 5px;
    min-width: 30px;
    height: 30px;
    padding: 0 7px;
    border: 1px solid var(--line-strong);
    border-radius: 6px;
    background: #ffffff;
    color: var(--ink);
    font-size: 12px;
    font-weight: 900;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
}

.variant-key-badge-final {
    min-width: 68px;
    border-color: #d7ad39;
    background: linear-gradient(180deg, #fff8d8 0%, #ffeeb0 100%);
    color: #6d4b00;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85), 0 4px 12px rgba(155, 111, 12, 0.12);
}

.variant-key-icon {
    width: 14px;
    height: 14px;
    flex: 0 0 auto;
}

.ab-variant-compact .campaign-row-subject,
.ab-variant-compact .send-speed-muted {
    display: block;
}

.ab-variant-compact .campaign-row-subject {
    margin-top: 3px;
    font-size: 12px;
}

.ab-variant-info-modal .audience-dialog {
    width: min(760px, calc(100vw - 28px));
    max-height: calc(100dvh - 48px);
    grid-template-rows: auto minmax(0, 1fr);
    overflow: hidden;
}

.ab-variant-info-list {
    display: grid;
    gap: 10px;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 14px;
}

.ab-variant-info-row {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 10px;
    align-items: flex-start;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.ab-variant-info-body {
    min-width: 0;
}

.ab-variant-info-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.ab-variant-info-body strong {
    display: block;
    font-size: 13px;
}

.ab-variant-info-body dl {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 12px;
    margin: 0;
}

.ab-variant-info-body dt {
    margin: 0 0 2px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

.ab-variant-info-body dd {
    margin: 0;
    min-width: 0;
    color: var(--ink);
    font-size: 12px;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.ab-variant-info-form {
    display: grid;
    gap: 10px;
}

.ab-variant-info-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.ab-variant-info-field {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.ab-variant-info-field-wide {
    grid-column: 1 / -1;
}

.ab-variant-info-field span {
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

.ab-variant-info-field input,
.ab-variant-info-field select,
.ab-variant-info-field textarea {
    width: 100%;
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
    font: inherit;
    font-size: 12px;
}

.ab-variant-info-field input,
.ab-variant-info-field select {
    height: 38px;
    padding: 0 10px;
}

.ab-variant-info-field textarea {
    resize: vertical;
    padding: 9px 10px;
}

.ab-variant-info-note {
    margin: 0;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.45;
}

.ab-detail-page {
    width: min(1500px, 100%);
}

.ab-detail-head h2 {
    margin: 0;
    font-size: 15px;
}

.ab-inline-title {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.ab-meta-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    padding: 12px;
}

.ab-detail-shell {
    display: grid;
    grid-template-columns: 172px minmax(0, 1fr);
    gap: 14px;
    align-items: start;
    margin-top: 14px;
}

.ab-side-stack {
    display: grid;
    gap: 10px;
    align-items: start;
    position: sticky;
    top: 82px;
}

.ab-variant-rail {
    position: static;
    padding: 8px;
}

.ab-rail-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
}

.ab-rail-head .eyebrow {
    margin: 0;
}

.ab-rail-head span {
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
}

.ab-rail-list {
    display: grid;
    gap: 6px;
}

.ab-variant-tab {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 6px;
    padding: 6px 8px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    color: var(--ink);
    text-decoration: none;
}

.ab-variant-tab strong {
    font-size: 12px;
    line-height: 1.2;
    min-width: 0;
}

.ab-variant-tab span {
    color: var(--muted);
    font-size: 10px;
    white-space: nowrap;
}

.ab-variant-tab .ab-variant-tab-side {
    display: grid;
    justify-items: end;
    gap: 3px;
    min-width: 72px;
}

.ab-variant-tab .ab-variant-tab-status {
    color: var(--muted);
    font-size: 10px;
    line-height: 1;
}

.ab-variant-tab .ab-ai-tab-progress {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    color: #007f78;
    font-size: 9px;
    font-weight: 800;
    line-height: 1;
}

.ab-variant-tab .ab-ai-tab-progress[hidden] {
    display: none;
}

.ab-variant-tab .ab-ai-tab-progress [data-ab-ai-progress-label] {
    max-width: 82px;
    line-height: 1.15;
    text-align: right;
    white-space: normal;
}

.ab-ai-gear {
    box-sizing: border-box;
    flex: 0 0 auto;
    width: 12px;
    height: 12px;
    border: 2px solid #b8d4ce;
    border-right-color: #007f78;
    border-top-color: #007f78;
    border-radius: 50%;
    animation: ab-ai-gear-spin .75s linear infinite;
}

.ab-variant-tab.is-ai-generating {
    border-color: #95cdc4;
    background: #f3fbf9;
}

.ab-variant-tab.is-ai-done .ab-ai-gear {
    width: 8px;
    height: 8px;
    border: 0;
    background: #007f78;
    animation: none;
}

.ab-variant-tab.is-ai-failed .ab-ai-tab-progress {
    color: #986000;
}

.ab-variant-tab.is-ai-failed .ab-ai-gear {
    border-color: #d8b56e;
    border-right-color: #986000;
    border-top-color: #986000;
    animation: none;
}

@keyframes ab-ai-gear-spin {
    to {
        transform: rotate(360deg);
    }
}

.ab-variant-tab.active {
    border-color: #96dacc;
    background: #dff5ee;
}

.ab-variant-tab.is-loading,
body.is-ab-variant-loading .ab-variant-tab {
    cursor: progress;
}

.ab-variant-tab.is-loading {
    opacity: .68;
}

.ab-launch-rail {
    padding: 10px;
}

.ab-launch-rail strong {
    display: block;
    margin-top: 4px;
    font-size: 13px;
    line-height: 1.35;
}

.ab-launch-rail p {
    margin: 6px 0 0;
    font-size: 11px;
    line-height: 1.45;
}

.ab-launch-button {
    width: 100%;
    margin-top: 10px;
}

.ab-editor-stack {
    display: grid;
    gap: 12px;
    min-width: 0;
}

.ab-settings-panel,
.ab-editor-card {
    padding: 12px;
}

.ab-panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.ab-panel-head h3,
.ab-editor-top h3 {
    margin: 0;
    font-size: 14px;
}

.ab-settings-grid-compact {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
}

.ab-settings-grid-compact label,
.ab-editor-field-grid label {
    margin: 0 0 5px;
    font-size: 11px;
}

.ab-settings-grid-compact input,
.ab-settings-grid-compact select,
.ab-editor-field-grid input,
.ab-editor-field-grid select,
.ab-editor-canvas textarea {
    min-height: 33px;
    padding: 7px 10px;
    font-size: 12px;
}

.ab-static-field {
    display: grid;
    gap: 4px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: rgba(248, 251, 250, 0.92);
}

.ab-static-field small {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.ab-static-field strong {
    font-size: 12px;
}

.ab-panel-actions {
    margin-top: 10px;
}

.ab-panel-head .eyebrow,
.ab-settings-summary .eyebrow {
    margin: 0 0 3px;
}

.ab-settings-disclosure {
    padding: 0;
    overflow: hidden;
}

.ab-settings-disclosure > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 12px;
    list-style: none;
    cursor: pointer;
    user-select: none;
}

.ab-settings-disclosure > summary::-webkit-details-marker {
    display: none;
}

.ab-settings-disclosure[open] > summary {
    border-bottom: 1px solid var(--line);
    background: rgba(248, 251, 250, 0.86);
}

.ab-settings-summary strong {
    display: block;
    font-size: 13px;
}

.ab-settings-summary-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.ab-settings-summary-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 3px 8px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
}

.ab-settings-content {
    padding: 12px;
}

.ab-panel-head .eyebrow {
    margin: 0 0 3px;
}

.ab-editor-top {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 10px;
    margin-bottom: 12px;
}

.ab-editor-top > div {
    min-width: 0;
}

.ab-editor-top p {
    margin: 4px 0 0;
    font-size: 11px;
}

.ab-editor-actions {
    display: flex;
    align-items: flex-end;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 8px;
    min-width: 0;
    width: 100%;
}

.ab-editor-top .actions .button {
    white-space: nowrap;
    min-height: 33px;
    padding: 6px 10px;
    font-size: 12px;
    flex: 0 1 auto;
}

.ab-ai-subject-status {
    flex: 1 0 100%;
    align-self: flex-end;
    min-height: 16px;
    line-height: 1.2;
    text-align: left;
    white-space: normal;
    overflow-wrap: break-word;
}

.ab-ai-subject-status.is-busy {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #007f78;
    font-weight: 800;
}

.ab-ai-subject-status.is-busy::before {
    content: "";
    box-sizing: border-box;
    flex: 0 0 auto;
    width: 14px;
    height: 14px;
    border: 2px solid #b8d4ce;
    border-right-color: #007f78;
    border-top-color: #007f78;
    border-radius: 50%;
    animation: ab-ai-gear-spin .75s linear infinite;
}

@media (prefers-reduced-motion: reduce) {
    .ab-ai-gear,
    .ab-ai-subject-status.is-busy::before {
        animation: none;
    }
}

.ab-editor-meta {
    color: var(--muted);
    overflow-wrap: break-word;
}

.ab-editor-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 262px;
    grid-template-areas:
        "subject from-name"
        "preheader from-email"
        "custom reply";
    column-gap: 14px;
    row-gap: 10px;
    align-items: start;
    margin-bottom: 10px;
}

.ab-editor-main-fields,
.ab-editor-side-fields,
.ab-editor-field,
.ab-editor-rate-field,
.ab-editor-reply-field,
.ab-editor-top-rate {
    display: grid;
    gap: 5px;
    min-width: 0;
}

.ab-editor-field label,
.ab-editor-rate-field label,
.ab-editor-reply-field label,
.ab-editor-top-rate span {
    margin: 0;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
}

.ab-editor-field input,
.ab-editor-field select,
.ab-editor-rate-field input,
.ab-editor-reply-field select,
.ab-editor-top-rate input {
    width: 100%;
    min-height: 34px;
    padding: 7px 10px;
    font-size: 12px;
}

.ab-editor-field-subject {
    grid-area: subject;
}

.ab-editor-field-preheader {
    grid-area: preheader;
}

.ab-editor-field-from-name {
    grid-area: from-name;
}

.ab-editor-field-from-email {
    grid-area: from-email;
}

.ab-editor-rate-field {
    grid-area: rate;
}

.ab-editor-reply-field {
    grid-area: reply;
}

.ab-editor-top-rate {
    flex: 0 0 118px;
    width: 118px;
    align-self: stretch;
}

.ab-editor-top-rate small {
    color: var(--muted);
    font-size: 10px;
    line-height: 1.1;
}

.ab-editor-field-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 10px;
}

.ab-field-popover-wrap input {
    min-height: 37px;
    font-size: 13px;
    padding-right: 10px;
}

.ab-field-popover-wrap .field-token-menu {
    display: none;
}

.ab-custom-field-bar {
    grid-area: custom;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    flex-wrap: wrap;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: rgba(248, 251, 250, 0.92);
}

.ab-custom-field-bar span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    font-size: 10px;
    font-weight: 800;
    color: var(--muted);
    text-transform: uppercase;
}

.ab-custom-field-bar .token-popover-fields {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.ab-custom-field-bar.is-empty {
    display: none;
}

.ab-rate-field {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
}

.ab-rate-field span {
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
    white-space: nowrap;
}

.ab-mode-switch button {
    min-height: 30px;
    padding: 5px 10px;
    font-size: 11px;
}

.ab-quick-toolbar {
    position: relative;
    top: auto;
    z-index: 3;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    padding: 7px;
    margin-bottom: 10px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: rgba(248, 251, 250, 0.92);
    box-shadow: none;
    backdrop-filter: none;
}

.ab-template-control {
    flex: 0 0 112px;
    min-width: 112px;
}

.ab-template-control .eyebrow {
    margin: 0 0 2px;
    display: block;
    font-size: 9px;
}

.ab-font-control select {
    width: 132px;
}

.ab-theme-color-control {
    display: flex;
    align-items: center;
    gap: 7px;
    min-height: 34px;
    padding: 4px 7px;
    border-radius: 8px;
}

.ab-theme-color-control span {
    font-size: 10px;
}

.ab-theme-color-control input[type="color"] {
    width: 34px;
    min-height: 26px;
    height: 26px;
    padding: 2px;
}

.ab-editor-canvas {
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
}

.ab-quick-canvas {
    min-height: 520px;
    padding: 16px;
    border-radius: 10px;
    background: #fff;
}

.ab-editor-canvas .html-editor textarea,
.ab-editor-canvas .text-editor-panel textarea {
    min-height: 520px;
}

.ab-preview-overlay {
    position: fixed;
    inset: 0;
    z-index: 50;
}

.ab-launch-confirm-overlay {
    position: fixed;
    inset: 0;
    z-index: 48;
}

.ab-launch-confirm-backdrop {
    position: absolute;
    inset: 0;
    border: 0;
    background: rgba(15, 18, 22, 0.46);
}

.ab-launch-confirm-card {
    position: relative;
    width: min(460px, calc(100vw - 26px));
    margin: min(16vh, 120px) auto 0;
    padding: 14px;
    display: grid;
    gap: 8px;
}

.ab-launch-confirm-card h3 {
    margin: 0;
    font-size: 16px;
}

.ab-launch-confirm-card p {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
}

.ab-launch-confirm-time {
    color: var(--ink) !important;
    font-weight: 700;
}

.ab-launch-now-link {
    justify-self: center;
    border: 0;
    background: transparent;
    color: var(--muted);
    font-size: 12px;
    text-decoration: underline;
    cursor: pointer;
    padding: 0;
}

.ab-launch-now-link:hover {
    color: var(--ink);
}

.ab-preview-overlay-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 18, 22, 0.58);
    backdrop-filter: blur(3px);
}

.ab-preview-dialog {
    position: relative;
    width: min(1180px, calc(100vw - 28px));
    max-height: calc(100vh - 36px);
    margin: 18px auto;
    padding: 14px;
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 24px 60px rgba(15, 18, 22, 0.24);
}

.ab-preview-dialog-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 12px;
}

.ab-preview-dialog-head h3 {
    margin: 0;
    font-size: 16px;
}

.ab-preview-dialog-copy {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 12px;
}

.ab-preview-test-send {
    display: inline-grid;
    grid-template-columns: auto minmax(190px, 260px) auto;
    align-items: center;
    gap: 7px;
    padding: 4px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #f9fbfa;
}

.ab-preview-test-send label {
    padding-left: 6px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.ab-preview-test-send input {
    min-height: 34px;
    padding: 7px 9px;
    font-size: 13px;
}

.ab-preview-test-send .button {
    min-height: 34px;
    padding: 7px 11px;
}

.ab-preview-send-rate {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fbfa;
    color: var(--muted);
    font-size: 12px;
    white-space: nowrap;
}

.ab-preview-send-rate strong {
    margin-left: 4px;
    color: var(--text);
}

.ab-preview-test-status {
    grid-column: 2 / 4;
    min-height: 14px;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.25;
}

.ab-preview-test-status:empty {
    display: none;
}

.ab-preview-test-status.is-loading {
    color: #6a7a00;
}

.ab-preview-test-status.is-success {
    color: #007a5f;
}

.ab-preview-test-status.is-error {
    color: var(--danger);
}

.ab-preview-dialog .mobile-preview.active {
    display: flex;
    justify-content: center;
    padding: 16px 0 6px;
}

.ab-preview-contact-nav {
    max-width: 196px;
    margin: 8px 0 10px auto;
}

.ab-preview-contact-nav .button {
    min-height: 28px;
    padding: 4px 9px;
}

.ab-preview-contact-nav strong {
    font-size: 11px;
    color: var(--muted);
}

.ab-meta-strip > div {
    min-width: 0;
}

.ab-meta-strip > div small {
    display: block;
    margin-bottom: 3px;
    font-size: 10px;
}

.ab-meta-strip > div strong {
    font-size: 12px;
    overflow-wrap: anywhere;
}

body.has-ab-preview-open {
    overflow: hidden;
}

body.has-ab-launch-open {
    overflow: hidden;
}

#scheduleFields {
    display: grid;
    gap: 10px;
    margin-top: 12px;
}

#scheduleFields[hidden] {
    display: none;
}

@media (max-width: 1100px) {
    .studio-setup-edit,
    .review-layout,
    .report-metrics,
    .report-grid {
        grid-template-columns: 1fr;
    }

    .report-export-strip {
        align-items: flex-start;
        flex-direction: column;
    }

    .report-export-actions {
        justify-content: flex-start;
    }

    .campaign-theme-grid,
    .preview-field-grid,
    .ab-settings-grid,
    .ab-results-grid,
    .ab-meta-strip,
    .ab-settings-grid-compact,
    .ab-editor-field-grid {
        grid-template-columns: 1fr;
    }

    .preview-personalization-head {
        grid-template-columns: 1fr;
    }

    .preview-contact-sample-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .preview-contact-chip {
        flex-basis: min(76vw, 260px);
    }

    .preview-contact-nav {
        min-width: 0;
    }

    .runtime-card-head,
    .runtime-row-main,
    .runtime-row-side,
    .runtime-row-actions,
    .send-confirm-actions,
    .campaign-sent-showcase-head,
    .campaign-sent-toolbar,
    .campaign-sent-title-wrap {
        flex-direction: column;
        align-items: stretch;
    }

    .preview-side-right {
        order: 0;
        position: static;
    }

    .lists-bulk-toolbar,
    .list-delete-item {
        flex-direction: column;
        align-items: stretch;
    }

    .list-ab-child-item {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .ab-detail-shell {
        grid-template-columns: 1fr;
    }

    .ab-variant-rail {
        position: static;
    }

    .ab-side-stack {
        position: static;
    }

    .ab-rail-list {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    }

    .ab-editor-top,
    .ab-results-top,
    .ab-editor-mode-row {
        flex-direction: column;
        align-items: stretch;
    }

    .ab-editor-layout,
    .ab-results-row {
        grid-template-columns: 1fr;
        grid-template-areas:
            "subject"
            "from-name"
            "preheader"
            "from-email"
            "custom"
            "reply";
        align-items: start;
    }

    .ab-editor-top {
        grid-template-columns: 1fr;
    }

    .ab-editor-top .actions {
        justify-content: flex-start;
    }

    .ab-variant-tab {
        grid-template-columns: minmax(0, 1fr);
    }

    .ab-variant-tab span {
        white-space: normal;
    }

    .ab-variant-tab .ab-variant-tab-side {
        justify-items: start;
        min-width: 0;
    }

    .ab-variant-tab .ab-ai-tab-progress {
        justify-content: flex-start;
    }

    .ab-variant-tab .ab-ai-tab-progress [data-ab-ai-progress-label] {
        max-width: none;
        text-align: left;
    }

    .ab-preview-dialog-head {
        flex-direction: column;
        align-items: stretch;
    }

    .ab-preview-dialog-head > .actions,
    .ab-preview-test-send {
        align-items: stretch;
    }

    .ab-preview-test-send {
        width: 100%;
        grid-template-columns: 1fr;
    }

    .ab-preview-send-rate {
        width: 100%;
        justify-content: center;
    }

    .ab-preview-test-send label {
        padding-left: 0;
    }

    .ab-preview-test-status {
        grid-column: 1;
    }

    .ab-settings-disclosure > summary {
        flex-direction: column;
        align-items: stretch;
    }

    .ab-settings-summary-meta {
        justify-content: flex-start;
    }
}

@media (max-width: 760px) {
    .campaign-command-main,
    .campaign-name-field input {
        width: 100%;
    }

    .campaign-name-field input {
        font-size: 19px;
    }

    .campaign-stepper i {
        width: 22px;
    }

    .identity-grid,
    .audience-select-grid,
    .audience-dialog header,
    .audience-dialog footer,
    .campaign-console-tools,
    .campaign-control-row,
    .campaign-inline-tools,
    .campaign-search {
        grid-template-columns: 1fr;
        flex-direction: column;
        align-items: stretch;
    }

    .audience-dialog {
        width: 100%;
        max-height: calc(100vh - 32px);
    }

    .lists-layout {
        grid-template-columns: 1fr;
    }

    .lists-console {
        order: 1;
        width: 100%;
        min-width: 0;
    }

    .list-create-card {
        order: 2;
        width: 100%;
    }

    .lists-console th:nth-child(4),
    .lists-console td:nth-child(4),
    .lists-console th:nth-child(5),
    .lists-console td:nth-child(5) {
        display: none;
    }

    .lists-console th,
    .lists-console td {
        padding: 8px 7px;
    }

    .lists-console th:nth-child(3),
    .lists-console td:nth-child(3) {
        text-align: right;
        white-space: nowrap;
    }

    .lists-console .actions {
        justify-content: flex-end;
    }

    .ab-domain-chart-row,
    .provider-chart-row,
    .provider-stats-body .provider-chart-row {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 6px 8px;
    }

    .ab-domain-chart-track,
    .provider-chart-track {
        grid-column: 1 / -1;
    }

    .ab-domain-chart-row small,
    .provider-chart-row small,
    .provider-stats-body .provider-chart-row small {
        grid-column: 1 / -1;
        text-align: left;
    }

    .ab-variant-info-row,
    .ab-variant-info-fields {
        grid-template-columns: 1fr;
    }

    .ab-variant-info-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .campaign-search input {
        max-width: none;
    }

    .ab-detail-page {
        width: 100%;
    }

    .ab-meta-strip {
        gap: 8px;
        padding: 10px;
    }

    .ab-side-stack {
        gap: 8px;
    }

    .ab-variant-rail,
    .ab-launch-rail,
    .ab-editor-card {
        padding: 8px;
    }

    .ab-rail-list {
        display: flex;
        gap: 6px;
        overflow-x: auto;
        padding-bottom: 2px;
        scroll-snap-type: x proximity;
    }

    .ab-variant-tab {
        min-width: 112px;
        scroll-snap-align: start;
    }

    .ab-editor-layout {
        grid-template-columns: 1fr;
        grid-template-areas:
            "subject"
            "from-name"
            "preheader"
            "from-email"
            "custom"
            "reply";
        gap: 10px;
    }

    .ab-editor-top .actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ab-create-actions {
        width: 100%;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ab-editor-top-rate {
        width: 100%;
        grid-column: 1 / -1;
    }

    .ab-ai-subject-status,
    #saveVariantButton {
        grid-column: 1 / -1;
    }
}

.sidebar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.workspace-title-row {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.workspace-title-row > div {
    min-width: 0;
}

.app-nav-toggle,
.app-nav-close,
.app-nav-backdrop {
    display: none;
}

.phone-shell {
    width: min(404px, 100%);
    min-height: 840px;
    padding: 10px 12px 16px;
    border: 1px solid #161f27;
    border-radius: 38px;
    background: linear-gradient(180deg, #1a222a 0%, #10161c 100%);
    box-shadow: 0 26px 56px rgba(11, 15, 20, 0.28);
}

.phone-top {
    display: flex;
    justify-content: center;
    padding: 4px 0 10px;
}

.phone-island {
    width: 108px;
    height: 22px;
    border-radius: 999px;
    background: #0b0f14;
    box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.06);
}

.phone-screen {
    position: relative;
    height: 760px;
    overflow: auto;
    border-radius: 30px;
    background: #ffffff;
    box-shadow: inset 0 0 0 1px rgba(19, 33, 38, 0.08);
}

.phone-screen::-webkit-scrollbar {
    width: 6px;
}

.phone-screen::-webkit-scrollbar-thumb {
    background: rgba(25, 30, 36, 0.22);
    border-radius: 999px;
}

.phone-webview {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    width: 100%;
    min-height: 760px;
    overflow: hidden;
    background: #ffffff;
}

.campaign-preview-mobile {
    display: block;
    width: 100%;
    min-width: 0;
    height: 760px;
    min-height: 760px;
    border: 0;
    background: #fff;
}

.phone-home {
    width: 128px;
    height: 5px;
    margin: 12px auto 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.28);
}

@media (max-width: 900px) {
    .app-shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        width: min(280px, calc(100vw - 48px));
        height: 100vh;
        z-index: 40;
        transform: translateX(-110%);
        transition: transform 0.2s ease;
        box-shadow: 0 20px 60px rgba(16, 20, 24, 0.24);
    }

    .side-nav {
        grid-template-columns: 1fr;
    }

    .app-nav-open .sidebar {
        transform: translateX(0);
    }

    .app-nav-toggle,
    .app-nav-close {
        display: inline-flex;
    }

    .app-nav-close {
        min-height: 32px;
        padding: 6px 10px;
        font-size: 12px;
    }

    .app-nav-backdrop {
        position: fixed;
        inset: 0;
        z-index: 35;
        border: 0;
        background: rgba(15, 18, 22, 0.34);
        opacity: 0;
        pointer-events: none;
    }

    .app-nav-open .app-nav-backdrop {
        display: block;
        opacity: 1;
        pointer-events: auto;
    }

    .workspace-top {
        padding: 12px 18px;
    }

    .workspace-top .actions {
        gap: 8px;
    }

    .user-chip {
        display: none;
    }

    .page {
        padding: 16px 18px 28px;
    }

    .phone-shell {
        width: min(372px, 100%);
        min-height: 784px;
        padding: 9px 10px 14px;
    }

    .phone-screen {
        height: 706px;
    }

    .phone-webview {
        min-height: 706px;
    }
}

@media (max-width: 560px) {
    .workspace-title-row {
        width: 100%;
    }

    .workspace-top {
        align-items: flex-start;
        flex-direction: column;
    }

    .workspace-top .actions {
        width: 100%;
        justify-content: space-between;
    }

    .phone-shell {
        width: 100%;
        min-height: 720px;
        border-radius: 30px;
    }

    .phone-screen {
        height: 640px;
        border-radius: 24px;
    }

    .phone-webview {
        min-height: 640px;
    }
}
