:root {
  --bg: #f3f5f9;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --text: #111827;
  --text-soft: #374151;
  --muted: #6b7280;
  --line: #e5e7eb;
  --line-strong: #d1d5db;
  --brand: #2563eb;
  --brand-dark: #1d4ed8;
  --brand-soft: #eff6ff;
  --green: #16a34a;
  --green-soft: #ecfdf5;
  --amber: #d97706;
  --amber-soft: #fffbeb;
  --red: #dc2626;
  --red-soft: #fef2f2;
  --violet: #7c3aed;
  --sidebar: #0b1220;
  --sidebar-2: #111c31;
  --radius: 18px;
  --shadow: 0 10px 34px rgba(15, 23, 42, 0.06);
  --shadow-sm: 0 3px 12px rgba(15, 23, 42, 0.05);
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
.nav-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9999;
  width: 0;
  height: 2px;
  opacity: 0;
  background: linear-gradient(90deg, #2563eb, #7c3aed);
  box-shadow: 0 0 8px rgba(37, 99, 235, .45);
  transition: width .28s ease, opacity .18s ease;
}
.nav-progress.loading { width: 74%; opacity: 1; }
.nav-progress.done { width: 100%; opacity: 0; transition: width .12s ease, opacity .25s ease .05s; }
.content { animation: page-in .16s ease-out; }
@keyframes page-in {
  from { opacity: .55; transform: translateY(1px); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .content { animation: none; }
  .nav-progress { transition: none; }
}
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
button { cursor: pointer; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 34px; line-height: 1.16; letter-spacing: -0.9px; }
h2 { font-size: 18px; line-height: 1.3; letter-spacing: -0.25px; }
h3 { font-size: 16px; }
.muted { color: var(--muted); }
.mono { font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; font-size: 12.5px; }
.text-good { color: var(--green) !important; }
.text-warn { color: var(--amber) !important; }
.text-bad { color: var(--red) !important; }
.vs { color: #9ca3af; font-weight: 500; margin: 0 6px; font-size: 12px; }
.row-sub { color: #9ca3af; font-size: 12px; margin-top: 2px; }
.eyebrow {
  color: var(--brand);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  margin-bottom: 9px;
}

/* ---------------------------------------------------------------- app shell */
.app-shell { min-height: 100vh; }
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 248px;
  z-index: 60;
  display: flex;
  flex-direction: column;
  padding: 24px 16px 18px;
  color: #dbe4f2;
  background:
    radial-gradient(circle at 8% 0%, rgba(59, 130, 246, .18), transparent 34%),
    linear-gradient(180deg, #0b1220 0%, #0f1a2e 55%, #0b1220 100%);
  border-right: 1px solid rgba(255, 255, 255, .06);
}
.brand { display: flex; align-items: center; gap: 12px; padding: 0 8px; }
.brand-mark {
  width: 40px; height: 40px; border-radius: 13px;
  display: grid; place-items: center;
  color: #fff; font-weight: 800; font-size: 19px;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  box-shadow: 0 8px 22px rgba(59, 130, 246, .35);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-text strong { color: #fff; font-size: 16px; letter-spacing: .5px; }
.brand-text span { color: #8fa1bd; font-size: 11px; margin-top: 3px; }

.nav { margin-top: 30px; display: flex; flex-direction: column; gap: 2px; }
.nav-section {
  margin: 18px 10px 7px;
  color: #60718d;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.6px;
  text-transform: uppercase;
}
.nav-item {
  position: relative;
  display: flex; align-items: center; gap: 11px;
  padding: 11px 12px;
  border-radius: 11px;
  color: #aebbd0;
  font-size: 13.5px;
  transition: background .18s ease, color .18s ease, transform .18s ease;
}
.nav-item:hover { background: rgba(255, 255, 255, .055); color: #fff; }
.nav-item.active {
  color: #fff;
  background: linear-gradient(90deg, rgba(37, 99, 235, .28), rgba(37, 99, 235, .08));
  box-shadow: inset 0 0 0 1px rgba(96, 165, 250, .15);
}
.nav-item.active::before {
  content: "";
  position: absolute; left: -16px; top: 9px; bottom: 9px; width: 3px;
  border-radius: 0 3px 3px 0; background: #60a5fa;
}
.nav-icon {
  width: 24px; height: 24px; display: grid; place-items: center;
  border-radius: 7px; background: rgba(255, 255, 255, .06);
  color: #8fb4ff; font-size: 13px;
}
.nav-item.active .nav-icon { background: rgba(96, 165, 250, .18); color: #bfdbfe; }
.nav-dot { margin-left: auto; width: 7px; height: 7px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 4px rgba(34, 197, 94, .12); }
.sidebar-foot { margin-top: auto; padding: 18px 10px 0; border-top: 1px solid rgba(255, 255, 255, .07); }
.sidebar-status { display: flex; align-items: center; gap: 8px; color: #b7c4d7; font-size: 12px; }
.sidebar-version { margin-top: 7px; color: #60718d; font-size: 10.5px; }
.pulse-dot, .live-dot {
  width: 8px; height: 8px; border-radius: 50%; background: #22c55e;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, .14);
  display: inline-block;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 4px rgba(34, 197, 94, .14); }
  50% { opacity: .65; box-shadow: 0 0 0 7px rgba(34, 197, 94, .05); }
}
.main { margin-left: 248px; min-height: 100vh; }
.topbar {
  position: sticky; top: 0; z-index: 30;
  height: 68px;
  display: flex; align-items: center; gap: 14px;
  padding: 0 30px;
  background: rgba(255, 255, 255, .88);
  border-bottom: 1px solid rgba(229, 231, 235, .9);
  backdrop-filter: blur(14px);
}
.topbar-title { font-weight: 700; font-size: 15px; letter-spacing: .1px; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.demo-pill {
  padding: 6px 10px; border-radius: 999px;
  background: #fff7ed; color: #c2410c; border: 1px solid #fed7aa;
  font-size: 11px; font-weight: 700;
}
.date-pill {
  padding: 6px 10px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--line);
  color: var(--muted); font-size: 11.5px;
}
.user-chip { display: flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600; }
.avatar {
  width: 27px; height: 27px; border-radius: 9px;
  display: grid; place-items: center;
  background: #dbeafe; color: #1d4ed8; font-size: 12px; font-weight: 800;
}
.role-tag { color: #9ca3af; font-size: 10.5px; font-weight: 500; }
.icon-btn {
  border: 1px solid var(--line); background: var(--surface); color: var(--text-soft);
  width: 34px; height: 34px; border-radius: 10px;
}
.menu-btn { display: none; }
.content { padding: 30px 32px 54px; max-width: 1640px; margin: 0 auto; }
.content-dashboard { max-width: none; padding: 0 24px 0; }
.content-filter_page { max-width: none; padding: 18px 24px 42px; }

/* Shared page controls: contextual tools live beside the signed-in user. */
.topbar-date-form { display: flex; align-items: center; gap: 7px; min-height: 34px; padding: 3px 5px 3px 10px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.topbar-date-form label { color: #94a3b8; font-size: 10px; font-weight: 700; }
.topbar-date-form input[type="date"] { width: 126px; border: 0; outline: 0; background: transparent; color: var(--text-soft); font-size: 11px; font-weight: 700; }
.topbar-today { padding: 3px 6px; border-radius: 6px; background: var(--brand-soft); color: var(--brand); font-size: 9.5px; font-weight: 800; }

/* ------------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  border: 1px solid transparent; border-radius: 11px;
  padding: 9px 15px; font-size: 12.5px; font-weight: 700;
  transition: transform .14s ease, box-shadow .14s ease, background .14s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 6px 16px rgba(37, 99, 235, .22); }
.btn-primary:hover { background: var(--brand-dark); }
.btn:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }
.field input:disabled { background: #f3f4f6; color: #9ca3af; cursor: not-allowed; }
.btn-ghost { background: var(--surface); color: var(--text-soft); border-color: var(--line); }
.btn-ghost:hover { background: var(--surface-2); border-color: var(--line-strong); }
.btn-sm { padding: 7px 11px; font-size: 11.5px; border-radius: 9px; }
.btn-xs { padding: 5px 9px; font-size: 10.5px; border-radius: 8px; }
.btn-block { width: 100%; }
.text-link { color: var(--brand); font-size: 12px; font-weight: 700; }
.text-link:hover { text-decoration: underline; }
.block-link { display: block; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.head-actions { display: flex; gap: 12px; }

/* -------------------------------------------------------------------- common */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
}
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.card-head.compact { align-items: center; margin-bottom: 12px; }
.card-head p { margin-top: 4px; font-size: 12px; }
.page-actions { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.page-tools { display: flex; justify-content: flex-end; margin-bottom: 12px; }
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 9px; border-radius: 999px;
  font-size: 10.5px; font-weight: 800; letter-spacing: .15px;
  border: 1px solid transparent; white-space: nowrap;
}
.badge-soft { background: var(--surface-2); color: var(--muted); border-color: var(--line); }
.badge-running { background: var(--green-soft); color: #15803d; border-color: #bbf7d0; }
.badge-paused { background: var(--amber-soft); color: #b45309; border-color: #fde68a; }
.badge-completed { background: var(--brand-soft); color: #1d4ed8; border-color: #bfdbfe; }
.badge-queued { background: #f5f3ff; color: #6d28d9; border-color: #ddd6fe; }
.badge-failed { background: var(--red-soft); color: #b91c1c; border-color: #fecaca; }
.badge-muted { background: #f3f4f6; color: #9ca3af; border-color: #e5e7eb; }
.flash-stack { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.flash {
  padding: 11px 14px; border-radius: 11px; font-size: 12.5px; font-weight: 600;
  border: 1px solid transparent;
}
.flash-success { background: var(--green-soft); color: #166534; border-color: #bbf7d0; }
.flash-error { background: var(--red-soft); color: #991b1b; border-color: #fecaca; }

/* ----------------------------------------------------------------- dashboard */
.task-hero {
  display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 26px;
  margin-bottom: 20px;
  background:
    radial-gradient(circle at 92% 8%, rgba(37, 99, 235, .12), transparent 34%),
    linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);
  border-color: #dbeafe;
}
.task-hero-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.task-kicker { display: flex; align-items: center; gap: 8px; color: var(--brand); font-size: 10.5px; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase; margin-bottom: 8px; }
.task-hero h2 { font-size: 23px; letter-spacing: -.4px; }
.task-hero .muted { margin-top: 7px; font-size: 11.5px; }
.progress-line { display: flex; align-items: center; gap: 15px; margin-top: 24px; }
.progress-track { flex: 1; height: 9px; border-radius: 999px; background: #e8eef8; overflow: hidden; }
.progress-fill { height: 100%; border-radius: inherit; background: linear-gradient(90deg, #2563eb, #38bdf8); transition: width .8s ease; }
.progress-meta { min-width: 112px; display: flex; align-items: baseline; justify-content: flex-end; gap: 8px; font-size: 12px; color: var(--muted); }
.progress-meta strong { color: var(--text); font-size: 15px; }
.task-step-row { display: flex; align-items: center; gap: 9px; margin-top: 11px; color: var(--text-soft); font-size: 12px; }
.task-updated { margin-left: auto; color: #9ca3af; font-size: 11px; }
.task-actions { display: flex; align-items: center; gap: 8px; margin-top: 18px; flex-wrap: wrap; }
.task-hero-side { border-left: 1px solid #e2e8f0; padding-left: 24px; display: flex; flex-direction: column; justify-content: center; gap: 13px; }
.task-mini-stat { display: flex; flex-direction: column; }
.task-mini-stat span { color: var(--muted); font-size: 10.5px; }
.task-mini-stat strong { font-size: 24px; line-height: 1.2; letter-spacing: -.5px; }
.task-mini-stat small { color: #9ca3af; font-size: 10.5px; }
.small-strong { font-size: 14px !important; letter-spacing: 0 !important; }
.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }
.kpi-card { background: var(--surface); border: 1px solid var(--line); border-radius: 15px; padding: 17px 18px; box-shadow: var(--shadow-sm); position: relative; overflow: hidden; }
.kpi-icon { position: absolute; right: 14px; top: 14px; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 10px; background: #f1f5f9; color: #64748b; font-size: 14px; }
.kpi-icon.accent-blue { background: #eff6ff; color: #2563eb; }
.kpi-icon.accent-green { background: #ecfdf5; color: #059669; }
.kpi-icon.accent-amber { background: #fffbeb; color: #d97706; }
.kpi-label { color: var(--muted); font-size: 11px; font-weight: 600; }
.kpi-value { font-size: 28px; line-height: 1.25; font-weight: 800; letter-spacing: -.8px; margin-top: 3px; }
.kpi-unit { font-size: 11px; font-weight: 600; color: #9ca3af; margin-left: 3px; letter-spacing: 0; }
.kpi-foot { margin-top: 4px; color: #9ca3af; font-size: 10.5px; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; align-items: start; }
.match-panel { padding: 0; overflow: hidden; }
.match-panel > .card-head { padding: 20px 22px 0; }
.side-stack { display: flex; flex-direction: column; gap: 14px; }
.table-wrap { width: 100%; overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.data-table th { text-align: left; padding: 10px 12px; color: #9ca3af; font-size: 10px; font-weight: 800; letter-spacing: .8px; text-transform: uppercase; background: #fbfcfe; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); white-space: nowrap; }
.data-table td { padding: 13px 12px; border-bottom: 1px solid #f0f2f6; vertical-align: middle; }
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover { background: #fbfdff; }
.match-table { min-width: 820px; }
.match-table td:nth-child(3) { min-width: 180px; }
.match-table td:first-child, .match-table th:first-child { padding-left: 22px; }
.match-table td:last-child, .match-table th:last-child { padding-right: 22px; }
.league-tag { display: inline-block; padding: 3px 7px; border-radius: 6px; background: #f1f5f9; color: #475569; font-size: 10.5px; font-weight: 700; }
.team-line { display: block; font-size: 13px; color: var(--text); white-space: nowrap; }
.team-line:hover strong { color: var(--brand); }
.team-line strong { font-weight: 700; }
.status-pill { display: inline-flex; align-items: center; gap: 4px; padding: 3px 7px; border-radius: 6px; font-size: 10.5px; font-weight: 700; white-space: nowrap; }
.status-pending { background: #f1f5f9; color: #64748b; }
.status-live { background: #eff6ff; color: #1d4ed8; }
.status-done { background: #ecfdf5; color: #047857; }
.mini-progress { width: 82px; height: 6px; border-radius: 999px; background: #eef2f7; overflow: hidden; }
.mini-progress span { display: block; height: 100%; border-radius: inherit; }
.mini-progress .good { background: #22c55e; }
.mini-progress .warn { background: #f59e0b; }
.mini-progress .bad { background: #ef4444; }
.ratio-cell { min-width: 130px; }
.ratio-bar { display: flex; height: 7px; border-radius: 999px; overflow: hidden; background: #eef2f7; }
.ratio-seg { height: 100%; min-width: 0; }
.had-win { background: #22c55e; }
.had-same { background: #f59e0b; }
.had-lose { background: #ef4444; }
.hhad-win { background: #3b82f6; }
.hhad-same { background: #a855f7; }
.hhad-lose { background: #f97316; }
.ratio-legend { display: flex; flex-wrap: wrap; gap: 4px 8px; margin-top: 5px; color: #8b95a5; font-size: 9.5px; }
.legend-dot { display: inline-block; width: 5px; height: 5px; border-radius: 50%; margin-right: 3px; vertical-align: 1px; }
.legend-dot.had-win { background: #22c55e; }
.legend-dot.had-same { background: #f59e0b; }
.legend-dot.had-lose { background: #ef4444; }
.legend-dot.hhad-win { background: #3b82f6; }
.legend-dot.hhad-same { background: #a855f7; }
.legend-dot.hhad-lose { background: #f97316; }
.row-arrow { display: grid; place-items: center; width: 27px; height: 27px; border-radius: 8px; color: #94a3b8; background: #f8fafc; }
.row-arrow:hover { background: var(--brand-soft); color: var(--brand); }
.alert-list { display: flex; flex-direction: column; gap: 10px; }
.alert-item { display: flex; gap: 9px; }
.alert-dot { flex: 0 0 auto; width: 7px; height: 7px; border-radius: 50%; margin-top: 5px; }
.alert-info { background: #3b82f6; }
.alert-warn { background: #f59e0b; }
.alert-error { background: #ef4444; }
.alert-message { font-size: 11.5px; line-height: 1.45; color: var(--text-soft); }
.alert-meta { margin-top: 3px; color: #a3abb8; font-size: 9.5px; }
.empty-mini { padding: 16px; border-radius: 10px; background: var(--surface-2); color: var(--muted); font-size: 12px; text-align: center; }
.live-label { color: #059669; font-size: 9.5px; font-weight: 800; letter-spacing: 1px; display: flex; align-items: center; gap: 6px; }
.timeline { display: flex; flex-direction: column; gap: 0; }
.timeline-item { display: flex; gap: 10px; position: relative; padding-bottom: 13px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before { content: ""; position: absolute; left: 3.5px; top: 10px; bottom: -2px; width: 1px; background: #e8edf4; }
.timeline-item:last-child::before { display: none; }
.timeline-dot { flex: 0 0 auto; width: 8px; height: 8px; border-radius: 50%; margin-top: 5px; background: #94a3b8; z-index: 1; box-shadow: 0 0 0 3px #fff; }
.timeline-dot.info { background: #3b82f6; }
.timeline-dot.warn { background: #f59e0b; }
.timeline-dot.error { background: #ef4444; }
.timeline-dot.success { background: #22c55e; }
.timeline-body { min-width: 0; }
.timeline-message { font-size: 11px; line-height: 1.4; color: var(--text-soft); }
.timeline-meta { margin-top: 3px; color: #a3abb8; font-size: 9.5px; }
.timeline.big .timeline-message { font-size: 12.5px; font-weight: 600; }
.timeline.big .timeline-meta { font-size: 10.5px; }
.tip-card { display: flex; gap: 11px; background: #fbfcff; border-color: #dbeafe; }
.tip-icon, .note-icon { flex: 0 0 auto; width: 27px; height: 27px; display: grid; place-items: center; border-radius: 9px; background: var(--brand-soft); color: var(--brand); font-weight: 800; font-size: 12px; }
.tip-card strong, .note-card strong { font-size: 12px; }
.tip-card p, .note-card p { margin-top: 4px; color: var(--muted); font-size: 11px; line-height: 1.55; }

/* ------------------------------------------------------------ today board */
.schedule-board {
  background: var(--surface);
  border: 0;
  border-radius: 0;
  box-shadow: none;
  overflow: hidden;
  min-height: calc(100vh - 92px);
}
.board-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 14px;
  border-bottom: 1px solid var(--line);
}
.board-left { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; min-width: 0; }
.date-filter { display: flex; align-items: center; gap: 5px; white-space: nowrap; }
.date-filter input[type="date"] {
  height: 27px;
  padding: 0 5px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f8fafc;
  color: var(--text-soft);
  outline: none;
  font-family: inherit;
  font-size: 10.5px;
  font-weight: 600;
}
.date-filter input[type="date"]:focus { border-color: #93c5fd; box-shadow: 0 0 0 3px rgba(37, 99, 235, .08); }
.date-filter input[type="date"]::-webkit-calendar-picker-indicator { cursor: pointer; opacity: .62; }
.date-today { color: var(--brand); font-size: 10px; font-weight: 700; }
.date-today:hover { text-decoration: underline; }
.board-meta { display: flex; align-items: center; gap: 7px; color: #64748b; font-size: 10.5px; white-space: nowrap; }
.board-meta b { color: var(--text); font-size: 11.5px; font-weight: 800; }
.board-meta .dot { color: #cbd5e1; }
.board-meta-sub { color: #94a3b8; font-size: 9.5px; }
.board-meta small { margin-left: 2px; color: #9ca3af; font-size: 8.5px; font-weight: 600; }
.board-meta-divider { width: 1px; height: 14px; background: var(--line); }
.board-note {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 16px;
  padding: 5px 14px;
  border-bottom: 1px solid var(--line);
  background: #fcfdff;
  color: #7c8798;
  font-size: 9.5px;
  line-height: 1.55;
}
.board-note b { color: var(--text-soft); font-weight: 800; }
.collection-meter { display: flex; align-items: center; gap: 7px; width: min(360px, 100%); }
.collection-meter-track { flex: 1; height: 4px; overflow: hidden; border-radius: 999px; background: #e8eef6; }
.collection-meter-track span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #60a5fa, #2563eb); }
.collection-meter small { flex: 0 0 auto; color: #64748b; font-size: 9px; font-variant-numeric: tabular-nums; }
.board-controls { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; justify-content: flex-end; }
.status-tabs {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: 8px;
  background: #f3f6fa;
  white-space: nowrap;
}
.status-tab {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 7px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 700;
  transition: background .15s ease, color .15s ease, box-shadow .15s ease;
}
.status-tab span {
  min-width: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: #fff;
  color: #94a3b8;
  font-size: 8.5px;
  text-align: center;
}
.status-tab:hover { color: var(--text-soft); }
.status-tab.active {
  background: #fff;
  color: var(--brand);
  box-shadow: 0 1px 4px rgba(15, 23, 42, .08);
}
.status-tab.active span { background: var(--brand-soft); color: var(--brand); }

.date-strip {
  display: flex;
  gap: 4px;
  padding: 6px 14px;
  overflow-x: auto;
  background: #fbfcfe;
  border-bottom: 1px solid var(--line);
  scrollbar-width: thin;
}
.date-strip::-webkit-scrollbar { height: 4px; }
.date-strip::-webkit-scrollbar-thumb { background: #dbe3ee; border-radius: 999px; }
.empty-hint { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 9px 14px; border-bottom: 1px solid var(--line); background: #fbfcfe; color: var(--muted); font-size: 10.5px; }
.empty-hint strong { color: var(--text-soft); font-size: 11px; }
.empty-hint .text-link { font-size: 10.5px; }
.date-chip {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: auto auto;
  grid-template-rows: auto auto;
  column-gap: 4px;
  align-items: baseline;
  padding: 3px 7px;
  border: 1px solid transparent;
  border-radius: 7px;
  color: var(--text-soft);
  line-height: 1.15;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.date-chip:hover { background: #f3f6fa; border-color: #e2e8f0; }
.date-chip .date-week { color: #94a3b8; font-size: 8.5px; font-weight: 700; }
.date-chip strong { color: var(--text); font-size: 10.5px; font-variant-numeric: tabular-nums; }
.date-chip small { grid-column: 1 / -1; color: #9ca3af; font-size: 8px; }
.date-chip.is-empty { opacity: .42; }
.date-chip.is-today .date-week { color: var(--brand); }
.date-chip.active {
  background: var(--brand);
  border-color: var(--brand);
  box-shadow: 0 2px 6px rgba(37, 99, 235, .2);
}
.date-chip.active .date-week,
.date-chip.active strong,
.date-chip.active small { color: #fff; }

.board-table { width: 100%; overflow-x: auto; }
.board-head, .match-list { min-width: 900px; }
.board-head {
  display: grid;
  grid-template-columns: 74px 62px minmax(0, 1fr) 104px 112px 112px 132px 46px;
  gap: 10px;
  align-items: center;
  padding: 3px 14px;
  background: #f8fafc;
  border-bottom: 1px solid var(--line);
  color: #9ca3af;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .3px;
}
.board-head span:nth-child(6) { text-align: center; }
.match-list { display: flex; flex-direction: column; }
.match-list-item {
  position: relative;
  display: grid;
  grid-template-columns: 74px 62px minmax(0, 1fr) 104px 112px 112px 132px 46px;
  gap: 10px;
  align-items: center;
  min-height: var(--match-row-height, 34px);
  padding: 2px 14px;
  border-bottom: 1px solid #f1f4f8;
  transition: background .15s ease;
}
.match-list-item:last-child { border-bottom: none; }
.match-list-item:hover { background: #fbfdff; }
.match-list-item::before {
  content: "";
  position: absolute;
  left: 0; top: 6px; bottom: 6px;
  width: 2px;
  border-radius: 0 2px 2px 0;
  background: transparent;
}
.match-list-item.is-live::before { background: #3b82f6; }
.match-time { display: flex; align-items: baseline; gap: 3px; white-space: nowrap; }
.match-time strong { font-size: 11.5px; line-height: 1.1; font-weight: 800; letter-spacing: -.2px; }
.match-time span { color: #9ca3af; font-size: 8px; line-height: 1.1; }
.league-text { color: #64748b; font-size: 10px; white-space: nowrap; }
.match-teams { display: flex; align-items: center; min-width: 0; color: var(--text); font-size: 12.5px; line-height: 1.15; white-space: nowrap; }
.match-teams strong { font-weight: 700; }
.match-teams:hover strong { color: var(--brand); }
.match-teams .vs { color: #b2bac6; font-size: 9px; font-weight: 500; margin: 0 6px; }
.match-state { color: #64748b; font-size: 10px; line-height: 1.15; white-space: nowrap; }
.match-state b { color: var(--text-soft); font-size: 10.5px; }
.match-state.status-live { color: #1d4ed8; }
.match-state.status-live b { color: #1d4ed8; }
.match-state.status-done { color: #15803d; }
.match-state.status-done b { color: #15803d; }
.live-pip {
  display: inline-block;
  width: 4px; height: 4px;
  margin-right: 4px;
  border-radius: 50%;
  background: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, .12);
  vertical-align: 1px;
}
.match-odds {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  align-items: center;
  font-family: var(--mono, ui-monospace, SFMono-Regular, Consolas, monospace);
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
  text-align: center;
}
.match-odds.is-hhad { grid-template-columns: 12px repeat(3, 1fr); gap: 3px; }
.match-odds .odds-market-tag { color: #94a3b8; font-family: inherit; font-size: 8px; font-weight: 800; }
.match-odds .odds-empty { grid-column: 1 / -1; color: #b2bac6; }
.odds-value { color: #475569; }
.odds-value.odds-win { color: #15803d; }
.odds-value.odds-same { color: #b45309; }
.odds-value.odds-lose { color: #b91c1c; }
.scheme-trio {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 4px;
  color: #64748b;
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
}
.scheme-trio .free { color: var(--brand); font-weight: 800; }
.scheme-trio .paid { color: #a3abb8; }
.scheme-slash { color: #cbd5e1; font-size: 8.5px; }
.vote-cell { min-width: 0; }
.vote-nums { display: flex; gap: 5px; font-size: 9.5px; font-weight: 700; line-height: 1; }
.vote-nums .had-win { background: transparent; color: #16a34a; }
.vote-nums .had-same { background: transparent; color: #d97706; }
.vote-nums .had-lose { background: transparent; color: #dc2626; }
.vote-mini { height: 3px; margin-top: 2px; }
.match-arrow {
  color: #b2bac6;
  font-size: 15px;
  line-height: 1;
  text-align: right;
  transition: color .15s ease;
}
.match-list-item:hover .match-arrow { color: var(--brand); }
.schedule-board.is-many .match-list-item { padding-top: 0; padding-bottom: 0; }
.recommendation-picks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; text-align: center; font-size: 10px; font-weight: 800; }
.recommendation-picks span { display: inline-flex; align-items: baseline; justify-content: center; gap: 2px; padding: 2px 3px; border-radius: 5px; }
.recommendation-picks small { font-size: 8px; font-weight: 700; opacity: .72; }
.recommendation-picks .pick-none { grid-column: 1 / -1; justify-content: center; background: #f6f8fb; color: #94a3b8; font-size: 8.5px; font-weight: 700; }
.pick-win { background: #ecfdf5; color: #15803d; }
.pick-same { background: #fffbeb; color: #b45309; }
.pick-lose { background: #fef2f2; color: #b91c1c; }
.match-filter-link { display: inline-flex; justify-content: center; padding: 3px 5px; border-radius: 6px; color: var(--brand); font-size: 9px; font-weight: 800; opacity: .72; }
.match-filter-link:hover { background: var(--brand-soft); opacity: 1; }
.schedule-board.is-many .vote-mini { margin-top: 1px; }
.empty-list {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 90px;
  color: var(--muted);
  font-size: 11px;
}
.empty-list strong { color: var(--text-soft); font-size: 12px; }

/* -------------------------------------------------------------------- detail */
.breadcrumb { display: flex; align-items: center; gap: 7px; color: #9ca3af; font-size: 11.5px; margin-bottom: 13px; }
.breadcrumb a { color: var(--brand); font-weight: 600; }
.match-detail-page { max-width: 1600px; margin: 0 auto; }
.match-detail-page > .card { margin-bottom: 16px; }
.match-hero { border-radius: 20px; padding: 22px 24px; margin-bottom: 18px; background: radial-gradient(circle at 88% 0%, rgba(59, 130, 246, .16), transparent 35%), linear-gradient(135deg, #fff, #f7fbff); border: 1px solid #dbeafe; box-shadow: var(--shadow); }
.breadcrumb-hero { margin: 0 0 12px; padding-bottom: 10px; border-bottom: 1px solid #e8eef8; }
.match-hero-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.match-overview-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(360px, .8fr); gap: 18px; align-items: stretch; margin-top: 18px; }
.match-overview-main { min-width: 0; display: flex; flex-direction: column; }
.match-overview-ratios { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; min-width: 0; }
.match-overview-main .match-metrics { margin-top: 0; }
.scheme-outcome-board { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 14px; padding-top: 12px; border-top: 1px solid #e8eef8; }
.outcome-group { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.outcome-label { display: inline-flex; flex-direction: column; line-height: 1.15; color: var(--muted); font-size: 10px; font-weight: 700; margin-right: 2px; }
.outcome-label small { color: #a3abb8; font-size: 8px; font-weight: 500; }
.outcome-pill { display: inline-flex; align-items: baseline; justify-content: center; gap: 4px; min-width: 50px; padding: 3px 8px; border-radius: 7px; }
.outcome-pill small { font-size: 8.5px; font-weight: 700; opacity: .72; }
.outcome-pill b { font-size: 13px; font-variant-numeric: tabular-nums; }
.outcome-source { margin-left: auto; color: #b0b8c4; font-size: 8.5px; }
.ratio-donut-card { display: flex; flex-direction: column; gap: 9px; min-width: 0; padding: 12px; border: 1px solid #e8eef8; border-radius: 14px; background: #fbfcfe; }
.ratio-donut-head { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; }
.ratio-donut-head strong { font-size: 12px; }
.ratio-donut-head span { color: #9ca3af; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 8.5px; }
.ratio-donut-body { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ratio-donut { position: relative; flex: 0 0 auto; width: 84px; height: 84px; border-radius: 50%; }
.ratio-donut-hole { position: absolute; inset: 17px; border-radius: 50%; background: #fbfcfe; }
.ratio-donut-center { position: absolute; inset: 0; z-index: 1; display: grid; place-content: center; text-align: center; line-height: 1.05; }
.ratio-donut-center b { color: var(--text); font-size: 12px; }
.ratio-donut-center small { color: #9ca3af; font-size: 8px; }
.ratio-donut-legend { display: flex; flex-direction: column; gap: 3px; min-width: 0; color: #64748b; font-size: 9.5px; }
.ratio-donut-legend span { display: flex; align-items: center; gap: 3px; white-space: nowrap; }
.ratio-donut-legend b { margin-left: auto; color: #334155; font-variant-numeric: tabular-nums; }
.ratio-donut-sub { padding-top: 8px; border-top: 1px dashed #e8eef8; }
.ratio-donut-sub-label { display: block; margin-bottom: 4px; color: var(--muted); font-size: 9px; font-weight: 700; }
.ratio-mini-bar { height: 4px; }
.ratio-mini-legend { display: flex; flex-wrap: wrap; gap: 2px 7px; margin-top: 4px; color: #8b95a5; font-size: 8.5px; }
.ratio-mini-legend span { display: inline-flex; align-items: center; gap: 2px; }
.match-title { font-size: 31px; letter-spacing: -1px; margin-bottom: 9px; }
.vs-big { color: #94a3b8; font-size: 17px; font-weight: 500; margin: 0 6px; }
.match-subline { display: flex; align-items: center; gap: 10px; font-size: 11px; flex-wrap: wrap; }
.match-hero-actions { display: flex; gap: 8px; }
.match-metrics { display: grid; grid-template-columns: repeat(6, 1fr); gap: 1px; margin-top: 24px; border-top: 1px solid #e8eef8; padding-top: 18px; }
.match-metrics .metric { display: flex; flex-direction: column; padding: 0 11px; border-left: 1px solid #e8eef8; }
.match-metrics .metric:first-child { border-left: none; padding-left: 0; }
.match-metrics .metric span { color: var(--muted); font-size: 10px; }
.match-metrics .metric strong { font-size: 18px; line-height: 1.3; }
.match-metrics .metric small { color: #9ca3af; font-size: 9px; }
.odds-board { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-top: 14px; padding-top: 12px; border-top: 1px solid #e8eef8; }
.odds-group { display: flex; align-items: center; gap: 5px; }
.odds-label { color: var(--muted); font-size: 10px; font-weight: 700; margin-right: 2px; }
.odds-pill { display: inline-flex; align-items: baseline; gap: 4px; padding: 3px 7px; border: 1px solid #eef2f7; border-radius: 6px; background: #fbfcfe; }
.odds-pill small { color: #9ca3af; font-size: 8.5px; }
.odds-pill b { color: #475569; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 11px; }
.odds-pill.odds-win b { color: #15803d; }
.odds-pill.odds-same b { color: #b45309; }
.odds-pill.odds-lose b { color: #b91c1c; }
.odds-source { margin-left: auto; color: #b0b8c4; font-family: monospace; font-size: 9px; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 390px; gap: 18px; margin-bottom: 18px; }
.intel-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 18px; margin-bottom: 18px; }
.intel-card { min-width: 0; }
.intel-news-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.intel-news-col { min-width: 0; padding: 11px; border: 1px solid #eef2f7; border-radius: 12px; background: #fbfcfe; }
.intel-news-head { color: var(--text-soft); font-size: 11px; font-weight: 800; margin-bottom: 4px; }
.news-item { padding: 8px 0; border-top: 1px dashed #e8eef8; }
.news-item:first-of-type { border-top: none; padding-top: 4px; }
.news-kind { display: inline-block; padding: 1px 5px; border-radius: 4px; font-size: 8.5px; font-weight: 800; }
.news-kind-good_news { background: #f0fdf4; color: #15803d; }
.news-kind-bad_news { background: #fff1f2; color: #be123c; }
.news-kind-injury { background: #fffbeb; color: #b45309; }
.news-kind-first_team { background: #eff6ff; color: #1d4ed8; }
.news-kind-neutral_news, .news-kind-information { background: #f1f5f9; color: #64748b; }
.news-text { margin-top: 4px; color: var(--text-soft); font-size: 10.5px; line-height: 1.55; white-space: pre-line; max-height: 180px; overflow: auto; }
.intel-form-grid { display: grid; grid-template-columns: 1fr 1.15fr 1fr; gap: 10px; }
.form-block { min-width: 0; padding: 11px; border: 1px solid #eef2f7; border-radius: 12px; background: #fbfcfe; }
.form-block-head { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; margin-bottom: 8px; }
.form-block-head span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-soft); font-size: 11px; font-weight: 800; }
.form-block-head em { flex: 0 0 auto; color: #9ca3af; font-size: 8.5px; font-style: normal; }
.form-badges { display: flex; gap: 3px; min-height: 20px; }
.form-badge { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 5px; font-size: 9px; font-weight: 800; }
.form-badge.form-win { background: #dcfce7; color: #15803d; }
.form-badge.form-same { background: #fef3c7; color: #b45309; }
.form-badge.form-lose { background: #fee2e2; color: #b91c1c; }
.form-text { margin-top: 6px; color: var(--muted); font-size: 9.5px; }
.h2h-list { display: flex; flex-direction: column; gap: 4px; }
.h2h-row { display: flex; align-items: baseline; gap: 6px; min-width: 0; font-size: 9.5px; }
.h2h-date { flex: 0 0 auto; color: #9ca3af; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 8.5px; }
.h2h-teams { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-soft); }
.h2h-teams b { color: var(--text); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.future-cup { margin-left: auto; flex: 0 0 auto; color: #9ca3af; font-size: 8.5px; }
.intel-details { margin-top: 13px; padding-top: 10px; border-top: 1px solid #eef2f7; }
.intel-details summary { cursor: pointer; color: var(--brand); font-size: 10.5px; font-weight: 700; }
.goal-grid { display: flex; flex-direction: column; gap: 6px; margin-top: 9px; }
.goal-row { display: flex; align-items: center; gap: 8px; }
.goal-team { flex: 0 0 72px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-soft); font-size: 9.5px; font-weight: 700; }
.goal-cells { display: flex; gap: 3px; flex: 1; }
.goal-cell { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 0; flex: 1; padding: 3px 1px; border-radius: 5px; background: #f8fafc; }
.goal-cell b { font-size: 10px; color: var(--text); }
.goal-cell small { color: #9ca3af; font-size: 7px; }
.intel-note { margin-top: 7px; color: #9ca3af; font-size: 8.5px; }
.future-list { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; }
.flash-warning { background: #fffbeb; color: #92400e; border-color: #fde68a; }
.ratio-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.ratio-card { background: #fbfcfe; border: 1px solid #eef2f7; border-radius: 14px; padding: 15px; }
.ratio-card-title { font-size: 12px; font-weight: 800; margin-bottom: 13px; }
.ratio-card-title span { color: #9ca3af; font-size: 9.5px; font-weight: 500; font-family: monospace; margin-left: 4px; }
.ratio-block { margin-bottom: 14px; }
.ratio-block:last-child { margin-bottom: 0; }
.ratio-block-label { color: var(--muted); font-size: 10px; margin-bottom: 6px; }
.inline-warning { margin-top: 15px; padding: 10px 12px; border-radius: 10px; background: #fffbeb; border: 1px solid #fde68a; color: #92400e; font-size: 11px; }
.inline-warning.subtle { margin-top: 16px; background: #f8fafc; border-color: var(--line); color: var(--muted); }
.author-collapse { padding: 0; margin-bottom: 16px; overflow: hidden; }
.author-collapse > summary { display: flex; align-items: center; gap: 16px; padding: 16px 22px; cursor: pointer; list-style: none; }
.author-collapse > summary::-webkit-details-marker { display: none; }
.author-summary-main { min-width: 0; flex: 1; }
.author-summary-main h2 { font-size: 15px; }
.author-summary-main p { margin-top: 3px; font-size: 10.5px; }
.author-summary-top { display: flex; gap: 6px; flex-wrap: wrap; }
.author-top-chip { padding: 3px 7px; border-radius: 6px; background: #f8fafc; color: #64748b; font-size: 9.5px; white-space: nowrap; }
.author-top-chip b { color: #15803d; }
.author-toggle { flex: 0 0 auto; color: var(--brand); font-size: 10.5px; font-weight: 700; }
.when-open { display: none; }
details[open] .when-closed { display: none; }
details[open] .when-open { display: inline; }
.author-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 0 18px; padding: 0 22px 18px; }
.author-card-item { display: flex; align-items: center; gap: 9px; padding: 9px 0; border-top: 1px solid #f1f4f8; }
.author-list { display: flex; flex-direction: column; gap: 2px; }
.author-row { display: flex; align-items: center; gap: 9px; padding: 8px 0; border-bottom: 1px solid #f1f4f8; }
.author-row:last-child { border-bottom: none; }
.author-avatar { width: 29px; height: 29px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 9px; background: #eff6ff; color: #2563eb; font-size: 11px; font-weight: 800; }
.author-main { min-width: 0; flex: 1; }
.author-name { font-size: 11.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.author-meta { color: #9ca3af; font-size: 9.5px; margin-top: 1px; }
.author-rates { display: flex; gap: 10px; text-align: right; }
.author-rates span { display: flex; flex-direction: column; }
.author-rates b { font-size: 11px; }
.author-rates small { color: #9ca3af; font-size: 8.5px; }
.scheme-table td { vertical-align: top; }
.scheme-author { font-weight: 700; font-size: 12px; }
.type-pill { display: inline-block; padding: 2px 6px; border-radius: 5px; background: #f1f5f9; color: #475569; font-size: 9.5px; font-weight: 700; }
.scheme-legs { display: flex; flex-direction: column; gap: 4px; }
.scheme-leg { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.leg-match { color: #475569; font-size: 11px; font-weight: 600; }
.leg-results { display: flex; gap: 4px; flex-wrap: wrap; }
.pick-pill { display: inline-flex; align-items: center; gap: 4px; padding: 2px 6px; border-radius: 5px; background: #f0fdf4; color: #15803d; font-size: 10px; font-weight: 700; }
.pick-pill small { color: #86a98f; font-size: 8.5px; font-weight: 500; }
.tag-row { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 3px; }
.tag-pill { display: inline-block; padding: 1px 5px; border-radius: 4px; font-size: 8.5px; font-weight: 700; line-height: 1.45; }
.tag-hot { background: #fff1f2; color: #be123c; }
.tag-info { background: #eff6ff; color: #1d4ed8; }
.tag-warn { background: #fffbeb; color: #b45309; }
.tag-muted { background: #f1f5f9; color: #64748b; }
.event-card { margin-bottom: 16px; }
.event-list { display: flex; flex-direction: column; }
.event-row { display: flex; align-items: center; gap: 11px; padding: 9px 0; border-bottom: 1px solid #f1f4f8; }
.event-row:last-child { border-bottom: none; }
.event-type { flex: 0 0 auto; padding: 2px 7px; border-radius: 5px; background: #eff6ff; color: #1d4ed8; font-size: 9px; font-weight: 800; text-transform: uppercase; }
.event-main { flex: 1; min-width: 0; font-size: 11.5px; }
.placeholder-card { display: flex; align-items: flex-start; gap: 14px; background: linear-gradient(135deg, #fbfcff, #f8f5ff); border-color: #e9e3ff; }
.placeholder-icon { width: 38px; height: 38px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 12px; background: #f3e8ff; color: #7e22ce; font-size: 18px; }
.placeholder-card h3 { font-size: 14px; margin-bottom: 4px; }
.placeholder-card p { color: var(--muted); font-size: 11.5px; line-height: 1.6; }
.placeholder-main .btn { margin-top: 10px; }

/* -------------------------------------------------------------------- filter */
.scheme-layout { display: grid; grid-template-columns: minmax(245px, 20%) minmax(0, 1fr); gap: 1px; align-items: stretch; background: var(--line); }
.scheme-filter-pane { position: sticky; top: 86px; min-height: calc(100vh - 106px); padding: 18px; background: #fff; border-right: 1px solid var(--line); }
.scheme-pane-heading, .scheme-results-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.scheme-pane-heading { margin-bottom: 19px; }
.scheme-pane-heading h2, .scheme-results-heading h2 { font-size: 20px; letter-spacing: -.4px; }
.scheme-pane-kicker { display: block; margin-bottom: 3px; color: var(--brand); font-size: 9px; font-weight: 900; letter-spacing: 1.4px; }
.scheme-reset { color: var(--muted); font-size: 10px; font-weight: 700; }
.scheme-reset:hover { color: var(--brand); }
.scheme-field { display: flex; flex-direction: column; gap: 6px; }
.scheme-field > span, .selected-match-heading > span:first-child, .scheme-type-field legend { color: var(--text-soft); font-size: 10px; font-weight: 800; }
.scheme-field select { width: 100%; height: 38px; padding: 0 9px; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--text-soft); outline: none; font-size: 11px; }
.selected-match-heading { display: flex; justify-content: space-between; margin: 18px 0 7px; }
.selected-count { color: #94a3b8; font-size: 9.5px; }
.selected-match-list { display: flex; flex-direction: column; gap: 7px; max-height: 38vh; overflow-y: auto; }
.selected-match { position: relative; display: flex; gap: 6px; padding: 9px; border: 1px solid #dbeafe; border-radius: 10px; background: #f8fbff; }
.selected-match > .match-check { position: absolute; opacity: 0; pointer-events: none; }
.selected-match-main { min-width: 0; flex: 1; }
.selected-match-line { display: flex; flex-direction: column; margin-bottom: 7px; }
.selected-match-line strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10.5px; }
.selected-match-line strong span { color: #9ca3af; font-weight: 500; }
.selected-match-line small { color: #94a3b8; font-size: 8.5px; }
.selected-match .outcome-select { width: 100%; height: 29px; border-radius: 7px; font-size: 10px; }
.remove-match { width: 20px; height: 20px; padding: 0; border: 0; border-radius: 6px; background: transparent; color: #94a3b8; line-height: 1; }
.remove-match:hover { background: #fee2e2; color: #dc2626; }
.selected-match-empty { padding: 20px 8px; border: 1px dashed var(--line); border-radius: 10px; color: #9ca3af; font-size: 10px; text-align: center; }
.scheme-type-field { margin: 19px 0 0; padding: 0; border: 0; }
.scheme-type-field legend { margin-bottom: 7px; }
.scheme-type-segment { display: grid; grid-template-columns: repeat(3, 1fr); padding: 3px; border-radius: 9px; background: #f1f5f9; }
.scheme-type-segment input { position: absolute; opacity: 0; }
.scheme-type-segment span { display: block; padding: 6px 4px; border-radius: 7px; color: #64748b; font-size: 10px; font-weight: 800; text-align: center; cursor: pointer; }
.scheme-type-segment input:checked + span { background: #fff; color: var(--brand); box-shadow: 0 1px 4px rgba(15,23,42,.09); }
.scheme-rule-note { min-height: 35px; margin-top: 8px; color: #94a3b8; font-size: 9px; line-height: 1.45; }
.scheme-submit { width: 100%; margin-top: 13px; }
.scheme-filter-foot { margin-top: 9px; color: #a3abb8; font-size: 8.5px; text-align: center; }
.scheme-results-pane { min-width: 0; padding: 18px 20px; background: #f3f5f9; }
.scheme-results-heading { padding: 3px 2px 16px; }
.scheme-results-heading p { margin-top: 4px; color: var(--muted); font-size: 10.5px; }
.scheme-summary { display: grid; grid-template-columns: repeat(4, minmax(105px, 1fr)) minmax(180px, 1.25fr); margin-bottom: 14px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #fff; }
.scheme-summary > div { min-height: 74px; padding: 13px 16px; border-right: 1px solid #eef2f7; }
.scheme-summary > div:last-child { border-right: 0; }
.scheme-summary span { display: block; color: var(--muted); font-size: 9.5px; }
.scheme-summary strong { display: block; margin-top: 2px; font-size: 23px; line-height: 1.2; }
.scheme-summary strong small { font-size: 11px; color: #94a3b8; }
.scheme-summary .scheme-summary-note { display: flex; flex-direction: column; justify-content: center; color: var(--muted); font-size: 10px; }
.scheme-summary-note b { color: var(--text); font-size: 15px; }
.scheme-result-table { overflow: hidden; background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.scheme-empty-state { min-height: 430px; display: flex; flex-direction: column; align-items: center; justify-content: center; background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); text-align: center; }
.scheme-empty-mark { width: 48px; height: 48px; display: grid; place-items: center; margin-bottom: 12px; border-radius: 15px; background: var(--brand-soft); color: var(--brand); font-size: 19px; }
.scheme-empty-state h3 { font-size: 15px; }
.scheme-empty-state p { max-width: 420px; margin-top: 5px; color: var(--muted); font-size: 11px; }
.filter-form-card { padding: 22px; }
.filter-controls { display: grid; grid-template-columns: 190px minmax(0, 1fr) auto; gap: 14px; align-items: end; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field > span { color: var(--muted); font-size: 10.5px; font-weight: 700; }
.field input, .field select, .field textarea, .outcome-select {
  padding: 0 10px; border-radius: 9px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
  outline: none; font-size: 12px;
}
.field input, .field select, .outcome-select { height: 36px; }
.field textarea { min-height: 104px; padding: 9px 10px; line-height: 1.55; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus, .outcome-select:focus { border-color: #93c5fd; box-shadow: 0 0 0 3px rgba(37, 99, 235, .08); }
.filter-rule { min-width: 0; padding: 8px 11px; border-radius: 9px; background: #f8fafc; border: 1px solid #eef2f7; }
.filter-rule-label { display: block; color: #9ca3af; font-size: 9px; font-weight: 800; letter-spacing: .7px; text-transform: uppercase; }
.filter-rule p { color: var(--text-soft); font-size: 10.5px; line-height: 1.45; margin-top: 2px; }
.filter-submit { display: flex; gap: 8px; }
.filter-table-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 24px 0 10px; }
.filter-table-head h3 { font-size: 14px; }
.filter-table-head p { font-size: 11px; margin-top: 3px; }
.check-all { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 11px; white-space: nowrap; }
.check-col { width: 34px; }
input[type="checkbox"] { accent-color: var(--brand); width: 14px; height: 14px; }
.filter-match-table { min-width: 860px; }
.filter-match-table td:nth-child(4) { min-width: 180px; white-space: nowrap; }
.filter-match-table tr.row-selected { background: #fbfdff; }
.filter-odds { white-space: nowrap; font-size: 10px; }
.filter-odds span + span { margin-left: 4px; }
.outcome-select { width: 135px; height: 32px; font-size: 11px; }
.result-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin: 24px 0 10px; }
.result-head-main h2 { font-size: 21px; letter-spacing: -.4px; }
.result-head-main p { margin-top: 2px; font-size: 11px; }
.result-head-side { display: flex; align-items: flex-end; gap: 16px; }
.result-ratio { text-align: right; }
.result-ratio strong { display: block; font-size: 26px; letter-spacing: -.8px; line-height: 1; color: var(--brand); }
.result-ratio span { color: var(--muted); font-size: 9.5px; }
.result-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.result-kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 9px; margin-bottom: 12px; }
.result-kpi { background: var(--surface); border: 1px solid var(--line); border-radius: 11px; padding: 9px 11px; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 1px 8px; }
.result-kpi span { color: var(--muted); font-size: 10px; }
.result-kpi strong { font-size: 18px; line-height: 1.1; }
.result-kpi small { grid-column: 1 / -1; color: #9ca3af; font-size: 8.5px; }
.result-card { padding: 0; overflow: hidden; }
.result-table-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: #fbfcfe; }
.result-table-head div { display: flex; align-items: baseline; gap: 9px; min-width: 0; }
.result-table-head strong { font-size: 12px; }
.result-table-head span { color: var(--muted); font-size: 10px; }
.result-table { width: 100%; min-width: 0; table-layout: fixed; }
.result-table th { padding: 8px 8px; font-size: 9px; white-space: nowrap; }
.result-table th small { color: #9ca3af; font-size: 7.5px; font-weight: 500; }
.result-table td { padding: 8px 8px; vertical-align: top; font-size: 11px; word-break: break-word; }
.result-table tbody tr:hover { background: #fbfdff; }
.result-table .scheme-author { font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.result-table .row-sub { font-size: 9px; margin-top: 1px; }
.rate-stack { display: flex; flex-direction: column; gap: 1px; }
.rate-stack span { display: flex; align-items: baseline; justify-content: space-between; gap: 3px; line-height: 1.25; }
.rate-stack b { font-size: 10px; font-weight: 700; }
.rate-stack small { color: #9ca3af; font-size: 7.5px; }
.result-legs { display: flex; flex-direction: column; gap: 3px; }
.result-leg { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; line-height: 1.35; }
.result-leg b { font-size: 10px; color: var(--text-soft); white-space: nowrap; }
.result-leg .pick-pill { padding: 1px 5px; font-size: 9.5px; }
.result-leg .pick-pill small { font-size: 8px; }
.result-table .type-pill { font-size: 9px; }
.empty-state { text-align: center; padding: 54px 24px; }
.empty-state.compact { padding: 28px 20px; }
.empty-state.compact .empty-icon { width: 38px; height: 38px; margin-bottom: 8px; font-size: 16px; border-radius: 12px; }
.empty-state.compact h3 { font-size: 14px; }
.empty-state.compact p { margin-bottom: 0; font-size: 11px; }
.empty-icon { width: 50px; height: 50px; margin: 0 auto 12px; display: grid; place-items: center; border-radius: 16px; background: #f1f5f9; color: #94a3b8; font-size: 21px; font-weight: 800; }
.empty-state h3 { margin-bottom: 5px; }
.empty-state p { color: var(--muted); font-size: 12px; margin-bottom: 16px; }
.note-card { display: flex; gap: 11px; margin-top: 16px; background: #fbfcff; border-color: #dbeafe; }
.note-card p { color: var(--muted); font-size: 11px; line-height: 1.6; margin-top: 4px; }

/* --------------------------------------------------------------------- tasks */
.compact-sync-panel { margin-bottom: 14px; padding: 12px 16px; background: #fff; border-color: var(--line); }
.sync-inline-form { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.sync-inline-form label { display: flex; flex-direction: column; gap: 4px; color: var(--muted); font-size: 10px; font-weight: 600; }
.sync-inline-form input { width: 132px; height: 32px; padding: 0 9px; border: 1px solid var(--line); border-radius: 7px; background: #fff; font-size: 11px; }
.sync-inline-form input[type="number"] { width: 92px; }
.sync-run-line { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 9px; padding-top: 8px; border-top: 1px solid #eef2f8; color: #475569; font-size: 10.5px; }
.compact-task-hero { margin-bottom: 18px; padding: 14px 16px; background: #fff; border-color: var(--line); }
.compact-task-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.compact-task-top h2 { font-size: 18px; letter-spacing: -.4px; }
.compact-task-top p { margin-top: 4px; font-size: 11px; }
.progress-line.large { margin-top: 14px; }
.compact-task-meta { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 12px; margin-top: 12px; padding-top: 10px; border-top: 1px solid #e8eef8; }
.compact-task-meta div { display: flex; flex-direction: column; gap: 3px; }
.compact-task-meta span { color: var(--muted); font-size: 10px; }
.compact-task-meta strong { font-size: 11.5px; }
.compact-task-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 12px; padding-top: 10px; border-top: 1px solid #e8eef8; }
.small-note { font-size: 10.5px; }
.task-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 18px; margin-bottom: 18px; }
.task-list { display: flex; flex-direction: column; }
.task-list-item { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid #f1f4f8; }
.task-list-item:last-child { border-bottom: none; }
.task-list-item > div { flex: 1; min-width: 0; }
.task-list-item strong { font-size: 11.5px; }
.task-list-dot { width: 7px; height: 7px; border-radius: 50%; background: #cbd5e1; flex: 0 0 auto; }
.task-list-dot.running { background: #22c55e; box-shadow: 0 0 0 3px #dcfce7; }
.task-list-dot.paused { background: #f59e0b; box-shadow: 0 0 0 3px #fef3c7; }
.task-list-dot.completed { background: #3b82f6; box-shadow: 0 0 0 3px #dbeafe; }
.muted-item { opacity: .72; }
.log-table td { font-size: 11.5px; }
.log-level { display: inline-block; padding: 2px 6px; border-radius: 5px; font-size: 9px; font-weight: 800; letter-spacing: .4px; }
.log-info { background: #eff6ff; color: #1d4ed8; }
.log-warn { background: #fffbeb; color: #b45309; }
.log-error { background: #fef2f2; color: #b91c1c; }

/* -------------------------------------------------------------------- proxy */
.compact-panel { margin-bottom: 18px; padding: 14px 16px; }
.compact-panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.compact-panel-title h2 { font-size: 14px; }
.compact-panel-title span { color: var(--muted); font-size: 10.5px; }
.compact-panel-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.compact-proxy { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 11px; }
.compact-proxy strong { font-size: 12px; }
.proxy-list { display: flex; flex-direction: column; }
.proxy-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid #f1f4f8; }
.proxy-row:last-child { border-bottom: none; }
.proxy-row.is-active { background: #f8fbff; margin: 0 -8px; padding-left: 8px; padding-right: 8px; border-radius: 9px; }
.proxy-main { flex: 1; min-width: 0; }
.proxy-title { font-size: 11.5px; font-weight: 700; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.proxy-sub { color: var(--muted); margin-top: 3px; font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.proxy-meta { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 10px; white-space: nowrap; }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: #cbd5e1; }
.status-dot.ok { background: #22c55e; }
.status-dot.warn { background: #f59e0b; }
.status-dot.bad { background: #ef4444; }
.proxy-actions { display: flex; gap: 5px; flex-wrap: wrap; }
.add-proxy-panel { margin-bottom: 18px; }
.proxy-add-tabs { display: flex; gap: 4px; margin-bottom: 12px; }
.proxy-tab { padding: 6px 10px; border-radius: 8px; color: var(--muted); font-size: 11px; font-weight: 700; background: none; border: 1px solid transparent; cursor: pointer; }
.proxy-tab:hover { background: #f1f5f9; }
.proxy-tab.active { background: var(--brand-soft); color: var(--brand); border-color: #bfdbfe; }
.proxy-form { display: grid; grid-template-columns: 1.1fr .8fr 1.3fr .55fr .9fr .9fr auto; gap: 10px; align-items: end; }
.proxy-form .field input, .proxy-form .field select { height: 36px; }
.proxy-form .field-wide { grid-column: 2 / -1; }

/* --------------------------------------------------------------------- logs */
.log-filter-tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.tab { padding: 6px 10px; border-radius: 8px; color: var(--muted); font-size: 11px; font-weight: 700; }
.tab:hover { background: #f1f5f9; }
.tab.active { background: var(--brand-soft); color: var(--brand); }
.empty-cell { text-align: center; color: #9ca3af; padding: 30px !important; }

/* ------------------------------------------------------------------ settings */
.settings-tabs { display: flex; gap: 4px; margin-bottom: 18px; }
.setting-tab { padding: 6px 10px; border-radius: 8px; color: var(--muted); font-size: 11px; font-weight: 700; background: none; border: 1px solid transparent; cursor: pointer; }
.setting-tab:hover { background: #f1f5f9; }
.setting-tab.active { background: var(--brand-soft); color: var(--brand); border-color: #bfdbfe; }
.setting-panel { display: flex; flex-direction: column; gap: 16px; }
.setting-card { display: flex; gap: 13px; align-items: flex-start; padding: 14px 16px; }
.setting-icon { width: 32px; height: 32px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 9px; background: #eff6ff; color: #2563eb; font-size: 14px; }
.setting-body { min-width: 0; flex: 1; }
.setting-body h2 { font-size: 13px; margin-bottom: 8px; }
.setting-rows { display: flex; flex-direction: column; gap: 6px; }
.setting-rows div { display: flex; justify-content: space-between; gap: 10px; font-size: 11px; }
.setting-rows span { color: var(--muted); }
.setting-rows strong { text-align: right; font-weight: 600; }
.setting-note { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); color: #9ca3af; font-size: 10px; line-height: 1.55; }
.setting-note .text-link { display: block; margin-top: 4px; font-size: 10.5px; }
.placeholder-setting { background: #fbfcff; border-color: #e9e3ff; }
.placeholder-setting .setting-icon { background: #f3e8ff; color: #7e22ce; }
.placeholder-setting p { color: var(--muted); font-size: 11px; line-height: 1.55; margin-bottom: 8px; }
#upstream { scroll-margin-top: 76px; }
.upstream-config-form { display: grid; grid-template-columns: 1.2fr 1.2fr 1.2fr 90px; gap: 10px; align-items: end; margin-top: 10px; }
.upstream-config-form .field input { height: 34px; font-size: 11px; }
.upstream-config-form .field-narrow input { width: 90px; }
.upstream-config-form .check-line { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 10.5px; }
.upstream-config-form .form-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; }
.upstream-test-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 10.5px; }
.sync-history { margin-top: 9px; padding-top: 8px; border-top: 1px dashed var(--line); }

/* ------------------------------------------------------------------ accounts */
.account-grid { display: grid; grid-template-columns: minmax(0, .82fr) minmax(0, 1.45fr); gap: 16px; margin-bottom: 16px; }
.account-card { padding: 14px 16px; }
.account-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.account-card-head > .badge { flex: 0 0 auto; }
.account-card-head h2 { font-size: 14px; }
.account-card-head p { margin-top: 3px; color: var(--muted); font-size: 10.5px; line-height: 1.5; }
.upstream-account {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid #dbeafe;
  border-radius: 12px;
  background: #f8fbff;
}
.account-avatar {
  width: 40px; height: 40px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 17px;
  font-weight: 800;
}
.account-name { min-width: 0; flex: 1; }
.account-name strong { display: block; font-size: 17px; line-height: 1.2; white-space: nowrap; }
.account-name span { display: block; margin-top: 3px; color: var(--muted); font-size: 10.5px; }
.account-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
  padding-top: 13px;
  border-top: 1px solid #e8eef8;
}
.account-meta-grid div { display: flex; flex-direction: column; gap: 3px; }
.account-meta-grid span { color: #9ca3af; font-size: 9.5px; }
.account-meta-grid strong { font-size: 11px; font-weight: 600; }
.account-table { min-width: 660px; }
.account-table th { padding: 8px 9px; font-size: 9px; }
.account-table td { padding: 9px 9px; font-size: 10.5px; }
.account-table form { margin: 0; }
.account-self {
  margin-left: 5px;
  padding: 1px 5px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 8.5px;
  font-weight: 800;
}
.account-add-form {
  display: grid;
  grid-template-columns: 1.15fr 1.15fr .8fr auto;
  gap: 10px;
  align-items: end;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.account-add-form .field input, .account-add-form .field select { height: 34px; font-size: 11px; }
.account-add-form .btn { height: 34px; }

.account-login-panel { margin-top: 14px; padding-top: 13px; border-top: 1px solid #e8eef8; }
.account-login-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 9px; }
.account-login-head h3 { font-size: 12.5px; }
.account-login-rows { display: grid; grid-template-columns: 1.1fr 1.1fr; gap: 10px; }
.account-sms-form, .account-code-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: end; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: #fbfcfe; }
.account-sms-form .field input, .account-code-form .field input { height: 34px; font-size: 11px; }
.account-sms-form .btn, .account-code-form .btn { height: 34px; }
.demo-code { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 9px; padding: 8px 10px; border: 1px solid #fde68a; border-radius: 8px; background: #fffbeb; color: #92400e; font-size: 10.5px; }
.demo-code strong { font-size: 14px; letter-spacing: 2px; }
.demo-code span { color: #b45309; font-size: 9.5px; }
.account-events-card { margin-bottom: 16px; padding: 18px; }
.account-events-table { min-width: 720px; }
.account-events-table th { padding: 8px 9px; font-size: 9px; }
.account-events-table td { padding: 8px 9px; font-size: 10.5px; }

.account-grid.is-single { grid-template-columns: minmax(0, 1fr); }
.account-grid.is-single .account-card { max-width: 980px; }
.user-card { margin-bottom: 16px; }

/* ------------------------------------------------------------------------ ai */
.ai-layout { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 18px; align-items: start; }
.ai-panel { padding: 22px; }
.ai-panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.ai-panel-head h2 { font-size: 18px; }
.ai-panel-head .eyebrow { margin-bottom: 5px; }
.ai-model-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; margin-bottom: 16px; }
.ai-model-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfcfe;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
.ai-model-card:hover { border-color: #bfdbfe; background: #f8fbff; }
.ai-model-card.selected,
.ai-model-card:has(input:checked) {
  border-color: #93c5fd;
  background: #f8fbff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .08);
}
.ai-model-card input { position: absolute; opacity: 0; pointer-events: none; }
.ai-model-card strong { font-size: 11.5px; line-height: 1.35; padding-right: 24px; }
.ai-model-id { color: #9ca3af; font-size: 9px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ai-provider {
  align-self: flex-start;
  padding: 2px 6px;
  border-radius: 5px;
  background: #f1f5f9;
  color: #475569;
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: .2px;
}
.ai-provider-anthropic { background: #f3e8ff; color: #7e22ce; }
.ai-provider-openai { background: #ecfdf5; color: #047857; }
.ai-provider-deepseek { background: #eff6ff; color: #1d4ed8; }
.ai-provider-other { background: #f8fafc; color: #64748b; }
.ai-default {
  position: absolute; top: 9px; right: 8px;
  color: var(--brand); font-size: 8px; font-weight: 800;
}
.ai-form-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 12px; align-items: end; margin-bottom: 12px; }
.ai-scope-note { padding-bottom: 7px; color: var(--muted); font-size: 10.5px; line-height: 1.5; }
.ai-prompt-field textarea { min-height: 112px; }
.ai-actions { display: flex; align-items: center; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.ai-demo-note { color: #9ca3af; font-size: 10px; }
.ai-empty { padding: 18px; border: 1px dashed var(--line-strong); border-radius: 11px; color: var(--muted); font-size: 11.5px; line-height: 1.6; margin-bottom: 14px; }
.ai-result-panel { min-height: 480px; background: linear-gradient(160deg, #fff 0%, #fbfdff 100%); }
.ai-result-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.ai-result-kicker { color: var(--brand); font-size: 10px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; margin-bottom: 4px; }
.ai-result-head h2 { font-size: 20px; }
.ai-result-meta { display: flex; justify-content: space-between; gap: 10px; margin-top: 10px; padding-bottom: 12px; border-bottom: 1px solid var(--line); color: #9ca3af; font-size: 10px; }
.ai-overview { margin-top: 14px; color: var(--text-soft); font-size: 12px; line-height: 1.65; }
.ai-observation-list { display: flex; flex-direction: column; margin-top: 14px; }
.ai-observation { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid #f1f4f8; }
.ai-observation:last-child { border-bottom: none; }
.ai-observation-main { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ai-observation-main strong { font-size: 11.5px; }
.ai-observation-main span { color: var(--muted); font-size: 10.5px; }
.ai-observation-side { flex: 0 0 auto; text-align: right; }
.ai-observation-side b { display: block; color: var(--brand); font-size: 14px; }
.ai-observation-side small { color: #9ca3af; font-size: 8.5px; }
.ai-gap-note, .ai-risk-note { margin-top: 12px; padding: 10px 11px; border-radius: 9px; font-size: 10.5px; line-height: 1.55; }
.ai-gap-note { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; }
.ai-risk-note { background: #f8fafc; border: 1px solid var(--line); color: var(--muted); }
.ai-result-foot { margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--line); color: #9ca3af; font-size: 9.5px; line-height: 1.6; }
.ai-result-empty { min-height: 420px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 30px; }
.ai-result-icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 15px; background: #f3e8ff; color: #7e22ce; font-size: 20px; margin-bottom: 12px; }
.ai-result-empty h3 { font-size: 15px; }
.ai-result-empty p { max-width: 320px; margin-top: 6px; color: var(--muted); font-size: 11px; line-height: 1.65; }
.inline-form { display: inline; margin: 0; }
.ai-row-actions { display: flex; gap: 5px; flex-wrap: wrap; }
.ai-config-card { margin-bottom: 18px; }
.ai-model-table { min-width: 720px; }
.ai-model-table td { padding: 9px 10px; font-size: 11px; }
.ai-model-table th { padding: 8px 10px; font-size: 9px; }
.ai-model-table .badge { margin-left: 4px; }
.ai-model-form { display: grid; grid-template-columns: 160px 1.15fr 1.15fr auto; gap: 10px; align-items: end; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.ai-model-form .field input, .ai-model-form .field select { height: 36px; font-size: 11px; }
.ai-model-form .btn { height: 36px; }
.ai-endpoint { display: flex; flex-direction: column; gap: 3px; max-width: 260px; }
.ai-endpoint .mono { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 9px; }
.ai-last-error { color: #b91c1c; font-size: 9px; cursor: help; }
.ai-credential-panel { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.ai-credential-panel h3 { font-size: 13px; }
.ai-credential-actions { gap: 7px; }

/* --------------------------------------------------------------- ai chat ui */
.ai-page { max-width: 980px; height: calc(100vh - 152px); min-height: 540px; margin: 0 auto; display: flex; flex-direction: column; }
.ai-stream { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 16px; padding: 8px 4px 18px 0; scrollbar-gutter: stable; }
.ai-welcome { min-height: 48vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 30px 16px; }
.ai-welcome-mark { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 17px; background: linear-gradient(135deg, #eff6ff, #f3e8ff); color: #7c3aed; font-size: 23px; margin-bottom: 14px; }
.ai-welcome h1 { font-size: 28px; letter-spacing: -.8px; }
.ai-welcome p { max-width: 520px; margin-top: 7px; color: var(--muted); font-size: 11.5px; line-height: 1.65; }
.ai-suggestions { display: flex; gap: 7px; flex-wrap: wrap; justify-content: center; margin-top: 18px; }
.ai-suggestion { padding: 7px 11px; border: 1px solid var(--line); border-radius: 999px; background: #fbfcfe; color: var(--text-soft); font-size: 10.5px; }
.ai-suggestion:hover { border-color: #bfdbfe; background: #f8fbff; color: var(--brand); }
.ai-message { display: flex; align-items: flex-start; gap: 10px; }
.ai-message-user { flex-direction: row-reverse; }
.ai-avatar { width: 30px; height: 30px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 10px; font-size: 11px; font-weight: 800; }
.ai-avatar-user { background: #f1f5f9; color: #64748b; }
.ai-avatar-brand { background: #f3e8ff; color: #7e22ce; }
.ai-bubble { min-width: 0; max-width: 82%; padding: 11px 14px; border-radius: 13px; background: var(--surface); border: 1px solid var(--line); }
.ai-message-user .ai-bubble { background: #eff6ff; border-color: #dbeafe; }
.ai-bubble-assistant { flex: 1; max-width: none; padding: 15px 17px; }
.ai-bubble-meta { color: #9ca3af; font-size: 9.5px; margin-bottom: 4px; }
.ai-message-user .ai-bubble p { color: var(--text-soft); font-size: 12px; line-height: 1.6; }
.ai-bubble-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.ai-bubble-head h2 { font-size: 18px; letter-spacing: -.3px; }
.ai-bubble-head .badge { flex: 0 0 auto; }
.ai-answer { margin-top: 12px; color: var(--text-soft); font-size: 12.5px; line-height: 1.8; white-space: pre-wrap; word-break: break-word; }
.ai-empty-banner { max-width: 620px; margin-top: 16px; padding: 10px 12px; border: 1px dashed var(--line-strong); border-radius: 10px; color: var(--muted); font-size: 10.5px; line-height: 1.65; }
.ai-bubble-assistant .ai-overview { margin-top: 10px; font-size: 12px; }
.ai-bubble-assistant .ai-observation-list { margin-top: 9px; }
.ai-bubble-assistant .ai-observation { padding: 8px 0; }
.ai-bubble-assistant .ai-gap-note,
.ai-bubble-assistant .ai-risk-note { margin-top: 9px; }
.ai-composer { position: static; flex: 0 0 auto; z-index: 20; margin-top: 8px; padding: 9px 12px 8px; border: 1px solid var(--line-strong); border-radius: 16px; background: rgba(255, 255, 255, .97); box-shadow: 0 14px 36px rgba(15, 23, 42, .10); backdrop-filter: blur(10px); }
.ai-composer-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ai-scope { display: flex; align-items: center; gap: 6px; min-width: 0; color: #9ca3af; font-size: 9.5px; }
.ai-scope select { height: 28px; max-width: 360px; padding: 0 7px; border: 1px solid var(--line); border-radius: 7px; background: #f8fafc; color: var(--text-soft); font-size: 10.5px; outline: none; }
.ai-composer-note { color: #9ca3af; font-size: 9px; white-space: nowrap; }
.ai-composer textarea { display: block; width: 100%; min-height: 54px; max-height: 150px; padding: 5px 2px 3px; border: none; outline: none; resize: vertical; background: transparent; color: var(--text); font-size: 13px; line-height: 1.6; }
.ai-composer textarea::placeholder { color: #a3abb8; }
.ai-composer-bottom { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; padding-top: 7px; border-top: 1px solid #f1f4f8; }
.ai-model-picker { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; min-width: 0; }
.ai-model-picker-label { color: #9ca3af; font-size: 9px; font-weight: 800; letter-spacing: .5px; margin-right: 2px; }
.ai-model-chip { position: relative; display: inline-flex; align-items: center; gap: 4px; padding: 4px 7px; border: 1px solid var(--line); border-radius: 999px; background: #fbfcfe; color: var(--text-soft); font-size: 9.5px; cursor: pointer; white-space: nowrap; transition: border-color .15s ease, background .15s ease; }
.ai-model-chip:hover { border-color: #bfdbfe; }
.ai-model-chip.selected, .ai-model-chip:has(input:checked) { border-color: #93c5fd; background: #eff6ff; box-shadow: 0 0 0 2px rgba(37, 99, 235, .06); }
.ai-model-chip input { position: absolute; opacity: 0; pointer-events: none; }
.ai-chip-name { font-weight: 700; }
.ai-model-chip em { font-style: normal; color: var(--brand); font-size: 8px; font-weight: 800; }
.ai-send { height: 34px; min-width: 70px; flex: 0 0 auto; }
.ai-empty-inline { color: var(--muted); font-size: 10px; }
.ai-composer .btn:disabled { opacity: .5; cursor: not-allowed; }

/* --------------------------------------------------------------------- login */
.login-body {
  min-height: 100vh;
  margin: 0;
  background: #07101f;
  color: #fff;
  overflow-x: hidden;
}
.login-bg-orb { position: fixed; border-radius: 50%; filter: blur(10px); pointer-events: none; }
.orb-a { width: 520px; height: 520px; left: -160px; top: -180px; background: radial-gradient(circle, rgba(37, 99, 235, .55), transparent 66%); }
.orb-b { width: 600px; height: 600px; right: -220px; bottom: -260px; background: radial-gradient(circle, rgba(124, 58, 237, .35), transparent 66%); }
.login-shell { position: relative; z-index: 1; min-height: 100vh; display: grid; grid-template-columns: 1.05fr .95fr; align-items: center; gap: 50px; max-width: 1180px; margin: 0 auto; padding: 50px 32px; }
.login-copy { padding: 10px 0; }
.brand-light { padding: 0; margin-bottom: 48px; }
.brand-light .brand-text strong { font-size: 18px; }
.brand-light .brand-text span { color: #8fa1bd; }
.login-copy h1 { font-size: 45px; line-height: 1.18; letter-spacing: -1.6px; font-weight: 800; }
.login-copy h1 em { font-style: normal; color: #7dd3fc; }
.login-copy > p { margin-top: 17px; color: #94a3b8; font-size: 13.5px; }
.login-points { margin-top: 32px; display: flex; flex-direction: column; gap: 12px; }
.login-points div { display: flex; align-items: center; gap: 10px; color: #cbd5e1; font-size: 12px; }
.login-points span { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 7px; background: rgba(59, 130, 246, .16); color: #93c5fd; font-size: 9px; font-weight: 800; }
.login-note { margin-top: 28px; color: #64748b; font-size: 10.5px; }
.login-card { background: rgba(255, 255, 255, .98); color: var(--text); border-radius: 22px; padding: 34px; box-shadow: 0 30px 90px rgba(0, 0, 0, .35); }
.login-card-head .eyebrow { margin-bottom: 8px; }
.login-card-head h2 { font-size: 27px; letter-spacing: -.7px; }
.login-card-head p { color: var(--muted); font-size: 11.5px; margin-top: 5px; margin-bottom: 24px; }
.login-form { display: flex; flex-direction: column; gap: 14px; }
.login-form label { display: flex; flex-direction: column; gap: 6px; }
.login-form label span { color: var(--text-soft); font-size: 11px; font-weight: 700; }
.login-form input { height: 43px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: #fbfcfe; outline: none; }
.login-form input:focus { border-color: #93c5fd; box-shadow: 0 0 0 3px rgba(37, 99, 235, .1); }
.login-form .btn { height: 44px; margin-top: 4px; }
.demo-credential { margin-top: 18px; padding: 10px 12px; border-radius: 9px; background: #f8fafc; border: 1px dashed var(--line); color: var(--muted); font-size: 10.5px; line-height: 1.6; }
.demo-credential strong { color: var(--text-soft); }
.demo-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #22c55e; margin-right: 5px; }
.login-foot { margin-top: 17px; color: #a3abb8; font-size: 9.5px; text-align: center; }

/* ----------------------------------------------------------------- responsive */
@media (max-width: 1500px) {
  .dashboard-grid { grid-template-columns: 1fr; }
  .side-stack { display: grid; grid-template-columns: 1fr 1fr; }
  .tip-card { grid-column: 1 / -1; }
}
@media (max-width: 1400px) {
  .account-grid { grid-template-columns: 1fr; }
}
@media (max-width: 1280px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .detail-grid { grid-template-columns: 1fr; }
  .match-overview-grid { grid-template-columns: 1fr; }
  .match-overview-ratios { grid-template-columns: 1fr 1fr; }
  .intel-grid { grid-template-columns: 1fr; }
  .settings-grid { grid-template-columns: repeat(2, 1fr); }
  .proxy-form { grid-template-columns: 1fr 1fr 1fr; }
  .proxy-form .filter-submit { grid-column: 1 / -1; }
  .result-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1000px) {
  .sidebar { transform: translateX(-100%); transition: transform .22s ease; }
  .sidebar.open { transform: translateX(0); }
  .main { margin-left: 0; }
  .menu-btn { display: inline-grid; place-items: center; }
  .sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(15, 23, 42, .45); z-index: 55; }
  .sidebar-overlay.show { display: block; }
  .task-hero { grid-template-columns: 1fr; }
  .task-hero-side { border-left: none; border-top: 1px solid #e2e8f0; padding-left: 0; padding-top: 16px; flex-direction: row; justify-content: space-between; }
  .task-mini-stat { flex: 1; }
  .board-bar { flex-direction: column; align-items: flex-start; }
  .board-left { width: 100%; }
  .board-controls { width: 100%; justify-content: flex-start; }
  .status-tabs { width: 100%; overflow-x: auto; }
  .account-grid { grid-template-columns: 1fr; }
  .account-add-form { grid-template-columns: 1fr 1fr; }
  .account-add-form .btn { grid-column: 1 / -1; justify-self: start; }
  .account-login-rows { grid-template-columns: 1fr; }
  .filter-controls { grid-template-columns: 1fr 1fr; }
  .scheme-layout { grid-template-columns: 1fr; }
  .scheme-filter-pane { position: static; min-height: 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .selected-match-list { max-height: 260px; }
  .filter-submit { grid-column: 1 / -1; }
  .proxy-grid, .task-grid { grid-template-columns: 1fr; }
  .upstream-config-form { grid-template-columns: 1fr 1fr; }
  .sync-inline-form label { flex: 1 1 120px; }
  .sync-inline-form input { width: 100%; }
  .ai-layout { grid-template-columns: 1fr; }
  .ai-model-form { grid-template-columns: 1fr 1fr; }
  .login-shell { grid-template-columns: 1fr; max-width: 560px; gap: 28px; }
  .login-copy h1 { font-size: 34px; }
  .brand-light { margin-bottom: 26px; }
  .login-points { display: none; }
}
@media (max-width: 720px) {
  .content { padding: 20px 16px 40px; }
  .topbar { padding: 0 16px; }
  .topbar-title { font-size: 13px; }
  .demo-pill, .date-pill { display: none; }
  .topbar-date-form label { display: none; }
  .topbar-date-form input[type="date"] { width: 112px; }
  .scheme-summary { grid-template-columns: 1fr 1fr; }
  .scheme-summary > div { border-bottom: 1px solid #eef2f7; }
  .scheme-summary .scheme-summary-note { grid-column: 1 / -1; }
  h1 { font-size: 28px; }
  .schedule-board { border-radius: 11px; }
  .board-bar { padding: 7px 10px; gap: 8px; }
  .board-left { gap: 7px; }
  .board-meta { flex-wrap: wrap; white-space: normal; font-size: 9.5px; gap: 5px; }
  .board-controls { gap: 5px; }
  .date-filter input[type="date"] { height: 26px; font-size: 10px; }
  .status-tab { padding: 3px 6px; font-size: 10px; }
  .board-head, .match-list { min-width: 900px; }
  .date-strip { padding: 6px 10px; }
  .account-add-form { grid-template-columns: 1fr; }
  .account-add-form .btn { width: 100%; }
  .account-sms-form, .account-code-form { grid-template-columns: 1fr; }
  .account-sms-form .btn, .account-code-form .btn { width: 100%; }
  .kpi-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kpi-card { padding: 14px; }
  .kpi-value { font-size: 23px; }
  .kpi-icon { width: 27px; height: 27px; font-size: 12px; right: 10px; top: 10px; }
  .side-stack { grid-template-columns: 1fr; }
  .task-hero-side { flex-wrap: wrap; }
  .match-title { font-size: 23px; }
  .match-hero { padding: 19px 17px; }
  .match-hero-top { flex-direction: column; }
  .match-overview-ratios { grid-template-columns: 1fr; }
  .match-metrics { grid-template-columns: repeat(3, 1fr); gap: 12px 0; }
  .match-metrics .metric { border-left: none; padding: 0; }
  .scheme-outcome-board { align-items: flex-start; }
  .outcome-source { margin-left: 0; width: 100%; }
  .content.content-match_detail { padding: 0 12px 28px; }
  .author-collapse > summary { flex-wrap: wrap; padding: 14px 16px; }
  .author-summary-top { width: 100%; }
  .author-grid { grid-template-columns: 1fr; padding: 0 16px 16px; }
  .ratio-grid { grid-template-columns: 1fr; }
  .intel-news-grid, .intel-form-grid { grid-template-columns: 1fr; }
  .result-kpis { grid-template-columns: 1fr 1fr; }
  .result-head { align-items: flex-start; flex-direction: column; }
  .result-head-side { width: 100%; justify-content: space-between; }
  .result-ratio strong { font-size: 25px; }
  .result-table-head { align-items: flex-start; }
  .result-table-head div { flex-direction: column; gap: 2px; }
  .task-detail-top { flex-direction: column; }
  .task-detail-meta { grid-template-columns: 1fr; }
  .compact-panel-head { flex-direction: column; align-items: flex-start; }
  .compact-panel-actions { width: 100%; }
  .compact-proxy { flex-direction: column; align-items: flex-start; }
  .proxy-stats { grid-template-columns: 1fr 1fr; }
  .proxy-form { grid-template-columns: 1fr; }
  .proxy-form .field-wide { grid-column: 1 / -1; }
  .upstream-config-form { grid-template-columns: 1fr; }
  .upstream-config-form .form-actions { grid-column: auto; justify-content: flex-start; }
  .sync-inline-form { flex-direction: column; align-items: stretch; }
  .sync-inline-form label { width: 100%; }
  .sync-inline-form .btn { width: 100%; }
  .settings-grid { grid-template-columns: 1fr; }
  .login-shell { padding: 28px 18px; }
  .login-card { padding: 25px; }
  .login-copy h1 { font-size: 29px; }
  .log-filter { flex-direction: column; align-items: flex-start; }
  .filter-controls { grid-template-columns: 1fr; }
  .filter-table-head { flex-direction: column; align-items: flex-start; }
  .data-table th, .data-table td { padding: 10px 9px; }
  .ai-layout { grid-template-columns: 1fr; }
  .ai-model-grid { grid-template-columns: 1fr; }
  .ai-form-grid { grid-template-columns: 1fr; }
  .ai-model-form { grid-template-columns: 1fr; }
  .ai-model-form .btn { justify-self: start; }
  .ai-result-panel { min-height: 360px; }
  .ai-result-empty { min-height: 300px; }
  .ai-result-meta { flex-direction: column; gap: 3px; }
  .ai-page { height: auto; min-height: calc(100vh - 110px); }
  .ai-stream { overflow: visible; }
  .ai-welcome { min-height: 38vh; }
  .ai-welcome h1 { font-size: 23px; }
  .ai-bubble { max-width: 100%; }
  .ai-message-user .ai-bubble { max-width: 92%; }
  .ai-composer { position: static; }
  .ai-composer-top { align-items: flex-start; flex-direction: column; gap: 3px; }
  .ai-composer-note { white-space: normal; }
  .ai-scope { width: 100%; }
  .ai-scope select { max-width: none; flex: 1; }
  .ai-composer-bottom { flex-direction: column; align-items: stretch; }
  .ai-send { align-self: flex-end; }
}

/* ------------------------------------------------------------------ v2 ops workspace */
.content { max-width: none; padding: 0; }
.content.content-match_detail { padding: 12px 24px 42px; background: #f4f6fa; }
.content > .card { margin-bottom: 0; }
.content > .card, .content > .ops-page > .ops-card, .content > .ops-page > section { border-radius: 0; box-shadow: none; }
.content > .card { border-left: 0; border-right: 0; }
.ops-page { min-height: calc(100vh - 68px); background: #f3f5f9; }
.task-page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; padding: 28px 32px 22px; background: #fff; border-bottom: 1px solid var(--line); }
.task-page-head h1 { font-size: 25px; letter-spacing: -.7px; }
.task-page-head p { margin-top: 6px; color: var(--muted); font-size: 11px; }
.task-page-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.task-overview-strip { display: grid; grid-template-columns: repeat(4, minmax(110px, .7fr)) minmax(250px, 1.6fr); background: #fff; border-bottom: 1px solid var(--line); }
.task-overview-strip > div { min-height: 72px; padding: 14px 22px; border-right: 1px solid #eef2f7; }
.task-overview-strip span { display: block; color: var(--muted); font-size: 9.5px; }
.task-overview-strip strong { display: block; margin-top: 3px; font-size: 19px; }
.task-overview-note { display: flex; align-items: center; color: var(--muted); font-size: 10px; }
.task-overview-note b { margin-left: 4px; color: var(--text-soft); font-weight: 600; }
.collection-overview-strip { display: grid; grid-template-columns: repeat(4, minmax(110px, .7fr)) minmax(250px, 1.6fr); background: #fff; border-bottom: 1px solid var(--line); }
.collection-overview-strip > div { min-height: 62px; padding: 12px 22px; border-right: 1px solid #eef2f7; }
.collection-overview-strip span { display: block; color: var(--muted); font-size: 9.5px; }
.collection-overview-strip strong { display: block; margin-top: 2px; font-size: 18px; }
.collection-overview-progress { display: flex; flex-direction: column; justify-content: center; gap: 6px; }
.collection-overview-progress .collection-meter-track { width: 100%; flex: none; }
.collection-overview-progress small { color: var(--muted); font-size: 9.5px; }
.task-management-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, .75fr); gap: 1px; background: var(--line); }
.ops-card { padding: 22px 26px; background: #fff; }
.ops-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.ops-card-head h2 { font-size: 17px; }
.ops-card-head p { margin-top: 4px; color: var(--muted); font-size: 10.5px; }
.task-publish-form { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px 11px; }
.field-span-2 { grid-column: span 2; }
.task-publish-form .field small { margin-top: 3px; color: #a3abb8; font-size: 8.5px; line-height: 1.35; }
.weekday-picker { display: flex; gap: 4px; }
.weekday-picker input { position: absolute; opacity: 0; }
.weekday-picker span { display: grid; place-items: center; width: 31px; height: 31px; border: 1px solid var(--line); border-radius: 7px; color: var(--muted); font-size: 9px; cursor: pointer; }
.weekday-picker input:checked + span { color: var(--brand); background: var(--brand-soft); border-color: #bfdbfe; font-weight: 800; }
.task-publish-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 3px; }
.task-publish-foot > span { color: #94a3b8; font-size: 9px; }
.task-now-form { display: grid; grid-template-columns: 1.2fr .8fr .8fr; gap: 9px; align-items: end; }
.task-now-form .btn { grid-column: 1 / -1; }
.sync-status-box { display: flex; flex-direction: column; gap: 5px; margin-top: 16px; padding: 14px; border: 1px solid #dbeafe; border-radius: 10px; background: #f8fbff; }
.sync-status-box strong { font-size: 13px; }
.sync-status-box > span:last-child { color: var(--muted); font-size: 10px; line-height: 1.5; }
.task-result-form { margin-top: 10px; }
.task-list-card { padding-top: 25px; }
.task-list-head { margin-bottom: 4px; }
.task-management-table { min-width: 960px; }
.task-management-table td { padding: 13px 11px; }
.task-row-actions { display: flex; gap: 5px; }
.proxy-check-banner { display: flex; align-items: center; justify-content: space-between; gap: 22px; padding: 17px 26px; background: #f8fbff; border-bottom: 1px solid #dbeafe; }
.proxy-check-banner strong { display: block; font-size: 14px; }
.proxy-check-banner p { margin-top: 3px; color: var(--muted); font-size: 10px; }
.proxy-check-form { display: flex; align-items: flex-end; gap: 10px; }
.proxy-check-form .field input { width: 115px; height: 32px; }
.proxy-check-form .check-line { padding-bottom: 8px; }
.log-search-form { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.log-search-form input, .log-search-form select { height: 32px; padding: 0 9px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--text-soft); outline: none; font-size: 11px; }
.log-search-form input { width: 170px; }
.log-result-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 24px; color: var(--muted); font-size: 10px; background: #fff; border-bottom: 1px solid var(--line); }
.log-result-meta > div { display: flex; gap: 6px; }
.account-pool-grid { display: grid; grid-template-columns: minmax(300px, .8fr) minmax(0, 1.4fr); gap: 1px; background: var(--line); }
.account-pool-list { display: flex; flex-direction: column; gap: 5px; }
.account-pool-row { display: flex; align-items: center; gap: 10px; padding: 11px; border: 1px solid transparent; border-radius: 10px; }
.account-pool-row:hover { background: #f8fbff; border-color: #dbeafe; }
.account-pool-row.is-selected { background: #eff6ff; border-color: #bfdbfe; }
.account-pool-main { min-width: 0; flex: 1; }
.account-pool-main strong { display: block; font-size: 12px; }
.account-pool-main span { display: block; margin-top: 2px; color: var(--muted); font-size: 9px; }
.account-pool-note { margin-top: 15px; padding-top: 12px; border-top: 1px solid var(--line); color: #94a3b8; font-size: 9.5px; line-height: 1.5; }
.account-login-card { min-width: 0; }
.account-pool-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: end; margin-top: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: #fbfcfe; }
.account-token-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 17px 0; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.account-token-summary span { display: block; color: var(--muted); font-size: 9px; }
.account-token-summary strong { display: block; margin-top: 3px; font-size: 10px; }
.accounts-page .account-events-card { margin-top: 1px; }
.setting-panel { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line); }
.setting-panel .setting-card { min-height: 200px; border-radius: 0; box-shadow: none; border: 0; }
.setting-panel .setting-card[id="upstream"] { grid-column: 1 / -1; }
.settings-tabs { display: flex; gap: 0; margin: 0; padding: 12px 26px; background: #fff; border-bottom: 1px solid var(--line); }
.settings-page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 24px 26px 18px; background: #fff; border-bottom: 1px solid var(--line); }
.settings-page-head h1 { font-size: 22px; }
.settings-page-head p { margin-top: 4px; color: var(--muted); font-size: 10.5px; }
.log-load-more-wrap { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 18px; background: #fff; border-bottom: 1px solid var(--line); }
.setting-tab { border-radius: 7px; }
.setting-panel + .note-card { margin-top: 1px; border-radius: 0; box-shadow: none; border-left: 0; border-right: 0; }
@media (max-width: 1000px) { .task-management-grid, .account-pool-grid, .setting-panel { grid-template-columns: 1fr; } .setting-panel .setting-card[id="upstream"] { grid-column: auto; } .task-publish-form { grid-template-columns: repeat(2, minmax(0, 1fr)); } .task-overview-strip { grid-template-columns: repeat(2, 1fr); } .task-overview-note { grid-column: 1 / -1; } }
@media (max-width: 720px) { .content.content-match_detail { padding: 0 12px 28px; } .collection-overview-strip { grid-template-columns: repeat(2, 1fr); } .collection-overview-progress { grid-column: 1 / -1; } .task-page-head { padding: 22px 16px 17px; flex-direction: column; } .ops-card { padding: 18px 16px; } .task-publish-form { grid-template-columns: 1fr; } .field-span-2 { grid-column: auto; } .task-publish-foot { align-items: flex-start; flex-direction: column; } .proxy-check-banner { align-items: flex-start; flex-direction: column; padding: 17px 16px; } .proxy-check-form { width: 100%; } .task-overview-strip > div { padding: 12px; } .collection-overview-strip > div { padding: 12px; } .account-token-summary { grid-template-columns: 1fr; gap: 8px; } .log-search-form input { width: 100%; } .log-search-form { width: 100%; } .log-search-form select { flex: 1; } }

/* ------------------------------------------------------------------ custom matrix */
.custom-board { padding: 0; overflow: hidden; }
.custom-board-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 9px 18px 8px; background: #fff; }
.custom-board-head h2 { margin-top: 0; font-size: 18px; line-height: 1.15; letter-spacing: -.02em; }
.custom-board-head .eyebrow { margin-bottom: 2px; color: var(--brand); font-size: 7.5px; font-weight: 900; letter-spacing: .14em; }
.custom-stats { display: grid; grid-template-columns: repeat(5, minmax(60px, 1fr)); gap: 1px; min-width: 360px; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: var(--line); }
.custom-stats > div { min-height: 40px; padding: 4px 8px; background: #fbfcfe; }
.custom-stats span { display: block; color: var(--muted); font-size: 8px; white-space: nowrap; }
.custom-stats strong { display: block; margin-top: 1px; font-size: 15.5px; line-height: 1.15; font-variant-numeric: tabular-nums; }
.custom-stats small { margin-left: 2px; color: #94a3b8; font-size: 7px; }
.custom-stats .text-good { color: var(--green); }
.custom-stats .text-bad { color: var(--red); }
.custom-date-strip { border-top: 1px solid var(--line); padding: 2px 10px 1px; gap: 3px; }
.custom-date-strip .date-chip { padding: 1px 5px; border-radius: 6px; }
.custom-date-strip .date-week { font-size: 7.5px; }
.custom-date-strip .date-chip strong { font-size: 9.5px; }
.custom-date-strip .date-chip small { font-size: 7px; }
.custom-board .empty-hint { margin: 12px 18px 16px; border: 1px dashed var(--line-strong); border-radius: 8px; background: #fbfcfe; }
.mx-scroll { max-height: calc(100vh - 235px); min-height: 180px; margin-top: 8px; overflow: auto; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #fff; scrollbar-width: thin; scrollbar-color: #cbd5e1 #f8fafc; }
.mx-scroll::-webkit-scrollbar { width: 8px; height: 8px; }
.mx-scroll::-webkit-scrollbar-thumb { border: 2px solid #fff; border-radius: 999px; background: #cbd5e1; }
.mx-scroll::-webkit-scrollbar-track { background: #f8fafc; }
.mx-table { width: max-content; min-width: 100%; border-collapse: separate; border-spacing: 0; font-size: 10.5px; }
.mx-table th, .mx-table td { padding: 5px; border-right: 1px solid #eef2f7; border-bottom: 1px solid #eef2f7; text-align: center; white-space: nowrap; }
.mx-table thead th { position: sticky; z-index: 4; background: #f8fafc; color: #475569; font-weight: 800; }
.mx-groups th { top: 0; height: 32px; font-size: 9.5px; letter-spacing: .03em; }
.mx-cols th { top: 32px; height: 30px; font-size: 9.5px; font-weight: 700; }
.mx-table thead th.mx-group-had { background: #eff6ff; color: #1d4ed8; }
.mx-table thead th.mx-group-hhad { background: #eef2ff; color: #4338ca; }
.mx-table thead th.mx-group-hafu { background: #f5f3ff; color: #6d28d9; }
.mx-table thead th.mx-group-ttg { background: #ecfdf5; color: #047857; }
.mx-table thead th.mx-group-crs { background: #fff7ed; color: #c2410c; }
.mx-table thead th.mx-group-other { background: #f1f5f9; color: #475569; }
.mx-table thead th.mx-match-head, .mx-table thead th.mx-free-head, .mx-table thead th.mx-hit-head { background: #f8fafc; color: #334155; }
.mx-table thead th.mx-match-head { left: 0; z-index: 9; min-width: 240px; text-align: left; padding-left: 10px; }
.mx-table thead th.mx-free-head { min-width: 76px; }
.mx-table thead th.mx-hit-head { min-width: 54px; }
.mx-table thead th.mx-sticky { box-shadow: 3px 0 0 rgba(226, 232, 240, .95); }
.mx-table tbody td { height: 50px; }
.mx-table tbody tr:hover td { background: #fbfdff; }
.mx-table tbody tr:hover td.mx-sticky { background: #f5f9ff; }
.mx-table td.mx-sticky { position: sticky; left: 0; z-index: 3; min-width: 240px; max-width: 290px; padding: 5px 9px 5px 10px; background: #fff; text-align: left; white-space: normal; box-shadow: 3px 0 0 rgba(226, 232, 240, .95); }
.mx-match-cell { vertical-align: top; }
.mx-match-top { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.mx-time { color: var(--brand); font-size: 10px; font-weight: 900; font-variant-numeric: tabular-nums; }
.mx-match-top .league-tag { padding: 1px 4px; font-size: 7.5px; }
.mx-match-top .status-pill { padding: 1px 4px; font-size: 7.5px; }
.mx-teams { display: flex; align-items: baseline; gap: 4px; flex-wrap: wrap; margin-top: 2px; }
.mx-teams strong { font-size: 11.5px; line-height: 1.25; }
.mx-teams .vs { color: #94a3b8; font-size: 7.5px; font-weight: 700; text-transform: uppercase; }
.mx-match-sub { margin-top: 2px; color: #94a3b8; font-size: 8px; white-space: nowrap; }
.mx-free-cell { min-width: 76px; color: #64748b; font-size: 9.5px; }
.mx-free-cell strong { color: var(--text-soft); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.mx-free-cell span { color: #94a3b8; font-size: 8.5px; }
.mx-table td.mx-cell { min-width: 42px; color: #cbd5e1; font-size: 10.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.mx-table td.mx-cell.hit { color: var(--red); background: #fff7f7; font-weight: 900; }
.mx-table td.mx-cell.hit:hover { background: #feecec; }
.mx-table tfoot td { position: sticky; bottom: 0; z-index: 4; height: 34px; border-top: 2px solid #dbe3ee; border-bottom: 0; background: #f8fafc; color: #475569; font-size: 9.5px; font-weight: 900; }
.mx-table tfoot td.mx-sticky { z-index: 7; background: #f8fafc; white-space: nowrap; }
.mx-table tfoot td.mx-cell { color: #94a3b8; }
.mx-table tfoot td.mx-cell.hit { color: var(--red); background: #fff7f7; }
.mx-hit-cell { min-width: 54px; background: #fbfcfe; color: #64748b; font-size: 10.5px; font-weight: 900; font-variant-numeric: tabular-nums; }
.mx-hit-cell.hit { color: var(--red); }
.mx-col-start { border-left: 2px solid #dbe3ee !important; }
.mx-table thead th.mx-col-start { border-left-color: #cbd5e1 !important; }
@media (max-width: 900px) {
  .custom-board-head { flex-direction: column; align-items: stretch; gap: 10px; }
  .custom-stats { width: 100%; min-width: 0; }
}
@media (max-width: 720px) {
  .custom-board-head { padding: 8px 14px 7px; gap: 8px; }
  .custom-stats { grid-template-columns: repeat(5, 1fr); }
  .custom-stats > div { min-height: 38px; padding: 4px 6px; }
  .custom-stats strong { font-size: 15px; }
  .custom-board .empty-hint { margin: 10px 14px 14px; }
  .mx-scroll { max-height: calc(100vh - 245px); min-height: 150px; }
  .mx-table thead th.mx-match-head, .mx-table td.mx-sticky { min-width: 200px; max-width: 230px; }
}
