:root {
  --bg: #070b14;
  --bg-soft: #0b1220;
  --panel: rgba(15, 23, 40, 0.82);
  --panel-solid: #0f1728;
  --panel-2: #121c31;
  --line: rgba(120, 150, 200, 0.16);
  --line-strong: rgba(120, 150, 200, 0.28);
  --text: #e8eefb;
  --muted: #8ea0bd;
  --muted-2: #62718c;
  --accent: #5b9dff;
  --teal: #2dd4bf;
  --green: #34d399;
  --amber: #f5b544;
  --purple: #b07cff;
  --red: #ff6b6b;
  --c-C: #5b9dff;
  --c-T1: #f5a524;
  --c-T2: #b07cff;
  --radius: 14px;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  font-synthesis: none;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(1200px 700px at 12% -10%, rgba(45, 212, 191, 0.10), transparent 60%),
    radial-gradient(1000px 600px at 92% 0%, rgba(91, 157, 255, 0.12), transparent 55%),
    var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

.aurora {
  position: fixed;
  z-index: 0;
  pointer-events: none;
  filter: blur(90px);
  opacity: 0.35;
  border-radius: 50%;
}
.aurora-a { width: 460px; height: 460px; left: -160px; top: 32%; background: #123c55; }
.aurora-b { width: 520px; height: 520px; right: -220px; top: 8%; background: #1a2a5e; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 32px;
  background: rgba(7, 11, 20, 0.78);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.brand { display: flex; align-items: center; gap: 14px; min-width: 0; }

.logo {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #04110f;
  background: linear-gradient(135deg, var(--teal), #6ee7d8);
  box-shadow: 0 0 0 1px rgba(45, 212, 191, 0.35), 0 10px 24px rgba(45, 212, 191, 0.18);
}

.brand-text h1 { margin: 0; font-size: 17px; font-weight: 650; letter-spacing: 0.2px; }
.brand-text p { margin: 1px 0 0; font-size: 11.5px; color: var(--muted-2); }

.top-actions { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }

.sync { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.sync .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.12);
}
.sync.busy .dot { background: var(--amber); animation: pulse 1s infinite; }
.sync.warn .dot { background: var(--red); box-shadow: 0 0 0 4px rgba(255, 107, 107, 0.12); }
@keyframes pulse { 50% { opacity: 0.35; } }

.btn {
  appearance: none;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  border-radius: 9px;
  padding: 7px 14px;
  font-size: 12.5px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.05s;
}
.btn:hover { background: rgba(255, 255, 255, 0.07); border-color: rgba(120, 150, 200, 0.45); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.45; cursor: wait; }

.auto { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); cursor: pointer; user-select: none; }
.auto input { accent-color: var(--teal); }

main { position: relative; z-index: 1; max-width: 1460px; margin: 0 auto; padding: 24px 32px 10px; }

.banner {
  margin-bottom: 16px;
  padding: 10px 14px;
  border: 1px solid rgba(255, 107, 107, 0.35);
  background: rgba(255, 107, 107, 0.08);
  border-radius: 10px;
  color: #ffc9c9;
  font-size: 12.5px;
}

.kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.kpi {
  position: relative;
  overflow: hidden;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(18, 28, 49, 0.86), rgba(12, 19, 34, 0.86));
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.16);
}
.kpi::after {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--k, var(--teal)), transparent 70%);
  opacity: 0.75;
}
.kpi-label { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.kpi-value { margin-top: 7px; font-size: 28px; font-weight: 720; letter-spacing: -0.4px; font-variant-numeric: tabular-nums; }
.kpi-value small { font-size: 13px; font-weight: 500; color: var(--muted); margin-left: 3px; letter-spacing: 0; }
.kpi-sub { margin-top: 4px; font-size: 11.5px; color: var(--muted-2); }
.kpi-sub b { color: var(--muted); font-weight: 600; }

.account-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.account-chips { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 10px 5px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.02);
  font-size: 12px;
  color: var(--muted);
}
.chip .tag {
  display: inline-grid;
  place-items: center;
  min-width: 26px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  color: #06101a;
  background: var(--c, var(--accent));
}
.chip b { color: var(--text); font-weight: 550; }
.chip .cnt { color: var(--muted-2); }

.source { font-size: 11.5px; color: var(--muted-2); display: flex; align-items: center; gap: 8px; }
.ro {
  padding: 1px 6px;
  border: 1px solid rgba(45, 212, 191, 0.35);
  border-radius: 5px;
  color: var(--teal);
  font-size: 10px;
  letter-spacing: 0.4px;
}

.tabs { display: flex; gap: 4px; margin: 18px 0 12px; border-bottom: 1px solid var(--line); }
.tab {
  appearance: none;
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  padding: 9px 14px;
  font-size: 13px;
  cursor: pointer;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--text); border-bottom-color: var(--teal); }

.view { min-height: 420px; }

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  overflow: hidden;
}

.table-wrap { overflow-x: auto; }

.team-board { padding: 14px 16px 13px; margin-bottom: 14px; }
.team-board-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.tb-title { font-size: 13px; font-weight: 650; color: var(--text); }
.tb-sub { margin-top: 2px; font-size: 10.5px; color: var(--muted-2); }
.tb-note {
  flex: none;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted-2);
  font-size: 10px;
  letter-spacing: 0.3px;
}
.team-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 11px; }
.team-card {
  --rk: var(--muted);
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-top: 2px solid var(--rk);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.018);
}
.team-card[data-r="1"] { --rk: var(--amber); }
.team-card[data-r="2"] { --rk: #c7d2e5; }
.team-card[data-r="3"] { --rk: #c98b5e; }
.team-card.ours { box-shadow: inset 0 0 0 1px var(--teal); }
.team-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.team-rank { color: var(--rk); font-size: 12px; font-weight: 750; font-variant-numeric: tabular-nums; }
.team-pass { color: var(--muted-2); font-size: 10px; white-space: nowrap; }
.team-name {
  margin-top: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12.5px;
  font-weight: 600;
}
.team-score {
  margin-top: 3px;
  font-size: 24px;
  font-weight: 720;
  letter-spacing: -0.4px;
  font-variant-numeric: tabular-nums;
}
.team-meta { margin-top: 2px; color: var(--muted-2); font-size: 10.5px; }
.team-ours {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px solid var(--line);
  color: var(--muted-2);
  font-size: 11px;
}
.team-ours-item b { color: var(--text); }
.team-ours-item em { color: var(--teal); font-style: normal; font-weight: 650; }

.board { width: 100%; border-collapse: collapse; }
.board th {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 11px 12px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.4px;
  color: var(--muted-2);
  text-transform: uppercase;
  background: #0c1424;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.board td { padding: 11px 12px; border-bottom: 1px solid rgba(120, 150, 200, 0.08); vertical-align: middle; }
.board tbody tr { cursor: pointer; transition: background 0.12s; }
.board tbody tr:hover { background: rgba(91, 157, 255, 0.055); }
.board tbody tr:last-child td { border-bottom: 0; }
.board .num { font-variant-numeric: tabular-nums; }
.board .idx { color: var(--muted-2); font-size: 12px; font-variant-numeric: tabular-nums; width: 38px; }
.board .pname { min-width: 230px; }
.board .pname .t { font-weight: 600; font-size: 13.5px; color: var(--text); }
.board .pname .s { margin-top: 1px; font-size: 10.5px; color: var(--muted-2); }
.board .score-main { font-size: 17px; font-weight: 700; letter-spacing: -0.3px; font-variant-numeric: tabular-nums; }
.board .score-sub { margin-top: 2px; font-size: 10.5px; color: var(--muted-2); display: flex; align-items: center; gap: 5px; }
.board .rank1-team { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11.5px; color: var(--muted); }
.board .podium { display: flex; flex-direction: column; gap: 2px; min-width: 210px; }
.board .podium-row {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto;
  gap: 6px;
  align-items: center;
  font-size: 11px;
  line-height: 1.4;
}
.board .podium-row .pr { color: var(--muted-2); font-variant-numeric: tabular-nums; }
.board .podium-row .pn {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 4px;
  overflow: hidden;
  color: var(--muted);
}
.board .podium-row .pnt { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board .podium-row .pn .badge { height: 16px; min-width: 20px; padding: 0 4px; font-size: 9px; }
.board .podium-row .ps { color: var(--text); font-weight: 650; font-variant-numeric: tabular-nums; }
.board .podium-row.ours .pn { color: var(--text); }
.board .podium-row.ours .ps { color: var(--teal); }
.board .gap { font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; }
.gap-ahead { color: var(--green); }
.gap-behind { color: var(--amber); }
.gap-big { color: var(--red); }
.gap-even { color: var(--muted); }

.diff {
  display: inline-grid;
  place-items: center;
  min-width: 30px;
  height: 21px;
  padding: 0 7px;
  border-radius: 6px;
  border: 1px solid var(--line-strong);
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 700;
}
.diff[data-d="5"] { color: #ff9b9b; border-color: rgba(255, 107, 107, 0.35); background: rgba(255, 107, 107, 0.07); }
.diff[data-d="4"] { color: #ffc08a; border-color: rgba(245, 165, 36, 0.30); background: rgba(245, 165, 36, 0.07); }
.diff[data-d="3"] { color: #b9a4ff; border-color: rgba(176, 124, 255, 0.30); background: rgba(176, 124, 255, 0.07); }
.diff[data-d="2"] { color: #86e6d9; border-color: rgba(45, 212, 191, 0.28); background: rgba(45, 212, 191, 0.06); }

.badge {
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  height: 18px;
  padding: 0 6px;
  border-radius: 5px;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.2px;
  color: #06101a;
  background: var(--c, var(--accent));
  vertical-align: 1px;
}
.badge.ghost { background: transparent; border: 1px solid var(--c, var(--accent)); color: var(--c, var(--accent)); }

.strip { display: flex; gap: 2px; align-items: flex-end; height: 22px; }
.strip i {
  display: block;
  width: 7px;
  height: 18px;
  border-radius: 2px;
  background: var(--hc, #334155);
  opacity: 0.95;
}
.strip i.miss { background: repeating-linear-gradient(135deg, #263248 0 3px, #1a2335 3px 6px); }
.strip i.over { outline: 1px solid rgba(255, 107, 107, 0.35); }

.arrow { color: var(--muted-2); font-size: 16px; }

.matrix-controls { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; }
.seg { display: inline-flex; padding: 3px; border: 1px solid var(--line); border-radius: 9px; background: rgba(255, 255, 255, 0.02); }
.seg button {
  appearance: none; border: 0; background: none; color: var(--muted);
  padding: 5px 11px; border-radius: 6px; font-size: 12px; cursor: pointer;
}
.seg button.active { background: rgba(91, 157, 255, 0.16); color: var(--text); }

.legend { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--muted-2); }
.legend .bar { width: 168px; height: 8px; border-radius: 999px; background: linear-gradient(90deg, #1f9d6b, #86c34a 24%, #d8b53f 48%, #ef8a3c 70%, #ef5350 100%); }
.legend .scale { display: flex; justify-content: space-between; width: 168px; font-variant-numeric: tabular-nums; }

.matrix-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.matrix { border-collapse: separate; border-spacing: 4px; padding: 14px; min-width: 860px; }
.matrix th {
  font-size: 10px; font-weight: 600; color: var(--muted-2);
  font-variant-numeric: tabular-nums; padding: 1px 0; text-align: center;
}
.matrix th.rowhead { text-align: left; padding-left: 4px; min-width: 240px; position: sticky; left: 0; z-index: 2; background: var(--panel-solid); }
.matrix td { padding: 0; }
.matrix td.rowhead { position: sticky; left: 0; z-index: 2; background: var(--panel-solid); padding-right: 10px; }
.matrix .rname { display: flex; align-items: center; gap: 8px; font-size: 11.5px; white-space: nowrap; }
.matrix .rname .i { color: var(--muted-2); font-variant-numeric: tabular-nums; }
.matrix .rname .n { max-width: 175px; overflow: hidden; text-overflow: ellipsis; }
.matrix .rname .d { font-size: 9.5px; color: var(--muted-2); border: 1px solid var(--line); border-radius: 4px; padding: 0 4px; }
.matrix .cell {
  width: 36px; height: 26px; border-radius: 5px;
  display: grid; place-items: center;
  font-size: 9.5px; font-variant-numeric: tabular-nums;
  color: #eaf2ff; cursor: pointer;
  transition: transform 0.08s, outline-color 0.12s;
  outline: 1px solid transparent;
}
.matrix .cell:hover { transform: scale(1.12); outline-color: rgba(255, 255, 255, 0.45); z-index: 1; }
.matrix .cell.na { background: transparent; border: 1px dashed rgba(120, 150, 200, 0.18); cursor: default; }
.matrix .cell.miss { background: repeating-linear-gradient(135deg, #2a2130 0 4px, #1b1724 4px 8px); color: #ff9b9b; }
.matrix .cell.void { opacity: 0; cursor: default; }

.heat-foot { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 10px; font-size: 11.5px; color: var(--muted-2); }
.heat-foot b { color: var(--text); font-weight: 600; }

/* modal */
.modal { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: 22px; }
.modal.hidden { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(3, 6, 12, 0.72); backdrop-filter: blur(6px); }
.modal-panel {
  position: relative;
  width: min(1320px, 100%);
  max-height: calc(100vh - 44px);
  overflow: auto;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  background: linear-gradient(180deg, #101a2c, #0b1220 60%);
  box-shadow: var(--shadow);
  animation: rise 0.18s ease-out;
}
@keyframes rise { from { opacity: 0; transform: translateY(10px) scale(0.995); } }

.modal-head { position: sticky; top: 0; z-index: 5; padding: 20px 64px 14px 24px; background: rgba(13, 20, 35, 0.92); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.modal-title { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.modal-title .idx { color: var(--muted-2); font-size: 13px; font-variant-numeric: tabular-nums; }
.modal-title h2 { margin: 0; font-size: 21px; letter-spacing: -0.2px; }
.modal-sub { margin-top: 5px; font-size: 11.5px; color: var(--muted-2); display: flex; gap: 12px; flex-wrap: wrap; }
.modal-close {
  position: absolute; top: 16px; right: 18px;
  width: 32px; height: 32px; border-radius: 8px;
  border: 1px solid var(--line); background: rgba(255, 255, 255, 0.03);
  color: var(--muted); font-size: 18px; line-height: 1; cursor: pointer;
}
.modal-close:hover { color: var(--text); background: rgba(255, 255, 255, 0.08); }

.modal-body { padding: 18px 24px 24px; }

.detail-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.dstat { padding: 12px 14px; border: 1px solid var(--line); border-radius: 11px; background: rgba(255, 255, 255, 0.018); }
.dstat .l { font-size: 10.5px; color: var(--muted-2); letter-spacing: 0.3px; }
.dstat .v { margin-top: 3px; font-size: 22px; font-weight: 720; font-variant-numeric: tabular-nums; letter-spacing: -0.3px; }
.dstat .s { margin-top: 2px; font-size: 11px; color: var(--muted-2); }

.podium-panel {
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 16px;
  overflow: auto;
  background: rgba(255, 255, 255, 0.012);
}
.podium-title {
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.4px;
  color: var(--muted-2);
  text-transform: uppercase;
}
.podium-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.podium-table th {
  padding: 8px 14px;
  text-align: left;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--muted-2);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.podium-table td {
  padding: 9px 14px;
  border-bottom: 1px solid rgba(120, 150, 200, 0.06);
  vertical-align: middle;
  white-space: nowrap;
}
.podium-table tr:last-child td { border-bottom: 0; }
.podium-table tr.ours { background: rgba(45, 212, 191, 0.055); }
.podium-table .num { text-align: right; font-variant-numeric: tabular-nums; font-weight: 650; }
.podium-table th.num { text-align: right; }
.rank-pill {
  display: inline-grid;
  place-items: center;
  min-width: 28px;
  height: 20px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.podium-table tr:first-child .rank-pill { background: rgba(245, 165, 36, 0.15); color: var(--amber); }
.podium-user { display: flex; align-items: center; gap: 6px; }
.podium-user b { font-weight: 600; }
.podium-nick { margin-top: 2px; font-size: 10.5px; color: var(--muted-2); }

.acct-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.acct-card { padding: 12px 14px; border: 1px solid var(--line); border-left: 3px solid var(--c, var(--accent)); border-radius: 10px; background: rgba(255, 255, 255, 0.018); }
.acct-card.absent { opacity: 0.48; border-left-color: #334155; }
.acct-top { display: flex; align-items: center; gap: 7px; font-size: 11.5px; color: var(--muted); }
.acct-top .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-score { margin-top: 5px; font-size: 22px; font-weight: 720; font-variant-numeric: tabular-nums; }
.acct-score small { font-size: 11px; color: var(--muted-2); font-weight: 500; margin-left: 6px; }
.acct-meta { margin-top: 3px; font-size: 10.5px; color: var(--muted-2); }
.pill { display: inline-block; padding: 0 6px; border-radius: 4px; font-size: 10px; font-weight: 650; }
.pill.pass { color: var(--green); background: rgba(52, 211, 153, 0.10); }
.pill.bad { color: var(--red); background: rgba(255, 107, 107, 0.10); }

.case-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 4px 0 10px; }
.filters { display: flex; gap: 6px; flex-wrap: wrap; }
.filters button {
  appearance: none; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.02);
  color: var(--muted); border-radius: 7px; padding: 5px 10px; font-size: 11.5px; cursor: pointer;
}
.filters button:hover { color: var(--text); }
.filters button.active { color: var(--text); border-color: rgba(91, 157, 255, 0.45); background: rgba(91, 157, 255, 0.12); }
.filters .n { color: var(--muted-2); margin-left: 4px; }

.cases-wrap { border: 1px solid var(--line); border-radius: 12px; overflow: auto; max-height: 56vh; }
.cases { width: 100%; border-collapse: separate; border-spacing: 0; font-variant-numeric: tabular-nums; }
.cases th {
  position: sticky; top: 0; z-index: 2;
  background: #0d1626; text-align: right;
  padding: 9px 10px; font-size: 10px; font-weight: 600; color: var(--muted-2);
  border-bottom: 1px solid var(--line); white-space: nowrap;
}
.cases th:first-child, .cases td:first-child { text-align: left; padding-left: 14px; }
.cases .unit { font-size: 9px; font-weight: 400; color: var(--muted-2); }
.cases td { padding: 8px 10px; text-align: right; border-bottom: 1px solid rgba(120, 150, 200, 0.07); font-size: 12px; }
.cases tbody tr:hover { background: rgba(91, 157, 255, 0.05); }
.cases tbody tr:last-child td { border-bottom: 0; }
.case-no { color: var(--muted); font-size: 11.5px; }
.case-id { display: block; font-size: 9.5px; color: var(--muted-2); }
.tb { color: var(--teal); }
.tb.na { color: var(--muted-2); }
.acc-cell { color: var(--muted); position: relative; }
.acc-cell .who { font-size: 9px; color: var(--muted-2); margin-left: 3px; }
.acc-cell.win { color: var(--text); font-weight: 650; background: rgba(45, 212, 191, 0.075); box-shadow: inset 0 0 0 1px rgba(45, 212, 191, 0.22); border-radius: 5px; }
.acc-cell.wa { color: #ff9b9b; font-size: 10.5px; }
.acc-cell.none { color: #46536a; }
.best-cell { font-weight: 700; color: var(--text); }
.best-cell .sub { display: block; font-size: 9.5px; font-weight: 500; color: var(--muted-2); margin-top: 1px; }
.best-cell .sub.fast { color: var(--green); }
.best-cell .sub.slow { color: #e8a75a; }
.ratio { display: inline-block; min-width: 46px; padding: 1px 5px; border-radius: 4px; font-size: 11px; font-weight: 650; text-align: center; color: #06110e; }
.pts { color: var(--muted); }

.case-note { margin-top: 10px; font-size: 11px; color: var(--muted-2); line-height: 1.7; }

.foot {
  position: relative; z-index: 1;
  max-width: 1460px; margin: 24px auto 0; padding: 14px 32px 26px;
  display: flex; gap: 22px; flex-wrap: wrap;
  color: var(--muted-2); font-size: 11px;
  border-top: 1px solid var(--line);
}

.toast {
  position: fixed; right: 24px; bottom: 24px; z-index: 80;
  padding: 10px 14px; border-radius: 9px;
  background: #1b2740; border: 1px solid var(--line-strong);
  color: var(--text); font-size: 12.5px; box-shadow: var(--shadow);
}
.toast.hidden { display: none; }

.hidden { display: none !important; }

.loading-panel { padding: 52px 20px; text-align: center; color: var(--muted); font-size: 13px; }

.cases tr.flash td { animation: flash-row 1.8s ease-out; }
@keyframes flash-row {
  0%, 30% { background: rgba(45, 212, 191, 0.16); }
  100% { background: transparent; }
}

.dstat .v .gap { font-size: 20px; letter-spacing: -0.2px; }

.error-row { cursor: default; }
.error-row:hover { background: transparent !important; }


@media (max-width: 1080px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .topbar { padding: 12px 16px; flex-wrap: wrap; }
  main { padding: 16px 16px 8px; }
  .kpis { grid-template-columns: 1fr; }
  .team-grid { grid-template-columns: 1fr; }
  .acct-grid { grid-template-columns: 1fr; }
  .detail-stats { grid-template-columns: 1fr 1fr; }
  .brand-text h1 { font-size: 15px; }
  .sync, .auto { display: none; }
  .modal { padding: 0; }
  .modal-panel { max-height: 100vh; border-radius: 0; }
  .modal-head, .modal-body { padding-left: 16px; padding-right: 16px; }
  .foot { padding: 12px 16px 20px; }
}
