/* ==========================================================================
   龙域AI选剧平台 — 设计系统
   深空暗色科技风 / 主色 紫 #6D5DF6 → 青 #22D3EE
   ========================================================================== */
:root {
  --bg: #070a14;
  --bg-2: #0a0f1d;
  --panel: #0f1526;
  --panel-2: #141c30;
  --panel-3: #1a2338;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --txt: #eaf0ff;
  --txt-2: #9aa7c7;
  --txt-3: #6b7794;
  --brand: #6d5df6;
  --brand-soft: rgba(109, 93, 246, 0.16);
  --cyan: #22d3ee;
  --mint: #34d399;
  --gold: #f5c451;
  --rose: #fb7185;
  --up: #ff4d4f;   /* 中文惯例：涨为红 */
  --down: #12b76a; /* 跌为绿 */
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
  --grad: linear-gradient(135deg, #6d5df6 0%, #3b82f6 52%, #22d3ee 100%);
  --font: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--txt);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.12); border-radius: 8px; }
::-webkit-scrollbar-track { background: transparent; }

/* ------------------------------- 通用组件 ------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 38px; padding: 0 18px; border-radius: 10px; border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.04); color: var(--txt); cursor: pointer;
  font-weight: 500; transition: all 0.18s ease; white-space: nowrap;
}
.btn:hover { background: rgba(255, 255, 255, 0.09); border-color: rgba(255, 255, 255, 0.26); }
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--grad); border: none; color: #fff;
  box-shadow: 0 8px 22px rgba(109, 93, 246, 0.35);
}
.btn-primary:hover { filter: brightness(1.08); box-shadow: 0 10px 28px rgba(109, 93, 246, 0.5); }
.btn-sm { height: 30px; padding: 0 12px; font-size: 12px; border-radius: 8px; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--txt-2); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.06); color: var(--txt); }
.btn-danger { color: #ffb3b8; border-color: rgba(255, 77, 79, 0.35); background: rgba(255, 77, 79, 0.1); }
.btn-danger:hover { background: rgba(255, 77, 79, 0.2); }
.btn[disabled] { opacity: 0.45; pointer-events: none; }

.card {
  background: linear-gradient(180deg, rgba(20, 28, 48, 0.9), rgba(13, 19, 34, 0.92));
  border: 1px solid var(--line); border-radius: var(--radius);
}
.panel-title { font-size: 15px; font-weight: 600; letter-spacing: 0.2px; display: flex; align-items: center; gap: 8px; }
.panel-title::before {
  content: ""; width: 3px; height: 14px; border-radius: 2px; background: var(--grad); display: inline-block;
}
.muted { color: var(--txt-2); }
.dim { color: var(--txt-3); }
.num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }

.badge {
  display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px;
  border-radius: 6px; font-size: 11px; font-weight: 500; letter-spacing: 0.3px;
  background: rgba(255, 255, 255, 0.06); color: var(--txt-2); border: 1px solid var(--line);
}
.badge-dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.badge-brand { color: #b7aeff; background: rgba(109, 93, 246, 0.16); border-color: rgba(109, 93, 246, 0.35); }
.badge-cyan { color: #8fe9f7; background: rgba(34, 211, 238, 0.13); border-color: rgba(34, 211, 238, 0.3); }
.badge-mint { color: #86efca; background: rgba(52, 211, 153, 0.13); border-color: rgba(52, 211, 153, 0.3); }
.badge-gold { color: #f8d98b; background: rgba(245, 196, 81, 0.13); border-color: rgba(245, 196, 81, 0.3); }
.badge-rose { color: #ffb0bb; background: rgba(251, 113, 133, 0.13); border-color: rgba(251, 113, 133, 0.3); }

/* --------------------------------- 登录页 -------------------------------- */
.login-body { display: grid; grid-template-columns: 1.15fr 0.85fr; min-height: 100vh; background: var(--bg); }
.login-visual {
  position: relative; overflow: hidden; padding: 56px 64px; display: flex; flex-direction: column; justify-content: space-between;
  background:
    radial-gradient(1000px 600px at 12% 8%, rgba(109, 93, 246, 0.35), transparent 60%),
    radial-gradient(900px 520px at 88% 92%, rgba(34, 211, 238, 0.22), transparent 62%),
    linear-gradient(160deg, #0b1020 0%, #070a14 100%);
}
.login-visual::before {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 56px 56px; mask-image: radial-gradient(circle at 30% 25%, #000 25%, transparent 78%);
}
.login-visual > * { position: relative; z-index: 2; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 42px; height: 42px; border-radius: 12px; background: var(--grad);
  display: grid; place-items: center; font-weight: 800; font-size: 19px; color: #fff;
  box-shadow: 0 10px 26px rgba(109, 93, 246, 0.45);
}
.brand-text b { font-size: 17px; letter-spacing: 1px; display: block; }
.brand-text span { font-size: 11px; color: var(--txt-3); letter-spacing: 2.4px; text-transform: uppercase; }
.login-hero h1 {
  font-size: 44px; line-height: 1.22; margin: 0 0 18px; letter-spacing: 1px; font-weight: 700;
  background: linear-gradient(120deg, #fff 20%, #b9b0ff 62%, #7fe6f5 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.login-hero p { color: var(--txt-2); font-size: 15px; line-height: 1.8; max-width: 470px; margin: 0 0 28px; }
.login-kpis { display: flex; gap: 14px; flex-wrap: wrap; }
.login-kpi {
  flex: 1; min-width: 132px; padding: 16px 18px; border-radius: 14px;
  background: rgba(255, 255, 255, 0.045); border: 1px solid var(--line);
  backdrop-filter: blur(8px);
}
.login-kpi b { display: block; font-size: 24px; font-weight: 700; letter-spacing: 0.5px; }
.login-kpi span { font-size: 12px; color: var(--txt-3); }
.login-foot { font-size: 12px; color: var(--txt-3); letter-spacing: 0.4px; }
.login-form-side { display: grid; place-items: center; padding: 40px; background: var(--bg-2); }
.login-card { width: 100%; max-width: 384px; }
.login-card h2 { font-size: 26px; margin: 0 0 8px; }
.login-card .sub { color: var(--txt-3); margin: 0 0 28px; font-size: 13px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 12px; color: var(--txt-2); margin-bottom: 8px; letter-spacing: 0.3px; }
.input {
  width: 100%; height: 44px; padding: 0 14px; border-radius: 10px;
  background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line-strong);
  transition: all 0.18s ease; outline: none;
}
.input:focus { border-color: rgba(109, 93, 246, 0.7); box-shadow: 0 0 0 3px rgba(109, 93, 246, 0.18); background: rgba(255, 255, 255, 0.06); }
textarea.input { height: auto; padding: 12px 14px; resize: vertical; line-height: 1.6; }
select.input { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4l4 4 4-4' stroke='%239aa7c7' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 34px; }
.input::placeholder { color: var(--txt-3); }
.login-card .btn { width: 100%; height: 44px; margin-top: 8px; }
.login-error { color: #ff9ba1; font-size: 12.5px; min-height: 18px; margin-top: 10px; }
.demo-accounts { margin-top: 26px; padding-top: 20px; border-top: 1px dashed var(--line); }
.demo-accounts .t { font-size: 11.5px; color: var(--txt-3); margin-bottom: 10px; letter-spacing: 0.6px; }
.demo-chip {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%;
  padding: 9px 12px; margin-bottom: 8px; border-radius: 9px; cursor: pointer;
  background: rgba(255, 255, 255, 0.035); border: 1px solid var(--line);
  font-size: 12.5px; color: var(--txt-2); transition: all 0.16s ease; text-align: left;
}
.demo-chip:hover { background: rgba(109, 93, 246, 0.14); border-color: rgba(109, 93, 246, 0.4); color: var(--txt); }
.demo-chip b { color: var(--txt); font-weight: 600; }
.demo-chip .role { font-size: 10.5px; padding: 2px 7px; border-radius: 5px; background: rgba(255, 255, 255, 0.07); }

/* --------------------------------- 主框架 -------------------------------- */
.app-body { background: var(--bg); }
.app { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; padding: 22px 14px;
  background: linear-gradient(180deg, #0b1020, #070a14 60%);
  border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px;
}
.sidebar .brand { padding: 0 8px 22px; }
.nav-group-label { font-size: 10.5px; letter-spacing: 2px; color: var(--txt-3); padding: 14px 12px 6px; text-transform: uppercase; }
.nav-item {
  display: flex; align-items: center; gap: 11px; height: 42px; padding: 0 12px; border-radius: 10px;
  color: var(--txt-2); cursor: pointer; transition: all 0.16s ease; font-size: 13.5px; position: relative;
}
.nav-item svg { width: 17px; height: 17px; flex: none; opacity: 0.85; }
.nav-item:hover { background: rgba(255, 255, 255, 0.05); color: var(--txt); }
.nav-item.active { background: linear-gradient(90deg, rgba(109, 93, 246, 0.22), rgba(34, 211, 238, 0.06)); color: #fff; }
.nav-item.active::before {
  content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 3px; background: var(--grad);
}
.nav-item .kbd { margin-left: auto; font-size: 10px; color: var(--txt-3); }
.sidebar-foot { margin-top: auto; padding: 14px 12px 4px; border-top: 1px solid var(--line); }
.user-box { display: flex; align-items: center; gap: 10px; }
.avatar {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  font-size: 13px; font-weight: 600; color: #fff; background: var(--grad); flex: none;
}
.user-box .meta { min-width: 0; }
.user-box .meta b { display: block; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-box .meta span { font-size: 11px; color: var(--txt-3); }
.icon-btn {
  width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px;
  border: 1px solid transparent; background: transparent; color: var(--txt-3); cursor: pointer;
}
.icon-btn:hover { background: rgba(255, 255, 255, 0.07); color: var(--txt); }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 64px; padding: 0 26px; display: flex; align-items: center; gap: 16px;
  border-bottom: 1px solid var(--line); background: rgba(7, 10, 20, 0.72);
  backdrop-filter: blur(14px); position: sticky; top: 0; z-index: 20;
}
.topbar h1 { font-size: 16px; font-weight: 600; margin: 0; letter-spacing: 0.4px; }
.topbar .crumb { font-size: 12px; color: var(--txt-3); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.scope-switch { display: flex; padding: 3px; border-radius: 9px; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line); }
.scope-switch button {
  height: 28px; padding: 0 12px; border-radius: 7px; border: 0; background: transparent;
  color: var(--txt-3); font-size: 12px; cursor: pointer; transition: all 0.16s;
}
.scope-switch button.on { background: var(--brand-soft); color: #c6beff; box-shadow: inset 0 0 0 1px rgba(109, 93, 246, 0.4); }
.page { padding: 24px 26px 48px; flex: 1; }

/* -------------------------------- 页面通用 ------------------------------- */
.page-head { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head h2 { font-size: 22px; margin: 0 0 6px; letter-spacing: 0.5px; }
.page-head p { margin: 0; color: var(--txt-3); font-size: 12.5px; }
.page-head .actions { margin-left: auto; display: flex; gap: 10px; align-items: center; }

.stat-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 20px; }
.stat {
  padding: 16px 18px; border-radius: 14px; border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(20, 28, 48, 0.85), rgba(12, 18, 32, 0.9)); position: relative; overflow: hidden;
}
.stat::after {
  content: ""; position: absolute; right: -30px; top: -30px; width: 96px; height: 96px; border-radius: 50%;
  background: radial-gradient(circle, rgba(109, 93, 246, 0.22), transparent 70%);
}
.stat .label { font-size: 12px; color: var(--txt-3); display: flex; align-items: center; gap: 6px; }
.stat .value { font-size: 26px; font-weight: 700; letter-spacing: 0.6px; margin-top: 8px; }
.stat .value small { font-size: 12px; font-weight: 400; color: var(--txt-3); margin-left: 4px; }
.stat .delta { font-size: 11.5px; margin-top: 6px; display: flex; align-items: center; gap: 5px; }

.toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  height: 30px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03); color: var(--txt-2); font-size: 12.5px; cursor: pointer;
  transition: all 0.16s ease; display: inline-flex; align-items: center; gap: 6px;
}
.chip:hover { border-color: var(--line-strong); color: var(--txt); }
.chip.on { background: var(--brand-soft); border-color: rgba(109, 93, 246, 0.5); color: #cfc8ff; }
.search {
  height: 34px; padding: 0 12px 0 34px; border-radius: 9px; border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236b7794' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E") no-repeat 12px center;
  color: var(--txt); outline: none; width: 220px;
}
.search:focus { border-color: rgba(109, 93, 246, 0.6); }

/* -------------------------------- 剧本卡片 ------------------------------- */
.drama-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(258px, 1fr)); gap: 16px; }
.drama-card {
  border-radius: 16px; border: 1px solid var(--line); overflow: hidden; cursor: pointer;
  background: linear-gradient(180deg, rgba(20, 28, 48, 0.92), rgba(11, 16, 29, 0.95));
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  display: flex; flex-direction: column;
}
.drama-card:hover { transform: translateY(-3px); border-color: rgba(109, 93, 246, 0.45); box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5); }
.poster { position: relative; aspect-ratio: 16 / 10; overflow: hidden; display: grid; place-items: center; }
.poster img { width: 100%; height: 100%; object-fit: cover; }
.poster .glyph {
  font-size: 58px; font-weight: 800; color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 8px 26px rgba(0, 0, 0, 0.45); letter-spacing: 4px;
}
.poster .scan {
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px);
  background-size: 100% 4px; opacity: 0.5; mix-blend-mode: overlay;
}
.poster .top-badges { position: absolute; top: 10px; left: 10px; display: flex; gap: 6px; }
.poster .style-tag {
  position: absolute; bottom: 10px; right: 10px; font-size: 10.5px; padding: 3px 8px; border-radius: 6px;
  background: rgba(0, 0, 0, 0.42); color: #e8eeff; border: 1px solid rgba(255, 255, 255, 0.16); backdrop-filter: blur(6px);
}
.drama-body { padding: 14px 15px 15px; display: flex; flex-direction: column; gap: 9px; flex: 1; }
.drama-title { font-size: 15px; font-weight: 600; letter-spacing: 0.2px; }
.drama-sub { font-size: 11.5px; color: var(--txt-3); display: flex; gap: 8px; flex-wrap: wrap; }
.progress-line { height: 5px; border-radius: 99px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.progress-line i { display: block; height: 100%; border-radius: 99px; background: var(--grad); }
.drama-metrics { display: flex; gap: 14px; margin-top: auto; padding-top: 4px; }
.drama-metrics div { font-size: 11px; color: var(--txt-3); }
.drama-metrics b { display: block; font-size: 13.5px; color: var(--txt); font-weight: 600; margin-top: 2px; }

/* -------------------------------- 样片卡片 ------------------------------- */
.sample-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(292px, 1fr)); gap: 16px; }
.sample-card { border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: var(--panel); cursor: pointer; transition: all 0.2s; }
.sample-card:hover { border-color: rgba(34, 211, 238, 0.4); transform: translateY(-2px); }
.sample-thumb { position: relative; aspect-ratio: 16 / 9; display: grid; place-items: center; overflow: hidden; }
.play-btn {
  width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.14); border: 1px solid rgba(255, 255, 255, 0.4); backdrop-filter: blur(6px);
  transition: all 0.2s;
}
.sample-card:hover .play-btn { background: var(--brand); transform: scale(1.08); border-color: transparent; }
.sample-thumb .dur { position: absolute; right: 9px; bottom: 9px; font-size: 10.5px; padding: 2px 7px; border-radius: 5px; background: rgba(0, 0, 0, 0.55); }
.sample-thumb .pf { position: absolute; left: 9px; top: 9px; }
.sample-info { padding: 12px 14px 14px; }
.sample-info .t { font-size: 13.5px; font-weight: 500; margin-bottom: 6px; }
.sample-info .s { font-size: 11.5px; color: var(--txt-3); display: flex; justify-content: space-between; gap: 8px; }

/* --------------------------------- 榜单 --------------------------------- */
.rank-layout { display: grid; grid-template-columns: 1fr 330px; gap: 18px; align-items: start; }
.rank-list { display: flex; flex-direction: column; gap: 2px; }
.rank-row {
  display: grid; grid-template-columns: 46px 1fr 132px 74px; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: 10px; transition: background 0.16s;
}
.rank-row:hover { background: rgba(255, 255, 255, 0.04); }
.rank-row.mine { background: linear-gradient(90deg, rgba(109, 93, 246, 0.14), transparent 70%); border: 1px solid rgba(109, 93, 246, 0.22); }
.rank-no {
  width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center;
  font-weight: 700; font-size: 13px; color: var(--txt-2); background: rgba(255, 255, 255, 0.06);
}
.rank-no.r1 { background: linear-gradient(135deg, #f5c451, #e08b28); color: #2a1b00; box-shadow: 0 6px 16px rgba(245, 196, 81, 0.32); }
.rank-no.r2 { background: linear-gradient(135deg, #d7dce8, #9aa6bd); color: #1b2130; }
.rank-no.r3 { background: linear-gradient(135deg, #e0a97a, #b97846); color: #2a1500; }
.rank-main { min-width: 0; }
.rank-main .t { font-size: 13.5px; font-weight: 500; display: flex; align-items: center; gap: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-main .bar { height: 4px; border-radius: 99px; background: rgba(255, 255, 255, 0.07); margin-top: 7px; overflow: hidden; }
.rank-main .bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #6d5df6, #22d3ee); }
.rank-val { text-align: right; font-size: 13px; font-weight: 600; }
.rank-val span { display: block; font-size: 10.5px; color: var(--txt-3); font-weight: 400; }
.rank-change { text-align: right; font-size: 11.5px; }
.rank-change.up { color: var(--up); }
.rank-change.down { color: var(--down); }
.rank-change.flat { color: var(--txt-3); }
.hot-item { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.hot-item:last-child { border-bottom: 0; }
.hot-item .n { width: 22px; font-size: 13px; font-weight: 700; color: var(--txt-3); }
.hot-item .n.top { color: var(--gold); }
.hot-item .t { flex: 1; min-width: 0; font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hot-item .p { font-size: 11px; color: var(--txt-3); }

/* -------------------------------- 数据大屏 ------------------------------- */
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.kpi {
  position: relative; padding: 18px 20px; border-radius: 16px; overflow: hidden;
  border: 1px solid var(--line); background: linear-gradient(160deg, rgba(24, 33, 56, 0.95), rgba(11, 16, 29, 0.95));
}
.kpi::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--grad);
}
.kpi .label { font-size: 12px; color: var(--txt-3); letter-spacing: 0.4px; }
.kpi .val { font-size: 30px; font-weight: 700; letter-spacing: 0.8px; margin: 8px 0 6px; font-variant-numeric: tabular-nums; }
.kpi .val small { font-size: 13px; color: var(--txt-2); font-weight: 500; margin-left: 3px; }
.kpi .foot { font-size: 11.5px; color: var(--txt-3); display: flex; align-items: center; gap: 6px; }
.kpi .glow { position: absolute; right: -24px; bottom: -40px; width: 120px; height: 120px; border-radius: 50%; background: radial-gradient(circle, rgba(34, 211, 238, 0.18), transparent 70%); }

.dash-grid { display: grid; grid-template-columns: 1.55fr 1fr; gap: 16px; margin-bottom: 16px; }
.dash-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.chart-card { padding: 18px 20px 14px; border-radius: 16px; border: 1px solid var(--line); background: linear-gradient(180deg, rgba(17, 24, 42, 0.95), rgba(10, 15, 27, 0.95)); }
.chart-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.chart-head .r { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.chart { width: 100%; }
.legend { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.legend-row { display: flex; align-items: center; gap: 9px; font-size: 12px; }
.legend-dot { width: 8px; height: 8px; border-radius: 3px; flex: none; }
.legend-row .name { color: var(--txt-2); }
.legend-row .v { margin-left: auto; font-weight: 600; }
.legend-row .pct { width: 46px; text-align: right; color: var(--txt-3); font-size: 11px; }

.tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.tbl th {
  text-align: left; font-weight: 500; color: var(--txt-3); font-size: 11.5px; letter-spacing: 0.4px;
  padding: 9px 10px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.tbl td { padding: 11px 10px; border-bottom: 1px solid rgba(255, 255, 255, 0.05); }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover { background: rgba(255, 255, 255, 0.03); }
.tbl .num, .tbl .right { text-align: right; }

/* -------------------------------- 进度页 -------------------------------- */
.progress-card { padding: 18px 20px; border-radius: 16px; border: 1px solid var(--line); background: var(--panel); margin-bottom: 14px; }
.progress-top { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.progress-top .t { font-size: 15px; font-weight: 600; }
.progress-top .pct { margin-left: auto; font-size: 22px; font-weight: 700; background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.stepper { display: flex; align-items: flex-start; gap: 0; }
.step { flex: 1; position: relative; text-align: center; }
.step .dot {
  width: 26px; height: 26px; border-radius: 50%; margin: 0 auto 9px; display: grid; place-items: center;
  font-size: 11px; font-weight: 600; background: rgba(255, 255, 255, 0.06); color: var(--txt-3);
  border: 1px solid var(--line); position: relative; z-index: 2;
}
.step .line { position: absolute; top: 13px; left: 50%; width: 100%; height: 2px; background: rgba(255, 255, 255, 0.08); z-index: 1; }
.step:last-child .line { display: none; }
.step.done .dot { background: var(--grad); color: #fff; border-color: transparent; }
.step.done .line { background: linear-gradient(90deg, #6d5df6, #22d3ee); }
.step.current .dot { background: rgba(109, 93, 246, 0.18); color: #c9c2ff; border-color: rgba(109, 93, 246, 0.7); box-shadow: 0 0 0 4px rgba(109, 93, 246, 0.12); }
.step .name { font-size: 11.5px; color: var(--txt-3); }
.step.current .name, .step.done .name { color: var(--txt); }

/* -------------------------------- 表格/表单 ------------------------------ */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.upload-zone {
  border: 1px dashed rgba(255, 255, 255, 0.2); border-radius: 12px; padding: 22px; text-align: center;
  background: rgba(255, 255, 255, 0.02); cursor: pointer; transition: all 0.18s; color: var(--txt-2);
}
.upload-zone:hover, .upload-zone.drag { border-color: rgba(109, 93, 246, 0.7); background: rgba(109, 93, 246, 0.08); }
.upload-zone .big { font-size: 13.5px; color: var(--txt); margin-bottom: 5px; }
.upload-zone .hint { font-size: 11.5px; color: var(--txt-3); }
.file-chosen { font-size: 12px; color: #9ae6b4; margin-top: 8px; }
.tabs { display: flex; gap: 6px; padding: 4px; border-radius: 11px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); width: fit-content; }
.tabs button {
  height: 32px; padding: 0 16px; border-radius: 8px; border: 0; background: transparent; color: var(--txt-2);
  font-size: 12.5px; cursor: pointer; transition: all 0.16s;
}
.tabs button.on { background: var(--brand-soft); color: #d3ccff; box-shadow: inset 0 0 0 1px rgba(109, 93, 246, 0.35); }

/* --------------------------------- 弹窗 --------------------------------- */
.modal-mask {
  position: fixed; inset: 0; background: rgba(3, 5, 12, 0.72); backdrop-filter: blur(6px);
  display: grid; place-items: center; z-index: 60; padding: 24px; animation: fade 0.18s ease;
}
.modal {
  width: 100%; max-width: 720px; max-height: 88vh; overflow: auto; border-radius: 18px;
  background: linear-gradient(180deg, #131b2e, #0b1020); border: 1px solid var(--line-strong);
  box-shadow: var(--shadow); animation: pop 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}
.modal.wide { max-width: 940px; }
.modal-head { display: flex; align-items: center; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: #131b2e; z-index: 2; }
.modal-head h3 { margin: 0; font-size: 16px; font-weight: 600; }
.modal-head .x { margin-left: auto; }
.modal-body { padding: 22px; }
.modal-foot { padding: 14px 22px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 10px; position: sticky; bottom: 0; background: #0d1322; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(0.98); } }

/* --------------------------------- Toast -------------------------------- */
#toast-root { position: fixed; top: 20px; left: 50%; transform: translateX(-50%); z-index: 90; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.toast {
  padding: 10px 18px; border-radius: 10px; font-size: 13px; border: 1px solid var(--line-strong);
  background: rgba(19, 27, 46, 0.96); box-shadow: var(--shadow); animation: pop 0.2s ease;
  display: flex; align-items: center; gap: 8px;
}
.toast.ok { border-color: rgba(52, 211, 153, 0.45); color: #9df5cf; }
.toast.err { border-color: rgba(251, 113, 133, 0.45); color: #ffb3bf; }

/* --------------------------------- 其它 --------------------------------- */
.empty { text-align: center; padding: 64px 20px; color: var(--txt-3); }
.empty .ico { font-size: 34px; opacity: 0.5; margin-bottom: 10px; }
.skeleton { background: linear-gradient(90deg, rgba(255,255,255,0.04), rgba(255,255,255,0.09), rgba(255,255,255,0.04)); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 10px; }
@keyframes sk { to { background-position: -200% 0; } }
.split-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.kv { display: flex; gap: 10px; padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: 12.5px; }
.kv:last-child { border-bottom: 0; }
.kv .k { color: var(--txt-3); width: 88px; flex: none; }
.kv .v { color: var(--txt); }
.scroll-y { overflow-y: auto; }
video { width: 100%; border-radius: 12px; background: #000; display: block; }

/* 大屏全屏模式 */
body.screen-mode .sidebar, body.screen-mode .topbar { display: none; }
body.screen-mode .app { grid-template-columns: 1fr; }
body.screen-mode .page { padding: 22px 30px; }

@media (max-width: 1180px) {
  .dash-grid, .dash-grid-2, .rank-layout { grid-template-columns: 1fr; }
  .stat-strip, .kpi-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .login-body { grid-template-columns: 1fr; }
  .login-visual { display: none; }
  .app { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .form-grid { grid-template-columns: 1fr; }
  .split-2 { grid-template-columns: 1fr; }
}
