:root {
    --bg-0: #020617;
    --bg-1: #061226;
    --bg-2: #0b1730;
    --panel: rgba(10, 18, 37, 0.88);
    --panel-strong: rgba(6, 13, 28, 0.96);
    --panel-soft: rgba(15, 23, 42, 0.72);
    --line: rgba(148, 163, 184, 0.18);
    --line-strong: rgba(148, 163, 184, 0.3);
    --text: #e5eefc;
    --muted: #9db0cb;
    --muted-soft: #7d8ba3;
    --accent: #5eead4;
    --accent-strong: #2dd4bf;
    --accent-soft: rgba(94, 234, 212, 0.11);
    --accent-glow: rgba(45, 212, 191, 0.22);
    --success: #86efac;
    --warning: #fbbf24;
    --danger: #fca5a5;
    --danger-soft: rgba(252, 165, 165, 0.11);
    --shadow: 0 24px 70px rgba(2, 6, 23, 0.42);
    --radius-xl: 28px;
    --radius-lg: 22px;
    --radius-md: 16px;
    --radius-sm: 12px;
}

* {
    box-sizing: border-box;
}

html {
    color-scheme: dark;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(45, 212, 191, 0.12), transparent 26%),
        radial-gradient(circle at top right, rgba(56, 189, 248, 0.11), transparent 28%),
        linear-gradient(180deg, var(--bg-0) 0%, var(--bg-1) 40%, var(--bg-2) 100%);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    border: 0;
}

code {
    display: inline-flex;
    align-items: center;
    min-height: 1.7rem;
    padding: 0.15rem 0.55rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(8, 15, 30, 0.72);
    color: #d6e8ff;
}

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

.sidebar {
    position: sticky;
    top: 0;
    align-self: start;
    min-height: 100vh;
    padding: 28px 22px;
    display: grid;
    gap: 26px;
    align-content: start;
    background: linear-gradient(180deg, rgba(3, 8, 20, 0.96), rgba(5, 10, 24, 0.92));
    border-right: 1px solid var(--line);
    backdrop-filter: blur(22px);
}

.sidebar h1,
.auth-card h1,
.content h2 {
    margin: 0;
    line-height: 1.05;
}

.sidebar h1 {
    font-size: clamp(2rem, 4vw, 2.7rem);
    letter-spacing: -0.04em;
}

.content {
    min-width: 0;
    padding: 28px;
}

.topbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 22px;
    margin-bottom: 26px;
}

.topbar h2 {
    font-size: clamp(2rem, 3vw, 2.5rem);
    letter-spacing: -0.04em;
}

.topbar-actions,
.button-row,
.action-row,
.checkbox-row,
.inline-cluster {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.user-chip,
.pill,
.status-chip,
.checkbox-pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 42px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(6, 13, 28, 0.86);
    color: #d8f8f3;
}

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

.pill {
    background: linear-gradient(180deg, rgba(94, 234, 212, 0.15), rgba(45, 212, 191, 0.08));
    border-color: rgba(94, 234, 212, 0.22);
    color: #cbfbf5;
    font-weight: 600;
}

.subtle-pill {
    background: rgba(8, 15, 30, 0.78);
    color: var(--muted);
    border-color: var(--line-strong);
}

.nav {
    display: grid;
    gap: 10px;
}

.nav a,
.ghost-button,
.primary-button,
.secondary-button,
.text-link {
    border-radius: 16px;
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 52px;
    padding: 0 16px;
    background: rgba(8, 15, 30, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.16);
    color: #dce9ff;
}

.nav a:hover,
.nav a.active {
    transform: translateY(-1px);
    border-color: rgba(94, 234, 212, 0.26);
    background: linear-gradient(180deg, rgba(94, 234, 212, 0.12), rgba(94, 234, 212, 0.05));
    box-shadow: 0 18px 32px rgba(2, 8, 23, 0.28);
}

.grid {
    display: grid;
    gap: 22px;
}

.cards-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    margin-bottom: 22px;
}

.two-col {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    margin-bottom: 22px;
}

.card,
.panel,
.auth-card,
.feature-card {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    border: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(11, 19, 39, 0.95), rgba(8, 14, 28, 0.92));
    box-shadow: var(--shadow);
}

.card::before,
.panel::before,
.auth-card::before,
.feature-card::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(255,255,255,0.05), transparent 22%);
}

.card,
.panel,
.auth-card {
    padding: 24px;
}

.feature-card {
    padding: 26px;
}

.small {
    font-size: 0.94rem;
}

.card h3,
.feature-card h3 {
    margin: 0;
    font-size: clamp(1.3rem, 2.2vw, 1.7rem);
    letter-spacing: -0.03em;
}

.card-subtitle,
.section-intro,
.muted {
    color: var(--muted);
}

.stat-card h3 {
    font-size: clamp(2rem, 4vw, 2.5rem);
    margin-top: 10px;
}

.label,
.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--accent);
    font-size: 0.76rem;
    font-weight: 700;
}

.section-heading {
    display: grid;
    gap: 8px;
    margin-bottom: 18px;
}

.primary-button,
.secondary-button,
.ghost-button,
.text-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 48px;
    cursor: pointer;
    padding: 0 18px;
    font-size: 0.96rem;
    font-weight: 600;
}

.primary-button {
    color: #04140f;
    background: linear-gradient(180deg, #66f5df, #37ddc5 68%, #2ac2ad 100%);
    box-shadow: 0 14px 26px var(--accent-glow);
}

.secondary-button,
.ghost-button {
    background: rgba(8, 15, 30, 0.72);
    border: 1px solid var(--line);
    color: var(--text);
}

.text-link {
    min-height: auto;
    padding: 0;
    background: transparent;
    color: #ccfbf5;
}

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

.primary-button:hover,
.secondary-button:hover,
.ghost-button:hover,
.text-link:hover {
    transform: translateY(-1px);
}

.flash {
    display: flex;
    align-items: center;
    gap: 12px;
    border-radius: 18px;
    padding: 15px 18px;
    margin-bottom: 20px;
    border: 1px solid;
}

.flash.success {
    background: rgba(134, 239, 172, 0.09);
    border-color: rgba(134, 239, 172, 0.2);
    color: #d7fde5;
}

.flash.error {
    background: rgba(252, 165, 165, 0.09);
    border-color: rgba(252, 165, 165, 0.18);
    color: #fee2e2;
}

.stack-form {
    display: grid;
    gap: 18px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.field,
label {
    display: grid;
    gap: 8px;
}

.field-label,
label span {
    color: #ddf6f2;
    font-size: 0.92rem;
    font-weight: 600;
}

input,
select,
textarea {
    width: 100%;
    min-height: 50px;
    padding: 0 15px;
    color: var(--text);
    border-radius: 15px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: linear-gradient(180deg, rgba(6, 13, 28, 0.96), rgba(8, 15, 30, 0.82));
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.02);
    outline: none;
}

textarea {
    min-height: 132px;
    padding: 14px 15px;
    resize: vertical;
}

input::placeholder,
textarea::placeholder {
    color: var(--muted-soft);
}

input:focus,
select:focus,
textarea:focus {
    border-color: rgba(94, 234, 212, 0.5);
    box-shadow: 0 0 0 4px rgba(94, 234, 212, 0.12);
}

select {
    appearance: none;
    -webkit-appearance: none;
    background-image:
        linear-gradient(45deg, transparent 50%, #a5f3fc 50%),
        linear-gradient(135deg, #a5f3fc 50%, transparent 50%);
    background-position:
        calc(100% - 18px) calc(50% - 3px),
        calc(100% - 12px) calc(50% - 3px);
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
    padding-right: 34px;
}

input[type="date"] {
    padding-right: 14px;
}

input[type="checkbox"] {
    width: 18px;
    height: 18px;
    min-height: auto;
    accent-color: var(--accent-strong);
}

.form-shell {
    display: grid;
    gap: 18px;
}

.form-card {
    padding: 22px;
    border-radius: 22px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    background: linear-gradient(180deg, rgba(8, 15, 30, 0.56), rgba(6, 12, 24, 0.68));
}

.form-card-header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
    align-items: flex-start;
}

.form-card-header p,
.table-head p,
.help-list {
    margin: 0;
}

.helper-copy {
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

.checkbox-row {
    margin-top: 4px;
}

.checkbox-pill {
    min-height: 48px;
    padding: 0 16px;
    background: rgba(8, 15, 30, 0.76);
}

.checkbox-pill span {
    color: #dcfce7;
    font-weight: 600;
}

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

.table-wrap {
    overflow-x: auto;
    border-radius: 20px;
    border: 1px solid rgba(148, 163, 184, 0.12);
    background: rgba(6, 12, 24, 0.52);
}

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

th,
td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
    vertical-align: top;
}

th {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #d0faf3;
    background: rgba(255, 255, 255, 0.01);
}

tr:last-child td {
    border-bottom: 0;
}

.table-note {
    color: var(--muted);
    font-size: 0.88rem;
    margin-top: 6px;
    max-width: 34ch;
}

.status-chip {
    min-height: 34px;
    padding: 0 11px;
    font-size: 0.8rem;
    text-transform: capitalize;
    color: #d4fff7;
    background: rgba(94, 234, 212, 0.12);
    border-color: rgba(94, 234, 212, 0.18);
}

.status-chip.status-paid {
    background: rgba(134, 239, 172, 0.12);
    border-color: rgba(134, 239, 172, 0.18);
    color: #dcfce7;
}

.status-chip.status-paused {
    background: rgba(251, 191, 36, 0.1);
    border-color: rgba(251, 191, 36, 0.18);
    color: #fde68a;
}

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

.checklist {
    padding-left: 1.2rem;
    margin: 16px 0 0;
    color: #dce8fc;
}

.checklist li {
    margin-bottom: 10px;
    line-height: 1.55;
}

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

.auth-card {
    width: min(100%, 1100px);
    padding: 0;
}

.auth-grid {
    display: grid;
    grid-template-columns: minmax(320px, 1.1fr) minmax(320px, 0.9fr);
}

.auth-brand,
.auth-panel {
    padding: 34px;
}

.auth-brand {
    background:
        radial-gradient(circle at top left, rgba(94, 234, 212, 0.18), transparent 30%),
        linear-gradient(180deg, rgba(8, 15, 30, 0.55), rgba(6, 12, 24, 0.2));
    border-right: 1px solid var(--line);
}

.auth-brand h1 {
    font-size: clamp(2.4rem, 5vw, 4rem);
    letter-spacing: -0.06em;
    margin: 10px 0 16px;
}

.auth-panel {
    display: grid;
    gap: 22px;
    align-content: center;
}

.auth-list {
    display: grid;
    gap: 14px;
    margin-top: 24px;
}

.auth-list-item {
    display: grid;
    grid-template-columns: 38px 1fr;
    gap: 14px;
    align-items: start;
}

.auth-list-badge {
    width: 38px;
    height: 38px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: rgba(94, 234, 212, 0.14);
    color: var(--accent);
    font-weight: 700;
}

.auth-form-panel {
    display: grid;
    gap: 18px;
}

.top-note {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 12px;
    min-height: 34px;
    border-radius: 999px;
    background: rgba(94, 234, 212, 0.12);
    border: 1px solid rgba(94, 234, 212, 0.16);
    color: #d8f8f3;
    font-size: 0.84rem;
    font-weight: 600;
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
}

.inline-help {
    color: var(--muted);
    font-size: 0.9rem;
}

.help-list {
    display: grid;
    gap: 10px;
    list-style: none;
    padding: 0;
}

.help-list li {
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(8, 15, 30, 0.62);
    border: 1px solid rgba(148, 163, 184, 0.12);
}

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

.metric-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 14px;
}

.metric-item {
    padding: 16px 18px;
    border-radius: 18px;
    background: rgba(8, 15, 30, 0.64);
    border: 1px solid rgba(148, 163, 184, 0.14);
}

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

.form-hint {
    color: var(--muted-soft);
    font-size: 0.86rem;
    line-height: 1.5;
}



.compact-button {
    min-height: 42px;
    padding-inline: 14px;
}

.dashboard-stack {
    align-items: start;
}

.snapshot-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.snapshot-card {
    padding: 18px;
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(8, 15, 30, 0.64);
}

.snapshot-card strong {
    display: block;
    margin: 10px 0 6px;
    font-size: 1.6rem;
    letter-spacing: -0.04em;
}

.snapshot-card.tone-danger {
    border-color: rgba(252, 165, 165, 0.22);
    background: rgba(127, 29, 29, 0.16);
}

.snapshot-card.tone-success {
    border-color: rgba(134, 239, 172, 0.2);
    background: rgba(20, 83, 45, 0.18);
}

.snapshot-card.tone-accent {
    border-color: rgba(94, 234, 212, 0.22);
    background: rgba(13, 72, 72, 0.18);
}

.metric-strip-dashboard {
    margin-top: 4px;
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 14px;
    margin: 16px 0 20px;
    padding: 18px;
    border-radius: 20px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(8, 15, 30, 0.54);
}

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

.filter-actions .primary-button,
.filter-actions .ghost-button {
    flex: 0 0 auto;
}

.stacked-actions {
    align-items: flex-start;
}

.compact-actions {
    gap: 10px;
}

.urgency-chip {
    min-width: 96px;
    justify-content: center;
}

.urgency-overdue {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(248, 113, 113, 0.24);
    color: #fecaca;
}

.urgency-this-week {
    background: rgba(251, 191, 36, 0.12);
    border-color: rgba(251, 191, 36, 0.22);
    color: #fde68a;
}

.urgency-this-month,
.urgency-soon {
    background: rgba(59, 130, 246, 0.12);
    border-color: rgba(96, 165, 250, 0.22);
    color: #bfdbfe;
}

.urgency-later,
.urgency-no-date,
.urgency-steady {
    background: rgba(148, 163, 184, 0.12);
    border-color: rgba(148, 163, 184, 0.16);
    color: #dbeafe;
}

.urgency-paid {
    background: rgba(134, 239, 172, 0.12);
    border-color: rgba(134, 239, 172, 0.18);
    color: #dcfce7;
}

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

    .sidebar {
        position: static;
        min-height: auto;
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }
}

@media (max-width: 900px) {
    .topbar {
        flex-direction: column;
    }

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

    .auth-brand {
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }
}

@media (max-width: 720px) {
    .content,
    .sidebar,
    .auth-brand,
    .auth-panel,
    .card,
    .panel {
        padding: 20px;
    }

    .form-grid,
    .metric-strip {
        grid-template-columns: 1fr;
    }

    .table-wrap {
        margin-inline: -4px;
    }

    th,
    td {
        padding: 12px;
    }
}


.report-card-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.report-card {
    display: grid;
    gap: 18px;
}

.report-stat-row {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
}

.report-mini-stat {
    padding: 16px;
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(8, 15, 30, 0.52);
}

.report-mini-stat strong {
    display: block;
    margin-top: 8px;
    font-size: 1.2rem;
    letter-spacing: -0.03em;
}

.report-print-body {
    min-height: 100vh;
    color: #0f172a;
    background: linear-gradient(180deg, #f8fbff 0%, #eef4fb 100%);
}

.report-print-shell {
    width: min(1180px, calc(100% - 48px));
    margin: 0 auto;
    padding: 28px 0 56px;
}

.report-toolbar {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-bottom: 20px;
}

.report-header {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-start;
    padding: 28px;
    border-radius: 26px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    background: linear-gradient(180deg, rgba(255,255,255,0.94), rgba(241, 245, 249, 0.96));
    box-shadow: 0 18px 48px rgba(15, 23, 42, 0.08);
    margin-bottom: 22px;
}

.report-header h1 {
    margin: 8px 0 12px;
    font-size: clamp(2.2rem, 5vw, 3.4rem);
    line-height: 1;
    letter-spacing: -0.06em;
    color: #0f172a;
}

.report-subtitle {
    margin: 0;
    max-width: 64ch;
    color: #475569;
    line-height: 1.65;
}

.report-meta .pill {
    background: rgba(255,255,255,0.82);
    color: #0f172a;
    border-color: rgba(148, 163, 184, 0.22);
}

.report-summary-grid .card,
.report-section {
    background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(248, 250, 252, 0.94));
    border-color: rgba(148, 163, 184, 0.2);
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.08);
}

.report-summary-card h3,
.report-section h3,
.report-print-body .label,
.report-print-body .eyebrow,
.report-print-body strong,
.report-print-body th,
.report-print-body td {
    color: #0f172a;
}

.report-print-body .muted,
.report-print-body .section-intro,
.report-print-body .table-note,
.report-print-body .form-hint {
    color: #475569;
}

.report-section {
    margin-bottom: 20px;
}

.report-table-wrap {
    background: rgba(255,255,255,0.92);
    border-color: rgba(148, 163, 184, 0.18);
}

.report-print-body th {
    background: #eef2f7;
    color: #0f172a;
}

.report-print-body td {
    border-bottom-color: rgba(148, 163, 184, 0.16);
}

.compact-table td,
.compact-table th {
    padding-top: 12px;
    padding-bottom: 12px;
}


.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-height: 52px;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
}

.checkbox-label span {
    margin-bottom: 0;
}

@media print {
    :root {
        --text: #0f172a;
        --muted: #475569;
    }

    body.report-print-body {
        background: #fff;
    }

    .no-print {
        display: none !important;
    }

    .report-print-shell {
        width: 100%;
        padding: 0;
    }

    .report-header,
    .report-summary-card,
    .report-section {
        box-shadow: none;
        border-color: #d5dde8;
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .report-section {
        margin-bottom: 14px;
    }

    .report-table-wrap {
        overflow: visible;
    }

    a {
        text-decoration: none;
        color: inherit;
    }
}


.hero-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 22px;
}

.hero-copy {
    display: grid;
    gap: 10px;
    max-width: 760px;
}

.dashboard-anchor-nav,
.quick-actions-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.dashboard-anchor-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(8, 15, 30, 0.72);
    color: var(--muted);
}

.dashboard-anchor-nav a:hover {
    color: var(--text);
    border-color: rgba(94, 234, 212, 0.24);
}

.dashboard-section {
    display: grid;
    gap: 18px;
    margin-top: 28px;
}

.cockpit-grid .cockpit-card {
    min-height: 210px;
}

.tone-success {
    border-color: rgba(134, 239, 172, 0.18);
}

.tone-warning {
    border-color: rgba(251, 191, 36, 0.18);
}

.tone-danger {
    border-color: rgba(252, 165, 165, 0.18);
}

.tone-accent {
    border-color: rgba(94, 234, 212, 0.22);
}

.timeline-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 14px;
}

.timeline-day {
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(8, 15, 30, 0.72);
    padding: 14px;
    display: grid;
    gap: 10px;
}

.timeline-day.is-negative {
    border-color: rgba(252, 165, 165, 0.22);
}

.timeline-day.is-positive {
    border-color: rgba(94, 234, 212, 0.2);
}

.timeline-day-top,
.timeline-amount-row,
.bar-row-meta,
.ladder-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.timeline-day-top span,
.timeline-amount-row span,
.bar-row-meta span,
.ladder-foot span {
    color: var(--muted);
    font-size: 0.92rem;
}

.timeline-note-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.mini-chip {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 0.78rem;
    border: 1px solid var(--line);
    background: rgba(8, 15, 30, 0.72);
}

.mini-chip.success { color: #d8ffee; border-color: rgba(134, 239, 172, 0.22); }
.mini-chip.danger { color: #ffe2e2; border-color: rgba(252, 165, 165, 0.22); }
.mini-chip.neutral { color: var(--muted); }

.bar-list,
.waterfall-list,
.heartbeat-list,
.ladder-list {
    display: grid;
    gap: 16px;
}

.bar-row,
.waterfall-row,
.ladder-item {
    display: grid;
    gap: 10px;
}

.data-bar {
    width: 100%;
    height: 12px;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(148, 163, 184, 0.12);
    border: 1px solid rgba(148, 163, 184, 0.14);
}

.data-bar.large-bar {
    height: 16px;
}

.data-bar span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, rgba(255,255,255,0.16), rgba(255,255,255,0.02)), linear-gradient(90deg, #5eead4, #2dd4bf);
}

.data-bar.tone-success span { background: linear-gradient(90deg, #86efac, #4ade80); }
.data-bar.tone-warning span { background: linear-gradient(90deg, #fcd34d, #f59e0b); }
.data-bar.tone-danger span { background: linear-gradient(90deg, #fda4af, #fb7185); }
.data-bar.tone-neutral span { background: linear-gradient(90deg, #93c5fd, #60a5fa); }
.data-bar.tone-accent span { background: linear-gradient(90deg, #5eead4, #2dd4bf); }

.metric-rail-card {
    display: grid;
    gap: 16px;
}

.metric-rail-meta {
    display: grid;
    gap: 6px;
}

.metric-rail-meta strong {
    font-size: clamp(1.8rem, 4vw, 2.4rem);
}

.compact-metric-strip .metric-item {
    min-width: 180px;
}

.heartbeat-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border-radius: 18px;
    padding: 16px;
    border: 1px solid var(--line);
    background: rgba(8, 15, 30, 0.72);
}

.heartbeat-item strong {
    display: block;
    margin-bottom: 4px;
}

.waterfall-note,
.centered-copy {
    margin: 0;
}

.readiness-card {
    display: grid;
    gap: 18px;
    justify-items: center;
}

.readiness-ring {
    --size: 220px;
    width: var(--size);
    height: var(--size);
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: conic-gradient(var(--accent-strong) 0 var(--progress), rgba(148, 163, 184, 0.12) var(--progress) 100%);
    padding: 18px;
}

.readiness-ring > div {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    display: grid;
    place-items: center;
    text-align: center;
    background: rgba(6, 13, 28, 0.96);
    border: 1px solid var(--line);
}

.readiness-ring strong {
    font-size: clamp(2rem, 4vw, 2.8rem);
}

.readiness-ring span {
    color: var(--muted);
}

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

.radar-card {
    min-height: 180px;
}

.quick-actions-row {
    margin-bottom: 8px;
}

@media (max-width: 980px) {
    .hero-banner {
        flex-direction: column;
        align-items: flex-start;
    }
}


.manual-hero {
    gap: 20px;
}

.manual-anchor-nav {
    max-width: 560px;
}

.manual-principles,
.manual-checklist,
.manual-flow-list {
    display: grid;
    gap: 12px;
}

.manual-bullet,
.manual-flow-item {
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(8, 15, 30, 0.62);
    color: var(--text);
}

.warning-bullet {
    border-color: rgba(251, 191, 36, 0.24);
    background: rgba(251, 191, 36, 0.08);
}

.manual-cadence-grid,
.manual-dashboard-grid,
.manual-layers-grid {
    margin-bottom: 22px;
}

.manual-module-grid {
    display: grid;
    gap: 22px;
}

.manual-module-card {
    display: grid;
    gap: 18px;
}

.manual-module-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.manual-module-body {
    margin-bottom: 0;
}

.manual-feeds {
    margin-top: 0;
}

.manual-chip-wrap {
    gap: 10px;
}

.compact-checklist .manual-bullet {
    padding: 12px 14px;
}

@media print {
    .manual-anchor-nav,
    .quick-actions-row,
    .sidebar,
    .topbar-actions,
    form[action$="logout"] {
        display: none !important;
    }

    .shell {
        display: block;
    }

    .content {
        padding: 0;
    }

    .card,
    .panel,
    .feature-card {
        box-shadow: none;
        break-inside: avoid;
    }
}

/* Step 28: lighter theme + independent navigation scroll */
:root {
    --bg-0: #eaf3ff;
    --bg-1: #f4f8ff;
    --bg-2: #fbfdff;
    --panel: rgba(255, 255, 255, 0.9);
    --panel-strong: rgba(255, 255, 255, 0.96);
    --panel-soft: rgba(246, 250, 255, 0.88);
    --line: rgba(71, 85, 105, 0.16);
    --line-strong: rgba(71, 85, 105, 0.26);
    --text: #122742;
    --muted: #5a6d89;
    --muted-soft: #6f7f98;
    --accent: #0f9e95;
    --accent-strong: #0c8b83;
    --accent-soft: rgba(15, 158, 149, 0.1);
    --accent-glow: rgba(15, 158, 149, 0.16);
    --success: #16a34a;
    --warning: #d97706;
    --danger: #dc2626;
    --danger-soft: rgba(220, 38, 38, 0.08);
    --shadow: 0 18px 50px rgba(64, 98, 142, 0.12);
}

html {
    color-scheme: light;
}

body {
    overflow: hidden;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(14, 165, 233, 0.12), transparent 24%),
        radial-gradient(circle at top right, rgba(45, 212, 191, 0.14), transparent 22%),
        linear-gradient(180deg, #eef5ff 0%, #f7fbff 45%, #fbfdff 100%);
}

.shell {
    height: 100vh;
    overflow: hidden;
    grid-template-columns: 320px minmax(0, 1fr);
}

.sidebar {
    color: #eef7ff;
    height: 100vh;
    overflow: hidden;
    padding: 0;
    background:
        radial-gradient(circle at top left, rgba(94, 234, 212, 0.12), transparent 24%),
        linear-gradient(180deg, rgba(11, 26, 49, 0.98), rgba(18, 39, 66, 0.96));
    border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-scroll {
    min-height: 100%;
    display: grid;
    gap: 24px;
    align-content: start;
    padding: 28px 22px 30px;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
}

.sidebar .eyebrow,
.sidebar h1,
.sidebar p,
.sidebar .muted,
.sidebar .panel p,
.sidebar .panel .eyebrow {
    color: inherit;
}

.sidebar .eyebrow {
    color: #7af0e1;
}

.sidebar .muted,
.sidebar .panel p {
    color: #a8bdd7;
}

.sidebar .panel,
.sidebar-note {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: none;
}

.sidebar .nav a {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.08);
    color: #eef7ff;
}

.sidebar .nav a:hover,
.sidebar .nav a.active {
    background: linear-gradient(180deg, rgba(94, 234, 212, 0.16), rgba(94, 234, 212, 0.08));
    border-color: rgba(94, 234, 212, 0.28);
    box-shadow: 0 14px 30px rgba(7, 15, 27, 0.28);
}

.content {
    height: 100vh;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 28px;
    background: linear-gradient(180deg, rgba(239, 246, 255, 0.86), rgba(249, 252, 255, 0.92));
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 12;
    padding-bottom: 18px;
    margin-bottom: 22px;
    background: linear-gradient(180deg, rgba(244, 248, 255, 0.96), rgba(244, 248, 255, 0.72), rgba(244, 248, 255, 0));
    backdrop-filter: blur(10px);
}

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

.menu-toggle {
    display: none;
    align-items: center;
    gap: 12px;
    min-height: 46px;
    padding: 0 16px;
    border-radius: 999px;
    border: 1px solid rgba(71, 85, 105, 0.16);
    background: rgba(255, 255, 255, 0.82);
    color: var(--text);
    box-shadow: 0 10px 24px rgba(99, 102, 241, 0.08);
    cursor: pointer;
}

.menu-toggle-lines {
    display: inline-grid;
    gap: 4px;
}

.menu-toggle-lines span {
    display: block;
    width: 16px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
}

.mobile-nav-overlay {
    display: none;
}

.card,
.panel,
.auth-card,
.feature-card,
.form-card,
.table-wrap,
.filter-grid,
.snapshot-card,
.metric-item,
.report-mini-stat {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(248, 251, 255, 0.92));
    border-color: rgba(71, 85, 105, 0.12);
    box-shadow: 0 16px 38px rgba(59, 83, 125, 0.09);
}

.card::before,
.panel::before,
.auth-card::before,
.feature-card::before {
    background: linear-gradient(180deg, rgba(255,255,255,0.56), rgba(255,255,255,0.06) 28%, transparent 42%);
}

.user-chip,
.pill,
.status-chip,
.checkbox-pill,
code {
    background: rgba(255, 255, 255, 0.84);
    border-color: rgba(71, 85, 105, 0.14);
    color: var(--text);
}

.pill {
    background: linear-gradient(180deg, rgba(15, 158, 149, 0.14), rgba(15, 158, 149, 0.08));
    color: #0f4e4a;
    border-color: rgba(15, 158, 149, 0.2);
}

.subtle-pill,
.user-chip {
    color: #425269;
}

.primary-button {
    color: #ffffff;
    background: linear-gradient(180deg, #16b9ae, #0f9e95 68%, #0b857d 100%);
    box-shadow: 0 12px 24px rgba(15, 158, 149, 0.22);
}

.secondary-button,
.ghost-button {
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(71, 85, 105, 0.16);
    color: var(--text);
}

.text-link {
    color: #0f766e;
}

.flash.success {
    background: rgba(22, 163, 74, 0.08);
    border-color: rgba(22, 163, 74, 0.14);
    color: #155724;
}

.flash.error {
    background: rgba(220, 38, 38, 0.08);
    border-color: rgba(220, 38, 38, 0.14);
    color: #7f1d1d;
}

.field-label,
label span {
    color: #233850;
}

input,
select,
textarea {
    color: var(--text);
    border-color: rgba(71, 85, 105, 0.18);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(249, 252, 255, 0.94));
}

input::placeholder,
textarea::placeholder {
    color: #7e8ea8;
}

input:focus,
select:focus,
textarea:focus {
    border-color: rgba(15, 158, 149, 0.42);
    box-shadow: 0 0 0 4px rgba(15, 158, 149, 0.12);
}

select {
    background-image:
        linear-gradient(45deg, transparent 50%, #0f9e95 50%),
        linear-gradient(135deg, #0f9e95 50%, transparent 50%);
}

th {
    color: #1d4257;
    background: rgba(15, 23, 42, 0.02);
}

.table-wrap,
.form-card,
.metric-item,
.snapshot-card,
.report-mini-stat,
.filter-grid {
    background: rgba(255, 255, 255, 0.84);
}

.metric-item strong,
.snapshot-card strong,
.report-mini-stat strong,
.card h3,
.feature-card h3,
.topbar h2,
.auth-brand h1,
.sidebar h1 {
    color: inherit;
}

.status-chip {
    color: #0f4e4a;
    background: rgba(15, 158, 149, 0.12);
    border-color: rgba(15, 158, 149, 0.16);
}

.status-chip.status-paid {
    color: #166534;
    background: rgba(22, 163, 74, 0.12);
    border-color: rgba(22, 163, 74, 0.18);
}

.status-chip.status-paused {
    color: #9a6700;
    background: rgba(217, 119, 6, 0.12);
    border-color: rgba(217, 119, 6, 0.18);
}

.checkbox-pill span {
    color: #234255;
}

.auth-card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(246, 250, 255, 0.94));
}

.auth-brand {
    color: #f2f8ff;
    background:
        radial-gradient(circle at top left, rgba(94, 234, 212, 0.18), transparent 28%),
        linear-gradient(180deg, rgba(18, 39, 66, 0.94), rgba(28, 60, 102, 0.92));
    border-right: 1px solid rgba(255,255,255,0.08);
}

.auth-brand .muted,
.auth-brand p {
    color: #bfd2ea;
}

.kicker,
.auth-list-badge {
    background: rgba(15, 158, 149, 0.12);
    border-color: rgba(15, 158, 149, 0.16);
    color: #0f766e;
}

@media (max-width: 1080px) {
    body {
        overflow: hidden;
    }

    .shell {
        grid-template-columns: 1fr;
        height: 100vh;
    }

    .sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        width: min(88vw, 360px);
        max-width: 360px;
        transform: translateX(-104%);
        transition: transform 0.22s ease;
        z-index: 40;
        border-right: 1px solid rgba(255,255,255,0.08);
        border-bottom: 0;
        box-shadow: 0 24px 60px rgba(3, 12, 24, 0.28);
    }

    .sidebar-open .sidebar {
        transform: translateX(0);
    }

    .mobile-nav-overlay {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(15, 23, 42, 0);
        pointer-events: none;
        transition: background 0.22s ease;
        z-index: 30;
    }

    .sidebar-open .mobile-nav-overlay {
        background: rgba(15, 23, 42, 0.34);
        backdrop-filter: blur(2px);
        pointer-events: auto;
    }

    .content {
        height: 100vh;
    }

    .menu-toggle {
        display: inline-flex;
    }
}

@media (max-width: 720px) {
    .topbar-title {
        align-items: flex-start;
    }

    .topbar-actions {
        width: 100%;
    }
}


/* Step 28.1: theme rebalance / surface polish */
.dashboard-anchor-nav a {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(245, 249, 255, 0.88));
    color: #4f637d;
    border-color: rgba(71, 85, 105, 0.14);
    box-shadow: 0 10px 24px rgba(59, 83, 125, 0.08);
}

.dashboard-anchor-nav a:hover,
.dashboard-anchor-nav a:focus-visible {
    color: var(--text);
    background: linear-gradient(180deg, rgba(15, 158, 149, 0.12), rgba(255, 255, 255, 0.96));
    border-color: rgba(15, 158, 149, 0.24);
}

.timeline-day {
    background: linear-gradient(180deg, rgba(248, 251, 255, 0.96), rgba(239, 245, 252, 0.94));
    border-color: rgba(71, 85, 105, 0.14);
    box-shadow: 0 12px 28px rgba(59, 83, 125, 0.08);
}

.timeline-day.is-negative {
    background: linear-gradient(180deg, rgba(255, 245, 246, 0.96), rgba(255, 239, 241, 0.94));
    border-color: rgba(220, 38, 38, 0.16);
}

.timeline-day.is-positive {
    background: linear-gradient(180deg, rgba(241, 253, 250, 0.96), rgba(234, 250, 246, 0.94));
    border-color: rgba(15, 158, 149, 0.16);
}

.mini-chip {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(71, 85, 105, 0.14);
    color: #4f637d;
}

.mini-chip.success {
    color: #166534;
    border-color: rgba(22, 163, 74, 0.18);
    background: rgba(240, 253, 244, 0.92);
}

.mini-chip.danger {
    color: #b91c1c;
    border-color: rgba(220, 38, 38, 0.18);
    background: rgba(254, 242, 242, 0.92);
}

.mini-chip.neutral {
    color: #5a6d89;
    background: rgba(255, 255, 255, 0.88);
}

.heartbeat-item,
.manual-bullet,
.manual-flow-item,
.help-list li {
    background: linear-gradient(180deg, rgba(250, 252, 255, 0.98), rgba(241, 246, 252, 0.94));
    border-color: rgba(71, 85, 105, 0.14);
    box-shadow: 0 10px 24px rgba(59, 83, 125, 0.08);
}

.heartbeat-item strong,
.manual-bullet strong,
.manual-flow-item strong,
.help-list li strong {
    color: var(--text);
}

.readiness-ring {
    background: conic-gradient(var(--accent-strong) 0 var(--progress), rgba(148, 163, 184, 0.18) var(--progress) 100%);
}

.readiness-ring > div {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 250, 255, 0.96));
    border-color: rgba(71, 85, 105, 0.14);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.readiness-ring span {
    color: #5a6d89;
}

.data-bar {
    background: rgba(226, 232, 240, 0.78);
    border-color: rgba(148, 163, 184, 0.18);
}

@media (max-width: 1080px) {
    .content {
        padding-left: 20px;
        padding-right: 20px;
    }
}


/* Step 28.2: global form controls / dropdown polish */
html {
    color-scheme: light;
}

button,
input,
select,
textarea {
    color-scheme: light;
}

select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(249, 252, 255, 0.94)),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9' fill='none'%3E%3Cpath d='M1.5 1.5L7 7L12.5 1.5' stroke='%230f9e95' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-position: 0 0, right 16px center;
    background-size: 100% 100%, 14px 9px;
    background-repeat: no-repeat, no-repeat;
    padding-right: 48px;
}

select:hover {
    border-color: rgba(15, 158, 149, 0.24);
}

select option,
select optgroup {
    color: #122742;
    background: #ffffff;
}

input[type="date"],
input[type="datetime-local"],
input[type="month"],
input[type="week"] {
    color-scheme: light;
}

input[type="date"]::-webkit-calendar-picker-indicator,
input[type="datetime-local"]::-webkit-calendar-picker-indicator,
input[type="month"]::-webkit-calendar-picker-indicator,
input[type="week"]::-webkit-calendar-picker-indicator {
    opacity: 0.78;
}


/* Step 29.1: login scroll fix */
body.auth-page {
    min-height: 100dvh;
    overflow-x: hidden;
    overflow-y: auto;
}

body.auth-page .auth-shell {
    min-height: 100dvh;
    display: grid;
    align-content: start;
    justify-items: center;
    padding: clamp(16px, 3vw, 28px);
    padding-bottom: max(28px, env(safe-area-inset-bottom));
    overflow: visible;
}

body.auth-page .auth-card {
    width: min(100%, 1100px);
    margin: 0 auto;
}

body.auth-page .auth-shell > .flash {
    width: min(100%, 1100px);
    margin-bottom: 18px;
}

@media (max-width: 1080px) {
    body.auth-page {
        overflow-y: auto;
    }

    body.auth-page .auth-shell {
        min-height: 100dvh;
        height: auto;
        padding: 16px;
        padding-bottom: max(28px, env(safe-area-inset-bottom));
    }
}

@media (max-width: 720px) {
    body.auth-page .auth-shell {
        padding: 12px;
        padding-bottom: max(24px, env(safe-area-inset-bottom));
    }

    body.auth-page .auth-card {
        border-radius: 22px;
    }

    body.auth-page .auth-panel {
        padding-bottom: max(24px, env(safe-area-inset-bottom));
    }
}
