:root {
  --bg: #14151a;
  --panel: #1c1e26;
  --text: #eceae4;
  --text-dim: #9a9891;
  --accent: #c9a066;
  --border: #2a2c38;
  --error: #d16a6a;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
}

.topbar h1 { font-size: 1.1rem; margin: 0; }
.topbar h1 a { color: var(--text); text-decoration: none; }
.topbar nav a { color: var(--text-dim); text-decoration: none; }

main { max-width: 900px; margin: 0 auto; padding: 24px; }

.flashes { list-style: none; padding: 0; }
.flash-error { color: var(--error); }

.login-form { display: flex; flex-direction: column; gap: 12px; max-width: 300px; }
.login-form label { display: flex; flex-direction: column; gap: 4px; font-size: 0.9rem; }
.login-form input { padding: 8px; background: var(--panel); border: 1px solid var(--border); color: var(--text); border-radius: 4px; }
.login-form button { padding: 8px; background: var(--accent); border: none; border-radius: 4px; cursor: pointer; }

.camera-list, .date-list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.camera-list a, .date-list a { color: var(--text); text-decoration: none; padding: 8px 12px; background: var(--panel); border-radius: 6px; display: block; }

.windows { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }
.window-chip {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-direction: column;
}
.window-chip.off-site { border-color: var(--accent); }
.window-time { font-weight: 600; }
.badge { font-size: 0.75rem; color: var(--text-dim); }
button { cursor: pointer; }
.play-btn, .fetch-btn, #cut-btn {
  background: var(--accent);
  border: none;
  border-radius: 4px;
  padding: 6px 10px;
  color: #14151a;
  font-weight: 600;
}
.fetch-progress progress { width: 100px; }

#player-section { margin-top: 32px; }
#player { width: 100%; max-height: 480px; background: black; border-radius: 8px; }
.trim-controls { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.trim-controls input[type="range"] { width: 100%; }
#clip-result { margin-left: 8px; }
#clip-result a { color: var(--accent); }
