:root {
  --bg: #f3f2ee;
  --card: #ffffff;
  --text: #1d1f22;
  --muted: #6b6f76;
  --line: #e2e0d8;
  --accent: #e8a300;
  --accent-text: #1d1f22;
  --ok: #1f9d55;
  --off: #b3261e;
  --radius: 12px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15171a;
    --card: #1e2125;
    --text: #e9e9e6;
    --muted: #9aa0a8;
    --line: #2d3136;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: inherit; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 16px; display: grid; gap: 16px; }

.top {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 16px; background: var(--card); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 5;
}
.brand { font-weight: 700; text-decoration: none; display: flex; align-items: center; gap: 8px; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); display: inline-block; }
.top nav { display: flex; align-items: center; gap: 4px; }
.top nav a, .link {
  padding: 6px 10px; border-radius: 8px; text-decoration: none; color: var(--muted);
  background: none; border: 0; font: inherit; cursor: pointer;
}
.top nav a.on { color: var(--text); background: var(--bg); }
.top nav form { margin: 0; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; min-width: 0; }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.card-head h2 { margin: 0; font-size: 1.1rem; }
.card-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-top: 12px; }
.grid { display: grid; gap: 16px; grid-template-columns: 1fr 1fr; }
@media (max-width: 800px) { .grid { grid-template-columns: 1fr; } }

.muted { color: var(--muted); }
.small { font-size: .875rem; }
.cap::first-letter { text-transform: uppercase; }
.empty { color: var(--muted); padding: 24px 0; text-align: center; margin: 0; }
.error { color: var(--off); margin: 0; }

.badge { font-size: .8rem; font-weight: 600; padding: 3px 10px; border-radius: 99px; color: #fff; }
.badge.ok { background: var(--ok); }
.badge.off { background: var(--off); }

.player { position: relative; background: #000; border-radius: 8px; overflow: hidden; aspect-ratio: 16 / 9; }
.player video { width: 100%; height: 100%; display: block; object-fit: contain; }
.overlay {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: #ddd; background: rgba(0,0,0,.55); font-size: .95rem; text-align: center; padding: 16px;
}
.overlay[hidden] { display: none; }
.photo { width: 100%; display: block; border-radius: 8px; background: #000; aspect-ratio: 16 / 9; object-fit: contain; }

.btn {
  display: inline-block; padding: 8px 14px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--card); color: var(--text); text-decoration: none; font: inherit; cursor: pointer;
}
.btn:hover { border-color: var(--muted); }
.btn.small { padding: 5px 10px; font-size: .875rem; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); font-weight: 600; }

input {
  font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--line);
  border-radius: 8px; padding: 8px 10px; width: 100%;
}
label { display: grid; gap: 4px; font-size: .9rem; }
.zip { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; }
.zip label { flex: 1 1 160px; }

.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login { width: min(380px, 100%); display: grid; gap: 14px; }
.login h1 { margin: 0; font-size: 1.3rem; display: flex; align-items: center; gap: 8px; }
.login p { margin: 0; }

.days { list-style: none; margin: 0; padding: 0; }
.days li { display: flex; align-items: center; justify-content: space-between; gap: 8px; border-top: 1px solid var(--line); }
.days li > a:first-child { flex: 1; display: flex; justify-content: space-between; gap: 8px; padding: 12px 4px; text-decoration: none; }

.thumbs { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); margin-top: 16px; }
.thumbs a { position: relative; display: block; text-decoration: none; }
.thumbs img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; border-radius: 6px; background: #000; }
.thumbs span {
  position: absolute; left: 6px; bottom: 6px; font-size: .75rem; color: #fff;
  background: rgba(0,0,0,.6); padding: 1px 6px; border-radius: 4px;
}
