/* ============================================================
   dashboard.css — Adoria Command Center
   Layout, Spacing, Dashboard-Components
   DO NOT add brand colors here — use var(--token) from cms-tokens.css
   ============================================================ */

/* ── Spacing Scale (matches cms-website Tailwind scale) ─────── */
:root {
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 24px;
  --sp-8: 32px;
  --sp-10: 40px;
  --sp-12: 48px;
  --sp-16: 64px;

  /* Status tokens */
  --status-live:    #22C55E;
  --status-soon:    #F59E0B;
  --status-planned: #64748B;
  --status-error:   #EF4444;

  /* Monospace font for technical values */
  --font-mono: 'JetBrains Mono', 'Fira Code', 'SF Mono', ui-monospace, monospace;

  /* Sidebar */
  --sidebar-w: 220px;
  --sidebar-bg: var(--navy);
  --sidebar-active-border: var(--brand);

  /* Layout */
  --main-bg: var(--background);

  /* Button radius */
  --rounded-btn: 10px;
}

/* ── Reset & Base ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--background, #F2F9FC);
  color: var(--text, #0A192F);
  line-height: 1.5;
}

a { color: inherit; text-decoration: none; }
a:hover { text-decoration: none; }

/* ── Utility: Monospace ───────────────────────────────────────── */
.mono { font-family: var(--font-mono); }

/* ── Micro Utility Spacing (Option B — based on --sp-* vars) ─── */
.p-2  { padding: var(--sp-2); }
.p-3  { padding: var(--sp-3); }
.p-4  { padding: var(--sp-4); }
.p-6  { padding: var(--sp-6); }
.px-3 { padding-left: var(--sp-3); padding-right: var(--sp-3); }
.px-4 { padding-left: var(--sp-4); padding-right: var(--sp-4); }
.py-1 { padding-top: var(--sp-1); padding-bottom: var(--sp-1); }
.py-2 { padding-top: var(--sp-2); padding-bottom: var(--sp-2); }
.mb-2 { margin-bottom: var(--sp-2); }
.mb-3 { margin-bottom: var(--sp-3); }
.mb-4 { margin-bottom: var(--sp-4); }
.mb-6 { margin-bottom: var(--sp-6); }
.mb-8 { margin-bottom: var(--sp-8); }
.mt-2 { margin-top: var(--sp-2); }
.mt-4 { margin-top: var(--sp-4); }
.mt-6 { margin-top: var(--sp-6); }
.gap-4 { gap: var(--sp-4); }
.gap-6 { gap: var(--sp-6); }

/* ── Shell Layout ─────────────────────────────────────────────── */
.dash-shell {
  min-height: 100vh;
}

.dash-main {
  margin-left: var(--sidebar-w);
  padding: var(--sp-8);
  background: var(--main-bg);
  min-height: 100vh;
}

/* ── Sidebar ──────────────────────────────────────────────────── */
.dash-sidebar {
  background: var(--navy, #0A192F);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-w);
  height: 100vh;
  overflow-y: auto;
  z-index: 100;
}

.sidebar-logo {
  padding: var(--sp-6) var(--sp-4);
  border-bottom: 1px solid rgba(255,255,255,0.07);
}

.sidebar-logo-mark {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  text-decoration: none;
}

.sidebar-logo-icon {
  width: 32px;
  height: 32px;
  background: var(--brand, #00B8E6);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  color: #fff;
  flex-shrink: 0;
}

.sidebar-logo-text {
  display: flex;
  flex-direction: column;
}

.sidebar-logo-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-on-dark, #D8EDF5);
  line-height: 1.2;
}

.sidebar-logo-client {
  font-size: 10px;
  font-weight: 500;
  color: var(--text-muted, #3B5C7A);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 2px;
}

.sidebar-nav {
  padding: var(--sp-4) var(--sp-3);
  flex: 1;
}

.sidebar-nav-section {
  margin-bottom: var(--sp-6);
}

.sidebar-nav-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted, #3B5C7A);
  padding: 0 var(--sp-3);
  margin-bottom: var(--sp-2);
}

.nav-item {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-2) var(--sp-3);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-on-dark, #D8EDF5);
  opacity: 0.7;
  cursor: pointer;
  transition: background var(--duration-quick, 150ms) var(--ease-corporate, cubic-bezier(0.4,0,0.2,1)),
              opacity var(--duration-quick, 150ms) var(--ease-corporate, cubic-bezier(0.4,0,0.2,1));
  text-decoration: none;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  position: relative;
  border-left: 2px solid transparent;
  margin-bottom: 2px;
}

.nav-item:hover {
  background: var(--navy-muted, #1A3050);
  opacity: 1;
}

.nav-item.active {
  background: var(--navy-deep, #0D1E2E);
  opacity: 1;
  border-left-color: var(--brand, #00B8E6);
}

.nav-item-icon {
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 14px;
}

.nav-item-text { flex: 1; }

.nav-item-badge {
  margin-left: auto;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 9999px;
  line-height: 1.4;
}

.nav-badge-live {
  background: rgba(34, 197, 94, 0.15);
  color: var(--status-live);
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.nav-badge-soon {
  background: rgba(245, 158, 11, 0.15);
  color: var(--status-soon);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

/* Admin-locked nav items */
.nav-item-locked {
  opacity: 0.35;
  cursor: default;
  pointer-events: none;
}

.nav-lock-icon {
  font-size: 11px;
  margin-left: auto;
}

/* Sidebar footer */
.sidebar-footer {
  padding: var(--sp-4);
  border-top: 1px solid rgba(255,255,255,0.07);
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-bottom: var(--sp-3);
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--brand-tint, rgba(0,184,230,0.12));
  border: 1px solid var(--brand, #00B8E6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--brand, #00B8E6);
  flex-shrink: 0;
  text-transform: uppercase;
}

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

.user-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-on-dark, #D8EDF5);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-email {
  font-size: 11px;
  color: var(--text-muted, #3B5C7A);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-logout {
  display: block;
  width: 100%;
  text-align: center;
  font-size: 12px;
  font-weight: 500;
  color: var(--brand, #00B8E6);
  background: rgba(0,184,230,0.08);
  border: 1px solid rgba(0,184,230,0.2);
  border-radius: 8px;
  padding: var(--sp-2) var(--sp-3);
  cursor: pointer;
  text-decoration: none;
  transition: background var(--duration-quick, 150ms) var(--ease-corporate, cubic-bezier(0.4,0,0.2,1));
}

.btn-logout:hover {
  background: rgba(0,184,230,0.15);
}

/* ── Page Header ──────────────────────────────────────────────── */
.page-header {
  margin-bottom: var(--sp-8);
}

.page-header h1 {
  font-size: 28px;
  font-weight: 700;
  color: var(--text, #0A192F);
  margin: 0 0 var(--sp-1) 0;
  line-height: 1.2;
}

.page-header .subtitle {
  font-size: 14px;
  color: var(--text-muted, #3B5C7A);
  margin: 0;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: 13px;
  color: var(--text-muted, #3B5C7A);
  margin-bottom: var(--sp-3);
}

.breadcrumb a {
  color: var(--text-muted, #3B5C7A);
  transition: color var(--duration-quick, 150ms);
}

.breadcrumb a:hover { color: var(--brand, #00B8E6); }

.breadcrumb-sep { opacity: 0.4; }

.breadcrumb-current {
  color: var(--text, #0A192F);
  font-weight: 500;
}

/* ── Section Headers ──────────────────────────────────────────── */
.section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--sp-4);
  margin-bottom: var(--sp-4);
}
.section-header-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.section-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text, #0A192F);
  margin: 0;
  line-height: 1.2;
}
.section-subtitle {
  font-size: 12px;
  color: var(--text-muted, #3B5C7A);
  margin: 0;
  line-height: 1.4;
}
.review-subtitle-warn { color: var(--status-soon, #F59E0B); font-weight: 500; }

.section-link {
  font-size: 13px;
  color: var(--brand, #00B8E6);
  text-decoration: none;
  transition: color var(--duration-quick, 150ms);
}

.section-link:hover { opacity: 0.8; }

/* ── Cards ────────────────────────────────────────────────────── */
.card {
  background: var(--surface, #FFFFFF);
  border: 1px solid var(--border, rgba(10,25,47,0.10));
  border-radius: var(--radius-card, 14px);
  padding: var(--sp-6);
  box-shadow: var(--shadow-soft);
  transition: transform var(--duration-base, 250ms) var(--ease-corporate, cubic-bezier(0.4,0,0.2,1)),
              box-shadow var(--duration-base, 250ms) var(--ease-corporate, cubic-bezier(0.4,0,0.2,1));
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
}

.card-no-hover:hover {
  transform: none;
  box-shadow: var(--shadow-soft);
}

/* ── Grid Layouts ─────────────────────────────────────────────── */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-6);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-6);
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-6);
}

/* ── Stat Cards ───────────────────────────────────────────────── */
.stat-card {
  background: var(--surface, #FFFFFF);
  border: 1px solid var(--border, rgba(10,25,47,0.10));
  border-radius: var(--radius-card, 14px);
  padding: var(--sp-6);
  box-shadow: var(--shadow-soft);
}

.stat-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted, #3B5C7A);
  margin: 0 0 var(--sp-2) 0;
}

.stat-value {
  font-size: 32px;
  font-weight: 700;
  color: var(--text, #0A192F);
  font-family: var(--font-mono);
  line-height: 1;
  margin: 0 0 var(--sp-2) 0;
}

.stat-value.cost-value {
  color: var(--brand, #00B8E6);
  font-size: 26px;
}

.stat-subtext {
  font-size: 12px;
  color: var(--text-muted, #3B5C7A);
  margin: 0;
}

/* ── Agent Status Cards ───────────────────────────────────────── */
.agent-card {
  background: var(--surface, #FFFFFF);
  border: 1px solid var(--border, rgba(10,25,47,0.10));
  border-radius: var(--radius-card, 14px);
  padding: var(--sp-6);
  box-shadow: var(--shadow-soft);
  transition: transform var(--duration-base, 250ms) var(--ease-corporate, cubic-bezier(0.4,0,0.2,1)),
              box-shadow var(--duration-base, 250ms) var(--ease-corporate, cubic-bezier(0.4,0,0.2,1));
  display: flex;
  flex-direction: column;
}

.agent-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
}

.agent-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--sp-2);
}

.agent-name {
  font-size: 18px;
  font-weight: 600;
  color: var(--text, #0A192F);
  margin: 0;
}

.agent-desc {
  font-size: 13px;
  color: var(--text-muted, #3B5C7A);
  margin: 0 0 var(--sp-4) 0;
}

.agent-divider {
  border: none;
  border-top: 1px solid var(--border, rgba(10,25,47,0.10));
  margin: 0 0 var(--sp-4) 0;
}

.agent-inline-stats {
  display: flex;
  gap: var(--sp-6);
  margin-bottom: var(--sp-4);
}

.agent-inline-stat {
  font-size: 12px;
  color: var(--text-muted, #3B5C7A);
}

.agent-inline-stat strong {
  color: var(--text, #0A192F);
  font-weight: 600;
}

.agent-workflows {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--sp-4) 0;
}

.agent-workflows li {
  font-size: 13px;
  padding: var(--sp-1) 0;
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.wf-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.wf-dot-live { background: var(--status-live); }
.wf-dot-planned { background: var(--border-strong, rgba(10,25,47,0.18)); }

.wf-label-live { color: var(--text, #0A192F); }
.wf-label-planned { color: var(--text-muted, #3B5C7A); }

.agent-card-footer {
  margin-top: auto;
  padding-top: var(--sp-4);
}

.agent-link {
  font-size: 13px;
  color: var(--brand, #00B8E6);
  text-decoration: none;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  transition: opacity var(--duration-quick, 150ms);
}

.agent-link:hover { opacity: 0.75; }

/* Agent card coming-soon variant */
.agent-card-soon {
  opacity: 0.65;
}

.agent-card-soon:hover {
  transform: none;
  box-shadow: var(--shadow-soft);
}

/* ── Status Badges ────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 9999px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  flex-shrink: 0;
}

.badge-live {
  background: rgba(34, 197, 94, 0.12);
  color: var(--status-live);
  border: 1px solid rgba(34, 197, 94, 0.25);
}

.badge-beta {
  background: oklch(0.78 0.13 75);
  color: oklch(0.25 0.05 75);
}

.badge-soon {
  background: rgba(245, 158, 11, 0.12);
  color: var(--status-soon);
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.badge-planned {
  background: rgba(100, 116, 139, 0.12);
  color: var(--status-planned);
  border: 1px solid rgba(100, 116, 139, 0.25);
}

.badge-error {
  background: rgba(239, 68, 68, 0.12);
  color: var(--status-error);
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.badge-agent-yuni {
  background: var(--brand-tint, rgba(0,184,230,0.10));
  color: var(--brand, #00B8E6);
  border: 1px solid var(--border-brand, rgba(0,184,230,0.30));
}

.badge-test {
  background: rgba(245, 158, 11, 0.12);
  color: var(--status-soon);
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.badge-role-admin {
  background: var(--brand-tint, rgba(0,184,230,0.10));
  color: var(--brand, #00B8E6);
  border: 1px solid rgba(0,184,230,0.25);
}

.badge-role-customer {
  background: var(--surface-muted, #EBF6FB);
  color: var(--text-muted, #3B5C7A);
  border: 1px solid var(--border, rgba(10,25,47,0.10));
}

/* ── Confidence Badges ────────────────────────────────────────── */
.badge-conf-high {
  background: rgba(34, 197, 94, 0.10);
  color: #16a34a;
  border: 1px solid rgba(34, 197, 94, 0.25);
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 6px;
  white-space: nowrap;
}

.badge-conf-mid {
  background: rgba(255, 165, 0, 0.10);
  color: #b45309;
  border: 1px solid rgba(255, 165, 0, 0.25);
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 6px;
  white-space: nowrap;
}

.badge-conf-low {
  background: rgba(239, 68, 68, 0.10);
  color: #dc2626;
  border: 1px solid rgba(239, 68, 68, 0.25);
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 6px;
  white-space: nowrap;
}

/* ── Run Table ────────────────────────────────────────────────── */
.run-table-wrap {
  background: var(--surface, #FFFFFF);
  border: 1px solid var(--border, rgba(10,25,47,0.10));
  border-radius: var(--radius-card, 14px);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.run-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.run-table th {
  background: var(--surface-muted, #EBF6FB);
  color: var(--text-muted, #3B5C7A);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding: var(--sp-3) var(--sp-4);
  text-align: left;
  border-bottom: 1px solid var(--border, rgba(10,25,47,0.10));
  white-space: nowrap;
}

.run-table td {
  padding: var(--sp-3) var(--sp-4);
  border-bottom: 1px solid var(--border, rgba(10,25,47,0.06));
  color: var(--text, #0A192F);
  vertical-align: middle;
}

.run-table tr:last-child td { border-bottom: none; }

.run-table tbody tr:hover { background: var(--surface-muted, #EBF6FB); }
.run-table tbody tr { transition: background var(--duration-quick, 150ms); }

/* Error row expandable */
.run-row-error { cursor: pointer; }
.run-row-incomplete { cursor: pointer; }

.run-error-detail {
  background: rgba(239, 68, 68, 0.06);
  border-left: 3px solid var(--status-error);
}

.run-row-incomplete + .run-error-detail {
  background: rgba(254, 231, 92, 0.08);
  border-left: 3px solid #D4AC0D;
}

.run-error-detail td {
  padding: var(--sp-3) var(--sp-4) var(--sp-3) var(--sp-6);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--status-error);
}

.run-row-incomplete + .run-error-detail td {
  color: #A07800;
}

.run-error-detail.hidden { display: none; }

/* Container badge */
.container-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--brand-tint, rgba(0,184,230,0.10));
  color: var(--text, #0A192F);
  white-space: nowrap;
}

/* Model cell */
.model-cell {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted, #3B5C7A);
  cursor: default;
}

/* Run ID cell */
.run-id {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted, #3B5C7A);
  cursor: default;
}

/* Tokens */
.token-count {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted, #3B5C7A);
}

/* Cost cell */
.cost-cell {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--brand, #00B8E6);
  white-space: nowrap;
}

/* Status cell */
.status-success {
  color: var(--status-live);
  font-weight: 500;
}

.status-error {
  color: var(--status-error);
  font-weight: 500;
}

.status-incomplete {
  color: #A07800;
  font-weight: 500;
}

/* ── Filter Bar ───────────────────────────────────────────────── */
.filter-bar {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-bottom: var(--sp-4);
  flex-wrap: wrap;
}

.filter-input {
  background: var(--surface, #FFFFFF);
  border: 1px solid var(--border, rgba(10,25,47,0.10));
  border-radius: var(--radius-input, 10px);
  padding: var(--sp-2) var(--sp-3);
  font-size: 13px;
  color: var(--text, #0A192F);
  font-family: inherit;
  outline: none;
  transition: border-color var(--duration-quick, 150ms);
}

.filter-input:focus {
  border-color: var(--brand, #00B8E6);
}

.filter-input::placeholder {
  color: var(--text-muted, #3B5C7A);
  opacity: 0.6;
}

.filter-select {
  appearance: none;
  background: var(--surface, #FFFFFF) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%233B5C7A' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 10px center;
  padding-right: 28px;
  border: 1px solid var(--border, rgba(10,25,47,0.10));
  border-radius: var(--radius-input, 10px);
  padding: var(--sp-2) 28px var(--sp-2) var(--sp-3);
  font-size: 13px;
  color: var(--text, #0A192F);
  font-family: inherit;
  cursor: pointer;
  outline: none;
  transition: border-color var(--duration-quick, 150ms);
}

.filter-select:focus {
  border-color: var(--brand, #00B8E6);
}

.filter-reset {
  font-size: 12px;
  color: var(--brand, #00B8E6);
  cursor: pointer;
  background: none;
  border: none;
  padding: var(--sp-2);
  font-family: inherit;
}

.filter-count {
  font-size: 12px;
  color: var(--text-muted, #3B5C7A);
  margin-left: auto;
}

/* ── Pagination ───────────────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-4);
  border-top: 1px solid var(--border, rgba(10,25,47,0.08));
  font-size: 13px;
  color: var(--text-muted, #3B5C7A);
}

.pagination-btns {
  display: flex;
  gap: var(--sp-2);
}

.btn-page {
  background: var(--surface, #FFFFFF);
  border: 1px solid var(--border, rgba(10,25,47,0.10));
  border-radius: 8px;
  padding: var(--sp-1) var(--sp-3);
  font-size: 12px;
  cursor: pointer;
  color: var(--text, #0A192F);
  transition: background var(--duration-quick, 150ms);
}

.btn-page:hover:not(:disabled) {
  background: var(--surface-muted, #EBF6FB);
}

.btn-page:disabled {
  opacity: 0.35;
  cursor: default;
}

/* ── SVG Chart ────────────────────────────────────────────────── */
.chart-wrap {
  background: var(--surface, #FFFFFF);
  border: 1px solid var(--border, rgba(10,25,47,0.10));
  border-radius: var(--radius-card, 14px);
  padding: var(--sp-6);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.chart-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text, #0A192F);
  margin: 0 0 var(--sp-4) 0;
}

.chart-svg {
  width: 100%;
  height: 160px;
  overflow: visible;
}

.chart-tooltip {
  position: fixed;
  background: var(--navy, #0A192F);
  color: var(--text-on-dark, #D8EDF5);
  border-radius: 8px;
  padding: var(--sp-2) var(--sp-3);
  font-size: 12px;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--duration-quick, 150ms);
  z-index: 100;
  white-space: nowrap;
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
}

.chart-tooltip.visible { opacity: 1; }

/* ── Generic custom tooltip (data-tip) ───────────────────────── */
.cms-tooltip {
  position: fixed;
  background: var(--navy, #0A192F);
  color: var(--text-on-dark, #D8EDF5);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 12px;
  line-height: 1.5;
  pointer-events: none;
  opacity: 0;
  transition: opacity 120ms ease;
  z-index: 9999;
  white-space: normal;          /* war: nowrap — Fix für Umbrüche */
  box-shadow: 0 4px 20px rgba(0,0,0,0.30);
  min-width: 150px;
  max-width: 240px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.cms-tooltip.visible { opacity: 1; }

.tip-header {
  display: block;
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-on-dark, #D8EDF5);
  margin-bottom: 3px;
}
.tip-line {
  display: block;
  font-size: 12px;
  color: oklch(0.85 0.02 220);
  font-variant-numeric: tabular-nums;
}
.tip-sep {
  border: none;
  border-top: 1px solid rgba(255,255,255,0.15);
  margin: 4px 0;
  width: 100%;
}

/* Tooltip-trigger Icon */
.tip-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--text-muted, #6B8CA4);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
  margin-left: 4px;
  cursor: default;
  vertical-align: middle;
  flex-shrink: 0;
  opacity: 0.75;
  transition: opacity 120ms;
}
.tip-icon:hover { opacity: 1; }

/* ── Tab System ───────────────────────────────────────────────── */
.tab-bar {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border, rgba(10,25,47,0.10));
  margin-bottom: var(--sp-6);
}

.tab-btn {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: var(--sp-3) var(--sp-4);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted, #3B5C7A);
  cursor: pointer;
  font-family: inherit;
  transition: color var(--duration-quick, 150ms), border-color var(--duration-quick, 150ms);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  margin-bottom: -1px;
}

.tab-btn:hover:not(.tab-planned) {
  color: var(--text, #0A192F);
}

.tab-btn.active {
  color: var(--text, #0A192F);
  font-weight: 600;
  border-bottom-color: var(--brand, #00B8E6);
}

.tab-planned {
  opacity: 0.45;
  cursor: default;
}

.tab-planned-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--status-planned);
  flex-shrink: 0;
}

.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ── System Health Bar ────────────────────────────────────────── */
.health-bar {
  background: var(--surface, #FFFFFF);
  border: 1px solid var(--border, rgba(10,25,47,0.10));
  border-radius: var(--radius-card, 14px);
  padding: var(--sp-4) var(--sp-6);
  box-shadow: var(--shadow-soft);
  display: flex;
  align-items: center;
  gap: var(--sp-6);
  flex-wrap: wrap;
  margin-top: var(--sp-6);
}

.health-bar-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted, #3B5C7A);
  flex-shrink: 0;
}

.health-indicators {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  flex-wrap: wrap;
}

.health-item {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: 12px;
  color: var(--text, #0A192F);
}

.health-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.health-dot-ok { background: var(--status-live); }
.health-dot-error { background: var(--status-error); }

.health-divider {
  width: 1px;
  height: 16px;
  background: var(--border, rgba(10,25,47,0.10));
  flex-shrink: 0;
}

.health-last-run {
  margin-left: auto;
  font-size: 12px;
  color: var(--text-muted, #3B5C7A);
}

/* ── Coming-Soon Placeholder ──────────────────────────────────── */
.placeholder-card {
  background: var(--surface, #FFFFFF);
  border: 1px solid var(--border, rgba(10,25,47,0.10));
  border-radius: var(--radius-card, 14px);
  padding: var(--sp-12) var(--sp-6);
  box-shadow: var(--shadow-soft);
  text-align: center;
  max-width: 480px;
  margin: 0 auto;
}

.placeholder-icon {
  font-size: 48px;
  margin-bottom: var(--sp-4);
  opacity: 0.5;
}

.placeholder-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text, #0A192F);
  margin: 0 0 var(--sp-2) 0;
}

.placeholder-desc {
  font-size: 14px;
  color: var(--text-muted, #3B5C7A);
  margin: 0 0 var(--sp-4) 0;
  line-height: 1.6;
}

.placeholder-timeline {
  font-size: 12px;
  color: var(--text-muted, #3B5C7A);
  font-style: italic;
  margin: 0;
}

/* Skeleton ghost for coming-soon pages */
.skeleton {
  background: linear-gradient(90deg, var(--surface-muted, #EBF6FB) 25%, var(--border, rgba(10,25,47,0.08)) 50%, var(--surface-muted, #EBF6FB) 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s infinite;
  border-radius: 6px;
  opacity: 0.4;
}

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

/* ── Coming-Soon Full Page Overlay ────────────────────────────── */
.coming-soon-overlay {
  position: absolute;
  inset: 0;
  background: rgba(242, 249, 252, 0.9);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  border-radius: var(--radius-card, 14px);
}

.coming-soon-container {
  position: relative;
}

.coming-soon-content-area {
  opacity: 0.2;
  pointer-events: none;
}

/* ── Buttons ──────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-4);
  border-radius: var(--rounded-btn);
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  border: none;
  transition: opacity var(--duration-quick, 150ms), background var(--duration-quick, 150ms);
}

.btn:hover { opacity: 0.85; }

.btn-primary {
  background: var(--brand, #00B8E6);
  color: #fff;
}

.btn-secondary {
  background: var(--surface-muted, #EBF6FB);
  color: var(--text, #0A192F);
  border: 1px solid var(--border, rgba(10,25,47,0.10));
}

.btn-danger {
  background: rgba(239,68,68,0.1);
  color: var(--status-error);
  border: 1px solid rgba(239,68,68,0.2);
}

.btn-sm {
  padding: var(--sp-1) var(--sp-3);
  font-size: 12px;
  border-radius: 8px;
}

/* ── Forms ────────────────────────────────────────────────────── */
.form-group {
  margin-bottom: var(--sp-4);
}

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted, #3B5C7A);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: var(--sp-2);
}

.form-input, .form-select {
  width: 100%;
  background: var(--surface, #FFFFFF);
  border: 1px solid var(--border, rgba(10,25,47,0.10));
  border-radius: var(--radius-input, 10px);
  padding: var(--sp-3) var(--sp-4);
  font-size: 14px;
  color: var(--text, #0A192F);
  font-family: inherit;
  outline: none;
  transition: border-color var(--duration-quick, 150ms);
}

.form-input:focus, .form-select:focus {
  border-color: var(--brand, #00B8E6);
}

.form-input:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  background: var(--surface-muted, #EBF6FB);
}

.form-hint {
  font-size: 11px;
  color: var(--text-muted, #3B5C7A);
  margin-top: var(--sp-1);
}

.readonly-badge {
  font-size: 10px;
  font-weight: 400;
  text-transform: none;
  color: var(--text-muted, #3B5C7A);
  margin-left: 6px;
  opacity: 0.7;
}

/* ── Settings Sections ────────────────────────────────────────── */
.settings-section {
  background: var(--surface, #FFFFFF);
  border: 1px solid var(--border, rgba(10,25,47,0.10));
  border-radius: var(--radius-card, 14px);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  margin-bottom: var(--sp-6);
}

.settings-section-header {
  padding: var(--sp-4) var(--sp-6);
  border-bottom: 1px solid var(--border, rgba(10,25,47,0.08));
  background: var(--surface-muted, #EBF6FB);
}

.settings-section-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text, #0A192F);
  margin: 0;
}

.settings-section-body {
  padding: var(--sp-6);
}

.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-4) var(--sp-6);
}

.settings-field { display: flex; flex-direction: column; gap: var(--sp-2); }

/* ── Users Table ──────────────────────────────────────────────── */
.users-table-wrap {
  background: var(--surface, #FFFFFF);
  border: 1px solid var(--border, rgba(10,25,47,0.10));
  border-radius: var(--radius-card, 14px);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.users-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.users-table th {
  background: var(--surface-muted, #EBF6FB);
  color: var(--text-muted, #3B5C7A);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding: var(--sp-3) var(--sp-4);
  text-align: left;
  border-bottom: 1px solid var(--border, rgba(10,25,47,0.10));
}

.users-table td {
  padding: var(--sp-3) var(--sp-4);
  border-bottom: 1px solid var(--border, rgba(10,25,47,0.06));
  vertical-align: middle;
}

.users-table tr:last-child td { border-bottom: none; }
.users-table tbody tr:hover { background: var(--surface-muted, #EBF6FB); }

.user-avatar-sm {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--brand-tint, rgba(0,184,230,0.10));
  border: 1px solid var(--brand, #00B8E6);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--brand, #00B8E6);
  text-transform: uppercase;
  flex-shrink: 0;
  vertical-align: middle;
  margin-right: var(--sp-2);
}

/* ── Invite Form Collapsible ──────────────────────────────────── */
.invite-form-wrap {
  background: var(--surface-muted, #EBF6FB);
  border: 1px solid var(--border, rgba(10,25,47,0.10));
  border-radius: var(--radius-card, 14px);
  padding: var(--sp-6);
  margin-bottom: var(--sp-6);
  transition: opacity var(--duration-base, 250ms) var(--ease-corporate, cubic-bezier(0.4,0,0.2,1));
}

.invite-form-wrap.hidden {
  display: none;
}

.invite-form-row {
  display: flex;
  gap: var(--sp-3);
  align-items: flex-end;
  flex-wrap: wrap;
}

.invite-form-row .form-group {
  flex: 1;
  min-width: 180px;
  margin-bottom: 0;
}

/* ── Flash Messages ───────────────────────────────────────────── */
.flash {
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--radius-card, 14px);
  font-size: 13px;
  margin-bottom: var(--sp-4);
}

.flash-success {
  background: rgba(34,197,94,0.10);
  border: 1px solid rgba(34,197,94,0.25);
  color: #166534;
}

.flash-error {
  background: rgba(239,68,68,0.08);
  border: 1px solid rgba(239,68,68,0.20);
  color: var(--status-error);
}

.flash-info {
  background: var(--brand-tint, rgba(0,184,230,0.10));
  border: 1px solid rgba(0,184,230,0.20);
  color: var(--brand, #00B8E6);
}

/* ── Webhook Test Button ──────────────────────────────────────── */
.webhook-test-btn {
  background: none;
  border: 1px solid var(--border, rgba(10,25,47,0.10));
  border-radius: 8px;
  padding: var(--sp-1) var(--sp-3);
  font-size: 12px;
  cursor: pointer;
  font-family: inherit;
  color: var(--text-muted, #3B5C7A);
  transition: background var(--duration-quick, 150ms), color var(--duration-quick, 150ms);
}

.webhook-test-btn:hover {
  background: var(--surface-muted, #EBF6FB);
  color: var(--text, #0A192F);
}

.webhook-test-result {
  font-size: 12px;
  margin-left: var(--sp-2);
  transition: opacity var(--duration-base, 250ms);
}

/* ── API Key Display ──────────────────────────────────────────── */
.api-key-block {
  background: var(--surface-muted, #EBF6FB);
  border: 1px solid var(--border, rgba(10,25,47,0.10));
  border-radius: var(--radius-sm, 6px);
  padding: var(--sp-4);
  font-family: var(--font-mono);
  font-size: 13px;
}

.api-key-row {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-bottom: var(--sp-2);
}

.api-key-row:last-child { margin-bottom: 0; }

.api-key-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted, #3B5C7A);
  min-width: 120px;
  font-family: inherit;
}

.api-key-value {
  color: var(--text, #0A192F);
  flex: 1;
}

.api-connected {
  display: flex;
  align-items: center;
  gap: var(--sp-1);
  font-size: 11px;
  color: var(--status-live);
  font-family: inherit;
}

.api-connected::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--status-live);
  display: inline-block;
}

/* ── Login Page ───────────────────────────────────────────────── */
.login-shell {
  min-height: 100vh;
  background: var(--background, #F2F9FC);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-6);
}

.login-card {
  background: var(--surface, #FFFFFF);
  border: 1px solid var(--border, rgba(10,25,47,0.10));
  border-radius: var(--radius-card, 14px);
  padding: var(--sp-10) var(--sp-8);
  box-shadow: var(--shadow-card);
  width: 100%;
  max-width: 380px;
}

.login-logo {
  text-align: center;
  margin-bottom: var(--sp-8);
}

.login-logo-icon {
  width: 48px;
  height: 48px;
  background: var(--navy, #0A192F);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  color: var(--brand, #00B8E6);
  margin: 0 auto var(--sp-3);
}

.login-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text, #0A192F);
  margin: 0 0 var(--sp-1) 0;
}

.login-subtitle {
  font-size: 13px;
  color: var(--text-muted, #3B5C7A);
  margin: 0;
}

/* ── Responsive: mobile sidebar hidden ────────────────────────── */
@media (max-width: 768px) {
  .dash-shell {
    grid-template-columns: 1fr;
  }
  .dash-sidebar {
    display: none;
  }
  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr;
  }
  .settings-grid {
    grid-template-columns: 1fr;
  }
}

/* ════════════════════════════════════════════════════════════════ */
/* OPS-63 (Phase 2): Sidebar 4-Sektionen + Wiederverwendbare Partials */
/* ════════════════════════════════════════════════════════════════ */

/* ── Sidebar Queue-Badge ──────────────────────────────────────── */
.nav-queue-badge {
  background: var(--status-error, #EF4444);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 9999px;
  margin-left: auto;
  min-width: 18px;
  text-align: center;
}

/* ── Sidebar locked item (Customer auf Admin-Items) ───────────── */
.nav-item-locked {
  opacity: 0.5;
  cursor: not-allowed;
}
.nav-item-locked:hover {
  background: transparent !important;
}
.nav-lock-icon {
  margin-left: auto;
  font-size: 11px;
}

/* ── Click-to-Copy Run-IDs ────────────────────────────────────── */
.run-id-copy {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 11px;
  color: var(--text-muted, #3B5C7A);
  background: var(--surface-muted, #EBF6FB);
  padding: 2px 6px;
  border-radius: var(--radius-sm, 6px);
  cursor: pointer;
  user-select: all;
  transition: background var(--duration-quick, 180ms), color var(--duration-quick, 180ms);
  outline: none;
}
.run-id-copy:hover {
  background: var(--brand-tint, #E0FAFF);
  color: var(--brand, #00B8E6);
}
.run-id-copy:focus-visible {
  outline: 2px solid var(--brand, #00B8E6);
  outline-offset: 2px;
}
.run-id-copy.run-id-copied {
  background: rgba(34,197,94,0.15);
  color: #166534;
}

/* ── Empty-State Partial ──────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: var(--sp-10) var(--sp-6);
  background: var(--surface, #fff);
  border: 1px dashed var(--border-strong, rgba(10,25,47,0.18));
  border-radius: var(--radius-card, 14px);
  min-height: 200px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: var(--sp-2);
}
.empty-state-icon {
  font-size: 40px;
  line-height: 1;
  opacity: 0.8;
}
.empty-state-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text, #0A192F);
  margin: 0;
}
.empty-state-desc {
  font-size: 13px;
  color: var(--text-muted, #3B5C7A);
  margin: 0;
  max-width: 460px;
  line-height: 1.5;
}

/* ── KPI-Card Partial ─────────────────────────────────────────── */
/* KPI-Karte: Layout wie Mock — Head (Label links, Icon rechts oben), darunter Value gross
   und optional Delta-Indicator. */
.kpi-card {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  background: var(--surface, #fff);
  border: 1px solid var(--border, rgba(10,25,47,0.10));
  border-radius: var(--radius-card, 14px);
  padding: var(--sp-5);
  box-shadow: var(--shadow-soft);
  min-height: 120px;
  transition: transform var(--duration-quick, 180ms), border-color var(--duration-quick, 180ms);
}
.kpi-card-link {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}
.kpi-card-link:hover {
  transform: translateY(-1px);
  border-color: var(--brand, #00B8E6);
}
.kpi-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--sp-2);
}
.kpi-card-icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  background: var(--surface-muted, #EBF6FB);
  color: var(--brand, #00B8E6);
}
.kpi-card-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.kpi-card-label {
  font-size: 13px;
  color: var(--text, #0A192F);
  font-weight: 600;
  line-height: 1.3;
}
.kpi-card-value {
  font-size: 30px;
  font-weight: 700;
  color: var(--text, #0A192F);
  line-height: 1.0;
  letter-spacing: -0.02em;
}
.kpi-card-subtext {
  font-size: 12px;
  color: var(--text-muted, #3B5C7A);
}
/* Delta-Indicator (Vergleich zum vorigen Zeitraum) */
.kpi-card-delta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  margin-top: 3px;
}
.kpi-card-delta-arrow { font-weight: 700; line-height: 1; }
.kpi-card-delta-value { font-weight: 600; }
.kpi-card-delta-label { color: var(--text-muted, #3B5C7A); }
.kpi-card-delta-up    { color: var(--status-live,  #22C55E); }
.kpi-card-delta-down  { color: var(--status-error, #EF4444); }
.kpi-card-delta-flat  { color: var(--text-muted,   #3B5C7A); }
/* Inverse polarity: Up = schlecht (rot), Down = gut (grün) */
.kpi-card-delta-bad   { color: var(--status-error, #EF4444); }
.kpi-card-delta-good  { color: var(--status-live,  #22C55E); }
/* Wenn Variant 'error' und delta-up → schlechter (mehr Fehler ist negativ), aber semantisch
   wird das pro KPI-Caller entschieden. Default: up = grün, down = rot. */
/* Variants */
.kpi-card-good .kpi-card-icon  { background: rgba(34,197,94,0.10);  color: var(--status-live, #22C55E); }
.kpi-card-warn .kpi-card-icon  { background: rgba(245,158,11,0.10); color: var(--status-soon, #F59E0B); }
.kpi-card-error .kpi-card-icon { background: rgba(239,68,68,0.10);  color: var(--status-error, #EF4444); }
.kpi-card-good  { border-top: 3px solid var(--status-live, #22C55E); }
.kpi-card-warn  { border-top: 3px solid var(--status-soon, #F59E0B); }
.kpi-card-error { border-top: 3px solid var(--status-error, #EF4444); }

/* ═══════════════════════════════════════════════════════════════════
   OPS-64 — Overview-Seite
   ═══════════════════════════════════════════════════════════════════ */

.overview-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--sp-4);
  flex-wrap: wrap;
}
.overview-header-left { min-width: 0; flex: 1; }
.overview-header-right {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  flex-wrap: wrap;
  justify-content: flex-end;
}
.overview-meta {
  font-size: 12px;
  color: var(--text-muted, #3B5C7A);
  white-space: nowrap;
}

/* API-Status Pill */
.api-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  background: var(--surface-muted, #EBF6FB);
  border: 1px solid var(--border, rgba(10,25,47,0.10));
}
.api-pill-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-muted, #3B5C7A);
}
.api-pill-ok    .api-pill-dot { background: var(--status-live,  #22C55E); box-shadow: 0 0 0 3px rgba(34,197,94,0.18); }
.api-pill-warn  .api-pill-dot { background: var(--status-soon,  #F59E0B); box-shadow: 0 0 0 3px rgba(245,158,11,0.18); }
.api-pill-error .api-pill-dot { background: var(--status-error, #EF4444); box-shadow: 0 0 0 3px rgba(239,68,68,0.18); }
.api-pill-muted .api-pill-dot { background: var(--text-muted,   #3B5C7A); }

.overview-export-btn {
  cursor: not-allowed;
  opacity: 0.6;
}
.overview-export-btn[disabled] {
  pointer-events: auto; /* allow tooltip via data-tip */
}

/* 6-Spalten-Grid (responsive Fallbacks) */
.grid-6 {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: var(--sp-4);
}
@media (max-width: 1280px) {
  .grid-6 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
  .grid-6 { grid-template-columns: repeat(2, 1fr); }
}
/* overview: 6 KPIs in 1 Reihe — etwas kleinerer value damit deltas Platz haben */
.overview-kpis .kpi-card-value { font-size: 26px; }

/* Prozesskarten */
.process-card {
  position: relative;
  background: var(--surface, #fff);
  border: 1px solid var(--border, rgba(10,25,47,0.10));
  border-radius: var(--radius-card, 14px);
  padding: var(--sp-5);
  padding-top: calc(var(--sp-5) + 4px);
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  overflow: hidden;
}
.process-card-stripe {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--text-muted, #3B5C7A);
}
.process-card-live          .process-card-stripe { background: var(--status-live,    #22C55E); }
.process-card-in_preparation .process-card-stripe { background: var(--status-soon,    #F59E0B); }
.process-card-planned       .process-card-stripe { background: var(--status-planned, #64748B); }
.process-card-recommended   .process-card-stripe { background: var(--brand,          #00B8E6); }
.process-card-blocked       .process-card-stripe { background: var(--status-error,   #EF4444); }

.process-card-head {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
}
.process-card-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--surface-muted, #EBF6FB);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.process-card-title {
  font-weight: 600;
  font-size: 14px;
  color: var(--text, #0A192F);
}
.process-card-agent {
  font-size: 11px;
  color: var(--text-muted, #3B5C7A);
  text-transform: capitalize;
}
.process-card-badge {
  margin-left: auto;
  font-size: 10px;
  letter-spacing: 0.04em;
}
.process-card-badge-live         { background: rgba(34,197,94,0.10);   color: var(--status-live,    #22C55E); }
.process-card-badge-in_preparation{background: rgba(245,158,11,0.10);  color: var(--status-soon,    #F59E0B); }
.process-card-badge-planned      { background: rgba(100,116,139,0.10); color: var(--status-planned, #64748B); }
.process-card-badge-recommended  { background: rgba(0,184,230,0.10);   color: var(--brand,          #00B8E6); }
.process-card-badge-blocked      { background: rgba(239,68,68,0.10);   color: var(--status-error,   #EF4444); }
.process-card-desc {
  font-size: 12px;
  color: var(--text-muted, #3B5C7A);
  margin: 0;
  line-height: 1.5;
}
.process-card-stats {
  font-size: 11px;
  color: var(--text-muted, #3B5C7A);
  padding: var(--sp-2) 0;
  border-top: 1px dashed var(--border, rgba(10,25,47,0.10));
  margin-top: auto;
}
.process-card-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-2);
  padding: var(--sp-3) 0;
  border-bottom: 1px dashed var(--border, rgba(10,25,47,0.10));
}
.process-card-metric { text-align: center; }
.process-card-metric-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--text, #0A192F);
  line-height: 1.1;
}
.process-card-metric-label {
  font-size: 10px;
  color: var(--text-muted, #3B5C7A);
  margin-top: 2px;
}
.process-card-footer { text-align: right; }

/* 2-Spalten-Footer */
.overview-footer { gap: var(--sp-5); }
@media (max-width: 768px) {
  .overview-footer { grid-template-columns: 1fr; }
}
.overview-panel {
  background: var(--surface, #fff);
  border: 1px solid var(--border, rgba(10,25,47,0.10));
  border-radius: var(--radius-card, 14px);
  padding: var(--sp-5);
  box-shadow: var(--shadow-soft);
  min-width: 0;
}

/* Aktivitäts-Liste — Items als Card-Container mit border, runde Icon-Bubbles,
   2-Zeilen-Body (Text + optional Detail), Zeit rechts vertikal-zentriert. */
.activity-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}
.activity-item {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  background: var(--surface, #fff);
  border: 1px solid var(--border, rgba(10,25,47,0.10));
  border-radius: var(--radius-card, 14px);
}
.activity-icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  background: var(--surface-muted, #EBF6FB);
  color: var(--text-muted, #3B5C7A);
}
.activity-icon-success    { background: rgba(34,197,94,0.12);  color: var(--status-live,  #22C55E); }
.activity-icon-incomplete { background: rgba(245,158,11,0.12); color: var(--status-soon,  #F59E0B); }
.activity-icon-error      { background: rgba(239,68,68,0.12);  color: var(--status-error, #EF4444); }
.activity-body { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 2px; }
.activity-text {
  font-size: 13px;
  color: var(--text, #0A192F);
  font-weight: 600;
  line-height: 1.35;
}
.activity-detail {
  font-size: 12px;
  color: var(--text-muted, #3B5C7A);
  line-height: 1.4;
}
.activity-time {
  flex-shrink: 0;
  font-size: 12px;
  color: var(--text-muted, #3B5C7A);
  white-space: nowrap;
}

/* Review-Queue Top 5 */
.review-top-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}
.review-top-item {
  display: flex;
  gap: var(--sp-3);
  padding: var(--sp-3) 0;
  border-bottom: 1px solid var(--border, rgba(10,25,47,0.06));
}
.review-top-item:last-child { border-bottom: none; }
.review-top-icon {
  font-size: 16px;
  flex-shrink: 0;
  color: var(--status-soon, #F59E0B);
}
.review-top-body { min-width: 0; flex: 1; }
.review-top-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 13px;
}
.review-top-sep { color: var(--text-muted, #3B5C7A); }
.review-top-container {
  font-family: var(--font-mono, ui-monospace, "SF Mono", monospace);
  font-size: 12px;
  color: var(--text, #0A192F);
}
.review-top-prio {
  margin-left: auto;
  font-size: 10px;
  letter-spacing: 0.04em;
}
.review-top-prio-hoch    { background: rgba(239,68,68,0.10);  color: var(--status-error, #EF4444); }
.review-top-prio-mittel  { background: rgba(245,158,11,0.10); color: var(--status-soon,  #F59E0B); }
.review-top-prio-niedrig { background: rgba(100,116,139,0.10);color: var(--status-planned,#64748B); }
.review-top-meta {
  font-size: 11px;
  color: var(--text-muted, #3B5C7A);
  margin-top: 2px;
}

/* Review-Queue Top 5 — Tabellen-Layout (Mock-Match) */
.review-top-table-wrap { overflow-x: auto; }
.review-top-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.review-top-table thead th {
  text-align: left;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-muted, #3B5C7A);
  padding: 0 var(--sp-3) var(--sp-2);
  border-bottom: 1px solid var(--border, rgba(10,25,47,0.10));
}
.review-top-table tbody td {
  padding: var(--sp-3);
  border-bottom: 1px solid var(--border, rgba(10,25,47,0.06));
  vertical-align: middle;
  color: var(--text, #0A192F);
}
.review-top-table tbody tr:last-child td { border-bottom: none; }
.review-top-table tbody tr:hover td { background: var(--surface-muted, #EBF6FB); }
.review-top-table .mono { font-family: var(--font-mono); font-size: 12px; }
.review-fields {
  font-size: 12px;
  color: var(--text-muted, #3B5C7A);
  max-width: 240px;
  white-space: normal;
}
.review-problem-badge {
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 999px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}
.review-problem-warn  { background: rgba(245,158,11,0.12); color: var(--status-soon,  #F59E0B); }
.review-problem-error { background: rgba(239,68,68,0.12);  color: var(--status-error, #EF4444); }
.review-top-footer {
  margin-top: var(--sp-3);
  padding-top: var(--sp-3);
  border-top: 1px solid var(--border, rgba(10,25,47,0.06));
  text-align: center;
}

/* ═══════════════════════════════════════════════════════════════════
   Foundation v0.2-P2 — Shared für OPS-65..71
   ═══════════════════════════════════════════════════════════════════ */

/* process-card extra (für extrahiertes Partial) */
.process-card-titlebox { min-width: 0; flex: 1; }

/* Confidence-Bar (OPS-66 Tabelle, OPS-67 Review) */
.conf-bar {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  position: relative;
  width: 96px;
  height: 18px;
  border-radius: 9px;
  background: var(--surface-muted, #EBF6FB);
  border: 1px solid var(--border, rgba(10,25,47,0.10));
  overflow: hidden;
  font-size: 11px;
  padding: 0 6px;
}
.conf-bar-fill {
  position: absolute;
  top: 0; left: 0; bottom: 0;
  background: var(--text-muted, #3B5C7A);
  border-radius: 9px;
  opacity: 0.18;
  transition: width var(--duration-quick, 180ms);
}
.conf-bar-text {
  position: relative;
  z-index: 1;
  font-weight: 600;
  color: var(--text, #0A192F);
  font-variant-numeric: tabular-nums;
}
.conf-bar-good  .conf-bar-fill { background: var(--status-live,  #22C55E); }
.conf-bar-ok    .conf-bar-fill { background: #84CC16; }
.conf-bar-warn  .conf-bar-fill { background: var(--status-soon,  #F59E0B); }
.conf-bar-error .conf-bar-fill { background: var(--status-error, #EF4444); }
.conf-bar-missing { width: 60px; justify-content: center; }
.conf-bar-missing .conf-bar-text { color: var(--text-muted, #3B5C7A); font-weight: 500; }

/* Stepper (OPS-65 Prozess-Roadmap, OPS-69 Emay Phasen) */
.stepper {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--sp-2);
  padding: var(--sp-4) 0;
}
.stepper-step {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--surface-muted, #EBF6FB);
  border: 1px solid var(--border, rgba(10,25,47,0.10));
  font-size: 12px;
  font-weight: 500;
}
.stepper-icon { font-size: 14px; line-height: 1; }
.stepper-label { color: var(--text, #0A192F); }
.stepper-arrow {
  font-size: 14px;
  color: var(--text-muted, #3B5C7A);
  opacity: 0.6;
}
.stepper-step-done {
  background: rgba(34,197,94,0.10);
  border-color: rgba(34,197,94,0.30);
  color: var(--status-live, #22C55E);
}
.stepper-step-done .stepper-label { color: var(--status-live, #22C55E); }
.stepper-step-in_progress {
  background: rgba(0,184,230,0.10);
  border-color: rgba(0,184,230,0.30);
  color: var(--brand, #00B8E6);
  animation: stepper-pulse 2.2s ease-in-out infinite;
}
.stepper-step-in_progress .stepper-label { color: var(--brand, #00B8E6); }
@keyframes stepper-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0,184,230,0.0); }
  50%      { box-shadow: 0 0 0 4px rgba(0,184,230,0.18); }
}
.stepper-step-todo {
  opacity: 0.45;
}
.stepper-arrow-done { color: var(--status-live, #22C55E); opacity: 1; }
.stepper-arrow-in_progress { color: var(--brand, #00B8E6); opacity: 0.8; }
@media (prefers-reduced-motion: reduce) {
  .stepper-step-in_progress { animation: none; }
}

/* Tab-State (Foundation für OPS-68 + OPS-71) */
.tab-bar {
  display: flex;
  gap: var(--sp-1);
  border-bottom: 1px solid var(--border, rgba(10,25,47,0.10));
  margin-bottom: var(--sp-5);
  overflow-x: auto;
}
.tab-button {
  background: none;
  border: none;
  padding: var(--sp-3) var(--sp-4);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted, #3B5C7A);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: color var(--duration-quick, 180ms), border-color var(--duration-quick, 180ms);
}
.tab-button:hover { color: var(--text, #0A192F); }
.tab-button.active {
  color: var(--brand, #00B8E6);
  border-bottom-color: var(--brand, #00B8E6);
}
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* Runs-Table (Skeleton, OPS-66 verfeinert) */
.runs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.runs-table th {
  text-align: left;
  padding: var(--sp-2) var(--sp-3);
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted, #3B5C7A);
  border-bottom: 1px solid var(--border, rgba(10,25,47,0.10));
}
.runs-table td {
  padding: var(--sp-2) var(--sp-3);
  border-bottom: 1px solid var(--border, rgba(10,25,47,0.06));
}
.runs-table tr:hover td { background: var(--surface-muted, #EBF6FB); }
.runs-table-block {
  overflow-x: auto;
  background: var(--surface, #fff);
  border: 1px solid var(--border, rgba(10,25,47,0.10));
  border-radius: var(--radius-card, 14px);
  box-shadow: var(--shadow-soft);
}

/* ═══════════════════════════════════════════════════════════════════
   OPS-69 — /agents/emay Pre-Build
   ═══════════════════════════════════════════════════════════════════ */

.emay-task-list { list-style: none; margin: 0; padding: 0; }
.emay-task-item {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  padding: var(--sp-3) 0;
  border-bottom: 1px solid var(--border, rgba(10,25,47,0.06));
  font-size: 13px;
}

/* ═══════════════════════════════════════════════════════════════════
   OPS-68 — /agents/yuni
   ═══════════════════════════════════════════════════════════════════ */

.yuni-overview-row > .overview-panel { min-height: 360px; }
.yuni-proc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-3);
}
@media (max-width: 1280px) {
  .yuni-proc-grid { grid-template-columns: 1fr; }
}

.agent-health-list { list-style: none; margin: 0; padding: 0; }
.agent-health-item {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) 0;
  border-bottom: 1px solid var(--border, rgba(10,25,47,0.06));
  font-size: 13px;
}
.emay-task-item:last-child { border-bottom: none; }
.emay-task-icon { font-size: 18px; flex-shrink: 0; width: 24px; text-align: center; }

.emay-workflow {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}
.emay-workflow-row {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3);
  background: var(--surface-muted, #EBF6FB);
  border-radius: 10px;
  border: 1px solid var(--border, rgba(10,25,47,0.10));
  font-size: 13px;
}
.emay-workflow-icon { font-size: 22px; flex-shrink: 0; }
.emay-workflow-text { flex: 1; }
.emay-workflow-arrow {
  text-align: center;
  font-size: 18px;
  color: var(--text-muted, #3B5C7A);
  line-height: 1;
}

/* Integrationen */
.integrations-list { display: flex; flex-direction: column; gap: var(--sp-2); }
.integration-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-3);
  background: var(--surface-muted, #EBF6FB);
  border-radius: 8px;
  border: 1px solid var(--border, rgba(10,25,47,0.10));
}
.integration-label { font-size: 13px; font-weight: 500; }
.integration-status-badge {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(100,116,139,0.10);
  color: var(--text-muted, #3B5C7A);
  white-space: nowrap;
}
.integration-status-pending  .integration-status-badge { background: rgba(245,158,11,0.12); color: var(--status-soon,  #F59E0B); }
.integration-status-available .integration-status-badge { background: rgba(34,197,94,0.12);   color: var(--status-live,  #22C55E); }
.integration-status-ready    .integration-status-badge { background: rgba(34,197,94,0.12);   color: var(--status-live,  #22C55E); }
.integration-status-blocked  .integration-status-badge { background: rgba(239,68,68,0.12);   color: var(--status-error, #EF4444); }
.integration-note {
  grid-column: 1 / -1;
  font-size: 11px;
  color: var(--text-muted, #3B5C7A);
  font-style: italic;
  margin-top: 4px;
}

/* Benefits */
.benefits-grid {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}
.benefit-card {
  padding: var(--sp-3);
  background: var(--surface-muted, #EBF6FB);
  border-radius: 10px;
  border: 1px solid var(--border, rgba(10,25,47,0.10));
}
.benefit-icon {
  font-size: 22px;
  display: inline-block;
  margin-bottom: 6px;
}
.benefit-card h4 {
  margin: 0 0 4px;
}

/* ═══════════════════════════════════════════════════════════════════
   OPS-67 — /review
   ═══════════════════════════════════════════════════════════════════ */

.grid-5 {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--sp-4);
}
/* 1280–1599 → 4 Spalten, < 1280 → 3, < 960 → 2, < 640 → 1 */
@media (max-width: 1599px) { .grid-5 { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 1279px) { .grid-5 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 959px)  { .grid-5 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 639px)  { .grid-5 { grid-template-columns: 1fr; } }
/* Overview-Prozesse: bei ≥ 1600 alle 5 in 1 Reihe, darunter 4 + wrap */
.overview-processes { gap: var(--sp-5); }

/* 7-Spalten-Grid (für /runs KPIs). Bei < 1600 wraps auf 4 in 1. Reihe + 3 in 2., darunter weiter. */
.grid-7 {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: var(--sp-3);
}
@media (max-width: 1599px) { .grid-7 { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 1279px) { .grid-7 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 959px)  { .grid-7 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 639px)  { .grid-7 { grid-template-columns: 1fr; } }
.review-kpis .kpi-card-value { font-size: 26px; }

.review-filter-bar { /* erbt .runs-filter-bar */ }

.missing-fields { display: flex; flex-wrap: wrap; gap: 4px; }
.missing-field-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(245,158,11,0.12);
  color: var(--status-soon, #F59E0B);
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
}
.missing-field-more {
  background: rgba(100,116,139,0.10);
  color: var(--text-muted, #3B5C7A);
}
.muted { color: var(--text-muted, #3B5C7A); }
.wait-cell { font-variant-numeric: tabular-nums; font-size: 12px; }

.review-actions {
  display: inline-flex;
  gap: 4px;
  flex-wrap: nowrap;
}
.review-actions .btn {
  width: 30px;
  height: 28px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  background: var(--surface-muted, #EBF6FB);
  border: 1px solid var(--border, rgba(10,25,47,0.10));
  border-radius: 6px;
  cursor: pointer;
  text-decoration: none;
}
.review-actions .btn:hover:not(:disabled) {
  border-color: var(--brand, #00B8E6);
  transform: translateY(-1px);
}
.review-actions .btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.review-action-approve:hover:not(:disabled) { border-color: var(--status-live, #22C55E); }
.review-action-reject:hover:not(:disabled)  { border-color: var(--status-error, #EF4444); }
.review-action-manual:hover:not(:disabled)  { border-color: var(--status-soon, #F59E0B); }

/* Top-3-fehlende Felder — Bubble + Label/Count + Brand-Bar (Design-System) */
.top-missing-card {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}
.top-missing-head {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}
.top-missing-bubble {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  background: var(--brand-tint, #E0FAFF);
  color: var(--brand, #00B8E6);
}
.top-missing-body { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 2px; }
.top-missing-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text, #0A192F);
  line-height: 1.3;
}
.benefit-card p {
  margin: 0;
  font-size: 12px;
  color: var(--text-muted, #3B5C7A);
  line-height: 1.5;
}

/* Next-Steps */
.next-steps {
  padding-left: var(--sp-5);
  background: var(--surface, #fff);
  border: 1px solid var(--border, rgba(10,25,47,0.10));
  border-radius: var(--radius-card, 14px);
  padding-top: var(--sp-4);
  padding-bottom: var(--sp-4);
  padding-right: var(--sp-5);
  box-shadow: var(--shadow-soft);
  margin: 0;
}
.next-steps li {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text, #0A192F);
}
.next-steps li + li { margin-top: var(--sp-2); }

/* ═══════════════════════════════════════════════════════════════════
   OPS-65 — /prozesse
   ═══════════════════════════════════════════════════════════════════ */

/* Workflow-Visual */
.process-flow {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--sp-2);
  padding: var(--sp-5);
  background: var(--surface, #fff);
  border: 1px solid var(--border, rgba(10,25,47,0.10));
  border-radius: var(--radius-card, 14px);
  box-shadow: var(--shadow-soft);
}
.flow-step {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 10px;
  background: var(--surface-muted, #EBF6FB);
  border: 1px solid var(--border, rgba(10,25,47,0.10));
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}
.flow-step-live {
  border-color: var(--brand, #00B8E6);
  color: var(--brand, #00B8E6);
  background: rgba(0,184,230,0.08);
}
.flow-step-planned {
  opacity: 0.5;
  color: var(--text-muted, #3B5C7A);
}
.flow-arrow {
  color: var(--text-muted, #3B5C7A);
  font-size: 16px;
  font-weight: 500;
}
.flow-arrow-muted {
  opacity: 0.4;
}

/* Roadmap */
.roadmap-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
}
.roadmap-quarter {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted, #3B5C7A);
  margin-bottom: var(--sp-2);
}
.roadmap-items { display: flex; flex-direction: column; gap: var(--sp-2); }
.roadmap-item {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  background: var(--surface, #fff);
  border: 1px solid var(--border, rgba(10,25,47,0.10));
  border-radius: var(--radius-card, 14px);
  font-size: 13px;
  color: inherit;
}
.roadmap-item:hover { border-color: var(--brand, #00B8E6); }
.roadmap-item-status { font-size: 11px; color: var(--text-muted, #3B5C7A); margin-left: auto; }

.agent-health-item:last-child { border-bottom: none; }
.agent-health-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--text-muted, #3B5C7A);
}
.agent-health-ok    { background: var(--status-live,  #22C55E); box-shadow: 0 0 0 3px rgba(34,197,94,0.16); }
.agent-health-warn  { background: var(--status-soon,  #F59E0B); box-shadow: 0 0 0 3px rgba(245,158,11,0.16); }
.agent-health-error { background: var(--status-error, #EF4444); box-shadow: 0 0 0 3px rgba(239,68,68,0.16); }
.agent-health-label { flex: 1; font-weight: 500; }
.agent-health-status { font-size: 11px; color: var(--text-muted, #3B5C7A); }

.agent-modelinfo {
  margin-top: var(--sp-4);
  padding-top: var(--sp-3);
  border-top: 1px dashed var(--border, rgba(10,25,47,0.10));
  font-size: 11px;
  color: var(--text-muted, #3B5C7A);
}

.yuni-config-grid {
  display: flex;
  flex-direction: column;
  background: var(--surface, #fff);
  border: 1px solid var(--border, rgba(10,25,47,0.10));
  border-radius: var(--radius-card, 14px);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}
.roadmap-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: var(--sp-4);
  padding: var(--sp-4) var(--sp-5);
  border-bottom: 1px solid var(--border, rgba(10,25,47,0.06));
  align-items: center;
}
.roadmap-row:last-child { border-bottom: none; }
.roadmap-quarter {
  font-weight: 600;
  font-size: 13px;
  color: var(--brand, #00B8E6);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.roadmap-items {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
}
.roadmap-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 8px;
  background: var(--surface-muted, #EBF6FB);
  border: 1px solid var(--border, rgba(10,25,47,0.10));
  font-size: 12px;
  font-weight: 500;
  color: var(--text, #0A192F);
  text-decoration: none;
  transition: transform var(--duration-quick, 180ms), border-color var(--duration-quick, 180ms);
}
.roadmap-item:hover {
  transform: translateY(-1px);
  border-color: var(--brand, #00B8E6);
}
.roadmap-item-status {
  font-size: 10px;
  letter-spacing: 0.04em;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(100,116,139,0.10);
  color: var(--text-muted, #3B5C7A);
}
.roadmap-item-live          .roadmap-item-status { background: rgba(34,197,94,0.12);   color: var(--status-live,    #22C55E); }
.roadmap-item-in_preparation .roadmap-item-status { background: rgba(245,158,11,0.12); color: var(--status-soon,    #F59E0B); }
.roadmap-item-recommended   .roadmap-item-status { background: rgba(0,184,230,0.12);   color: var(--brand,          #00B8E6); }
.roadmap-item-blocked       .roadmap-item-status { background: rgba(239,68,68,0.12);   color: var(--status-error,   #EF4444); }

@media (max-width: 768px) {
  .roadmap-row { grid-template-columns: 1fr; gap: var(--sp-2); }
}

/* ═══════════════════════════════════════════════════════════════════
   OPS-70 — /users
   ═══════════════════════════════════════════════════════════════════ */

.users-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: var(--sp-5);
}
@media (max-width: 1280px) {
  .users-layout { grid-template-columns: 1fr; }
}
.users-main { min-width: 0; }
.users-sidebar { min-width: 0; }

.users-audit-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted, #3B5C7A);
  cursor: pointer;
  user-select: none;
}
.users-audit-toggle input { cursor: pointer; }

.user-cell {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}
.user-cell-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--brand-tint, rgba(0,184,230,0.12));
  color: var(--brand, #00B8E6);
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.user-cell-email { font-size: 12px; color: var(--text, #0A192F); }

.role-badge {
  padding: 3px 9px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.role-badge-admin    { background: rgba(0,184,230,0.10);   color: var(--brand,         #00B8E6); }
.role-badge-customer { background: rgba(100,116,139,0.10); color: var(--status-planned, #64748B); }

.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 6px;
  background: var(--text-muted, #3B5C7A);
}
.status-dot-active  { background: var(--status-live,  #22C55E); box-shadow: 0 0 0 2px rgba(34,197,94,0.18); }
.status-dot-paused  { background: var(--status-soon,  #F59E0B); box-shadow: 0 0 0 2px rgba(245,158,11,0.18); }
.status-dot-invited { background: var(--brand,        #00B8E6); box-shadow: 0 0 0 2px rgba(0,184,230,0.18); }

.user-actions {
  display: inline-flex;
  gap: 4px;
  align-items: center;
}
.user-action-btn {
  width: 28px;
  height: 26px;
  padding: 0;
  font-size: 12px;
  background: var(--surface-muted, #EBF6FB);
  border: 1px solid var(--border, rgba(10,25,47,0.10));
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.user-action-btn:hover { border-color: var(--brand, #00B8E6); }
.user-action-delete:hover { border-color: var(--status-error, #EF4444); color: var(--status-error, #EF4444); }
.user-action-select {
  height: 26px;
  font-size: 11px;
  padding: 0 6px;
  border: 1px solid var(--border, rgba(10,25,47,0.10));
  border-radius: 6px;
  background: var(--surface, #fff);
  cursor: pointer;
}

.user-audit-row td {
  background: var(--surface-muted, #EBF6FB) !important;
  padding: var(--sp-3) var(--sp-4);
}
.audit-list {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 11px;
}
.audit-list li {
  padding: 4px 0;
  border-bottom: 1px dashed var(--border, rgba(10,25,47,0.10));
}
.audit-list li:last-child { border-bottom: none; }

/* Sidebar-Form */
.invite-form { display: flex; flex-direction: column; gap: 4px; }
.invite-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted, #3B5C7A);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 8px;
}
.invite-input {
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--border, rgba(10,25,47,0.10));
  border-radius: 8px;
  font-size: 13px;
  font-family: inherit;
}
.invite-input:focus {
  outline: 2px solid var(--brand, #00B8E6);
  outline-offset: -1px;
}
.invite-hint {
  font-size: 11px;
  color: var(--text-muted, #3B5C7A);
  margin-top: var(--sp-2);
  line-height: 1.4;
}

.role-overview { display: flex; flex-direction: column; gap: var(--sp-3); }
.role-overview-item {
  padding: var(--sp-3);
  background: var(--surface-muted, #EBF6FB);
  border-radius: 8px;
}
.role-overview-item strong {
  display: block;
  font-size: 12px;
  color: var(--brand, #00B8E6);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}
.role-overview-item ul {
  margin: 0;
  padding-left: var(--sp-5);
  font-size: 12px;
  line-height: 1.6;
}

.recent-invites-list { list-style: none; margin: 0; padding: 0; }
.recent-invite-item {
  padding: var(--sp-2) 0;
  border-bottom: 1px solid var(--border, rgba(10,25,47,0.06));
  font-size: 12px;
}
.recent-invite-item:last-child { border-bottom: none; }
.recent-invite-email { font-weight: 500; color: var(--text, #0A192F); }
.recent-invite-meta {
  font-size: 11px;
  color: var(--text-muted, #3B5C7A);
  margin-top: 2px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.recent-invite-status { white-space: nowrap; }

.flash-invited {
  background: rgba(0,184,230,0.10);
  border: 1px solid rgba(0,184,230,0.30);
  color: var(--text, #0A192F);
  padding: var(--sp-3) var(--sp-4);
  border-radius: 10px;
  font-size: 13px;
}

/* ═══════════════════════════════════════════════════════════════════
   OPS-66 — /runs
   ═══════════════════════════════════════════════════════════════════ */

.runs-kpis .kpi-card-value { font-size: 24px; }

.runs-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  align-items: center;
  padding: var(--sp-3);
  background: var(--surface, #fff);
  border: 1px solid var(--border, rgba(10,25,47,0.10));
  border-radius: var(--radius-card, 14px);
  box-shadow: var(--shadow-soft);
}
.runs-filter-input,
.runs-filter-select {
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--border, rgba(10,25,47,0.10));
  border-radius: 8px;
  background: var(--surface, #fff);
  color: var(--text, #0A192F);
  font-size: 12px;
  font-family: inherit;
}
.runs-filter-input { min-width: 180px; flex: 1; max-width: 280px; }
.runs-filter-select { min-width: 130px; cursor: pointer; }
.runs-filter-input:focus,
.runs-filter-select:focus {
  outline: 2px solid var(--brand, #00B8E6);
  outline-offset: -1px;
}
.runs-filter-count {
  margin-left: auto;
  font-size: 11px;
  color: var(--text-muted, #3B5C7A);
  white-space: nowrap;
}

.runs-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.runs-table-details-stub {
  cursor: help;
  opacity: 0.7;
}

.runs-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-3);
  font-size: 12px;
  color: var(--text-muted, #3B5C7A);
}

.runs-charts > .overview-panel { min-height: 280px; }
.runs-charts .section-subtitle { margin-top: 2px; }
.runs-data-hint {
  margin-top: var(--sp-4);
  text-align: right;
  font-size: 11px;
  color: var(--text-muted, #3B5C7A);
}
.echart-canvas {
  width: 100%;
}
@media (prefers-reduced-data: reduce) {
  .echart-canvas { display: none; }
  .echart-canvas + .reduced-data-fallback { display: block; }
}

.yuni-config-row {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: var(--sp-4);
  padding: var(--sp-3) var(--sp-5);
  border-bottom: 1px solid var(--border, rgba(10,25,47,0.06));
}
.yuni-config-row:last-child { border-bottom: none; }
.yuni-config-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted, #3B5C7A);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.yuni-config-value { font-size: 13px; color: var(--text, #0A192F); }
@media (max-width: 768px) {
  .yuni-config-row { grid-template-columns: 1fr; gap: 4px; }
}

.top-missing-bar {
  height: 6px;
  background: var(--surface-muted, #EBF6FB);
  border-radius: 999px;
  overflow: hidden;
}
.top-missing-bar-fill {
  height: 100%;
  background: var(--brand, #00B8E6);
  border-radius: 999px;
  transition: width 480ms cubic-bezier(0.2, 0, 0, 1);
}
.top-missing-count {
  font-size: 12px;
  color: var(--text-muted, #3B5C7A);
}

/* ── Modal (OPS-67 lokal, nicht foundation) ── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10,25,47,0.55);
  backdrop-filter: blur(2px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--sp-4);
}
.modal-backdrop[style*="display:flex"],
.modal-backdrop[style*="display: flex"] { display: flex !important; }

.modal-dialog {
  background: var(--surface, #fff);
  border-radius: var(--radius-card, 14px);
  padding: var(--sp-6);
  width: 100%;
  max-width: 480px;
  position: relative;
  box-shadow: 0 20px 50px rgba(10,25,47,0.25);
  animation: modal-slide-in 0.18s ease-out;
}
@keyframes modal-slide-in {
  from { transform: translateY(8px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}
.modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: none;
  border: none;
  font-size: 24px;
  color: var(--text-muted, #3B5C7A);
  cursor: pointer;
  line-height: 1;
}
.modal-close:hover { color: var(--text, #0A192F); }
.modal-title {
  margin: 0 0 var(--sp-2);
  font-size: 18px;
  font-weight: 600;
}
.modal-subtitle {
  margin: 0 0 var(--sp-4);
  font-size: 12px;
  color: var(--text-muted, #3B5C7A);
}
.modal-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text, #0A192F);
  margin-bottom: 6px;
}
.modal-textarea {
  width: 100%;
  border: 1px solid var(--border, rgba(10,25,47,0.10));
  border-radius: 8px;
  padding: var(--sp-2) var(--sp-3);
  font-family: inherit;
  font-size: 13px;
  resize: vertical;
  min-height: 80px;
}
.modal-textarea:focus {
  outline: 2px solid var(--brand, #00B8E6);
  outline-offset: -1px;
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--sp-2);
  margin-top: var(--sp-4);
}
.modal-flash {
  margin-top: var(--sp-3);
  padding: var(--sp-2) var(--sp-3);
  border-radius: 8px;
  font-size: 12px;
}
.modal-flash-ok    { background: rgba(34,197,94,0.10);  color: var(--status-live,  #22C55E); }
.modal-flash-error { background: rgba(239,68,68,0.10);  color: var(--status-error, #EF4444); }

/* ═══════════════════════════════════════════════════════════════════
OPS-71 — /settings
   ═══════════════════════════════════════════════════════════════════ */

/* ── Settings-Shell: vertikale Sidebar-Nav + Content (Phase C) ─────────────── */
.settings-shell {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: var(--sp-6);
  align-items: start;
}
@media (max-width: 1024px) {
  .settings-shell { grid-template-columns: 1fr; }
}

.settings-nav {
  background: var(--surface, #fff);
  border: 1px solid var(--border, rgba(10,25,47,0.10));
  border-radius: var(--radius-card, 14px);
  padding: var(--sp-4);
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
  position: sticky;
  top: var(--sp-4);
  box-shadow: var(--shadow-soft);
}
.settings-nav-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-muted, #3B5C7A);
  padding: var(--sp-2) var(--sp-3);
  margin-bottom: var(--sp-1);
}

/* Nav-Item nutzt .tab-button.active als active-State (vom Foundation initTabState) */
.settings-nav-item {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3);
  border-radius: 10px;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
  color: var(--text, #0A192F);
  transition: background var(--duration-quick, 180ms), color var(--duration-quick, 180ms);
  width: 100%;
  font-family: inherit;
}
.settings-nav-item:hover { background: var(--surface-muted, #EBF6FB); }
.settings-nav-item.active {
  background: var(--brand-tint, #E0FAFF);
  color: var(--brand, #00B8E6);
}
.settings-nav-item.active .settings-nav-subtitle { color: var(--brand, #00B8E6); opacity: 0.85; }
.settings-nav-item.active .settings-nav-icon {
  background: var(--brand, #00B8E6);
  color: var(--surface, #fff);
}

.settings-nav-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  background: var(--surface-muted, #EBF6FB);
  color: var(--brand, #00B8E6);
  transition: background var(--duration-quick, 180ms), color var(--duration-quick, 180ms);
}
.settings-nav-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}
.settings-nav-title {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
}
.settings-nav-subtitle {
  font-size: 11px;
  color: var(--text-muted, #3B5C7A);
  line-height: 1.3;
}

.settings-nav-help {
  margin-top: var(--sp-3);
  padding: var(--sp-3);
  background: var(--brand-tint, #E0FAFF);
  border-radius: 10px;
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
}
.settings-nav-help-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--brand, #00B8E6);
  color: var(--surface, #fff);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
}
.settings-nav-help-body { display: flex; flex-direction: column; gap: 4px; }
.settings-nav-help-title { font-size: 13px; font-weight: 600; color: var(--text, #0A192F); }
.settings-nav-help-text { font-size: 11px; color: var(--text-muted, #3B5C7A); margin: 0; line-height: 1.4; }

.settings-content { min-width: 0; }
.settings-content .tab-panel { display: none; }
.settings-content .tab-panel.active { display: block; }


.settings-form { display: flex; flex-direction: column; }
.settings-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted, #3B5C7A);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
  margin-top: var(--sp-3);
}
.settings-label:first-child { margin-top: 0; }
.settings-input {
  width: 100%;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--border, rgba(10,25,47,0.10));
  border-radius: 8px;
  background: var(--surface, #fff);
  font-size: 13px;
  font-family: inherit;
  color: var(--text, #0A192F);
}
select.settings-input { cursor: pointer; }
.settings-input:focus {
  outline: 2px solid var(--brand, #00B8E6);
  outline-offset: -1px;
}
.settings-hint {
  font-size: 11px;
  color: var(--text-muted, #3B5C7A);
  margin: 4px 0 0;
  line-height: 1.5;
}
.settings-hint-ok   { color: var(--status-live,  #22C55E); }
.settings-hint-warn { color: var(--status-soon,  #F59E0B); }
.settings-hint code { background: rgba(0,0,0,0.05); padding: 1px 4px; border-radius: 4px; font-size: 10px; }

.settings-actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--sp-2);
  margin-top: var(--sp-3);
}

/* Form-Row Layout: 2 Felder pro Reihe, responsiv auf 1 Spalte */
.settings-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-4);
  margin-bottom: var(--sp-3);
}
.settings-form-row:last-child { margin-bottom: 0; }
@media (max-width: 768px) {
  .settings-form-row { grid-template-columns: 1fr; }
}
.settings-form-group { display: flex; flex-direction: column; min-width: 0; }
.settings-form-group .settings-label { margin-top: 0; }

/* Disabled-Input: helleres BG, kein Cursor, keine Focus-Outline */
.settings-input:disabled,
.settings-input[disabled] {
  background: var(--surface-muted, #EBF6FB);
  color: var(--text-muted, #3B5C7A);
  cursor: not-allowed;
  border-color: var(--border, rgba(10,25,47,0.06));
}
.settings-input:disabled:focus { outline: none; }

.settings-kv {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: var(--sp-3) var(--sp-4);
}
.settings-kv-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted, #3B5C7A);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.settings-kv-value { font-size: 13px; color: var(--text, #0A192F); }
@media (max-width: 768px) {
  .settings-kv { grid-template-columns: 1fr; gap: 4px; }
}

.settings-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  cursor: pointer;
}

/* ── OPS-53: Run-Detail Slide-Over (Peek) ─────────────────────────────────── */
.slide-over-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10,25,47,0.45);
  backdrop-filter: blur(2px);
  z-index: 1100;
  opacity: 0;
  transition: opacity 0.26s ease;
}
.slide-over-backdrop.is-open { opacity: 1; }

.slide-over {
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  width: 480px;
  max-width: 92vw;
  background: var(--surface, #fff);
  box-shadow: -16px 0 48px rgba(10,25,47,0.22);
  z-index: 1101;
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.slide-over.is-open { transform: translateX(0); }
.slide-over-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  font-size: 26px;
  line-height: 1;
  color: var(--text-muted, #3B5C7A);
  cursor: pointer;
  z-index: 2;
}
.slide-over-close:hover { color: var(--text, #0A192F); }
.slide-over-body { padding: var(--sp-6); }
.slide-over-loading,
.slide-over-error {
  padding: var(--sp-6);
  font-size: 14px;
  color: var(--text-muted, #3B5C7A);
}
.slide-over-error { color: var(--danger, #EF4444); }

/* ── Run-Detail (geteilte Partial: Slide-Over + Vollseite) ────────────────── */
.run-detail-page-wrap {
  max-width: 760px;
  background: var(--surface, #fff);
  border: 1px solid var(--border, rgba(10,25,47,0.10));
  border-radius: var(--radius-card, 14px);
  padding: var(--sp-6);
}
.run-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--sp-3);
  padding-bottom: var(--sp-3);
  border-bottom: 1px solid var(--border, rgba(10,25,47,0.10));
  margin-bottom: var(--sp-4);
}
.run-detail-title { margin: 0 0 6px; font-size: 18px; font-weight: 600; }
.run-detail-runid { font-size: 12px; }
.run-detail-badges { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.run-detail-section { margin-bottom: var(--sp-5); }
.run-detail-section-title {
  margin: 0 0 var(--sp-3);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted, #3B5C7A);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.run-detail-section-aside {
  font-size: 12px;
  font-weight: 600;
  color: var(--text, #0A192F);
  text-transform: none;
  letter-spacing: 0;
}
.run-detail-meta { margin: 0; display: grid; gap: 8px; }
.run-detail-meta-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: var(--sp-3);
  font-size: 13px;
}
.run-detail-meta-row dt { color: var(--text-muted, #3B5C7A); margin: 0; }
.run-detail-meta-row dd { margin: 0; color: var(--text, #0A192F); }
.run-detail-empty { font-size: 13px; }

/* Confidence-Breakdown (OPS-55) — echte Balken statt Tooltip */
.conf-breakdown { display: grid; gap: 8px; }
.conf-breakdown-row {
  display: grid;
  grid-template-columns: 48px 1fr;
  align-items: center;
  gap: var(--sp-3);
}
.conf-breakdown-doc {
  font-size: 12px;
  font-weight: 600;
  color: var(--text, #0A192F);
  cursor: help;
}

.run-detail-error {
  background: rgba(239,68,68,0.08);
  border: 1px solid rgba(239,68,68,0.25);
  border-radius: 8px;
  padding: var(--sp-2) var(--sp-3);
  font-size: 12px;
  color: var(--text, #0A192F);
  margin-bottom: var(--sp-2);
  white-space: pre-wrap;
}
.run-detail-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 6px; }
.run-detail-chips-label { font-size: 12px; color: var(--text-muted, #3B5C7A); }

.run-detail-decision {
  border-radius: 8px;
  padding: var(--sp-3);
  background: var(--surface-alt, rgba(10,25,47,0.03));
  border-left: 3px solid var(--border, rgba(10,25,47,0.15));
}
.run-detail-decision-approved        { border-left-color: #22C55E; }
.run-detail-decision-manual_fix_done { border-left-color: #00B8E6; }
.run-detail-decision-rejected        { border-left-color: #EF4444; }
.run-detail-decision-auto_resolved   { border-left-color: #8B5CF6; }
.run-detail-decision-head { display: block; font-size: 14px; font-weight: 600; }
.run-detail-decision-by { display: block; font-size: 11px; color: var(--text-muted, #3B5C7A); margin-top: 2px; }
.run-detail-decision-note { margin: var(--sp-2) 0 0; font-size: 13px; white-space: pre-wrap; }

.run-detail-audit { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.run-detail-audit-item {
  font-size: 12px;
  padding-left: var(--sp-3);
  border-left: 2px solid var(--border, rgba(10,25,47,0.10));
}
.run-detail-audit-action { font-weight: 600; color: var(--text, #0A192F); }
.run-detail-audit-meta { color: var(--text-muted, #3B5C7A); margin-left: 6px; }
.run-detail-audit-note { display: block; color: var(--text-muted, #3B5C7A); font-style: italic; }

.run-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  padding-top: var(--sp-4);
  border-top: 1px solid var(--border, rgba(10,25,47,0.10));
}
.run-detail-note-form {
  margin-top: var(--sp-3);
  padding-top: var(--sp-3);
  border-top: 1px dashed var(--border, rgba(10,25,47,0.10));
}
.run-detail-note-actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--sp-2);
  margin-top: var(--sp-2);
}
.badge-test {
  background: rgba(139,92,246,0.12);
  color: #8B5CF6;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.04em;
}

@media (max-width: 520px) {
  .slide-over { width: 100vw; }
  .run-detail-meta-row { grid-template-columns: 110px 1fr; }
}

/* ── OPS-110: Resolve-Sichtbarkeit (Decision-Badge, Stats, Erledigt-Tab) ───── */
.decision-badge {
  display: inline-block;
  margin-top: 4px;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
  border: 1px solid transparent;
}
.decision-badge-approved {
  background: rgba(34,197,94,0.12);
  color: #15803D;
  border-color: rgba(34,197,94,0.30);
}
.decision-badge-manual_fix_done {
  background: rgba(0,184,230,0.12);
  color: #0369A1;
  border-color: rgba(0,184,230,0.30);
}
.decision-badge-rejected {
  background: rgba(239,68,68,0.12);
  color: #B91C1C;
  border-color: rgba(239,68,68,0.30);
}
.decision-badge-auto_resolved {
  background: rgba(139,92,246,0.12);
  color: #6D28D9;
  border-color: rgba(139,92,246,0.30);
}

.review-stats-block .review-stats-period { display: flex; gap: 6px; }
.review-resolution-kpis { margin-top: var(--sp-2); }
.resolved-note { font-size: 12px; color: var(--text, #0A192F); cursor: help; }

/* Decision-Badge in der /runs-Status-Zelle: unter dem Status, kleiner Abstand */
.runs-table .decision-badge { margin-left: 0; }

