/* ============ WageHarbor design system ============ */
:root {
    --pc-bg: #f4f6fb;
    --pc-surface: #ffffff;
    --pc-surface-2: #f8fafc;
    --pc-border: #e5e8ef;
    --pc-text: #111827;
    --pc-muted: #6b7280;
    --pc-primary: #0e7c86;
    --pc-primary-600: #0b6870;
    --pc-primary-soft: #e6f6f5;
    --pc-success: #059669;
    --pc-success-soft: #ecfdf5;
    --pc-warning: #b45309;
    --pc-warning-soft: #fffbeb;
    --pc-danger: #dc2626;
    --pc-danger-soft: #fef2f2;
    --pc-info: #0369a1;
    --pc-info-soft: #f0f9ff;
    --pc-sidebar: #0b2545;
    --pc-sidebar-text: #aab4c8;
    --pc-sidebar-active: #13355e;
    --pc-radius: 14px;
    --pc-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 4px 16px rgba(16, 24, 40, .06);
    --bs-primary: var(--pc-primary);
    --bs-primary-rgb: 14, 124, 134;
    --bs-link-color: var(--pc-primary);
    --bs-link-color-rgb: 14, 124, 134;
    --bs-body-font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

[data-bs-theme=dark] {
    --pc-bg: #0b0f19;
    --pc-surface: #121826;
    --pc-surface-2: #0f1522;
    --pc-border: #222b3c;
    --pc-text: #e5e7eb;
    --pc-muted: #94a3b8;
    --pc-primary: #5eead4;
    --pc-primary-600: #2dd4bf;
    --pc-primary-soft: #0c2f33;
    --pc-success-soft: #052e22;
    --pc-warning-soft: #2b1d05;
    --pc-danger-soft: #2c0b0b;
    --pc-info-soft: #082032;
    --pc-sidebar: #070b14;
    --pc-sidebar-active: #172033;
    --pc-shadow: 0 1px 2px rgba(0,0,0,.4);
    --bs-body-bg: var(--pc-bg);
    --bs-primary-rgb: 94, 234, 212;
}

html, body { background: var(--pc-bg); color: var(--pc-text); font-family: var(--bs-body-font-family); }
body { font-size: .925rem; }
h1:focus { outline: none; }
a { text-decoration: none; }
.text-muted, .muted { color: var(--pc-muted) !important; }
.tabular { font-variant-numeric: tabular-nums; }

/* ---------- Shell ---------- */
.app-shell { display: flex; min-height: 100vh; }
.app-sidebar {
    width: 252px; flex-shrink: 0; background: var(--pc-sidebar); color: var(--pc-sidebar-text);
    position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column;
}
.app-brand { display: flex; align-items: center; gap: .6rem; padding: 1.25rem 1.25rem 1rem; color: #fff; font-weight: 700; font-size: 1.15rem; }
.app-brand .logo {
    width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
    background: linear-gradient(135deg, #6366f1, #06b6d4); color: #fff; font-size: 1.05rem;
}
.app-brand small { display: block; font-weight: 500; font-size: .72rem; color: var(--pc-sidebar-text); }
.nav-section { padding: .9rem 1.25rem .35rem; font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; color: #64748b; font-weight: 600; }
.app-nav a, .app-nav button.navlink {
    display: flex; align-items: center; gap: .7rem; margin: 1px .75rem; padding: .52rem .75rem; border-radius: 9px;
    color: var(--pc-sidebar-text); font-weight: 500; background: none; border: 0; width: calc(100% - 1.5rem); text-align: left;
}
.app-nav a:hover, .app-nav button.navlink:hover { background: var(--pc-sidebar-active); color: #fff; }
.app-nav a.active { background: var(--pc-sidebar-active); color: #fff; box-shadow: inset 3px 0 0 #5eead4; }
.app-nav i { font-size: 1.05rem; width: 1.2rem; text-align: center; }
.app-nav .badge { margin-left: auto; }
.sidebar-footer { margin-top: auto; padding: 1rem 1.25rem; font-size: .75rem; color: #475569; }

.app-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.app-topbar {
    height: 60px; display: flex; align-items: center; gap: 1rem; padding: 0 1.75rem; background: var(--pc-surface);
    border-bottom: 1px solid var(--pc-border); position: sticky; top: 0; z-index: 20;
}
.app-topbar .company { display: flex; align-items: center; gap: .65rem; min-width: 0; }
.app-topbar .company-logo { height: 38px; max-width: 160px; object-fit: contain; flex-shrink: 0; }
/* Most logos are drawn for light backgrounds. */
[data-bs-theme=dark] .app-topbar .company-logo { background: #fff; border-radius: 8px; padding: 3px 6px; }
.app-topbar .company-name { font-size: 1.2rem; font-weight: 700; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 575.98px) { .app-topbar .company-logo { height: 30px; max-width: 96px; } .app-topbar .company-name { font-size: 1rem; } }
.logo-preview { height: 96px; border: 1px dashed var(--pc-border); border-radius: 12px; display: grid; place-items: center; padding: .75rem; background: var(--pc-surface-2); }
.logo-preview img { max-height: 100%; max-width: 100%; object-fit: contain; }
.app-content { padding: 1.75rem; max-width: 1400px; width: 100%; }
.menu-toggle { display: none; }
.menu-btn { display: none; font-size: 1.4rem; cursor: pointer; margin: 0; }

@media (max-width: 991.98px) {
    .app-sidebar { position: fixed; left: -260px; z-index: 50; transition: left .2s; }
    .menu-toggle:checked ~ .app-shell .app-sidebar { left: 0; box-shadow: 0 0 0 100vmax rgba(0,0,0,.4); }
    .menu-btn { display: inline-block; }
    .app-content { padding: 1rem; }
    .app-topbar { padding: 0 1rem; }
}

/* ---------- Page header ---------- */
.page-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.page-header h1 { font-size: 1.55rem; font-weight: 700; margin: 0; letter-spacing: -.01em; }
.page-header .subtitle { color: var(--pc-muted); margin-top: .2rem; }
.breadcrumbs { font-size: .8rem; color: var(--pc-muted); margin-bottom: .25rem; }
.breadcrumbs a { color: var(--pc-muted); }

/* ---------- Cards ---------- */
.card, .pc-card {
    background: var(--pc-surface); border: 1px solid var(--pc-border); border-radius: var(--pc-radius); box-shadow: var(--pc-shadow);
}
.pc-card { padding: 1.25rem; }
.card-header { background: transparent; border-bottom: 1px solid var(--pc-border); padding: 1rem 1.25rem; font-weight: 600; }
.card-title-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.card-title-row h2, .pc-card h2 { font-size: 1rem; font-weight: 650; margin: 0; }

.stat-card { padding: 1.1rem 1.25rem; display: flex; gap: 1rem; align-items: center; height: 100%; }
.stat-card .icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-size: 1.25rem; flex-shrink: 0; }
.stat-card .label { color: var(--pc-muted); font-size: .8rem; font-weight: 500; }
.stat-card .value { font-size: 1.45rem; font-weight: 700; letter-spacing: -.01em; line-height: 1.2; }
.stat-card .hint { font-size: .75rem; color: var(--pc-muted); }
.tone-primary { background: var(--pc-primary-soft); color: var(--pc-primary); }
.tone-success { background: var(--pc-success-soft); color: var(--pc-success); }
.tone-warning { background: var(--pc-warning-soft); color: var(--pc-warning); }
.tone-danger { background: var(--pc-danger-soft); color: var(--pc-danger); }
.tone-info { background: var(--pc-info-soft); color: var(--pc-info); }

/* ---------- Tables ---------- */
.table { --bs-table-bg: transparent; margin-bottom: 0; color: var(--pc-text); }
.table > :not(caption) > * > * { padding: .7rem .9rem; border-bottom-color: var(--pc-border); }
.table thead th { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--pc-muted); font-weight: 600; background: var(--pc-surface-2); white-space: nowrap; }
.table-hover > tbody > tr:hover > * { background: var(--pc-surface-2); --bs-table-bg-state: transparent; }
.table td.num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table tfoot td { font-weight: 700; background: var(--pc-surface-2); }
.table-wrap { overflow-x: auto; border-radius: var(--pc-radius); }
tr.clickable { cursor: pointer; }

/* ---------- Badges / chips ---------- */
.chip { display: inline-flex; align-items: center; gap: .3rem; padding: .18rem .6rem; border-radius: 999px; font-size: .74rem; font-weight: 600; white-space: nowrap; }
.chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; }
.chip.plain::before { display: none; }

.avatar {
    width: 36px; height: 36px; border-radius: 50%; display: inline-grid; place-items: center; font-weight: 700; font-size: .8rem;
    background: var(--pc-primary-soft); color: var(--pc-primary); flex-shrink: 0;
}
.avatar.lg { width: 64px; height: 64px; font-size: 1.3rem; }
.person { display: flex; align-items: center; gap: .7rem; }
.person .name { font-weight: 600; }
.person .sub { font-size: .78rem; color: var(--pc-muted); }

/* ---------- Forms ---------- */
.form-label { font-weight: 500; font-size: .82rem; margin-bottom: .3rem; color: var(--pc-text); }
.form-control, .form-select { border-radius: 9px; border-color: var(--pc-border); background-color: var(--pc-surface); color: var(--pc-text); }
.form-control:focus, .form-select:focus { border-color: var(--pc-primary); box-shadow: 0 0 0 .2rem rgba(var(--bs-primary-rgb), .15); }
.form-text { font-size: .76rem; }
.form-section { border-top: 1px solid var(--pc-border); padding-top: 1.25rem; margin-top: 1.25rem; }
.form-section h3 { font-size: .95rem; font-weight: 650; margin-bottom: .9rem; }
.validation-message { color: var(--pc-danger); font-size: .78rem; }
.invalid { border-color: var(--pc-danger) !important; }

.btn { border-radius: 9px; font-weight: 500; }
.btn-primary { background: var(--pc-primary); border-color: var(--pc-primary); }
.btn-primary:hover, .btn-primary:focus { background: var(--pc-primary-600); border-color: var(--pc-primary-600); }
.btn-soft { background: var(--pc-primary-soft); color: var(--pc-primary); border: 0; }
.btn-soft:hover { background: var(--pc-primary); color: #fff; }
.btn-icon { padding: .25rem .5rem; }

/* ---------- Tabs ---------- */
.pc-tabs { display: flex; gap: .25rem; border-bottom: 1px solid var(--pc-border); margin-bottom: 1.25rem; overflow-x: auto; }
.pc-tabs button {
    background: none; border: 0; padding: .65rem .9rem; color: var(--pc-muted); font-weight: 550; border-bottom: 2px solid transparent; white-space: nowrap;
}
.pc-tabs button.active { color: var(--pc-primary); border-bottom-color: var(--pc-primary); }
.pc-tabs button:hover { color: var(--pc-text); }

/* ---------- Modal ---------- */
.pc-modal-backdrop { position: fixed; inset: 0; background: rgba(15, 23, 42, .45); z-index: 1050; display: grid; place-items: center; padding: 1rem; animation: fade .12s; }
.pc-modal { background: var(--pc-surface); border-radius: 16px; width: 100%; max-width: 560px; max-height: 92vh; overflow-y: auto; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.pc-modal.lg { max-width: 820px; }
.pc-modal header { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.25rem; border-bottom: 1px solid var(--pc-border); }
.pc-modal header h3 { font-size: 1.05rem; margin: 0; font-weight: 650; }
.pc-modal .body { padding: 1.25rem; }
.pc-modal footer { padding: .9rem 1.25rem; border-top: 1px solid var(--pc-border); display: flex; justify-content: flex-end; gap: .5rem; }
@keyframes fade { from { opacity: 0 } to { opacity: 1 } }

/* ---------- Toasts ---------- */
.toast-stack { position: fixed; right: 1rem; bottom: 1rem; z-index: 2000; display: flex; flex-direction: column; gap: .5rem; }
.pc-toast { min-width: 260px; max-width: 420px; padding: .8rem 1rem; border-radius: 12px; background: var(--pc-surface); border: 1px solid var(--pc-border); box-shadow: var(--pc-shadow); display: flex; gap: .6rem; align-items: flex-start; animation: fade .15s; }
.pc-toast.success i { color: var(--pc-success); }
.pc-toast.danger i { color: var(--pc-danger); }
.pc-toast.info i { color: var(--pc-info); }

/* ---------- Wisdom card (dashboard) ---------- */
.wisdom-card {
    position: fixed; left: calc(252px + 1.5rem); bottom: 1.5rem; z-index: 30; margin: 0;
    width: min(380px, calc(100vw - 252px - 3rem)); padding: 1rem 1.25rem 1.1rem 1.5rem; overflow: hidden;
    animation: wisdom-in .45s ease-out both;
}
.wisdom-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: linear-gradient(180deg, #2dd4bf, #0e7c86 55%, #0b2545); }
.wisdom-head { display: flex; align-items: center; gap: .45rem; margin-bottom: .55rem; font-size: .7rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--pc-primary); }
.wisdom-btn { width: 28px; height: 28px; display: grid; place-items: center; border: 0; border-radius: 8px; background: none; color: var(--pc-muted); font-size: .9rem; }
.wisdom-btn:hover { background: var(--pc-surface-2); color: var(--pc-text); }
.wisdom-card blockquote { position: relative; z-index: 1; margin: 0 0 .6rem; font-size: .98rem; line-height: 1.5; font-weight: 500; color: var(--pc-text); }
.wisdom-card figcaption { position: relative; z-index: 1; font-size: .78rem; color: var(--pc-muted); }
.wisdom-card .who { font-weight: 600; color: var(--pc-text); }
.wisdom-mark { position: absolute; right: .6rem; bottom: -1.1rem; font-size: 5.5rem; line-height: 1; color: var(--pc-primary); opacity: .08; pointer-events: none; }
@keyframes wisdom-in { from { opacity: 0; transform: translateY(14px) } to { opacity: 1; transform: none } }
@media (max-width: 991.98px) { .wisdom-card { left: 1rem; right: 1rem; bottom: 1rem; width: auto; } }
@media (prefers-reduced-motion: reduce) { .wisdom-card { animation: none; } }

/* ---------- Misc ---------- */
.empty { text-align: center; padding: 2.5rem 1rem; color: var(--pc-muted); }
.empty i { font-size: 2rem; display: block; margin-bottom: .5rem; opacity: .6; }
.kv { display: grid; grid-template-columns: minmax(120px, 40%) 1fr; gap: .45rem 1rem; font-size: .88rem; }
.kv dt { color: var(--pc-muted); font-weight: 500; }
.kv dd { margin: 0; }
.steps { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.steps .step { display: flex; align-items: center; gap: .5rem; padding: .45rem .8rem; border-radius: 999px; background: var(--pc-surface); border: 1px solid var(--pc-border); font-size: .82rem; color: var(--pc-muted); }
.steps .step.done { color: var(--pc-success); border-color: var(--pc-success); }
.steps .step.current { color: var(--pc-primary); border-color: var(--pc-primary); background: var(--pc-primary-soft); font-weight: 600; }
.warning-list { background: var(--pc-warning-soft); color: var(--pc-warning); border-radius: 12px; padding: .8rem 1rem; font-size: .85rem; }
.warning-list ul { margin: .3rem 0 0; padding-left: 1.1rem; }
.bar-chart { display: flex; align-items: flex-end; gap: 8px; height: 180px; padding-top: 10px; }
.bar-chart .bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.bar-chart .bar { width: 100%; max-width: 38px; border-radius: 6px 6px 2px 2px; background: linear-gradient(180deg, #2dd4bf, #0e7c86); min-height: 2px; position: relative; }
.bar-chart .bar:hover::after { content: attr(data-tip); position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); background: #111827; color: #fff; padding: 2px 6px; border-radius: 6px; font-size: .7rem; white-space: nowrap; margin-bottom: 4px; }
.bar-chart .bar-label { font-size: .7rem; color: var(--pc-muted); }
.progress-thin { height: 6px; border-radius: 6px; background: var(--pc-border); overflow: hidden; }
.progress-thin > div { height: 100%; background: var(--pc-primary); }
.list-clean { list-style: none; padding: 0; margin: 0; }
.list-clean li { padding: .65rem 0; border-bottom: 1px solid var(--pc-border); }
.list-clean li:last-child { border-bottom: 0; }
.clock-face { font-size: 2.6rem; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }

/* ---------- Auth / landing ---------- */
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.auth-hero { background: radial-gradient(1200px 600px at 0% 0%, #0e7c86 0%, #0b2545 55%, #071a33 100%); color: #e0e7ff; padding: 3.5rem; display: flex; flex-direction: column; justify-content: space-between; }
.auth-hero h2 { font-size: 2.2rem; font-weight: 750; color: #fff; letter-spacing: -.02em; }
.auth-hero ul { list-style: none; padding: 0; }
.auth-hero li { padding: .35rem 0; }
.auth-hero li i { color: #34d399; margin-right: .5rem; }
.auth-panel { display: grid; place-items: center; padding: 2rem; background: var(--pc-surface); }
.auth-panel > div { width: 100%; max-width: 420px; }
@media (max-width: 991.98px) { .auth-wrap { grid-template-columns: 1fr; } .auth-hero { display: none; } }

/* ---------- Pay stub ---------- */
.stub { background: #fff; color: #111; border-radius: 12px; padding: 2rem; border: 1px solid var(--pc-border); }
.stub h4 { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: #6b7280; margin: 1.2rem 0 .4rem; }
.stub table { width: 100%; font-size: .85rem; }
.stub th { font-weight: 600; color: #6b7280; font-size: .72rem; text-transform: uppercase; border-bottom: 1px solid #e5e7eb; padding: .35rem .25rem; }
.stub td { padding: .32rem .25rem; border-bottom: 1px dashed #eef0f4; }
.stub .num { text-align: right; font-variant-numeric: tabular-nums; }
.stub .net { background: #e6f6f5; border-radius: 10px; padding: 1rem 1.25rem; display: flex; justify-content: space-between; align-items: center; }
.stub .net .amt { font-size: 1.6rem; font-weight: 800; color: #0b2545; }

@media print {
    .app-sidebar, .app-topbar, .no-print, .toast-stack, #blazor-error-ui { display: none !important; }
    .app-content { padding: 0 !important; max-width: none; }
    body, html { background: #fff !important; }
    .stub { border: 0; padding: 0; }
    .pc-card, .card { box-shadow: none; }
}

/* ---------- Blazor defaults ---------- */
#blazor-error-ui { color-scheme: light only; background: lightyellow; bottom: 0; box-shadow: 0 -1px 2px rgba(0,0,0,.2); box-sizing: border-box; display: none; left: 0; padding: .6rem 1.25rem .7rem 1.25rem; position: fixed; width: 100%; z-index: 1000; }
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: .75rem; top: .5rem; }
.blazor-error-boundary { background: #b32121; padding: 1rem; color: white; border-radius: 10px; }
.blazor-error-boundary::after { content: "An error has occurred." }

/* ---------- WageHarbor brand ---------- */
.app-brand img.logo { width: 36px; height: 36px; border-radius: 10px; background: none; }
.brand-accent { color: #5eead4; }
.auth-hero li i { color: #5eead4; }
[data-bs-theme=dark] .btn-primary { color: #0b2545; }

/* ---------- Help guides ---------- */
.guide-card { padding: 1.5rem; transition: transform .12s, box-shadow .12s; }
.guide-card:hover { transform: translateY(-2px); box-shadow: 0 6px 24px rgba(16, 24, 40, .1); }
.guide-card .icon { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; font-size: 1.4rem; margin-bottom: .9rem; }
.guide-card h2 { font-size: 1.15rem; margin-bottom: .4rem; }
.guide { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 2rem; align-items: start; }
.guide-toc { position: sticky; top: 80px; display: flex; flex-direction: column; gap: .15rem; font-size: .85rem; }
.guide-toc-title { font-size: .7rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--pc-muted); margin-bottom: .4rem; }
.guide-toc a { color: var(--pc-muted); padding: .3rem .6rem; border-radius: 8px; border-left: 2px solid transparent; }
.guide-toc a:hover { color: var(--pc-text); background: var(--pc-surface); border-left-color: var(--pc-primary); }
.guide-body { max-width: 860px; }
.guide-step { background: var(--pc-surface); border: 1px solid var(--pc-border); border-radius: var(--pc-radius); box-shadow: var(--pc-shadow); padding: 1.5rem 1.75rem; margin-bottom: 1.25rem; scroll-margin-top: 80px; }
.guide-step h2 { display: flex; align-items: center; gap: .7rem; font-size: 1.2rem; font-weight: 700; margin-bottom: .9rem; }
.guide-step h2 .num { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0; background: var(--pc-primary-soft); color: var(--pc-primary); font-size: .95rem; }
.guide-step p, .guide-step li { line-height: 1.65; }
.guide-step ul, .guide-step ol { padding-left: 1.25rem; }
.guide-step li { margin-bottom: .3rem; }
.badge-optional { font-size: .68rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--pc-muted); border: 1px solid var(--pc-border); border-radius: 999px; padding: .1rem .5rem; }
.guide-shot { margin: 1.1rem 0 .4rem; }
.guide-shot img { width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--pc-border); box-shadow: 0 8px 30px rgba(16, 24, 40, .1); }
.guide-shot figcaption { font-size: .8rem; color: var(--pc-muted); margin-top: .5rem; text-align: center; }
.guide-callout { display: flex; gap: .75rem; padding: .9rem 1.1rem; margin: 0 0 1.25rem; border-radius: 12px; background: var(--pc-primary-soft); color: var(--pc-text); }
.guide-callout i { color: var(--pc-primary); font-size: 1.2rem; }
.guide-step .guide-callout { margin: 1rem 0; }
.guide-faq dt { font-weight: 600; margin-top: .9rem; }
.guide-faq dt:first-child { margin-top: 0; }
.guide-faq dd { color: var(--pc-muted); margin: .2rem 0 0; }
@media (max-width: 991.98px) {
    .guide { grid-template-columns: 1fr; }
    .guide-toc { position: static; flex-direction: row; flex-wrap: wrap; gap: .35rem; }
    .guide-toc-title { width: 100%; }
    .guide-toc a { border: 1px solid var(--pc-border); background: var(--pc-surface); }
    .guide-step { padding: 1.1rem 1.15rem; }
}
@media print {
    .guide { display: block; }
    .guide-step { break-inside: avoid-page; box-shadow: none; }
    .guide-shot img { box-shadow: none; max-height: 420px; object-fit: contain; }
}

/* ---------- Public pages (Help for visitors) ---------- */
.dark-only { display: none !important; }
[data-bs-theme=dark] .dark-only { display: inline-block !important; }
[data-bs-theme=dark] .light-only { display: none !important; }
.public-shell { min-height: 100vh; display: flex; flex-direction: column; overflow-x: clip; }
.public-topbar { position: sticky; top: 0; z-index: 30; height: 64px; display: flex; align-items: center; gap: 1.5rem; padding: 0 1.75rem; background: color-mix(in srgb, var(--pc-surface) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--pc-border); }
.public-brand { display: flex; align-items: center; flex-shrink: 0; }
.public-nav { display: flex; gap: 1.4rem; font-weight: 500; font-size: .92rem; }
.public-nav a, .public-mobile-nav a { color: var(--pc-text); opacity: .8; }
.public-nav a:hover { opacity: 1; color: var(--pc-primary); }
.public-menu-toggle { display: none; }
.public-menu-btn { display: none; font-size: 1.5rem; cursor: pointer; margin: 0 0 0 .25rem; }
.public-mobile-nav { display: none; }
.public-content { flex: 1; width: 100%; max-width: 1240px; margin: 0 auto; padding: 1.75rem; }
.public-footer { border-top: 1px solid var(--pc-border); background: var(--pc-surface); padding: 2.5rem 1.75rem 1.5rem; margin-top: 2rem; }
.public-footer-inner { max-width: 1240px; margin: 0 auto; display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2rem; }
.public-footer h3 { font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--pc-muted); margin-bottom: .75rem; }
.public-footer-inner > div > a { display: block; color: var(--pc-text); opacity: .8; font-size: .9rem; padding: .2rem 0; word-break: break-word; }
.public-footer-inner > div > a:hover { opacity: 1; color: var(--pc-primary); }
.public-footer-brand p { color: var(--pc-muted); font-size: .9rem; margin-top: .75rem; max-width: 320px; }
.public-footer-legal { max-width: 1240px; margin: 2rem auto 0; padding-top: 1.25rem; border-top: 1px solid var(--pc-border); font-size: .8rem; color: var(--pc-muted); }
@media (max-width: 991.98px) {
    .public-nav { display: none; }
    .public-menu-btn { display: inline-block; }
    .public-menu-toggle:checked ~ .public-mobile-nav { display: flex; }
    .public-mobile-nav { position: sticky; top: 64px; z-index: 29; flex-direction: column; background: var(--pc-surface); border-bottom: 1px solid var(--pc-border); padding: .5rem 1.25rem 1rem; }
    .public-mobile-nav a { padding: .6rem 0; border-bottom: 1px solid var(--pc-border); }
    .public-mobile-nav a:last-child { border-bottom: 0; }
    .public-footer-inner { grid-template-columns: 1fr 1fr; }
    .public-footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 575.98px) { .public-topbar { padding: 0 1rem; gap: .75rem; } .public-content { padding: 1rem; } .public-footer { padding: 2rem 1rem 1.25rem; } }
@media print { .public-topbar, .public-footer, .public-mobile-nav { display: none !important; } .public-content { padding: 0; max-width: none; } }
.auth-help-link { color: #5eead4; font-weight: 600; }
.auth-help-link:hover { color: #fff; }

/* ---------- Public home page ---------- */
.full-bleed { width: 100vw; margin-left: calc(50% - 50vw); }
.public-content > .full-bleed:first-child { margin-top: -1.75rem; }
.lp-wrap { max-width: 1240px; margin: 0 auto; padding: 0 1.75rem; }
.lp-hero { background: radial-gradient(1200px 600px at 0% 0%, #0e7c86 0%, #0b2545 55%, #071a33 100%); color: #e0e7ff; padding: 4.5rem 0 4rem; }
.lp-hero-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: 3rem; align-items: center; }
.lp-eyebrow { display: inline-block; font-size: .78rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: #5eead4; background: rgba(94, 234, 212, .12); border: 1px solid rgba(94, 234, 212, .3); border-radius: 999px; padding: .3rem .8rem; margin-bottom: 1.2rem; }
.lp-hero h1 { font-size: clamp(2.3rem, 5vw, 3.6rem); font-weight: 800; letter-spacing: -.03em; line-height: 1.05; color: #fff; margin-bottom: 1.1rem; }
.lp-hero h1 span { color: #5eead4; }
.lp-lead { font-size: 1.15rem; line-height: 1.6; opacity: .85; margin-bottom: 1.75rem; max-width: 540px; }
.lp-hero .btn-primary { background: #2dd4bf; border-color: #2dd4bf; color: #0b2545; font-weight: 700; }
.lp-hero .btn-primary:hover { background: #5eead4; border-color: #5eead4; }
.lp-hero-points { list-style: none; padding: 0; margin: 1.5rem 0 0; display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; font-size: .9rem; opacity: .85; }
.lp-hero-points i { color: #34d399; margin-right: .35rem; }
.lp-hero-shot img, .lp-shot img { width: 100%; height: auto; border-radius: 14px; box-shadow: 0 30px 80px rgba(0, 0, 0, .45); border: 1px solid rgba(255, 255, 255, .12); }
.lp-hero-shot { transform: perspective(1600px) rotateY(-6deg); }
.lp-section { padding: 4.5rem 0 1rem; }
.lp-head { text-align: center; max-width: 640px; margin: 0 auto 2.5rem; }
.lp-head h2, .lp-split h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); font-weight: 800; letter-spacing: -.02em; margin-bottom: .6rem; }
.lp-head p { color: var(--pc-muted); font-size: 1.08rem; }
.lp-features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.lp-feature { background: var(--pc-surface); border: 1px solid var(--pc-border); border-radius: var(--pc-radius); padding: 1.6rem; box-shadow: var(--pc-shadow); }
.lp-feature i { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; font-size: 1.35rem; background: var(--pc-primary-soft); color: var(--pc-primary); margin-bottom: 1rem; }
.lp-feature h3, .lp-steps h3 { font-size: 1.08rem; font-weight: 700; margin-bottom: .45rem; }
.lp-feature p, .lp-steps p { color: var(--pc-muted); margin: 0; line-height: 1.6; }
.lp-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.lp-steps > div { position: relative; padding: 1.6rem; border-radius: var(--pc-radius); background: linear-gradient(180deg, var(--pc-primary-soft), transparent); border: 1px solid var(--pc-border); }
.lp-steps .num { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--pc-primary); color: #fff; font-weight: 800; margin-bottom: 1rem; }
[data-bs-theme=dark] .lp-steps .num { color: #0b2545; }
.lp-mission { margin-top: 4.5rem; background: #0b2545; color: #e0e7ff; padding: 4rem 0; text-align: center; }
.lp-mission .lp-wrap { max-width: 820px; }
.lp-mission-mark { font-size: 5rem; color: #5eead4; opacity: .25; line-height: 1; display: block; }
.lp-mission blockquote { font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.6rem, 3.4vw, 2.4rem); color: #fff; line-height: 1.3; margin: 0 0 .9rem; }
.lp-mission-src { color: #5eead4; font-weight: 600; font-size: .95rem; margin-bottom: 1.5rem; }
.lp-mission p { opacity: .85; font-size: 1.05rem; line-height: 1.7; margin: 0; }
.lp-mission a { color: #5eead4; font-weight: 600; }
.lp-split { display: grid; grid-template-columns: 1fr 1.2fr; gap: 3rem; align-items: center; }
.lp-split-reverse > div:first-child { order: 2; }
.lp-eyebrow-dark { display: inline-block; font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--pc-primary); margin-bottom: .6rem; }
.lp-checks { list-style: none; padding: 0; margin: 1rem 0 1.25rem; }
.lp-checks li { display: flex; gap: .65rem; padding: .4rem 0; line-height: 1.5; }
.lp-checks i { color: var(--pc-primary); font-size: 1.1rem; }
.lp-shot img { box-shadow: 0 20px 60px rgba(16, 24, 40, .18); border-color: var(--pc-border); }
.lp-price { max-width: 420px; margin: 0 auto; text-align: center; background: var(--pc-surface); border: 2px solid var(--pc-primary); border-radius: 20px; padding: 2.25rem 2rem; box-shadow: 0 20px 50px rgba(14, 124, 134, .15); }
.lp-price-tag { font-size: 3.6rem; font-weight: 800; letter-spacing: -.03em; line-height: 1; }
.lp-price-tag span { font-size: 1rem; font-weight: 500; color: var(--pc-muted); }
.lp-faq { max-width: 760px; margin: 0 auto; }
.lp-faq details { background: var(--pc-surface); border: 1px solid var(--pc-border); border-radius: 12px; padding: 1rem 1.25rem; margin-bottom: .75rem; }
.lp-faq summary { font-weight: 600; cursor: pointer; }
.lp-faq details p { color: var(--pc-muted); margin: .75rem 0 0; line-height: 1.6; }
.lp-cta { margin-top: 4rem; margin-bottom: -4rem; background: linear-gradient(120deg, #0e7c86, #0b2545); color: #fff; padding: 3.5rem 0; }
.lp-cta h2 { font-weight: 800; letter-spacing: -.02em; }
.lp-cta p { opacity: .85; margin-bottom: 1.5rem; }
.lp-cta .btn-light { color: #0b2545; font-weight: 700; }
@media (max-width: 991.98px) {
    .lp-hero { padding: 3rem 0; }
    .lp-hero-grid, .lp-split { grid-template-columns: 1fr; gap: 2rem; }
    .lp-hero-shot { transform: none; }
    .lp-split-reverse > div:first-child { order: 0; }
    .lp-features, .lp-steps { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 575.98px) {
    .public-content > .full-bleed:first-child { margin-top: -1rem; }
    .lp-wrap { padding: 0 1rem; }
    .lp-features, .lp-steps { grid-template-columns: 1fr; }
    .lp-section { padding-top: 3rem; }
}

/* ---------- Public content pages (about, security, legal, articles) ---------- */
.prose { max-width: 780px; margin: 0 auto; font-size: 1.02rem; line-height: 1.75; }
.prose h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); font-weight: 800; letter-spacing: -.02em; margin-bottom: .5rem; }
.prose .prose-sub { color: var(--pc-muted); font-size: 1.1rem; margin-bottom: 2rem; }
.prose h2 { font-size: 1.35rem; font-weight: 700; margin: 2.2rem 0 .7rem; }
.prose h3 { font-size: 1.08rem; font-weight: 700; margin: 1.5rem 0 .5rem; }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose li { margin-bottom: .35rem; }
.prose blockquote { border-left: 4px solid var(--pc-primary); padding: .25rem 0 .25rem 1.1rem; margin: 1.5rem 0; font-family: Georgia, "Times New Roman", serif; font-size: 1.3rem; }
.prose .prose-meta { font-size: .85rem; color: var(--pc-muted); }
.prose .prose-cta { margin-top: 2.5rem; padding: 1.5rem; border-radius: var(--pc-radius); background: var(--pc-primary-soft); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; }
.prose .prose-cta p { margin: 0; font-weight: 600; }
.prose .prose-note { font-size: .9rem; color: var(--pc-muted); border-top: 1px solid var(--pc-border); margin-top: 2.5rem; padding-top: 1rem; }
.article-list { max-width: 780px; margin: 0 auto; display: grid; gap: 1rem; }
.article-list a { display: block; padding: 1.4rem 1.5rem; background: var(--pc-surface); border: 1px solid var(--pc-border); border-radius: var(--pc-radius); color: var(--pc-text); box-shadow: var(--pc-shadow); }
.article-list a:hover { border-color: var(--pc-primary); }
.article-list h2 { font-size: 1.15rem; font-weight: 700; margin-bottom: .35rem; }
.article-list p { color: var(--pc-muted); margin: 0; }

/* ---------- Error log & messages ---------- */
.error-details { font-size: .78rem; background: var(--pc-surface-2); border: 1px solid var(--pc-border); border-radius: 10px; padding: .75rem; margin-top: .5rem; max-height: 320px; overflow: auto; white-space: pre-wrap; word-break: break-word; }
.case-notes { list-style: none; padding: 0; margin: 0 0 .5rem; border-left: 2px solid var(--pc-border); }
.case-notes li { position: relative; padding: .35rem 0 .6rem 1rem; }
.case-notes li::before { content: ""; position: absolute; left: -6px; top: .65rem; width: 10px; height: 10px; border-radius: 50%; background: var(--pc-primary); }
.contact-message-body { white-space: pre-line; background: var(--pc-surface-2); border-radius: 10px; padding: .9rem 1rem; }
.contact-grid { display: grid; grid-template-columns: 1fr 1.25fr; gap: 3rem; align-items: start; max-width: 1100px; margin: 1rem auto; }
.contact-card { padding: 1.75rem; }
.contact-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.contact-done { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 1rem; font-size: 2rem; background: var(--pc-success-soft); color: var(--pc-success); }
@media (max-width: 991.98px) { .contact-grid { grid-template-columns: 1fr; gap: 1.5rem; } }

.lp-trust { display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem .9rem; margin: -.25rem 0 .5rem; font-size: .85rem; font-weight: 600; color: var(--pc-text); }
.lp-trust i { color: var(--pc-primary); margin-right: .3rem; }
