:root {
    --bg: #0f1419;
    --surface: #1a212b;
    --surface-2: #232c38;
    --border: #2e3a48;
    --text: #e6edf3;
    --muted: #8b98a5;
    --primary: #3b82f6;
    --primary-hover: #2f6fd6;
    --danger: #ef4444;
    --danger-hover: #d83a3a;
    --success: #22c55e;
    --radius: 8px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
}

a { color: var(--primary); }

/* ---------- Layout ---------- */
.topbar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 20px;
    height: 56px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 10;
}
.topbar .brand { color: var(--text); font-weight: 700; font-size: 16px; margin-right: auto; text-decoration: none; white-space: nowrap; }
.topbar .user { display: flex; align-items: center; gap: 5px; color: var(--muted); margin-right: 4px; }
.admin-nav-toggle {
    display: none;
    order: -1;
    width: 38px;
    height: 38px;
    padding: 9px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: var(--surface-2);
    cursor: pointer;
}
.admin-nav-toggle span { display: block; width: 100%; height: 2px; margin: 4px 0; border-radius: 2px; background: var(--text); transition: transform .18s ease, opacity .18s ease; }
.admin-nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.admin-nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.admin-nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
.admin-navigation-backdrop { display: none; }
/* Reads come from a replica while writes go to the game server's own database — say so. */
.topbar .source-badge {
    flex: none;
    padding: 3px 9px;
    margin-right: 4px;
    border: 1px solid #7a5c15;
    border-radius: 999px;
    background: rgba(214, 158, 46, .14);
    color: #e3b341;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    white-space: nowrap;
    cursor: help;
}

.container { max-width: 1100px; margin: 24px auto; padding: 0 20px; }

.admin-shell-body {
    display: grid;
    grid-template-columns: 230px minmax(0, 1fr);
    gap: 22px;
    width: min(1480px, 100%);
    margin: 0 auto;
    padding: 0 20px;
}
.admin-shell-body > .container {
    width: 100%;
    max-width: none;
    min-width: 0;
    margin: 24px 0;
    padding: 0;
}
.admin-sections {
    position: sticky;
    top: 80px;
    align-self: start;
    max-height: calc(100vh - 96px);
    margin-top: 24px;
    overflow-x: hidden;
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: 13px;
    background: linear-gradient(180deg, rgba(30, 40, 54, .98), rgba(23, 31, 42, .98));
    box-shadow: 0 14px 36px rgba(0, 0, 0, .18);
}
.admin-sections-head {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 17px 16px 14px;
    border-bottom: 1px solid var(--border);
}
.admin-sections-head > span {
    color: #75a7fa;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .14em;
}
.admin-sections-head > strong { color: #f8fafc; font-size: 16px; }
.admin-sections-head > small { color: var(--muted); font-size: 10px; }
.admin-sections-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 9px;
}
.admin-nav-group {
    overflow: hidden;
    border: 1px solid transparent;
    border-radius: 10px;
    background: rgba(255, 255, 255, .012);
}
.admin-nav-group.active {
    border-color: rgba(59, 130, 246, .2);
    background: rgba(59, 130, 246, .045);
}
.admin-section-item {
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 42px;
    width: 100%;
    padding: 8px 9px;
    border: 0;
    border-radius: 0;
    color: #d8e1ec;
    background: transparent;
    cursor: pointer;
    font: inherit;
    text-align: left;
}
.admin-section-item:hover { background: rgba(59, 130, 246, .055); }
.admin-section-item:focus-visible { outline: 2px solid rgba(59, 130, 246, .55); outline-offset: -2px; }
.admin-section-item strong { font-size: 12px; font-weight: 600; }
.admin-section-icon {
    display: grid;
    flex: 0 0 30px;
    width: 30px;
    height: 30px;
    place-items: center;
    border: 1px solid rgba(117, 167, 250, .16);
    border-radius: 8px;
    background: rgba(59, 130, 246, .08);
    color: #8fb7f9;
}
.admin-section-icon svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.admin-section-chevron {
    margin-left: auto;
    color: #7890aa;
    font-size: 16px;
    line-height: 1;
    transition: transform .16s ease;
    transform: rotate(180deg);
}
.admin-nav-group.collapsed .admin-section-chevron { transform: rotate(0); }
.admin-nav-group.collapsed .admin-subsections { display: none; }
.admin-subsections {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 0 7px 8px 19px;
}
.admin-subsections > a,
.admin-subsections > span {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    min-height: 31px;
    padding: 6px 7px 6px 17px;
    border-radius: 7px;
    color: #9eacbc;
    font-size: 10px;
    text-decoration: none;
}
.admin-subsections > a::before,
.admin-subsections > span::before {
    content: "";
    position: absolute;
    left: 4px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #53657a;
}
.admin-subsections > a:hover {
    background: rgba(59, 130, 246, .08);
    color: #dbeafe;
}
.admin-subsections > a.active {
    background: rgba(59, 130, 246, .14);
    color: #8ab8ff;
    font-weight: 700;
}
.admin-subsections > a.active::before { background: #3b82f6; box-shadow: 0 0 0 3px rgba(59, 130, 246, .13); }
.admin-subsections > .planned { color: #647386; }
.admin-subsections > .planned small {
    padding: 2px 4px;
    border-radius: 4px;
    background: rgba(139, 152, 165, .08);
    color: #667588;
    font-size: 7px;
    font-weight: 700;
    letter-spacing: .03em;
    text-transform: uppercase;
}
.admin-sections-note {
    padding: 11px 14px;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 9px;
    line-height: 1.45;
}

@media (max-width: 900px) {
    .admin-shell-body { grid-template-columns: 1fr; gap: 0; }
    .admin-sections { position: static; top: auto; max-height: none; }
}

@media (max-width: 600px) {
    .admin-shell-body { padding: 0 12px; }
    .admin-sections { margin-top: 16px; }
}

/* ============================================================
   2026 admin shell refresh
   Visual-only layer: routes, navigation items and page content stay unchanged.
   ============================================================ */
@font-face {
    font-family: "Inter";
    src: url("fonts/InterVariable.woff2") format("woff2");
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
}

:root {
    --bg: #07111f;
    --surface: #0d1b2b;
    --surface-2: #14263a;
    --panel: #0d1b2b;
    --border: #20354b;
    --text: #f1f6fc;
    --muted: #9aacc0;
    --primary: #3488ff;
    --primary-hover: #2174e8;
    --radius: 11px;
}

html { color-scheme: dark; }
body {
    background:
        radial-gradient(circle at 62% -18%, rgba(45, 116, 214, .11), transparent 34%),
        #07111f;
    font-family: "Inter", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-optical-sizing: auto;
    font-synthesis: none;
    font-variant-numeric: tabular-nums;
    font-feature-settings: "cv02", "cv03", "cv04", "cv11";
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    line-height: 1.45;
}
body, .admin-sections { scrollbar-color: #34516f transparent; scrollbar-width: thin; }

.topbar {
    height: 64px;
    padding: 0 22px;
    gap: 12px;
    background: rgba(6, 17, 31, .96);
    border-color: #1c3045;
    box-shadow: 0 8px 28px rgba(0, 0, 0, .18);
    backdrop-filter: blur(14px);
}
.topbar .brand {
    font-size: 17px;
    letter-spacing: -.02em;
}
.topbar .source-badge {
    padding: 5px 10px;
    border-color: rgba(245, 158, 11, .36);
    background: rgba(245, 158, 11, .09);
    color: #f6bd55;
    font-size: 9px;
}
.topbar .user {
    min-height: 36px;
    padding: 0 3px 0 10px;
    border-left: 1px solid var(--border);
    color: #becbda;
}
.topbar .btn {
    min-height: 36px;
    border-color: #294158;
    background: #102136;
}

.admin-shell-body {
    grid-template-columns: 270px minmax(0, 1fr);
    gap: 0;
    width: 100%;
    margin: 0;
    padding: 0;
}
.admin-shell-body > .container {
    margin: 0;
    padding: 26px clamp(18px, 2.2vw, 34px) 44px;
}
.admin-sections {
    top: 64px;
    height: calc(100vh - 64px);
    max-height: calc(100vh - 64px);
    margin: 0;
    border-width: 0 1px 0 0;
    border-radius: 0;
    background:
        linear-gradient(180deg, rgba(13, 29, 47, .99), rgba(7, 22, 38, .99));
    box-shadow: 12px 0 32px rgba(0, 0, 0, .13);
}
.admin-sections-head {
    gap: 2px;
    padding: 18px 18px 15px;
    border-color: rgba(58, 82, 108, .52);
}
.admin-sections-head > span { color: #62a4ff; font-size: 8px; }
.admin-sections-head > strong { font-size: 15px; }
.admin-sections-head > small { font-size: 10px; }
.admin-sections-list {
    gap: 5px;
    padding: 11px 10px 18px;
}
.admin-nav-group {
    position: relative;
    border: 0;
    border-radius: 9px;
    background: transparent;
}
.admin-nav-group + .admin-nav-group { border-top: 1px solid rgba(57, 80, 104, .22); padding-top: 4px; }
.admin-nav-group.active {
    border-color: transparent;
    background: rgba(36, 112, 211, .055);
}
.admin-nav-group.active::before {
    content: "";
    position: absolute;
    z-index: 1;
    top: 8px;
    bottom: 8px;
    left: 0;
    width: 3px;
    border-radius: 0 4px 4px 0;
    background: #3488ff;
    box-shadow: 0 0 14px rgba(52, 136, 255, .4);
}
.admin-section-item {
    gap: 11px;
    min-height: 48px;
    padding: 8px 11px;
    border-radius: 8px;
    color: #dce7f3;
}
.admin-section-item:hover { background: rgba(75, 145, 236, .08); }
.admin-section-item strong { font-size: 13px; font-weight: 600; }
.admin-section-icon {
    flex-basis: 30px;
    border: 0;
    background: transparent;
    color: #a9bfd6;
}
.admin-nav-group.active .admin-section-icon { color: #75adff; }
.admin-section-icon svg { width: 18px; height: 18px; stroke-width: 1.8; }
.admin-section-chevron { color: #8298ae; font-size: 17px; }
.admin-subsections {
    gap: 3px;
    padding: 1px 9px 10px 48px;
}
.admin-subsections > a,
.admin-subsections > span {
    min-height: 36px;
    padding: 8px 10px 8px 14px;
    border-radius: 7px;
    font-size: 11px;
}
.admin-subsections > a::before,
.admin-subsections > span::before { left: 2px; width: 4px; height: 4px; }
.admin-subsections > a:hover { background: rgba(52, 136, 255, .09); }
.admin-subsections > a.active {
    background: linear-gradient(90deg, rgba(37, 112, 215, .28), rgba(37, 112, 215, .16));
    color: #a8cbff;
}
.admin-sections-note {
    padding: 12px 18px;
    border-color: rgba(58, 82, 108, .46);
    font-size: 9px;
}

.page-head { margin-bottom: 20px; }
.page-head h1, .overview-head h1 {
    color: #f7faff;
    font-weight: 720;
    letter-spacing: -.035em;
}
.page-head h1 { font-size: 24px; }
.overview-head { margin-bottom: 20px; }
.overview-head h1 { font-size: 30px; }
.overview-head p { color: #9fb1c4; }
.overview-eyebrow { color: #69a8ff; font-size: 10px; }

.card,
.overview-kpi,
.overview-decision,
.acquisition-metric {
    border-color: #21384f;
    background: linear-gradient(155deg, rgba(16, 34, 53, .97), rgba(10, 26, 43, .97));
    box-shadow: 0 10px 28px rgba(0, 0, 0, .12);
}
.card { border-radius: 12px; }
.overview-kpis,
.overview-decision-metrics,
.overview-grid { gap: 13px; }
.overview-kpi {
    min-height: 132px;
    padding: 17px 16px;
    border-radius: 11px;
}
.overview-kpi::before,
.overview-decision::before { width: 2px; opacity: .9; }
.overview-kpi-top > span:first-child { color: #a9bacb; font-size: 10px; }
.overview-kpi > strong {
    margin: 12px 0 6px;
    font-size: clamp(23px, 1.75vw, 29px);
    font-weight: 720;
}
.overview-kpi small, .overview-previous { color: #91a5b9; }
.overview-previous { border-color: rgba(105, 134, 164, .18); }
.overview-decision { min-height: 94px; padding: 15px; border-radius: 11px; }
.overview-decision strong { margin-top: 7px; font-size: 21px; }
.overview-panel { padding: 19px; }
.overview-panel-head { margin-bottom: 17px; }
.overview-panel-head h2 { color: #f3f7fc; font-size: 16px; }
.overview-panel-head p, .overview-legend { color: #94a9bd; }
.overview-insights {
    padding: 16px;
    border-color: rgba(52, 136, 255, .25);
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(33, 105, 198, .10), rgba(15, 32, 51, .72));
}
.overview-insight { min-height: 62px; padding: 11px 12px; background: rgba(8, 23, 39, .7); }
.overview-insight strong { font-size: 11px; }
.overview-insight span { color: #91a5b9; font-size: 10px; }
.chart-grid { stroke: #22394f; }
.chart-y-label, .chart-x-label { fill: #8fa5ba; }

.btn {
    min-height: 38px;
    border-color: #2a435b;
    border-radius: 9px;
    background: #14263a;
    box-shadow: 0 3px 10px rgba(0, 0, 0, .12);
    transition: background .15s ease, border-color .15s ease, transform .15s ease;
}
.btn:hover { border-color: #47729b; background: #19304a; }
.btn:active { transform: translateY(1px); }
.btn-primary { border-color: #3488ff; background: #2879e6; }
input, select, textarea {
    border-color: #2b455e;
    border-radius: 9px;
    background: #0a1a2b;
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #3488ff;
    box-shadow: 0 0 0 3px rgba(52, 136, 255, .12);
}
.overview-range,
.overview-custom-range {
    border-color: #294259;
    background: #0c1c2d;
}
.overview-range button { min-height: 34px; }
.overview-range button.active { background: #1a3049; color: #fff; }

th, td { padding: 12px 15px; border-color: rgba(49, 74, 99, .62); }
th { color: #99adc0; font-size: 10px; }
tbody tr { transition: background .12s ease; }
tbody tr:hover { background: rgba(52, 136, 255, .045); }
.tag { background: #182c41; }

@media (max-width: 1100px) {
    .realtime-ccu { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .realtime-ccu > div:nth-child(3) { border-left: 0; border-top: 1px solid var(--border); }
    .realtime-ccu > div:nth-child(4) { border-top: 1px solid var(--border); }
    .admin-shell-body { display: block; }
    .admin-shell-body > .container { padding: 22px 20px 40px; }
    .admin-sections {
        top: 64px;
        width: min(290px, calc(100vw - 44px));
        height: calc(100vh - 64px);
        max-height: none;
        border-radius: 0;
    }
    .admin-navigation-backdrop { inset: 64px 0 0; }
}

@media (min-width: 1101px) and (max-width: 1550px) {
    .overview-kpi > strong { font-size: clamp(20px, 1.55vw, 24px); }
}

@media (max-width: 760px) {
    .topbar { height: 58px; padding: 0 11px; }
    .admin-sections { top: 58px; height: calc(100vh - 58px); }
    .admin-navigation-backdrop { inset: 58px 0 0; }
    .admin-shell-body > .container { padding: 16px 11px 34px; }
    .overview-head h1 { font-size: 26px; }
    .overview-kpi { min-height: 112px; padding: 15px; }
    .overview-panel { padding: 15px; }
}

@media (max-width: 420px) {
    .topbar .brand { font-size: 15px; }
    .admin-shell-body > .container { padding-right: 9px; padding-left: 9px; }
    .overview-kpi > strong { font-size: 24px; }
}

/* Final glass overrides must remain last. */
.topbar {
    border-color: rgba(226, 193, 128, .16);
    background: linear-gradient(105deg, rgba(9, 12, 15, .78), rgba(11, 16, 21, .64));
    box-shadow: 0 12px 38px rgba(0, 0, 0, .30), inset 0 -1px rgba(255, 255, 255, .025);
    backdrop-filter: blur(24px) saturate(135%);
    -webkit-backdrop-filter: blur(24px) saturate(135%);
}
.admin-sections {
    border-color: rgba(226, 193, 128, .18);
    background: radial-gradient(circle at 26% 24%, rgba(203, 149, 51, .09), transparent 32%), linear-gradient(180deg, rgba(15, 18, 20, .78), rgba(9, 13, 16, .66));
    box-shadow: 18px 0 44px rgba(0, 0, 0, .28), inset -1px 0 rgba(255, 255, 255, .025);
    backdrop-filter: blur(26px) saturate(125%);
    -webkit-backdrop-filter: blur(26px) saturate(125%);
}
.admin-nav-group.active { background: linear-gradient(90deg, rgba(208, 151, 45, .15), rgba(208, 151, 45, .045)); }
.admin-nav-group.active::before { background: #d6a64b; box-shadow: 0 0 16px rgba(214, 166, 75, .34); }
.admin-nav-group.active .admin-section-icon,
.admin-subsections > a.active,
.overview-eyebrow,
.admin-sections-head > span { color: #e4b961; }
.admin-subsections > a.active { background: linear-gradient(90deg, rgba(202, 145, 43, .20), rgba(202, 145, 43, .07)); }
.card,
.overview-kpi,
.overview-decision,
.acquisition-metric,
.economy-kpi,
.economy-health-hero,
.overview-insights,
.overview-economy-health,
.first-purchase-kpis,
.first-purchase-distribution,
.first-purchase-insight {
    border-color: rgba(226, 193, 128, .23);
    background: linear-gradient(145deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .008) 38%), linear-gradient(155deg, rgba(24, 29, 33, .72), rgba(13, 17, 20, .60));
    box-shadow: 0 16px 38px rgba(0, 0, 0, .22), inset 0 1px rgba(255, 244, 221, .055), inset 1px 0 rgba(255, 255, 255, .018);
    backdrop-filter: blur(20px) saturate(125%);
    -webkit-backdrop-filter: blur(20px) saturate(125%);
}
.topbar .btn,
.btn,
input,
select,
textarea,
.overview-range,
.overview-custom-range,
.economy-resource-tabs button,
.acquisition-source-trigger,
.acquisition-source-menu {
    border-color: rgba(226, 193, 128, .20);
    background: rgba(21, 26, 30, .60);
    box-shadow: inset 0 1px rgba(255, 255, 255, .035), 0 5px 18px rgba(0, 0, 0, .12);
    backdrop-filter: blur(16px) saturate(120%);
    -webkit-backdrop-filter: blur(16px) saturate(120%);
}
.overview-range button.active,
.economy-resource-tabs button.active {
    border-color: rgba(221, 178, 94, .28);
    background: linear-gradient(145deg, rgba(207, 150, 43, .20), rgba(59, 112, 176, .14));
    color: #fff8e9;
}
.chart-grid { stroke: rgba(196, 185, 163, .18); }
.chart-y-label, .chart-x-label { fill: #aaa9a5; }

/* ============================================================
   Smoked-glass visual finish
   Keeps the existing layout/content intact while matching the
   approved warm glass dashboard direction.
   ============================================================ */
:root {
    --bg: #090b0d;
    --surface: rgba(20, 24, 28, .68);
    --surface-2: rgba(34, 38, 42, .62);
    --panel: rgba(20, 24, 28, .68);
    --border: rgba(226, 193, 128, .20);
    --text: #f6f4ef;
    --muted: #aaa9a5;
}

body {
    position: relative;
    min-height: 100vh;
    background:
        radial-gradient(circle at 87% 18%, rgba(65, 126, 188, .16), transparent 30%),
        radial-gradient(circle at 93% 70%, rgba(211, 147, 42, .16), transparent 31%),
        radial-gradient(circle at 17% 75%, rgba(177, 120, 34, .09), transparent 27%),
        linear-gradient(145deg, #080a0c 0%, #0b0e11 48%, #12100c 100%);
    background-attachment: fixed;
}

body::before {
    content: "";
    position: fixed;
    z-index: -1;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(115deg, transparent 15%, rgba(255, 255, 255, .025) 48%, transparent 70%),
        radial-gradient(circle at 46% 8%, rgba(255, 221, 164, .035), transparent 25%);
}

.topbar {
    border-color: rgba(226, 193, 128, .16);
    background: linear-gradient(105deg, rgba(9, 12, 15, .78), rgba(11, 16, 21, .64));
    box-shadow: 0 12px 38px rgba(0, 0, 0, .30), inset 0 -1px rgba(255, 255, 255, .025);
    backdrop-filter: blur(24px) saturate(135%);
    -webkit-backdrop-filter: blur(24px) saturate(135%);
}

.admin-sections {
    border-color: rgba(226, 193, 128, .18);
    background:
        radial-gradient(circle at 26% 24%, rgba(203, 149, 51, .09), transparent 32%),
        linear-gradient(180deg, rgba(15, 18, 20, .78), rgba(9, 13, 16, .66));
    box-shadow: 18px 0 44px rgba(0, 0, 0, .28), inset -1px 0 rgba(255, 255, 255, .025);
    backdrop-filter: blur(26px) saturate(125%);
    -webkit-backdrop-filter: blur(26px) saturate(125%);
}

.admin-sections-head,
.admin-sections-note,
.admin-nav-group + .admin-nav-group {
    border-color: rgba(226, 193, 128, .12);
}

.admin-nav-group.active {
    background: linear-gradient(90deg, rgba(208, 151, 45, .15), rgba(208, 151, 45, .045));
    box-shadow: inset 0 1px rgba(255, 236, 199, .035);
}

.admin-nav-group.active::before {
    background: #d6a64b;
    box-shadow: 0 0 16px rgba(214, 166, 75, .34);
}

.admin-nav-group.active .admin-section-icon,
.admin-subsections > a.active,
.overview-eyebrow,
.admin-sections-head > span { color: #e4b961; }

.admin-subsections > a.active {
    background: linear-gradient(90deg, rgba(202, 145, 43, .20), rgba(202, 145, 43, .07));
}

.card,
.overview-kpi,
.overview-decision,
.acquisition-metric,
.economy-kpi,
.economy-health-hero,
.overview-insights,
.overview-economy-health,
.first-purchase-kpis,
.first-purchase-distribution,
.first-purchase-insight {
    border-color: rgba(226, 193, 128, .23);
    background:
        linear-gradient(145deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .008) 38%),
        linear-gradient(155deg, rgba(24, 29, 33, .72), rgba(13, 17, 20, .60));
    box-shadow:
        0 16px 38px rgba(0, 0, 0, .22),
        inset 0 1px rgba(255, 244, 221, .055),
        inset 1px 0 rgba(255, 255, 255, .018);
    backdrop-filter: blur(20px) saturate(125%);
    -webkit-backdrop-filter: blur(20px) saturate(125%);
}

.overview-kpi:hover,
.overview-decision:hover,
.card:hover {
    border-color: rgba(235, 200, 132, .34);
}

.overview-insight,
.economy-coverage-item,
.economy-server-hints > div,
.first-purchase-kpis article,
.first-purchase-distribution,
.first-purchase-insight {
    background: linear-gradient(145deg, rgba(255, 255, 255, .035), rgba(9, 13, 16, .30));
}

.topbar .btn,
.btn,
input,
select,
textarea,
.overview-range,
.overview-custom-range,
.economy-resource-tabs button,
.acquisition-source-trigger,
.acquisition-source-menu {
    border-color: rgba(226, 193, 128, .20);
    background: rgba(21, 26, 30, .60);
    box-shadow: inset 0 1px rgba(255, 255, 255, .035), 0 5px 18px rgba(0, 0, 0, .12);
    backdrop-filter: blur(16px) saturate(120%);
    -webkit-backdrop-filter: blur(16px) saturate(120%);
}

.btn:hover,
.topbar .btn:hover,
.economy-resource-tabs button:hover {
    border-color: rgba(233, 194, 118, .38);
    background: rgba(44, 43, 39, .72);
}

.btn-primary {
    border-color: rgba(69, 145, 244, .68);
    background: linear-gradient(145deg, rgba(47, 132, 243, .88), rgba(30, 103, 205, .86));
}

.overview-range button.active,
.economy-resource-tabs button.active {
    border-color: rgba(221, 178, 94, .28);
    background: linear-gradient(145deg, rgba(207, 150, 43, .20), rgba(59, 112, 176, .14));
    color: #fff8e9;
}

th,
td,
.overview-previous,
.economy-nonfree-total,
.first-purchase-source-table {
    border-color: rgba(226, 193, 128, .13);
}

tbody tr:hover { background: rgba(211, 162, 72, .055); }
.chart-grid { stroke: rgba(196, 185, 163, .18); }
.chart-y-label, .chart-x-label { fill: #aaa9a5; }

@media (max-width: 760px) {
    .topbar,
    .admin-sections,
    .card,
    .overview-kpi,
    .overview-decision,
    .acquisition-metric,
    .economy-kpi {
        backdrop-filter: blur(14px) saturate(115%);
        -webkit-backdrop-filter: blur(14px) saturate(115%);
    }
}

@media (prefers-reduced-transparency: reduce) {
    .topbar,
    .admin-sections,
    .card,
    .overview-kpi,
    .overview-decision,
    .acquisition-metric,
    .economy-kpi {
        background-color: #12171b;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }
}

@media (min-width: 1101px) and (max-width: 1550px) {
    .overview-kpi > strong { font-size: clamp(20px, 1.55vw, 24px); }
}

.page-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}
.page-head h1 { font-size: 20px; margin: 0; }

/* ---------- Overview ---------- */
.overview-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 18px;
}
.overview-head h1 { margin: 2px 0 4px; font-size: 28px; letter-spacing: -.03em; }
.overview-head p { margin: 0; color: var(--muted); }
.overview-eyebrow { color: #75a7fa; font-size: 11px; font-weight: 800; letter-spacing: .16em; }
.overview-controls { display: flex; align-items: flex-end; flex-direction: column; gap: 8px; }
.overview-range {
    display: flex;
    padding: 3px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
}
.overview-range button {
    border: 0;
    border-radius: 7px;
    padding: 7px 12px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    font: inherit;
    font-size: 12px;
    font-weight: 600;
}
.overview-range button:hover { color: var(--text); }
.overview-range button.active { background: var(--surface-2); color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.25); }
.overview-custom-range {
    display: flex;
    align-items: flex-end;
    gap: 7px;
    padding: 7px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
}
.overview-custom-range.active { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(59,130,246,.08); }
.overview-custom-range > span { padding-bottom: 8px; color: var(--muted); font-size: 11px; }
.overview-custom-range label {
    margin: 0;
    color: var(--muted);
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: .05em;
}
.overview-custom-range input {
    display: block;
    width: 128px;
    margin-top: 3px;
    padding: 6px 7px;
    border-radius: 7px;
    font-size: 11px;
    color-scheme: dark;
}
.overview-custom-range button {
    padding: 7px 11px;
    border: 1px solid var(--primary);
    border-radius: 7px;
    background: rgba(59,130,246,.14);
    color: #8ab8ff;
    cursor: pointer;
    font: inherit;
    font-size: 11px;
    font-weight: 700;
}
.overview-custom-range button:hover { background: var(--primary); color: #fff; }
.overview-loading { min-height: 240px; display: grid; place-items: center; }
.overview-meta {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 10px;
    color: var(--muted);
    font-size: 11px;
}
.overview-live-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    margin-right: 5px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 0 4px rgba(34,197,94,.1);
}
.overview-insights {
    margin-bottom: 12px;
    padding: 13px 14px;
    border: 1px solid rgba(59,130,246,.22);
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(59,130,246,.07), rgba(139,92,246,.035));
}
.overview-insights-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}
.overview-insights-head div { display: flex; align-items: baseline; gap: 9px; }
.overview-insights-head div > span {
    color: #75a7fa;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .08em;
}
.overview-insights-head strong { font-size: 13px; }
.overview-insights-head small { color: var(--muted); font-size: 9px; }
.overview-insight-list {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}
.overview-insight {
    display: grid;
    grid-template-columns: 7px minmax(0, 1fr);
    gap: 8px;
    min-width: 0;
    padding: 9px 10px;
    border: 1px solid rgba(139,152,165,.14);
    border-radius: 8px;
    background: rgba(15,23,34,.54);
}
.overview-insight > i {
    width: 7px;
    height: 7px;
    margin-top: 4px;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 0 0 3px rgba(59,130,246,.1);
}
.overview-insight.warning > i { background: #f59e0b; box-shadow: 0 0 0 3px rgba(245,158,11,.1); }
.overview-insight.positive > i { background: var(--success); box-shadow: 0 0 0 3px rgba(34,197,94,.1); }
.overview-insight div { min-width: 0; }
.overview-insight strong, .overview-insight span { display: block; }
.overview-insight strong { margin-bottom: 3px; font-size: 10px; }
.overview-insight span { color: var(--muted); font-size: 9px; line-height: 1.45; }
.overview-decision-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 12px;
}
.overview-decision {
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    min-width: 0;
    padding: 11px 12px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: rgba(24,34,47,.72);
}
.overview-decision::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 2px;
    background: var(--primary);
}
.overview-decision.green::before { background: var(--success); }
.overview-decision.orange::before { background: #f59e0b; }
.overview-decision.violet::before { background: #8b5cf6; }
.overview-decision > div { min-width: 0; }
.overview-decision > div > span,
.overview-decision small { display: block; color: var(--muted); }
.overview-decision > div > span { font-size: 9px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.overview-decision strong { display: block; margin: 5px 0 3px; font-size: 19px; line-height: 1; }
.overview-decision small { overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.overview-kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 12px;
}
.overview-kpi {
    position: relative;
    min-width: 0;
    padding: 14px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
}
.overview-kpi::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 3px;
    background: var(--primary);
}
.overview-kpi.violet::before { background: #8b5cf6; }
.overview-kpi.cyan::before { background: #06b6d4; }
.overview-kpi.green::before { background: var(--success); }
.overview-kpi.orange::before { background: #f59e0b; }
.overview-kpi-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.overview-kpi-top > span:first-child {
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
}
.overview-kpi > strong {
    display: block;
    margin: 9px 0 4px;
    overflow: hidden;
    font-size: 25px;
    line-height: 1;
    letter-spacing: -.03em;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.overview-kpi small, .overview-previous { display: block; color: var(--muted); font-size: 10px; }
.overview-previous { margin-top: 10px; padding-top: 9px; border-top: 1px solid rgba(139,152,165,.14); }
.overview-delta { padding: 2px 6px; border-radius: 999px; font-size: 10px; font-weight: 700; }
.overview-delta.positive { color: #65d88a; background: rgba(34,197,94,.12); }
.overview-delta.negative { color: #ff8585; background: rgba(239,68,68,.12); }
.overview-delta.flat { color: var(--muted); background: rgba(139,152,165,.1); }
.overview-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 12px;
}
.overview-panel { padding: 16px; overflow: hidden; }
.overview-panel-wide { grid-column: span 2; }
.overview-panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}
.overview-panel-head h2 { margin: 0 0 3px; font-size: 15px; }
.overview-panel-head p { margin: 0; color: var(--muted); font-size: 11px; }
.overview-legend { display: flex; flex-wrap: wrap; gap: 12px; color: var(--muted); font-size: 10px; }
.overview-legend span { display: flex; align-items: center; gap: 5px; }
.legend-dot { width: 7px; height: 7px; border-radius: 50%; }
.legend-dot.active { background: var(--primary); }
.legend-dot.new { background: var(--success); }
.overview-chart { display: block; width: 100%; min-height: 190px; overflow: visible; }
.overview-chart.revenue { min-height: 155px; }
.chart-grid { stroke: var(--border); stroke-width: 1; }
.chart-y-label { fill: var(--muted); font-size: 9px; text-anchor: end; }
.chart-x-label { fill: var(--muted); font-size: 9px; text-anchor: middle; }
.chart-line { fill: none; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.chart-line.active { stroke: var(--primary); }
.chart-line.new { stroke: var(--success); stroke-dasharray: 5 4; }
.chart-hover-point { outline: none; }
.chart-hover-hit { fill: transparent; pointer-events: all; cursor: crosshair; }
.chart-hover-detail { opacity: 0; pointer-events: none; transition: opacity .12s ease; }
.chart-hover-point:hover .chart-hover-detail,
.chart-hover-point:focus .chart-hover-detail { opacity: 1; }
.chart-hover-guide { stroke: rgba(148,163,184,.5); stroke-width: 1; stroke-dasharray: 3 3; }
.chart-hover-dot { stroke: #17202c; stroke-width: 2; }
.chart-hover-dot.active, .chart-tooltip-dot.active { fill: var(--primary); }
.chart-hover-dot.new, .chart-tooltip-dot.new { fill: var(--success); }
.chart-tooltip > rect {
    fill: #111925;
    stroke: rgba(148,163,184,.32);
    stroke-width: 1;
    filter: drop-shadow(0 5px 10px rgba(0,0,0,.28));
}
.chart-tooltip-date { fill: var(--text); font-size: 10px; font-weight: 700; }
.chart-tooltip-label { fill: var(--muted); font-size: 9px; }
.chart-tooltip-value { fill: var(--text); font-size: 10px; font-weight: 800; text-anchor: end; }
.revenue-bar { fill: #22c55e; opacity: .72; transition: opacity .15s; }
.revenue-hover-point:hover .revenue-bar,
.revenue-hover-point:focus .revenue-bar { opacity: 1; }
.revenue-tooltip-dot { fill: var(--success); stroke: #17202c; stroke-width: 2; }
.purchase-tooltip-dot { fill: #8b5cf6; }
.overview-chart-empty { min-height: 150px; display: grid; place-items: center; color: var(--muted); font-size: 12px; }
.retention-list { display: grid; gap: 17px; }
.retention-row-head, .platform-row-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.retention-row-head strong, .platform-row-head strong { font-size: 12px; }
.retention-row-head > div { display: flex; align-items: center; gap: 7px; }
.retention-value { color: #75a7fa; font-size: 15px; font-weight: 800; }
.retention-quality {
    padding: 2px 5px;
    border-radius: 99px;
    background: rgba(245,158,11,.12);
    color: #f5bd56;
    font-size: 8px;
    font-style: normal;
    font-weight: 700;
}
.retention-track, .platform-track {
    height: 7px;
    margin: 7px 0 5px;
    overflow: hidden;
    border-radius: 99px;
    background: var(--surface-2);
}
.retention-track i, .platform-track i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #3b82f6, #8b5cf6); }
.retention-track.unavailable { background: repeating-linear-gradient(135deg, var(--surface-2), var(--surface-2) 5px, rgba(139,152,165,.1) 5px, rgba(139,152,165,.1) 10px); }
.retention-row small, .platform-row small { color: var(--muted); font-size: 9px; }
.overview-footnote { margin-top: 18px; color: var(--muted); font-size: 9px; line-height: 1.5; }
.platform-list { display: grid; gap: 15px; }
.platform-row-head span { display: flex; align-items: center; gap: 7px; color: var(--text); font-size: 11px; }
.platform-row-head span i { width: 8px; height: 8px; border-radius: 3px; }
.overview-money-summary { display: flex; flex-direction: column; align-items: flex-end; white-space: nowrap; }
.overview-money-summary strong { color: #65d88a; font-size: 17px; }
.overview-money-summary span { margin-top: 3px; color: var(--muted); font-size: 9px; }
.overview-scope {
    padding: 12px 14px;
    border: 1px solid rgba(245,158,11,.28);
    border-radius: 9px;
    background: rgba(245,158,11,.06);
    color: var(--muted);
    font-size: 11px;
    line-height: 1.6;
}
.overview-scope strong { margin-right: 6px; color: #f5bd56; }

/* ---------- Economy ---------- */
.overview-economy-health {
    display: grid;
    grid-template-columns: auto minmax(190px, .8fr) minmax(360px, 1.35fr) auto;
    align-items: center;
    gap: 14px;
    margin: 0 0 12px;
    padding: 12px 14px;
    border: 1px solid rgba(245, 158, 11, .3);
    border-radius: 10px;
    background: linear-gradient(120deg, rgba(245, 158, 11, .09), rgba(59, 130, 246, .055));
    color: var(--text);
    text-decoration: none;
    transition: border-color .15s, transform .15s;
}
.overview-economy-health:hover { border-color: #f5bd56; transform: translateY(-1px); }
.overview-economy-health.processing { grid-template-columns: auto minmax(220px, 1fr) minmax(260px, .8fr); cursor: wait; }
.overview-economy-health.processing:hover { border-color: rgba(245, 158, 11, .3); transform: none; }
.overview-economy-health.unavailable { grid-template-columns: auto minmax(0, 1fr) auto; }
.overview-economy-symbol, .overview-economy-processing {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(245, 158, 11, .35);
    border-radius: 50%;
    background: rgba(245, 158, 11, .08);
    color: #f5bd56;
    font-size: 18px;
    font-weight: 800;
}
.overview-economy-processing i { width: 18px; height: 18px; border: 2px solid rgba(245, 189, 86, .22); border-top-color: #f5bd56; border-radius: 50%; animation: economy-spin .75s linear infinite; }
.overview-economy-copy { min-width: 0; }
.overview-economy-copy > span { display: block; color: #f5bd56; font-size: 9px; font-weight: 800; letter-spacing: .1em; }
.overview-economy-copy strong { display: block; margin: 3px 0; font-size: 12px; }
.overview-economy-copy small, .overview-economy-resource span, .overview-economy-resource small { color: var(--muted); font-size: 9px; }
.overview-economy-resources { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-left: 1px solid var(--border); }
.overview-economy-resource { min-width: 0; padding: 0 16px; border-right: 1px solid var(--border); }
.overview-economy-resource:last-child { border-right: 0; }
.overview-economy-resource span, .overview-economy-resource strong, .overview-economy-resource small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.overview-economy-resource strong { margin: 2px 0; font-size: 12px; }
.overview-economy-resource.balanced strong { color: #4ade80; }
.overview-economy-resource.inflation strong { color: #f5bd56; }
.overview-economy-resource.inflation.high strong { color: #fb7185; }
.overview-economy-resource.scarcity strong { color: #8ab8ff; }
.overview-economy-resource.scarcity.high strong { color: #b9a0ff; }
.overview-economy-resource.unknown strong { color: var(--muted); }
.overview-economy-processing-bars { display: grid; gap: 8px; }
.overview-economy-processing-bars i { display: block; height: 8px; border-radius: 99px; background: linear-gradient(90deg, rgba(245, 158, 11, .08), rgba(245, 158, 11, .26), rgba(245, 158, 11, .08)); background-size: 200% 100%; animation: economy-shimmer 1.2s ease-in-out infinite; }
.overview-economy-processing-bars i:last-child { width: 72%; }
.overview-economy-open { color: #8ab8ff; font-size: 10px; font-weight: 700; white-space: nowrap; }
@keyframes economy-spin { to { transform: rotate(360deg); } }
@keyframes economy-shimmer { to { background-position: -200% 0; } }

.economy-page-head { margin-bottom: 14px; }
.economy-mix-section {
    margin-bottom: 12px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: linear-gradient(145deg, rgba(31, 41, 55, .96), rgba(19, 27, 38, .98));
}
.economy-mix-head { margin-bottom: 13px; }
.economy-mix-head h2 { font-size: 15px; }
.economy-mix-scope { padding: 4px 8px; border-radius: 99px; background: rgba(138, 184, 255, .08); color: #9db9df; font-size: 8px; }
.economy-mix-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.economy-mix-card {
    display: block;
    min-width: 0;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: rgba(14, 21, 31, .58);
    color: var(--text);
    cursor: pointer;
    text-align: left;
    transition: border-color .15s ease, background .15s ease, transform .15s ease;
}
.economy-mix-card:hover { border-color: #526173; background: rgba(25, 35, 49, .82); transform: translateY(-1px); }
.economy-mix-card.selected { border-color: rgba(124, 109, 255, .62); box-shadow: inset 0 0 0 1px rgba(124, 109, 255, .12); }
.economy-mix-card.on-target { background: linear-gradient(145deg, rgba(20, 54, 48, .42), rgba(14, 21, 31, .62)); }
.economy-mix-card.unavailable { cursor: default; opacity: .65; }
.economy-mix-card-title, .economy-mix-values, .economy-mix-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.economy-mix-card-title > div { min-width: 0; }
.economy-mix-card-title span, .economy-mix-card-title small { display: block; }
.economy-mix-card-title span { font-size: 13px; font-weight: 800; }
.economy-mix-card-title small { margin-top: 3px; overflow: hidden; color: var(--muted); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.economy-mix-card-title b { flex: none; padding: 4px 7px; border-radius: 99px; font-size: 8px; letter-spacing: .03em; text-transform: uppercase; }
.economy-mix-card-title b.good { background: rgba(34, 197, 94, .12); color: #4ade80; }
.economy-mix-card-title b.warning { background: rgba(245, 158, 11, .12); color: #f5bd56; }
.economy-mix-values { justify-content: flex-start; margin-top: 14px; }
.economy-mix-values > div { display: grid; grid-template-columns: auto auto; align-items: baseline; gap: 2px 7px; min-width: 120px; }
.economy-mix-values span { color: #7be3a5; font-size: 9px; font-weight: 750; text-transform: uppercase; }
.economy-mix-values .free span { color: #b9a0ff; }
.economy-mix-values strong { font-size: clamp(20px, 2vw, 28px); line-height: 1; }
.economy-mix-values small { grid-column: 1 / -1; color: var(--muted); font-size: 8px; }
.economy-mix-track { display: flex; width: 100%; height: 9px; margin: 12px 0 8px; overflow: hidden; border-radius: 99px; background: #293443; }
.economy-mix-track i { display: block; height: 100%; }
.economy-mix-track .paid { flex: none; background: linear-gradient(90deg, #22c55e, #4ade80); }
.economy-mix-track .free { flex: 1; background: linear-gradient(90deg, #8b5cf6, #a78bfa); }
.economy-mix-foot { color: var(--muted); font-size: 8px; }
.economy-health-hero {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) 190px;
    align-items: center;
    gap: 20px;
    margin-bottom: 12px;
    padding: 18px 20px;
    border: 1px solid rgba(245, 158, 11, .32);
    border-radius: 12px;
    background:
        radial-gradient(circle at 8% 50%, rgba(245, 158, 11, .13), transparent 25%),
        linear-gradient(135deg, rgba(31, 41, 55, .96), rgba(18, 27, 39, .98));
}
.economy-health-score {
    --score: 0;
    position: relative;
    display: grid;
    place-content: center;
    width: 92px;
    height: 92px;
    border-radius: 50%;
    background: conic-gradient(#f59e0b calc(var(--score) * 1%), #293443 0);
    text-align: center;
}
.economy-health-score::before { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: #171f2a; }
.economy-health-score strong, .economy-health-score span { position: relative; z-index: 1; }
.economy-health-score strong { font-size: 25px; line-height: 1; }
.economy-health-score span { margin-top: 4px; color: var(--muted); font-size: 9px; }
.economy-health-score.compact { width: 48px; height: 48px; }
.economy-health-score.compact::before { inset: 4px; }
.economy-health-score.compact strong { font-size: 11px; }
.economy-health-message > div { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 10px; }
.economy-health-message h2 { margin: 7px 0 4px; font-size: 18px; }
.economy-health-message p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.economy-status { padding: 3px 7px; border-radius: 99px; font-size: 8px; font-weight: 800; letter-spacing: .06em; }
.economy-status.provisional { background: rgba(245, 158, 11, .14); color: #f5bd56; }
.economy-health-coverage { display: flex; flex-direction: column; align-items: flex-end; padding-left: 18px; border-left: 1px solid var(--border); }
.economy-health-coverage strong { font-size: 20px; }
.economy-health-coverage span { margin: 3px 0 9px; color: var(--muted); font-size: 9px; }
.economy-health-coverage > div { width: 100%; height: 6px; overflow: hidden; border-radius: 99px; background: #293443; }
.economy-health-coverage i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #f59e0b, #3b82f6); }
.economy-health-flow small { margin-bottom: 5px; color: var(--muted); font-size: 8px; text-transform: uppercase; letter-spacing: .08em; }
.economy-health-flow strong { max-width: 190px; font-size: 14px; text-align: right; }
.economy-health-flow.balanced strong { color: #4ade80; }
.economy-health-flow.inflation strong { color: #f5bd56; }
.economy-health-flow.inflation.high strong { color: #fb7185; }
.economy-health-flow.scarcity strong { color: #8ab8ff; }
.economy-health-flow.scarcity.high strong { color: #b9a0ff; }

.economy-server-hints { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.economy-server-hints > div { display: grid; grid-template-columns: 24px 1fr; gap: 9px; align-items: start; padding: 10px 11px; border: 1px solid rgba(245, 158, 11, .22); border-radius: 9px; background: rgba(245, 158, 11, .055); }
.economy-server-hints > div > span { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: rgba(245, 158, 11, .15); color: #f5bd56; font-weight: 900; }
.economy-server-hints p, .economy-server-hints strong { display: block; margin: 0; }
.economy-server-hints strong { margin-bottom: 2px; color: #f8cc78; font-size: 10px; }
.economy-server-hints p { color: var(--muted); font-size: 9px; line-height: 1.45; }

.economy-resource-tabs { display: flex; gap: 7px; margin-bottom: 12px; overflow-x: auto; }
.economy-resource-tabs button { display: flex; align-items: baseline; gap: 7px; min-width: 120px; padding: 9px 11px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface); color: var(--muted); cursor: pointer; text-align: left; }
.economy-resource-tabs button:hover { border-color: #526173; color: var(--text); }
.economy-resource-tabs button.active { border-color: var(--primary); background: rgba(59, 130, 246, .1); color: #8ab8ff; }
.economy-resource-tabs button span { font-size: 11px; font-weight: 750; }
.economy-resource-tabs button small { font-size: 8px; white-space: nowrap; }

.economy-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.economy-kpi { position: relative; overflow: hidden; min-width: 0; padding: 13px 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.economy-kpi::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--primary); }
.economy-kpi.source::before { background: #22c55e; }
.economy-kpi.sink::before { background: #ef4444; }
.economy-kpi.ratio::before { background: #8b5cf6; }
.economy-kpi > div { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.economy-kpi span { color: #9db1cb; font-size: 9px; font-weight: 750; letter-spacing: .04em; text-transform: uppercase; }
.economy-kpi em { padding: 2px 6px; border-radius: 99px; font-size: 8px; font-style: normal; font-weight: 800; }
.economy-kpi em.up { background: rgba(34, 197, 94, .12); color: #4ade80; }
.economy-kpi em.down { background: rgba(239, 68, 68, .12); color: #fb7185; }
.economy-kpi > strong { display: block; margin: 7px 0 3px; overflow: hidden; font-size: 22px; text-overflow: ellipsis; }
.economy-kpi small { color: var(--muted); font-size: 8px; }

.economy-main-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(260px, .9fr); gap: 12px; margin-bottom: 12px; }
.economy-panel { padding: 16px; }
.economy-flow-legend { display: flex; gap: 12px; color: var(--muted); font-size: 9px; }
.economy-flow-legend span::before { content: ""; display: inline-block; width: 8px; height: 3px; margin-right: 5px; vertical-align: middle; border-radius: 99px; }
.economy-flow-legend .source::before { background: #22c55e; }
.economy-flow-legend .sink::before { background: #ef4444; }
.economy-trend-chart { display: block; width: 100%; min-height: 220px; overflow: visible; }
.economy-trend-line { fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.economy-trend-line.source { stroke: #22c55e; }
.economy-trend-line.sink { stroke: #ef4444; stroke-dasharray: 5 4; }
.economy-trend-dot { stroke: #17202c; stroke-width: 2; cursor: crosshair; }
.economy-trend-dot.source { fill: #22c55e; }
.economy-trend-dot.sink { fill: #ef4444; }
.economy-trend-dot:hover { r: 5px; }
.economy-tooltip-dot.source { fill: #22c55e; }
.economy-tooltip-dot.sink { fill: #ef4444; }

.economy-origin-list { display: grid; gap: 13px; }
.economy-origin-row > div:first-child { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 10px; }
.economy-origin-row span { display: flex; align-items: center; gap: 6px; }
.economy-origin-row span i { width: 8px; height: 8px; border-radius: 3px; }
.economy-origin-row span b { padding: 2px 4px; border-radius: 4px; background: rgba(245, 158, 11, .12); color: #f5bd56; font-size: 6px; letter-spacing: .05em; }
.economy-origin-row small { color: var(--muted); font-size: 8px; }
.economy-origin-track { height: 6px; margin: 6px 0 4px; overflow: hidden; border-radius: 99px; background: #293443; }
.economy-origin-track i { display: block; height: 100%; border-radius: inherit; }
.economy-nonfree-total { display: grid; grid-template-columns: 1fr auto; gap: 3px 10px; margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--border); }
.economy-nonfree-total span { color: var(--muted); font-size: 9px; }
.economy-nonfree-total strong { color: #f5bd56; font-size: 13px; }
.economy-nonfree-total small { grid-column: 1 / -1; color: var(--muted); font-size: 8px; }

.economy-event-panel, .economy-coverage-panel { margin-bottom: 12px; }
.economy-resource-label { padding: 4px 8px; border-radius: 99px; background: rgba(59, 130, 246, .12); color: #8ab8ff; font-size: 9px; font-weight: 700; }
.economy-event-table { min-width: 850px; }
.economy-event-table td, .economy-event-table th { padding: 9px 8px; font-size: 9px; }
.economy-event-table td.amount { color: var(--text); font-weight: 750; }
.economy-hint { display: inline-grid; place-items: center; width: 15px; height: 15px; margin-left: 6px; border-radius: 50%; background: rgba(245, 158, 11, .14); color: #f5bd56; cursor: help; font-size: 8px; }
.economy-flow-pill, .economy-origin-pill, .economy-quality { padding: 3px 6px; border-radius: 99px; font-size: 7px; font-weight: 750; text-transform: uppercase; }
.economy-flow-pill.source { background: rgba(34, 197, 94, .12); color: #4ade80; }
.economy-flow-pill.sink { background: rgba(239, 68, 68, .12); color: #fb7185; }
.economy-origin-pill.system { background: rgba(59, 130, 246, .12); color: #8ab8ff; }
.economy-origin-pill.earned { background: rgba(139, 92, 246, .12); color: #b9a0ff; }
.economy-origin-pill.paid { background: rgba(34, 197, 94, .12); color: #4ade80; }
.economy-origin-pill.external { background: rgba(245, 158, 11, .12); color: #f5bd56; }
.economy-quality.observed { background: rgba(34, 197, 94, .1); color: #65d88a; }
.economy-quality.inferred { background: rgba(245, 158, 11, .1); color: #f5bd56; }

.economy-coverage-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; }
.economy-coverage-item { display: grid; grid-template-columns: 24px minmax(0, 1fr); align-items: center; gap: 7px; padding: 8px; border: 1px solid var(--border); border-radius: 8px; background: rgba(15, 20, 25, .32); }
.economy-coverage-item > i { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; font-size: 9px; font-style: normal; font-weight: 850; }
.economy-coverage-item.tracked > i { background: rgba(34, 197, 94, .12); color: #4ade80; }
.economy-coverage-item.missing > i { background: rgba(139, 152, 165, .1); color: var(--muted); }
.economy-coverage-item strong, .economy-coverage-item span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.economy-coverage-item strong { font-size: 9px; }
.economy-coverage-item span { margin-top: 2px; color: var(--muted); font-size: 7px; }
.economy-coverage-item.missing { opacity: .62; }
.economy-scope { margin-top: 0; }

@media (max-width: 850px) {
    .economy-health-hero { grid-template-columns: auto 1fr; }
    .economy-health-coverage { grid-column: 1 / -1; align-items: flex-start; padding: 12px 0 0; border-left: 0; border-top: 1px solid var(--border); }
    .economy-server-hints, .economy-main-grid, .economy-mix-grid { grid-template-columns: 1fr; }
    .economy-kpis, .economy-coverage-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .overview-economy-health { grid-template-columns: auto 1fr auto; }
    .overview-economy-health.processing { grid-template-columns: auto 1fr; }
    .overview-economy-health.processing .overview-economy-processing-bars { grid-column: 1 / -1; }
    .overview-economy-resources { grid-column: 1 / -1; padding-top: 10px; border-top: 1px solid var(--border); border-left: 0; }
}

@media (max-width: 580px) {
    .economy-health-hero { grid-template-columns: 1fr; text-align: center; }
    .economy-health-score { margin: auto; }
    .economy-health-message > div { justify-content: center; }
    .economy-kpis, .economy-coverage-grid { grid-template-columns: 1fr; }
    .overview-economy-resources { grid-template-columns: 1fr; gap: 10px; }
    .overview-economy-resource { padding: 0; border-right: 0; }
    .overview-economy-open { display: none; }
    .economy-mix-section { padding: 12px; }
    .economy-mix-head, .economy-mix-card-title, .economy-mix-foot { align-items: flex-start; flex-direction: column; }
    .economy-mix-values { justify-content: space-between; }
}

/* ---------- Realtime ---------- */
.realtime-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 18px;
}
.realtime-head h1 { margin: 2px 0 4px; font-size: 28px; letter-spacing: -.03em; }
.realtime-head p { margin: 0; color: var(--muted); }
.realtime-controls { display: flex; align-items: center; gap: 8px; }
.realtime-pause {
    min-width: 68px;
    padding: 10px 13px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
    font: inherit;
    font-size: 12px;
    font-weight: 700;
}
.realtime-pause.paused { border-color: #f59e0b; color: #f5bd56; background: rgba(245,158,11,.08); }
.realtime-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
    color: var(--muted);
    font-size: 11px;
}
.realtime-ccu {
    display: grid;
    grid-template-columns: minmax(170px, .8fr) minmax(130px, .55fr) minmax(170px, .75fr) minmax(280px, 1.9fr);
    align-items: stretch;
    gap: 0;
    margin-bottom: 12px;
    padding: 0;
    overflow: hidden;
}
.realtime-ccu > div { min-width: 0; padding: 14px 16px; border-left: 1px solid var(--border); }
.realtime-ccu > div:first-child { border-left: 0; }
.realtime-ccu-current { background: linear-gradient(135deg, rgba(34,197,94,.11), transparent); }
.realtime-ccu-current > span,
.realtime-ccu-stat > span,
.realtime-ccu-chart > span {
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--muted);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.realtime-ccu-current > span i { width: 7px; height: 7px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 5px rgba(34,197,94,.1); animation: realtime-pulse 1.8s infinite; }
.realtime-ccu-current > strong { display: block; margin: 6px 0 3px; font-size: 31px; line-height: 1; }
.realtime-ccu-current p,
.realtime-ccu-stat small { margin: 0; color: var(--muted); font-size: 9px; line-height: 1.45; }
.realtime-ccu-stat { display: flex; flex-direction: column; justify-content: center; }
.realtime-ccu-stat strong { display: block; margin: 6px 0 3px; font-size: 21px; }
.realtime-ccu-stat small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.realtime-ccu-chart { display: flex; flex-direction: column; min-height: 102px; }
.realtime-ccu-chart svg { width: 100%; height: 70px; margin-top: 5px; overflow: visible; }
.realtime-ccu-chart path { fill: none; stroke: #65d88a; stroke-width: 2.5; vector-effect: non-scaling-stroke; }
.realtime-ccu.unavailable { display: block; padding: 14px 16px; }
.realtime-ccu.unavailable > div { padding: 0; border: 0; }
.realtime-ccu.unavailable h2 { margin: 5px 0; font-size: 18px; }
.realtime-ccu.unavailable p { margin: 0; color: var(--muted); font-size: 10px; }
.realtime-status { display: inline-flex; align-items: center; gap: 7px; }
.realtime-status i {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 0 4px rgba(34,197,94,.1);
}
.realtime-status.live i { animation: realtime-pulse 1.8s infinite; }
.realtime-status.paused i { background: #f59e0b; box-shadow: 0 0 0 4px rgba(245,158,11,.1); }
.realtime-status.offline i { background: var(--danger); box-shadow: 0 0 0 4px rgba(239,68,68,.1); }
@keyframes realtime-pulse {
    0%, 100% { box-shadow: 0 0 0 3px rgba(34,197,94,.12); }
    50% { box-shadow: 0 0 0 7px rgba(34,197,94,0); }
}
.realtime-alert {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 12px;
    padding: 10px 13px;
    border: 1px solid rgba(245,158,11,.3);
    border-radius: 9px;
    background: rgba(245,158,11,.06);
    color: var(--muted);
    font-size: 11px;
}
.realtime-alert > strong { color: #f5bd56; }
.realtime-alert b { color: var(--border); }
.realtime-alert .danger { color: #ff8585; font-weight: 700; }
.realtime-alert .warning { color: #f5bd56; font-weight: 700; }
.realtime-health {
    margin-bottom: 12px;
    overflow: hidden;
    border: 1px solid rgba(34,197,94,.28);
    border-radius: 11px;
    background: linear-gradient(135deg, rgba(34,197,94,.08), rgba(24,34,47,.76));
}
.realtime-health.warning {
    border-color: rgba(245,158,11,.34);
    background: linear-gradient(135deg, rgba(245,158,11,.09), rgba(24,34,47,.76));
}
.realtime-health.critical {
    border-color: rgba(239,68,68,.4);
    background: linear-gradient(135deg, rgba(239,68,68,.11), rgba(24,34,47,.76));
}
.realtime-health.quiet {
    border-color: rgba(139,152,165,.25);
    background: linear-gradient(135deg, rgba(139,152,165,.07), rgba(24,34,47,.76));
}
.realtime-health-summary {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 14px;
}
.realtime-health-icon {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 50%;
    background: rgba(34,197,94,.13);
}
.realtime-health-icon i {
    width: 12px;
    height: 12px;
    border: 3px solid #65d88a;
    border-radius: 50%;
    box-shadow: 0 0 0 5px rgba(34,197,94,.08);
}
.realtime-health.warning .realtime-health-icon { background: rgba(245,158,11,.13); }
.realtime-health.warning .realtime-health-icon i { border-color: #f5bd56; box-shadow: 0 0 0 5px rgba(245,158,11,.08); }
.realtime-health.critical .realtime-health-icon { background: rgba(239,68,68,.13); }
.realtime-health.critical .realtime-health-icon i { border-color: #ff8585; box-shadow: 0 0 0 5px rgba(239,68,68,.08); }
.realtime-health.quiet .realtime-health-icon { background: rgba(139,152,165,.12); }
.realtime-health.quiet .realtime-health-icon i { border-color: var(--muted); box-shadow: 0 0 0 5px rgba(139,152,165,.07); }
.realtime-health-summary > div:nth-child(2) > span {
    display: block;
    margin-bottom: 3px;
    color: #65d88a;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
}
.realtime-health.warning .realtime-health-summary > div:nth-child(2) > span { color: #f5bd56; }
.realtime-health.critical .realtime-health-summary > div:nth-child(2) > span { color: #ff8585; }
.realtime-health.quiet .realtime-health-summary > div:nth-child(2) > span { color: var(--muted); }
.realtime-health-summary h2 { margin: 0 0 3px; font-size: 16px; }
.realtime-health-summary p { margin: 0; color: var(--muted); font-size: 10px; }
.realtime-health-summary > strong {
    padding: 5px 9px;
    border-radius: 999px;
    background: rgba(34,197,94,.12);
    color: #65d88a;
    font-size: 10px;
}
.realtime-health.warning .realtime-health-summary > strong { background: rgba(245,158,11,.12); color: #f5bd56; }
.realtime-health.critical .realtime-health-summary > strong { background: rgba(239,68,68,.14); color: #ff8585; }
.realtime-health.quiet .realtime-health-summary > strong { background: rgba(139,152,165,.12); color: var(--muted); }
.realtime-health-checks {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    border-top: 1px solid rgba(139,152,165,.12);
}
.realtime-health-checks article {
    display: grid;
    grid-template-columns: 8px minmax(0, 1fr);
    gap: 8px;
    min-width: 0;
    padding: 11px 12px;
    border-left: 1px solid rgba(139,152,165,.12);
}
.realtime-health-checks article:first-child { border-left: 0; }
.realtime-health-checks article > i {
    width: 8px;
    height: 8px;
    margin-top: 3px;
    border-radius: 50%;
    background: var(--success);
}
.realtime-health-checks article.warning > i { background: #f59e0b; }
.realtime-health-checks article.critical > i { background: var(--danger); }
.realtime-health-checks article.quiet > i { background: var(--muted); }
.realtime-health-checks strong,
.realtime-health-checks span,
.realtime-health-checks small { display: block; }
.realtime-health-checks strong { margin-bottom: 3px; font-size: 10px; }
.realtime-health-checks span {
    min-height: 26px;
    color: var(--muted);
    font-size: 9px;
    line-height: 1.4;
}
.realtime-health-checks small { margin-top: 5px; color: #65d88a; font-size: 8px; }
.realtime-health-checks article.warning small { color: #f5bd56; }
.realtime-health-checks article.critical small { color: #ff8585; }
.realtime-health-checks article.quiet small { color: var(--muted); }
.realtime-kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 12px;
}
.realtime-kpi {
    position: relative;
    min-width: 0;
    padding: 13px 14px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
}
.realtime-kpi::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 3px;
    background: var(--primary);
}
.realtime-kpi.cyan::before { background: #06b6d4; }
.realtime-kpi.violet::before { background: #8b5cf6; }
.realtime-kpi.orange::before { background: #f59e0b; }
.realtime-kpi.green::before { background: var(--success); }
.realtime-kpi.red::before { background: var(--danger); }
.realtime-kpi-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.realtime-kpi-head > span {
    display: block;
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
}
.realtime-kpi-head > em {
    padding: 2px 5px;
    border-radius: 999px;
    background: rgba(139,152,165,.1);
    color: var(--muted);
    font-size: 8px;
    font-style: normal;
    font-weight: 700;
}
.realtime-kpi-head > em.positive { background: rgba(34,197,94,.12); color: #65d88a; }
.realtime-kpi-head > em.negative { background: rgba(239,68,68,.12); color: #ff8585; }
.realtime-kpi > strong { display: block; margin: 7px 0 4px; font-size: 23px; line-height: 1; }
.realtime-kpi > small {
    display: block;
    overflow: hidden;
    color: var(--muted);
    font-size: 9px;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.realtime-kpi > .realtime-previous {
    margin-top: 8px;
    padding-top: 7px;
    border-top: 1px solid rgba(139,152,165,.12);
    font-size: 8px;
}
.realtime-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.65fr) minmax(280px, 1fr);
    gap: 12px;
    margin-bottom: 12px;
}
.realtime-layout-bottom { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.realtime-panel { min-width: 0; padding: 15px; }
.realtime-panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}
.realtime-panel-head h2 { margin: 0 0 3px; font-size: 15px; }
.realtime-panel-head p { margin: 0; color: var(--muted); font-size: 10px; }
.realtime-count {
    min-width: 28px;
    padding: 4px 7px;
    border-radius: 999px;
    background: var(--surface-2);
    color: var(--text);
    font-size: 10px;
    font-weight: 700;
    text-align: center;
}
.realtime-filters { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; }
.realtime-filters button {
    padding: 4px 7px;
    border: 1px solid transparent;
    border-radius: 6px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    font: inherit;
    font-size: 9px;
}
.realtime-filters button:hover { color: var(--text); }
.realtime-filters button.active { border-color: var(--border); background: var(--surface-2); color: var(--text); }
.realtime-feed,
.realtime-match-list,
.realtime-error-list,
.realtime-coverage {
    max-height: 390px;
    overflow-y: auto;
    scrollbar-color: var(--border) transparent;
}
.realtime-event {
    display: grid;
    grid-template-columns: 8px minmax(0, 1fr) auto;
    gap: 10px;
    padding: 10px 2px;
    border-top: 1px solid rgba(139,152,165,.12);
}
.realtime-event:first-child { border-top: 0; }
.realtime-event > i { width: 8px; height: 8px; margin-top: 3px; border-radius: 50%; background: var(--primary); }
.realtime-event > i.green { background: var(--success); }
.realtime-event > i.violet { background: #8b5cf6; }
.realtime-event > i.red { background: var(--danger); }
.realtime-event > div { min-width: 0; }
.realtime-event strong, .realtime-event span, .realtime-event small { display: block; }
.realtime-event strong { margin-bottom: 3px; font-size: 11px; }
.realtime-event span {
    overflow: hidden;
    color: var(--muted);
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.realtime-event small { margin-top: 3px; color: #75a7fa; font-size: 9px; }
.realtime-event time { color: var(--muted); font-size: 9px; white-space: nowrap; }
.realtime-match {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border-top: 1px solid rgba(139,152,165,.12);
}
.realtime-match:first-child { border-top: 0; }
.realtime-match > div:last-child { text-align: right; }
.realtime-match strong, .realtime-match span { display: block; }
.realtime-match strong { margin-bottom: 3px; font-size: 10px; }
.realtime-match span { color: var(--muted); font-size: 9px; }
.realtime-match.stale strong:first-child { color: #f5bd56; }
.realtime-empty {
    display: grid;
    min-height: 120px;
    place-items: center;
    padding: 20px;
    color: var(--muted);
    font-size: 11px;
    text-align: center;
}
.realtime-empty.good { color: #65d88a; }
.realtime-error-list article { padding: 10px 0; border-top: 1px solid rgba(139,152,165,.12); }
.realtime-error-list article:first-child { border-top: 0; }
.realtime-error-list article > div { display: flex; justify-content: space-between; gap: 12px; }
.realtime-error-list strong {
    overflow: hidden;
    color: #ff8585;
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.realtime-error-list time { color: var(--muted); font-size: 9px; white-space: nowrap; }
.realtime-error-list code {
    display: block;
    max-height: 48px;
    margin-top: 6px;
    overflow: hidden;
    color: var(--muted);
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 9px;
    line-height: 1.45;
    white-space: pre-wrap;
}
.realtime-coverage article {
    display: grid;
    grid-template-columns: 8px minmax(0, 1fr) auto;
    gap: 9px;
    padding: 8px 0;
    border-top: 1px solid rgba(139,152,165,.12);
}
.realtime-coverage article:first-child { border-top: 0; }
.realtime-coverage i { width: 8px; height: 8px; margin-top: 3px; border-radius: 50%; background: var(--success); }
.realtime-coverage i.partial { background: #f59e0b; }
.realtime-coverage i.unavailable { background: var(--muted); }
.realtime-coverage strong, .realtime-coverage span { display: block; }
.realtime-coverage strong { margin-bottom: 2px; font-size: 10px; }
.realtime-coverage span { color: var(--muted); font-size: 9px; line-height: 1.4; }
.realtime-coverage em {
    padding: 2px 5px;
    border-radius: 999px;
    background: rgba(34,197,94,.1);
    color: #65d88a;
    font-size: 8px;
    font-style: normal;
}
.realtime-coverage em.partial { background: rgba(245,158,11,.1); color: #f5bd56; }
.realtime-coverage em.unavailable { background: rgba(139,152,165,.1); color: var(--muted); }
.realtime-scope { margin-top: 0; }

/* ---------- Buttons ---------- */
.btn {
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--text);
    padding: 8px 14px;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
}
.btn:hover { border-color: var(--muted); }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-danger { background: transparent; border-color: var(--danger); color: var(--danger); }
.btn-danger:hover { background: var(--danger); color: #fff; }
.btn-sm { padding: 5px 10px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- Cards / tables ---------- */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
tr:last-child td { border-bottom: none; }
td.actions { white-space: nowrap; text-align: right; }
.tag { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; background: var(--surface-2); color: var(--muted); }
.tag.yes { background: rgba(34,197,94,.15); color: var(--success); }
.tag.no { background: rgba(239,68,68,.15); color: var(--danger); }

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

#user-results, #user-detail { margin-top: 16px; }
#user-detail > .card + .card { margin-top: 16px; }
.user-panel { padding: 16px; }
.table-scroll { overflow-x: auto; }
.purchase-rewards { min-width: 160px; }
.purchase-token { white-space: nowrap; color: var(--muted); }
.player360-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 20px;
    background:
        radial-gradient(circle at 4% 0%, rgba(59,130,246,.18), transparent 34%),
        linear-gradient(135deg, #1a212b, #171e27);
}
.player360-identity { display: flex; align-items: center; gap: 15px; min-width: 0; }
.player360-avatar {
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    flex: 0 0 58px;
    border: 1px solid rgba(117,167,250,.55);
    border-radius: 17px;
    background: linear-gradient(145deg, rgba(59,130,246,.32), rgba(139,92,246,.22));
    color: #dbeafe;
    font-size: 24px;
    font-weight: 800;
    box-shadow: 0 12px 35px rgba(15,23,42,.3);
}
.player360-eyebrow, .player360-section-label {
    color: #75a7fa;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .14em;
}
.player360-identity h2 { margin: 3px 0 7px; font-size: 24px; letter-spacing: -.025em; }
.player360-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.player360-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.player360-range {
    display: flex;
    gap: 3px;
    padding: 3px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: rgba(8,12,17,.38);
}
.player360-range button {
    padding: 6px 9px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    font: inherit;
    font-size: 11px;
}
.player360-range button:hover, .player360-range button.active {
    background: var(--primary);
    color: #fff;
}
.player360-health {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) minmax(180px, auto);
    align-items: center;
    gap: 18px;
    margin-top: 12px;
    padding: 16px 18px;
    background:
        radial-gradient(circle at 0 50%, rgba(34,197,94,.1), transparent 30%),
        var(--surface);
}
.player360-health.watch {
    background: radial-gradient(circle at 0 50%, rgba(245,158,11,.1), transparent 30%), var(--surface);
}
.player360-health.at-risk {
    background: radial-gradient(circle at 0 50%, rgba(239,68,68,.11), transparent 30%), var(--surface);
}
.player360-health-score {
    display: grid;
    place-items: center;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: conic-gradient(var(--success) var(--health-score), rgba(139,152,165,.14) 0);
}
.player360-health.watch .player360-health-score {
    background: conic-gradient(#f59e0b var(--health-score), rgba(139,152,165,.14) 0);
}
.player360-health.at-risk .player360-health-score {
    background: conic-gradient(var(--danger) var(--health-score), rgba(139,152,165,.14) 0);
}
.player360-health-score > div {
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: var(--surface);
}
.player360-health-score strong { font-size: 20px; line-height: 1; }
.player360-health-score span { margin-top: -8px; color: var(--muted); font-size: 9px; }
.player360-health-title { display: flex; align-items: baseline; gap: 9px; }
.player360-health-title h3 { margin: 0; font-size: 18px; }
.player360-health-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.player360-health-main p { margin: 8px 0 0; color: var(--muted); font-size: 12px; }
.player360-health-flags {
    min-width: 0;
    padding-left: 16px;
    border-left: 1px solid var(--border);
}
.player360-health-flags > span {
    display: block;
    margin-bottom: 7px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
}
.player360-health-flags > div { display: flex; flex-wrap: wrap; gap: 5px; }
.player360-risk-flag, .player360-clear-signal {
    padding: 4px 7px;
    border-radius: 999px;
    background: rgba(239,68,68,.12);
    color: #fca5a5;
    font-size: 10px;
}
.player360-clear-signal { background: rgba(34,197,94,.12); color: var(--success); }
.player360-kpis {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
    margin: 12px 0;
}
.player360-kpi {
    position: relative;
    min-width: 0;
    padding: 13px 14px 12px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
}
.player360-kpi::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 3px;
    background: var(--primary);
}
.player360-kpi.green::before { background: var(--success); }
.player360-kpi.violet::before { background: #8b5cf6; }
.player360-kpi.cyan::before { background: #06b6d4; }
.player360-kpi.orange::before { background: #f59e0b; }
.player360-kpi.pink::before { background: #ec4899; }
.player360-kpi > span {
    display: block;
    overflow: hidden;
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .055em;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}
.player360-kpi strong {
    display: block;
    margin: 6px 0 3px;
    overflow: hidden;
    font-size: 18px;
    letter-spacing: -.025em;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.player360-kpi small {
    display: block;
    overflow: hidden;
    color: var(--muted);
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.player360-analytics {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(250px, .8fr);
    gap: 12px;
    margin-bottom: 12px;
}
.player360-performance {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 12px;
}
.player360-chart-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    color: var(--muted);
    font-size: 10px;
}
.player360-chart-legend span::before {
    content: "";
    display: inline-block;
    width: 7px;
    height: 7px;
    margin-right: 5px;
    border-radius: 50%;
    background: var(--primary);
}
.player360-chart-legend .matches::before { background: #8b5cf6; }
.player360-chart-legend .purchases::before { background: var(--success); }
.player360-chart { min-height: 165px; }
.player360-chart-empty { min-height: 165px; }
.player-chart-line {
    fill: none;
    stroke-width: 2.4;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.player-chart-line.sessions { stroke: var(--primary); }
.player-chart-line.matches { stroke: #8b5cf6; }
.player-chart-line.purchases { stroke: var(--success); stroke-dasharray: 5 4; }
.player-chart-dot { stroke: #17202c; stroke-width: 2; }
.player-chart-dot.sessions { fill: var(--primary); }
.player-chart-dot.matches { fill: #8b5cf6; }
.player-chart-dot.purchases { fill: var(--success); }
.player360-decision-list { display: grid; gap: 8px; }
.player360-decision-list article {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: baseline;
    gap: 3px 10px;
    padding: 10px 11px;
    border: 1px solid rgba(139,152,165,.13);
    border-radius: 8px;
    background: rgba(15,20,25,.3);
}
.player360-decision-list span { color: var(--muted); font-size: 10px; text-transform: uppercase; }
.player360-decision-list strong { font-size: 15px; }
.player360-decision-list small { grid-column: 1 / -1; color: var(--muted); font-size: 10px; }
.player360-overview {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 12px;
}
.player360-panel { padding: 17px; }
#user-detail > .player360-panel + .player360-panel { margin-top: 12px; }
.player360-panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 15px;
}
.player360-panel-head h3 { margin: 3px 0 0; font-size: 16px; }
.player360-info-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
}
.player360-info {
    min-width: 0;
    padding: 10px 11px;
    border: 1px solid rgba(139,152,165,.13);
    border-radius: 7px;
    background: rgba(15,20,25,.32);
}
.player360-info span { display: block; margin-bottom: 5px; color: var(--muted); font-size: 10px; text-transform: uppercase; }
.player360-info strong {
    display: block;
    overflow: hidden;
    font-size: 12px;
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.player360-info strong.mono { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 11px; }
.player360-session-state {
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(139,152,165,.12);
    color: var(--muted);
    font-size: 11px;
}
.player360-session-state.open { background: rgba(34,197,94,.14); color: var(--success); }
.player360-data-note {
    margin-top: 10px;
    padding-top: 9px;
    border-top: 1px solid rgba(139,152,165,.12);
    color: var(--muted);
    font-size: 10px;
    line-height: 1.5;
}
.player360-wallet {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 9px;
}
.player360-wallet-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-width: 0;
    padding: 12px;
    border: 1px solid rgba(34,197,94,.2);
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(34,197,94,.08), rgba(15,20,25,.2));
}
.player360-wallet-item.negative { border-color: rgba(239,68,68,.25); background: rgba(239,68,68,.06); }
.player360-wallet-item > div:first-child { min-width: 0; }
.player360-wallet-item span, .player360-wallet-item small {
    display: block;
    overflow: hidden;
    color: var(--muted);
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.player360-wallet-item strong { display: block; margin: 4px 0 2px; font-size: 18px; }
.player360-wallet-actions { display: flex; flex-direction: column; gap: 5px; }
.player360-inventory {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 9px;
}
.player360-inventory-item {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding: 11px;
    border: 1px solid rgba(139,152,165,.16);
    border-radius: 8px;
    background: rgba(15,20,25,.25);
}
.player360-inventory-item.equipped { border-color: rgba(59,130,246,.4); background: rgba(59,130,246,.08); }
.inventory-symbol {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: var(--surface-2);
    color: #75a7fa;
    font-weight: 800;
}
.player360-inventory-item > div:nth-child(2) { min-width: 0; }
.player360-inventory-item strong, .player360-inventory-item span, .player360-inventory-item small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.player360-inventory-item span, .player360-inventory-item small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.player360-empty-compact {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border: 1px dashed var(--border);
    border-radius: 8px;
    color: var(--muted);
}
.player360-empty-compact span { color: var(--text); font-size: 12px; font-weight: 650; }
.player360-empty-compact small { font-size: 10px; }
.player360-history .history-head { align-items: flex-end; }
.player360-tabs {
    display: flex;
    gap: 3px;
    padding: 3px;
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: rgba(15,20,25,.35);
}
.player360-tabs button {
    padding: 6px 8px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    font: inherit;
    font-size: 11px;
    white-space: nowrap;
}
.player360-tabs button span { margin-left: 3px; opacity: .75; }
.player360-tabs button:hover, .player360-tabs button.active { background: var(--surface-2); color: var(--text); }
.player360-tab-hidden { display: none; }
.amount-positive { color: var(--success); }
.amount-negative { color: var(--danger); }
.flow-milestones {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    margin: 8px 0 20px;
}
.flow-milestone {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    color: var(--muted);
    text-align: center;
}
.flow-milestone:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 17px;
    left: calc(50% + 22px);
    right: calc(-50% + 22px);
    height: 3px;
    background: var(--border);
}
.flow-milestone.connected:not(:last-child)::after {
    background: linear-gradient(90deg, var(--success), var(--primary));
}
.milestone-node {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border: 2px solid var(--border);
    border-radius: 50%;
    background: var(--surface);
    font-size: 12px;
    font-weight: 800;
    z-index: 1;
}
.flow-milestone.reached { color: var(--text); }
.flow-milestone.reached .milestone-node {
    border-color: var(--success);
    background: rgba(34,197,94,.14);
    color: var(--success);
}
.flow-milestone span { font-size: 12px; color: var(--muted); }
.flow-kpis {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    margin-bottom: 20px;
}
.flow-kpi {
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface-2);
}
.flow-kpi span { display: block; margin-bottom: 6px; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
.flow-kpi strong { font-size: 20px; }
.flow-kpi.issue strong { color: var(--danger); }
.flow-kpi.ok strong { color: var(--success); }
.flow-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}
.flow-toolbar > div:first-child small {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 400;
}
.flow-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.flow-filter {
    padding: 5px 10px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
}
.flow-filter:hover, .flow-filter.active { border-color: var(--primary); background: rgba(59,130,246,.14); color: #8ab8ff; }
.player-flow {
    max-height: 640px;
    overflow-y: auto;
    margin-top: 14px;
    padding-right: 4px;
}
.flow-day + .flow-day { margin-top: 18px; }
.flow-day-label {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
}
.flow-day-label i { flex: 1; height: 1px; background: var(--border); }
.flow-day-events { display: grid; gap: 7px; }
.flow-event {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 9px 11px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface-2);
}
.flow-event[data-flow-tone="error"] { border-color: rgba(239,68,68,.45); }
.flow-icon {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 9px;
    background: rgba(139,152,165,.12);
    color: var(--muted);
    font-weight: 800;
}
.flow-icon.success { background: rgba(34,197,94,.14); color: var(--success); }
.flow-icon.error { background: rgba(239,68,68,.14); color: var(--danger); }
.flow-icon.info { background: rgba(59,130,246,.14); color: #75a7fa; }
.flow-content { min-width: 0; }
.flow-head { display: flex; align-items: center; gap: 10px; }
.flow-head time { color: var(--muted); font-size: 12px; white-space: nowrap; }
.flow-detail { margin-top: 3px; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.flow-event-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.flow-duration { color: var(--text); font-size: 12px; font-weight: 600; }
.flow-reference { color: var(--muted); font-size: 10px; max-width: 120px; overflow: hidden; text-overflow: ellipsis; }
.flow-filter-empty {
    margin-top: 14px;
    padding: 28px;
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    color: var(--muted);
    text-align: center;
}
.flow-hidden { display: none !important; }

.upload-hints {
    margin: 10px 0 0;
    padding: 10px 24px 10px 12px;
    list-style: disc;
    background: var(--surface-2);
    border-radius: 8px;
    font-size: 12px;
    line-height: 1.9;
    color: var(--muted);
}
.upload-hints li { margin: 0; }

/* ---------- Forms ---------- */
label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 5px; }
input, select, textarea {
    width: 100%;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    padding: 8px 10px;
    font-size: 14px;
    font-family: inherit;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); }
textarea { resize: vertical; min-height: 64px; }
.field { margin-bottom: 14px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
.checkbox-row { display: flex; align-items: center; gap: 8px; }
.checkbox-row input { width: auto; }
.checkbox-row label { margin: 0; }

/* ---------- Auth screen ---------- */
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.auth-card { width: 360px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 28px; }
.auth-card h1 { margin: 0 0 4px; font-size: 22px; }
.auth-card p.sub { margin: 0 0 22px; color: var(--muted); }

/* ---------- Modal ---------- */
.modal-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,.6);
    display: flex; align-items: flex-start; justify-content: center;
    padding: 40px 20px; overflow-y: auto; z-index: 50;
}
.modal {
    background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
    width: 720px; max-width: 100%; padding: 24px;
}
.modal.wide { width: 1000px; }
.modal h2 { margin: 0 0 18px; font-size: 18px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }

/* ---------- Rewards editor ---------- */
.reward-block { border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; margin-bottom: 12px; background: var(--surface-2); }
.reward-block .reward-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.reward-items { margin-top: 10px; }
.reward-item-row { display: grid; grid-template-columns: 2fr 1fr auto; gap: 8px; margin-bottom: 8px; }

/* ---------- Files ---------- */
.files-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; }
.file-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.file-thumb { height: 150px; display: flex; align-items: center; justify-content: center; background: #0a0e12; background-image: linear-gradient(45deg,#161c24 25%,transparent 25%),linear-gradient(-45deg,#161c24 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#161c24 75%),linear-gradient(-45deg,transparent 75%,#161c24 75%); background-size: 16px 16px; background-position:0 0,0 8px,8px -8px,-8px 0; }
.file-thumb img { max-width: 100%; max-height: 100%; }
.file-body { padding: 10px 12px; }
.file-name { font-size: 13px; word-break: break-all; margin-bottom: 4px; }
.file-meta { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.file-actions { display: flex; gap: 6px; }

.upload-zone { border: 2px dashed var(--border); border-radius: var(--radius); padding: 20px; text-align: center; color: var(--muted); margin-bottom: 20px; }

/* ---------- Toast ---------- */
.toast {
    position: fixed; bottom: 24px; right: 24px; z-index: 100;
    padding: 12px 18px; border-radius: var(--radius); color: #fff; font-weight: 500;
    box-shadow: 0 8px 24px rgba(0,0,0,.4);
}
.toast.ok { background: var(--success); }
.toast.err { background: var(--danger); }
.hidden { display: none; }

.spinner { text-align: center; padding: 40px; color: var(--muted); }

@media (max-width: 1100px) {
    .admin-nav-toggle { display: block; }
    .admin-shell-body { display: block; width: 100%; padding: 0; }
    .admin-shell-body > .container { margin: 20px 0; padding: 0 18px; }
    .admin-sections {
        position: fixed;
        z-index: 40;
        top: 56px;
        bottom: 0;
        left: 0;
        width: min(310px, calc(100vw - 46px));
        max-height: none;
        margin: 0;
        border-width: 0 1px 0 0;
        border-radius: 0;
        transform: translateX(-105%);
        transition: transform .2s ease;
        box-shadow: 18px 0 42px rgba(0,0,0,.38);
    }
    .admin-sections.mobile-open { transform: translateX(0); }
    .admin-navigation-backdrop {
        position: fixed;
        z-index: 35;
        inset: 56px 0 0;
        display: block;
        background: rgba(4, 9, 15, .68);
        opacity: 0;
        pointer-events: none;
        transition: opacity .2s ease;
        backdrop-filter: blur(2px);
    }
    body.admin-navigation-open { overflow: hidden; }
    .admin-navigation-open .admin-navigation-backdrop { opacity: 1; pointer-events: auto; }
}

@media (max-width: 760px) {
    .topbar {
        height: 56px;
        padding: 0 12px;
    }
    .topbar .brand { margin-right: auto; }
    .topbar .source-badge { display: none; }
    .topbar .user { margin-right: 0; }
    .topbar .user-name { display: none; }
    .topbar .btn { min-height: 34px; }
    .admin-shell-body > .container { margin: 14px 0; padding: 0 12px; }
    .container { margin: 16px auto; padding: 0 12px; }
    .realtime-head { align-items: flex-start; flex-direction: column; }
    .realtime-controls { align-items: stretch; width: 100%; }
    .realtime-controls .overview-range { flex: 1; }
    .realtime-controls .overview-range button { flex: 1; }
    .realtime-meta { align-items: flex-start; flex-direction: column; }
    .realtime-ccu { grid-template-columns: 1fr; }
    .realtime-ccu > div { border-top: 1px solid var(--border); border-left: 0; }
    .realtime-ccu > div:first-child { border-top: 0; }
    .realtime-alert { align-items: flex-start; flex-wrap: wrap; }
    .realtime-health-summary {
        grid-template-columns: 34px minmax(0, 1fr);
        align-items: start;
    }
    .realtime-health-summary > strong { grid-column: 2; justify-self: start; }
    .realtime-health-checks { grid-template-columns: 1fr; }
    .realtime-health-checks article {
        border-top: 1px solid rgba(139,152,165,.12);
        border-left: 0;
    }
    .realtime-health-checks article:first-child { border-top: 0; }
    .realtime-health-checks span { min-height: 0; }
    .realtime-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .realtime-layout, .realtime-layout-bottom { grid-template-columns: 1fr; }
    .realtime-panel-head { flex-direction: column; }
    .realtime-filters { justify-content: flex-start; }
    .overview-head { align-items: flex-start; flex-direction: column; }
    .overview-controls { align-items: stretch; width: 100%; }
    .overview-range { width: 100%; }
    .overview-range button { flex: 1; }
    .overview-custom-range { align-items: stretch; flex-wrap: wrap; }
    .overview-custom-range label { flex: 1; min-width: 120px; }
    .overview-custom-range input { width: 100%; }
    .overview-custom-range > span { align-self: flex-end; }
    .overview-custom-range button { align-self: flex-end; }
    .overview-meta { align-items: flex-start; flex-direction: column; gap: 4px; }
    .overview-insights-head { align-items: flex-start; flex-direction: column; }
    .overview-insight-list, .overview-decision-metrics { grid-template-columns: 1fr; }
    .overview-kpis { grid-template-columns: 1fr; }
    .overview-grid { grid-template-columns: 1fr; }
    .overview-panel-wide { grid-column: auto; }
    .overview-panel-head { flex-direction: column; }
    .overview-money-summary { align-items: flex-start; }
    .player360-hero { align-items: flex-start; flex-direction: column; }
    .player360-actions { justify-content: flex-start; width: 100%; }
    .player360-range { width: 100%; }
    .player360-range button { flex: 1; }
    .player360-health { grid-template-columns: auto minmax(0, 1fr); }
    .player360-health-flags { grid-column: 1 / -1; padding: 12px 0 0; border-top: 1px solid var(--border); border-left: 0; }
    .player360-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .player360-analytics, .player360-performance { grid-template-columns: 1fr; }
    .player360-overview { grid-template-columns: 1fr; }
    .player360-info-grid { grid-template-columns: 1fr; }
    .player360-wallet, .player360-inventory { grid-template-columns: 1fr; }
    .player360-history .history-head { align-items: flex-start; flex-direction: column; }
    .player360-tabs { width: 100%; }
    .player360-empty-compact { align-items: flex-start; flex-direction: column; }
    .flow-milestones {
        grid-template-columns: repeat(4, minmax(96px, 1fr));
        overflow-x: auto;
        padding-bottom: 8px;
    }
    .flow-kpis { grid-template-columns: repeat(2, 1fr); }
    .flow-toolbar { align-items: flex-start; flex-direction: column; }
    .flow-event { grid-template-columns: 32px minmax(0, 1fr); }
    .flow-event-side {
        grid-column: 2;
        align-items: center;
        flex-direction: row;
    }
    .flow-head { justify-content: space-between; }
}

@media (max-width: 420px) {
    .topbar .tag { display: none; }
    .topbar .btn { padding-right: 10px; padding-left: 10px; }
    .admin-shell-body > .container { padding: 0 9px; }
}

@media (prefers-reduced-motion: reduce) {
    .admin-sections, .admin-navigation-backdrop, .admin-nav-toggle span { transition: none; }
}

@media (min-width: 761px) and (max-width: 980px) {
    .realtime-health-checks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .realtime-health-checks article { border-top: 1px solid rgba(139,152,165,.12); }
    .realtime-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .realtime-layout, .realtime-layout-bottom { grid-template-columns: 1fr; }
    .overview-insight-list, .overview-decision-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .overview-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .overview-grid { grid-template-columns: 1fr; }
    .overview-panel-wide { grid-column: auto; }
    .player360-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .player360-analytics { grid-template-columns: 1fr; }
    .player360-wallet, .player360-inventory { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Acquisition / player source cohorts */
.acquisition-meta { display:flex; align-items:center; justify-content:space-between; gap:16px; margin:10px 0 14px; color:var(--muted); font-size:12px; }
.acquisition-observation-control { display:flex; align-items:center; gap:9px; }
.acquisition-observation-control > span { color:var(--muted); font-size:9px; font-weight:700; letter-spacing:.06em; text-transform:uppercase; }
.acquisition-meta > div { display:flex; align-items:center; gap:8px; }
.acquisition-meta label { display:flex; align-items:center; gap:9px; }
.acquisition-meta select { min-width:210px; padding:8px 32px 8px 10px; border:1px solid var(--border); border-radius:8px; background:var(--panel); color:var(--text); }
.acquisition-source-filter { position:relative; display:flex; align-items:center; gap:10px; z-index:20; }
.acquisition-filter-label { color:var(--muted); font-size:11px; white-space:nowrap; }
.acquisition-source-trigger { display:flex; align-items:center; justify-content:space-between; gap:18px; min-width:270px; padding:9px 11px 9px 13px; border:1px solid #3b4b60; border-radius:10px; background:linear-gradient(180deg,#1c2735,#17212d); color:var(--text); text-align:left; cursor:pointer; box-shadow:0 5px 18px rgba(0,0,0,.14); }
.acquisition-source-trigger:hover,.acquisition-source-trigger[aria-expanded="true"] { border-color:#3b82f6; box-shadow:0 0 0 2px rgba(59,130,246,.12); }
.acquisition-source-trigger span { display:flex; min-width:0; flex-direction:column; gap:2px; }
.acquisition-source-trigger strong { max-width:220px; overflow:hidden; color:#f8fafc; font-size:12px; text-overflow:ellipsis; white-space:nowrap; }
.acquisition-source-trigger small { color:var(--muted); font-size:9px; }
.acquisition-source-trigger i { color:#8fa5bd; font-size:18px; font-style:normal; transition:transform .15s; }
.acquisition-source-trigger[aria-expanded="true"] i { transform:rotate(180deg); }
.acquisition-source-menu { position:absolute; top:calc(100% + 7px); right:0; width:330px; overflow:hidden; border:1px solid #3b4b60; border-radius:12px; background:#151f2b; box-shadow:0 18px 45px rgba(0,0,0,.45); color:var(--text); }
.acquisition-source-menu.hidden { display:none; }
.acquisition-source-menu-head { display:flex; flex-direction:column; gap:2px; padding:13px 14px 10px; border-bottom:1px solid var(--border); }
.acquisition-source-menu-head strong { color:#f8fafc; font-size:13px; }
.acquisition-source-menu-head span { color:var(--muted); font-size:10px; }
.acquisition-source-options { max-height:300px; overflow-y:auto; padding:5px 7px; scrollbar-color:#53657a transparent; scrollbar-width:thin; }
.acquisition-meta .acquisition-source-option { display:grid; grid-template-columns:18px minmax(0,1fr); align-items:center; gap:9px; width:100%; padding:9px 8px; border-radius:8px; cursor:pointer; }
.acquisition-meta .acquisition-source-option:hover { background:rgba(59,130,246,.09); }
.acquisition-meta .acquisition-source-option.all { margin:6px 7px 0; width:calc(100% - 14px); border:1px solid rgba(59,130,246,.18); background:rgba(59,130,246,.06); }
.acquisition-source-option input { width:15px; height:15px; margin:0; accent-color:#3b82f6; }
.acquisition-source-option span { display:flex; min-width:0; flex-direction:column; gap:2px; }
.acquisition-source-option b { overflow:hidden; color:#dbeafe; font-size:11px; font-weight:600; text-overflow:ellipsis; white-space:nowrap; }
.acquisition-source-option small { color:var(--muted); font-size:9px; }
.acquisition-source-menu-foot { display:flex; align-items:center; justify-content:space-between; padding:9px 12px; border-top:1px solid var(--border); background:#111923; }
.acquisition-source-menu-foot span { color:var(--muted); font-size:10px; }
.acquisition-source-menu-foot button { padding:6px 14px; border:1px solid #3b82f6; border-radius:7px; background:#2563b9; color:white; font-size:11px; cursor:pointer; }
.acquisition-source-menu-foot button:hover { background:#2f76d2; }
.acquisition-summary { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); padding:0; overflow:hidden; margin-bottom:12px; }
.acquisition-summary > div { display:flex; flex-direction:column; gap:4px; padding:16px; border-left:1px solid var(--border); min-width:0; }
.acquisition-summary > div:first-child { border-left:0; }
.acquisition-summary span,.acquisition-metric span { color:var(--muted); font-size:10px; text-transform:uppercase; letter-spacing:.06em; }
.acquisition-summary strong { font-size:20px; line-height:1.15; overflow-wrap:anywhere; }
.acquisition-summary small,.acquisition-metric small { color:var(--muted); font-size:10px; }
.acquisition-ltv-summary.mature { background:rgba(34,197,94,.035); }
.acquisition-ltv-summary.partial strong,.acquisition-partial { color:#f59e0b; }
.acquisition-partial { padding:2px 6px; border-radius:999px; background:rgba(245,158,11,.1); font-size:9px; }
.acquisition-grid { display:grid; grid-template-columns:minmax(0,2fr) minmax(280px,1fr); gap:12px; margin-bottom:12px; }
.acquisition-panel { padding:16px; min-width:0; }
.acquisition-panel h2 { margin:0 0 4px; font-size:16px; }
.acquisition-panel p { margin:0; color:var(--muted); font-size:11px; }
.acquisition-legend { display:flex; gap:16px; color:var(--muted); font-size:10px; }
.acquisition-legend span::before { content:""; display:inline-block; width:8px; height:8px; margin-right:5px; border-radius:50%; background:#3b82f6; }
.acquisition-legend .attributed::before { background:#22c55e; }
.acquisition-chart { width:100%; height:270px; overflow:visible; }
.acquisition-chart text { fill:var(--muted); font-size:10px; }
.acquisition-grid-line { stroke:var(--border); stroke-width:1; }
.acquisition-line { fill:none; stroke-width:2.5; stroke-linejoin:round; stroke-linecap:round; }
.acquisition-line.users { stroke:#3b82f6; fill:none; }
.acquisition-line.attributed { stroke:#22c55e; fill:none; stroke-dasharray:5 4; }
.acquisition-dot.users { stroke:#3b82f6; fill:#3b82f6; }
.acquisition-dot.attributed { stroke:#22c55e; fill:#22c55e; }
.acquisition-guide { opacity:0; stroke:#64748b; stroke-dasharray:3 3; }
.acquisition-hover .chart-tooltip { opacity:0; pointer-events:none; }
.acquisition-hover:hover .chart-tooltip,.acquisition-hover:focus .chart-tooltip,.acquisition-hover:hover .acquisition-guide,.acquisition-hover:focus .acquisition-guide { opacity:1; }
.acquisition-hover .chart-tooltip rect { fill:#111827; stroke:#475569; }
.acquisition-hover .chart-tooltip .tooltip-title,.acquisition-hover .chart-tooltip .tooltip-value { fill:#f8fafc; font-weight:700; }
.acquisition-source-list { display:flex; flex-direction:column; gap:12px; margin-top:18px; }
.acquisition-source-row { appearance:none; border:0; padding:0; background:transparent; color:var(--text); text-align:left; cursor:pointer; }
.acquisition-source-row span { display:flex; justify-content:space-between; gap:10px; margin-bottom:5px; font-size:11px; }
.acquisition-source-row b { overflow:hidden; text-overflow:ellipsis; }
.acquisition-source-row em { color:var(--muted); font-style:normal; white-space:nowrap; }
.acquisition-source-row > i { display:block; height:6px; overflow:hidden; border-radius:4px; background:#263344; }
.acquisition-source-row u { display:block; height:100%; border-radius:4px; background:linear-gradient(90deg,#3b82f6,#8b5cf6); text-decoration:none; transition:width .2s; }
.acquisition-source-row:hover b { color:#60a5fa; }
.acquisition-detail { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:10px; margin-bottom:12px; }
.acquisition-metric { position:relative; display:flex; flex-direction:column; gap:5px; min-height:88px; padding:14px; overflow:hidden; border:1px solid var(--border); border-radius:10px; background:var(--panel); }
.acquisition-metric::before { content:""; position:absolute; inset:0 auto 0 0; width:3px; background:#3b82f6; }
.acquisition-metric.purple::before { background:#8b5cf6; }.acquisition-metric.orange::before { background:#f59e0b; }.acquisition-metric.cyan::before { background:#06b6d4; }.acquisition-metric.green::before { background:#22c55e; }
.acquisition-metric strong { font-size:22px; }
.acquisition-table-panel { margin-bottom:12px; }
.acquisition-table { min-width:1540px; }
.acquisition-table th { white-space:nowrap; }
.acquisition-table tbody tr { cursor:pointer; }
.acquisition-table tbody tr:hover,.acquisition-table tbody tr:focus { background:rgba(59,130,246,.08); outline:none; }
.acquisition-table td { white-space:nowrap; }
.acquisition-table td:first-child { white-space:normal; min-width:170px; }
.acquisition-table td:first-child small { display:block; color:#f59e0b; margin-top:3px; }
.acquisition-table td small { display:block; margin-top:3px; color:var(--muted); font-size:9px; }
.first-purchase-panel { margin-bottom:12px; }
.first-purchase-head { align-items:flex-start; }
.first-purchase-head .overview-eyebrow { margin-bottom:5px; }
.first-purchase-cohort { max-width:260px; padding:5px 9px; overflow:hidden; border:1px solid rgba(59,130,246,.28); border-radius:999px; background:rgba(59,130,246,.08); color:#93c5fd; font-size:10px; text-overflow:ellipsis; white-space:nowrap; }
.first-purchase-kpis { display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); margin:15px 0; overflow:hidden; border:1px solid var(--border); border-radius:10px; background:rgba(15,23,42,.26); }
.first-purchase-kpis article { display:flex; min-width:0; flex-direction:column; gap:5px; padding:13px; border-left:1px solid var(--border); }
.first-purchase-kpis article:first-child { border-left:0; }
.first-purchase-kpis span { color:var(--muted); font-size:9px; letter-spacing:.04em; text-transform:uppercase; }
.first-purchase-kpis strong { color:#f8fafc; font-size:19px; line-height:1.1; }
.first-purchase-kpis small { color:var(--muted); font-size:9px; line-height:1.35; }
.first-purchase-grid { display:grid; grid-template-columns:minmax(0,3fr) minmax(230px,1fr); gap:14px; }
.first-purchase-distribution,.first-purchase-insight { padding:14px; border:1px solid var(--border); border-radius:10px; background:rgba(15,23,42,.2); }
.first-purchase-distribution h3,.first-purchase-source-table h3 { margin:0 0 3px; font-size:13px; }
.first-purchase-distribution .overview-panel-head > strong { color:#cbd5e1; font-size:11px; }
.first-purchase-bars { display:flex; flex-direction:column; gap:10px; margin-top:13px; }
.first-purchase-bar { display:grid; grid-template-columns:85px minmax(100px,1fr) 62px 48px; align-items:center; gap:9px; font-size:10px; }
.first-purchase-bar > span { color:#cbd5e1; }
.first-purchase-bar i { display:block; height:7px; overflow:hidden; border-radius:999px; background:#263344; }
.first-purchase-bar u { display:block; height:100%; border-radius:999px; background:linear-gradient(90deg,#3b82f6,#8b5cf6); text-decoration:none; }
.first-purchase-bar b { color:#f8fafc; text-align:right; }
.first-purchase-bar em { color:var(--muted); font-style:normal; text-align:right; }
.first-purchase-insight { display:flex; flex-direction:column; justify-content:center; min-height:180px; }
.first-purchase-insight > span { color:#93c5fd; font-size:9px; font-weight:700; letter-spacing:.06em; text-transform:uppercase; }
.first-purchase-insight > strong { margin:8px 0 2px; color:#60a5fa; font-size:34px; }
.first-purchase-insight p { color:#e2e8f0; font-size:12px; line-height:1.5; }
.first-purchase-insight small { margin-top:8px; color:var(--muted); font-size:9px; line-height:1.5; }
.first-purchase-source-table { margin-top:16px; padding-top:15px; border-top:1px solid var(--border); }
.first-purchase-table { min-width:1050px; }
.first-purchase-table th,.first-purchase-table td { white-space:nowrap; }
.first-purchase-table td:first-child { min-width:180px; }
.first-purchase-table td:first-child small { display:block; margin-top:3px; color:#f59e0b; font-size:9px; }

@media (max-width: 980px) {
    .acquisition-summary { grid-template-columns:repeat(2,minmax(0,1fr)); }
    .acquisition-summary > div:nth-child(odd) { border-left:0; }
    .acquisition-grid { grid-template-columns:1fr; }
    .acquisition-detail { grid-template-columns:repeat(2,minmax(0,1fr)); }
    .first-purchase-kpis { grid-template-columns:repeat(3,minmax(0,1fr)); }
    .first-purchase-kpis article:nth-child(4) { border-left:0; }
    .first-purchase-grid { grid-template-columns:1fr; }
}

@media (max-width: 600px) {
    .acquisition-meta { align-items:flex-start; flex-direction:column; }
    .acquisition-meta label,.acquisition-meta select { width:100%; }
    .acquisition-summary,.acquisition-detail { grid-template-columns:1fr; }
    .acquisition-summary > div { border-left:0; border-top:1px solid var(--border); }
    .acquisition-summary > div:first-child { border-top:0; }
    .acquisition-source-filter { align-items:stretch; flex-direction:column; width:100%; }
    .acquisition-source-trigger { width:100%; min-width:0; }
    .acquisition-source-menu { right:auto; left:0; width:100%; }
    .first-purchase-kpis { grid-template-columns:1fr; }
    .first-purchase-kpis article { border-top:1px solid var(--border); border-left:0; }
    .first-purchase-kpis article:first-child { border-top:0; }
    .first-purchase-bar { grid-template-columns:72px minmax(70px,1fr) 48px 42px; gap:6px; }
    .first-purchase-head { gap:10px; align-items:flex-start; flex-direction:column; }
}

/* Keep the refresh layer last so legacy component rules cannot override it. */
.topbar .brand,
.admin-sections-head > strong,
.admin-section-item strong,
.page-head h1,
.overview-head h1,
.overview-kpi > strong,
.overview-decision strong,
.overview-panel-head h2,
h1, h2, h3, h4,
strong, b {
    font-weight: 650;
    font-synthesis: none;
}
.overview-kpi-top > span:first-child,
.overview-eyebrow,
.overview-insights-head div > span,
th { font-weight: 620; }
.page-head { margin-bottom: 20px; }
.page-head h1, .overview-head h1 { color: #f7faff; font-weight: 720; letter-spacing: -.035em; }
.page-head h1 { margin: 0; font-size: 24px; }
.overview-head { margin-bottom: 20px; }
.overview-head h1 { font-size: 30px; }
.overview-head p { color: #9fb1c4; }
.overview-eyebrow { color: #69a8ff; font-size: 10px; }
.card,
.overview-kpi,
.overview-decision,
.acquisition-metric {
    border-color: #21384f;
    background: linear-gradient(155deg, rgba(16, 34, 53, .97), rgba(10, 26, 43, .97));
    box-shadow: 0 10px 28px rgba(0, 0, 0, .12);
}
.card { border-radius: 12px; }
.overview-kpis,
.overview-decision-metrics,
.overview-grid { gap: 13px; }
.overview-kpi { min-height: 132px; padding: 17px 16px; border-radius: 11px; }
.overview-kpi::before,
.overview-decision::before { width: 2px; opacity: .9; }
.overview-kpi-top > span:first-child { color: #a9bacb; font-size: 10px; }
.overview-kpi > strong { margin: 12px 0 6px; font-size: clamp(23px, 1.75vw, 29px); font-weight: 720; }
.overview-kpi small, .overview-previous { color: #91a5b9; }
.overview-previous { border-color: rgba(105, 134, 164, .18); }
.overview-decision { min-height: 94px; padding: 15px; border-radius: 11px; }
.overview-decision strong { margin-top: 7px; font-size: 21px; }
.overview-panel { padding: 19px; }
.overview-panel-head { margin-bottom: 17px; }
.overview-panel-head h2 { color: #f3f7fc; font-size: 16px; }
.overview-panel-head p, .overview-legend { color: #94a9bd; }
.overview-insights { padding: 16px; border-color: rgba(52, 136, 255, .25); border-radius: 12px; background: linear-gradient(135deg, rgba(33, 105, 198, .10), rgba(15, 32, 51, .72)); }
.overview-insight { min-height: 62px; padding: 11px 12px; background: rgba(8, 23, 39, .7); }
.overview-insight strong { font-size: 11px; }
.overview-insight span { color: #91a5b9; font-size: 10px; }
.chart-grid { stroke: #22394f; }
.chart-y-label, .chart-x-label { fill: #8fa5ba; }
.btn { min-height: 38px; border-color: #2a435b; border-radius: 9px; background: #14263a; box-shadow: 0 3px 10px rgba(0, 0, 0, .12); transition: background .15s ease, border-color .15s ease, transform .15s ease; }
.btn:hover { border-color: #47729b; background: #19304a; }
.btn:active { transform: translateY(1px); }
.btn-primary { border-color: #3488ff; background: #2879e6; }
input, select, textarea { border-color: #2b455e; border-radius: 9px; background: #0a1a2b; }
input:focus, select:focus, textarea:focus { outline: none; border-color: #3488ff; box-shadow: 0 0 0 3px rgba(52, 136, 255, .12); }
.overview-range, .overview-custom-range { border-color: #294259; background: #0c1c2d; }
.overview-range button { min-height: 34px; }
.overview-range button.active { background: #1a3049; color: #fff; }
th, td { padding: 12px 15px; border-color: rgba(49, 74, 99, .62); }
th { color: #99adc0; font-size: 10px; }
tbody tr { transition: background .12s ease; }
tbody tr:hover { background: rgba(52, 136, 255, .045); }
.tag { background: #182c41; }

@media (max-width: 1100px) {
    .admin-shell-body { display: block; width: 100%; padding: 0; }
    .admin-shell-body > .container { margin: 0; padding: 22px 20px 40px; }
    .admin-sections { position: fixed; top: 64px; bottom: 0; left: 0; width: min(290px, calc(100vw - 44px)); height: calc(100vh - 64px); max-height: none; margin: 0; border-width: 0 1px 0 0; border-radius: 0; }
    .admin-navigation-backdrop { inset: 64px 0 0; }
}

@media (max-width: 760px) {
    .topbar { height: 58px; padding: 0 11px; }
    .admin-sections { top: 58px; height: calc(100vh - 58px); margin: 0; }
    .admin-navigation-backdrop { inset: 58px 0 0; }
    .admin-shell-body > .container { margin: 0; padding: 16px 11px 34px; }
    .overview-head h1 { font-size: 26px; }
    .overview-kpi { min-height: 112px; padding: 15px; }
    .overview-panel { padding: 15px; }
}

@media (min-width: 1101px) and (max-width: 1550px) {
    .overview-kpi > strong { font-size: clamp(20px, 1.55vw, 24px); }
}

@media (max-width: 420px) {
    .topbar .brand { font-size: 15px; }
    .admin-shell-body > .container { padding-right: 9px; padding-left: 9px; }
    .overview-kpi > strong { font-size: 24px; }
}
.inventory-page { max-width: 1500px; margin: 0 auto; }
.inventory-page-head { display:flex; align-items:flex-end; justify-content:space-between; gap:24px; margin-bottom:20px; }
.inventory-page-head h1 { margin:4px 0 4px; color:#f8faff; font-size:clamp(24px,2vw,32px); line-height:1.15; letter-spacing:-.035em; }
.inventory-page-head p { margin:0; color:#8fb6df; font-size:14px; line-height:1.55; }
.inventory-summary-grid { display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); gap:12px; margin-bottom:14px; }
.inventory-summary-card { min-height:116px; padding:18px 20px; position:relative; overflow:hidden; display:flex; flex-direction:column; align-items:flex-start; justify-content:center; }
.inventory-summary-card::after { content:""; position:absolute; width:90px; height:90px; right:-32px; top:-42px; border-radius:50%; background:rgba(126,109,255,.08); }
.inventory-summary-card > span:not(.skeleton-line) { color:#86acd5; font-size:11px; font-weight:750; letter-spacing:.08em; text-transform:uppercase; }
.inventory-summary-card strong { margin:7px 0 2px; color:#f7faff; font-size:28px; line-height:1; letter-spacing:-.035em; }
.inventory-summary-card small { color:#7699bf; font-size:12px; }
.inventory-summary-card.dice::before,.inventory-summary-card.piece::before,.inventory-summary-card.chat::before { content:""; position:absolute; inset:0 auto 0 0; width:3px; background:#8077ff; }
.inventory-summary-card.piece::before { background:#35cda0; }
.inventory-summary-card.chat::before { background:#4da3ff; }
.inventory-catalog-card { padding:0; overflow:hidden; }
.inventory-catalog-head { padding:18px 20px 14px; display:flex; align-items:center; justify-content:space-between; gap:16px; border-bottom:1px solid #26384f; }
.inventory-catalog-head h2 { margin:0 0 3px; color:#f6f9ff; font-size:17px; }
.inventory-catalog-head p { margin:0; color:#789cc3; font-size:12px; }
.inventory-catalog-head > span { color:#9fc5ee; font-size:12px; }
.inventory-toolbar { display:grid; grid-template-columns:minmax(260px,1fr) repeat(3,minmax(140px,190px)); gap:10px; padding:14px 20px; border-bottom:1px solid #26384f; }
.inventory-toolbar select,.inventory-search { min-height:42px; border:1px solid #2a3e58; border-radius:9px; background:#182538; color:#f0f6ff; }
.inventory-toolbar select { padding:0 34px 0 12px; }
.inventory-search { display:flex; align-items:center; gap:9px; padding:0 12px; }
.inventory-search svg { width:17px; height:17px; fill:none; stroke:#7fa4cb; stroke-width:1.7; }
.inventory-search input { min-width:0; width:100%; border:0; outline:0; background:transparent; color:#f3f7ff; font:inherit; }
.inventory-search input::placeholder { color:#7896b8; }
.inventory-table-wrap { overflow-x:auto; }
.inventory-table { min-width:900px; }
.inventory-table th { background:#172437; color:#81a8d1; font-size:10px; letter-spacing:.07em; text-transform:uppercase; }
.inventory-table td { vertical-align:middle; }
.inventory-item-identity { min-width:0; display:flex; align-items:center; gap:11px; }
.inventory-item-identity > div { min-width:0; }
.inventory-item-identity strong { display:block; overflow:hidden; color:#f4f8ff; font-size:13px; text-overflow:ellipsis; white-space:nowrap; }
.inventory-item-identity span:not(.inventory-item-visual) { display:block; max-width:300px; margin-top:3px; overflow:hidden; color:#7599c0; font-size:11px; text-overflow:ellipsis; white-space:nowrap; }
.inventory-item-name { min-width:0; display:flex; align-items:center; gap:7px; }
.inventory-item-name strong { min-width:0; }
.inventory-item-identity .inventory-default-badge { flex:0 0 auto; display:inline-flex; align-items:center; gap:3px; max-width:none; min-height:19px; margin:0; padding:0 7px; border-radius:999px; background:rgba(53,205,160,.15); color:#4fd6ac; font-size:10px; font-weight:800; letter-spacing:.04em; text-transform:uppercase; }
.inventory-item-visual { position:relative; flex:0 0 38px; width:38px; height:38px; display:grid; place-items:center; overflow:hidden; border:1px solid rgba(133,119,255,.34); border-radius:11px; color:#a69cff; background:rgba(104,85,225,.17); font-size:13px; font-weight:800; box-shadow:inset 0 0 18px rgba(116,96,234,.08); }
.inventory-item-visual b { position:relative; z-index:0; }
.inventory-item-visual img { position:absolute; z-index:1; inset:3px; width:calc(100% - 6px); height:calc(100% - 6px); object-fit:contain; }
.inventory-item-visual.has-image { background:#111d2d; }
.inventory-item-visual.missing-image::after { content:""; position:absolute; right:4px; bottom:4px; width:5px; height:5px; border-radius:50%; background:#ecad4e; box-shadow:0 0 0 2px #172538; }
.inventory-item-visual.piece { border-color:rgba(54,205,160,.3); color:#5ce0b8; background:rgba(30,152,118,.14); }
.inventory-item-visual.chat { border-color:rgba(77,163,255,.32); color:#7dbaff; background:rgba(45,120,210,.14); }
.inventory-type-tag,.inventory-reward-only { display:inline-flex; align-items:center; min-height:24px; padding:0 9px; border-radius:999px; background:rgba(121,106,255,.14); color:#a9a0ff; font-size:11px; font-weight:700; }
.inventory-type-tag.piece { background:rgba(40,190,145,.12); color:#52d9b0; }
.inventory-type-tag.chat { background:rgba(77,163,255,.13); color:#83bdff; }
.inventory-reward-only { background:#1c2a3d; color:#8eadd0; }
.inventory-price { color:#f3f7ff; font-size:13px; }
.inventory-price small { color:#84a9d0; font-size:11px; font-weight:600; }
.inventory-cell-note { color:#7194ba; }
.inventory-row-actions { display:flex; align-items:center; gap:7px; }
.inventory-row-actions .danger { border-color:rgba(246,92,117,.3); color:#ff8297; }
.inventory-mobile-list { display:none; }
.inventory-empty { padding:48px 20px; text-align:center; }
.inventory-empty strong,.inventory-empty span { display:block; }
.inventory-empty strong { color:#f2f7ff; }
.inventory-empty span { margin-top:5px; color:#789abd; font-size:12px; }
.inventory-error-state { min-height:260px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:9px; text-align:center; }
.inventory-error-state strong { color:#f6f9ff; font-size:16px; }
.inventory-error-state span { color:#ff8297; }
.inventory-loading-grid .skeleton-line,.inventory-loading-grid .skeleton-block { display:block; border-radius:6px; background:linear-gradient(90deg,#1d2a3d 20%,#26354b 45%,#1d2a3d 70%); background-size:250% 100%; animation:skeleton-shimmer 1.35s infinite; }
.inventory-loading-grid .skeleton-line { width:75%; height:8px; }
.inventory-loading-grid .skeleton-line.short { width:40%; }
.inventory-loading-grid .skeleton-block { width:38%; height:26px; margin:12px 0; }
.inventory-table-skeleton { padding:16px 20px; }
.inventory-table-skeleton > div { display:grid; grid-template-columns:2fr repeat(4,1fr); gap:24px; padding:15px 0; border-bottom:1px solid #23344a; }
.inventory-table-skeleton i,.inventory-table-skeleton span { height:10px; border-radius:5px; background:linear-gradient(90deg,#1d2a3d 20%,#26354b 45%,#1d2a3d 70%); background-size:250% 100%; animation:skeleton-shimmer 1.35s infinite; }
.inventory-item-modal { width:min(820px,calc(100vw - 28px)); padding:26px; }
.inventory-item-modal > h2 { margin-bottom:16px; font-size:20px; letter-spacing:-.02em; }
.inventory-item-form { display:flex; flex-direction:column; gap:14px; }
.inventory-form-intro { display:flex; align-items:center; gap:13px; padding:13px 14px; border:1px solid #2a3e58; border-radius:11px; background:linear-gradient(135deg,#19283b,#172438); }
.inventory-form-intro strong,.inventory-form-intro span { display:block; }
.inventory-form-intro > div { min-width:0; flex:1; }
.inventory-form-intro strong { overflow:hidden; color:#f4f8ff; text-overflow:ellipsis; white-space:nowrap; }
.inventory-form-intro span { margin-top:3px; color:#82a6ce; font-size:12px; line-height:1.45; }
.inventory-form-intro .inventory-form-mode { flex:0 0 auto; margin:0; padding:5px 9px; border-radius:999px; background:rgba(126,109,255,.16); color:#a99fff; font-size:10px; font-weight:800; letter-spacing:.06em; text-transform:uppercase; }
.inventory-form-section { padding:15px; border:1px solid #293c55; border-radius:12px; background:rgba(19,31,47,.68); }
.inventory-form-section-head { display:flex; align-items:center; gap:10px; margin-bottom:14px; }
.inventory-form-section-head > span { flex:0 0 26px; width:26px; height:26px; display:grid; place-items:center; border-radius:8px; background:rgba(126,109,255,.17); color:#aaa1ff; font-size:11px; font-weight:800; }
.inventory-form-section-head strong,.inventory-form-section-head small { display:block; }
.inventory-form-section-head strong { color:#f2f7ff; font-size:13px; }
.inventory-form-section-head small { margin-top:2px; color:#789bc1; font-size:11px; }
.inventory-identity-grid { display:grid; grid-template-columns:minmax(0,1.35fr) minmax(180px,.65fr); gap:12px; }
.inventory-identity-grid .field,.inventory-price-fields .field { min-width:0; margin:0; }
.inventory-identity-grid .field > span,.inventory-price-fields .field > span { display:block; margin-bottom:6px; color:#9ab5d2; font-size:11px; font-weight:700; }
.inventory-identity-grid input,.inventory-identity-grid select,.inventory-price-fields input,.inventory-price-fields select { min-height:40px; background:#172538; }
.inventory-identity-grid .field small,.inventory-price-fields .field small { display:block; min-height:14px; margin-top:5px; color:#718eaf; font-size:10px; line-height:1.4; }
.inventory-asset-field { grid-column:1/-1; }
.inventory-art-fields { grid-column:1/-1; display:grid; grid-template-columns:1fr; gap:10px; }
.inventory-art-fields.pieces { grid-template-columns:repeat(2,minmax(0,1fr)); }
.inventory-art-fields .inventory-image-field { grid-column:auto; }
.inventory-art-hint { grid-column:1/-1; margin:0; color:#718eaf; font-size:10px; line-height:1.4; }
.inventory-image-field { grid-column:1/-1; padding:12px; border:1px solid #2a3e58; border-radius:10px; background:#152235; }
.inventory-image-field > span { display:block; margin-bottom:6px; color:#9ab5d2; font-size:11px; font-weight:700; }
.inventory-image-actions { display:flex; gap:8px; margin-top:10px; }
.inventory-image-empty,.inventory-image-selected { min-height:76px; display:flex; align-items:center; gap:12px; padding:10px; border:1px dashed #38506c; border-radius:9px; background:#111e2f; }
.inventory-image-empty > span { flex:0 0 50px; width:50px; height:50px; display:grid; place-items:center; border-radius:10px; background:rgba(126,109,255,.15); color:#a9a0ff; font-size:18px; font-weight:800; }
.inventory-image-empty strong,.inventory-image-empty small,.inventory-image-selected strong,.inventory-image-selected small { display:block; }
.inventory-image-empty strong,.inventory-image-selected strong { color:#eef5ff; font-size:12px; }
.inventory-image-empty small,.inventory-image-selected small { min-height:0 !important; margin-top:4px !important; color:#789bc1; overflow-wrap:anywhere; }
.inventory-image-selected img { flex:0 0 56px; width:56px; height:56px; padding:4px; object-fit:contain; border:1px solid #314864; border-radius:10px; background:#0f1a29; }
.inventory-purchase-toggle { display:flex; align-items:center; justify-content:space-between; gap:18px; margin:0 0 12px; padding:12px 13px; border:1px solid #2c4059; border-radius:10px; background:#182639; cursor:pointer; }
.inventory-default-toggle { margin:12px 0 0; }
.inventory-toggle-copy strong,.inventory-toggle-copy small { display:block; }
.inventory-toggle-copy strong { color:#f2f7ff; font-size:13px; }
.inventory-toggle-copy small { margin-top:3px; color:#7ea1c7; font-size:11px; }
.inventory-toggle-control { flex:0 0 auto; display:flex; align-items:center; gap:10px; }
.inventory-toggle-control > b { color:#93b4d7; font-size:10px; font-weight:750; text-transform:uppercase; }
.inventory-switch { position:relative; width:42px; height:24px; display:block; }
.inventory-switch input { position:absolute; width:1px; height:1px; opacity:0; pointer-events:none; }
.inventory-switch i { position:absolute; inset:0; border:1px solid #40536c; border-radius:999px; background:#233249; transition:.18s ease; }
.inventory-switch i::after { content:""; position:absolute; width:16px; height:16px; left:3px; top:3px; border-radius:50%; background:#93a8bf; box-shadow:0 2px 5px rgba(0,0,0,.35); transition:.18s ease; }
.inventory-switch input:checked + i { border-color:#8178ff; background:#6f66e8; }
.inventory-switch input:checked + i::after { transform:translateX(18px); background:#fff; }
.inventory-switch input:focus-visible + i { outline:2px solid rgba(129,120,255,.55); outline-offset:2px; }
.inventory-price-fields { display:grid; grid-template-columns:1fr 1fr; gap:12px; padding:12px; border:1px solid #2a3e58; border-radius:10px; background:#121e2e; transition:.18s ease; }
.inventory-price-fields.disabled { opacity:.42; filter:saturate(.7); }
.inventory-item-form .modal-actions { margin-top:2px; padding-top:14px; border-top:1px solid #293b52; }
.inventory-owner-note,.inventory-dependency-warning { display:flex; align-items:flex-start; gap:10px; padding:13px; border:1px solid rgba(237,172,74,.3); border-radius:10px; background:rgba(145,91,25,.15); color:#e8c58f; font-size:12px; line-height:1.5; }
.inventory-owner-note svg,.inventory-dependency-warning svg { flex:0 0 18px; width:18px; height:18px; fill:none; stroke:#f0aa45; stroke-width:1.7; }
.inventory-dependency-warning strong,.inventory-dependency-warning span { display:block; }
.inventory-dependency-warning strong { color:#ffd89c; font-size:14px; }
.inventory-dependency-list { margin-top:14px; border:1px solid #293b53; border-radius:10px; overflow:hidden; }
.inventory-dependency-list article { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:13px 14px; background:#162337; border-bottom:1px solid #293b53; }
.inventory-dependency-list article:last-child { border-bottom:0; }
.inventory-dependency-list strong,.inventory-dependency-list span { display:block; }
.inventory-dependency-list strong { color:#f0f6ff; font-size:13px; }
.inventory-dependency-list span { margin-top:2px; color:#82a3c6; font-size:11px; }
.inventory-dependency-list b { color:#a59cff; }

@media (max-width: 980px) {
    .inventory-summary-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
    .inventory-toolbar { grid-template-columns:1fr 1fr; }
    .inventory-search { grid-column:1/-1; }
    .inventory-table-wrap { display:none; }
    .inventory-mobile-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; padding:12px; }
    .inventory-mobile-card { min-width:0; padding:14px; border:1px solid #293b53; border-radius:10px; background:#152235; }
    .inventory-mobile-card-head { display:flex; align-items:flex-start; justify-content:space-between; gap:10px; }
    .inventory-mobile-card dl { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin:14px 0; }
    .inventory-mobile-card dl div { padding:9px; border-radius:8px; background:#1a293d; }
    .inventory-mobile-card dt { color:#789bc1; font-size:10px; text-transform:uppercase; }
    .inventory-mobile-card dd { margin:3px 0 0; color:#f1f6ff; font-size:12px; font-weight:700; }
}

@media (min-width: 981px) and (max-width: 1350px) {
    .inventory-summary-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
    .inventory-toolbar { grid-template-columns:minmax(240px,1fr) repeat(3,minmax(130px,1fr)); }
}

@media (max-width: 620px) {
    .inventory-page-head { align-items:stretch; flex-direction:column; gap:14px; }
    .inventory-page-head .btn { width:100%; }
    .inventory-summary-grid,.inventory-mobile-list { grid-template-columns:1fr; }
    .inventory-summary-card { min-height:98px; }
    .inventory-toolbar { grid-template-columns:1fr; padding:12px; }
    .inventory-search { grid-column:auto; }
    .inventory-catalog-head { align-items:flex-start; flex-direction:column; }
    .inventory-item-modal { width:calc(100vw - 16px); padding:18px 14px; }
    .inventory-item-modal > h2 { font-size:18px; }
    .inventory-identity-grid,.inventory-price-fields { grid-template-columns:1fr; }
    .inventory-asset-field,.inventory-image-field { grid-column:auto; }
    .inventory-art-fields.pieces { grid-template-columns:1fr; }
    .inventory-form-section { padding:12px; }
    .inventory-form-section-head { align-items:flex-start; }
    .inventory-purchase-toggle { align-items:flex-start; }
    .inventory-toggle-control { flex-direction:column-reverse; align-items:flex-end; gap:5px; }
    .inventory-item-form .modal-actions { position:sticky; bottom:-18px; margin-inline:-14px; padding:12px 14px; background:#161f3c; }
    .inventory-item-form .modal-actions .btn { flex:1; }
}
