:root {
  color-scheme: light;
  --bg: #f4f7fb;
  --panel: #ffffff;
  --text: #17202a;
  --muted: #667085;
  --line: #d6dee8;
  --accent: #0b6bcb;
  --accent-dark: #0755a4;
  --danger: #b42318;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
}
a { color: var(--accent); text-decoration: none; }
button, .button {
  background: var(--accent);
  color: #fff;
  border: 0;
  border-radius: 6px;
  padding: 10px 14px;
  font-weight: 700;
  cursor: pointer;
  display: inline-block;
}
button:hover, .button:hover { background: var(--accent-dark); }
button:disabled { opacity: .55; cursor: not-allowed; }
input, select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 12px;
  font: inherit;
  background: #fff;
}
label { display: grid; gap: 6px; font-weight: 700; }
.auth-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.auth-panel { width: min(440px, 100%); background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 28px; }
.topbar {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  background: #0f172a;
  color: #fff;
}
.brand { color: #fff; font-weight: 800; font-size: 20px; }
.topbar nav { display: flex; align-items: center; gap: 16px; }
.topbar nav a, .topbar .link-button { color: #dbeafe; }
.link-button { background: transparent; padding: 0; }
.page { max-width: 1180px; margin: 0 auto; padding: 28px; }
.narrow { max-width: 680px; }
.page-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 18px; margin-bottom: 18px; }
.stack { display: grid; gap: 16px; }
.inline-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; align-items: end; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th, .data-table td { padding: 12px; border-bottom: 1px solid var(--line); text-align: left; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-top: 14px; }
.card { background: #f8fafc; border: 1px solid var(--line); border-radius: 8px; padding: 14px; }
.muted { color: var(--muted); }
.notice { background: #fff7ed; border: 1px solid #fed7aa; border-radius: 8px; padding: 12px; margin-bottom: 16px; color: #9a3412; }
.alert { background: #fef3f2; color: var(--danger); border: 1px solid #fecdca; border-radius: 6px; padding: 10px; margin-bottom: 14px; }
.hidden { display: none; }
.video-wrap {
  position: relative;
  width: min(100%, 1100px);
  aspect-ratio: 16 / 9;
  background: #111827;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--line);
}
.video-wrap video, .video-wrap canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
pre {
  white-space: pre-wrap;
  background: #0f172a;
  color: #dbeafe;
  padding: 14px;
  border-radius: 8px;
  overflow: auto;
}
@media (max-width: 720px) {
  .topbar { height: auto; align-items: flex-start; flex-direction: column; gap: 10px; padding: 16px; }
  .topbar nav { flex-wrap: wrap; }
  .page-header { align-items: flex-start; flex-direction: column; }
}
