* { box-sizing: border-box; margin: 0; padding: 0; }
[v-cloak] { display: none; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #0f1420; color: #e6e9f0; min-height: 100vh;
}
.muted { color: #8b93a7; font-size: 13px; }
.err, .errmsg { color: #ff6b6b; font-size: 12px; word-break: break-all; }

/* login */
.login-wrap { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.login-box {
  background: #1a2133; padding: 40px; border-radius: 14px; width: 340px;
  box-shadow: 0 10px 40px rgba(0,0,0,.4);
}
.login-box h1 { font-size: 20px; margin-bottom: 8px; }
.login-box input { width: 100%; margin: 10px 0; }
.login-box button { width: 100%; }

/* header */
header {
  display: flex; align-items: center; gap: 24px; padding: 14px 24px;
  background: #161e2e; border-bottom: 1px solid #232c42; position: sticky; top: 0; z-index: 10;
}
.brand { font-weight: 700; font-size: 17px; }
nav { display: flex; gap: 6px; flex: 1; }
.header-right { display: flex; align-items: center; gap: 12px; }
.badge { font-size: 12px; padding: 2px 8px; border-radius: 20px; }
.badge.ok { background: #123c2a; color: #4ade80; }
.badge.bad { background: #3c1414; color: #f87171; }
.disk { font-size: 12px; color: #8b93a7; }

main { padding: 22px; max-width: 1200px; margin: 0 auto; }
.toolbar { display: flex; gap: 16px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.sec-title { margin: 28px 0 12px; font-size: 16px; }

button {
  background: #253049; color: #e6e9f0; border: none;
  padding: 8px 14px; border-radius: 8px; cursor: pointer; font-size: 13px;
}
button:hover { background: #33405f; }
button.primary { background: #2f6bff; }
button.primary:hover { background: #4d82ff; }
button.danger { background: #b91c1c; }
button.danger:hover { background: #d92626; }
button.link-danger { background: transparent; color: #ff6b6b; }
button:disabled { opacity: .45; cursor: not-allowed; }
button.on { background: #2f6bff; }

input, textarea {
  background: #101828; color: #e6e9f0; border: 1px solid #2a3550;
  border-radius: 8px; padding: 9px 12px; font-size: 14px; outline: none;
}
input:focus, textarea:focus { border-color: #2f6bff; }
textarea { width: 100%; font-family: monospace; font-size: 12px; line-height: 1.5; }
code { background: #101828; padding: 2px 6px; border-radius: 4px; font-size: 12px; }

.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.room-card, .rec-card, .clip-card { background: #1a2133; border-radius: 12px; padding: 14px; }
.room-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot.red { background: #ef4444; box-shadow: 0 0 8px #ef4444; animation: blink 1s infinite; }
.dot.green { background: #22c55e; }
.dot.gray { background: #475569; }
@keyframes blink { 50% { opacity: .35; } }
.room-id { color: #8b93a7; font-size: 12px; }
.plat-tag { background: #1e293b; color: #cbd5e1; border: 1px solid #334155; font-size: 11px; padding: 1px 6px; border-radius: 10px; }
.room-body { min-height: 64px; }
.rec-info { display: flex; gap: 10px; align-items: center; font-size: 13px; }
.rec-tag { color: #f87171; font-weight: 600; }
.sched { margin-top: 10px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 13px; }
.sched input[type=time] { padding: 4px 6px; font-size: 12px; }
.room-actions, .rec-actions, .clip-actions { margin-top: 12px; display: flex; gap: 8px; flex-wrap: wrap; }

.thumb { position: relative; background: #000; border-radius: 8px; overflow: hidden; height: 150px; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.dur { position: absolute; right: 6px; bottom: 6px; background: rgba(0,0,0,.7); padding: 2px 7px; font-size: 12px; border-radius: 5px; }
.thumb .status, .status { font-size: 11px; border-radius: 5px; padding: 1px 6px; }
.status.ready, .status.done { background: #123c2a; color: #4ade80; }
.status.processing, .status.recording, .status.running { background: #3c3a12; color: #facc15; }
.status.failed, .status.error, .status.queued { background: #3c1414; color: #f87171; }
.rec-meta, .clip-meta { margin-top: 10px; display: flex; flex-direction: column; gap: 4px; }

.video-mini { background: #000; border-radius: 8px; overflow: hidden; }
.video-mini video { width: 100%; height: 120px; object-fit: cover; }
.clip-actions a { text-decoration: none; }

.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th, .tbl td { border-bottom: 1px solid #232c42; padding: 8px 10px; text-align: left; }
.tbl a { color: #60a5fa; }

.panel { background: #1a2133; border-radius: 12px; padding: 18px; margin-bottom: 16px; }
.panel h3 { margin-bottom: 10px; font-size: 15px; }
.panel ol { margin: 8px 0 12px 18px; }
.panel .row { display: flex; gap: 10px; align-items: center; }

.empty { color: #8b93a7; text-align: center; padding: 60px 0; }

.modal {
  position: fixed; inset: 0; background: rgba(0,0,0,.6); display: flex; align-items: center;
  justify-content: center; z-index: 100; padding: 20px;
}
.modal-box { background: #1a2133; border-radius: 14px; padding: 22px; width: 400px; max-width: 100%; }
.modal-box.wide { width: 760px; }
.modal-box h3 { margin-bottom: 14px; }
.modal-box .row { margin-bottom: 12px; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.modal-box video { width: 100%; border-radius: 8px; background: #000; }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; }
.trim-actions { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }

.cover-pick { display: flex; gap: 8px; flex-wrap: wrap; }
.cover-item { border: 2px solid transparent; border-radius: 8px; overflow: hidden; cursor: pointer; width: 90px; height: 50px; }
.cover-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cover-item.on { border-color: #2f6bff; }

.thumb .window { position: absolute; left: 6px; bottom: 6px; background: rgba(0,0,0,.7); padding: 2px 7px; font-size: 11px; border-radius: 5px; }

.timeline { margin-top: 14px; }
.tl-bar { position: relative; height: 12px; background: #0f1420; border-radius: 6px; overflow: hidden; }
.tl-track { position: absolute; inset: 0; }
.tl-selected { position: absolute; top: 0; bottom: 0; background: #2f6bff; }
.tl-inputs { display: flex; gap: 20px; margin-top: 8px; font-size: 13px; }
.clips-made { margin-top: 10px; color: #4ade80; font-size: 13px; }

@media (max-width: 700px) {
  header { flex-wrap: wrap; }
  nav { order: 3; width: 100%; }
  .card-grid { grid-template-columns: 1fr; }
}