:root {
    --bg: #0c1022;
    --ink: #f3f6ff;
    --muted: #9aa3c2;
    --line: rgba(255, 255, 255, 0.08);
    --sidebar: #12162c;
    --card: #1a2140;
    --card-2: #222a4c;
    --accent: #7c5cfc;
    --accent-dark: #6846f0;
    --danger: #ff6b8a;
    --shadow: 0 16px 40px rgba(4, 6, 18, 0.35);
    --radius: 20px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    color: var(--ink);
    font: 15px/1.5 "Plus Jakarta Sans", "Segoe UI", sans-serif;
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

code {
    font-family: Consolas, "Cascadia Mono", monospace;
    font-size: 0.86em;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--line);
    border-radius: 7px;
    padding: 1px 6px;
    color: #ddd6fe;
}

.icon { width: 18px; height: 18px; flex: 0 0 auto; }

.auth-body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 32px 16px;
    background:
        radial-gradient(800px 420px at 15% 0%, rgba(124, 92, 252, 0.35), transparent 55%),
        radial-gradient(700px 380px at 100% 100%, rgba(255, 77, 141, 0.18), transparent 50%),
        #090d1c;
}

.auth-layout {
    width: min(980px, 100%);
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    background: #141933;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.auth-panel {
    padding: 52px 44px;
    color: #f8fafc;
    background:
        radial-gradient(420px 240px at 90% 0%, rgba(124, 92, 252, 0.55), transparent 60%),
        linear-gradient(165deg, #1c1640 0%, #101428 72%);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.auth-panel h1,
.auth-card h2 {
    margin: 12px 0 10px;
    letter-spacing: -0.04em;
    color: white;
}

.auth-panel h1 { font-size: 36px; line-height: 1.15; max-width: 12em; }
.auth-panel h1 .brand-names { display: block; color: #ff8a4a; }
.auth-panel p, .muted, .hint, .subtitle { color: var(--muted); }
.auth-panel p { color: #c9d0ea; margin: 0; max-width: 36ch; }
.auth-card { padding: 52px 40px; color: var(--ink); }
.auth-card h2 { font-size: 28px; margin-top: 0; }

.brand-mark {
    display: inline-grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: linear-gradient(145deg, #a78bfa, #6d4df0);
    color: white;
    font-weight: 800;
    letter-spacing: -0.04em;
    box-shadow: 0 10px 22px rgba(109, 77, 240, 0.45);
}

.eyebrow {
    margin: 18px 0 0;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #c4b5fd;
}

.feature-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 28px 0 0;
    padding: 0;
    list-style: none;
}

.feature-list li {
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 13px;
    font-weight: 600;
}

.stack, .sidebar nav { display: grid; gap: 12px; }
.stack button { width: 100%; }
label { display: grid; gap: 6px; font-weight: 600; font-size: 13px; color: #d5dcf3; }
input, select, button { font: inherit; }

input, select {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: #10162e;
    border-radius: 12px;
    padding: 12px 13px;
    color: white;
    transition: border-color 0.15s, box-shadow 0.15s;
}

input::placeholder { color: #7e88a8; }
select option { color: #121826; }

input:focus, select:focus {
    outline: none;
    border-color: #a78bfa;
    box-shadow: 0 0 0 4px rgba(124, 92, 252, 0.22);
    background: #10162e;
}

button, .pager a, .text-link, .logout-link, a.btn-export {
    border: 0;
    border-radius: 12px;
    padding: 12px 16px;
    background: linear-gradient(180deg, #8d72ff, #6d4df0);
    color: white;
    text-decoration: none;
    cursor: pointer;
    font-weight: 700;
}

button:hover { background: #6243ea; }

.btn-export {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    flex: 0 0 auto;
}

.export-total { padding: 12px 14px 4px; }

.alert, .flash {
    margin: 0 0 16px;
    padding: 12px 14px;
    border-radius: 12px;
}

.alert {
    background: rgba(255, 77, 141, 0.12);
    color: #ffb4c8;
    border: 1px solid rgba(255, 77, 141, 0.28);
}

.flash {
    background: rgba(124, 92, 252, 0.16);
    color: #ddd6fe;
    border: 1px solid rgba(167, 139, 250, 0.3);
}

.flash p { margin: 0; }
.flash p + p { margin-top: 6px; }
.hint { margin-top: 18px; font-size: 13px; }

.app-body {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 252px minmax(0, 1fr);
    background:
        radial-gradient(900px 420px at 0% -10%, rgba(124, 92, 252, 0.22), transparent 50%),
        radial-gradient(700px 380px at 100% 0%, rgba(255, 77, 141, 0.12), transparent 46%),
        var(--bg);
}

.sidebar {
    background: linear-gradient(180deg, #161b33 0%, #101428 100%);
    color: #f8fafc;
    padding: 22px 14px 16px;
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.brand {
    display: flex;
    gap: 12px;
    align-items: center;
    text-decoration: none;
    margin: 0 8px 22px;
}

.brand strong, .brand small { display: block; }
.brand strong { letter-spacing: -0.03em; font-size: 13px; line-height: 1.25; }
.brand small { color: #8e98b8; font-size: 12px; margin-top: 1px; }

.nav-label {
    margin: 0 12px 8px;
    color: #6f7896;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.sidebar nav {
    gap: 2px;
    align-content: start;
    overflow: auto;
    min-height: 0;
    flex: 1;
}

.sidebar a.nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    padding: 4px 8px;
    border-radius: 12px;
    color: #c5cce4;
    font-weight: 600;
}

.nav-ico {
    width: 30px;
    height: 30px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.04);
    color: #c9d0e8;
}

.sidebar a.nav-link:hover { background: rgba(255, 255, 255, 0.04); color: white; }

.sidebar a.nav-link.active {
    background: rgba(124, 92, 252, 0.12);
    color: white;
}

.sidebar a.nav-link.active .nav-ico {
    background: linear-gradient(180deg, #8d72ff, #6d4df0);
    color: white;
    box-shadow: 0 8px 18px rgba(109, 77, 240, 0.45);
}

.sidebar-foot {
    margin-top: auto;
    padding: 16px;
    border-radius: 18px;
    background:
        radial-gradient(120px 80px at 100% 0%, rgba(167, 139, 250, 0.35), transparent 70%),
        linear-gradient(180deg, #2a2358, #171433);
    border: 1px solid rgba(167, 139, 250, 0.28);
}

.sidebar-foot strong { display: block; font-size: 16px; }

.shell, .content, .panel, .table-wrap { min-width: 0; max-width: 100%; }

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 64px;
    margin: 16px 28px 0;
    padding: 8px 8px 8px 18px;
    background: rgba(22, 27, 52, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 18px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(12px);
}

.topbar-copy { display: flex; align-items: center; gap: 12px; min-width: 0; }

.topbar h1 {
    margin: 0;
    font-size: 18px;
    letter-spacing: -0.03em;
    line-height: 1;
    white-space: nowrap;
}

.topbar-divider { width: 1px; height: 14px; background: rgba(255, 255, 255, 0.12); flex: 0 0 auto; }
.subtitle { margin: 6px 0 0; font-size: 14px; }

.topbar .subtitle {
    margin: 0;
    font-size: 13px;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.topbar-user { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }

.topbar-date,
.live-pill {
    display: inline-flex;
    align-items: center;
    height: 40px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--line);
    color: #c5cce4;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    white-space: nowrap;
}

.live-pill { gap: 7px; color: #bbf7d0; }

.live-pill i {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #34d399;
    box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.65);
    animation: live-pulse 1.8s ease-out infinite;
}

.live-pill.is-busy { color: #fde68a; }
.live-pill.is-busy i { background: #fbbf24; animation: none; box-shadow: none; }
.live-pill.is-error { color: #fecaca; }
.live-pill.is-error i { background: #f87171; animation: none; box-shadow: none; }

@keyframes live-pulse {
    70% { box-shadow: 0 0 0 6px rgba(52, 211, 153, 0); }
}

@media (prefers-reduced-motion: reduce) {
    .live-pill i { animation: none; }
}

.user-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 40px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0 12px 0 4px;
}

.avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: linear-gradient(180deg, #8d72ff, #6d4df0);
    color: white;
    font-size: 13px;
    font-weight: 800;
}

.user-meta { display: flex; align-items: baseline; gap: 6px; line-height: 1; white-space: nowrap; }
.user-meta strong { font-size: 13px; }
.user-meta small { color: var(--muted); font-size: 11px; }

.logout-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 40px;
    background: rgba(255, 255, 255, 0.04);
    color: #e8ecf8;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0 14px;
}

.logout-link:hover { background: rgba(255, 255, 255, 0.08); }

.content { padding: 16px 28px 48px; }

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

.stat, .panel {
    background: linear-gradient(180deg, #232b4e 0%, #1a2140 100%);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.stat {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 118px;
    padding: 18px 16px 18px 18px;
    text-decoration: none;
    transition: transform 0.16s ease, border-color 0.16s ease;
}

.stat:hover {
    transform: translateY(-3px);
    border-color: rgba(167, 139, 250, 0.35);
}

.stat-copy { display: grid; gap: 2px; min-width: 0; }

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    background: var(--icon, var(--accent));
    color: white;
    box-shadow: 0 10px 22px var(--glow, rgba(124, 92, 252, 0.35));
}

.stat-icon .icon { width: 22px; height: 22px; }

.stat-label {
    color: #b7c0dc;
    font-size: 13px;
    font-weight: 600;
}

.stat strong {
    font-size: 30px;
    letter-spacing: -0.05em;
    line-height: 1.05;
    color: white;
}

.stat-hint { color: #8e98b8; font-size: 12px; font-weight: 600; }

.tone-violet { --tone: #c4b5fd; --tint: rgba(124, 92, 252, 0.18); --icon: #7c5cfc; --glow: rgba(124, 92, 252, 0.4); }
.tone-pink { --tone: #ff9ec4; --tint: rgba(255, 77, 141, 0.16); --icon: #ff4d8d; --glow: rgba(255, 77, 141, 0.38); }
.tone-orange { --tone: #ffc29a; --tint: rgba(255, 138, 74, 0.16); --icon: #ff8a4a; --glow: rgba(255, 138, 74, 0.38); }
.tone-blue { --tone: #a9c8ff; --tint: rgba(76, 141, 255, 0.16); --icon: #4c8dff; --glow: rgba(76, 141, 255, 0.38); }
.tone-green { --tone: #86efac; --tint: rgba(16, 185, 129, 0.16); --icon: #10b981; --glow: rgba(16, 185, 129, 0.35); }
.tone-rose { --tone: #fda4af; --tint: rgba(244, 63, 94, 0.16); --icon: #f43f5e; --glow: rgba(244, 63, 94, 0.35); }
.tone-amber { --tone: #fcd34d; --tint: rgba(245, 158, 11, 0.16); --icon: #f59e0b; --glow: rgba(245, 158, 11, 0.35); }
.tone-slate { --tone: #cbd5e1; --tint: rgba(148, 163, 184, 0.16); --icon: #64748b; --glow: rgba(100, 116, 139, 0.3); }

.home-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(260px, 0.85fr);
    gap: 16px;
    align-items: start;
}

.panel { padding: 8px 8px 12px; }
.panel-head { padding: 14px 14px 6px; }
.panel-head h2 { margin: 0 0 4px; font-size: 18px; letter-spacing: -0.03em; }
.panel-head .muted { margin: 0; max-width: 62ch; }

.panel-head-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

.ring-wrap {
    position: relative;
    width: 176px;
    height: 176px;
    margin: 18px auto 8px;
}

.ring {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    box-shadow: 0 0 0 10px rgba(255, 255, 255, 0.03);
}

.ring-center {
    position: absolute;
    inset: 28px;
    border-radius: 50%;
    background: #1a2140;
    display: grid;
    place-items: center;
    align-content: center;
    text-align: center;
}

.ring-center strong { font-size: 22px; letter-spacing: -0.04em; line-height: 1; }
.ring-center span { color: var(--muted); font-size: 12px; font-weight: 700; }

.mix-list { list-style: none; margin: 8px 12px 8px; padding: 0; display: grid; gap: 8px; }

.mix-list li {
    display: grid;
    grid-template-columns: 10px 1fr auto;
    gap: 10px;
    align-items: center;
    padding: 8px 10px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
}

.mix-list b { font-variant-numeric: tabular-nums; }

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--icon, var(--tone));
}

.count-pill, .result-meta, .branch-pill, .badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    font-weight: 700;
    white-space: nowrap;
}

.count-pill, .result-meta {
    background: rgba(255, 255, 255, 0.05);
    color: #d5dcf3;
    border: 1px solid var(--line);
    font-size: 12px;
    padding: 6px 10px;
}

.result-meta { margin: 4px 0 0; }

.toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin: 8px 10px 12px;
    padding: 10px;
    background: rgba(8, 12, 28, 0.35);
    border: 1px solid var(--line);
    border-radius: 16px;
}

.toolbar select { width: auto; min-width: 180px; }

.date-field {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #10162e;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 0 12px;
    color: #8e98b8;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}

.date-field input[type="date"] {
    width: auto;
    border: 0;
    background: transparent;
    padding: 10px 0;
    color: white;
    color-scheme: dark;
    box-shadow: none;
}

.date-field input[type="date"]:focus {
    background: transparent;
    box-shadow: none;
}

.date-field:focus-within {
    border-color: #a78bfa;
    box-shadow: 0 0 0 4px rgba(124, 92, 252, 0.2);
}

.search-field {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: min(320px, 100%);
    flex: 1 1 240px;
    background: #10162e;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 0 12px;
    color: #8e98b8;
}

.search-field input {
    border: 0;
    background: transparent;
    padding: 11px 0;
    box-shadow: none;
    color: white;
}

.search-field input:focus { background: transparent; box-shadow: none; }

.search-field:focus-within {
    border-color: #a78bfa;
    box-shadow: 0 0 0 4px rgba(124, 92, 252, 0.2);
}

.text-link { background: transparent; color: #c4b5fd; padding-inline: 8px; }
.table-wrap { overflow-x: auto; padding: 0 6px 6px; }

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    min-width: 720px;
}

th, td {
    padding: 13px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    text-align: left;
    white-space: nowrap;
}

th {
    font-size: 11px;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: #8d97b5;
    font-weight: 800;
    background: transparent;
}

tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: rgba(255, 255, 255, 0.035); }

.num { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; }
.neg { color: var(--danger); }
.stamp { color: var(--muted); font-variant-numeric: tabular-nums; }

.file-name {
    font-family: Consolas, "Cascadia Mono", monospace;
    font-size: 12.5px;
    font-weight: 650;
    letter-spacing: -0.02em;
    color: #e7ebff;
    text-decoration: none;
}

a.file-name:hover { text-decoration: underline; }

.badge {
    padding: 4px 9px;
    font-size: 12px;
    background: var(--tint);
    color: var(--tone);
}

.branch-pill {
    padding: 3px 8px;
    font-size: 12px;
    background: rgba(255, 255, 255, 0.05);
    color: #d5dcf3;
    border: 1px solid var(--line);
    font-variant-numeric: tabular-nums;
}

.empty { text-align: center; color: var(--muted); white-space: normal; padding: 36px 16px; }

.pager { display: flex; gap: 8px; align-items: center; margin: 8px 12px 8px; }

.pager a, .pager .current {
    min-width: 40px;
    text-align: center;
    padding: 8px 12px;
    border-radius: 10px;
    font-weight: 700;
}

.pager a {
    background: rgba(255, 255, 255, 0.04);
    color: var(--ink);
    border: 1px solid var(--line);
}

.pager a:hover { background: rgba(255, 255, 255, 0.08); }
.pager .current { background: linear-gradient(180deg, #8d72ff, #6d4df0); color: white; }

@media (max-width: 1100px) {
    .cards, .home-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
    .auth-layout, .app-body, .home-grid { grid-template-columns: minmax(0, 1fr); }
    .auth-panel h1 { font-size: 30px; }
    .sidebar { height: auto; position: static; min-width: 0; }
    .sidebar nav { grid-template-columns: 1fr 1fr; }
    .sidebar-foot { display: none; }
    .content { padding-left: 16px; padding-right: 16px; }
    .topbar { margin-left: 16px; margin-right: 16px; }
    .topbar-divider, .topbar .subtitle, .topbar-date, .user-meta small { display: none; }
    .cards { grid-template-columns: 1fr; }
    .panel-head-row { flex-direction: column; }
}

.theme-toggle {
    width: 40px;
    height: 40px;
    padding: 0;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    color: #e8ecf8;
    border: 1px solid var(--line);
    box-shadow: none;
}

.theme-toggle:hover { background: rgba(255, 255, 255, 0.1); }
.theme-sun, .theme-moon { display: none; }
html:not([data-theme="light"]) .theme-sun,
[data-theme="light"] .theme-moon { display: grid; }

.theme-float {
    position: fixed;
    top: 18px;
    right: 18px;
    z-index: 5;
}

@media (prefers-reduced-motion: reduce) {
    .stat { transition: none; }
}

[data-theme="light"] {
    color-scheme: light;
    --bg: #eef1f8;
    --ink: #171a2b;
    --muted: #667085;
    --line: #e6eaf2;
    --danger: #be123c;
    --shadow: 0 10px 30px rgba(23, 26, 43, 0.06);
}

[data-theme="light"] body,
[data-theme="light"] .app-body {
    background:
        radial-gradient(900px 420px at 0% -10%, rgba(124, 92, 252, 0.12), transparent 50%),
        radial-gradient(700px 380px at 100% 0%, rgba(255, 77, 141, 0.08), transparent 46%),
        var(--bg);
    color: var(--ink);
}

[data-theme="light"] code {
    background: #f4f2ff;
    color: #5b21b6;
    border-color: #e4defa;
}

[data-theme="light"] .auth-body {
    background:
        radial-gradient(800px 420px at 15% 0%, rgba(124, 92, 252, 0.16), transparent 55%),
        radial-gradient(700px 380px at 100% 100%, rgba(255, 77, 141, 0.08), transparent 50%),
        #eef1f8;
}

[data-theme="light"] .auth-layout {
    background: #fff;
    border-color: #e7ebf5;
    box-shadow: 0 24px 60px rgba(23, 26, 43, 0.12);
}

[data-theme="light"] .auth-card,
[data-theme="light"] .auth-card h2,
[data-theme="light"] label { color: var(--ink); }

[data-theme="light"] input,
[data-theme="light"] select,
[data-theme="light"] .search-field,
[data-theme="light"] .search-field input,
[data-theme="light"] .date-field,
[data-theme="light"] .date-field input {
    background: #fff;
    color: var(--ink);
    border-color: #d9dfeb;
}

[data-theme="light"] .date-field { color: #667085; }
[data-theme="light"] .date-field input[type="date"] {
    border: 0;
    color-scheme: light;
}

[data-theme="light"] input::placeholder,
[data-theme="light"] .search-field { color: #98a2b3; }
[data-theme="light"] .search-field input::placeholder { color: #98a2b3; }

[data-theme="light"] input:focus,
[data-theme="light"] select:focus,
[data-theme="light"] .search-field:focus-within,
[data-theme="light"] .date-field:focus-within {
    background: #fff;
    border-color: #8b6cff;
    box-shadow: 0 0 0 4px rgba(124, 92, 252, 0.14);
}

[data-theme="light"] .search-field input:focus,
[data-theme="light"] .date-field input:focus { background: transparent; box-shadow: none; }

[data-theme="light"] .alert {
    background: #fff1f4;
    color: #9f1239;
    border-color: #fecdd6;
}

[data-theme="light"] .flash {
    background: #f5f3ff;
    color: #5b21b6;
    border-color: #ddd6fe;
}

[data-theme="light"] .sidebar {
    background: #fff;
    color: var(--ink);
    border-right-color: #e7ebf5;
}

[data-theme="light"] .brand small,
[data-theme="light"] .nav-label { color: #98a2b3; }

[data-theme="light"] .sidebar a.nav-link { color: #3f4760; }
[data-theme="light"] .sidebar a.nav-link:hover { background: #f4f6fb; color: #171a2b; }

[data-theme="light"] .nav-ico {
    background: #f4f2ff;
    color: #6d4df0;
}

[data-theme="light"] .sidebar a.nav-link.active {
    background: #f3efff;
    color: #4c1d95;
}

[data-theme="light"] .sidebar-foot {
    background:
        radial-gradient(120px 80px at 100% 0%, rgba(167, 139, 250, 0.28), transparent 70%),
        linear-gradient(180deg, #f5f3ff, #efeaff);
    border-color: #ddd6fe;
}

[data-theme="light"] .sidebar-foot strong { color: #27115f; }

[data-theme="light"] .topbar,
[data-theme="light"] .stat,
[data-theme="light"] .panel,
[data-theme="light"] .ring-center {
    background: #fff;
    border-color: #e7ebf5;
}

[data-theme="light"] .topbar-divider { background: #e4e7f0; }

[data-theme="light"] .topbar-date,
[data-theme="light"] .live-pill,
[data-theme="light"] .user-chip,
[data-theme="light"] .logout-link,
[data-theme="light"] .theme-toggle {
    background: #fff;
    color: #344054;
    border-color: #e4e7f0;
}

[data-theme="light"] .live-pill { color: #047857; }
[data-theme="light"] .live-pill.is-error { color: #b91c1c; }

[data-theme="light"] .logout-link:hover,
[data-theme="light"] .theme-toggle:hover { background: #f4f6fb; }

[data-theme="light"] .stat-label { color: #667085; }
[data-theme="light"] .stat strong,
[data-theme="light"] .ring-center strong,
[data-theme="light"] .file-name { color: var(--ink); }
[data-theme="light"] .stat-hint { color: #98a2b3; }
[data-theme="light"] .stat:hover { border-color: #d9d0ff; }

[data-theme="light"] .tone-violet { --tone: #6d28d9; --tint: #ede9fe; }
[data-theme="light"] .tone-pink { --tone: #be185d; --tint: #fce7f3; }
[data-theme="light"] .tone-orange { --tone: #c2410c; --tint: #ffedd5; }
[data-theme="light"] .tone-blue { --tone: #1d4ed8; --tint: #dbeafe; }
[data-theme="light"] .tone-green { --tone: #047857; --tint: #d1fae5; }
[data-theme="light"] .tone-rose { --tone: #be123c; --tint: #ffe4e6; }
[data-theme="light"] .tone-amber { --tone: #b45309; --tint: #fef3c7; }
[data-theme="light"] .tone-slate { --tone: #334155; --tint: #e2e8f0; }

[data-theme="light"] .ring { box-shadow: 0 0 0 10px #f4f6fb; }

[data-theme="light"] .mix-list li,
[data-theme="light"] .toolbar,
[data-theme="light"] .count-pill,
[data-theme="light"] .result-meta,
[data-theme="light"] .branch-pill,
[data-theme="light"] .pager a {
    background: #f6f7fb;
    color: #344054;
    border-color: #e6eaf2;
}

[data-theme="light"] .pager a:hover { background: #eef1f6; }

[data-theme="light"] th,
[data-theme="light"] td { border-bottom-color: #eef1f6; }
[data-theme="light"] th { color: #98a2b3; }
[data-theme="light"] tbody tr:hover td { background: #f8f9fd; }
[data-theme="light"] .text-link { color: #6d28d9; }
