/* ============================================================
   SyncMyBenefits design system - midnight-navy product theme built
   around the SyncMyBenefitsLogo_MidnightNavy.png brand mark. One
   deliberate dark theme (no light-mode fallback) - variable NAMES
   match what existing pages already reference (--ink, --muted,
   --line, --brand, --bg, --danger, --ok, --surface, --surface-strong,
   --shadow, --focus-ring), only the VALUES changed, so no admin page
   markup needed to change for this to apply.
   ============================================================ */

:root {
    --font-body: "IBM Plex Sans", "Segoe UI", Arial, sans-serif;

    /* Brand palette, from the logo itself */
    --navy: #0b2031;
    --navy-surface: #102a3c;
    --navy-surface-strong: #163953;
    --teal: #0c6756;
    --teal-bright: #0aae9a;
    --coral: #ff6b5e;
    --amber: #d89b3c;
    --warm-white: #f6f3ea;

    --bg: var(--navy);
    --bg-alt: #0e2637;
    --surface: var(--navy-surface);
    --surface-strong: var(--navy-surface-strong);
    --line: rgba(246, 243, 234, .14);
    --ink: var(--warm-white);
    --muted: #a9bac8;
    --shadow: 0 20px 45px rgba(2, 8, 15, .45);

    --brand: var(--teal-bright);
    --brand-dark: var(--teal);
    --brand-hover: #1fd0ba;
    --brand-2: var(--amber);
    --cta: var(--coral);
    --cta-hover: #ff8478;

    --ok: var(--teal-bright);
    --danger: var(--coral);
    --focus-ring: rgba(10, 174, 154, .5);
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.65;
    color: var(--ink);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

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

h1, h2, h3 {
    font-family: var(--font-body);
    font-weight: 700;
    line-height: 1.25;
    color: var(--ink);
    letter-spacing: -.01em;
}
h1 { font-size: 1.85rem; margin: 0 0 .6rem; }
h2 { font-size: 1.3rem; margin: 1.75rem 0 .75rem; }

code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    background: var(--bg-alt);
    border: 1px solid var(--line);
    border-radius: 4px;
    padding: .1rem .35rem;
    word-break: break-all;
    color: var(--ink);
}

.muted { color: var(--muted); font-size: .85rem; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

/* A section that stretches to the viewport edge for a background color/accent,
   while its .container child stays centered - lets the marketing page use full-width
   bands even though .page (below) is a fixed-width column for every other route. */
.full-bleed {
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}

/* ---- Header / layout ------------------------------------------------------- */

.site-header {
    background: var(--navy);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 20;
}
.site-header .bar {
    max-width: 1100px;
    margin: 0 auto;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.brand-logo { display: block; height: 44px; width: auto; }
.brand-text {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--ink);
    text-decoration: none;
    letter-spacing: -.01em;
}

.site-nav { display: flex; align-items: center; gap: 22px; }
.nav-links { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.nav-links a { color: var(--muted); text-decoration: none; font-size: .92rem; font-weight: 500; }
.nav-links a:hover, .nav-links a.active { color: var(--ink); }
.nav-group-label { color: var(--muted); font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; margin-right: 4px; }
.nav-super { padding-left: 18px; margin-left: 4px; border-left: 1px solid var(--line); }
.nav-super a { color: var(--amber); }

.nav-dropdown { position: relative; display: inline-flex; align-items: center; }
.nav-dropdown > summary {
    list-style: none;
    cursor: pointer;
    color: var(--muted);
    font-size: .92rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
}
.nav-dropdown > summary::-webkit-details-marker { display: none; }
.nav-dropdown > summary::after { content: '\25BE'; font-size: .65rem; }
.nav-dropdown[open] > summary, .nav-dropdown > summary:hover { color: var(--ink); }
.nav-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 10px;
    background: var(--navy);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    min-width: 200px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .35);
    z-index: 30;
}
.nav-dropdown-menu a { padding: 7px 10px; border-radius: 6px; white-space: nowrap; }
.nav-dropdown-menu a:hover { background: rgba(255, 255, 255, .06); }
.nav-dropdown-super > summary { color: var(--amber); }
.nav-dropdown-super .nav-dropdown-menu a { color: var(--amber); }

.site-nav form { display: inline; }
.site-nav button.link {
    background: none; border: 0; padding: 0; margin: 0;
    color: var(--muted); font-size: .92rem; font-family: inherit; cursor: pointer;
}
.site-nav button.link:hover { color: var(--ink); }

.nav-toggle {
    display: none;
    background: none;
    border: 1px solid var(--line);
    border-radius: 6px;
    color: var(--ink);
    padding: 6px 10px;
    font-size: 1.1rem;
    cursor: pointer;
}

.page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 32px 20px 64px;
}

/* ---- Buttons -------------------------------------------------------- */

.btn {
    display: inline-block;
    padding: 11px 22px;
    border-radius: 7px;
    border: 1px solid transparent;
    font-family: inherit;
    font-size: .95rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    line-height: 1.4;
}
.btn-primary { background: var(--cta); border-color: var(--cta); color: var(--navy); }
.btn-primary:hover { background: var(--cta-hover); border-color: var(--cta-hover); color: var(--navy); }
.btn-secondary { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-secondary:hover { border-color: var(--muted); }
.btn-lg { padding: 14px 28px; font-size: 1.02rem; }

/* ---- Forms ------------------------------------------------------------ */

.field { margin: 0 0 14px; }
.field label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 4px; color: var(--ink); }
.field .validation-message { color: var(--danger); font-size: .85rem; display: block; margin-top: 4px; }
.field.checkbox label { font-weight: 400; display: flex; align-items: center; gap: 8px; }

/* Blazor's InputText/InputTextArea render <input>/<textarea> with no type attribute at all (not even
   type="text"), so an attribute selector like input[type="text"] silently never matches them - style by
   element instead and carve out the few input kinds that need different treatment. */
input:not([type="checkbox"]):not([type="radio"]), select, textarea {
    width: 100%;
    max-width: 380px;
    padding: 9px 11px;
    font: inherit;
    color: var(--ink);
    background: var(--bg-alt);
    border: 1px solid var(--line);
    border-radius: 6px;
}
textarea { max-width: 480px; resize: vertical; }
input:focus, select:focus, button:focus, a:focus {
    outline: 3px solid var(--focus-ring);
    outline-offset: 1px;
}
input[type="checkbox"] { width: 16px; height: 16px; }

/* ---- Cards, alerts, tables --------------------------------------------- */

.variant-row { border-top: 1px solid var(--line); padding: 14px 0; }
.variant-row:first-of-type { border-top: none; padding-top: 0; }

.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 20px 22px;
    margin: 0 0 16px;
}

.alert { padding: 10px 14px; border-radius: 6px; border: 1px solid; margin: 0 0 16px; font-size: .92rem; }
.alert-danger { color: var(--danger); border-color: var(--danger); background: color-mix(in srgb, var(--danger) 12%, transparent); }
.alert-ok { color: var(--ok); border-color: var(--ok); background: color-mix(in srgb, var(--ok) 12%, transparent); }

table { border-collapse: collapse; width: 100%; max-width: 760px; }
th, td { text-align: left; padding: 8px 12px 8px 0; }
thead th { border-bottom: 1px solid var(--line); font-size: .85rem; color: var(--muted); font-weight: 600; }
tbody tr { border-bottom: 1px solid var(--line); }

.badge {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 600;
    background: var(--bg-alt);
    color: var(--muted);
}
.badge-ok { color: var(--ok); background: color-mix(in srgb, var(--ok) 16%, var(--bg-alt)); }
.badge-warn { color: var(--danger); background: color-mix(in srgb, var(--danger) 16%, var(--bg-alt)); }

.scroll-box { max-height: 340px; overflow: auto; }
.ml-2 { margin-left: 8px; }

/* ---- Admin/app page header (billing, measurement, terms, etc.) --------- */

.page-header { margin-bottom: 22px; }
.page-header .eyebrow { display: block; margin-bottom: 6px; }
.page-header p { color: var(--muted); max-width: 620px; }

/* ---- Shared marketing/portal pieces ------------------------------------ */

.eyebrow {
    color: var(--brand);
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .12em;
}

.circuit-accent {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    opacity: .5;
    z-index: 0;
}
.circuit-accent svg { position: absolute; }

/* ---- Auth shell (sign in / sign up / invite / failed) ------------------ */

.auth-shell {
    min-height: calc(100vh - 58px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 20px;
    position: relative;
    overflow: hidden;
}
.auth-panel {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 440px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 36px 32px;
    box-shadow: var(--shadow);
}
.auth-panel .brand-logo { height: 34px; margin: 0 auto 24px; display: block; }
.auth-panel h1 { font-size: 1.4rem; text-align: center; }
.auth-panel .subhead { color: var(--muted); text-align: center; margin: 0 0 24px; font-size: .92rem; }
.auth-actions { display: flex; flex-direction: column; gap: 10px; margin: 0 0 18px; }
.auth-actions .btn { text-align: center; }
.auth-footnote { text-align: center; color: var(--muted); font-size: .85rem; margin-top: 6px; }

/* ---- Home: hero, platform grid, steps, pricing, closing CTA ------------ */

.hero { position: relative; padding: 72px 0 64px; }
.hero .container { position: relative; z-index: 1; max-width: 760px; }
.hero h1 { font-size: 2.5rem; margin: 10px 0 16px; }
.hero .lede { color: var(--muted); font-size: 1.08rem; max-width: 640px; margin: 0 0 26px; }
.hero .proof { color: var(--muted); font-size: .88rem; margin-top: 22px; }
.hero .cta-row { display: flex; gap: 12px; flex-wrap: wrap; }

.section { padding: 56px 0; }
.section-alt { background: var(--bg-alt); }
.section h2 { font-size: 1.7rem; margin: 0 0 10px; }
.section .section-lede { color: var(--muted); max-width: 620px; margin: 0 0 32px; }

.platform-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}
.platform-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 22px;
    position: relative;
    overflow: hidden;
}
.platform-card .icon {
    width: 40px; height: 40px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 9px;
    margin-bottom: 14px;
    background: color-mix(in srgb, var(--icon-color, var(--brand)) 18%, var(--surface));
    color: var(--icon-color, var(--brand));
}
.platform-card h3 { font-size: 1.02rem; margin: 0 0 6px; }
.platform-card p { color: var(--muted); font-size: .9rem; margin: 0; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; position: relative; }
.step { text-align: left; }
.step .step-index {
    display: inline-flex; align-items: center; justify-content: center;
    width: 32px; height: 32px; border-radius: 50%;
    background: color-mix(in srgb, var(--brand) 20%, var(--surface));
    color: var(--brand); font-weight: 700; font-size: .95rem;
    margin-bottom: 12px;
}
.step h3 { font-size: 1.05rem; margin: 0 0 6px; }
.step p { color: var(--muted); font-size: .9rem; margin: 0; }

.pricing-table-wrap { overflow-x: auto; margin-bottom: 20px; }
.pricing-table { width: 100%; max-width: none; border-collapse: separate; border-spacing: 0; }
.pricing-table th, .pricing-table td { padding: 12px 16px; }
.pricing-table thead th { background: var(--surface); border-bottom: none; }
.pricing-table tbody td { background: var(--surface); border-bottom: 1px solid var(--line); }
.pricing-table tbody tr:last-child td { border-bottom: none; }
.pricing-table td.price { text-align: right; font-weight: 700; color: var(--ink); }
.pricing-notes { list-style: none; padding: 0; margin: 0; color: var(--muted); font-size: .92rem; }
.pricing-notes li { padding: 4px 0; }
.pricing-notes li::before { content: "\2022"; color: var(--brand); margin-right: 8px; }

.closing-cta {
    text-align: center;
    padding: 56px 0;
    background: var(--navy-surface);
}
.closing-cta h2 { font-size: 1.8rem; }
.closing-cta .btn { margin: 8px 6px 0; }

.site-footer {
    border-top: 1px solid var(--line);
    padding: 22px 0 32px;
    color: var(--muted);
    font-size: .85rem;
    text-align: center;
}
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--ink); }
.site-footer .links { margin-top: 6px; }
.site-footer .links a { margin: 0 8px; }

/* ---- Signed-in dashboard ------------------------------------------------ */

.dashboard-header { margin-bottom: 24px; }
.dashboard-header h1 { margin-bottom: 4px; }
.dashboard-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.dashboard-card h2 { margin-top: 0; font-size: 1.1rem; }
.dashboard-card .links { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.dashboard-card .links a { color: var(--ink); text-decoration: none; font-weight: 500; }
.dashboard-card .links a:hover { color: var(--brand); }
.dashboard-card .links .note { color: var(--muted); font-size: .82rem; font-weight: 400; }

/* ---- Responsive ---------------------------------------------------------- */

@media (max-width: 860px) {
    .platform-grid { grid-template-columns: repeat(2, 1fr); }
    .steps { grid-template-columns: 1fr; }
    .dashboard-grid { grid-template-columns: 1fr; }
    .hero h1 { font-size: 2rem; }
}

@media (max-width: 640px) {
    .platform-grid { grid-template-columns: 1fr; }
    .nav-toggle { display: inline-block; }
    .nav-links, .nav-super { display: none; }
    .site-nav.open .nav-links,
    .site-nav.open .nav-super { display: flex; }
    .site-nav.open {
        position: absolute;
        top: 100%; left: 0; right: 0;
        flex-direction: column;
        align-items: flex-start;
        background: var(--navy);
        border-bottom: 1px solid var(--line);
        padding: 16px 20px 20px;
        gap: 14px;
    }
    .site-nav.open .nav-links, .site-nav.open .nav-super { flex-direction: column; align-items: flex-start; gap: 12px; border-left: none; padding-left: 0; margin-left: 0; }
    .nav-dropdown { display: flex; flex-direction: column; align-items: flex-start; width: 100%; }
    .nav-dropdown-menu {
        position: static;
        margin-top: 6px;
        margin-left: 4px;
        border: none;
        padding: 0 0 0 12px;
        box-shadow: none;
        background: transparent;
        gap: 10px;
    }
    .nav-dropdown-menu a { padding: 2px 0; }
    .hero { padding: 48px 0; }
    .hero h1 { font-size: 1.7rem; }
    .closing-cta h2 { font-size: 1.4rem; }
}

@media (prefers-reduced-motion: reduce) {
    * { scroll-behavior: auto !important; }
}
