:root {
  --bg: #0a0a0a;
  --panel: #111113;
  --panel-alt: #0d0d0f;
  --border: #27272a;
  --text: #e4e4e7;
  --dim: #9ca3af;
  --accent: #f59e0b;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', monospace;
}

a { color: inherit; }

.icon-bread {
  flex: none;
  transform: translateY(2px);
}

.wordmark {
  display: flex;
  align-items: center;
  gap: 10px;
}

.wordmark span {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.divider {
  height: 1px;
  background: var(--border);
  margin: 20px 0;
}

.dim { color: var(--dim); }
.accent { color: var(--accent); }

/* ---- lock screen ---- */

.lock-screen {
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.lock-card {
  width: 100%;
  max-width: 420px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
}

.lock-card-body {
  padding: 32px 28px 28px;
}

.status-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
}

.status-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

label.field-label {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--dim);
  margin-bottom: 8px;
}

input[type="password"] {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 10px 12px;
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
}

input[type="password"]:focus {
  border-color: var(--accent);
  outline: none;
}

input[type="password"]::placeholder {
  color: #52525b;
  letter-spacing: 2px;
}

button.unlock {
  margin-top: 16px;
  display: block;
  width: 100%;
  text-align: center;
  background: none;
  border: 1px solid var(--accent);
  color: var(--accent);
  border-radius: 3px;
  padding: 10px;
  font-size: 13px;
  font-family: inherit;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

button.unlock:hover { background: var(--accent); color: var(--bg); }
button.unlock:disabled { opacity: 0.5; cursor: default; }

.lock-error {
  margin-top: 12px;
  font-size: 12px;
  color: #f87171;
  min-height: 1em;
}

.lock-footer {
  margin-top: 16px;
  text-align: center;
  font-size: 11px;
  color: var(--dim);
}

/* ---- dashboard ---- */

.dashboard {
  width: 100%;
  min-height: 100vh;
  padding: 32px 40px 48px;
}

.dashboard-inner {
  max-width: 1120px;
  margin: 0 auto;
}

.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.top-bar-right {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 13px;
  color: var(--dim);
}

.tabs {
  display: flex;
  gap: 28px;
  border-bottom: 1px solid var(--border);
  margin-top: 24px;
}

.tab {
  background: none;
  border: none;
  font-family: inherit;
  cursor: pointer;
  padding: 0 0 12px 0;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: lowercase;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  color: var(--dim);
}

.tab:hover { color: var(--text); }
.tab.active { color: var(--text); border-bottom-color: var(--accent); }

.panel { display: none; padding-top: 24px; }
.panel.active { display: block; }

.video-box {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.video-box video { width: 100%; height: 100%; object-fit: cover; }

.video-box .placeholder { color: var(--dim); font-size: 13px; }

.badge-rec {
  position: absolute;
  top: 12px;
  left: 12px;
  font-size: 11px;
  color: var(--accent);
}

.badge-rec.badge-offline { color: var(--dim); }

.caption { margin-top: 12px; font-size: 12px; color: var(--dim); }

.scrubber {
  position: relative;
  height: 56px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 4px;
  cursor: pointer;
}

.scrubber-handle {
  position: absolute;
  top: -4px;
  bottom: -4px;
  width: 2px;
  background: var(--accent);
  pointer-events: none;
}

.scrubber-handle::before {
  content: '';
  position: absolute;
  top: 0;
  left: -4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
}

.scrubber-ticks {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 6px;
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--dim);
  pointer-events: none;
}

.range-pills {
  display: flex;
  gap: 10px;
}

.range-pill {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 12px;
  color: var(--dim);
  background: none;
  font-family: inherit;
  cursor: pointer;
}

.range-pill.active { border-color: var(--accent); color: var(--accent); }

.frame-grid {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.frame-slot {
  aspect-ratio: 1 / 1;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 3px;
}

.timelapse-video {
  margin-top: 16px;
  width: 100%;
  border-radius: 4px;
  border: 1px solid var(--border);
  display: none;
}
