:root {
    --bg: #050914;
    --bg-deep: #030711;
    --surface: rgba(11, 21, 42, 0.82);
    --surface-strong: rgba(13, 27, 52, 0.96);
    --surface-soft: rgba(19, 37, 68, 0.54);
    --line: rgba(91, 139, 213, 0.22);
    --line-bright: rgba(62, 213, 255, 0.42);
    --text: #dfeaff;
    --text-dim: #7f96b8;
    --muted: #526783;
    --cyan: #34e4ff;
    --blue: #4f8cff;
    --green: #2af5b1;
    --yellow: #ffd65c;
    --red: #ff5479;
    --violet: #a578ff;
    --accent: #34e4ff;
    --accent2: #102b50;
    --radius: 16px;
    --radius-sm: 10px;
    --spacing: 22px;
    --shadow: 0 22px 70px rgba(0, 0, 0, 0.34);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { color-scheme: dark; scroll-behavior: smooth; }
body {
    min-height: 100vh;
    overflow-x: hidden;
    color: var(--text);
    font-family: "Inter", "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.55;
    background:
        radial-gradient(circle at 15% 5%, rgba(34, 117, 255, .15), transparent 30%),
        radial-gradient(circle at 85% 18%, rgba(146, 69, 255, .13), transparent 27%),
        linear-gradient(145deg, var(--bg-deep), var(--bg) 52%, #071123);
}

.grid-overlay {
    position: fixed;
    inset: 0;
    z-index: -3;
    pointer-events: none;
    opacity: .22;
    background-image:
        linear-gradient(rgba(78, 138, 255, .09) 1px, transparent 1px),
        linear-gradient(90deg, rgba(78, 138, 255, .09) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: linear-gradient(to bottom, #000, transparent 82%);
}
.ambient { position: fixed; z-index: -2; border-radius: 50%; filter: blur(100px); pointer-events: none; }
.ambient-one { width: 360px; height: 360px; left: -170px; top: 28%; background: rgba(0, 181, 255, .15); }
.ambient-two { width: 420px; height: 420px; right: -220px; top: 48%; background: rgba(144, 70, 255, .14); }

.topbar {
    position: relative;
    border-bottom: 1px solid rgba(81, 161, 255, .22);
    background: linear-gradient(180deg, rgba(5, 14, 31, .95), rgba(5, 12, 26, .78));
    backdrop-filter: blur(22px);
}
.topbar::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: -1px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--cyan), var(--violet), transparent);
    opacity: .72;
}
.topbar-inner {
    width: min(1540px, calc(100% - 40px));
    min-height: 118px;
    margin: auto;
    display: flex;
    align-items: center;
    gap: 24px;
}
.brand-logo {
    width: 70px;
    height: 70px;
    flex: 0 0 70px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 1px solid rgba(87, 189, 255, .34);
    border-radius: 17px;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(34, 158, 255, .055), 0 0 32px rgba(0, 183, 255, .14);
}
.brand-logo img { width: 100%; height: 100%; object-fit: contain; }
.brand-copy { flex: 1; }
.eyebrow, .section-kicker, .game-code {
    color: var(--cyan);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .22em;
    text-transform: uppercase;
}
.brand-copy h1 { margin: 3px 0 2px; font-size: clamp(24px, 2.4vw, 36px); line-height: 1.15; letter-spacing: .08em; color: #f4f8ff; }
.brand-copy p { color: var(--text-dim); font-size: 13px; }
.system-status {
    min-width: 172px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 17px;
    border: 1px solid rgba(42, 245, 177, .25);
    border-radius: 12px;
    background: rgba(42, 245, 177, .055);
}
.system-status small { display: block; color: var(--text-dim); font-size: 9px; letter-spacing: .15em; }
.system-status strong { color: var(--green); font-size: 13px; letter-spacing: .12em; }
.status-dot, .pulse { width: 8px; height: 8px; display: inline-block; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 5px rgba(42,245,177,.09), 0 0 16px var(--green); animation: pulse 2s infinite; }
@keyframes pulse { 50% { opacity: .55; box-shadow: 0 0 0 9px transparent, 0 0 8px var(--green); } }

.container { width: min(1540px, calc(100% - 40px)); margin: 0 auto; padding: 28px 0 54px; }
.hero-strip {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    padding: 3px 2px 20px;
}
.hero-strip h2 { margin: 4px 0; font-size: 26px; letter-spacing: .04em; }
.hero-strip p { color: var(--text-dim); font-size: 13px; }
.hero-badges { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.hero-badges span, .window-badge, .live-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: #a9bddd;
    background: rgba(15, 31, 57, .65);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .05em;
}
.hero-badges .pulse { width: 5px; height: 5px; }

.overview-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--spacing); margin-bottom: var(--spacing); }
.game-overview, .card, .optimize-panel {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: linear-gradient(145deg, rgba(13, 27, 52, .93), rgba(8, 17, 35, .88));
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}
.game-overview::before, .card::before, .optimize-panel::before {
    content: "";
    position: absolute;
    left: 0; right: 0; top: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(52,228,255,.7), transparent);
}
.game-overview { padding: 20px; }
.ssq-overview { box-shadow: inset 0 0 55px rgba(36, 174, 255, .035), var(--shadow); }
.dlt-overview::before { background: linear-gradient(90deg, transparent, rgba(165,120,255,.8), transparent); }
.overview-head, .card-title-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.overview-head h3, .card-title-row h3 { color: #f4f8ff; font-size: 20px; letter-spacing: .04em; }
.game-code { display: block; margin-bottom: 2px; }
.algo-badge {
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .04em;
    border: 1px solid;
}
.algo-badge.cyan { color: var(--cyan); border-color: rgba(52,228,255,.42); background: rgba(52,228,255,.07); }
.algo-badge.violet { color: #bf9cff; border-color: rgba(165,120,255,.48); background: rgba(165,120,255,.08); }

.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat-card {
    min-height: 112px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 14px;
    border: 1px solid rgba(87, 132, 200, .17);
    border-radius: 12px;
    background: linear-gradient(145deg, rgba(19, 38, 69, .55), rgba(8, 17, 34, .45));
    transition: transform .22s ease, border-color .22s ease, background .22s ease;
}
.stat-card:hover { transform: translateY(-2px); border-color: var(--line-bright); background: rgba(22, 45, 79, .62); }
.stat-card .label { color: var(--text-dim); font-size: 11px; letter-spacing: .04em; }
.stat-card .value { margin: 4px 0 0; color: #f6f9ff; font: 750 29px/1.15 "Segoe UI", sans-serif; letter-spacing: -.02em; }
.stat-card .value.green { color: var(--green); text-shadow: 0 0 22px rgba(42,245,177,.16); }
.stat-card .value.red { color: var(--red); text-shadow: 0 0 22px rgba(255,84,121,.16); }
.stat-card .value.blue { color: #68a5ff; }
.stat-card .value.yellow { color: var(--yellow); }
.stat-card .sub { min-height: 17px; margin-top: 5px; color: var(--muted); font-size: 10px; }

.prize-breakdown {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 13px;
    padding: 12px;
    border: 1px solid rgba(85, 134, 207, .15);
    border-radius: 12px;
    background: rgba(4, 11, 23, .28);
}
.prize-breakdown:empty { display: none; }
.prize-breakdown-title { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 3px; color: var(--text-dim); font-size: 11px; }
.algo-version-badge { color: var(--cyan); font-weight: 700; }
.prize-chip { display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px; border: 1px solid var(--line); border-radius: 999px; background: rgba(50, 84, 130, .09); font-size: 11px; }
.prize-chip .chip-name { color: #b9c8e2; }
.prize-chip .chip-count { color: var(--cyan); font-size: 13px; font-weight: 800; }
.prize-chip.lv1, .prize-chip.lv2, .prize-chip.lv3 { border-color: rgba(255,84,121,.5); }
.prize-chip.lv1 .chip-count, .prize-chip.lv2 .chip-count, .prize-chip.lv3 .chip-count { color: var(--red); }
.prize-chip.lv4, .prize-chip.lv5 { border-color: rgba(255,214,92,.43); }
.prize-chip.lv4 .chip-count, .prize-chip.lv5 .chip-count { color: var(--yellow); }
.prize-chip.lv6, .prize-chip.lv7, .prize-chip.lv8 { border-color: rgba(42,245,177,.35); }
.prize-chip.lv6 .chip-count, .prize-chip.lv7 .chip-count, .prize-chip.lv8 .chip-count { color: var(--green); }

.command-deck {
    position: sticky;
    top: 10px;
    z-index: 20;
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: var(--spacing);
    padding: 10px 12px;
    border: 1px solid rgba(84, 143, 222, .26);
    border-radius: 14px;
    background: rgba(6, 15, 32, .88);
    box-shadow: 0 15px 45px rgba(0,0,0,.28);
    backdrop-filter: blur(22px);
}
.tabs { display: flex; gap: 7px; }
.tab {
    min-width: 130px;
    padding: 11px 17px;
    border: 1px solid transparent;
    border-radius: 10px;
    color: var(--text-dim);
    background: transparent;
    cursor: pointer;
    font-size: 13px;
    font-weight: 750;
    transition: .2s ease;
}
.tab span { margin-right: 6px; color: var(--muted); font-size: 10px; }
.tab:hover { color: #fff; background: rgba(62, 116, 187, .12); }
.tab.active { color: var(--cyan); border-color: rgba(52,228,255,.34); background: linear-gradient(135deg, rgba(52,228,255,.12), rgba(79,140,255,.09)); box-shadow: inset 0 0 25px rgba(52,228,255,.045); }
.tab.active span { color: var(--cyan); }
.command-actions { display: flex; align-items: center; justify-content: flex-end; gap: 9px; }
.pipeline-state { display: flex; align-items: center; gap: 8px; margin-right: 4px; color: var(--text-dim); font-size: 11px; }
.pipeline-state i { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); }
.pipeline-state.running i { background: var(--yellow); box-shadow: 0 0 10px var(--yellow); animation: pulse 1s infinite; }
.pipeline-state.error i { background: var(--red); box-shadow: 0 0 10px var(--red); }
.btn {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 17px;
    border: 1px solid transparent;
    border-radius: 10px;
    color: #fff;
    cursor: pointer;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .025em;
    transition: transform .2s ease, box-shadow .2s ease, opacity .2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn-primary { color: #03111a; background: linear-gradient(120deg, var(--cyan), #71a7ff); box-shadow: 0 8px 26px rgba(52,228,255,.17); }
.btn-primary:hover { box-shadow: 0 10px 32px rgba(52,228,255,.28); }
.btn-secondary { color: #a9c5ef; border-color: var(--line); background: rgba(27, 55, 93, .42); }

.primary-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(360px, .75fr); gap: var(--spacing); margin-bottom: var(--spacing); align-items: stretch; }
.card, .optimize-panel { padding: 21px; }
.card-title-row h3 { margin-top: 3px; font-size: 19px; }
.live-chip { color: var(--green); border-color: rgba(42,245,177,.3); }
.prediction-card { min-height: 520px; }
.recent-card { min-height: 760px; max-height: 1210px; display: flex; flex-direction: column; overflow: hidden; }
.recent-card .card-title-row { flex: 0 0 auto; }
.recent-card .recent-draws-table { flex: 1 1 auto; min-height: 0; max-height: 1110px; }

.ticket {
    display: grid;
    grid-template-columns: 74px minmax(300px, 1fr) auto;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
    padding: 13px 15px;
    border: 1px solid rgba(83, 133, 202, .16);
    border-radius: 12px;
    background: linear-gradient(90deg, rgba(20, 42, 76, .42), rgba(8, 18, 37, .32));
    transition: .2s ease;
}
.ticket:hover { border-color: rgba(52,228,255,.32); transform: translateX(2px); }
.ticket-priority-top { border-color: rgba(42,245,177,.34); box-shadow: inset 3px 0 0 rgba(42,245,177,.72), 0 10px 28px rgba(0,0,0,.18); }
.ticket-num { color: var(--cyan); font-size: 13px; font-weight: 800; letter-spacing: .03em; }
.ticket-balls { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.ticket-info { color: var(--text-dim); font-size: 11px; text-align: right; }
.ranking-notice {
    display: grid;
    gap: 3px;
    margin: 0 0 13px;
    padding: 10px 12px;
    border: 1px solid rgba(255,214,92,.2);
    border-radius: 10px;
    color: var(--text-dim);
    background: rgba(255,214,92,.045);
    font-size: 11px;
}
.ranking-notice strong { color: var(--yellow); font-size: 12px; }
.ticket-analysis { grid-column: 1 / -1; padding: 8px 10px; border-radius: 7px; background: rgba(255,255,255,.03); font-size: 11px; }
.ticket-analysis-row { display: flex; flex-wrap: wrap; gap: 5px 13px; align-items: center; }
.priority-pill { padding: 2px 7px; border: 1px solid rgba(52,228,255,.18); border-radius: 999px; background: rgba(52,228,255,.05); }
.ranking-validation {
    display: grid;
    gap: 9px;
    margin-top: 13px;
    padding: 12px;
    border: 1px solid rgba(165,120,255,.22);
    border-radius: 10px;
    background: linear-gradient(120deg, rgba(79,140,255,.075), rgba(165,120,255,.055));
    font-size: 11px;
}
.ranking-validation > div:first-child { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; }
.ranking-validation > div:first-child strong { color: #d9ccff; }
.ranking-validation > div:first-child span { color: var(--text-dim); }
.ranking-validation-metrics { display: flex; flex-wrap: wrap; gap: 7px 16px; color: var(--text-dim); }
.ranking-validation-metrics strong { color: var(--cyan); }
.ranking-validation-metrics .weak-signal { color: var(--yellow); }
.ball {
    width: 33px;
    height: 33px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 1px;
    border-radius: 50%;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.28), 0 6px 14px rgba(0,0,0,.22);
}
.ball-red { border: 1px solid rgba(255,115,145,.62); background: radial-gradient(circle at 35% 28%, #ff7b94, #d72d55 52%, #78142c); }
.ball-blue { border: 1px solid rgba(99,193,255,.72); background: radial-gradient(circle at 35% 28%, #62d4ff, #2775dc 55%, #133878); }

.single-loading { min-height: 150px; margin-bottom: 14px; }
.single-decision {
    position: relative;
    margin-bottom: 18px;
    padding: 17px;
    border: 1px solid rgba(52,228,255,.28);
    border-radius: 14px;
    background:
        radial-gradient(circle at 95% 0%, rgba(52,228,255,.10), transparent 35%),
        linear-gradient(145deg, rgba(14,35,64,.82), rgba(6,17,34,.76));
    overflow: hidden;
}
.single-decision::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 3px;
    background: var(--cyan);
    box-shadow: 0 0 18px rgba(52,228,255,.7);
}
.single-decision.single-fallback {
    border-color: rgba(255,214,92,.30);
    background:
        radial-gradient(circle at 95% 0%, rgba(255,214,92,.09), transparent 35%),
        linear-gradient(145deg, rgba(35,34,46,.82), rgba(9,18,34,.76));
}
.single-decision.single-fallback::before { background: var(--yellow); box-shadow: 0 0 18px rgba(255,214,92,.55); }
.single-decision-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.single-decision-head h4 { margin: 3px 0 0; color: #f4f8ff; font-size: 17px; }
.single-strategy-badge {
    padding: 6px 10px;
    border: 1px solid rgba(52,228,255,.34);
    border-radius: 999px;
    color: var(--cyan);
    background: rgba(52,228,255,.07);
    font-size: 11px;
    font-weight: 800;
}
.single-fallback .single-strategy-badge { color: var(--yellow); border-color: rgba(255,214,92,.34); background: rgba(255,214,92,.07); }
.single-ticket-main { display: flex; flex-wrap: wrap; gap: 5px; margin: 15px 0 10px; }
.single-ticket-main .ball { width: 39px; height: 39px; font-size: 14px; }
.single-reason { color: #b9c8e0; font-size: 11px; }
.single-comparison-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 13px; }
.single-comparison-item { display: grid; gap: 4px; padding: 10px; border: 1px solid rgba(82,129,196,.16); border-radius: 9px; background: rgba(3,10,22,.32); }
.single-comparison-item span { color: var(--text-dim); font-size: 10px; }
.single-comparison-item strong { color: #eef5ff; font-size: 13px; }
.single-comparison-item strong i { margin: 0 4px; color: var(--muted); font-size: 9px; font-style: normal; }
.single-comparison-item small { font-size: 10px; font-weight: 700; }
.delta-up { color: var(--green); }
.delta-down { color: var(--red); }
.compressed-alternative { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 11px; padding: 9px 10px; border: 1px dashed rgba(255,214,92,.24); border-radius: 9px; color: var(--text-dim); font-size: 10px; }
.compressed-alternative > div { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 2px; }
.compressed-alternative .ball { width: 25px; height: 25px; font-size: 9px; }
.single-details { margin-top: 12px; border-top: 1px solid rgba(87,132,200,.14); }
.single-details summary { padding: 11px 2px 4px; color: #b9c8e0; cursor: pointer; font-size: 11px; font-weight: 700; }
.single-detail-summary { margin: 8px 0; color: var(--text-dim); font-size: 10px; }
.single-prize-table { max-height: 275px; }
.single-hit-lines { display: grid; gap: 5px; margin-top: 9px; color: var(--text-dim); font-size: 10px; line-height: 1.5; }
.single-caveat { margin-top: 10px; color: var(--muted); font-size: 9px; }

.analytics-card { margin-bottom: var(--spacing); }
.window-badge { color: var(--cyan); border-color: rgba(52,228,255,.3); }
.diagnostic-panel {
    margin-bottom: 14px;
    padding: 14px;
    border: 1px solid rgba(255,111,145,.19);
    border-radius: 13px;
    background: linear-gradient(120deg, rgba(233,69,96,.055), rgba(78,138,255,.04));
}
.diagnostic-summary { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 8px; }
.diagnostic-summary > div { display: grid; gap: 4px; padding: 10px; border: 1px solid rgba(90,136,201,.14); border-radius: 9px; background: rgba(3,10,22,.28); }
.diagnostic-summary span { color: var(--text-dim); font-size: 10px; }
.diagnostic-summary strong { color: #f1f6ff; font-size: 14px; }
.diagnostic-findings { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 9px; }
.diagnostic-findings > div { display: grid; gap: 5px; padding: 11px; border-left: 2px solid var(--cyan); background: rgba(52,228,255,.035); }
.diagnostic-findings b { color: var(--cyan); font-size: 10px; }
.diagnostic-findings span { color: #b9c8e0; font-size: 11px; line-height: 1.55; }
.diagnostic-reasons { display: grid; gap: 6px; margin-top: 9px; }
.diagnostic-reasons > div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 10px; border: 1px solid rgba(233,69,96,.13); border-radius: 8px; color: var(--text-dim); font-size: 10px; }
.diagnostic-reasons strong { color: #ff8ba4; }
.chart-panel { padding: 14px 14px 4px; border: 1px solid rgba(83,133,202,.15); border-radius: 13px; background: rgba(5, 13, 28, .35); }
.chart-wide { margin-bottom: 14px; }
.chart-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.chart-caption { display: flex; justify-content: space-between; align-items: baseline; gap: 15px; padding: 0 2px 8px; }
.chart-caption strong { color: #cfdcf2; font-size: 12px; }
.chart-caption span { color: var(--muted); font-size: 10px; }
.chart-container { position: relative; height: 280px; }
.chart-wide .chart-container { height: 330px; }

.secondary-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(370px, .7fr); gap: var(--spacing); align-items: start; }
.history-card { min-width: 0; }
.optimize-panel { background: linear-gradient(145deg, rgba(20, 25, 57, .94), rgba(9, 18, 38, .92)); }
.optimize-panel::before { background: linear-gradient(90deg, transparent, var(--violet), transparent); }
.panel-copy { margin: -4px 0 16px; color: var(--text-dim); font-size: 12px; }
.optimize-result { padding: 14px; border: 1px solid rgba(165,120,255,.16); border-radius: 12px; background: rgba(9, 11, 30, .34); }
.empty-state { min-height: 150px; display: grid; place-content: center; justify-items: center; color: var(--muted); }
.empty-state span { color: var(--violet); font-size: 28px; }
.config-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; }
.config-item { padding: 11px; border: 1px solid rgba(112, 118, 208, .14); border-radius: 9px; background: rgba(50,54,108,.12); }
.config-item .label { color: var(--text-dim); font-size: 10px; }
.config-item .value { margin-top: 2px; color: #fff; font-size: 15px; font-weight: 800; }

.table-wrap { max-height: 510px; overflow: auto; border: 1px solid rgba(80,125,190,.12); border-radius: 10px; }
.compact-table { max-height: 434px; }
table { width: 100%; border-collapse: collapse; font-size: 11px; }
th, td { padding: 10px 11px; border-bottom: 1px solid rgba(78,119,178,.12); text-align: left; white-space: nowrap; }
th { position: sticky; top: 0; z-index: 2; color: #9eb2d1; background: rgba(12, 27, 51, .96); font-size: 10px; font-weight: 750; letter-spacing: .04em; }
td { color: #b9c8e0; }
tr:hover td { background: rgba(52,228,255,.025); color: #eaf2ff; }
.hit-badge { display: inline-flex; min-width: 42px; justify-content: center; padding: 3px 7px; border-radius: 999px; font-size: 10px; font-weight: 800; border: 1px solid; }
.hit-4 { color: var(--yellow); border-color: rgba(255,214,92,.45); background: rgba(255,214,92,.08); }
.hit-3 { color: var(--green); border-color: rgba(42,245,177,.38); background: rgba(42,245,177,.07); }
.hit-2 { color: #77a9ff; border-color: rgba(79,140,255,.4); background: rgba(79,140,255,.07); }
.hit-0, .hit-1 { color: var(--text-dim); border-color: rgba(127,150,184,.25); background: rgba(127,150,184,.05); }
.back-hit { display: inline-flex; min-width: 38px; justify-content: center; padding: 3px 7px; border: 1px solid rgba(127,150,184,.25); border-radius: 999px; color: var(--text-dim); background: rgba(127,150,184,.05); font-size: 10px; font-weight: 800; }
.back-hit.is-hit { color: #79b4ff; border-color: rgba(78,138,255,.45); background: rgba(78,138,255,.09); }

.loading { min-height: 100px; display: grid; place-content: center; justify-items: center; color: var(--text-dim); font-size: 12px; }
.spinner { width: 28px; height: 28px; margin-bottom: 10px; border: 2px solid rgba(52,228,255,.13); border-top-color: var(--cyan); border-radius: 50%; animation: spin .75s linear infinite; box-shadow: 0 0 18px rgba(52,228,255,.12); }
@keyframes spin { to { transform: rotate(360deg); } }
.toast { position: fixed; top: 22px; right: 22px; z-index: 1000; max-width: 440px; padding: 12px 17px; border: 1px solid; border-radius: 10px; color: #fff; font-size: 12px; box-shadow: 0 14px 40px rgba(0,0,0,.35); backdrop-filter: blur(14px); animation: slideIn .25s ease; }
.toast-success { border-color: rgba(42,245,177,.5); background: rgba(17,83,71,.92); }
.toast-error { border-color: rgba(255,84,121,.5); background: rgba(102,29,50,.94); }
.toast-info { border-color: rgba(79,140,255,.5); background: rgba(26,61,113,.94); }
@keyframes slideIn { from { opacity: 0; transform: translateX(30px); } }

footer { width: min(1540px, calc(100% - 40px)); display: flex; justify-content: space-between; gap: 20px; margin: 0 auto; padding: 18px 0 30px; border-top: 1px solid rgba(87,132,200,.14); color: var(--muted); font-size: 10px; letter-spacing: .05em; }

::-webkit-scrollbar { width: 7px; height: 7px; }
::-webkit-scrollbar-track { background: rgba(4,10,20,.55); }
::-webkit-scrollbar-thumb { border-radius: 10px; background: rgba(77,120,181,.42); }
::-webkit-scrollbar-thumb:hover { background: rgba(52,228,255,.45); }

@media (max-width: 1180px) {
    .overview-grid, .primary-grid, .secondary-grid { grid-template-columns: 1fr; }
    .recent-card { min-height: 620px; }
    .compact-table { max-height: 520px; }
    .command-deck { position: relative; top: 0; flex-wrap: wrap; }
    .command-actions { flex-wrap: wrap; }
}
@media (max-width: 760px) {
    .topbar-inner, .container, footer { width: min(100% - 24px, 1540px); }
    .topbar-inner { min-height: 98px; gap: 14px; }
    .brand-logo { width: 50px; height: 50px; flex-basis: 50px; border-radius: 12px; }
    .system-status { display: none; }
    .brand-copy h1 { font-size: 22px; }
    .hero-strip { align-items: flex-start; flex-direction: column; }
    .hero-badges { justify-content: flex-start; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .command-deck, .command-actions { align-items: stretch; flex-direction: column; }
    .tabs { width: 100%; }
    .tab { flex: 1; min-width: 0; }
    .pipeline-state { padding: 5px; }
    .chart-row { grid-template-columns: 1fr; }
    .diagnostic-summary { grid-template-columns: repeat(2, 1fr); }
    .diagnostic-findings { grid-template-columns: 1fr; }
    .chart-container, .chart-wide .chart-container { height: 270px; }
    .ticket { grid-template-columns: 1fr; }
    .ticket-info { text-align: left; }
    .single-decision-head, .compressed-alternative { align-items: flex-start; flex-direction: column; }
    .single-comparison-grid { grid-template-columns: 1fr; }
    .secondary-grid { grid-template-columns: minmax(0,1fr); }
    footer { flex-direction: column; }
}
