/* ============================================================
   5TV 音乐后台 — 管理端样式
   对齐设计稿：#0A0A0B 画布 / #141417 卡片 / #1DB954 信号色
   ============================================================ */
:root {
  --bg: #0A0A0B;
  --card: #141417;
  --line: #27272A;
  --line-2: #1C1C20;
  --txt: #FAFAFA;
  --txt-2: #A1A1AA;
  --txt-3: #71717A;
  --green: #1DB954;
  --ok: #34D399;
  --warn: #FBBF24;
  --err: #FB7185;
  --orange: #FB923C;
  --sidebar: 232px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body {
  background: var(--bg); color: var(--txt);
  font-family: "PingFang SC", "Noto Sans SC", "Microsoft YaHei", -apple-system, sans-serif;
  font-size: 14px; line-height: 1.5; overflow: hidden;
}
.mono { font-family: "JetBrains Mono", ui-monospace, monospace; font-variant-numeric: tabular-nums; }

/* ---------- 布局 ---------- */
.admin { display: flex; height: 100vh; }
.sidebar {
  width: var(--sidebar); flex-shrink: 0;
  background: rgba(255,255,255,0.03);
  padding: 24px 16px 20px;
  display: flex; flex-direction: column; gap: 6px;
  overflow-y: auto;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 0 8px 14px; }
.brand b { font-size: 15px; font-weight: 700; }
.main { flex: 1; display: flex; flex-direction: column; padding: 28px 32px; overflow: hidden; }
.topbar { display: flex; align-items: center; justify-content: space-between; height: 56px; flex-shrink: 0; }
.topbar h1 { font-size: 24px; font-weight: 700; }
.topbar .sub { font-size: 13px; color: var(--txt-3); margin-top: 5px; }
.content { flex: 1; overflow-y: auto; padding-top: 22px; }
.content::-webkit-scrollbar { width: 8px; }
.content::-webkit-scrollbar-thumb { background: #2A2A30; border-radius: 4px; }

/* ---------- 侧栏导航 ---------- */
.nav {
  display: flex; align-items: center; gap: 11px;
  height: 40px; padding: 0 12px; border-radius: 10px;
  cursor: pointer; color: var(--txt-2); font-size: 14px;
  transition: background .15s; user-select: none;
}
.nav:hover { background: rgba(255,255,255,0.05); }
.nav.on { background: var(--green); color: #0A0A0B; font-weight: 600; }
.nav.on svg { stroke: #0A0A0B; }
.nav svg { width: 17px; height: 17px; flex-shrink: 0; stroke: var(--txt-2); }
.nav .badge {
  margin-left: auto; background: #1E1E22; color: var(--txt-2);
  font-size: 11px; padding: 3px 8px; border-radius: 10px;
}
.nav.on .badge { background: rgba(0,0,0,0.28); color: #0A0A0B; }

/* ---------- 卡片 ---------- */
.card {
  background: rgba(255,255,255,0.05);
  border-radius: 12px; padding: 24px;
}
.card + .card { margin-top: 20px; }
.card h3 { font-size: 15px; font-weight: 600; margin-bottom: 16px; }
.card.alert { background: rgba(251,191,36,0.07); }
.card.danger { background: rgba(251,113,133,0.09); }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 36px; padding: 0 16px; border-radius: 18px;
  border: none; cursor: pointer; font-size: 13px;
  font-family: inherit; background: rgba(255,255,255,0.07); color: #fff;
}
.btn.primary { background: var(--green); color: #0A0A0B; font-weight: 600; }
.btn.sm { height: 28px; padding: 0 12px; border-radius: 8px; font-size: 12px; }
.btn.danger { background: rgba(251,113,133,0.14); color: var(--err); }
.btn:disabled { opacity: .45; cursor: not-allowed; }

/* ---------- KPI ---------- */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.kpi {
  background: rgba(255,255,255,0.05); border-radius: 12px; padding: 20px;
}
.kpi.warn { background: rgba(251,191,36,0.07); }
.kpi .lb { font-size: 12px; color: var(--txt-2); }
.kpi .vl { font-size: 38px; font-weight: 700; line-height: 44px; margin-top: 6px; }
.kpi .ds { font-size: 12px; margin-top: 2px; color: var(--txt-3); }
.kpi .vl.warn { color: var(--warn); }
.kpi .vl.ok { color: var(--ok); }
.kpi .ds.ok { color: var(--ok); }

/* ---------- 图表 ---------- */
.chart-row { display: grid; grid-template-columns: 1fr 372px; gap: 20px; margin-top: 20px; }
.chart-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.chart-head b { font-size: 15px; }
.chart-head span { font-size: 12px; color: var(--txt-3); }
.bars { display: flex; align-items: flex-end; gap: 8px; height: 200px; }
.bars .b { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; height: 100%; }
.bars .b i {
  display: block; background: linear-gradient(180deg, var(--green), rgba(29,185,84,.25));
  border-radius: 4px 4px 0 0; height: 0; transition: height .5s ease;
}
.bars .b.on i { background: linear-gradient(180deg, #FBBF24, rgba(251,191,36,.25)); }
.bar-axis { display: flex; justify-content: space-between; margin-top: 10px; font-size: 11px; color: var(--txt-3); }

.prog-row { margin-bottom: 18px; }
.prog-row:last-child { margin-bottom: 0; }
.prog-row .lb { display: flex; justify-content: space-between; font-size: 12px; margin-bottom: 8px; }
.prog-row .lb b { font-weight: 500; }
.prog-row .track { height: 8px; background: rgba(255,255,255,0.10); border-radius: 4px; overflow: hidden; }
.prog-row .track i { display: block; height: 100%; border-radius: 4px; width: 0; transition: width .6s ease; }

/* ---------- 表格 ---------- */
.tbl { background: rgba(255,255,255,0.05); border-radius: 12px; overflow: hidden; }
.tbl-h, .tbl-r {
  display: flex; align-items: center; padding: 0 22px;
}
.tbl-h { height: 46px; background: rgba(255,255,255,0.05); font-size: 12px; color: var(--txt-2); font-weight: 500; }
.tbl-r { height: 58px; border-bottom: 1px solid rgba(255,255,255,0.05); }
.tbl-r:last-child { border-bottom: none; }
.tbl-r:hover { background: rgba(255,255,255,0.025); }
.tbl-scroll { max-height: 420px; overflow-y: auto; }
.tbl-scroll::-webkit-scrollbar { width: 6px; }
.tbl-scroll::-webkit-scrollbar-thumb { background: #2A2A30; border-radius: 3px; }

.c-thumb { width: 34px; height: 34px; border-radius: 5px; flex-shrink: 0; }
.name-cell { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
.name-cell .tx { min-width: 0; }
.name-cell b { font-size: 13px; font-weight: 600; display: block; }
.name-cell span { font-size: 11px; color: var(--txt-3); display: block; margin-top: 3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tag-pill {
  display: inline-block; font-size: 11px; font-weight: 500;
  padding: 3px 9px; border-radius: 10px;
  background: rgba(29,185,84,0.12); color: var(--ok);
}
.tag-pill.warn { background: rgba(251,191,36,0.14); color: var(--warn); }
.tag-pill.err { background: rgba(251,113,133,0.14); color: var(--err); }
.tag-pill.gray { background: #1E1E22; color: var(--txt-2); }

/* ---------- 工具栏 ---------- */
.toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.inp {
  height: 40px; background: rgba(255,255,255,0.05); border: 1px solid transparent;
  border-radius: 10px; padding: 0 14px; color: var(--txt); font-size: 13px;
  font-family: inherit; outline: none; width: 300px;
}
.inp:focus { border-color: var(--green); }
select.inp { width: auto; cursor: pointer; }
select.inp option { background: #141417; }
.filter-pill {
  height: 40px; padding: 0 14px; border-radius: 10px; cursor: pointer;
  display: inline-flex; align-items: center; font-size: 13px;
  background: rgba(255,255,255,0.05); color: var(--txt-2);
  border: 1px solid transparent; white-space: nowrap;
}
.filter-pill.on { background: rgba(251,191,36,0.12); color: var(--warn); border-color: rgba(251,191,36,0.3); font-weight: 500; }

/* ---------- 表单 ---------- */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 12px; color: var(--txt-2); margin-bottom: 7px; }
.field .inp { width: 100%; }
.opts { display: flex; gap: 8px; }
.opt {
  padding: 9px 16px; border-radius: 10px; cursor: pointer; font-size: 13px;
  background: rgba(255,255,255,0.07); color: var(--txt-2);
}
.opt.on { background: var(--green); color: #0A0A0B; font-weight: 600; }
.swatches { display: flex; gap: 9px; }
.sw { width: 30px; height: 30px; border-radius: 50%; cursor: pointer; border: 2px solid transparent; }
.sw.on { border-color: #fff; }
.sw.empty { background: rgba(255,255,255,0.10); border: 1px solid rgba(255,255,255,0.24); }

/* ---------- 代码块 ---------- */
.code {
  background: rgba(0,0,0,0.35); border-radius: 9px; padding: 12px 14px;
  font-family: "JetBrains Mono", monospace; font-size: 12px; line-height: 1.6;
}
.code .g { color: var(--txt-3); }
.code .n { color: var(--txt-2); }
.code .o { color: var(--ok); }

/* ---------- 提示条 ---------- */
.note {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 14px; border-radius: 8px; font-size: 12px; line-height: 19px;
}
.note.warn { background: rgba(251,191,36,0.10); color: var(--warn); }
.note.err { background: rgba(251,113,133,0.10); color: var(--err); }
.note.ok { background: rgba(29,185,84,0.10); color: var(--green); }
.note svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; }

/* ---------- 权限矩阵 ---------- */
.mx { display: grid; grid-template-columns: 1fr 60px 60px; align-items: center; height: 32px; font-size: 12px; }
.mx.head { height: 26px; color: var(--txt-3); font-size: 11px; }
.mx .md { color: var(--txt-2); }
.mx .ck { text-align: center; color: var(--green); }
.mx .no { text-align: center; color: var(--txt-3); }

/* ---------- 日志 ---------- */
.log-i { padding: 12px 20px; border-bottom: 1px solid rgba(255,255,255,0.05); }
.log-i:last-child { border-bottom: none; }
.log-i .h { display: flex; justify-content: space-between; margin-bottom: 5px; }
.log-i .h b { font-size: 12px; font-weight: 500; }
.log-i .h span { font-size: 11px; color: var(--txt-3); }
.log-i .d { font-size: 11px; color: var(--txt-3); }

/* ---------- 登录页 ---------- */
.auth-wrap { display: flex; height: 100vh; align-items: center; justify-content: center; }
.auth-box { width: 380px; }
.auth-box .brand { justify-content: center; padding-bottom: 24px; }
.auth-box h2 { font-size: 22px; font-weight: 700; text-align: center; margin-bottom: 24px; }
.auth-box .btn { width: 100%; height: 44px; border-radius: 12px; justify-content: center; font-size: 15px; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 40px; transform: translateX(-50%);
  background: rgba(0,0,0,.94); padding: 11px 20px; border-radius: 10px;
  font-size: 13px; z-index: 300; opacity: 0; pointer-events: none;
  transition: opacity .25s; max-width: 520px; line-height: 1.5;
}
.toast.show { opacity: 1; }
.loading { text-align: center; padding: 60px 20px; color: var(--txt-3); }
.spin {
  width: 34px; height: 34px; border-radius: 50%; margin: 0 auto 16px;
  border: 2.5px solid rgba(255,255,255,.15); border-top-color: var(--green);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }