:root {
  --bg: #0b1020;
  --panel: #121a2e;
  --line: #22304d;
  --text: #e8eefc;
  --muted: #8a9bbd;
  --primary: #3b82f6;
  --ok: #22c55e;
  --warn: #f59e0b;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
}
[v-cloak] { display: none !important; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.muted { color: var(--muted); }
.w100 { width: 100%; }
.mb16 { margin-bottom: 16px; }
.hidden { display: none; }

/* ---------- 登录 ---------- */
.login-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  position: relative; padding: 24px;
  background:
    radial-gradient(1200px 600px at 20% 10%, rgba(59,130,246,.22), transparent 60%),
    radial-gradient(900px 500px at 80% 90%, rgba(34,197,94,.14), transparent 60%),
    var(--bg);
}
.login-card { width: 420px; border-radius: 18px; border: 1px solid var(--line); background: rgba(18,26,46,.92); }
.login-card .el-card__body { padding: 30px; }
.brand { display: flex; gap: 14px; align-items: center; margin-bottom: 26px; }
.brand-logo {
  width: 46px; height: 46px; border-radius: 13px; display: flex; align-items: center; justify-content: center;
  font-weight: 800; letter-spacing: .5px;
  background: linear-gradient(135deg, #3b82f6, #22c55e); color: #06101f;
}
.brand h1 { font-size: 21px; margin: 0 0 4px; }
.brand p { margin: 0; color: var(--muted); font-size: 12px; }
.login-foot { margin-top: 18px; display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); }
.login-foot a { color: #7fb0ff; text-decoration: none; }
.login-meta { margin-top: 18px; display: flex; gap: 8px; flex-wrap: wrap; }
.ringing { text-align: center; }
.ringing h2 { margin: 8px 0 6px; font-size: 18px; }
.ringing p { margin: 0 0 20px; }
.ring-anim { display: flex; justify-content: center; gap: 8px; margin: 10px 0 6px; }
.ring-anim span {
  width: 10px; height: 10px; border-radius: 50%; background: var(--primary);
  animation: bounce 1.1s infinite ease-in-out;
}
.ring-anim span:nth-child(2) { animation-delay: .15s; }
.ring-anim span:nth-child(3) { animation-delay: .3s; }
@keyframes bounce { 0%, 80%, 100% { transform: translateY(0); opacity: .45; } 40% { transform: translateY(-7px); opacity: 1; } }

/* ---------- 会话 ---------- */
.session { height: 100vh; display: flex; flex-direction: column; background: #05080f; }
.toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 14px; background: var(--panel); border-bottom: 1px solid var(--line); flex-wrap: wrap;
}
.tb-left, .tb-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tb-left strong { font-size: 15px; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--warn); box-shadow: 0 0 0 3px rgba(245,158,11,.15); }
.dot.on { background: var(--ok); box-shadow: 0 0 0 3px rgba(34,197,94,.15); }
.stat { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.badge {
  display: inline-block; margin-left: 4px; min-width: 16px; padding: 0 4px; border-radius: 8px;
  background: var(--primary); color: #fff; font-size: 11px; line-height: 16px; text-align: center;
}
.stage {
  position: relative; flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center;
  background: #000; outline: none; overflow: hidden;
}
.stage video {
  max-width: 100%; max-height: 100%; width: 100%; height: 100%; object-fit: contain;
  cursor: crosshair; background: #000;
}
.hint {
  position: absolute; display: flex; align-items: center; gap: 10px;
  padding: 10px 18px; border-radius: 10px; background: rgba(18,26,46,.88);
  border: 1px solid var(--line); color: var(--text); font-size: 14px;
}
.hint.error { bottom: 18px; border-color: #7f1d1d; background: rgba(69,10,10,.9); }
.spinner {
  width: 14px; height: 14px; border-radius: 50%; border: 2px solid rgba(255,255,255,.25);
  border-top-color: #fff; animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.statusbar {
  display: flex; gap: 18px; padding: 6px 14px; font-size: 12px; color: var(--muted);
  background: var(--panel); border-top: 1px solid var(--line); flex-wrap: wrap;
}
.empty { color: var(--muted); text-align: center; padding: 30px 0; }
.file-item { border: 1px solid var(--line); border-radius: 10px; padding: 12px; margin-bottom: 12px; background: #0e1526; }
.fi-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.fi-name { font-size: 13px; word-break: break-all; }
.fi-meta { font-size: 12px; color: var(--muted); margin-top: 6px; }

/* Element Plus 暗色微调 */
.el-card, .el-drawer, .el-drawer__body { background: var(--panel) !important; color: var(--text); }
.el-form-item__label { color: var(--muted) !important; }
.el-input__wrapper, .el-select__wrapper { background: #0d1526 !important; box-shadow: 0 0 0 1px var(--line) inset !important; }
.el-input__inner { color: var(--text) !important; }
@media (max-width: 720px) {
  .login-card { width: 100%; }
  .stat { display: none; }
}
