:root {
    --nav: #0b1930;
    --nav-soft: #132744;
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --accent: #14b8a6;
    --bg: #f3f6fb;
    --surface: #ffffff;
    --surface-soft: #f8fafc;
    --border: #e2e8f0;
    --text: #14213d;
    --muted: #64748b;
    --success: #16835f;
    --warning: #a16207;
    --danger: #b42318;
    --sidebar-width: 278px;
    --sidebar-collapsed-width: 88px;
    --shadow: 0 12px 32px rgba(15, 35, 65, .07);
}

* { box-sizing: border-box; }
html { min-width: 320px; }
body {
    margin: 0;
    color: var(--text);
    background:
        radial-gradient(circle at 90% 0, rgba(37, 99, 235, .08), transparent 28rem),
        var(--bg);
    font-family: Inter, "Segoe UI", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
button, input, select, textarea { font: inherit; }
.portal-shell { display: flex; min-height: 100vh; }

.portal-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 40;
    display: flex;
    width: var(--sidebar-width);
    flex-direction: column;
    overflow: hidden;
    color: #fff;
    background:
        radial-gradient(circle at 20% 0, rgba(37, 99, 235, .34), transparent 17rem),
        linear-gradient(180deg, #0b1930 0%, #0b1729 100%);
    box-shadow: 18px 0 45px rgba(8, 20, 40, .12);
    transition: width .24s ease, transform .24s ease;
}
.sidebar-brand-row {
    display: flex;
    min-height: 82px;
    align-items: center;
    justify-content: space-between;
    padding: 17px 17px 12px 20px;
}
.brand { display: flex; min-width: 0; align-items: center; gap: 12px; color: #fff; }
.brand-mark {
    display: block;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    filter: drop-shadow(0 8px 10px rgba(20, 99, 210, .24));
}
.brand-copy { display: flex; flex-direction: column; line-height: 1; white-space: nowrap; }
.brand-copy b { font-size: 22px; letter-spacing: -.6px; }
.brand-copy small { margin-top: 5px; color: #9eb0ca; font-size: 10px; letter-spacing: 2.1px; text-transform: uppercase; }
.portal-guest-brand { color: var(--text); }
.portal-guest-brand .brand-copy small { color: var(--muted); }
.sidebar-toggle {
    display: grid;
    width: 31px;
    height: 31px;
    place-items: center;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 9px;
    color: #d8e5f6;
    background: rgba(255,255,255,.06);
    cursor: pointer;
    transition: .2s ease;
}
.sidebar-toggle:hover { background: rgba(255,255,255,.13); }
.sidebar-toggle span { transform: translateY(-1px); font-size: 24px; line-height: 1; transition: transform .24s ease; }
.portal-nav { flex: 1; overflow-x: hidden; overflow-y: auto; padding: 5px 14px 20px; }
.nav-section-label {
    margin: 21px 13px 8px;
    color: #6f86a6;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.55px;
    text-transform: uppercase;
    white-space: nowrap;
}
.nav-link {
    position: relative;
    display: flex;
    min-height: 46px;
    align-items: center;
    gap: 13px;
    margin: 4px 0;
    padding: 9px 12px;
    border-radius: 12px;
    color: #c9d6e8;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    transition: color .18s ease, background .18s ease, transform .18s ease;
}
.nav-link:hover { color: #fff; background: rgba(255,255,255,.07); transform: translateX(2px); }
.nav-link.active {
    color: #fff;
    background: linear-gradient(100deg, rgba(37,99,235,.45), rgba(20,184,166,.16));
    box-shadow: inset 3px 0 #5eead4;
}
.nav-link-highlight { color: #dffcf7; border: 1px solid rgba(94,234,212,.18); }
.nav-icon {
    display: grid;
    width: 27px;
    height: 27px;
    flex: 0 0 27px;
    place-items: center;
    border-radius: 8px;
    color: #a9c4e8;
    background: rgba(255,255,255,.055);
    font-size: 17px;
}
.active .nav-icon { color: #d9fffa; background: rgba(94,234,212,.12); }
.nav-icon-cpc,
.nav-icon-credit {
    color: #fed7aa;
    border: 1px solid rgba(251,146,60,.22);
    background: linear-gradient(145deg, rgba(234,88,12,.32), rgba(245,158,11,.14));
}
.active .nav-icon-cpc,
.active .nav-icon-credit { color: #fff7ed; background: linear-gradient(145deg, rgba(234,88,12,.72), rgba(245,158,11,.34)); }
.sidebar-help {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 14px;
    padding: 13px;
    border: 1px solid rgba(255,255,255,.09);
    border-radius: 13px;
    background: rgba(255,255,255,.045);
    white-space: nowrap;
}
.sidebar-help-icon {
    display: grid;
    width: 31px;
    height: 31px;
    flex: 0 0 31px;
    place-items: center;
    border-radius: 50%;
    background: #173d6c;
    font-weight: 800;
}
.sidebar-help-copy { display: flex; min-width: 0; flex-direction: column; font-size: 12px; }
.sidebar-help-copy small { margin-top: 3px; color: #8298b7; }

.portal-main { display: flex; width: calc(100% - var(--sidebar-width)); min-width: 0; min-height: 100vh; margin-left: var(--sidebar-width); flex-direction: column; transition: width .24s ease, margin-left .24s ease; }
.portal-topbar {
    position: sticky;
    top: 0;
    z-index: 25;
    display: flex;
    min-height: 76px;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 11px 30px;
    border-bottom: 1px solid rgba(226,232,240,.9);
    background: rgba(255,255,255,.88);
    backdrop-filter: blur(16px);
}
.topbar-left, .topbar-actions, .user-chip { display: flex; align-items: center; }
.topbar-left { gap: 13px; }
.topbar-eyebrow { display: block; color: #94a3b8; font-size: 9px; font-weight: 800; letter-spacing: 1.45px; }
.topbar-organization { display: block; margin-top: 3px; font-size: 15px; }
.topbar-actions { gap: 11px; }
.topbar-create {
    display: inline-flex;
    min-height: 39px;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 10px;
    color: #fff;
    background: var(--primary);
    box-shadow: 0 7px 17px rgba(37,99,235,.18);
    font-size: 13px;
    font-weight: 700;
}
.topbar-create:hover { color: #fff; background: var(--primary-dark); }
.user-chip { gap: 9px; padding-left: 5px; color: var(--text); }
.user-chip:hover { color: var(--primary); }
.user-avatar {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border: 1px solid #bfdbfe;
    border-radius: 12px;
    color: #1d4ed8;
    background: #eff6ff;
    font-size: 12px;
    font-weight: 850;
}
.user-copy { display: flex; flex-direction: column; max-width: 160px; }
.user-copy b { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.user-copy small { margin-top: 2px; color: #94a3b8; font-size: 10px; }
.icon-button {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: 10px;
    color: #64748b;
    background: #fff;
    cursor: pointer;
}
.icon-button:hover { color: var(--danger); border-color: #fecaca; background: #fff7f7; }
.mobile-menu-button { display: none; width: 38px; height: 38px; padding: 9px; border: 1px solid var(--border); border-radius: 10px; background: #fff; }
.mobile-menu-button span { display: block; height: 2px; margin: 4px 0; border-radius: 2px; background: var(--text); }
.portal-content { width: 100%; max-width: 1480px; margin: 0 auto; padding: 30px; flex: 1 0 auto; }
.portal-footer {
    display: flex;
    width: calc(100% - 60px);
    max-width: 1420px;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin: 0 auto;
    padding: 22px 0 28px;
    color: #94a3b8;
    border-top: 1px solid var(--border);
    font-size: 11px;
}
.portal-footer-links { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.portal-footer a { color: #64748b; }
.portal-footer a:hover { color: var(--primary); }

.sidebar-collapsed .portal-sidebar { width: var(--sidebar-collapsed-width); }
.sidebar-collapsed .portal-main { width: calc(100% - var(--sidebar-collapsed-width)); margin-left: var(--sidebar-collapsed-width); }
.sidebar-collapsed .brand-copy,
.sidebar-collapsed .nav-label,
.sidebar-collapsed .nav-section-label,
.sidebar-collapsed .sidebar-help-copy { width: 0; opacity: 0; pointer-events: none; }
.sidebar-collapsed .sidebar-brand-row { padding-inline: 22px 13px; }
.sidebar-collapsed .sidebar-toggle { position: absolute; top: 63px; right: -14px; color: #355378; background: #fff; box-shadow: 0 5px 16px rgba(15,35,65,.13); }
.sidebar-collapsed .sidebar-toggle span { transform: rotate(180deg); }
.sidebar-collapsed .portal-nav { padding-inline: 17px; }
.sidebar-collapsed .nav-link { justify-content: center; padding-inline: 10px; }
.sidebar-collapsed .sidebar-help { justify-content: center; margin: 15px 18px; padding-inline: 10px; }
.sidebar-overlay { display: none; }

h1, h2, h3 { margin-top: 0; letter-spacing: -.35px; }
h1 { margin-bottom: 8px; font-size: clamp(27px, 3vw, 38px); line-height: 1.13; }
h2 { font-size: 20px; }
h3 { font-size: 16px; }
p { line-height: 1.55; }
.page-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 23px; }
.page-kicker { display: inline-flex; align-items: center; gap: 7px; margin-bottom: 8px; color: var(--primary); font-size: 11px; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase; }
.page-kicker::before { width: 20px; height: 2px; content: ""; background: var(--accent); }
.muted { color: var(--muted); }
.subtle { color: #94a3b8; font-size: 12px; }
.card {
    margin-bottom: 18px;
    padding: 22px;
    border: 1px solid rgba(226,232,240,.95);
    border-radius: 17px;
    background: var(--surface);
    box-shadow: var(--shadow);
}
.card-title-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.card-title-row h2, .card-title-row h3 { margin: 0; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; }
.metric-card { position: relative; overflow: hidden; min-height: 144px; }
.metric-card::after { position: absolute; right: -24px; bottom: -35px; width: 110px; height: 110px; content: ""; border-radius: 50%; background: rgba(37,99,235,.05); }
.metric-label { color: var(--muted); font-size: 12px; font-weight: 700; }
.metric { margin: 11px 0 5px; font-size: 31px; font-weight: 850; letter-spacing: -1px; }
.metric-note { color: #94a3b8; font-size: 11px; }
.metric-icon {
    display: grid;
    width: 39px;
    height: 39px;
    place-items: center;
    margin-bottom: 16px;
    border-radius: 12px;
    color: #1d4ed8;
    background: #eff6ff;
}
.metric-icon.green { color: #0f766e; background: #ecfdf5; }
.metric-icon.amber { color: #a16207; background: #fffbeb; }
.metric-icon.violet { color: #6d28d9; background: #f5f3ff; }
.hero-panel {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(260px, .7fr);
    gap: 25px;
    overflow: hidden;
    padding: 27px;
    color: #fff;
    border: 0;
    background:
        radial-gradient(circle at 80% 0, rgba(94,234,212,.25), transparent 15rem),
        linear-gradient(125deg, #102b52 0%, #133e70 60%, #0f766e 135%);
}
.hero-panel h1, .hero-panel h2 { color: #fff; }
.hero-panel p { color: #c5d5e9; }
.hero-actions { display: flex; align-items: center; justify-content: flex-end; gap: 9px; flex-wrap: wrap; }
.hero-panel .btn.light { border-color: rgba(255,255,255,.18); color: #fff; background: rgba(255,255,255,.1); }
.insight-strip { display: flex; align-items: center; gap: 14px; padding: 15px 17px; border: 1px solid #dbeafe; border-radius: 13px; background: #f6faff; }
.insight-icon { display: grid; width: 38px; height: 38px; flex: 0 0 38px; place-items: center; border-radius: 11px; color: #1d4ed8; background: #dbeafe; }
.insight-strip strong { display: block; margin-bottom: 2px; font-size: 13px; }
.insight-strip span { color: #64748b; font-size: 12px; }

.badge { display: inline-flex; align-items: center; gap: 5px; padding: 5px 9px; border-radius: 999px; color: #1d4ed8; background: #eff6ff; font-size: 11px; font-weight: 750; white-space: nowrap; }
.badge::before { width: 6px; height: 6px; content: ""; border-radius: 50%; background: currentColor; }
.badge.warn { color: #a16207; background: #fffbeb; }
.badge.good { color: #047857; background: #ecfdf5; }
.badge.bad { color: #b42318; background: #fff1f2; }
.badge.neutral { color: #475569; background: #f1f5f9; }
.btn {
    display: inline-flex;
    min-height: 41px;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 9px 15px;
    border: 1px solid transparent;
    border-radius: 10px;
    color: #fff;
    background: var(--primary);
    box-shadow: 0 7px 17px rgba(37,99,235,.15);
    cursor: pointer;
    font-weight: 700;
}
.btn:hover { color: #fff; background: var(--primary-dark); }
.btn.light { color: #334155; border-color: var(--border); background: #fff; box-shadow: none; }
.btn.light:hover { color: #1d4ed8; border-color: #bfdbfe; background: #f8fbff; }
.btn.danger { background: var(--danger); }
.btn.small { min-height: 34px; padding: 6px 11px; font-size: 12px; }
.actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.table-wrap { overflow-x: auto; margin-inline: -6px; padding-inline: 6px; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 13px 12px; border-bottom: 1px solid #edf1f6; text-align: left; vertical-align: middle; }
th { color: #8492a6; background: #fbfcfe; font-size: 10px; font-weight: 800; letter-spacing: .65px; text-transform: uppercase; }
tbody tr { transition: background .15s ease; }
tbody tr:hover { background: #fafcff; }
tbody tr:last-child td { border-bottom: 0; }
.table-primary { color: #1e293b; font-weight: 750; }
.table-secondary { display: block; margin-top: 4px; color: #94a3b8; font-size: 11px; }
.number-cell { font-variant-numeric: tabular-nums; white-space: nowrap; }
.empty-state { padding: 46px 20px; text-align: center; }
.empty-icon { display: grid; width: 58px; height: 58px; margin: 0 auto 14px; place-items: center; border-radius: 18px; color: #2563eb; background: #eff6ff; font-size: 25px; }
.compact-empty-state { padding-block: 28px; }

.listing-intro {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(260px, .7fr);
    gap: 24px;
    overflow: hidden;
    color: #fff;
    border: 0;
    background:
        radial-gradient(circle at 90% 0, rgba(45,212,191,.24), transparent 16rem),
        linear-gradient(125deg, #102b52, #164b79 70%, #0f766e 135%);
}
.listing-intro-copy { display: flex; align-items: flex-start; gap: 15px; }
.listing-intro-copy h2 { margin-bottom: 6px; color: #fff; }
.listing-intro-copy p { margin: 0; color: #d5e3f2; }
.listing-intro-icon {
    display: grid;
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    place-items: center;
    border-radius: 14px;
    color: #99f6e4;
    background: rgba(255,255,255,.1);
    font-size: 23px;
}
.listing-benefits { display: grid; align-content: center; gap: 9px; }
.listing-benefits span { color: #e6f2fb; font-size: 13px; font-weight: 700; }
.listing-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.listing-steps .card { position: relative; min-height: 155px; }
.listing-steps h3 { margin: 14px 0 6px; }
.listing-steps p { margin: 0; color: var(--muted); font-size: 13px; }
.step-number { color: #2563eb; font-size: 11px; font-weight: 850; letter-spacing: 1px; }
.listing-request-form { margin-top: 0; }
.listing-request-form .card-title-row { margin-bottom: 0; }
.listing-form-actions { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.listing-form-actions .muted { max-width: 620px; font-size: 12px; }

input, select, textarea {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 9px;
    color: var(--text);
    outline: none;
    background: #fff;
    transition: border .15s ease, box-shadow .15s ease;
}
input:focus, select:focus, textarea:focus { border-color: #60a5fa; box-shadow: 0 0 0 3px rgba(96,165,250,.15); }
textarea { min-height: 130px; resize: vertical; }
label { display: block; margin: 9px 0 6px; font-weight: 700; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.full { grid-column: 1/-1; }
.organization-logo-card { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 22px; align-items: center; }
.organization-logo-preview {
    display: grid;
    width: 112px;
    height: 112px;
    place-items: center;
    overflow: hidden;
    color: #64748b;
    border: 1px solid #dbe5f1;
    border-radius: 22px;
    background: #f8fafc;
    font-size: 13px;
    font-weight: 800;
}
.organization-logo-preview img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.organization-logo-copy h2 { margin-bottom: 5px; }
.organization-logo-copy p { margin: 0 0 13px; }
.organization-logo-actions { display: flex; align-items: center; gap: 9px; margin-bottom: 9px; flex-wrap: wrap; }
.organization-logo-actions input[type="file"] { width: min(100%, 390px); }
.alert { display: flex; align-items: center; gap: 10px; margin-bottom: 17px; padding: 13px 16px; border-radius: 11px; font-size: 13px; }
.alert.success, .success { color: #166534; background: #dcfce7; }
.alert.error, .error { color: #991b1b; background: #fee2e2; }
.alert.development-link { color: #1e40af; border: 1px solid #bfdbfe; background: #eff6ff; }
.alert.development-link a { margin-left: 5px; font-weight: 800; text-decoration: underline; }
.validation-summary-errors { color: #991b1b; }
.field-validation-error { display: block; margin-top: 5px; color: #b42318; font-size: 12px; }

.analytics-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.analytics-grid .card { margin: 0; }
.budget-progress { height: 8px; overflow: hidden; border-radius: 999px; background: #e9eef5; }
.budget-progress > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #2563eb, #14b8a6); }
.split-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 18px; align-items: start; }
.status-dot { display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; }
.status-dot.Billable { background: #10b981; }
.status-dot.Duplicate { background: #f59e0b; }
.status-dot.Bot, .status-dot.Rejected, .status-dot.Employer { background: #ef4444; }
.source-path { max-width: 340px; overflow: hidden; color: #94a3b8; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.sync-indicator { display: inline-flex; align-items: center; gap: 6px; color: #64748b; font-size: 11px; }
.sync-indicator::before { width: 7px; height: 7px; content: ""; border-radius: 50%; background: #10b981; box-shadow: 0 0 0 4px rgba(16,185,129,.11); }
.mini-bars { display: flex; height: 130px; align-items: flex-end; gap: 6px; padding-top: 15px; }
.mini-bar-wrap { display: flex; min-width: 0; flex: 1; height: 100%; flex-direction: column; justify-content: flex-end; gap: 5px; }
.mini-bar { min-height: 3px; border-radius: 4px 4px 1px 1px; background: linear-gradient(180deg, #3b82f6, #1d4ed8); }
.mini-bar.spend { background: linear-gradient(180deg, #f59e0b, #d97706); }
.mini-bar-label { overflow: hidden; color: #94a3b8; font-size: 8px; text-align: center; text-overflow: clip; white-space: nowrap; }
.campaign-chart-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.chart-heading { margin: 14px 0 0; color: #334155; font-size: .86rem; }

.account-header-badge {
    display: flex;
    min-width: 260px;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    border: 1px solid var(--border);
    border-radius: 15px;
    background: rgba(255,255,255,.8);
    box-shadow: var(--shadow);
}
.account-header-badge > span:last-child { display: flex; min-width: 0; flex-direction: column; }
.account-header-badge b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-header-badge small { margin-top: 3px; color: var(--muted); }
.account-avatar-large {
    display: grid;
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    place-items: center;
    border-radius: 15px;
    color: #fff;
    background: linear-gradient(145deg, #2563eb, #14b8a6);
    font-weight: 850;
}
.account-status-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.account-status-card {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 11px;
    padding: 15px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #fff;
}
.account-status-card > div { display: flex; min-width: 0; flex-direction: column; }
.account-status-card small { color: var(--muted); font-size: 11px; }
.account-status-card strong { overflow: hidden; margin-top: 3px; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.account-status-icon {
    display: grid;
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    place-items: center;
    border-radius: 11px;
    color: #1d4ed8;
    background: #eff6ff;
    font-weight: 800;
}
.account-status-icon.ok { color: #047857; background: #ecfdf5; }
.account-status-icon.warning { color: #a16207; background: #fffbeb; }
.account-settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
.account-section { height: 100%; margin: 0; }
.account-section .card-title-row > div { display: flex; align-items: center; gap: 10px; }
.section-number {
    display: grid;
    width: 31px;
    height: 31px;
    place-items: center;
    border-radius: 10px;
    color: #1d4ed8;
    background: #eff6ff;
    font-size: 10px;
    font-weight: 850;
}
.account-state-pill { display: inline-flex; padding: 5px 9px; border-radius: 999px; font-size: 10px; font-weight: 800; }
.account-state-pill.success { color: #047857; background: #ecfdf5; }
.account-state-pill.warning { color: #a16207; background: #fffbeb; }
.account-stack { display: grid; gap: 8px; }
.account-form-actions { display: flex; justify-content: flex-end; margin-top: 18px; }
.form-help { margin: 10px 0 0; color: var(--muted); font-size: 11px; }
.current-email {
    display: flex;
    flex-direction: column;
    margin-bottom: 15px;
    padding: 13px 15px;
    border-radius: 12px;
    background: var(--surface-soft);
}
.current-email small { color: var(--muted); }
.current-email strong { margin-top: 3px; overflow-wrap: anywhere; }
.account-inline-notice {
    margin-bottom: 14px;
    padding: 12px 14px;
    border: 1px solid #fde68a;
    border-radius: 12px;
    color: #854d0e;
    background: #fffbeb;
    font-size: 12px;
    line-height: 1.5;
}
.account-inline-notice form { display: inline; }
.text-button {
    padding: 0;
    border: 0;
    color: #1d4ed8;
    background: transparent;
    cursor: pointer;
    font-weight: 800;
    text-decoration: underline;
}
.security-list { display: grid; gap: 1px; overflow: hidden; border: 1px solid var(--border); border-radius: 13px; background: var(--border); }
.security-list > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 12px 14px;
    background: #fff;
    font-size: 12px;
}
.security-list span { color: var(--muted); }
.security-list strong { text-align: right; }
.session-action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
}
.session-action p { margin: 4px 0 0; font-size: 11px; }
.account-result-card {
    max-width: 620px;
    margin: 55px auto;
    padding: 38px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: #fff;
    box-shadow: var(--shadow);
    text-align: center;
}
.account-result-card.success, .account-result-card.error { color: var(--text); background: #fff; }
.account-result-card p { color: var(--muted); }
.account-result-card .actions { justify-content: center; margin-top: 24px; }
.account-result-icon {
    display: grid;
    width: 60px;
    height: 60px;
    margin: 0 auto 19px;
    place-items: center;
    border-radius: 18px;
    color: #047857;
    background: #ecfdf5;
    font-size: 27px;
    font-weight: 900;
}
.account-result-card.error .account-result-icon { color: #b42318; background: #fff1f2; }

.portal-guest .portal-main { width: 100%; margin: 0; }
.portal-guest .portal-topbar { justify-content: center; }
.portal-guest .portal-content { max-width: 760px; }

@media (max-width: 1100px) {
    .analytics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .split-grid { grid-template-columns: 1fr; }
    .account-status-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .user-copy { display: none; }
}

@media (max-width: 850px) {
  .campaign-chart-grid { grid-template-columns: 1fr; }
    .desktop-only { display: none; }
    .portal-sidebar { width: min(290px, 88vw); transform: translateX(-105%); }
    .portal-main, .sidebar-collapsed .portal-main { width: 100%; margin-left: 0; }
    .sidebar-collapsed .portal-sidebar { width: min(290px, 88vw); }
    .sidebar-collapsed .brand-copy,
    .sidebar-collapsed .nav-label,
    .sidebar-collapsed .nav-section-label,
    .sidebar-collapsed .sidebar-help-copy { width: auto; opacity: 1; pointer-events: auto; }
    .sidebar-collapsed .portal-nav { padding-inline: 14px; }
    .sidebar-collapsed .nav-link { justify-content: flex-start; padding-inline: 12px; }
    .sidebar-collapsed .sidebar-help { justify-content: flex-start; margin: 14px; padding-inline: 13px; }
    .sidebar-open .portal-sidebar { transform: translateX(0); }
    .sidebar-overlay { position: fixed; z-index: 35; inset: 0; border: 0; background: rgba(5,15,30,.53); opacity: 0; pointer-events: none; transition: opacity .2s ease; }
    .sidebar-open .sidebar-overlay { display: block; opacity: 1; pointer-events: auto; }
    .mobile-menu-button { display: block; }
    .portal-topbar { padding-inline: 16px; }
    .portal-content { padding: 20px 16px; }
    .portal-footer { width: calc(100% - 32px); align-items: flex-start; flex-direction: column; }
    .topbar-create { display: none; }
    .hero-panel { grid-template-columns: 1fr; }
    .hero-actions { justify-content: flex-start; }
    .listing-intro { grid-template-columns: 1fr; }
    .listing-steps { grid-template-columns: 1fr; }
    .listing-steps .card { min-height: 0; }
    .form-grid { grid-template-columns: 1fr; }
    .organization-logo-card { grid-template-columns: 1fr; }
    .page-header { flex-direction: column; }
    .account-settings-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
    .analytics-grid, .grid { grid-template-columns: 1fr; }
    .portal-topbar { min-height: 68px; }
    .topbar-eyebrow { display: none; }
    .topbar-organization { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .user-chip { display: none; }
    .card { padding: 17px; border-radius: 14px; }
    .hero-panel { padding: 20px; }
    .listing-intro-copy { flex-direction: column; }
    .listing-form-actions { align-items: stretch; flex-direction: column; }
    .account-status-grid { grid-template-columns: 1fr; }
    .account-header-badge { width: 100%; min-width: 0; }
    .session-action { align-items: stretch; flex-direction: column; }
    .security-list > div { align-items: flex-start; flex-direction: column; gap: 4px; }
    .security-list strong { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
