/* =========================================================
   CareCycle IVF Management — Design System
   Palette:  #B85C6B rose · #8B3F4D rose-dark · #2F6F62 teal (hope/positive)
             #22201E ink · #FBF6F2 canvas · #FFFFFF panel
             #C97A28 amber (pending) · #B0463A critical
   Type:     Newsreader (display) · Inter (UI/body) · IBM Plex Mono (data)
   Signature: the stage tracker — a treatment journey rendered as steps
   ========================================================= */

:root {
    --rose: #B85C6B;
    --rose-dark: #8B3F4D;
    --rose-soft: #F3E1E1;
    --teal: #2F6F62;
    --teal-soft: #DEEFEA;
    --ink: #22201E;
    --ink-soft: #6B625F;
    --canvas: #FBF6F2;
    --panel: #FFFFFF;
    --border: #EDE2DD;
    --healthy: #2F6F62;
    --healthy-soft: #DEEFEA;
    --low: #C97A28;
    --low-soft: #FBEBD8;
    --critical: #B0463A;
    --critical-soft: #F6DEDA;
    --neutral-soft: #E9E4DE;
    --neutral: #6B625F;
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 22px;
    --shadow-card: 0 1px 2px rgba(34,32,30,0.04), 0 8px 24px -12px rgba(184,92,107,0.18);
    --font-display: 'Newsreader', Georgia, serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'IBM Plex Mono', 'Courier New', monospace;
}

* { box-sizing: border-box; }
html { -webkit-font-smoothing: antialiased; }

body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--ink);
    background: var(--canvas);
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--rose); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
    * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ---------- Brand ---------- */
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark {
    display: grid; place-items: center;
    width: 34px; height: 34px;
    border-radius: 10px;
    background: var(--rose);
    color: #fff;
}
.brand-name {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 17px;
    line-height: 1.1;
    display: flex; flex-direction: column;
}
.brand-name em { font-style: normal; font-size: 11px; font-weight: 500; color: var(--ink-soft); letter-spacing: .03em; text-transform: uppercase; }
.brand-lg .brand-mark { width: 44px; height: 44px; border-radius: 12px; }
.brand-lg .brand-name { font-size: 21px; }

/* =========================================================
   APP SHELL
   ========================================================= */
.app-shell { display: flex; min-height: 100vh; }

.sidebar {
    width: 264px;
    flex-shrink: 0;
    background: var(--ink);
    color: #fff;
    display: flex;
    flex-direction: column;
    padding: 24px 18px;
    position: sticky;
    top: 0;
    height: 100vh;
}
.sidebar .brand-name { color: #fff; }
.sidebar .brand-mark { background: var(--rose); }

.nav { margin-top: 36px; display: flex; flex-direction: column; gap: 2px; }
.nav-label {
    font-size: 11px; text-transform: uppercase; letter-spacing: .08em;
    color: rgba(255,255,255,0.4);
    margin: 18px 10px 8px;
}
.nav-label:first-child { margin-top: 0; }
.nav-link {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    color: rgba(255,255,255,0.78);
    font-size: 14px;
    font-weight: 500;
    transition: background .15s ease, color .15s ease;
}
.nav-link svg { flex-shrink: 0; opacity: .85; }
.nav-link:hover { background: rgba(255,255,255,0.06); color: #fff; }
.nav-link.active { background: var(--rose); color: #fff; }

.sidebar-foot { margin-top: auto; }
.hospital-card {
    background: rgba(184,92,107,0.18);
    border: 1px solid rgba(184,92,107,0.4);
    border-radius: var(--radius-md);
    padding: 14px;
}
.hospital-card strong { display: block; font-size: 12px; color: rgba(255,255,255,0.6); font-weight: 500; margin-bottom: 4px; }
.hospital-card p { margin: 0; font-family: var(--font-display); font-size: 15px; color: #fff; }

.app-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 20px 32px;
    background: var(--panel);
    border-bottom: 1px solid var(--border);
    position: sticky; top: 0; z-index: 20;
}
.topbar-title h1 { font-family: var(--font-display); font-size: 24px; font-weight: 600; margin: 0; }
.topbar-hospital { font-size: 12.5px; color: var(--ink-soft); }
.topbar-user { display: flex; align-items: center; gap: 14px; }
.user-chip { display: flex; align-items: center; gap: 10px; }
.user-avatar {
    width: 36px; height: 36px; border-radius: 50%;
    background: var(--rose-soft); color: var(--rose-dark);
    display: grid; place-items: center;
    font-weight: 700; font-family: var(--font-display);
}
.user-meta { display: flex; flex-direction: column; line-height: 1.2; }
.user-meta strong { font-size: 13px; }
.user-meta small { color: var(--ink-soft); font-size: 11px; }

.content { padding: 28px 32px 60px; display: flex; flex-direction: column; gap: 24px; }

/* =========================================================
   ALERTS
   ========================================================= */
.alert { padding: 12px 16px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 500; }
.alert-success { background: var(--healthy-soft); color: var(--healthy); border: 1px solid #c6e0d8; }
.alert-error { background: var(--critical-soft); color: var(--critical); border: 1px solid #edc3bb; }

/* =========================================================
   KPI ROW
   ========================================================= */
.kpi-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.kpi-card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px 22px;
    box-shadow: var(--shadow-card);
    display: flex; flex-direction: column; gap: 6px;
}
.kpi-label { font-size: 12.5px; color: var(--ink-soft); font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.kpi-value { font-family: var(--font-display); font-size: 34px; font-weight: 600; }
.kpi-foot { font-size: 12.5px; color: var(--ink-soft); }
.kpi-card-alert { background: var(--rose); border-color: var(--rose); }
.kpi-card-alert .kpi-label, .kpi-card-alert .kpi-foot { color: rgba(255,255,255,0.75); }
.kpi-card-alert .kpi-value { color: #fff; }

/* =========================================================
   PANELS / TABLES
   ========================================================= */
.panel {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 22px 24px 8px;
    box-shadow: var(--shadow-card);
}
.panel-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 16px; flex-wrap: wrap; gap: 8px; }
.panel-head h2 { font-family: var(--font-display); font-size: 19px; font-weight: 600; margin: 0; display: flex; align-items: center; gap: 10px; }
.panel-head-row { align-items: center; }
.link-cta { font-size: 13px; font-weight: 600; color: var(--rose); }
.count-pill {
    background: var(--rose-soft); color: var(--rose-dark);
    font-family: var(--font-mono); font-size: 12px; font-weight: 700;
    padding: 2px 9px; border-radius: 999px;
}

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }

.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.data-table th {
    text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em;
    color: var(--ink-soft); font-weight: 600;
    padding: 10px 12px; border-bottom: 1px solid var(--border);
}
.data-table td { padding: 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.data-table tr:last-child td { border-bottom: none; }
.empty-row { text-align: center; color: var(--ink-soft); padding: 24px; }

.chip {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 3px 10px; border-radius: 999px;
    background: var(--rose-soft); color: var(--rose-dark);
    font-size: 12.5px; font-weight: 600;
}
.chip-mono { font-family: var(--font-mono); }
.chip-lg { font-size: 15px; padding: 5px 14px; }

.badge { display: inline-flex; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--neutral-soft); color: var(--neutral); }
.badge-healthy { background: var(--healthy-soft); color: var(--healthy); }
.badge-critical { background: var(--critical-soft); color: var(--critical); }

/* Appointment / invoice status badges */
.badge-status-scheduled { background: #E3EAF6; color: #2E5596; }
.badge-status-completed { background: var(--healthy-soft); color: var(--healthy); }
.badge-status-cancelled { background: var(--critical-soft); color: var(--critical); }
.badge-status-noshow { background: var(--low-soft); color: var(--low); }
.badge-status-unpaid { background: var(--critical-soft); color: var(--critical); }
.badge-status-partiallypaid { background: var(--low-soft); color: var(--low); }
.badge-status-paid { background: var(--healthy-soft); color: var(--healthy); }

/* Cycle stage badges (patient detail view) */
.badge-status-stimulation { background: #EAE3F5; color: #6A4EA0; }
.badge-status-eggretrieval { background: #FDEBD3; color: #B0701C; }
.badge-status-fertilization { background: #FCE4EC; color: #A34D6B; }
.badge-status-embryotransfer { background: #E0ECFB; color: #2E6DA4; }
.badge-status-pregnancytest { background: #FFF3D6; color: #9A7418; }

/* Cycle result badges */
.badge-result-ongoing { background: #E3EAF6; color: #2E5596; }
.badge-result-positive { background: var(--healthy-soft); color: var(--healthy); }
.badge-result-negative { background: var(--critical-soft); color: var(--critical); }
.badge-result-cancelled { background: var(--neutral-soft); color: var(--neutral); }

.row-actions { text-align: right; white-space: nowrap; }
.icon-btn {
    background: transparent; border: 1px solid var(--border); border-radius: 8px;
    width: 28px; height: 28px; color: var(--ink-soft);
    display: inline-grid; place-items: center; font-size: 14px;
    transition: all .15s ease;
}
.icon-btn:hover { color: var(--rose); border-color: var(--rose); }

/* =========================================================
   SIGNATURE ELEMENT — STAGE TRACKER
   (the treatment journey rendered as connected steps)
   ========================================================= */
.journey-list { display: flex; flex-direction: column; gap: 18px; padding-bottom: 8px; }
.journey-card, .cycle-card {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px 18px;
    background: var(--canvas);
}
.journey-meta, .cycle-card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.journey-meta strong, .cycle-card-head strong { font-family: var(--font-display); font-size: 16px; }
.journey-sub { display: block; font-size: 12px; color: var(--ink-soft); margin-top: 2px; }

.stage-tracker { display: flex; align-items: flex-start; }
.stage-step { display: flex; flex-direction: column; align-items: center; gap: 6px; flex: 0 0 auto; width: 92px; }
.stage-dot {
    width: 14px; height: 14px; border-radius: 50%;
    background: var(--panel); border: 2px solid var(--border);
}
.stage-step.is-done .stage-dot { background: var(--teal); border-color: var(--teal); }
.stage-step.is-current .stage-dot { background: var(--rose); border-color: var(--rose); box-shadow: 0 0 0 4px var(--rose-soft); }
.stage-label { font-size: 11px; text-align: center; color: var(--ink-soft); line-height: 1.25; }
.stage-step.is-current .stage-label { color: var(--ink); font-weight: 600; }
.stage-step.is-done .stage-label { color: var(--teal); }
.stage-connector { flex: 1 1 auto; height: 2px; background: var(--border); margin-top: 6px; }
.stage-connector.is-done { background: var(--teal); }

.cycle-list { display: flex; flex-direction: column; gap: 16px; padding-bottom: 8px; }
.cycle-update-form { display: flex; align-items: flex-end; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.cycle-update-form label { display: flex; flex-direction: column; gap: 4px; font-size: 11.5px; color: var(--ink-soft); font-weight: 600; }
.cycle-update-form select { padding: 7px 10px; border-radius: 8px; border: 1px solid var(--border); font-size: 13px; font-family: inherit; background: #fff; }

/* Patient detail view */
.detail-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; font-size: 13.5px; }
.detail-grid > div { display: flex; flex-direction: column; gap: 4px; }
.detail-wide { grid-column: 1 / -1; }
.detail-label { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-soft); font-weight: 600; }

/* =========================================================
   FORMS / BUTTONS
   ========================================================= */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    gap: 6px; padding: 10px 18px; border-radius: var(--radius-sm);
    font-size: 14px; font-weight: 600; border: 1px solid transparent;
    transition: all .15s ease;
}
.btn-primary { background: var(--rose); color: #fff; }
.btn-primary:hover { background: var(--rose-dark); }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--ink); }
.btn-ghost:hover { border-color: var(--rose); color: var(--rose); }
.btn-sm { padding: 7px 14px; font-size: 13px; }
.btn-block { width: 100%; }

.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink-soft); }
.field input, .field select, .field textarea {
    font: inherit; font-family: var(--font-body); font-size: 14px; font-weight: 500; color: var(--ink);
    padding: 10px 12px; border-radius: var(--radius-sm); border: 1px solid var(--border);
    background: var(--canvas); resize: vertical;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--rose); background: #fff; }
.field-wide { grid-column: span 2; }

.filter-bar { display: flex; gap: 10px; margin-bottom: 18px; flex-wrap: wrap; }
.filter-bar input, .filter-bar select {
    padding: 9px 12px; border-radius: var(--radius-sm); border: 1px solid var(--border);
    font-size: 13.5px; background: var(--canvas); font-family: inherit;
}
.filter-bar input { flex: 1; min-width: 200px; }

.inline-form { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mini-input { width: 90px; padding: 6px 8px; border-radius: 6px; border: 1px solid var(--border); font-family: var(--font-mono); }
.mini-select { padding: 6px 8px; border-radius: 6px; border: 1px solid var(--border); font-size: 13px; font-family: inherit; }

/* =========================================================
   MODAL
   ========================================================= */
.modal-backdrop {
    display: none;
    position: fixed; inset: 0; z-index: 100;
    background: rgba(34,32,30,0.5);
    align-items: center; justify-content: center;
    padding: 20px;
}
.modal-backdrop.is-open { display: flex; }
.modal {
    background: #fff; border-radius: var(--radius-lg);
    width: 100%; max-width: 620px;
    max-height: 88vh; overflow-y: auto;
    padding: 24px 26px 22px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.25);
}
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.modal-head h3 { font-family: var(--font-display); font-size: 19px; margin: 0; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }

/* =========================================================
   AUTH / LOGIN PAGE
   ========================================================= */
.auth-body { background: var(--ink); }
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-panel {
    background: var(--canvas);
    display: flex; flex-direction: column; justify-content: center;
    padding: 60px 80px;
}
.auth-title { font-family: var(--font-display); font-size: 34px; font-weight: 600; margin: 26px 0 6px; }
.auth-sub { color: var(--ink-soft); margin: 0 0 22px; font-size: 14.5px; }
.auth-form { display: flex; flex-direction: column; gap: 16px; margin-top: 6px; }
.auth-hint { margin-top: 14px; font-size: 12.5px; color: var(--ink-soft); }
.auth-hint code { background: var(--rose-soft); color: var(--rose-dark); padding: 1px 6px; border-radius: 4px; font-family: var(--font-mono); }

.auth-side {
    position: relative;
    background: radial-gradient(120% 140% at 15% 10%, #C97185 0%, var(--rose) 45%, var(--rose-dark) 100%);
    display: flex; flex-direction: column; justify-content: flex-end;
    padding: 60px;
    overflow: hidden;
}
.auth-side-copy { position: relative; z-index: 2; color: #fff; max-width: 420px; }
.auth-side .eyebrow { text-transform: uppercase; letter-spacing: .1em; font-size: 12px; opacity: .75; margin-bottom: 10px; }
.auth-side h2 { font-family: var(--font-display); font-size: 30px; line-height: 1.25; font-weight: 500; margin: 0; }

.drop-field { position: absolute; inset: 0; }
.ring { position: absolute; border-radius: 50%; border: 1.5px solid rgba(255,255,255,0.14); }
.r1 { width: 340px; height: 340px; top: -100px; right: -80px; }
.r2 { width: 220px; height: 220px; top: 60px; right: 40px; border-color: rgba(255,255,255,0.1); }
.r3 { width: 120px; height: 120px; top: 160px; right: 140px; border-color: rgba(255,255,255,0.18); }

/* =========================================================
   INVOICE / PRINTABLE DOCUMENTS
   ========================================================= */
.invoice-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; }
.invoice-actions-note { font-size: 12.5px; color: var(--ink-soft); margin: 0 0 8px; }

.invoice-sheet {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 40px 44px;
    box-shadow: var(--shadow-card);
}
.invoice-head { display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 2px solid var(--ink); padding-bottom: 20px; margin-bottom: 24px; }
.invoice-hospital-name { font-family: var(--font-display); font-size: 24px; margin: 0 0 6px; }
.invoice-hospital-meta { font-size: 13px; color: var(--ink-soft); line-height: 1.6; margin: 0; }
.invoice-id-block { text-align: right; display: flex; flex-direction: column; gap: 2px; }
.invoice-number { font-family: var(--font-mono); font-size: 20px; font-weight: 700; color: var(--rose-dark); }
.invoice-date { font-size: 13px; color: var(--ink-soft); }
.invoice-label { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-soft); font-weight: 600; }
.invoice-parties { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 28px; font-size: 13.5px; line-height: 1.6; }
.invoice-table { width: 100%; border-collapse: collapse; font-size: 14px; margin-bottom: 22px; }
.invoice-table th { text-align: left; padding: 10px 4px; border-bottom: 2px solid var(--ink); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.invoice-table td { padding: 10px 4px; border-bottom: 1px solid var(--border); }
.invoice-table th:last-child, .invoice-table td:last-child { text-align: right; }
.invoice-table tfoot td { border-bottom: none; font-weight: 600; padding-top: 6px; }
.invoice-balance-row td { font-size: 16px; font-family: var(--font-display); border-top: 2px solid var(--ink); padding-top: 12px; color: var(--rose-dark); }
.invoice-table-compact { font-size: 12.5px; }
.invoice-payments { margin-bottom: 20px; }
.invoice-footer-note { text-align: center; color: var(--ink-soft); font-size: 13px; font-style: italic; margin-top: 20px; }

/* Patient report document specifics */
.report-title-heading { font-family: var(--font-display); font-size: 19px; margin: 0 0 12px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.report-content { font-size: 14.5px; line-height: 1.75; color: var(--ink); margin-bottom: 30px; white-space: pre-wrap; }
.invoice-signature-row { display: flex; justify-content: space-between; align-items: flex-end; margin-top: 40px; padding-top: 16px; border-top: 1px solid var(--border); }
.invoice-signature-line { width: 220px; text-align: right; border-top: 1px solid var(--ink); padding-top: 4px; }

/* Patient reports list */
.report-card-list { display: flex; flex-direction: column; gap: 14px; padding-bottom: 8px; }
.report-row-card {
    display: flex; justify-content: space-between; align-items: flex-start; gap: 16px;
    border: 1px solid var(--border); border-radius: var(--radius-md);
    padding: 16px 18px; background: var(--canvas);
}
.report-row-main { flex: 1; min-width: 0; }
.report-row-head { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; flex-wrap: wrap; }
.report-row-head strong { font-family: var(--font-display); font-size: 16px; }
.report-row-excerpt { font-size: 13px; color: var(--ink-soft); margin: 8px 0 0; line-height: 1.5; }
.report-row-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; flex-wrap: wrap; }

@media print {
    .sidebar, .topbar, .invoice-actions, .invoice-actions-note, .alert, .btn { display: none !important; }
    .app-shell, .app-main, .content { display: block !important; padding: 0 !important; margin: 0 !important; }
    body { background: #fff !important; }
    .invoice-sheet, .panel { box-shadow: none !important; border: none !important; }
    .two-col { display: block !important; }
    .two-col .panel { margin-bottom: 20px; page-break-inside: avoid; }
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1180px) {
    .kpi-row { grid-template-columns: repeat(2, 1fr); }
    .two-col { grid-template-columns: 1fr; }
    .detail-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
    .auth-wrap { grid-template-columns: 1fr; }
    .auth-side { display: none; }
    .auth-panel { padding: 40px 28px; }
}
@media (max-width: 860px) {
    .sidebar { position: fixed; left: -280px; z-index: 40; transition: left .2s ease; }
    .sidebar.is-open { left: 0; }
    .app-main { width: 100%; }
    .content { padding: 20px; }
    .topbar { padding: 16px 20px; }
    .form-grid { grid-template-columns: 1fr; }
    .field-wide { grid-column: span 1; }
    .stage-step { width: 70px; }
    .detail-grid { grid-template-columns: 1fr; }
}

/* =========================================================
   RSSD additions: Help drawer, subscription banner, table filters
   ========================================================= */
.btn-help { display: inline-flex; align-items: center; gap: 6px; background: var(--teal-soft); color: var(--teal); border: 1px solid transparent; border-radius: 999px; }
.btn-help:hover { border-color: var(--teal); }
.btn-help.pulse { animation: helpPulse 1.6s ease-out 3; }
@keyframes helpPulse { 0% { box-shadow: 0 0 0 0 rgba(47,111,98,.5); } 100% { box-shadow: 0 0 0 12px rgba(47,111,98,0); } }
.help-backdrop { position: fixed; inset: 0; background: rgba(34,32,30,.35); opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 90; }
.help-drawer { position: fixed; top: 0; right: 0; height: 100%; width: min(400px, 100%); background: var(--panel); z-index: 91; transform: translateX(100%); transition: transform .25s ease; display: flex; flex-direction: column; box-shadow: -12px 0 40px -20px rgba(0,0,0,.35); border-left: 4px solid var(--teal); }
body.help-open .help-drawer { transform: none; }
body.help-open .help-backdrop { opacity: 1; pointer-events: auto; }
.help-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--border); }
.help-head h2 { font-family: var(--font-display); font-size: 22px; margin: 0; }
.help-eyebrow { margin: 0 0 2px; font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--rose); font-weight: 700; }
.help-body { padding: 18px 20px; overflow-y: auto; font-size: 14px; color: var(--ink-soft); }
.help-steps { list-style: none; counter-reset: s; padding: 0; margin: 14px 0; }
.help-steps li { counter-increment: s; position: relative; padding: 0 0 14px 38px; }
.help-steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 26px; height: 26px; border-radius: 50%; background: var(--teal); color: #fff; font-weight: 700; font-size: 13px; display: grid; place-items: center; }
.help-steps b { display: block; color: var(--ink); }
.help-tips { background: var(--teal-soft); color: var(--ink); border-radius: var(--radius-sm); padding: 12px 12px 12px 30px; margin: 0 0 14px; }
.help-support { font-size: 13px; border-top: 1px solid var(--border); padding-top: 12px; }
.help-support a { color: var(--teal); font-weight: 600; }
.sub-banner { padding: 11px 14px; border-radius: var(--radius-sm); margin-bottom: 16px; font-weight: 500; border: 1px solid; }
.sub-banner a { font-weight: 700; text-decoration: underline; }
.sub-banner-bad { background: var(--critical-soft); border-color: var(--critical); color: #7A2A21; }
.sub-banner-warn { background: var(--low-soft); border-color: var(--low); color: #6B3D00; }
.plan-pill { display: inline-block; margin-top: 6px; padding: 2px 8px; border-radius: 999px; background: var(--teal-soft); color: var(--teal); font-weight: 600; font-size: 11px; }
.table-filter { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding: 10px 18px; border-bottom: 1px solid var(--border); background: #FFFCFA; }
.table-filter input, .table-filter select { height: 34px; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 0 10px; font: 13.5px var(--font-body); background: #fff; }
.table-filter input { flex: 1; min-width: 180px; }
.table-filter .tf-count { font-size: 12.5px; color: var(--ink-soft); margin-left: auto; }
.sub-hero { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1px; background: var(--border); border-radius: var(--radius-md); overflow: hidden; margin-bottom: 18px; }
.sub-hero > div { background: var(--panel); padding: 16px 18px; }
.sub-hero small { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-soft); font-weight: 700; }
.sub-hero b { font-size: 18px; }
.mod-list { display: flex; flex-wrap: wrap; gap: 6px; padding: 16px 18px; }
.mod-chip { padding: 4px 10px; border-radius: 999px; background: var(--teal-soft); color: var(--teal); font-size: 12.5px; font-weight: 600; }
.mod-chip.off { background: var(--neutral-soft); color: var(--neutral); text-decoration: line-through; }
.help-drawer { visibility: hidden; transition: transform .25s ease, visibility 0s linear .25s; }
body.help-open .help-drawer { visibility: visible; transition: transform .25s ease, visibility 0s; }
