:root {
  /* Tokens mirror the landing (zarlabs.tech) — single ZAR visual system. */
  --bg: #08090b;
  --bg-subtle: #0c0e11;
  --bg-card: rgba(255, 255, 255, 0.028);
  --bg-hover: rgba(255, 255, 255, 0.05);
  --panel-2: rgba(255, 255, 255, 0.045);
  --border: rgba(255, 255, 255, 0.08);
  --border-soft: rgba(255, 255, 255, 0.06);
  --border-bright: rgba(255, 255, 255, 0.14);
  --text-primary: #f4f5f6;
  --text-secondary: rgba(244, 245, 246, 0.62);
  --text-muted: rgba(244, 245, 246, 0.4);
  --accent: #22c55e;
  --accent-bright: #2ee46a;
  --accent-dim: rgba(34, 197, 94, 0.08);
  --accent-soft: rgba(34, 197, 94, 0.16);
  --accent-glow: rgba(34, 197, 94, 0.5);
  --purple: #8b5cf6;
  --red: #ef4444;
  --yellow: #eab308;
  --card: rgba(255, 255, 255, 0.028);
  --t1: #f4f5f6;
  --t2: rgba(244, 245, 246, 0.62);
  --t3: rgba(244, 245, 246, 0.4);
  --green: #22c55e;
  --radius: 16px;
  --radius-sm: 12px;
  --radius-pill: 999px;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Monaco, monospace;
  --glow-green: 0 0 0 1px rgba(34, 197, 94, 0.5), 0 8px 26px -8px rgba(34, 197, 94, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  position: relative;
}

html, body { min-height: 100%; }

/* ─── Ambient background (matches landing hero glows) ─── */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(620px 620px at 50% -180px, rgba(34, 197, 94, 0.16), transparent 68%),
    radial-gradient(520px 520px at -120px 340px, rgba(139, 92, 246, 0.10), transparent 68%),
    radial-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: auto, auto, 46px 46px;
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 0%, transparent 80%);
  mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 0%, transparent 80%);
}
body > * { position: relative; z-index: 1; }

::-webkit-scrollbar { width: 7px; height: 7px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.12); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.2); }
::selection { background: rgba(34, 197, 94, 0.28); color: #fff; }

/* ─── Top Navbar ─── */
.zar-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 56px;
  background: rgba(8, 9, 11, 0.72);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border-bottom: 1px solid var(--border-soft);
  z-index: 50;
  display: flex;
  align-items: center;
  transition: border-color 0.2s;
}

.zar-nav.scrolled {
  border-bottom-color: var(--border);
}

.zar-nav-inner {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.zar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}
.zar-mark {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #1b2a1f, #0e140f);
  border: 1px solid rgba(34, 197, 94, 0.4);
  box-shadow: 0 0 22px rgba(34, 197, 94, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}
.zar-mark svg { width: 15px; height: 15px; display: block; }
.zar-logo .zar-wordmark {
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: 17px;
  letter-spacing: 0.06em;
  color: var(--text-primary);
}

.zar-nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: 28px;
}

.zar-nav-link {
  position: relative;
  font-size: 13px;
  font-weight: 500;
  color: #555;
  text-decoration: none;
  padding: 5px 10px;
  border-radius: var(--radius);
  transition: color 120ms, background 120ms;
}

.zar-nav-link:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.zar-nav-link.active {
  color: var(--accent);
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.2);
  padding: 4px 9px;
}

.zar-nav-user {
  display: flex;
  align-items: center;
  gap: 10px;
}

.zar-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  background: #1a1a1a;
  flex-shrink: 0;
}

.zar-username {
  font-size: 13px;
  color: #666;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.zar-nav-sep {
  width: 1px;
  height: 14px;
  background: #222;
}

.zar-signout {
  font-size: 12px;
  color: #444;
  text-decoration: none;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
  transition: color 120ms;
}

.zar-signout:hover { color: #888; }

/* ─── Main layout ─── */
.zar-main {
  padding-top: 52px;
  min-height: 100vh;
  max-width: 960px;
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
  padding-bottom: 64px;
}

.zar-main--full { padding-top: 0; }

@media (max-width: 640px) {
  .zar-main { padding-left: 16px; padding-right: 16px; }
  .zar-nav-inner { padding: 0 16px; }
  .zar-nav-links { margin-left: 12px; gap: 2px; }
  .zar-username { display: none; }
  .zar-nav-sep { display: none; }
}

.env-pill {
  display: inline-block;
  padding: 2px 6px;
  font-size: 10px;
  font-family: var(--font-mono);
  border: 1px solid #222;
  color: #555;
  border-radius: var(--radius);
  vertical-align: middle;
}

/* ─── Page structure ─── */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 28px;
}

.page-title {
  font-size: 26px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.page-sub {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 5px;
}

/* ─── Staggered fade-in ─── */
@keyframes fade-in {
  from { opacity: 0; transform: translateY(5px); }
  to   { opacity: 1; transform: translateY(0); }
}

.fade-up { animation: fade-in 0.2s ease-out both; }

.stagger > *:nth-child(1) { animation: fade-in 0.25s 0ms   ease-out both; }
.stagger > *:nth-child(2) { animation: fade-in 0.25s 50ms  ease-out both; }
.stagger > *:nth-child(3) { animation: fade-in 0.25s 100ms ease-out both; }
.stagger > *:nth-child(4) { animation: fade-in 0.25s 150ms ease-out both; }
.stagger > *:nth-child(5) { animation: fade-in 0.25s 200ms ease-out both; }
.stagger > *:nth-child(n+6) { animation: fade-in 0.25s 250ms ease-out both; }

/* ─── Stats grid ─── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}

@media (max-width: 600px) {
  .stats-grid { grid-template-columns: 1fr; }
  /* Stack the dashboard hero row so the "Add repo" button never clips. */
  .dash-top-row { flex-direction: column; align-items: stretch !important; }
  .dash-top-row .btn-primary { margin-top: 0 !important; justify-content: center; width: 100%; }
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 24px 50px -30px rgba(0, 0, 0, 0.8);
  transition: border-color 0.3s, transform 0.3s cubic-bezier(0.2, 0.7, 0.3, 1), box-shadow 0.3s, background 0.3s;
}

.stat-card:hover {
  border-color: var(--border-bright);
  background: var(--panel-2);
  transform: translateY(-4px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 30px 60px -28px rgba(0, 0, 0, 0.85), 0 0 50px -18px rgba(34, 197, 94, 0.28);
}

.stat-value {
  font-size: 36px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.03em;
  font-family: var(--font-mono);
  line-height: 1;
}

.stat-value.accent, .stat-value--green {
  color: var(--accent);
  text-shadow: 0 0 18px rgba(34, 197, 94, 0.55);
}

.stat-label {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
  font-family: var(--font-mono);
}

/* ─── Cards ─── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 24px 50px -30px rgba(0, 0, 0, 0.8);
}

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

.card-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-family: var(--font-mono);
}

.card-body { padding: 4px 0; }

/* ─── Repo item (dashboard list) ─── */
.repo-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 11px 18px;
  border-bottom: 1px solid #0f0f0f;
  transition: background 0.12s;
}

.repo-item:last-child { border-bottom: none; }
.repo-item:hover { background: #111; }

.repo-name {
  font-size: 13px;
  color: white;
  font-weight: 500;
}

.repo-meta {
  font-size: 12px;
  color: #444;
  margin-top: 2px;
  font-family: var(--font-mono);
}

.repo-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #555;
}

/* ─── Status dot ─── */
.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #2a2a2a;
  flex-shrink: 0;
}

.status-dot.active {
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.12), 0 0 6px rgba(34, 197, 94, 0.2);
}

/* ─── Activity feed ─── */
@keyframes slide-in-left {
  from { opacity: 0; transform: translateX(-8px); }
  to   { opacity: 1; transform: translateX(0); }
}

.activity-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 11px 18px;
  border-bottom: 1px solid #0d0d0d;
  transition: background 0.12s;
}

.activity-item:last-child { border-bottom: none; }

.activity-item:hover { background: #0f0f0f; }

.activity-item:nth-child(1) { animation: slide-in-left 0.2s 0ms   ease-out both; }
.activity-item:nth-child(2) { animation: slide-in-left 0.2s 30ms  ease-out both; }
.activity-item:nth-child(3) { animation: slide-in-left 0.2s 60ms  ease-out both; }
.activity-item:nth-child(4) { animation: slide-in-left 0.2s 90ms  ease-out both; }
.activity-item:nth-child(5) { animation: slide-in-left 0.2s 120ms ease-out both; }
.activity-item:nth-child(n+6) { animation: slide-in-left 0.2s 150ms ease-out both; }

.activity-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  margin-top: 5px;
  flex-shrink: 0;
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.12);
}

.activity-dot.error {
  background: var(--red);
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.12);
}

.activity-dot.skipped {
  background: #ca8a04;
  box-shadow: 0 0 0 2px rgba(202, 138, 4, 0.12);
}

.activity-dot.success {
  background: var(--accent);
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.12);
}

.activity-dot.analyzing {
  background: #333;
  box-shadow: none;
}

.activity-content { flex: 1; min-width: 0; }

.activity-title {
  font-size: 13px;
  color: #999;
  line-height: 1.4;
}

.activity-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 0;
}

.activity-time {
  font-size: 11px;
  color: #3a3a3a;
  margin-top: 3px;
  font-family: var(--font-mono);
}

/* ─── Section label ─── */
.section-label {
  font-size: 11px;
  font-weight: 600;
  color: #3a3a3a;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* ─── Empty / terminal states ─── */
@keyframes blink {
  0%, 49%  { opacity: 1; }
  50%, 100% { opacity: 0; }
}

.cursor::after {
  content: '▋';
  color: var(--accent);
  animation: blink 1.1s step-end infinite;
  font-size: 11px;
  vertical-align: baseline;
  margin-left: 1px;
}

.terminal-block {
  background: linear-gradient(180deg, rgba(20, 22, 26, 0.86), rgba(13, 14, 17, 0.92));
  border: 1px solid var(--border-bright);
  border-radius: var(--radius);
  padding: 22px 24px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
  line-height: 1.9;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 40px 80px -40px rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.terminal-block a {
  color: var(--accent);
  text-decoration: none;
  transition: opacity 0.15s;
}

.terminal-block a:hover { opacity: 0.7; }

.terminal-block .t-dim   { color: #2a2a2a; }
.terminal-block .t-muted { color: #444; }
.terminal-block .t-white { color: #888; }

/* Terminal progress bar rows */
.term-progress-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 5px;
}

.term-prog-label {
  width: 84px;
  color: var(--accent);
  font-size: 12px;
  flex-shrink: 0;
}

.term-bar-outer {
  width: 160px;
  height: 8px;
  background: #111;
  border: 1px solid #1e1e1e;
  border-radius: 0;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

.term-bar-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: var(--accent);
  transition: width 0.6s ease;
}

.term-bar-count {
  font-size: 11px;
  color: #555;
  white-space: nowrap;
  font-family: var(--font-mono);
}

/* ─── Buttons ─── */
.btn-primary {
  color: #04130a;
  background: linear-gradient(180deg, #38d66f, #22c55e);
  padding: 9px 18px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: inherit;
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.5), 0 8px 26px -8px rgba(34, 197, 94, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transition: transform 0.2s ease, box-shadow 0.3s ease;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.6), 0 14px 36px -8px rgba(34, 197, 94, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.45);
}
.btn-primary:active { transform: scale(0.98); }

.btn-ghost {
  color: #555;
  font-size: 13px;
  text-decoration: none;
  padding: 5px 9px;
  border-radius: var(--radius);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color 0.12s, background 0.12s;
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
}

.btn-ghost:hover { color: white; background: #111; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  padding: 7px 14px;
  transition: background 0.12s, border-color 0.12s, color 0.12s, transform 0.1s;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  border: 1px solid transparent;
  font-family: inherit;
}

.btn:active { transform: scale(0.97); }

.btn, .btn-accent, .btn-secondary { border-radius: var(--radius-pill); padding: 9px 18px; }

.btn-secondary {
  background: var(--panel-2);
  color: var(--t1);
  border-color: var(--border);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.btn-secondary:hover { background: rgba(255, 255, 255, 0.07); border-color: var(--border-bright); transform: translateY(-2px); }

.btn-accent {
  color: #04130a;
  background: linear-gradient(180deg, #38d66f, #22c55e);
  border-color: transparent;
  font-weight: 600;
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.5), 0 8px 26px -8px rgba(34, 197, 94, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.btn-accent:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.6), 0 14px 36px -8px rgba(34, 197, 94, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.45); }

/* ─── Repo cards (repos page) ─── */
.repo-card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

@media (max-width: 680px) {
  .repo-card-grid { grid-template-columns: 1fr; }
}

.repo-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 24px 50px -30px rgba(0, 0, 0, 0.8);
  transition: border-color 0.3s, transform 0.3s cubic-bezier(0.2, 0.7, 0.3, 1), box-shadow 0.3s, background 0.3s;
}

.repo-card:hover {
  border-color: var(--border-bright);
  background: var(--panel-2);
  transform: translateY(-4px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 30px 60px -28px rgba(0, 0, 0, 0.85), 0 0 50px -18px rgba(34, 197, 94, 0.28);
}

.repo-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 14px;
  gap: 8px;
}

.repo-card-name {
  font-size: 13px;
  font-weight: 500;
  color: white;
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: 1.3;
  word-break: break-all;
}

.repo-visibility {
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 2px 6px;
  border-radius: var(--radius);
  border: 1px solid #1e1e1e;
  color: #3a3a3a;
  background: var(--bg-subtle);
  flex-shrink: 0;
}

.repo-card-meta {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.repo-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
}

.repo-meta-label { color: #444; }

.repo-meta-value {
  color: #888;
  font-family: var(--font-mono);
}

/* ─── Confidence badges ─── */
.confidence-badge {
  font-size: 11px;
  font-weight: 500;
  padding: 2px 7px;
  border-radius: var(--radius);
  border: 1px solid;
  white-space: nowrap;
  font-family: var(--font-mono);
}

.confidence-high {
  background: rgba(34, 197, 94, 0.06);
  color: var(--green);
  border-color: rgba(34, 197, 94, 0.18);
}

.confidence-medium {
  background: rgba(234, 179, 8, 0.06);
  color: var(--yellow);
  border-color: rgba(234, 179, 8, 0.18);
}

.confidence-low {
  background: rgba(239, 68, 68, 0.06);
  color: var(--red);
  border-color: rgba(239, 68, 68, 0.18);
}

/* ─── Settings page ─── */
.settings-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 26px;
  margin-bottom: 14px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 24px 50px -30px rgba(0, 0, 0, 0.8);
}

.settings-section-title {
  font-size: 11px;
  font-weight: 600;
  color: #444;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 0;
  border-bottom: 1px solid #131313;
  gap: 12px;
}

.settings-row:last-of-type { border-bottom: none; }

.settings-row-info { flex: 1; min-width: 0; }

.settings-row-label {
  font-size: 13px;
  font-weight: 500;
  color: white;
  display: flex;
  align-items: center;
  gap: 8px;
}

.settings-row-hint {
  font-size: 12px;
  color: #444;
  margin-top: 2px;
}

.settings-plan-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding: 3px 8px;
  border-radius: var(--radius);
  border: 1px solid #222;
  color: #666;
  background: #0a0a0a;
  font-family: var(--font-mono);
}

.settings-plan-badge.pro {
  border-color: rgba(34, 197, 94, 0.3);
  color: var(--green);
  background: rgba(34, 197, 94, 0.05);
}

.settings-plan-badge.team {
  background: var(--accent);
  border-color: var(--accent);
  color: #000;
  font-weight: 700;
}

.danger-zone { border-color: rgba(239, 68, 68, 0.15); }

.danger-zone .settings-section-title {
  color: rgba(239, 68, 68, 0.7);
}

/* ─── Slider ─── */
.slider-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.slider-value {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
  min-width: 32px;
  text-align: right;
}

input[type="range"].zar-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 140px;
  height: 3px;
  background: #222;
  border-radius: 0;
  outline: none;
  cursor: pointer;
}

input[type="range"].zar-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  border: 2px solid var(--bg);
  box-shadow: 0 0 0 1px var(--accent), 0 0 8px rgba(34, 197, 94, 0.3);
}

input[type="range"].zar-slider::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  border: 2px solid var(--bg);
}

/* ─── Toggles ─── */
.toggle-track {
  width: 34px;
  height: 18px;
  background: #222;
  border-radius: 9999px;
  position: relative;
  transition: background 0.18s;
  cursor: pointer;
  flex-shrink: 0;
  border: 1px solid #2a2a2a;
}

.toggle-track.on {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.2);
}

.toggle-track.locked {
  background: #111;
  border-color: #1a1a1a;
  cursor: not-allowed;
}

.toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 12px;
  height: 12px;
  background: #555;
  border-radius: 9999px;
  transition: transform 0.18s, background 0.18s;
}

.toggle-track.on .toggle-thumb {
  transform: translateX(16px);
  background: #000;
}

.toggle-track.locked .toggle-thumb { background: #2a2a2a; }

.toggle-label-locked {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #333;
  margin-left: 8px;
}

/* ─── Inputs ─── */
.input {
  background: #090909;
  border: 1px solid #1e1e1e;
  border-radius: var(--radius);
  color: var(--t1);
  font-size: 13px;
  padding: 7px 11px;
  outline: none;
  transition: border-color 0.12s, box-shadow 0.12s;
  width: 100%;
  font-family: inherit;
}

.input:focus {
  border-color: rgba(34, 197, 94, 0.4);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.06);
}

.input::placeholder { color: #2a2a2a; }

/* ─── Pills ─── */
.freshness-pill {
  font-size: 11px;
  font-weight: 500;
  padding: 2px 7px;
  border-radius: var(--radius);
  border: 1px solid;
  white-space: nowrap;
}

.pill-green  { background: rgba(34,197,94,0.06);  color: var(--green); border-color: rgba(34,197,94,0.18); }
.pill-yellow { background: rgba(234,179,8,0.06); color: var(--yellow); border-color: rgba(234,179,8,0.18); }
.pill-red    { background: rgba(239,68,68,0.06);  color: var(--red);   border-color: rgba(239,68,68,0.18); }

/* ─── Dots ─── */
.dot { width: 7px; height: 7px; border-radius: 9999px; flex-shrink: 0; }
.dot-green  { background: var(--green); }
.dot-red    { background: var(--red); }
.dot-yellow { background: var(--yellow); }
.dot-muted  { background: #2a2a2a; }

/* ─── HTMX ─── */
.htmx-indicator { display: none; }
.htmx-request .htmx-indicator { display: inline-flex; }

/* ─── Toasts ─── */
#toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 6px;
  pointer-events: none;
  width: 300px;
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.toast {
  pointer-events: all;
  padding: 11px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  border-left-width: 3px;
  font-size: 13px;
  cursor: pointer;
  animation: toast-in 0.2s ease-out both;
  background: #0e0e0e;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
  color: var(--t1);
}

.toast-success { border-left-color: var(--green); }
.toast-error   { border-left-color: var(--red); }
.toast-info    { border-left-color: var(--accent); }

/* ─── Skeleton ─── */
.skeleton {
  background: linear-gradient(90deg, #111 0%, #181818 50%, #111 100%);
  background-size: 200% 100%;
  border-radius: var(--radius);
  animation: shimmer 1.5s ease-in-out infinite;
}

@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* ─── Progress bar ─── */
.progress-bar {
  height: 3px;
  border-radius: 0;
  transition: width 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ─── Status pulse (repo_run etc) ─── */
@keyframes pulse-ring {
  0%   { transform: scale(1); opacity: 0.7; }
  70%  { transform: scale(2.2); opacity: 0; }
  100% { transform: scale(2.2); opacity: 0; }
}

.status-pulse { position: relative; }
.status-pulse::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 9999px;
  background: currentColor;
  animation: pulse-ring 2s ease-out infinite;
}

/* ─── Code ─── */
code {
  font-family: var(--font-mono);
  font-size: 12px;
  background: #111;
  border: 1px solid #1e1e1e;
  border-radius: var(--radius);
  padding: 1px 5px;
  color: #aaa;
}

/* ─── Responsive utilities ─── */
@media (max-width: 520px) {
  .page-title  { font-size: 16px; }
  .stats-grid  { gap: 8px; }
  .stat-value  { font-size: 24px; }
}

/* ─── Utility classes (for templates not using Tailwind) ─── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border-width: 0;
}

.cursor-pointer { cursor: pointer; }
.text-muted { color: var(--t3); }
.mt-4 { margin-top: 16px; }
.mb-3 { margin-bottom: 12px; }
.mb-0 { margin-bottom: 0; }
.flex { display: flex; }
.items-center { align-items: center; }
.gap-2 { gap: 8px; }
.max-w-2xl { max-width: 680px; }
