/* ─── CSS Variables — matching caas-vibe-coder dark theme, accent = green ─── */
:root {
  --background: #0f1117;
  --background-alt: #161b22;
  --foreground: #D8DBE2;
  --foreground-muted: #9CA3AF;

  --sidebar-bg: #0a0f17;
  --sidebar-hover: #161f2c;
  --sidebar-active: rgba(16, 185, 129, 0.15);
  --sidebar-text: rgba(255,255,255,0.7);
  --sidebar-text-active: #FFFFFF;
  --sidebar-border: rgba(255,255,255,0.06);

  --card-bg: #161b22;
  --card-border: #2a2a44;

  --input-bg: #1e2433;
  --input-border: #2a2a44;
  --input-focus: #6B9BB8;

  --accent: #10b981;
  --accent-hover: #059669;
  --accent-subtle: #064e3b;

  /* Semantic — unchanged from caas-vibe-coder */
  --success: #34D399;
  --warning: #FBBF24;
  --danger: #F87171;
  --info: #60A5FA;

  --terminal-bg: #0a0e13;
}

/* ─── Base ─── */
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: 'Lato', system-ui, sans-serif;
  background: var(--background);
  color: var(--foreground);
  overflow: hidden;
  height: 100vh;
}

/* ─── Scrollbar ─── */
.scrollbar-thin::-webkit-scrollbar { width: 5px; }
.scrollbar-thin::-webkit-scrollbar-track { background: transparent; }
.scrollbar-thin::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 10px; }
.scrollbar-thin::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }

/* ─── Terminal log ─── */
.terminal { font-family: 'JetBrains Mono', monospace; font-size: 12.5px; line-height: 1.7; color: var(--foreground); }
.terminal .log-line { padding: 1px 0; white-space: pre-wrap; word-break: break-all; }
.terminal .log-line.err { color: var(--danger); }
.terminal .log-line.system { color: var(--info); font-style: italic; }
.terminal .log-line .timestamp { color: #3d4654; margin-right: 8px; user-select: none; font-size: 11px; }

/* ─── Spinner — same pattern as caas-vibe-coder but green ─── */
@keyframes spin { to { transform: rotate(360deg); } }
.spinner {
  width: 18px; height: 18px;
  border: 2px solid rgba(16,185,129,0.25);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

/* ─── Pulse dot ─── */
@keyframes pulse-dot { 0%,100% { opacity: 1; } 50% { opacity: 0.3; } }
.pulse-dot { animation: pulse-dot 2s ease-in-out infinite; }

/* ─── Thumbnail grid (grayscale → color effect) ─── */
.thumb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px;
  max-height: 200px;
  overflow-y: auto;
  overflow-x: hidden;
}
.thumb-card {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: 6px;
  overflow: hidden;
  background: #111;
}
.thumb-card img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: top;
  filter: grayscale(1) brightness(0.7);
  transition: filter 0.8s ease;
}
.thumb-card.captured img {
  filter: grayscale(0) brightness(1);
}
.thumb-card .slug-label {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 2px 6px;
  font-size: 9px; font-family: 'JetBrains Mono', monospace;
  color: rgba(255,255,255,0.7);
  background: linear-gradient(transparent, rgba(0,0,0,0.7));
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
@keyframes capture-pulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(16,185,129,0.5); }
  50% { box-shadow: 0 0 0 3px rgba(16,185,129,0); }
}
.thumb-card.capturing {
  animation: capture-pulse 1.5s ease-in-out infinite;
}

/* ─── Styled log entries ─── */
.log-banner {
  margin: 12px 0 8px;
  padding: 10px 14px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(16,185,129,0.12), rgba(16,185,129,0.04));
  border: 1px solid rgba(16,185,129,0.2);
  font-family: 'Montserrat', system-ui, sans-serif;
  font-weight: 700;
  font-size: 13px;
  color: var(--accent);
  letter-spacing: 0.02em;
}
.log-banner.complete {
  background: linear-gradient(135deg, rgba(52,211,153,0.15), rgba(52,211,153,0.05));
  border-color: rgba(52,211,153,0.3);
  color: var(--success);
}
.log-phase {
  margin: 10px 0 4px;
  padding: 6px 10px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 6px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  font-family: 'Montserrat', system-ui, sans-serif;
  font-weight: 600;
  font-size: 12px;
  color: #fff;
}
.log-phase .phase-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
}
.log-separator {
  height: 1px;
  background: linear-gradient(90deg, rgba(255,255,255,0.06), transparent);
  margin: 4px 0;
}
.log-kv {
  display: flex;
  gap: 8px;
  padding: 1px 0;
  font-size: 12px;
}
.log-kv .kv-key {
  color: var(--foreground-muted);
  min-width: 70px;
  text-align: right;
  flex-shrink: 0;
}
.log-kv .kv-val {
  color: var(--foreground);
}
.log-step {
  padding: 2px 0;
  display: flex;
  align-items: center;
  gap: 6px;
}
.log-step .step-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(16,185,129,0.1);
  color: var(--accent);
  font-size: 10px;
  font-weight: 600;
  font-family: 'JetBrains Mono', monospace;
}
.log-step .step-url {
  color: var(--foreground);
  font-size: 12px;
}
.log-info {
  padding: 2px 0;
  color: var(--info);
  font-size: 12px;
}
.log-success-mark {
  color: var(--success);
}
.log-fail-mark {
  color: var(--danger);
}

/* ─── Slide-in ─── */
@keyframes slide-up { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.animate-slide-up { animation: slide-up 0.3s ease-out; }

/* ─── Scale-in (login dialog) ─── */
@keyframes scale-in { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }
.animate-scale-in { animation: scale-in 0.35s cubic-bezier(0.16,1,0.3,1); }

/* ─── Sidebar item ─── */
.sidebar-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 14px; border-radius: 8px;
  cursor: pointer; transition: all 0.15s ease;
  color: var(--sidebar-text); font-size: 13px;
}
.sidebar-item:hover { background: var(--sidebar-hover); color: var(--sidebar-text-active); }
.sidebar-item.active { background: var(--sidebar-active); color: var(--accent); }

/* ─── Progress bar ─── */
.progress-track { height: 4px; background: rgba(16,185,129,0.12); border-radius: 2px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--accent); border-radius: 2px; transition: width 0.5s ease; }

/* ─── Mobile overlay ─── */
.sidebar-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.5);
  z-index: 40; display: none;
}
.sidebar-overlay.open { display: block; }

/* ─── Wizard SPA shell ─── */

/* Stepper bar */
.wizard-stepper {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 0 24px;
}
.wizard-step-item {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}
.wizard-step-item:last-child {
  flex: 0;
}
.step-circle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Montserrat', system-ui, sans-serif;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  border: 2px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.35);
  background: transparent;
}
.step-circle.active {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(16,185,129,0.1);
}
.step-circle.completed {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}
.step-label {
  font-family: 'Lato', system-ui, sans-serif;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  color: rgba(255,255,255,0.35);
  transition: color 0.2s ease;
}
.step-label.active {
  color: var(--accent);
}
.step-label.completed {
  color: rgba(255,255,255,0.7);
}
.step-connector {
  flex: 1;
  height: 1px;
  background: rgba(255,255,255,0.1);
  margin: 0 8px;
  transition: background 0.2s ease;
}
.step-connector.completed {
  background: var(--accent);
}

/* Wizard step containers */
.wizard-step-panel {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}
.wizard-step-panel.hidden {
  display: none;
}

/* History slide-over panel */
.history-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 400px;
  z-index: 60;
  display: flex;
  flex-direction: column;
  background: var(--card-bg);
  border-left: 1px solid var(--card-border);
  transform: translateX(100%);
  transition: transform 0.25s cubic-bezier(0.16,1,0.3,1);
  box-shadow: -8px 0 32px rgba(0,0,0,0.4);
}
.history-panel.open {
  transform: translateX(0);
}
.history-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 59;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.history-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

/* Wizard card — used inside step panels */
.wizard-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 24px;
}

/* ─── Responsive ─── */
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); position: fixed; z-index: 50; }
  .sidebar.open { transform: translateX(0); }
  .history-panel { width: 100%; }
  .wizard-stepper { padding: 0 12px; }
  .step-label { display: none; }
}

/* ─── View helpers (legacy sidebar layout) ─── */
#view-clone { min-height: 0; }

/* ─── Wizard Inputs ─── */
.wizard-input {
  width: 100%;
  padding: 12px 16px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  color: var(--foreground);
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}
.wizard-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(16,185,129,0.15);
}
.wizard-input::placeholder { color: rgba(255,255,255,0.25); }
.wizard-input.error { border-color: var(--danger); }

/* ─── Wizard Buttons ─── */
.wizard-btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 24px;
  background: linear-gradient(135deg, var(--accent), #059669);
  color: #fff; font-family: 'Montserrat', system-ui, sans-serif;
  font-weight: 600; font-size: 14px;
  border: none; border-radius: 8px; cursor: pointer;
  transition: opacity 0.2s, transform 0.1s;
}
.wizard-btn-primary:hover { opacity: 0.9; }
.wizard-btn-primary:active { transform: scale(0.98); }
.wizard-btn-primary:disabled { opacity: 0.4; cursor: not-allowed; }

.wizard-btn-secondary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 20px;
  background: transparent;
  color: var(--foreground-muted);
  font-family: 'Montserrat', system-ui, sans-serif;
  font-weight: 500; font-size: 13px;
  border: 1px solid rgba(255,255,255,0.1); border-radius: 8px; cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
.wizard-btn-secondary:hover { border-color: rgba(255,255,255,0.2); color: var(--foreground); }

.wizard-btn-danger {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 20px;
  background: rgba(239,68,68,0.1);
  color: var(--danger);
  font-family: 'Montserrat', system-ui, sans-serif;
  font-weight: 500; font-size: 13px;
  border: 1px solid rgba(239,68,68,0.2); border-radius: 8px; cursor: pointer;
  transition: background 0.2s;
}
.wizard-btn-danger:hover { background: rgba(239,68,68,0.2); }

/* ─── Recon Grid ─── */
.recon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
  padding: 16px 0;
}

.thumb-selectable {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  transition: border-color 0.2s, opacity 0.2s;
}
.thumb-selectable img {
  width: 100%; aspect-ratio: 16/10; object-fit: cover;
  filter: grayscale(1);
  transition: filter 0.8s ease;
}
.thumb-selectable.selected { border-color: var(--accent); }
.thumb-selectable.selected img { filter: grayscale(1); /* stays gray until clone */ }
.thumb-selectable.deselected { opacity: 0.4; border-color: rgba(255,255,255,0.05); }
.thumb-selectable .thumb-check {
  position: absolute; top: 8px; right: 8px;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
  opacity: 0; transition: opacity 0.2s;
}
.thumb-selectable.selected .thumb-check { opacity: 1; }
.thumb-selectable .thumb-label {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 4px 8px;
  background: linear-gradient(transparent, rgba(0,0,0,0.8));
  font-size: 11px; font-family: 'JetBrains Mono', monospace;
  color: rgba(255,255,255,0.8);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ─── Grayscale to Color Transition ─── */
.grayscale-to-color img { transition: filter 0.8s ease; }
.grayscale-to-color.captured img { filter: grayscale(0); }
.grayscale-to-color.capturing { animation: capture-pulse 1.5s ease-in-out infinite; }
.grayscale-to-color .capture-badge {
  position: absolute; top: 8px; right: 8px;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--success); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; opacity: 0; transform: scale(0.5);
  transition: opacity 0.3s, transform 0.3s;
}
.grayscale-to-color.captured .capture-badge { opacity: 1; transform: scale(1); }

/* ─── Card Loading Overlay (shown only when parent has .capturing) ─── */
.card-loading-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
  z-index: 2;
}
.grayscale-to-color.capturing .card-loading-overlay {
  opacity: 1;
}
.card-spinner {
  width: 20px; height: 20px;
  border: 2px solid rgba(16,185,129,0.25);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.card-status-text {
  font-size: 10px;
  font-family: 'JetBrains Mono', monospace;
  color: rgba(255,255,255,0.85);
  text-align: center;
  max-width: 90%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ─── Clone Activity Indicator ─── */
.clone-activity {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0 4px;
  font-size: 12px;
  color: var(--foreground-muted);
  font-family: 'JetBrains Mono', monospace;
}
.activity-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: activity-pulse 1.5s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes activity-pulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}
.clone-elapsed {
  color: var(--foreground-muted);
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  margin-left: 8px;
}

/* ─── Horizontal Progress ─── */
.progress-horizontal {
  width: 100%; height: 6px;
  background: rgba(255,255,255,0.06);
  border-radius: 3px; overflow: hidden;
  margin: 16px 0;
}
.progress-horizontal .progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #34d399);
  border-radius: 3px;
  transition: width 0.5s ease;
}
.progress-label {
  font-size: 12px; color: var(--foreground-muted);
  font-family: 'JetBrains Mono', monospace;
  margin-top: 4px;
}

/* ─── Domain Preview ─── */
.domain-preview {
  display: flex; align-items: center; gap: 16px;
  padding: 16px 20px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
}
.domain-preview img { width: 32px; height: 32px; border-radius: 6px; }
.domain-preview .dp-info { flex: 1; min-width: 0; }
.domain-preview .dp-title {
  font-family: 'Montserrat', system-ui, sans-serif;
  font-weight: 600; font-size: 14px; color: var(--foreground);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.domain-preview .dp-desc {
  font-size: 12px; color: var(--foreground-muted);
  margin-top: 2px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.domain-preview .dp-domain {
  font-size: 11px; font-family: 'JetBrains Mono', monospace;
  color: var(--accent); margin-top: 4px;
}

/* ─── Step Transitions ─── */
.step-enter { animation: step-slide-in 0.3s ease-out forwards; }
.step-exit { animation: step-slide-out 0.2s ease-in forwards; }
@keyframes step-slide-in {
  from { opacity: 0; transform: translateX(30px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes step-slide-out {
  from { opacity: 1; transform: translateX(0); }
  to { opacity: 0; transform: translateX(-30px); }
}

/* ─── Completion ─── */
.completion-hero {
  text-align: center; padding: 40px 20px;
}
.completion-hero .hero-icon {
  width: 64px; height: 64px; margin: 0 auto 16px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.completion-hero .hero-icon.success { background: rgba(16,185,129,0.15); }
.completion-hero .hero-icon.failure { background: rgba(239,68,68,0.15); }
.completion-hero h2 {
  font-family: 'Montserrat', system-ui, sans-serif;
  font-weight: 700; font-size: 24px; margin: 0 0 8px;
}
.stat-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px; margin: 20px 0;
}
.stat-card {
  padding: 12px 16px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 8px; text-align: center;
}
.stat-card .stat-value {
  font-family: 'Montserrat', system-ui, sans-serif;
  font-weight: 700; font-size: 20px; color: var(--accent);
}
.stat-card .stat-label {
  font-size: 11px; color: var(--foreground-muted);
  margin-top: 2px; text-transform: uppercase; letter-spacing: 0.05em;
}

/* ─── Collapsible Terminal ─── */
.terminal-collapsible {
  border-top: 1px solid rgba(255,255,255,0.06);
  margin-top: 16px;
}
.terminal-toggle {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; cursor: pointer;
  font-size: 12px; color: var(--foreground-muted);
  font-family: 'JetBrains Mono', monospace;
  background: none; border: none; width: 100%; text-align: left;
}
.terminal-toggle:hover { color: var(--foreground); }
.terminal-toggle .toggle-arrow {
  transition: transform 0.2s;
  font-size: 10px;
}
.terminal-toggle.open .toggle-arrow { transform: rotate(90deg); }
.terminal-body {
  max-height: 0; overflow: hidden;
  transition: max-height 0.3s ease;
}
.terminal-body.open {
  max-height: 250px; overflow-y: auto;
}

/* ─── Responsive ─── */
@media (max-width: 640px) {
  .recon-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
  .wizard-card { padding: 16px; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .domain-preview { flex-direction: column; text-align: center; }
}
@media (max-width: 480px) {
  .recon-grid { grid-template-columns: 1fr 1fr; }
}

/* ─── Dashboard ──────────────────────────────────────────────────────── */

/* Outer scroll container */
.dashboard-page {
  padding: 24px;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

/* Page header row */
.dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 12px;
}
.dashboard-header-left {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}
.dashboard-title {
  font-family: 'Montserrat', system-ui, sans-serif;
  font-weight: 700;
  font-size: 20px;
  color: var(--foreground);
  margin: 0;
  white-space: nowrap;
}
.dashboard-back-btn {
  flex-shrink: 0;
  padding: 6px 14px;
  font-size: 12px;
}

/* Auto-refresh bar */
.dashboard-refresh-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding: 8px 14px;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--card-border);
  border-radius: 8px;
}
.dashboard-refresh-left {
  display: flex;
  align-items: center;
  gap: 8px;
}
.dashboard-refresh-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}
.dashboard-refresh-label {
  font-size: 12px;
  font-family: 'JetBrains Mono', monospace;
  color: var(--foreground-muted);
}
.dashboard-refresh-btn {
  padding: 5px 12px;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Responsive grid for cards */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

/* Individual card overrides */
.dashboard-card {
  padding: 20px;
}
.dashboard-card--wide {
  /* Spans full width of its grid context */
  grid-column: 1 / -1;
}
.dashboard-content {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Section heading inside a card */
.dashboard-section-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}
.dashboard-section-icon {
  display: flex;
  align-items: center;
  color: var(--accent);
  flex-shrink: 0;
}
.dashboard-section-title {
  font-family: 'Montserrat', system-ui, sans-serif;
  font-weight: 600;
  font-size: 13px;
  color: var(--foreground);
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* System info key-value list */
.dashboard-info-list {
  display: grid;
  grid-template-columns: auto 1fr;
  row-gap: 6px;
  column-gap: 16px;
  margin: 0;
}
.dashboard-info-key {
  font-size: 12px;
  color: var(--foreground-muted);
  font-family: 'Lato', system-ui, sans-serif;
  white-space: nowrap;
}
.dashboard-info-val {
  font-size: 12px;
  color: var(--foreground);
  font-family: 'JetBrains Mono', monospace;
  word-break: break-all;
}

/* Status badge pills */
.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 600;
  font-family: 'Montserrat', system-ui, sans-serif;
  text-transform: capitalize;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.status-badge--running {
  background: rgba(96,165,250,0.12);
  color: var(--info);
  border: 1px solid rgba(96,165,250,0.25);
}
.status-badge--completed {
  background: rgba(52,211,153,0.12);
  color: var(--success);
  border: 1px solid rgba(52,211,153,0.25);
}
.status-badge--failed {
  background: rgba(248,113,113,0.12);
  color: var(--danger);
  border: 1px solid rgba(248,113,113,0.25);
}

/* Recent jobs table */
.jobs-table-wrapper {
  overflow-x: auto;
  max-height: 360px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.06);
}
.jobs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}
.jobs-table thead tr {
  background: rgba(255,255,255,0.03);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.jobs-table th {
  padding: 8px 12px;
  text-align: left;
  font-family: 'Montserrat', system-ui, sans-serif;
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--foreground-muted);
  white-space: nowrap;
}
.jobs-table tbody tr {
  border-bottom: 1px solid rgba(255,255,255,0.04);
  transition: background 0.15s ease;
}
.jobs-table tbody tr:last-child { border-bottom: none; }
.jobs-table tbody tr:hover { background: rgba(255,255,255,0.02); }
.jobs-table td {
  padding: 8px 12px;
  vertical-align: middle;
  color: var(--foreground);
}
.jobs-table__domain {
  min-width: 160px;
}
.jobs-table__domain code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--foreground);
  background: rgba(255,255,255,0.05);
  padding: 1px 5px;
  border-radius: 4px;
}
.jobs-table__id {
  display: block;
  font-size: 10px;
  font-family: 'JetBrains Mono', monospace;
  color: var(--foreground-muted);
  margin-top: 2px;
}
.jobs-table__num {
  text-align: right;
  font-family: 'JetBrains Mono', monospace;
  color: var(--foreground-muted);
}
.jobs-table__mono {
  font-family: 'JetBrains Mono', monospace;
  color: var(--foreground-muted);
  white-space: nowrap;
}
.jobs-table__time {
  font-size: 11.5px;
  color: var(--foreground-muted);
  white-space: nowrap;
}

/* Empty state */
.dashboard-empty {
  text-align: center;
  color: var(--foreground-muted);
  font-size: 13px;
  padding: 24px 0;
  margin: 0;
}

/* Transient error banner inside dashboard */
.dashboard-error {
  background: rgba(248,113,113,0.08);
  border-color: rgba(248,113,113,0.2);
  color: var(--danger);
  font-size: 12px;
  margin-bottom: 12px;
  padding: 12px 16px;
}

/* ─── Dashboard responsive ─── */
@media (max-width: 768px) {
  .dashboard-page { padding: 16px; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .dashboard-title { font-size: 17px; }
}
@media (max-width: 480px) {
  .dashboard-header { flex-direction: column; align-items: flex-start; }
  .jobs-table th:nth-child(4),
  .jobs-table td:nth-child(4) { display: none; } /* hide Duration on tiny screens */
}
