/* ============================================================
   Rosinad Invoicing — stylesheet

   Theming: every colour below is a CSS variable. The default
   (Rosinad) palette lives in :root; alternative themes are
   :root[data-theme="..."] override blocks at the end of this
   file. base.html stamps data-theme on <html>, so swapping the
   attribute re-skins the whole app. When adding a colour, reach
   for a variable — hardcoded hex won't follow the theme.

     --red          accent (brand colour; name kept for legacy)
     --on-accent    text/icon on top of the accent (buttons, badges)
     --dark         headings / strong text
     --body         body text
     --muted        secondary text (hints, subtitles)
     --muted-2      faintest text (footer, faint hints)
     --bg           page background + cards + inputs
     --card         panels/inputs that must read as "raised"
     --surface      secondary surface (sidebar, thead, footer)
     --border       hairlines
     --accent-soft  tint of the accent (active nav, drop hover)
     --row-hover / --row-alt   table zebra + hover
   ============================================================ */

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --red:        #2C9200;
    --on-accent:  #ffffff;
    --dark:       #272727;
    --body:       #4a4a4a;
    --muted:      #666666;
    --muted-2:    #999999;
    --bg:         #ffffff;
    --card:       #ffffff;
    --surface:    #f5f5f5;
    --border:     #e0e0e0;
    --accent-soft:#eef7e9;
    --row-hover:  #fafafa;
    --row-alt:    #f9f9f9;
    --shadow: 0 1px 4px rgba(0,0,0,.08);
    --radius: 4px;
    --font: BlinkMacSystemFont, -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;
}

html, body {
    height: 100%;
}

body {
    font-family: var(--font);
    font-size: 14px;
    line-height: 1.5;
    color: var(--body);
    background: var(--bg);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

a {
    color: var(--red);
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}

/* ── Header ─────────────────────────────────────────────── */

.site-header {
    background: var(--bg);
    border-bottom: 2px solid var(--red);
    padding: 10px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
}
.header-logo img {
    height: 48px;
    width: auto;
    display: block;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 20px;
    list-style: none;
}

/* Hamburger toggle — hidden on desktop, shown on mobile. */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--dark);
    padding: 4px;
    line-height: 0;
}

.header-nav a {
    color: var(--dark);
    font-size: 14px;
    font-weight: 500;
    padding: 4px 0;
    border-bottom: 2px solid transparent;
    transition: border-color .15s, color .15s;
    text-decoration: none;
}
.header-nav a:hover,
.header-nav a.active {
    color: var(--red);
    border-bottom-color: var(--red);
}

.header-nav form button {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--dark);
    font-size: 14px;
    font-weight: 500;
    padding: 4px 0;
    font-family: var(--font);
    border-bottom: 2px solid transparent;
    transition: color .15s, border-color .15s;
}
.header-nav form button:hover {
    color: var(--red);
    border-bottom-color: var(--red);
}

/* Mobile: collapse the nav into a hamburger dropdown (top-right). */
@media (max-width: 768px) {
    .nav-toggle { display: inline-flex; }
    .header-nav {
        display: none;
        position: absolute;
        top: 100%;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        min-width: 210px;
        background: var(--bg);
        border: 1px solid var(--border);
        border-top: 2px solid var(--red);
        box-shadow: var(--shadow);
        padding: 6px 0;
        z-index: 200;
    }
    .header-nav.open { display: flex; }
    .header-nav li { width: 100%; }
    .header-nav a,
    .header-nav form,
    .header-nav form button {
        display: block;
        width: 100%;
        text-align: left;
    }
    .header-nav a,
    .header-nav form button {
        padding: 11px 18px;
        border-bottom: none;
        font-size: 15px;
    }
    .header-nav a.active {
        color: var(--red);
        background: var(--accent-soft);
        border-bottom: none;
    }
    .header-nav a:hover,
    .header-nav form button:hover { border-bottom: none; }
}

/* ── Demo deployment cues ────────────────────────────────── */

.demo-banner {
    background: #fff3cd;
    color: #7a5b00;
    border-bottom: 1px solid #ffe08a;
    text-align: center;
    font-size: 12.5px;
    font-weight: 500;
    padding: 6px 16px;
}
.demo-banner strong { color: #5c4400; }

.demo-tag {
    display: inline-block;
    vertical-align: middle;
    background: #fff3cd;
    color: #7a5b00;
    border: 1px solid #ffe08a;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    padding: 1px 6px;
}
.demo-hint {
    background: #fff8e1;
    color: #7a5b00;
    border: 1px solid #ffe08a;
    border-radius: var(--radius);
    font-size: 12.5px;
    line-height: 1.5;
    text-align: center;
    padding: 10px 14px;
    margin-bottom: 16px;
}
.demo-hint strong { color: #5c4400; }

/* ── Main layout ─────────────────────────────────────────── */

.site-main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.page-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 24px;
    width: 100%;
}

.page-with-sidebar {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    max-width: 1500px;
    margin: 0 auto;
    padding: 32px 24px;
    width: 100%;
}

/* ── Sidebar ─────────────────────────────────────────────── */

.sidebar {
    width: 190px;
    flex-shrink: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.sidebar-title {
    background: var(--surface);
    color: var(--red);
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: .05em;
    padding: 10px 14px;
    border-bottom: 2px solid var(--red);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.sidebar-title-actions {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}
.filter-reset {
    color: var(--red);
    opacity: .7;
    display: inline-flex;
    flex-shrink: 0;
    transition: opacity .15s;
}
.filter-reset:hover { opacity: 1; }
.filter-collapse {
    color: var(--red);
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    opacity: .7;
    display: inline-flex;
    transition: opacity .15s;
}
.filter-collapse:hover { opacity: 1; }

.sidebar-body {
    padding: 14px;
}

.sidebar-body label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 4px;
    margin-top: 12px;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.sidebar-body label:first-of-type {
    margin-top: 0;
}

.sidebar-body select {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 13px;
    background: var(--bg);
    color: var(--body);
    font-family: var(--font);
}
.sidebar-body select[multiple] {
    height: 120px;
}

.filter-summary {
    margin-top: 14px;
    font-size: 11px;
    color: var(--muted);
    text-align: center;
}
.filter-summary .fs-count {
    color: var(--red);
}
.btn-mark-paid {
    display: block;
    width: 100%;
    box-sizing: border-box;
    margin-top: 8px;
    text-align: center;
    background: transparent;
    color: var(--red);
    border: 1px solid var(--red);
    font-weight: 600;
}
.btn-mark-paid:hover {
    background: var(--red);
    color: var(--on-accent);
    opacity: 1;
}

/* ── Content area ────────────────────────────────────────── */

.content-area {
    flex: 1;
    min-width: 0;
}

/* ── Invoices page layout ────────────────────────────────────
   Grid so the table can break out to full width below the
   filters + drop zone (especially on mobile). On desktop the
   filters span the left column; the head (title + drop zone)
   and the table stack on the right. */
.invoices-layout {
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr);
    /* Head sized to its content; the table row absorbs any extra height the
       taller sidebar would otherwise dump as a gap under the drop zone. */
    grid-template-rows: min-content 1fr;
    grid-template-areas:
        "sidebar head"
        "sidebar table";
    align-items: start;
}
.invoices-layout > .sidebar      { grid-area: sidebar; }
.invoices-layout > .content-head { grid-area: head; min-width: 0; }
.invoices-layout > .table-wrap,
.invoices-layout > .empty-state  { grid-area: table; }

/* Collapsed filters — sidebar hidden, table claims the full width */
.filters-show-btn {
    display: none;
    align-items: center;
    gap: 5px;
    width: max-content;
    margin-bottom: 12px;
    padding: 5px 11px;
    background: transparent;
    color: var(--red);
    border: 1px solid var(--red);
    border-radius: var(--radius);
    font-size: 12px;
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
}
.filters-show-btn:hover { background: var(--red); color: var(--on-accent); }

.invoices-layout.filters-collapsed {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
        "head"
        "table";
}
.invoices-layout.filters-collapsed > .sidebar { display: none; }
.invoices-layout.filters-collapsed .filters-show-btn { display: inline-flex; }

@media (max-width: 768px) {
    /* Filters and the drop zone sit side by side at equal height; the
       invoices table drops below and uses the full screen width. The filter
       card is kept compact so the top row doesn't push the table off-screen. */
    .invoices-layout {
        grid-template-columns: 1fr 1fr;
        grid-template-areas:
            "sidebar head"
            "table   table";
        align-items: stretch;
        gap: 10px;
        padding: 12px 10px;
    }
    .invoices-layout > .sidebar { width: auto; }

    /* Compact filter form */
    .invoices-layout .sidebar-title { padding: 7px 10px; font-size: 12px; }
    .invoices-layout .sidebar-body { padding: 10px; }
    .invoices-layout .sidebar-body label { margin-top: 8px; font-size: 11px; }
    .invoices-layout .sidebar-body input,
    .invoices-layout .sidebar-body select { padding: 5px 7px; font-size: 12px; }
    /* iOS renders <select multiple> tall regardless of CSS height; the size="4"
       attribute on the element plus this cap keep it short. */
    .invoices-layout .sidebar-body select[multiple] {
        height: 84px !important;
        min-height: 0;
        font-size: 12px;
    }
    .invoices-layout .sidebar-body .btn-apply { margin-top: 12px; padding: 8px; }

    .invoices-layout > .content-head {
        display: flex;
        flex-direction: column;
    }
    .invoices-layout > .content-head .page-title { font-size: 18px; margin-bottom: 8px; }
    .invoices-layout > .content-head .btn-primary { margin-bottom: 10px !important; }
    /* Drop zone grows to fill the column so it matches the filters' height. */
    .invoices-layout > .content-head .drop-zone {
        flex: 1 1 auto;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        margin-bottom: 0;
        padding: 0.75rem;
    }
    .invoices-layout > .content-head .drop-zone p { margin: 2px 0; font-size: 13px; }
    .invoices-layout > .content-head .drop-zone .drop-hint { font-size: 11px; }
    .invoices-layout > .content-head .drop-zone.drop-zone-prominent { padding: 0.75rem; }

    /* Make the table readable full-width below */
    .invoices-layout > .table-wrap { font-size: 12px; }
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.page-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--dark);
}

/* ── Buttons ─────────────────────────────────────────────── */

.btn {
    display: inline-block;
    padding: 7px 16px;
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    font-family: var(--font);
    transition: opacity .15s;
    text-decoration: none;
    line-height: 1.4;
}
.btn:hover {
    opacity: .88;
    text-decoration: none;
}

.btn-primary {
    background: var(--red);
    color: var(--on-accent);
}
.btn-secondary {
    background: var(--surface);
    color: var(--dark);
    border: 1px solid var(--border);
}
.btn-warning {
    background: #e67e22;
    color: #fff;
}
.btn-danger {
    background: #c0392b;
    color: #fff;
    border: 1px solid #a93226;
}
.btn-danger:hover { background: #a93226; }
.btn-sm {
    padding: 4px 10px;
    font-size: 12px;
}
.btn-apply {
    width: 100%;
    margin-top: 14px;
    text-align: center;
    background: var(--red);
    color: var(--on-accent);
}

/* ── Table ───────────────────────────────────────────────── */

.table-wrap {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg);
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

thead th {
    background: var(--surface);
    color: var(--dark);
    font-weight: 700;
    text-align: left;
    padding: 8px 10px;
    border-bottom: 2px solid var(--border);
    white-space: nowrap;
}
.sort-link {
    color: inherit;
    text-decoration: none;
    cursor: pointer;
}
.sort-link:hover { color: var(--red); }
.sort-link.sort-active { color: var(--red); }
.sort-arrow { font-size: 11px; }

tbody tr {
    border-bottom: 1px solid var(--border);
    transition: background .1s;
}
tbody tr:last-child {
    border-bottom: none;
}
tbody tr:hover {
    background: var(--row-hover);
}
tbody tr:nth-child(even) {
    background: var(--row-alt);
}
tbody tr:nth-child(even):hover {
    background: var(--surface);
}

td {
    padding: 8px 10px;
    vertical-align: middle;
}

.paid-badge {
    color: var(--red);
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.number-link {
    color: var(--dark);
    font-weight: 700;
    text-decoration: none;
}
.number-link:hover { text-decoration: underline; }

/* ── PDF / file icon ─────────────────────────────────────── */

.file-icon {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    color: var(--dark);
    font-weight: 700;
}
.file-icon:hover {
    text-decoration: underline;
}

.file-icon svg {
    width: 20px;
    height: 20px;
    fill: #ED1C24;
    flex-shrink: 0;
}

/* ── Forms ───────────────────────────────────────────────── */

.form-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px 32px;
    max-width: 560px;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 5px;
}

.form-control {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
    color: var(--body);
    font-family: var(--font);
    background: var(--bg);
    transition: border-color .15s;
}
.form-control:focus {
    outline: none;
    border-color: var(--red);
}

.form-check {
    display: flex;
    align-items: center;
    gap: 8px;
}
.form-check input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--red);
    cursor: pointer;
}
.form-check label {
    font-size: 14px;
    cursor: pointer;
    margin: 0;
}

.form-hint {
    font-size: 12px;
    color: var(--muted);
    margin-top: 4px;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 24px;
    flex-wrap: wrap;
}

.current-file {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 8px 12px;
    margin-bottom: 8px;
    font-size: 13px;
}

/* ── Alert / error ───────────────────────────────────────── */

.alert {
    padding: 12px 16px;
    border-radius: var(--radius);
    margin-bottom: 18px;
    font-size: 13px;
    border: 1px solid transparent;
}
.alert-error {
    background: #fef2f2;
    border-color: #fca5a5;
    color: #991b1b;
}
.alert-success {
    background: #f0fdf4;
    border-color: #86efac;
    color: #166534;
}

/* ── Login page ──────────────────────────────────────────── */

.login-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    padding: 40px 24px;
}

.login-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 36px 40px;
    width: 100%;
    max-width: 380px;
    box-shadow: 0 2px 12px rgba(0,0,0,.08);
}

.login-logo {
    text-align: center;
    margin-bottom: 28px;
}
.login-logo img {
    height: 52px;
}

.login-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--dark);
    text-align: center;
    margin-bottom: 24px;
}

/* ── Account page ────────────────────────────────────────── */

.account-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px 28px;
    max-width: 480px;
}

.account-row {
    display: flex;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
    gap: 12px;
}
.account-row:last-child {
    border-bottom: none;
}
.account-label {
    font-weight: 600;
    color: var(--dark);
    width: 140px;
    flex-shrink: 0;
}
.account-value {
    color: var(--body);
}

.role-badge {
    display: inline-block;
    background: var(--red);
    color: var(--on-accent);
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 12px;
    margin-right: 4px;
    text-transform: uppercase;
    letter-spacing: .04em;
}

/* ── Invoice view detail ─────────────────────────────────── */

.detail-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px 28px;
    max-width: 640px;
    margin-bottom: 24px;
}

.detail-row {
    display: flex;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
    gap: 12px;
}
.detail-row:last-child {
    border-bottom: none;
}
.detail-label {
    font-weight: 600;
    color: var(--dark);
    width: 140px;
    flex-shrink: 0;
}
/* Let value cells shrink and wrap so long unbroken strings (e.g. the public
   status URL) don't overflow the card on narrow screens. */
.detail-row > :not(.detail-label) {
    min-width: 0;
    overflow-wrap: anywhere;
}

/* ── Status badge ────────────────────────────────────────── */

.status-active   { color: #27ae60; font-weight: 600; }
.status-inactive { color: #e74c3c; font-weight: 600; }

/* ── Footer ──────────────────────────────────────────────── */

.site-footer {
    border-top: 1px solid var(--border);
    padding: 16px 24px;
    text-align: center;
    font-size: 12px;
    color: var(--muted-2);
    background: var(--surface);
}

/* ── Utilities ───────────────────────────────────────────── */

.mt-4  { margin-top: 4px; }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mb-16 { margin-bottom: 16px; }
.flex  { display: flex; }
.gap-8 { gap: 8px; }
.flex-wrap { flex-wrap: wrap; }

/* ── Drop zone ───────────────────────────────────────────── */

.drop-zone {
    border: 2px dashed var(--red);
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: background 0.2s;
    margin-bottom: 1rem;
}
.drop-zone:hover,
.drop-zone.drag-over {
    background: var(--accent-soft);
}
.drop-zone-prominent {
    padding: 3rem 2rem;
}
.drop-zone-inner .drop-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 0.5rem;
}
.drop-hint {
    color: var(--muted-2);
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

/* ── Quick panel ─────────────────────────────────────────── */

.quick-panel {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}
.quick-panel h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 1rem;
}
.extract-status {
    margin-bottom: 1rem;
    color: var(--muted);
    font-size: 0.9rem;
    min-height: 1.2em;
}
.extract-status.success { color: #2e7d32; }
.extract-status.error   { color: #c62828; }

/* Public upload page */
.upload-page {
    max-width: 600px;
    margin: 60px auto;
    padding: 0 24px;
}
.upload-page h1 {
    font-size: 24px;
    margin-bottom: 12px;
    color: var(--dark);
}
.upload-subtitle {
    color: var(--muted);
    margin-bottom: 32px;
    line-height: 1.5;
}
.upload-field {
    margin-bottom: 14px;
}
.upload-field label {
    display: block;
    font-weight: 500;
    margin-bottom: 4px;
    font-size: 13px;
    color: var(--dark);
}

/* Public invoice status page */
.status-page {
    max-width: 480px;
    margin: 60px auto;
    padding: 0 24px;
    text-align: center;
}
.status-circle {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    margin: 40px auto 48px;
}
.status-circle-paid    { background: #22c55e; box-shadow: 0 0 60px 10px rgba(34,197,94,.45); }
.status-circle-pending { background: #f9a825; box-shadow: 0 0 60px 10px rgba(249,168,37,.45); }
.status-circle-missing { background: #ef4444; box-shadow: 0 0 60px 10px rgba(239,68,68,.45); }
.status-circle-rejected { background: #ef4444; box-shadow: 0 0 60px 10px rgba(239,68,68,.45); }
.status-title {
    font-size: 28px;
    margin: 0 0 8px;
    color: var(--dark);
}
.status-subtitle {
    color: var(--muted);
    margin-bottom: 32px;
}
.status-details {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 20px;
    text-align: left;
}
.status-detail-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}
.status-detail-row:last-child { border-bottom: none; }
.status-detail-row span { color: var(--muted); }
.rejected-badge {
    display: inline-block;
    padding: 2px 8px;
    background: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fecaca;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}
tr.row-rejected { opacity: 0.55; }
tr.row-rejected td { text-decoration: line-through; }
tr.row-rejected td:first-child, tr.row-rejected td:last-child { text-decoration: none; }

/* ============================================================
   THEMES — override the variables defined in :root above.
   The default (Rosinad) palette IS :root, so data-theme="rosinad"
   needs no block. Light themes only restyle the accent; dark
   themes restyle the full neutral ramp. Keep this list in sync
   with THEMES in app/web/routes.py.
   ============================================================ */

/* ── Light ─────────────────────────────────────────────────── */

:root[data-theme="ocean"] {
    --red:         #0a6fb5;
    --accent-soft: #e6f2fb;
}
:root[data-theme="forest"] {
    --red:         #0f7a52;
    --accent-soft: #e4f4ee;
}
:root[data-theme="sunset"] {
    --red:         #e2580f;
    --accent-soft: #fdeee3;
}
:root[data-theme="royal"] {
    --red:         #6d28d9;
    --accent-soft: #f0e9fc;
}
:root[data-theme="graphite"] {
    --red:         #3f4756;
    --accent-soft: #eceef1;
}

/* ── Dark ──────────────────────────────────────────────────── */

:root[data-theme="midnight"] {
    --red:         #3b82f6;
    --on-accent:   #ffffff;
    --dark:        #e8eaed;
    --body:        #c2c7d0;
    --muted:       #98a0ad;
    --muted-2:     #6b7480;
    --bg:          #11151c;
    --card:        #1a1f29;
    --surface:     #1a1f29;
    --border:      #2b323d;
    --accent-soft: #1d2a44;
    --row-hover:   #1e2530;
    --row-alt:     #161b23;
    --shadow: 0 1px 4px rgba(0,0,0,.5);
}
:root[data-theme="carbon"] {
    --red:         #f5a623;
    --on-accent:   #1a1300;
    --dark:        #f0f0f0;
    --body:        #c9c9c9;
    --muted:       #9a9a9a;
    --muted-2:     #6a6a6a;
    --bg:          #141414;
    --card:        #1e1e1e;
    --surface:     #1e1e1e;
    --border:      #2f2f2f;
    --accent-soft: #2b2410;
    --row-hover:   #232323;
    --row-alt:     #181818;
    --shadow: 0 1px 4px rgba(0,0,0,.6);
}
