:root {
  /* NeoEHS brand — blue (Neo) + green (EHS) light theme */
  --neo-blue: #2b3a8c;
  --neo-blue-light: #3d52b8;
  --neo-blue-dark: #1e2860;
  --neo-green: #13a835;
  --neo-green-light: #0d8a2a;
  --neo-green-bright: #13a835;
  --neo-blue-dim: rgba(43, 58, 140, 0.08);
  --neo-green-dim: rgba(19, 168, 53, 0.1);
  --neo-gradient: linear-gradient(180deg, var(--neo-blue-light) 0%, var(--neo-green) 100%);
  --neo-gradient-h: linear-gradient(90deg, var(--neo-blue) 0%, var(--neo-green) 100%);

  --bg: #f4f6fa;
  --bg-elevated: #ffffff;
  --panel: #ffffff;
  --panel-2: #f8fafc;
  --border: #e2e8f0;
  --border-blue: rgba(43, 58, 140, 0.22);
  --border-green: rgba(19, 168, 53, 0.28);
  --text: #1e293b;
  --text-muted: #64748b;
  --danger: #dc2626;
  --radius: 14px;
  --shadow: 0 4px 20px rgba(15, 23, 42, 0.06);
  --shadow-blue: 0 8px 24px rgba(43, 58, 140, 0.12);
  --shadow-green: 0 8px 24px rgba(19, 168, 53, 0.12);
  --font: "Inter", system-ui, sans-serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

a { color: var(--neo-blue); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--neo-green); }

/* Layout */
.layout { display: grid; grid-template-columns: 280px 1fr; min-height: 100vh; }

.sidebar {
  background: var(--bg-elevated);
  border-right: 1px solid var(--border);
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: 2px 0 12px rgba(15, 23, 42, 0.04);
}
.sidebar::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: var(--neo-gradient);
  opacity: 0.7;
}

.brand {
  display: block;
  padding: 8px 4px 8px;
  text-decoration: none;
}
.brand-logo {
  width: 100%;
  max-width: 230px;
  height: auto;
  display: block;
  background: #ffffff;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.brand-tagline {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  margin: 0 4px 28px;
  line-height: 1.4;
  letter-spacing: 0.02em;
}
.brand-tagline span {
  background: var(--neo-gradient-h);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 600;
}

.nav-section {
  color: var(--neo-blue-light);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin: 20px 10px 8px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-radius: 10px;
  color: var(--text-muted);
  text-decoration: none;
  margin-bottom: 4px;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
  border: 1px solid transparent;
}
.nav-item:hover {
  background: var(--neo-blue-dim);
  color: var(--neo-blue-dark);
  border-color: var(--border-blue);
  text-decoration: none;
}
.nav-item.active {
  background: linear-gradient(90deg, var(--neo-blue-dim), var(--neo-green-dim));
  color: var(--neo-blue-dark);
  border-color: var(--border-green);
  border-left: 3px solid var(--neo-green);
  font-weight: 600;
}
.nav-icon { opacity: 0.85; font-size: 15px; }

.sidebar-footer {
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.user-badge {
  font-size: 13px;
  color: var(--text);
  font-weight: 600;
  margin-bottom: 6px;
}
.logout-link { font-size: 13px; color: var(--neo-blue); }
.logout-link:hover { color: var(--neo-green); }

.content {
  padding: 28px 36px 48px;
  background:
    radial-gradient(ellipse at 0% 0%, rgba(43, 58, 140, 0.05), transparent 45%),
    radial-gradient(ellipse at 100% 0%, rgba(19, 168, 53, 0.04), transparent 40%),
    var(--bg);
}

/* Page header */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 28px;
}
.page-header h1 {
  margin: 0 0 6px;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: var(--neo-gradient-h);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.page-header p { margin: 0; color: var(--text-muted); font-size: 14px; }
.breadcrumb { color: var(--text-muted); font-size: 13px; margin-bottom: 8px; }
.breadcrumb a { color: var(--neo-blue); }
.breadcrumb a:hover { color: var(--neo-green); }
.header-badges { display: flex; gap: 8px; flex-shrink: 0; }

/* Stat cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}
.stats-grid.compact { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stats-grid-extended { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.stat-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  display: flex;
  gap: 16px;
  align-items: flex-start;
  text-decoration: none;
  color: inherit;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--neo-gradient-h);
  opacity: 0;
  transition: opacity 0.25s;
}
.stat-card::after {
  content: "→";
  position: absolute;
  top: 16px;
  right: 16px;
  color: var(--neo-blue-light);
  opacity: 0;
  transition: opacity 0.2s, transform 0.2s;
  font-size: 16px;
}
.stat-card.clickable:hover {
  border-color: var(--border-green);
  box-shadow: var(--shadow-green);
  transform: translateY(-3px);
  text-decoration: none;
}
.stat-card.clickable:hover::before { opacity: 1; }
.stat-card.clickable:hover::after {
  opacity: 1;
  transform: translateX(3px);
  color: var(--neo-green);
}
.stat-card.mini { flex-direction: column; padding: 16px 20px; }
.stat-card.mini::after { display: none; }

.stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 18px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  flex-shrink: 0;
}
.stat-icon.active {
  background: #ecfdf3;
  color: #15803d;
  border-color: #bbf7d0;
}
.stat-icon.total { color: var(--neo-blue); border-color: var(--border-blue); background: var(--neo-blue-dim); }
.stat-icon.resolved { color: #15803d; background: #ecfdf3; border-color: #bbf7d0; }
.stat-icon.block { color: #f59e0b; }
.stat-icon.mobile { color: var(--neo-blue-light); }
.stat-icon.ppe { color: #ea580c; background: #fff7ed; border-color: #fed7aa; }
.stat-icon.fire { color: #dc2626; background: #fef2f2; border-color: #fecaca; }
.stat-icon.smoke { color: #64748b; background: #f1f5f9; border-color: #cbd5e1; }

.accent-ppe { border-color: rgba(234, 88, 12, 0.25); }
.accent-fire { border-color: rgba(220, 38, 38, 0.25); }
.accent-smoke { border-color: rgba(100, 116, 139, 0.25); }
.accent-fall { border-color: rgba(37, 99, 235, 0.25); }
.accent-nearmiss { border-color: rgba(239, 68, 68, 0.25); }
.accent-oil { border-color: rgba(180, 83, 9, 0.25); }
.accent-wet { border-color: rgba(8, 145, 178, 0.25); }
.accent-visibility { border-color: rgba(100, 116, 139, 0.35); }
.stat-icon.visibility { color: #64748b; background: #eef2f7; border-color: #cbd5e1; }
.stat-icon.wet { color: #0891b2; background: #ecfeff; border-color: #a5f3fc; }

.stat-body { flex: 1; min-width: 0; }
.stat-label {
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}
.stat-value {
  display: block;
  font-size: 32px;
  font-weight: 700;
  margin: 6px 0 4px;
  letter-spacing: -0.03em;
  color: var(--text);
}
.stat-hint { font-size: 11px; color: var(--neo-blue); opacity: 0.85; }

.accent-green .stat-value { color: #15803d; }
.accent-green { border-color: var(--border-green); }
.accent-muted .stat-value { color: var(--text-muted); }
.accent-orange { border-color: rgba(245, 158, 11, 0.25); }
.accent-purple { border-color: var(--border-blue); }

/* Panels */
.grid-2 {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 20px;
  margin-bottom: 28px;
}
.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(90deg, var(--neo-blue-dim), transparent);
}
.panel-header h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}
.link { font-size: 13px; color: var(--neo-blue); font-weight: 500; }
.link:hover { color: var(--neo-green); }

/* Drilldown */
.drilldown-cards { padding: 16px; display: grid; gap: 12px; }
.drill-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  border-radius: 12px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  color: inherit;
  text-decoration: none;
  transition: all 0.2s;
}
.drill-card:hover {
  border-color: var(--neo-blue-light);
  background: linear-gradient(90deg, var(--neo-blue-dim), var(--neo-green-dim));
  box-shadow: var(--shadow-blue);
  text-decoration: none;
}
.drill-card p { margin: 4px 0 0; color: var(--text-muted); font-size: 13px; }
.drill-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--neo-gradient);
  display: grid;
  place-items: center;
  font-size: 18px;
  flex-shrink: 0;
  color: #fff;
}
.badge {
  margin-left: auto;
  min-width: 40px;
  text-align: center;
  padding: 6px 14px;
  border-radius: 999px;
  background: #ecfdf3;
  color: #15803d;
  font-weight: 700;
  font-size: 14px;
  border: 1px solid #bbf7d0;
}

/* Severity */
.severity-list { padding: 8px 0; }
.severity-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 22px;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  transition: background 0.2s;
}
.severity-row:last-child { border-bottom: none; }
.severity-row.clickable:hover {
  background: linear-gradient(90deg, var(--neo-blue-dim), var(--neo-green-dim));
  text-decoration: none;
}
.severity-meta { text-align: right; }
.severity-meta strong { display: block; font-size: 22px; color: var(--text); }
.severity-meta span { font-size: 11px; color: var(--neo-blue); }

/* Pills */
.pill {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.pill.low { background: #ecfdf3; color: #15803d; border: 1px solid #bbf7d0; }
.pill.medium { background: #eef2ff; color: var(--neo-blue); border: 1px solid #c7d2fe; }
.pill.high { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.pill.status-active { background: #ecfdf3; color: #15803d; border: 1px solid #bbf7d0; }
.pill.status-resolved { background: #eef2ff; color: var(--neo-blue); border: 1px solid #c7d2fe; }

/* Table */
.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; }
th, td {
  padding: 13px 18px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  font-size: 13px;
}
th {
  color: var(--neo-blue-light);
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--panel-2);
}
tr.clickable { cursor: pointer; transition: background 0.15s; }
tr.clickable:hover { background: linear-gradient(90deg, var(--neo-blue-dim), transparent); }
.empty, .empty-state {
  text-align: center;
  color: var(--text-muted);
  padding: 40px 16px;
}

/* Filters */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  color: var(--text-muted);
  font-size: 13px;
}
.filter-btn {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.2s;
}
.filter-btn:hover {
  border-color: var(--neo-blue-light);
  color: var(--text);
  text-decoration: none;
}
.filter-btn.active {
  background: var(--neo-gradient-h);
  border-color: transparent;
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}

/* Detail */
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}
.detail-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 0;
  padding: 0;
}
.detail-list > div {
  display: grid;
  gap: 4px;
  padding: 14px 22px;
  border-bottom: 1px solid var(--border);
}
.detail-list .full { grid-column: 1 / -1; }
.detail-list dt {
  color: var(--neo-blue-light);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}
.detail-list dd { margin: 0; font-size: 14px; }
.summary-text { line-height: 1.6; color: var(--text-muted); }

.capture-image {
  width: 100%;
  display: block;
  max-height: 480px;
  object-fit: contain;
  background: #f1f5f9;
  border-top: 1px solid var(--border);
}
.detail-grid.detail-grid-compare {
  grid-template-columns: 1fr;
}
.capture-image-compare {
  max-height: 720px;
}
.capture-caption {
  margin: 0;
  padding: 10px 16px 14px;
  font-size: 13px;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
}

.actions-bar { display: flex; gap: 12px; }
.btn {
  display: inline-block;
  padding: 11px 20px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  font-family: var(--font);
  transition: all 0.2s;
}
.btn.primary {
  background: var(--neo-gradient-h);
  color: #fff;
  box-shadow: var(--shadow-green);
}
.btn.primary:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}
.btn.secondary {
  background: var(--bg-elevated);
  color: var(--text);
  border: 1px solid var(--border);
  text-decoration: none;
}
.btn.secondary:hover {
  border-color: var(--neo-green);
  color: var(--neo-green);
  background: #ecfdf3;
}
.btn.danger {
  background: #b91c1c;
  color: #fff;
  border: 1px solid #991b1b;
}
.btn.danger:hover {
  background: #991b1b;
  filter: brightness(1.05);
}
.btn.full { width: 100%; }

code {
  background: #f1f5f9;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 12px;
  color: var(--neo-blue);
  border: 1px solid var(--border);
}

/* Login */
.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(43, 58, 140, 0.06), transparent 50%),
    radial-gradient(ellipse at 80% 50%, rgba(19, 168, 53, 0.05), transparent 50%),
    var(--bg);
}
.login-shell {
  display: grid;
  grid-template-columns: 1fr 1fr;
  max-width: 960px;
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow), var(--shadow-blue);
  background: var(--bg-elevated);
}
.login-brand-panel {
  background: var(--panel-2);
  padding: 48px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-right: 1px solid var(--border);
  position: relative;
}
.login-brand-panel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--neo-gradient-h);
}
.login-logo {
  width: 100%;
  max-width: 300px;
  margin-bottom: 24px;
  background: #fff;
  padding: 12px 16px;
  border-radius: 10px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.login-tagline {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 16px;
  background: var(--neo-gradient-h);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.login-desc {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.65;
  margin: 0;
}
.login-card {
  background: var(--bg-elevated);
  padding: 48px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.login-card h2 {
  margin: 0 0 6px;
  font-size: 24px;
  color: var(--text);
}
.login-sub { color: var(--text-muted); font-size: 14px; margin: 0 0 28px; }
.login-card label {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
  font-size: 13px;
  font-weight: 500;
  color: var(--neo-blue-light);
}
.login-card input {
  padding: 13px 16px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  font-size: 14px;
  font-family: var(--font);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.login-card input:focus {
  outline: none;
  border-color: var(--neo-green);
  box-shadow: 0 0 0 3px var(--neo-green-dim);
}
.alert.error {
  background: #fef2f2;
  color: #b91c1c;
  padding: 12px 16px;
  border-radius: 10px;
  margin-bottom: 20px;
  font-size: 14px;
  border: 1px solid #fecaca;
}
.alert.success {
  background: #ecfdf3;
  color: #15803d;
  padding: 12px 16px;
  border-radius: 10px;
  margin-bottom: 20px;
  font-size: 14px;
  border: 1px solid #bbf7d0;
}

/* Settings */
.settings-panel { margin-bottom: 24px; }
.settings-form { padding: 8px 0 20px; }
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}
.toggle-row:last-of-type { border-bottom: none; }
.toggle-copy { display: grid; gap: 4px; }
.toggle-copy strong { font-size: 15px; color: var(--text); }
.toggle-copy span { font-size: 13px; color: var(--text-muted); line-height: 1.5; }
.toggle-switch {
  position: relative;
  width: 52px;
  height: 30px;
  flex-shrink: 0;
}
.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}
.toggle-slider {
  position: absolute;
  inset: 0;
  background: #cbd5e1;
  border-radius: 999px;
  transition: background 0.2s;
}
.toggle-slider::before {
  content: "";
  position: absolute;
  width: 24px;
  height: 24px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.15);
}
.toggle-switch input:checked + .toggle-slider {
  background: linear-gradient(90deg, var(--neo-blue), var(--neo-green));
}
.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(22px);
}
.settings-form .actions-bar {
  padding: 20px 22px 8px;
}
.settings-notes {
  padding: 18px 22px 24px;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.65;
}
.settings-notes p { margin: 0 0 12px; }
.settings-notes p:last-child { margin-bottom: 0; }

/* Live preview */
.live-preview-panel { margin-bottom: 24px; }
.live-preview-header {
  align-items: flex-start;
  gap: 16px;
}
.live-preview-subtitle {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--text-muted);
}
.camera-select-wrap {
  display: grid;
  gap: 6px;
  min-width: 220px;
}
.camera-select-wrap span {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.camera-select {
  appearance: none;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--panel-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2364748b' d='M1 1l5 5 5-5'/%3E%3C/svg%3E") no-repeat right 14px center;
  color: var(--text);
  font: inherit;
  font-size: 14px;
  padding: 10px 36px 10px 12px;
}
.camera-select:focus {
  outline: none;
  border-color: var(--neo-blue-light);
  box-shadow: 0 0 0 3px var(--neo-blue-dim);
}
.live-preview-viewport {
  padding: 0 22px 22px;
}
.live-preview-stream {
  display: block;
  width: 100%;
  max-height: 62vh;
  object-fit: contain;
  background: #0f172a;
  border-radius: 12px;
  border: 1px solid var(--border);
}

.drill-card.static-card {
  cursor: default;
}
.drill-card.static-card:hover {
  transform: none;
}
.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  padding: 18px 22px 24px;
}
.detail-label {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.stat-card.accent-blue {
  border-color: rgba(43, 58, 140, 0.25);
}

.page-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.demo-upload-form,
.demo-run-form,
.demo-clear-form {
  padding: 0 22px 22px;
}

.demo-upload-block + .demo-upload-block {
  margin-top: 18px;
}

.demo-upload-label {
  display: grid;
  gap: 4px;
  margin-bottom: 10px;
}

.demo-upload-label span {
  color: var(--text-muted);
  font-size: 13px;
}

.demo-upload-block input[type="file"] {
  width: 100%;
  font-size: 14px;
}

.demo-file-hint {
  margin: 8px 0 0;
  font-size: 13px;
}

.demo-file-hint.muted {
  color: var(--text-muted);
}

.demo-help {
  padding: 0 22px;
  margin: 0 0 16px;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.5;
}

.demo-progress-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 22px 8px;
}

.demo-progress-bar {
  flex: 1;
  height: 10px;
  background: var(--panel-2);
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.demo-progress-fill {
  height: 100%;
  background: var(--neo-gradient-h);
  transition: width 0.4s ease;
}

.demo-progress-label {
  min-width: 42px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}

.demo-step,
.demo-meta,
#demo-message {
  padding: 0 22px;
  margin: 8px 0;
  color: var(--text-muted);
  font-size: 14px;
}

.demo-state-running { background: rgba(43, 58, 140, 0.15); color: var(--neo-blue); }
.demo-state-completed { background: rgba(34, 197, 94, 0.15); color: #16a34a; }
.demo-state-error { background: rgba(239, 68, 68, 0.15); color: #dc2626; }
.demo-state-idle { background: var(--panel-2); color: var(--text-muted); }

@media (max-width: 1100px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .stats-grid, .stats-grid-extended, .grid-2, .detail-grid, .login-shell { grid-template-columns: 1fr; }
  .login-brand-panel { border-right: none; border-bottom: 1px solid var(--border); }
}

@media (max-width: 768px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .content { padding: 20px 16px; }
}
