/* =========================================================
   企业TV大屏宣传热更新播放系统 · 管理后台样式
   ========================================================= */
:root {
  --bg: #f4f6fb;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --ink: #0f172a;
  --ink-2: #334155;
  --muted: #64748b;
  --faint: #94a3b8;
  --line: #e6eaf2;
  --line-strong: #d5dce9;
  --primary: #2f5bea;
  --primary-dark: #1e40af;
  --primary-soft: #eef2ff;
  --accent: #0ea5e9;
  --success: #10b981;
  --success-soft: #ecfdf5;
  --warning: #f59e0b;
  --warning-soft: #fffbeb;
  --danger: #ef4444;
  --danger-soft: #fef2f2;
  --sidebar: #0b1324;
  --sidebar-2: #101c33;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px -12px rgba(15, 23, 42, .12);
  --shadow-lg: 0 24px 64px -16px rgba(15, 23, 42, .28);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
button, input, select, textarea { font-family: inherit; font-size: inherit; }
.hidden { display: none !important; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 8px; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- 登录 ---------- */
.login-wrap {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  background: radial-gradient(1200px 700px at 10% 0%, #16295a 0%, #0b1324 55%, #070d19 100%);
  color: #fff;
}
.login-brand { padding: 64px 72px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.login-brand::after {
  content: ""; position: absolute; width: 460px; height: 460px; right: -160px; bottom: -180px;
  background: radial-gradient(circle, rgba(56, 189, 248, .22), transparent 65%); border-radius: 50%;
}
.login-logo { display: flex; align-items: center; gap: 14px; font-weight: 700; letter-spacing: .5px; }
.login-logo .brand-mark { width: 46px; height: 46px; font-size: 16px; background: linear-gradient(135deg, #38bdf8, #6366f1); }
.login-hero h1 { font-size: 40px; line-height: 1.28; margin: 0 0 18px; letter-spacing: -.5px; }
.login-hero h1 em { font-style: normal; background: linear-gradient(90deg, #7dd3fc, #a5b4fc); -webkit-background-clip: text; background-clip: text; color: transparent; }
.login-hero p { color: #a9b8d8; font-size: 15px; max-width: 480px; margin: 0; }
.login-features { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 34px; max-width: 560px; }
.login-feature {
  display: flex; gap: 10px; align-items: flex-start; padding: 14px 16px; border-radius: 12px;
  background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .08); backdrop-filter: blur(6px);
}
.login-feature svg { color: #7dd3fc; margin-top: 2px; }
.login-feature b { display: block; font-size: 13.5px; font-weight: 600; }
.login-feature span { font-size: 12px; color: #93a6c9; }
.login-foot { color: #5f739b; font-size: 12px; }
.login-panel { background: #fff; color: var(--ink); display: flex; align-items: center; justify-content: center; padding: 32px; }
.login-card { width: 100%; max-width: 380px; }
.login-card h2 { font-size: 26px; margin: 0 0 8px; letter-spacing: -.3px; }
.login-card .sub { color: var(--muted); margin: 0 0 30px; font-size: 13.5px; }
.login-card .field { margin-bottom: 18px; }
.login-card .btn { width: 100%; height: 46px; font-size: 15px; }
.login-hint { margin-top: 22px; padding: 14px 16px; border-radius: 10px; background: var(--surface-2); border: 1px dashed var(--line-strong); font-size: 12.5px; color: var(--muted); }
.login-hint code { font-family: var(--mono); color: var(--ink-2); background: #eef2f7; padding: 1px 5px; border-radius: 4px; }
.login-error { color: var(--danger); font-size: 13px; margin: -6px 0 14px; min-height: 18px; }

/* ---------- 主体框架 ---------- */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: 252px; flex: none; background: linear-gradient(180deg, var(--sidebar) 0%, var(--sidebar-2) 100%);
  color: #c7d2e6; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; z-index: 20;
}
.brand { display: flex; gap: 12px; align-items: center; padding: 22px 20px 18px; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; font-weight: 800; font-size: 13px;
  background: linear-gradient(135deg, #38bdf8, #6366f1); color: #fff; letter-spacing: .5px;
  box-shadow: 0 6px 18px -6px rgba(56, 189, 248, .8);
}
.brand-text strong { display: block; color: #fff; font-size: 15px; letter-spacing: .3px; }
.brand-text span { font-size: 11.5px; color: #7186ab; }
.nav { padding: 8px 12px; flex: 1; overflow-y: auto; }
.nav-group { margin-top: 18px; }
.nav-group:first-child { margin-top: 4px; }
.nav-group-title { font-size: 11px; text-transform: uppercase; letter-spacing: 1.2px; color: #5a6d90; padding: 0 12px 8px; }
.nav-item {
  display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 9px; cursor: pointer;
  color: #b9c6dd; font-size: 13.5px; margin-bottom: 2px; transition: background .16s, color .16s; position: relative;
}
.nav-item:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.nav-item.active { background: rgba(84, 130, 255, .17); color: #fff; }
.nav-item.active::before {
  content: ""; position: absolute; left: 0; top: 9px; bottom: 9px; width: 3px; border-radius: 3px;
  background: linear-gradient(180deg, #38bdf8, #6366f1);
}
.nav-item svg { width: 17px; height: 17px; opacity: .9; }
.nav-item .nav-count {
  margin-left: auto; font-size: 11px; background: var(--danger); color: #fff; min-width: 18px;
  height: 18px; border-radius: 9px; display: grid; place-items: center; padding: 0 5px;
}
.sidebar-foot { padding: 12px; border-top: 1px solid rgba(255, 255, 255, .06); }
.storage-pill {
  display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: #8fa3c4; padding: 8px 10px;
  background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .07); border-radius: 8px; margin-bottom: 8px;
}
.storage-pill b { color: #dbe7ff; font-weight: 600; }
.storage-pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 3px rgba(16, 185, 129, .15); }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 8px 6px; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg, #334155, #475569);
  color: #fff; display: grid; place-items: center; font-size: 13px; font-weight: 700;
}
.user-chip .meta { min-width: 0; }
.user-chip .meta b { display: block; color: #fff; font-size: 13px; font-weight: 600; }
.user-chip .meta span { font-size: 11px; color: #7589ad; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 64px; flex: none; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 0 28px; background: rgba(255, 255, 255, .86); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 15;
}
.crumbs { color: var(--muted); font-size: 13px; display: flex; align-items: center; gap: 8px; }
.crumbs b { color: var(--ink); font-weight: 600; }
.crumbs .sep { color: var(--faint); }
.top-actions { display: flex; align-items: center; gap: 10px; }
.server-clock { font-family: var(--mono); font-size: 12px; color: var(--muted); background: var(--surface-2); padding: 6px 10px; border-radius: 7px; border: 1px solid var(--line); }
.icon-btn {
  position: relative; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 9px;
  border: 1px solid var(--line); background: #fff; color: var(--ink-2); cursor: pointer; transition: .16s;
}
.icon-btn:hover { border-color: var(--line-strong); background: var(--surface-2); }
.badge-dot {
  position: absolute; top: -4px; right: -4px; min-width: 17px; height: 17px; border-radius: 9px;
  background: var(--danger); color: #fff; font-size: 10.5px; display: grid; place-items: center; padding: 0 4px; border: 2px solid #fff;
}
.view { padding: 26px 28px 44px; max-width: 1560px; width: 100%; margin: 0 auto; }

/* ---------- 页面头 ---------- */
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head h1 { font-size: 23px; margin: 0 0 4px; letter-spacing: -.3px; font-weight: 700; }
.page-head .sub { color: var(--muted); font-size: 13px; margin: 0; }
.page-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* ---------- 卡片 ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.card-head h3 { font-size: 15px; margin: 0; font-weight: 650; }
.card-head .hint { font-size: 12px; color: var(--muted); }
.card-body { padding: 20px; }
.card-body.tight { padding: 12px; }
.card-foot { padding: 14px 20px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 10px; }

/* ---------- 统计卡 ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 18px 16px;
  box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.stat::after { content: ""; position: absolute; right: -34px; top: -40px; width: 110px; height: 110px; border-radius: 50%; background: var(--tint, #eef2ff); opacity: .7; }
.stat .label { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 7px; position: relative; z-index: 1; }
.stat .value { font-size: 30px; font-weight: 750; letter-spacing: -1px; margin: 8px 0 2px; position: relative; z-index: 1; font-variant-numeric: tabular-nums; }
.stat .meta { font-size: 12px; color: var(--muted); position: relative; z-index: 1; display: flex; gap: 8px; align-items: center; }
.stat .meta b { color: var(--ink-2); font-weight: 600; }
.stat.primary { --tint: #e0e9ff; } .stat.primary .value { color: var(--primary); }
.stat.success { --tint: #d9f7ec; } .stat.success .value { color: var(--success); }
.stat.warning { --tint: #fef1d5; } .stat.warning .value { color: #b45309; }
.stat.danger { --tint: #fee2e2; } .stat.danger .value { color: var(--danger); }
.stat.neutral { --tint: #e8eef7; }

.dashboard-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 18px; margin-bottom: 18px; }
.dashboard-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.chart-wrap { padding: 14px 16px 10px; }
.chart-legend { display: flex; gap: 16px; font-size: 12px; color: var(--muted); padding: 0 6px 6px; }
.chart-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 6px; }
.chart-labels { display: flex; justify-content: space-between; padding: 4px 8px 0; font-family: var(--mono); font-size: 10px; color: var(--faint); }
.chart-svg { width: 100%; height: 190px; display: block; }
.chart-grid-line { stroke: #eef1f7; stroke-width: 1; }
.chart-axis { fill: #94a3b8; font-size: 10px; font-family: var(--mono); }
.chart-area { fill: url(#areaGrad); }
.chart-line { fill: none; stroke: var(--primary); stroke-width: 2.2; stroke-linecap: round; }
.chart-dot { fill: #fff; stroke: var(--primary); stroke-width: 2; }
.bar-rect { fill: #c7d7ff; rx: 3; transition: fill .15s; }
.bar-rect.ok { fill: var(--primary); }

.quick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.quick-btn {
  text-align: left; padding: 14px; border-radius: 11px; border: 1px solid var(--line); background: var(--surface-2);
  cursor: pointer; transition: .16s; display: flex; gap: 10px; align-items: flex-start; color: var(--ink);
}
.quick-btn:hover { border-color: #bfcdf0; background: var(--primary-soft); transform: translateY(-1px); }
.quick-btn svg { color: var(--primary); margin-top: 2px; }
.quick-btn b { display: block; font-size: 13px; font-weight: 600; }
.quick-btn span { font-size: 11.5px; color: var(--muted); }
.quick-btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }

/* ---------- 表格 ---------- */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: 13px; }
table.table th {
  text-align: left; font-weight: 600; color: var(--muted); font-size: 12px; padding: 11px 14px;
  background: var(--surface-2); border-bottom: 1px solid var(--line); white-space: nowrap;
}
table.table td { padding: 13px 14px; border-bottom: 1px solid #f0f3f8; vertical-align: middle; }
table.table tr:last-child td { border-bottom: none; }
table.table tbody tr:hover { background: #fafbfe; }
table.table .cell-main { font-weight: 600; color: var(--ink); }
table.table .cell-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
table.table .actions { display: flex; gap: 6px; justify-content: flex-end; white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; font-family: var(--mono); font-size: 12px; }
.truncate { max-width: 230px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- 徽标 / 状态 ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 6px;
  font-size: 11.5px; font-weight: 600; background: #eef2f7; color: var(--muted); white-space: nowrap;
}
.badge.success { background: var(--success-soft); color: #047857; }
.badge.warning { background: var(--warning-soft); color: #b45309; }
.badge.danger { background: var(--danger-soft); color: #b91c1c; }
.badge.info { background: #eff6ff; color: #1d4ed8; }
.badge.purple { background: #f5f3ff; color: #6d28d9; }
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 6px; }
.status-dot.online { background: var(--success); box-shadow: 0 0 0 3px rgba(16, 185, 129, .16); }
.status-dot.offline { background: #cbd5e1; box-shadow: 0 0 0 3px rgba(148, 163, 184, .14); }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 38px; padding: 0 15px;
  border-radius: 9px; border: 1px solid transparent; background: var(--primary); color: #fff; font-weight: 600;
  font-size: 13.5px; cursor: pointer; transition: .16s; white-space: nowrap; user-select: none;
}
.btn:hover { background: var(--primary-dark); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn svg { width: 16px; height: 16px; }
.btn.ghost { background: #fff; color: var(--ink-2); border-color: var(--line-strong); }
.btn.ghost:hover { background: var(--surface-2); border-color: #b9c6dd; }
.btn.soft { background: var(--primary-soft); color: var(--primary); }
.btn.soft:hover { background: #e0e8ff; }
.btn.danger { background: var(--danger); }
.btn.danger:hover { background: #dc2626; }
.btn.warn { background: var(--warning); color: #48260a; }
.btn.warn:hover { background: #e08c00; }
.btn.sm { height: 31px; padding: 0 10px; font-size: 12.5px; border-radius: 7px; }
.btn.xs { height: 27px; padding: 0 8px; font-size: 12px; border-radius: 6px; gap: 4px; }
.btn.xs svg { width: 13px; height: 13px; }
.btn.link { background: none; border: none; color: var(--primary); padding: 0 4px; height: auto; }
.btn.link:hover { text-decoration: underline; background: none; }
.icon-action {
  width: 30px; height: 30px; border-radius: 7px; display: inline-grid; place-items: center;
  border: 1px solid transparent; background: transparent; color: var(--muted); cursor: pointer; transition: .15s;
}
.icon-action:hover { background: var(--surface-2); border-color: var(--line); color: var(--ink); }
.icon-action.danger:hover { color: var(--danger); background: var(--danger-soft); }
.icon-action svg { width: 15px; height: 15px; }

/* ---------- 表单 ---------- */
.field { margin-bottom: 16px; }
.field > label { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.field .desc { font-size: 11.5px; color: var(--muted); margin-top: 5px; }
.input, .select, .textarea {
  width: 100%; height: 39px; padding: 0 11px; border-radius: 8px; border: 1px solid var(--line-strong);
  background: #fff; color: var(--ink); outline: none; transition: border .15s, box-shadow .15s;
}
.textarea { height: auto; min-height: 82px; padding: 9px 11px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(47, 91, 234, .12); }
.input::placeholder, .textarea::placeholder { color: #a8b4c8; }
.input:disabled, .select:disabled, .textarea:disabled { background: var(--surface-2); color: var(--muted); cursor: not-allowed; }
.field.inline { display: flex; align-items: center; gap: 10px; margin: 0; }
.field.inline > label { margin: 0; white-space: nowrap; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 16px; }
.form-row { display: flex; gap: 12px; align-items: center; }
.input-sm { height: 32px; font-size: 12.5px; }
.checkbox { display: flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; user-select: none; }
.checkbox input { width: 16px; height: 16px; accent-color: var(--primary); }
.radio-card { border: 1px solid var(--line-strong); border-radius: 11px; padding: 14px; cursor: pointer; display: flex; gap: 11px; align-items: flex-start; transition: .15s; background: #fff; }
.radio-card:hover { border-color: #b9c6dd; }
.radio-card.active { border-color: var(--primary); background: var(--primary-soft); box-shadow: 0 0 0 3px rgba(47, 91, 234, .08); }
.radio-card input { margin-top: 3px; accent-color: var(--primary); }
.radio-card b { display: block; font-size: 13.5px; }
.radio-card span { font-size: 12px; color: var(--muted); }
.switch { position: relative; width: 40px; height: 22px; border-radius: 12px; background: #d5dce9; transition: .2s; cursor: pointer; flex: none; }
.switch::after { content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%; background: #fff; top: 2px; left: 2px; transition: .2s; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.switch.on { background: var(--success); }
.switch.on::after { left: 20px; }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar .search { position: relative; flex: 1; min-width: 190px; max-width: 320px; }
.toolbar .search svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--faint); }
.toolbar .search .input { padding-left: 34px; }
.toolbar .select { width: auto; min-width: 116px; }
.toolbar .spacer { flex: 1; }
.seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 9px; padding: 3px; gap: 3px; }
.seg button { border: none; background: none; height: 30px; padding: 0 13px; border-radius: 7px; font-size: 12.5px; color: var(--muted); cursor: pointer; font-weight: 500; }
.seg button.active { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(15,23,42,.12); font-weight: 600; }

/* ---------- 物料库 ---------- */
.material-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 16px; }
.material-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); transition: .18s; display: flex; flex-direction: column; }
.material-card:hover { transform: translateY(-2px); border-color: #c8d4ee; box-shadow: 0 12px 30px -14px rgba(15,23,42,.22); }
.material-thumb { aspect-ratio: 16/9; background: #0b1222; position: relative; cursor: pointer; overflow: hidden; }
.material-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.material-card:hover .material-thumb img { transform: scale(1.03); }
.material-thumb .placeholder { width: 100%; height: 100%; display: grid; place-items: center; color: #47608a; background: linear-gradient(135deg, #101c33, #1b2c4d); }
.material-thumb .placeholder svg { width: 34px; height: 34px; }
.material-thumb .type-flag { position: absolute; left: 9px; top: 9px; padding: 2px 7px; border-radius: 5px; background: rgba(8, 15, 30, .72); color: #e2e8f0; font-size: 10.5px; display: flex; gap: 4px; align-items: center; backdrop-filter: blur(4px); }
.material-thumb .type-flag svg { width: 11px; height: 11px; }
.material-thumb .type-flag.video { background: rgba(37, 99, 235, .82); }
.material-thumb .hover-actions {
  position: absolute; inset: 0; background: rgba(8, 15, 30, .38); opacity: 0; display: flex; align-items: center; justify-content: center; gap: 8px; transition: .18s;
}
.material-card:hover .hover-actions { opacity: 1; }
.hover-actions .icon-btn { background: rgba(255,255,255,.93); border: none; color: var(--ink); width: 34px; height: 34px; }
.material-info { padding: 12px 13px 11px; flex: 1; display: flex; flex-direction: column; }
.material-title { font-weight: 600; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.material-meta { font-size: 11.5px; color: var(--muted); margin-top: 5px; display: flex; gap: 8px; flex-wrap: wrap; }
.material-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; padding-top: 9px; border-top: 1px solid #f1f4f9; }
.material-foot .used { font-size: 11px; color: var(--faint); }
.material-foot .ops { display: flex; gap: 2px; }
.material-card.disabled .material-thumb { opacity: .5; }
.material-card.deleted { border-style: dashed; }
.upload-zone {
  border: 2px dashed #c4d0e6; border-radius: 12px; padding: 30px 20px; text-align: center; background: var(--surface-2);
  cursor: pointer; transition: .16s;
}
.upload-zone:hover, .upload-zone.drag { border-color: var(--primary); background: var(--primary-soft); }
.upload-zone svg { width: 34px; height: 34px; color: #8aa0c8; margin-bottom: 10px; }
.upload-zone b { display: block; font-size: 14px; }
.upload-zone span { font-size: 12px; color: var(--muted); }
.upload-list { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.upload-item { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 9px; padding: 9px 12px; background: #fff; }
.upload-item .name { flex: 1; min-width: 0; font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upload-item .size { font-size: 11px; color: var(--muted); }
.upload-item .progress { width: 100px; height: 5px; background: #edf1f7; border-radius: 3px; overflow: hidden; }
.upload-item .progress i { display: block; height: 100%; background: var(--primary); border-radius: 3px; transition: width .2s; }
.upload-item.done .progress i { background: var(--success); }
.upload-item.fail .progress i { background: var(--danger); }

/* ---------- 播放方案 ---------- */
.plan-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.plan-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 18px; box-shadow: var(--shadow); transition: .18s; display: flex; flex-direction: column; }
.plan-card:hover { transform: translateY(-2px); border-color: #c8d4ee; }
.plan-card .top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; margin-bottom: 6px; }
.plan-card h3 { margin: 0; font-size: 16px; font-weight: 650; letter-spacing: -.2px; }
.plan-card .desc { color: var(--muted); font-size: 12.5px; min-height: 38px; margin: 4px 0 12px; }
.plan-card .metrics { display: flex; gap: 18px; padding: 11px 0; border-top: 1px solid #f0f3f8; border-bottom: 1px solid #f0f3f8; margin-bottom: 12px; }
.plan-card .metric b { display: block; font-size: 16px; font-variant-numeric: tabular-nums; }
.plan-card .metric span { font-size: 11px; color: var(--muted); }
.plan-card .foot { display: flex; justify-content: space-between; align-items: center; margin-top: auto; gap: 8px; }
.plan-card .foot .ops { display: flex; gap: 4px; }
.version-chip { font-family: var(--mono); font-size: 11px; background: #eef2f7; padding: 2px 7px; border-radius: 5px; color: var(--muted); }

.plan-editor { display: grid; grid-template-columns: 280px minmax(0, 1fr) 292px; gap: 16px; align-items: start; }
.plan-editor .panel { background: #fff; border: 1px solid var(--line); border-radius: 13px; box-shadow: var(--shadow); overflow: hidden; position: sticky; top: 82px; }
.panel-head { padding: 13px 16px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; }
.panel-head h3 { margin: 0; font-size: 13.5px; font-weight: 650; }
.panel-head .hint { font-size: 11px; color: var(--muted); }
.panel-body { padding: 13px 14px; }
.pool-list { max-height: 480px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; }
.pool-item { display: flex; gap: 9px; align-items: center; border: 1px solid var(--line); border-radius: 9px; padding: 7px; cursor: grab; transition: .15s; background: #fff; }
.pool-item:hover { border-color: #b9c9ea; background: var(--surface-2); }
.pool-item .thumb { width: 62px; height: 36px; border-radius: 5px; overflow: hidden; background: #0b1222; flex: none; display: grid; place-items: center; color: #49618a; }
.pool-item .thumb img { width: 100%; height: 100%; object-fit: cover; }
.pool-item .thumb svg { width: 16px; height: 16px; }
.pool-item .meta { min-width: 0; flex: 1; }
.pool-item .meta b { display: block; font-size: 12px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pool-item .meta span { font-size: 10.5px; color: var(--muted); }
.pool-item .add { color: var(--primary); opacity: 0; transition: .15s; }
.pool-item:hover .add { opacity: 1; }

.sequence { background: #fff; border: 1px solid var(--line); border-radius: 13px; box-shadow: var(--shadow); overflow: hidden; }
.seq-header { padding: 14px 18px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.seq-header .title { font-size: 13.5px; font-weight: 650; }
.seq-header .sum { font-size: 11.5px; color: var(--muted); }
.seq-list { padding: 12px; min-height: 320px; display: flex; flex-direction: column; gap: 8px; }
.seq-empty { padding: 70px 20px; text-align: center; color: var(--muted); font-size: 13px; }
.seq-empty svg { width: 38px; height: 38px; color: #b6c4dc; margin-bottom: 10px; }
.seq-item { display: flex; gap: 12px; align-items: center; padding: 9px 10px; border: 1px solid var(--line); border-radius: 10px; background: #fff; transition: .15s; }
.seq-item:hover { border-color: #c8d4ee; background: #fbfcff; }
.seq-item.dragging { opacity: .4; }
.seq-item.drag-over { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(47,91,234,.12); }
.drag-handle { color: #b6c2d8; cursor: grab; display: grid; place-items: center; width: 22px; flex: none; }
.seq-index { width: 23px; height: 23px; border-radius: 6px; background: var(--primary-soft); color: var(--primary); font-size: 11.5px; font-weight: 700; display: grid; place-items: center; flex: none; }
.seq-thumb { width: 74px; height: 42px; border-radius: 6px; overflow: hidden; background: #0b1222; flex: none; display: grid; place-items: center; color: #49618a; }
.seq-thumb img { width: 100%; height: 100%; object-fit: cover; }
.seq-thumb svg { width: 16px; height: 16px; }
.seq-main { flex: 1; min-width: 0; }
.seq-main .name { font-size: 12.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seq-main .tags { margin-top: 4px; display: flex; gap: 6px; align-items: center; }
.seq-config { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.seq-config label { font-size: 11px; color: var(--muted); }
.seq-config .input { height: 30px; width: 68px; font-size: 12px; padding: 0 7px; }
.seq-config .select { height: 30px; width: 88px; font-size: 12px; padding: 0 7px; }
.seq-config .switch { width: 34px; height: 19px; }
.seq-config .switch::after { width: 15px; height: 15px; }
.seq-config .switch.on::after { left: 17px; }
.seq-ops { display: flex; gap: 1px; flex: none; }
.rules-panel .field { margin-bottom: 14px; }
.summary-box { background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; font-size: 12px; }
.summary-box .row { display: flex; justify-content: space-between; padding: 3px 0; color: var(--muted); }
.summary-box .row b { color: var(--ink-2); font-weight: 600; }

/* ---------- TV 预览 ---------- */
.tv-stage {
  position: relative; width: 100%; aspect-ratio: 16/9; background: #000; border-radius: 10px; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.tv-stage img, .tv-stage video { width: 100%; height: 100%; object-fit: contain; position: absolute; inset: 0; }
.tv-slide { width: 100%; height: 100%; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: #000; }
.tv-slide.show-fade { animation: tvFade .6s ease both; }
.tv-slide.show-slide { animation: tvSlide .5s ease both; }
@keyframes tvFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes tvSlide { from { opacity: 0; transform: translateX(28px); } to { opacity: 1; transform: none; } }
.tv-overlay-bar { position: absolute; left: 0; right: 0; bottom: 0; padding: 24px 18px 14px; background: linear-gradient(transparent, rgba(0,0,0,.72)); display: flex; align-items: center; gap: 10px; color: #fff; z-index: 3; }
.tv-overlay-bar .btn { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.2); color: #fff; }
.tv-overlay-bar .name { font-size: 12.5px; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tv-progress { position: absolute; left: 0; top: 0; height: 3px; background: var(--primary); z-index: 4; transition: width .1s linear; }
.tv-badge { position: absolute; top: 12px; left: 14px; font-size: 10.5px; letter-spacing: 1px; color: rgba(255,255,255,.65); z-index: 3; display: flex; gap: 6px; align-items: center; }
.tv-badge .dot { width: 6px; height: 6px; border-radius: 50%; background: #ef4444; }

/* ---------- 设备 ---------- */
.device-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 16px; align-items: start; }
.group-tree { background: #fff; border: 1px solid var(--line); border-radius: 13px; box-shadow: var(--shadow); overflow: hidden; }
.group-tree .panel-head { padding: 13px 14px; }
.group-node { display: flex; align-items: center; gap: 8px; padding: 9px 10px; border-radius: 8px; cursor: pointer; font-size: 13px; color: var(--ink-2); margin-bottom: 2px; }
.group-node:hover { background: var(--surface-2); }
.group-node.active { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.group-node .count { margin-left: auto; font-size: 11px; color: var(--muted); background: #eef2f7; padding: 0 6px; border-radius: 8px; }
.group-node .g-ops { display: none; gap: 2px; }
.group-node:hover .g-ops { display: flex; }
.group-node.active .count { background: #dbe5ff; color: var(--primary); }
.group-node.child { padding-left: 28px; font-size: 12.5px; }
.disk-bar { width: 82px; height: 5px; background: #edf1f7; border-radius: 3px; overflow: hidden; display: inline-block; vertical-align: middle; }
.disk-bar i { display: block; height: 100%; background: var(--success); border-radius: 3px; }
.disk-bar.warn i { background: var(--warning); }
.disk-bar.danger i { background: var(--danger); }
.device-name { display: flex; align-items: center; gap: 8px; }
.device-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.device-dot.online { background: var(--success); box-shadow: 0 0 0 3px rgba(16,185,129,.15); }
.device-dot.offline { background: #cbd5e1; }

/* ---------- 发布 ---------- */
.task-table td { vertical-align: middle; }
.task-progress { width: 170px; }
.task-progress .bar { height: 6px; border-radius: 4px; background: #edf1f7; overflow: hidden; display: flex; }
.task-progress .bar i { display: block; height: 100%; }
.task-progress .bar i.ok { background: var(--success); }
.task-progress .bar i.fail { background: var(--danger); }
.task-progress .nums { display: flex; gap: 8px; font-size: 11px; color: var(--muted); margin-top: 4px; }
.target-list { display: flex; flex-direction: column; gap: 6px; max-height: 340px; overflow-y: auto; }
.target-row { display: flex; align-items: center; gap: 10px; padding: 8px 11px; border: 1px solid var(--line); border-radius: 8px; font-size: 12.5px; }
.target-row .dev { flex: 1; min-width: 0; }
.target-row .dev b { font-weight: 600; }
.target-row .dev span { display: block; color: var(--muted); font-size: 11px; }
.scope-picker { border: 1px solid var(--line); border-radius: 10px; max-height: 220px; overflow-y: auto; padding: 6px; }
.scope-item { display: flex; align-items: center; gap: 9px; padding: 8px 9px; border-radius: 7px; cursor: pointer; font-size: 13px; }
.scope-item:hover { background: var(--surface-2); }
.scope-item input { accent-color: var(--primary); }

/* ---------- 日志 / 告警 ---------- */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.tab { padding: 10px 16px; font-size: 13.5px; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; font-weight: 500; }
.tab:hover { color: var(--ink); }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }
.alert-list { display: flex; flex-direction: column; gap: 10px; }
.alert-item { display: flex; gap: 12px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 11px; background: #fff; align-items: flex-start; }
.alert-item.unread { background: #fffdf8; border-color: #f3e3bd; }
.alert-icon { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; flex: none; background: var(--warning-soft); color: #b45309; }
.alert-icon.critical { background: var(--danger-soft); color: var(--danger); }
.alert-icon.info { background: #eff6ff; color: var(--primary); }
.alert-main { flex: 1; min-width: 0; }
.alert-main .title { font-weight: 600; font-size: 13.5px; }
.alert-main .desc { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.alert-main .time { font-size: 11px; color: var(--faint); margin-top: 5px; font-family: var(--mono); }
.alert-ops { display: flex; gap: 6px; align-items: center; }

/* ---------- 设置 ---------- */
.settings-layout { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 20px; align-items: start; }
.settings-nav { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 8px; box-shadow: var(--shadow); position: sticky; top: 82px; }
.settings-nav a { display: flex; align-items: center; gap: 9px; padding: 10px 11px; border-radius: 8px; color: var(--ink-2); font-size: 13px; margin-bottom: 2px; }
.settings-nav a:hover { background: var(--surface-2); }
.settings-nav a.active { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.mode-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 18px; }
.mode-card { border: 1.5px solid var(--line-strong); border-radius: 12px; padding: 16px; cursor: pointer; transition: .16s; background: #fff; position: relative; }
.mode-card:hover { border-color: #b9c6dd; }
.mode-card.active { border-color: var(--primary); background: linear-gradient(180deg, #f7f9ff, #fff); box-shadow: 0 0 0 3px rgba(47,91,234,.08); }
.mode-card .icon { width: 36px; height: 36px; border-radius: 9px; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; margin-bottom: 10px; }
.mode-card.cloud .icon { background: #e0f2fe; color: #0284c7; }
.mode-card b { font-size: 14px; display: block; }
.mode-card p { font-size: 11.5px; color: var(--muted); margin: 4px 0 0; line-height: 1.5; }
.mode-card .rec { position: absolute; right: 12px; top: 12px; font-size: 10px; background: var(--success-soft); color: #047857; padding: 1px 6px; border-radius: 5px; font-weight: 600; }
.note-box { display: flex; gap: 10px; padding: 12px 14px; border-radius: 10px; background: #f0f6ff; border: 1px solid #d5e4ff; color: #31558f; font-size: 12.5px; line-height: 1.6; }
.note-box svg { color: #4c7fd6; margin-top: 2px; }
.note-box.warn { background: var(--warning-soft); border-color: #f3e3bd; color: #8a5a00; }
.note-box.warn svg { color: #b45309; }
.form-section { border-top: 1px solid var(--line); margin-top: 20px; padding-top: 18px; }
.form-section h4 { font-size: 13px; margin: 0 0 14px; color: var(--ink-2); }
.inline-note { font-size: 11.5px; color: var(--muted); }

/* ---------- 弹窗 ---------- */
.modal-mask {
  position: fixed; inset: 0; background: rgba(9, 16, 30, .46); backdrop-filter: blur(3px); z-index: 100;
  display: flex; align-items: flex-start; justify-content: center; padding: 5vh 18px; overflow-y: auto; animation: fadeIn .16s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  width: 560px; max-width: 100%; background: #fff; border-radius: 16px; box-shadow: var(--shadow-lg);
  animation: modalIn .18s cubic-bezier(.2,.8,.3,1); display: flex; flex-direction: column; max-height: 90vh;
}
@keyframes modalIn { from { opacity: 0; transform: translateY(10px) scale(.99); } to { opacity: 1; transform: none; } }
.modal.wide { width: 860px; }
.modal.slim { width: 430px; }
.modal-head { padding: 18px 22px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.modal-head h3 { margin: 0; font-size: 16px; font-weight: 650; }
.modal-head .sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.modal-body { padding: 20px 22px; overflow-y: auto; }
.modal-foot { padding: 14px 22px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 10px; align-items: center; }
.modal-foot .left { margin-right: auto; }
.modal-close { width: 30px; height: 30px; border-radius: 7px; border: none; background: transparent; color: var(--muted); cursor: pointer; display: grid; place-items: center; }
.modal-close:hover { background: var(--surface-2); color: var(--ink); }
.confirm-icon { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; margin-bottom: 12px; background: var(--warning-soft); color: #b45309; }
.confirm-icon.danger { background: var(--danger-soft); color: var(--danger); }
.confirm-text { font-size: 13.5px; color: var(--ink-2); line-height: 1.7; }
.confirm-text b { color: var(--ink); }

.drawer-mask { position: fixed; inset: 0; background: rgba(9, 16, 30, .35); z-index: 100; animation: fadeIn .16s ease; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: 540px; max-width: 100%; background: #fff; z-index: 101;
  box-shadow: -20px 0 60px -20px rgba(15,23,42,.3); display: flex; flex-direction: column; animation: drawerIn .22s ease;
}
@keyframes drawerIn { from { transform: translateX(30px); opacity: .6; } to { transform: none; opacity: 1; } }
.drawer-head { padding: 18px 22px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.drawer-head h3 { margin: 0; font-size: 17px; }
.drawer-head .sub { font-size: 12px; color: var(--muted); margin-top: 2px; font-family: var(--mono); }
.drawer-body { padding: 20px 22px; overflow-y: auto; flex: 1; }
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; }
.info-item { font-size: 12.5px; }
.info-item label { display: block; color: var(--muted); font-size: 11.5px; margin-bottom: 2px; }
.info-item b { font-weight: 600; color: var(--ink); word-break: break-all; }
.section-title { font-size: 12px; text-transform: uppercase; letter-spacing: 1px; color: var(--faint); margin: 22px 0 10px; font-weight: 600; }
.screenshot-box { border-radius: 10px; overflow: hidden; background: #0b1222; aspect-ratio: 16/9; display: grid; place-items: center; color: #46608a; border: 1px solid var(--line); }
.screenshot-box img { width: 100%; height: 100%; object-fit: cover; }
.mini-log { font-size: 12px; border-left: 2px solid var(--line); padding: 0 0 0 12px; margin-bottom: 10px; }
.mini-log .t { font-family: var(--mono); font-size: 10.5px; color: var(--faint); }
.mini-log .m { color: var(--ink-2); }
.code-box { background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; font-family: var(--mono); font-size: 12px; word-break: break-all; color: var(--ink-2); }
.qr-box { display: flex; gap: 20px; align-items: center; }
.qr-canvas { background: #fff; padding: 10px; border-radius: 12px; border: 1px solid var(--line); flex: none; }
.qr-canvas img, .qr-canvas canvas { display: block; }
.bind-code { font-family: var(--mono); font-size: 32px; letter-spacing: 7px; font-weight: 700; color: var(--primary); background: var(--primary-soft); padding: 14px 18px; border-radius: 10px; text-align: center; }

/* ---------- 分页 / 空态 ---------- */
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 2px 0; font-size: 12.5px; color: var(--muted); }
.pagination .pages { display: flex; gap: 4px; }
.page-btn { min-width: 30px; height: 30px; padding: 0 8px; border-radius: 7px; border: 1px solid var(--line); background: #fff; color: var(--ink-2); cursor: pointer; font-size: 12.5px; }
.page-btn:hover:not(:disabled) { border-color: var(--line-strong); background: var(--surface-2); }
.page-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }
.page-btn:disabled { opacity: .45; cursor: not-allowed; }
.empty { padding: 56px 20px; text-align: center; color: var(--muted); }
.empty svg { width: 42px; height: 42px; color: #c0cce1; margin-bottom: 10px; }
.empty b { display: block; color: var(--ink-2); font-size: 14px; margin-bottom: 4px; }
.empty span { font-size: 12.5px; }

/* ---------- Toast / Loading ---------- */
.toast-root { position: fixed; top: 20px; right: 20px; z-index: 200; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast {
  min-width: 240px; max-width: 380px; padding: 11px 14px; border-radius: 10px; background: #0f172a; color: #fff;
  font-size: 13px; box-shadow: 0 12px 30px -8px rgba(15,23,42,.4); display: flex; align-items: flex-start; gap: 9px;
  animation: toastIn .2s ease; pointer-events: auto;
}
.toast.success { background: #065f46; }
.toast.error { background: #991b1b; }
.toast.warn { background: #92400e; }
.toast svg { width: 16px; height: 16px; margin-top: 2px; }
@keyframes toastIn { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }
.spinner { width: 18px; height: 18px; border: 2px solid rgba(255,255,255,.3); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
.spinner.dark { border-color: #dbe3f2; border-top-color: var(--primary); }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-block { padding: 60px; display: grid; place-items: center; }
.skeleton { background: linear-gradient(90deg, #eef1f6 25%, #f7f9fc 37%, #eef1f6 63%); background-size: 400% 100%; animation: shimmer 1.3s ease infinite; border-radius: 8px; }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }

/* ---------- 响应式 ---------- */
@media (max-width: 1400px) {
  .stat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .plan-editor { grid-template-columns: 250px minmax(0, 1fr); }
  .plan-editor .rules-panel { grid-column: 1 / -1; position: static; }
  .plan-editor .rules-panel .panel-body { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
}
@media (max-width: 1180px) {
  .sidebar { width: 212px; }
  .brand-text span { display: none; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .dashboard-grid-2 { grid-template-columns: 1fr; }
  .plan-editor { grid-template-columns: 220px minmax(0, 1fr); }
  .seq-config { display: none; }
}
@media (max-width: 900px) {
  .login-wrap { grid-template-columns: 1fr; }
  .login-brand { display: none; }
  .app { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: static; flex-direction: row; align-items: center; padding: 0 10px; }
  .brand { padding: 10px; }
  .brand-text, .sidebar-foot { display: none; }
  .nav { display: flex; padding: 6px; overflow-x: auto; }
  .nav-group { display: contents; }
  .nav-group-title { display: none; }
  .nav-item { white-space: nowrap; padding: 8px 10px; margin: 0; }
  .nav-item span { display: none; }
  .nav-item.active::before { display: none; }
  .topbar { padding: 0 16px; }
  .server-clock { display: none; }
  .view { padding: 18px 16px 40px; }
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .device-layout { grid-template-columns: 1fr; }
  .settings-layout { grid-template-columns: 1fr; }
  .settings-nav { position: static; display: flex; overflow-x: auto; }
  .plan-editor { grid-template-columns: 1fr; }
  .plan-editor .panel { position: static; }
  .mode-grid { grid-template-columns: 1fr; }
  .drawer { width: 100%; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .qr-box { flex-direction: column; align-items: flex-start; }
}
