:root {
  --blue: #1252f5;
  --blue-dark: #0b3dc4;
  --blue-soft: #eaf0ff;
  --teal: #00b171;
  --teal-soft: #e5f7f0;
  --amber: #f2a93b;
  --amber-soft: #fff4e2;
  --navy: #0a1730;
  --navy-2: #102450;
  --ink: #1b2437;
  --muted: #6b7689;
  --line: #e5eaf2;
  --bg: #f5f7fb;
  --card: #ffffff;
  --radius: 16px;
  --shadow: 0 12px 32px rgba(18, 37, 78, .07);
  --shadow-lg: 0 24px 60px rgba(10, 23, 48, .16);
  --max: 1320px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
svg { display: block; }
h1, h2, h3, h4, p { margin-top: 0; }
::selection { background: rgba(18, 82, 245, .18); }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  height: 72px; background: rgba(255,255,255,.96);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .25s ease;
}
.site-header.is-stuck { box-shadow: 0 8px 30px rgba(15,35,75,.08); }
.header-inner {
  max-width: var(--max); height: 100%; margin: 0 auto; padding: 0 28px;
  display: flex; align-items: center; gap: 26px;
}
.brand { display: flex; align-items: center; gap: 11px; flex: none; }
.brand-mark {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  background: linear-gradient(140deg, var(--blue), #4a7cff); color: #fff;
  box-shadow: 0 6px 16px rgba(18,82,245,.28);
}
.brand-mark svg { width: 24px; height: 24px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-text strong { font-size: 16px; letter-spacing: .2px; white-space: nowrap; }
.brand-text small { font-size: 11px; color: var(--muted); white-space: nowrap; }
.nav { display: flex; align-items: center; gap: 2px; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a {
  position: relative; padding: 24px 11px; font-size: 14px; color: #465168; white-space: nowrap;
  transition: color .2s;
}
.nav a:hover, .nav a.active { color: var(--blue); }
.nav a.active::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 0; height: 3px;
  border-radius: 3px 3px 0 0; background: var(--blue);
}
.header-actions { display: flex; align-items: center; gap: 10px; flex: none; }
.role-switch {
  display: flex; align-items: center; gap: 2px; padding: 3px; border-radius: 10px;
  background: #f1f4f9; border: 1px solid #e8ecf4;
}
.role-switch button {
  border: 0; background: transparent; color: var(--muted); font-size: 12px;
  padding: 6px 10px; border-radius: 7px; white-space: nowrap;
}
.role-switch button.active { background: #fff; color: var(--blue); font-weight: 600; box-shadow: 0 2px 8px rgba(20,40,80,.08); }
.icon-btn {
  width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 10px;
  background: #fff; display: grid; place-items: center; color: #4d5870;
}
.icon-btn:hover { color: var(--blue); border-color: #bcd0ff; }
.icon-btn svg { width: 18px; height: 18px; }

/* ---------- layout ---------- */
main { min-height: calc(100vh - 72px - 300px); }
.container { max-width: var(--max); margin: 0 auto; padding: 34px 28px 72px; }
.container.narrow { max-width: 1080px; }
.section { margin-bottom: 42px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 20px; }
.section-kicker { color: var(--blue); font-size: 12px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; margin-bottom: 6px; }
.section-title { font-size: 26px; line-height: 1.3; margin: 0; letter-spacing: -.3px; }
.section-sub { color: var(--muted); font-size: 14px; margin: 8px 0 0; max-width: 760px; }
.section-link { color: var(--blue); font-size: 14px; font-weight: 600; white-space: nowrap; }
.section-link:hover { text-decoration: underline; }

.page-hero {
  position: relative; overflow: hidden; background: linear-gradient(120deg, var(--navy), #142c5e 62%, #173b7d);
  color: #fff; padding: 42px 0 118px;
}
.page-hero::before {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 48px 48px; mask-image: linear-gradient(to bottom, #000, transparent);
}
.page-hero::after {
  content: ""; position: absolute; width: 480px; height: 480px; right: -100px; top: -180px;
  background: radial-gradient(circle, rgba(18,82,245,.55), transparent 68%);
}
.hero-inner { position: relative; z-index: 2; max-width: var(--max); margin: 0 auto; padding: 0 28px; }
.hero-tag {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18);
  font-size: 12px; letter-spacing: .5px; margin-bottom: 18px;
}
.hero-tag i { width: 6px; height: 6px; border-radius: 50%; background: #4ade9f; box-shadow: 0 0 0 4px rgba(74,222,159,.16); }
.page-hero h1 { font-size: 38px; line-height: 1.25; letter-spacing: -.6px; margin-bottom: 14px; max-width: 760px; }
.page-hero p { color: #c6d4ee; font-size: 16px; max-width: 680px; margin-bottom: 0; }
.hero-actions { display: flex; gap: 12px; margin-top: 26px; flex-wrap: wrap; }
.hero-art { position: absolute; right: 28px; top: 18px; width: 420px; height: 250px; opacity: .9; z-index: 1; }
@media (max-width: 1050px) { .hero-art { display: none; } }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent; border-radius: 10px; padding: 11px 18px;
  font-size: 14px; font-weight: 600; transition: transform .15s, box-shadow .2s, background .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--blue); color: #fff; box-shadow: 0 8px 20px rgba(18,82,245,.25); }
.btn-primary:hover { background: var(--blue-dark); }
.btn-light { background: #fff; color: var(--blue); border-color: #dce6ff; }
.btn-ghost { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.3); }
.btn-soft { background: var(--blue-soft); color: var(--blue); }
.btn-outline { background: #fff; border-color: var(--line); color: #465168; }
.btn-sm { padding: 7px 12px; font-size: 13px; border-radius: 8px; }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }

.hero-stats {
  position: relative; z-index: 3; max-width: var(--max); margin: -72px auto 0; padding: 0 28px;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
}
.stat-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 24px; box-shadow: var(--shadow);
}
.stat-card .num { font-size: 34px; font-weight: 800; letter-spacing: -1px; line-height: 1.1; color: var(--navy); }
.stat-card .num span { font-size: 14px; font-weight: 600; color: var(--muted); margin-left: 3px; }
.stat-card .label { color: var(--muted); font-size: 13px; margin-top: 6px; }
.stat-card .trend { color: var(--teal); font-size: 12px; margin-top: 8px; font-weight: 600; }

/* ---------- cards / grids ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 24px; }
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
@media (max-width: 1050px) { .grid-4 { grid-template-columns: repeat(2,1fr); } .grid-3 { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 700px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } .hero-stats { grid-template-columns: repeat(2,1fr); } }

.module-card { padding: 24px; position: relative; overflow: hidden; transition: transform .2s, box-shadow .2s; }
.module-card:hover { transform: translateY(-3px); box-shadow: 0 18px 40px rgba(18,37,78,.12); }
.module-icon {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  background: var(--blue-soft); color: var(--blue); margin-bottom: 16px;
}
.module-icon svg { width: 22px; height: 22px; }
.module-card h3 { font-size: 17px; margin-bottom: 8px; }
.module-card p { color: var(--muted); font-size: 13px; margin-bottom: 14px; min-height: 42px; }
.module-card ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.module-card li { background: #f4f6fa; color: #566178; font-size: 12px; padding: 4px 9px; border-radius: 6px; }
.module-card .go { position: absolute; right: 20px; top: 22px; color: #aab4c5; font-size: 18px; }

.flow-strip { display: grid; grid-template-columns: repeat(4,1fr); gap: 0; margin-top: 24px; }
.flow-step { position: relative; padding: 22px 26px 22px 0; }
.flow-step::after {
  content: ""; position: absolute; right: 16px; top: 38px; width: 28px; height: 2px;
  background: linear-gradient(90deg, var(--blue), #b9cdff);
}
.flow-step:last-child::after { display: none; }
.flow-step .idx { font-size: 12px; font-weight: 700; color: var(--blue); letter-spacing: 1px; }
.flow-step h4 { margin: 8px 0 6px; font-size: 16px; }
.flow-step p { color: var(--muted); font-size: 13px; margin: 0; }
@media (max-width: 850px) { .flow-strip { grid-template-columns: repeat(2,1fr); } .flow-step::after { display: none; } }

.policy-quote {
  background: linear-gradient(110deg, #fff, #f3f7ff); border: 1px solid #dce7ff;
  border-left: 4px solid var(--blue); border-radius: 14px; padding: 26px 30px;
}
.policy-quote blockquote { font-size: 18px; font-weight: 600; line-height: 1.7; margin: 0 0 10px; color: var(--navy); }
.policy-quote cite { font-style: normal; color: var(--muted); font-size: 13px; }
.policy-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 14px; margin-top: 20px; }
.policy-grid div { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.policy-grid strong { display: block; color: var(--blue); font-size: 14px; margin-bottom: 4px; }
.policy-grid span { font-size: 12px; color: var(--muted); }
@media (max-width: 850px) { .policy-grid { grid-template-columns: repeat(2,1fr); } }

.role-card { padding: 22px; text-align: left; }
.role-card .role-icon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font-size: 19px; margin-bottom: 14px; }
.role-card h4 { margin-bottom: 6px; }
.role-card p { color: var(--muted); font-size: 13px; margin-bottom: 12px; }
.role-card .chips { display: flex; flex-wrap: wrap; gap: 6px; }

.chip {
  display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px;
  font-size: 12px; background: #f1f4f9; color: #5b6680; border: 1px solid transparent;
}
.chip.blue { background: var(--blue-soft); color: var(--blue); }
.chip.teal { background: var(--teal-soft); color: #087f57; }
.chip.amber { background: var(--amber-soft); color: #a66b0d; }
.chip.red { background: #fdecec; color: #c43d3d; }
.chip.ghost { background: #fff; border-color: var(--line); }

.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 18px; }
.toolbar .grow { flex: 1; }
.field, select.field, textarea.field {
  border: 1px solid #dfe5ef; background: #fff; border-radius: 9px; padding: 9px 12px;
  font-size: 13px; outline: none; transition: border-color .2s, box-shadow .2s; min-height: 38px;
}
.field:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(18,82,245,.1); }
textarea.field { min-height: 90px; resize: vertical; }
label.field-label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; font-weight: 600; }
.form-row { margin-bottom: 14px; }

.filter-tabs { display: inline-flex; gap: 4px; padding: 4px; background: #eef2f8; border-radius: 10px; flex-wrap: wrap; }
.filter-tabs button { border: 0; background: transparent; padding: 7px 14px; border-radius: 7px; font-size: 13px; color: var(--muted); }
.filter-tabs button.active { background: #fff; color: var(--blue); font-weight: 600; box-shadow: 0 2px 8px rgba(20,40,80,.08); }

.table-wrap { overflow-x: auto; border-radius: 12px; }
table.data { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 680px; }
table.data th {
  text-align: left; font-size: 12px; color: var(--muted); font-weight: 600;
  background: #f7f9fc; padding: 12px 14px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
table.data td { padding: 13px 14px; border-bottom: 1px solid #eef1f6; vertical-align: middle; }
table.data tr:last-child td { border-bottom: 0; }
table.data tbody tr:hover { background: #fafbff; }
table.data .name { font-weight: 600; color: var(--navy); }
table.data .sub { color: var(--muted); font-size: 12px; }
.link-btn { border: 0; background: transparent; color: var(--blue); font-size: 13px; padding: 0; font-weight: 600; }
.link-btn:hover { text-decoration: underline; }

.pager { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 16px; font-size: 13px; color: var(--muted); }
.pager button { border: 1px solid var(--line); background: #fff; border-radius: 7px; padding: 5px 10px; }
.pager button:disabled { opacity: .45; }

.empty { text-align: center; padding: 46px 20px; color: var(--muted); }
.empty svg { width: 46px; height: 46px; margin: 0 auto 14px; color: #c3ccdb; }
.loading { display: grid; place-items: center; min-height: 300px; color: var(--muted); }
.spinner { width: 30px; height: 30px; border: 3px solid #e3e9f5; border-top-color: var(--blue); border-radius: 50%; animation: spin .8s linear infinite; margin-bottom: 12px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- dashboard ---------- */
.dashboard { background: linear-gradient(160deg, #071226, #0d2050 60%, #0a2b63); min-height: 100vh; color: #e9f0ff; padding: 30px 0 60px; }
.dashboard .container { max-width: 1500px; }
.dash-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.dash-head h1 { font-size: 28px; margin: 0 0 6px; letter-spacing: 1px; }
.dash-head p { color: #8fa8d6; margin: 0; font-size: 13px; }
.dash-clock { color: #8fa8d6; font-size: 13px; text-align: right; }
.dash-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 14px; margin-bottom: 16px; }
.dash-kpi {
  background: linear-gradient(150deg, rgba(29,64,130,.7), rgba(14,36,78,.7));
  border: 1px solid rgba(100,150,240,.18); border-radius: 14px; padding: 18px 20px;
}
.dash-kpi .v { font-size: 30px; font-weight: 800; color: #fff; line-height: 1.1; }
.dash-kpi .v small { font-size: 12px; color: #8fa8d6; font-weight: 500; margin-left: 4px; }
.dash-kpi .k { font-size: 12px; color: #93aad4; margin-top: 6px; }
.dash-kpi .bar { height: 3px; background: rgba(255,255,255,.1); border-radius: 3px; margin-top: 12px; overflow: hidden; }
.dash-kpi .bar i { display: block; height: 100%; background: linear-gradient(90deg, #3d86ff, #4ade9f); }
.dash-panel {
  background: rgba(12,32,72,.62); border: 1px solid rgba(100,150,240,.16);
  border-radius: 14px; padding: 18px 20px;
}
.dash-panel h3 { font-size: 14px; font-weight: 600; margin-bottom: 4px; color: #dce8ff; }
.dash-panel .hint { font-size: 11px; color: #7994c4; margin-bottom: 12px; }
.dash-row { display: grid; grid-template-columns: 1.35fr 1fr 1fr; gap: 16px; margin-bottom: 16px; }
@media (max-width: 1100px) { .dash-grid { grid-template-columns: repeat(2,1fr); } .dash-row { grid-template-columns: 1fr; } }
.dash-list { list-style: none; margin: 0; padding: 0; }
.dash-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px dashed rgba(255,255,255,.08); font-size: 12px; }
.dash-list li:last-child { border-bottom: 0; }
.dash-list .rank { width: 20px; height: 20px; border-radius: 6px; background: rgba(61,134,255,.22); color: #78aaff; display: grid; place-items: center; font-size: 11px; margin-right: 8px; }
.dash-list .name { flex: 1; color: #c9d9f7; }
.dash-list .value { color: #fff; font-weight: 700; }
.dash-panel table.data { min-width: 0; }
.dash-panel table.data th { background: rgba(255,255,255,.04); color: #8fa8d6; border-bottom-color: rgba(255,255,255,.08); }
.dash-panel table.data td { border-bottom-color: rgba(255,255,255,.06); color: #c9d9f7; }
.dash-panel table.data tbody tr:hover { background: rgba(255,255,255,.035); }

/* ---------- graph ---------- */
.graph-layout { display: grid; grid-template-columns: 260px minmax(0,1fr) 300px; gap: 16px; align-items: start; }
@media (max-width: 1200px) { .graph-layout { grid-template-columns: 1fr; } }
.side-panel { padding: 20px; }
.side-panel h3 { font-size: 15px; margin-bottom: 14px; }
.filter-group { margin-bottom: 16px; }
.filter-group label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; font-weight: 600; }
.filter-group .field { width: 100%; }
.pos-list { max-height: 480px; overflow-y: auto; margin: 0 -8px; }
.pos-item {
  display: block; width: 100%; text-align: left; padding: 10px 12px; border: 1px solid transparent;
  background: transparent; border-radius: 9px; margin-bottom: 3px;
}
.pos-item:hover { background: #f5f8ff; }
.pos-item.active { background: var(--blue-soft); border-color: #cbdcff; }
.pos-item strong { display: block; font-size: 13px; color: var(--navy); }
.pos-item span { font-size: 11px; color: var(--muted); }
.graph-stage { padding: 20px; min-height: 560px; position: relative; }
.graph-stage.fullscreen { position: fixed; inset: 0; z-index: 100; border-radius: 0; min-height: 100vh; overflow: auto; }
.stage-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.stage-head h3 { font-size: 16px; margin: 0; }
.stage-canvas { position: relative; display: grid; place-items: center; min-height: 440px; }
.stage-canvas svg { width: 100%; height: auto; max-height: 520px; }
.graph-note { font-size: 12px; color: var(--muted); text-align: center; margin-top: 4px; }
.ability-detail { padding: 20px; }
.ability-detail h4 { font-size: 15px; margin-bottom: 8px; }
.ability-detail p { font-size: 13px; color: var(--muted); }
.mini-list { list-style: none; padding: 0; margin: 12px 0 0; }
.mini-list li { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 12px; }
.mini-list li:last-child { border-bottom: 0; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-top: 10px; }
.legend i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 5px; }

/* ---------- plan ---------- */
.stepper { display: flex; gap: 0; overflow-x: auto; padding: 4px 0 18px; }
.stepper-item { flex: 1; min-width: 116px; position: relative; padding-right: 12px; }
.stepper-item::after { content: ""; position: absolute; left: 34px; right: 8px; top: 15px; height: 2px; background: #e3e9f4; }
.stepper-item:last-child::after { display: none; }
.stepper-item.done::after { background: var(--blue); }
.step-dot {
  width: 30px; height: 30px; border-radius: 50%; background: #eef2f8; color: #8a95a8;
  display: grid; place-items: center; font-size: 12px; font-weight: 700; position: relative; z-index: 2; margin-bottom: 8px;
}
.stepper-item.active .step-dot, .stepper-item.done .step-dot { background: var(--blue); color: #fff; }
.stepper-item strong { font-size: 12px; display: block; }
.stepper-item span { font-size: 11px; color: var(--muted); }
.chain-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; }
@media (max-width: 1000px) { .chain-grid { grid-template-columns: repeat(2,1fr); } }
.chain-col { background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.chain-col h4 { font-size: 13px; margin: 0; padding: 13px 16px; background: #f7f9fd; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; }
.chain-col h4 span { color: var(--muted); font-weight: 500; }
.chain-body { padding: 10px; max-height: 340px; overflow-y: auto; }
.chain-item { border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px; margin-bottom: 8px; font-size: 13px; }
.chain-item strong { display: block; }
.chain-item small { color: var(--muted); font-size: 11px; }
.chain-item.active { border-color: #a9c4ff; background: #f4f8ff; }
.plan-preview { padding: 24px; }
.plan-preview h3 { font-size: 18px; margin-bottom: 6px; }
.plan-meta { font-size: 12px; color: var(--muted); margin-bottom: 18px; }
.plan-block { margin-bottom: 18px; }
.plan-block h4 { font-size: 14px; color: var(--blue); margin-bottom: 8px; border-left: 3px solid var(--blue); padding-left: 9px; }
.plan-block p, .plan-block li { font-size: 13px; color: #4b566b; }
.plan-block ul { padding-left: 18px; margin: 0; }

/* ---------- match ---------- */
.match-layout { display: grid; grid-template-columns: 320px minmax(0,1fr); gap: 16px; align-items: start; }
@media (max-width: 900px) { .match-layout { grid-template-columns: 1fr; } }
.match-list { max-height: 680px; overflow-y: auto; padding: 10px; }
.match-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; text-align: left; padding: 12px; border-radius: 10px; border: 1px solid transparent; background: transparent; }
.match-item:hover { background: #f5f8ff; }
.match-item.active { background: var(--blue-soft); border-color: #cbdcff; }
.match-item strong { font-size: 13px; display: block; }
.match-item span { font-size: 11px; color: var(--muted); }
.score { font-size: 14px; font-weight: 800; color: var(--blue); white-space: nowrap; }
.score.mid { color: var(--teal); }
.score.low { color: var(--muted); }
.match-card { padding: 20px; margin-bottom: 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.match-card-top { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.match-card h4 { font-size: 15px; margin-bottom: 4px; }
.match-card .muted { color: var(--muted); font-size: 12px; }
.score-ring { text-align: center; flex: none; }
.score-ring .v { font-size: 20px; font-weight: 800; color: var(--blue); }

/* ---------- generic detail ---------- */
.detail-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 10px 24px; margin: 16px 0; }
.detail-grid div { font-size: 13px; }
.detail-grid dt { color: var(--muted); font-size: 11px; }
.detail-grid dd { margin: 0; font-weight: 600; }
@media (max-width: 650px) { .detail-grid { grid-template-columns: 1fr; } }

/* ---------- modal / toast / search ---------- */
.modal-root:empty { display: none; }
.modal-backdrop {
  position: fixed; inset: 0; z-index: 120; background: rgba(8,19,42,.5);
  display: grid; place-items: center; padding: 20px; animation: fade .18s ease;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal {
  width: min(760px, 100%); max-height: 88vh; overflow-y: auto; background: #fff;
  border-radius: 18px; box-shadow: var(--shadow-lg); animation: pop .2s ease;
}
@keyframes pop { from { transform: translateY(10px) scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }
.modal.wide { width: min(1020px, 100%); }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 22px 26px 14px; border-bottom: 1px solid var(--line); }
.modal-head h3 { font-size: 18px; margin: 0; }
.modal-head p { font-size: 12px; color: var(--muted); margin: 4px 0 0; }
.modal-body { padding: 22px 26px; }
.modal-foot { padding: 14px 26px 22px; display: flex; justify-content: flex-end; gap: 10px; }
.close-btn { border: 0; background: #f2f5f9; width: 30px; height: 30px; border-radius: 8px; font-size: 18px; color: var(--muted); line-height: 1; }
.close-btn:hover { background: #e7ecf5; color: var(--ink); }
.toast-stack { position: fixed; right: 22px; bottom: 22px; z-index: 200; display: flex; flex-direction: column; gap: 10px; }
.toast { background: #14213c; color: #fff; border-radius: 10px; padding: 12px 16px; font-size: 13px; box-shadow: var(--shadow-lg); animation: pop .2s ease; max-width: 380px; }
.toast.error { background: #b33535; }
.toast.success { background: #0d8a60; }
.search-overlay { position: fixed; inset: 0; z-index: 150; background: rgba(8,19,42,.42); display: grid; place-items: start center; padding-top: 12vh; }
.search-overlay[hidden] { display: none; }
.search-panel { width: min(680px, 94vw); background: #fff; border-radius: 16px; box-shadow: var(--shadow-lg); overflow: hidden; }
.search-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); font-size: 13px; font-weight: 600; }
.search-panel input { width: 100%; border: 0; outline: 0; padding: 18px 20px; font-size: 16px; }
.search-results { max-height: 420px; overflow-y: auto; border-top: 1px solid var(--line); }
.search-result { display: flex; justify-content: space-between; gap: 12px; padding: 12px 20px; border-bottom: 1px solid #f0f3f8; font-size: 13px; cursor: pointer; }
.search-result:hover { background: #f6f9ff; }
.search-result em { font-style: normal; color: var(--muted); font-size: 11px; }

.notice {
  background: #fff8e9; border: 1px solid #f4dfae; color: #86601a; border-radius: 10px;
  padding: 12px 16px; font-size: 13px; margin-bottom: 18px;
}
.notice.error { background: #fff1f1; border-color: #f3c3c3; color: #a33535; }
.badge-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; margin-right: 6px; }
.tiny { font-size: 11px; color: var(--muted); }
.right { text-align: right; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.mb0 { margin-bottom: 0; }
.mt16 { margin-top: 16px; }
.mt24 { margin-top: 24px; }
.hidden { display: none !important; }
