:root {
  --bg: #eef2f6;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --sidebar: #0d1526;
  --sidebar-soft: #172036;
  --text: #0f172a;
  --muted: #64748b;
  --faint: #94a3b8;
  --border: #e2e8f0;
  --brand: #10b981;
  --brand-dark: #059669;
  --brand-soft: #e7f7f0;
  --warn: #f59e0b;
  --warn-soft: #fef3c7;
  --danger: #ef4444;
  --danger-soft: #fee2e2;
  --info: #3b82f6;
  --info-soft: #dbeafe;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 8px 24px -16px rgba(15, 23, 42, .35);
  --mono: "SFMono-Regular", "JetBrains Mono", Consolas, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--brand-dark); text-decoration: none; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); }

/* ------------------------------------------------------------ 登录 */
.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr .9fr;
}
.login-brand {
  background: var(--sidebar);
  color: #e5edf8;
  padding: 64px 60px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}
.login-brand::after {
  content: "";
  position: absolute;
  width: 520px; height: 520px;
  border-radius: 50%;
  border: 1px solid rgba(16, 185, 129, .25);
  right: -180px; bottom: -180px;
  box-shadow: 0 0 0 80px rgba(16, 185, 129, .05), 0 0 0 160px rgba(16, 185, 129, .03);
}
.login-brand h1 {
  font-size: 34px;
  line-height: 1.25;
  margin: 18px 0 14px;
  letter-spacing: .5px;
}
.login-brand p { color: #94a3b8; line-height: 1.8; max-width: 460px; margin: 0; }
.login-features { display: grid; gap: 14px; margin-top: 36px; position: relative; z-index: 1; }
.login-feature { display: flex; gap: 12px; align-items: flex-start; color: #cbd5e1; }
.login-feature b { color: #f1f5f9; font-weight: 600; display: block; margin-bottom: 2px; }
.login-feature span { font-size: 13px; color: #94a3b8; }
.login-feature i {
  width: 28px; height: 28px; flex: none;
  border-radius: 8px;
  background: rgba(16, 185, 129, .16);
  color: var(--brand);
  display: grid; place-items: center;
  font-style: normal; font-size: 14px;
}
.brand-mark { display: flex; align-items: center; gap: 12px; font-weight: 700; font-size: 17px; }
.brand-logo {
  width: 38px; height: 38px; border-radius: 10px;
  background: var(--brand);
  color: #052e1d;
  display: grid; place-items: center;
  font-weight: 800;
}
.login-form-wrap {
  display: grid;
  place-items: center;
  padding: 40px;
  background: var(--surface);
}
.login-form { width: 100%; max-width: 360px; }
.login-form h2 { margin: 0 0 8px; font-size: 24px; }
.login-form .sub { color: var(--muted); margin: 0 0 28px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 7px; color: #334155; }
.input, .select {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.input:focus, .select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, .15);
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 38px;
  padding: 0 16px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface);
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
  transition: all .15s;
  white-space: nowrap;
}
.btn:hover { border-color: #cbd5e1; background: var(--surface-2); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover { background: #dc2626; }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: var(--surface-2); }
.btn-sm { height: 30px; padding: 0 10px; font-size: 12px; border-radius: 7px; }
.btn-block { width: 100%; height: 44px; }
.login-hint {
  margin-top: 22px;
  padding: 12px 14px;
  background: var(--surface-2);
  border: 1px dashed var(--border);
  border-radius: 9px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

/* ------------------------------------------------------------ 布局 */
.app-shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 232px;
  flex: none;
  background: var(--sidebar);
  color: #cbd5e1;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}
.sidebar .brand-mark { padding: 22px 20px; color: #f8fafc; border-bottom: 1px solid rgba(148,163,184,.12); }
.nav { padding: 16px 12px; display: grid; gap: 4px; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  height: 42px;
  padding: 0 12px;
  border-radius: 9px;
  color: #94a3b8;
  cursor: pointer;
  font-weight: 500;
  border: none;
  background: none;
  text-align: left;
  width: 100%;
  transition: background .15s, color .15s;
}
.nav-item:hover { background: var(--sidebar-soft); color: #e2e8f0; }
.nav-item.active { background: rgba(16, 185, 129, .14); color: #6ee7b7; }
.nav-item .ico { width: 18px; text-align: center; font-size: 15px; }
.nav-item .pill {
  margin-left: auto;
  background: var(--danger);
  color: #fff;
  font-size: 11px;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  padding: 0 5px;
}
.sidebar-foot { margin-top: auto; padding: 16px; border-top: 1px solid rgba(148,163,184,.12); }
.side-status { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #94a3b8; margin-bottom: 10px; }
.user-chip { display: flex; align-items: center; gap: 10px; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: #1f2c45; color: #6ee7b7;
  display: grid; place-items: center; font-weight: 700; font-size: 13px;
}
.user-chip .name { color: #e2e8f0; font-weight: 600; font-size: 13px; }
.user-chip .role { color: #94a3b8; font-size: 11px; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 64px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 20;
}
.topbar h2 { font-size: 17px; margin: 0; }
.topbar .spacer { flex: 1; }
.topbar .clock { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.content { padding: 22px 24px 40px; }
.page { display: none; }
.page.active { display: block; }

/* ------------------------------------------------------------ 通用块 */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card-head {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
}
.card-head h3 { margin: 0; font-size: 14px; }
.card-head .spacer { flex: 1; }
.card-body { padding: 18px; }
.grid-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow);
}
.stat .label { color: var(--muted); font-size: 12px; margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }
.stat .value { font-size: 26px; font-weight: 700; letter-spacing: -.5px; }
.stat .value small { font-size: 12px; font-weight: 500; color: var(--muted); margin-left: 4px; }
.stat .foot { color: var(--faint); font-size: 12px; margin-top: 6px; }
.stat.green .value { color: var(--brand-dark); }
.stat.amber .value { color: #b45309; }
.stat.red .value { color: var(--danger); }
.stat.blue .value { color: #2563eb; }

.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar .spacer { flex: 1; }
.seg { display: inline-flex; background: var(--surface); border: 1px solid var(--border); border-radius: 9px; padding: 3px; }
.seg button {
  border: none; background: none; height: 30px; padding: 0 13px;
  border-radius: 6px; cursor: pointer; color: var(--muted); font-weight: 600; font-size: 12px;
}
.seg button.active { background: var(--text); color: #fff; }
.toggle { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.switch { position: relative; width: 38px; height: 22px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span {
  position: absolute; inset: 0; background: #cbd5e1; border-radius: 11px; cursor: pointer; transition: .2s;
}
.switch span::before {
  content: ""; position: absolute; width: 18px; height: 18px; left: 2px; top: 2px;
  background: #fff; border-radius: 50%; transition: .2s;
}
.switch input:checked + span { background: var(--brand); }
.switch input:checked + span::before { transform: translateX(16px); }

.badge {
  display: inline-flex; align-items: center; gap: 5px;
  height: 22px; padding: 0 8px; border-radius: 6px;
  font-size: 11px; font-weight: 600;
  background: var(--surface-2); color: var(--muted);
}
.badge.online { background: var(--brand-soft); color: #047857; }
.badge.away { background: var(--warn-soft); color: #b45309; }
.badge.alert { background: var(--danger-soft); color: #b91c1c; }
.badge.offline { background: #f1f5f9; color: #64748b; }
.badge.info { background: var(--info-soft); color: #1d4ed8; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; display: inline-block; }
.dot.pulse { animation: pulse 1.8s infinite; }
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .3; }
}

.empty {
  padding: 46px 20px;
  text-align: center;
  color: var(--faint);
  font-size: 13px;
}
.empty b { display: block; color: var(--muted); margin-bottom: 6px; font-size: 14px; }

/* ------------------------------------------------------------ 宫格 */
.alert-strip {
  display: flex; align-items: center; gap: 10px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #9a3412;
  padding: 10px 14px;
  border-radius: 10px;
  margin-bottom: 14px;
  font-size: 13px;
}
.alert-strip b { font-weight: 700; }
.alert-strip .spacer { flex: 1; }
.video-grid { display: grid; gap: 12px; }
.video-grid.g9 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.video-grid.g16 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tile {
  position: relative;
  background: #0b1220;
  border-radius: 10px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 1px solid #1e293b;
  cursor: pointer;
  transition: border-color .15s, transform .15s;
}
.tile:hover { border-color: #334155; }
.tile.alert { border-color: var(--danger); box-shadow: 0 0 0 2px rgba(239, 68, 68, .25); }
.tile.focused { border-color: var(--brand); box-shadow: 0 0 0 2px rgba(16, 185, 129, .35); }
.tile video { width: 100%; height: 100%; object-fit: cover; background: #0b1220; display: block; }
.tile .agora-stage { position: absolute; inset: 0; }
.tile .agora-stage video { width: 100%; height: 100%; object-fit: cover; background: #0b1220; display: block; }
.tile .placeholder {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  color: #475569; font-size: 12px; text-align: center; gap: 6px;
  background: repeating-linear-gradient(45deg, #0b1220, #0b1220 12px, #0d1526 12px, #0d1526 24px);
}
.tile .placeholder .big { font-size: 22px; margin-bottom: 4px; }
.tile-top {
  position: absolute; top: 0; left: 0; right: 0;
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px;
  background: linear-gradient(180deg, rgba(2,6,23,.82), rgba(2,6,23,0));
  color: #e2e8f0;
  font-size: 12px;
  pointer-events: none;
}
.tile-top .code { font-weight: 700; letter-spacing: .3px; }
.tile-top .name { color: #94a3b8; font-size: 11px; }
.tile-top .spacer { flex: 1; }
.tile-bottom {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px;
  background: linear-gradient(0deg, rgba(2,6,23,.85), rgba(2,6,23,0));
  color: #cbd5e1;
  font-size: 11px;
  pointer-events: none;
}
.tile-bottom .spacer { flex: 1; }
.tile .live-tag {
  display: inline-flex; align-items: center; gap: 5px;
  color: #6ee7b7; font-weight: 600;
}
.tile .live-tag .dot { animation: pulse 1.6s infinite; }
.tile .faces { color: #94a3b8; }
.tile .faces b { color: #e2e8f0; }
.tile .conn {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  color: #94a3b8; font-size: 12px; background: rgba(2,6,23,.75);
  padding: 6px 12px; border-radius: 20px; pointer-events: none;
}

/* ------------------------------------------------------------ 表格 */
.table-wrap { overflow: auto; border-radius: 10px; border: 1px solid var(--border); }
table.data { width: 100%; border-collapse: collapse; font-size: 13px; background: var(--surface); }
table.data th {
  text-align: left; padding: 11px 14px;
  background: var(--surface-2); color: var(--muted);
  font-weight: 600; font-size: 12px; white-space: nowrap;
  border-bottom: 1px solid var(--border);
}
table.data td { padding: 11px 14px; border-bottom: 1px solid #f1f5f9; }
table.data tr:last-child td { border-bottom: none; }
table.data tr:hover td { background: #fbfdff; }
table.data .num { font-family: var(--mono); }

/* ------------------------------------------------------------ 事件 */
.event-list { display: grid; gap: 10px; }
.event-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 13px 15px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
}
.event-item.warning { border-left: 3px solid var(--warn); }
.event-item.critical { border-left: 3px solid var(--danger); }
.event-item.info { border-left: 3px solid var(--info); }
.event-item .eicon {
  width: 32px; height: 32px; border-radius: 8px; flex: none;
  display: grid; place-items: center; font-size: 14px;
  background: var(--warn-soft); color: #b45309;
}
.event-item.critical .eicon { background: var(--danger-soft); color: #b91c1c; }
.event-item.info .eicon { background: var(--info-soft); color: #1d4ed8; }
.event-item .etitle { font-weight: 600; margin-bottom: 3px; }
.event-item .emeta { color: var(--faint); font-size: 12px; }
.event-item .spacer { flex: 1; }
.event-item .thumb {
  width: 92px; height: 54px; object-fit: cover; border-radius: 6px;
  border: 1px solid var(--border); background: #f1f5f9;
}

/* ------------------------------------------------------------ 回放 */
.playback-layout { display: grid; grid-template-columns: 1.6fr 1fr; gap: 16px; align-items: start; }
.player-box { background: #0b1220; border-radius: 10px; overflow: hidden; aspect-ratio: 16/9; }
.player-box video { width: 100%; height: 100%; display: block; }

/* ------------------------------------------------------------ 报表 */
.bars { display: flex; align-items: flex-end; gap: 8px; height: 170px; padding-top: 10px; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; }
.bar-wrap { width: 100%; flex: 1; display: flex; align-items: flex-end; justify-content: center; }
.bar {
  width: 70%; max-width: 42px;
  background: var(--brand);
  border-radius: 5px 5px 2px 2px;
  min-height: 3px;
  position: relative;
  transition: height .4s ease;
}
.bar:hover { background: var(--brand-dark); }
.bar .tip {
  position: absolute; bottom: calc(100% + 5px); left: 50%; transform: translateX(-50%);
  background: var(--text); color: #fff; padding: 3px 7px; border-radius: 5px;
  font-size: 11px; white-space: nowrap; opacity: 0; pointer-events: none; transition: .15s;
}
.bar:hover .tip { opacity: 1; }
.bar-col .blabel { font-size: 11px; color: var(--faint); }
.legend { display: grid; gap: 9px; }
.legend-row { display: flex; align-items: center; gap: 9px; font-size: 13px; }
.legend-row .swatch { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.legend-row .spacer { flex: 1; }
.legend-row .pct { font-family: var(--mono); color: var(--muted); }

/* ------------------------------------------------------------ 系统 */
.kv-list { display: grid; gap: 0; }
.kv-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid #f1f5f9; font-size: 13px; }
.kv-row:last-child { border-bottom: none; }
.kv-row .k { color: var(--muted); min-width: 120px; }
.kv-row .v { font-weight: 500; }
.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.settings-grid .field { margin: 0; }
.help { color: var(--faint); font-size: 11px; margin-top: 4px; line-height: 1.5; }

/* ------------------------------------------------------------ 弹窗 & 提示 */
.modal {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(2, 6, 23, .72);
  display: grid; place-items: center;
  padding: 28px;
  backdrop-filter: blur(2px);
}
.modal-card {
  width: min(1080px, 94vw);
  background: #0b1220;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 30px 80px -20px rgba(0,0,0,.6);
}
.modal-head {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px; color: #e2e8f0;
  border-bottom: 1px solid #1e293b;
  background: #0d1526;
}
.modal-head h3 { margin: 0; font-size: 15px; }
.modal-head .spacer { flex: 1; }
.modal-head .btn { background: #1e293b; border-color: #1e293b; color: #cbd5e1; }
.modal-video { position: relative; aspect-ratio: 16/9; background: #000; }
.modal-video .agora-stage { position: absolute; inset: 0; }
.modal-video .agora-stage video { width: 100%; height: 100%; object-fit: contain; background: #000; display: block; }
.modal-video video { width: 100%; height: 100%; display: block; }
.toast {
  position: fixed; right: 22px; bottom: 22px; z-index: 120;
  background: var(--text); color: #fff;
  padding: 11px 16px; border-radius: 9px;
  font-size: 13px; box-shadow: 0 12px 30px -10px rgba(0,0,0,.4);
  max-width: 360px;
  animation: toast-in .2s ease;
}
.toast.error { background: #b91c1c; }
.toast.ok { background: #047857; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ------------------------------------------------------------ 坐席工作台 */
.seat-shell { min-height: 100vh; background: #0b1220; color: #e2e8f0; }
.seat-top {
  height: 62px; display: flex; align-items: center; gap: 14px;
  padding: 0 22px; border-bottom: 1px solid #1e293b; background: #0d1526;
}
.seat-top .brand-mark { font-size: 15px; }
.seat-top .spacer { flex: 1; }
.seat-top .who { font-size: 12px; color: #94a3b8; }
.seat-main { max-width: 1280px; margin: 0 auto; padding: 22px; display: grid; grid-template-columns: 1.5fr 1fr; gap: 18px; }
.seat-preview {
  background: #000; border-radius: 12px; overflow: hidden; aspect-ratio: 16/9;
  position: relative; border: 1px solid #1e293b;
}
.seat-preview video { width: 100%; height: 100%; object-fit: cover; display: block; transform: scaleX(-1); }
.seat-preview .agora-stage { position: absolute; inset: 0; }
.seat-preview .agora-stage video { width: 100%; height: 100%; object-fit: cover; display: block; transform: scaleX(-1); }
.seat-preview .preview-tag {
  position: absolute; left: 12px; top: 12px;
  background: rgba(2,6,23,.7); color: #cbd5e1; font-size: 11px;
  padding: 4px 9px; border-radius: 20px;
}
.seat-preview .preview-tag.rec { color: #fca5a5; }
.seat-panel { display: grid; gap: 14px; align-content: start; }
.panel {
  background: #101a2d; border: 1px solid #1e293b; border-radius: 12px; padding: 16px;
}
.panel h3 { margin: 0 0 12px; font-size: 13px; color: #94a3b8; font-weight: 600; letter-spacing: .3px; }
.panel .field label { color: #94a3b8; }
.panel .input, .panel .select { background: #0b1220; border-color: #263449; color: #e2e8f0; }
.panel .input:focus, .panel .select:focus { border-color: var(--brand); }
.status-list { display: grid; gap: 0; }
.status-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid #1b2740; font-size: 13px; }
.status-row:last-child { border-bottom: none; }
.status-row .k { color: #94a3b8; flex: 1; }
.status-row .v { font-family: var(--mono); font-size: 12px; color: #e2e8f0; }
.status-row .v.ok { color: #6ee7b7; }
.status-row .v.bad { color: #fca5a5; }
.seat-actions { display: grid; gap: 10px; }
.btn-lg { height: 48px; font-size: 15px; border-radius: 10px; }
.btn-xl { height: 54px; font-size: 16px; border-radius: 11px; width: 100%; }
.notice { color: #94a3b8; font-size: 12px; line-height: 1.7; margin: 0; }
.seat-events { max-height: 220px; overflow: auto; display: grid; gap: 8px; }
.seat-event {
  display: flex; gap: 9px; align-items: center;
  font-size: 12px; color: #cbd5e1;
  padding: 8px 10px; background: #0b1220; border-radius: 8px;
  border-left: 2px solid var(--warn);
}
.seat-event.info { border-left-color: var(--info); }
.seat-event span.time { color: #64748b; font-family: var(--mono); font-size: 11px; }
.seat-footer { text-align: center; color: #475569; font-size: 11px; padding: 10px 0 26px; }
.seat-mine {
  max-width: 1280px; margin: 0 auto; padding: 0 22px 8px;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px;
}
.mine-span-2 { grid-column: span 2; }
.mine-stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.mine-stat { background: #0b1220; border: 1px solid #1b2740; border-radius: 10px; padding: 12px 14px; }
.mine-stat .k { display: block; color: #94a3b8; font-size: 12px; margin-bottom: 6px; }
.mine-stat .v { font-size: 19px; font-weight: 700; color: #e2e8f0; letter-spacing: -.3px; }
.mine-list { max-height: 250px; overflow: auto; display: grid; gap: 8px; align-content: start; }
.mine-item {
  background: #0b1220; border: 1px solid #16233a; border-left: 3px solid #334155;
  border-radius: 8px; padding: 9px 11px;
  display: flex; gap: 10px; align-items: center; font-size: 12px; color: #cbd5e1;
}
.mine-item .grow { flex: 1; min-width: 0; }
.mine-item .title { color: #e2e8f0; font-weight: 600; }
.mine-item .sub { color: #64748b; font-size: 11px; margin-top: 3px; line-height: 1.5; }
.mine-item .tag { flex: none; font-size: 11px; padding: 2px 7px; border-radius: 5px; background: #1b2740; color: #94a3b8; }
.mine-item .tag.ok { background: #0f2f24; color: #6ee7b7; }
.mine-item .tag.warn { background: #3a2a10; color: #fbbf24; }
.mine-item .tag.bad { background: #3b1212; color: #fca5a5; }
.mine-item .btn-sm { flex: none; background: #16233a; border-color: #263449; color: #cbd5e1; }
.mine-item .btn-sm:hover { background: #1e2f4a; }
.mine-form { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.mine-form .field { margin: 0; }
.mine-form .input { background: #0b1220; border-color: #263449; color: #e2e8f0; }
.mine-form .field label { color: #94a3b8; }
.mine-modal {
  position: fixed; inset: 0; z-index: 200; padding: 22px;
  background: rgba(3, 7, 18, .74);
  display: grid; place-items: center;
}
.mine-modal.hidden { display: none; }
.mine-modal-box {
  width: min(880px, 96vw); max-height: 88vh; overflow: auto;
  background: #0f172a; border: 1px solid #263449; border-radius: 14px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .55); color: #e2e8f0;
}
.mine-modal-head {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 18px; border-bottom: 1px solid #1b2740; font-size: 14px;
}
.mine-modal-head .spacer { flex: 1; }
.mine-modal-head .btn-sm { background: #16233a; border-color: #263449; color: #cbd5e1; }
.mine-modal-body { padding: 16px 18px; }
.mine-modal-foot { padding: 0 18px 18px; display: flex; gap: 10px; flex-wrap: wrap; }
.mine-modal-body video { width: 100%; max-height: 360px; border-radius: 10px; background: #000; margin-bottom: 14px; }
.quiz-q { margin-bottom: 14px; }
.quiz-q .q { font-size: 13px; color: #e2e8f0; margin-bottom: 8px; line-height: 1.6; }
.quiz-q label {
  display: flex; gap: 8px; align-items: flex-start;
  padding: 8px 10px; margin-bottom: 6px; border-radius: 8px;
  background: #0b1220; border: 1px solid #16233a; cursor: pointer; font-size: 12px; color: #cbd5e1;
}
.quiz-q label:hover { border-color: #334155; }
.quiz-q input { margin-top: 2px; accent-color: #10b981; }
.quiz-result { padding: 12px 14px; border-radius: 9px; font-size: 13px; margin-top: 10px; }
.quiz-result.ok { background: #0f2f24; color: #6ee7b7; border: 1px solid #14532d; }
.quiz-result.bad { background: #3b1212; color: #fca5a5; border: 1px solid #7f1d1d; }
.seat-error {
  background: #3f1d1d; border: 1px solid #7f1d1d; color: #fecaca;
  padding: 11px 14px; border-radius: 9px; font-size: 13px; line-height: 1.6;
}

@media (max-width: 1180px) {
  .video-grid.g16 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .playback-layout { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .login-shell { grid-template-columns: 1fr; }
  .login-brand { display: none; }
  .sidebar { width: 68px; }
  .sidebar .brand-mark span:last-child, .nav-item span:not(.ico), .sidebar-foot .user-chip div, .side-status span { display: none; }
  .nav { padding: 12px 8px; }
  .nav-item { justify-content: center; padding: 0; }
  .grid-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .video-grid.g9, .video-grid.g16 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .seat-main { grid-template-columns: 1fr; }
  .seat-mine { grid-template-columns: 1fr; padding: 0 16px 8px; }
  .mine-span-2 { grid-column: auto; }
  .mine-stats, .mine-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .settings-grid { grid-template-columns: 1fr; }
  .content { padding: 16px; }
}
@media (max-width: 620px) {
  .video-grid.g9, .video-grid.g16 { grid-template-columns: 1fr; }
  .grid-stats { grid-template-columns: 1fr; }
}

/* ------------------------------------------------------------ 登录页演示账号 */
.login-accounts { display: grid; gap: 6px; margin: 8px 0 12px; }
.la-row {
  display: grid; grid-template-columns: 58px 1fr auto;
  align-items: center; gap: 8px; width: 100%;
  padding: 8px 10px; border: 1px solid var(--border);
  background: var(--surface-2); border-radius: 9px;
  font: inherit; color: var(--text); text-align: left; cursor: pointer;
}
.la-row:hover { border-color: var(--brand); background: var(--brand-soft); }
.la-role { font-size: 11.5px; font-weight: 700; color: var(--brand-dark); }
.la-row b { font-family: var(--mono); font-weight: 600; }
.la-row em { font-style: normal; font-family: var(--mono); color: var(--muted); font-size: 12px; }

/* ------------------------------------------------------------ 人员管理 */
.alert-strip.info {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}

/* 扫码入职二维码弹窗（浅色） */
.modal-card.light { background: var(--surface); }
.modal-head.light {
  background: var(--surface-2);
  color: var(--text);
  border-bottom-color: var(--border);
}
.modal-head.light .btn { background: var(--surface); border-color: var(--border); color: var(--text); }
.modal-body { padding: 20px; background: var(--surface); color: var(--text); max-height: 82vh; overflow: auto; }
.qr-card { width: min(760px, 94vw); }
.qr-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; align-items: start; }
.qr-result {
  border: 1px dashed var(--border);
  border-radius: 12px;
  min-height: 280px;
  display: grid;
  place-items: center;
  padding: 18px;
  text-align: center;
}
.qr-result .qr-img { width: 200px; height: 200px; display: block; margin: 0 auto 12px; }
.qr-result .qr-code { font-size: 14px; margin-bottom: 10px; }
.qr-result .qr-code b { font-family: var(--mono); letter-spacing: 2px; }
.qr-result .qr-link { display: flex; gap: 8px; margin: 0 0 8px; }
.qr-result .help { text-align: left; }

/* 入职资料展开 */
.data details summary {
  cursor: pointer;
  color: var(--brand-dark);
  font-size: 12px;
  list-style: none;
}
.data details summary::-webkit-details-marker { display: none; }
.mini-kv {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px 10px;
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
  text-align: left;
}
.mini-kv b { color: var(--text); font-weight: 500; }

@media (max-width: 720px) {
  .qr-grid { grid-template-columns: 1fr; }
}
