@import url('https://fonts.googleapis.com/css2?family=Syne:wght@600;700;800&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

*, *::before, *::after { box-sizing: border-box; }

/* ── DESIGN TOKENS ──────────────────────────────── */
:root {
  /* Surfaces */
  --bg-base:     #f0f0eb;
  --bg-surface:  #f7f7f3;
  --bg-elevated: #ffffff;
  --bg-hover:    #e8e8e3;
  --bg-input:    #fafaf8;

  /* Borders */
  --border-faint:  rgba(0,0,0,0.04);
  --border-subtle: rgba(0,0,0,0.08);
  --border:        rgba(0,0,0,0.14);
  --border-accent: rgba(10,108,79,0.28);

  /* Text */
  --text:          #3d3b37;
  --text-secondary:#6e6b65;
  --text-muted:    #9e9b94;
  --text-heading:  #19180f;
  --text-accent:   #0a6c4f;

  /* Accent — deep clinical teal */
  --accent:        #0a6c4f;
  --accent-soft:   rgba(10,108,79,0.07);
  --accent-glow:   rgba(10,108,79,0.18);

  /* Status */
  --running:       #1d4ed8;
  --running-bg:    rgba(29,78,216,0.07);
  --completed:     #0a7a58;
  --completed-bg:  rgba(10,122,88,0.07);
  --failed:        #dc2626;
  --failed-bg:     rgba(220,38,38,0.07);
  --paused:        #b45309;
  --paused-bg:     rgba(180,83,9,0.07);

  /* Typography */
  --font-display: 'Syne', sans-serif;
  --font-body:    'Plus Jakarta Sans', sans-serif;
  --font-mono:    'JetBrains Mono', monospace;

  /* Radii */
  --r-sm: 5px;
  --r-md: 8px;
  --r-lg: 12px;
  --r-xl: 18px;

  /* Shadows — warm, soft on light bg */
  --shadow-sm:    0 1px 3px rgba(0,0,0,0.06), 0 1px 8px rgba(0,0,0,0.03);
  --shadow-md:    0 4px 16px rgba(0,0,0,0.08), 0 2px 6px rgba(0,0,0,0.04);
  --shadow-lg:    0 12px 40px rgba(0,0,0,0.10), 0 4px 12px rgba(0,0,0,0.05);
  --shadow-modal: 0 32px 80px rgba(0,0,0,0.14), 0 8px 24px rgba(0,0,0,0.08);

  /* Transitions */
  --t-fast: 0.12s ease;
  --t-med:  0.22s ease;
}

/* ── RESET / BASE ───────────────────────────────── */
html { height: 100%; }

body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text);
  background: var(--bg-base);
  background-image:
    radial-gradient(ellipse 120% 55% at 50% -8%, rgba(10,108,79,0.04) 0%, transparent 65%),
    radial-gradient(ellipse 70% 40% at 95% 100%, rgba(29,78,216,0.03) 0%, transparent 55%),
    linear-gradient(rgba(0,0,0,0.016) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,0,0,0.016) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 52px 52px, 52px 52px;
  background-attachment: fixed;
}

/* ── APP SHELL ──────────────────────────────────── */

.app-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Header */
.app-header {
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  background: rgba(240,240,235,0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 20;
  flex-shrink: 0;
}

.app-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.app-logo-mark {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: linear-gradient(135deg, #0a6c4f 0%, #1e4b84 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: #f0f0eb;
  letter-spacing: -0.5px;
  flex-shrink: 0;
  box-shadow: 0 0 12px rgba(10,108,79,0.22);
}

.app-brand-name {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--text-heading);
  letter-spacing: -0.4px;
  line-height: 1;
}

.app-brand-sub {
  font-size: 10.5px;
  color: var(--text-muted);
  margin-top: 2px;
  letter-spacing: 0.02em;
}

.app-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ── VERTICAL SELECTOR ─────────────────────────── */

.vertical-selector {
  position: relative;
}

.vertical-selector-trigger {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  cursor: pointer;
  font-size: 12px;
  color: var(--text-secondary);
  transition: border-color var(--t-fast), background var(--t-fast), color var(--t-fast);
  user-select: none;
}

.vertical-selector-trigger:hover {
  background: var(--bg-hover);
  border-color: var(--border);
  color: var(--text);
}

.vertical-selector-trigger.open {
  border-color: var(--accent);
  color: var(--text);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.vertical-selector-icon {
  font-size: 14px;
  line-height: 1;
}

.vertical-selector-label {
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.01em;
}

.vertical-selector-chevron {
  width: 10px;
  height: 10px;
  opacity: 0.5;
  transition: transform var(--t-fast);
  flex-shrink: 0;
}

.vertical-selector-trigger.open .vertical-selector-chevron {
  transform: rotate(180deg);
  opacity: 0.8;
}

.vertical-selector-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 220px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  z-index: 200;
  animation: dropdown-in 0.14s ease;
}

@keyframes dropdown-in {
  from { opacity: 0; transform: translateY(-4px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.vertical-selector-dropdown.hidden {
  display: none;
}

.vertical-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  cursor: pointer;
  transition: background var(--t-fast);
  border-bottom: 1px solid var(--border-faint);
}

.vertical-option:last-child {
  border-bottom: none;
}

.vertical-option:hover {
  background: var(--bg-hover);
}

.vertical-option.active {
  background: var(--accent-soft);
}

.vertical-option-icon {
  font-size: 18px;
  line-height: 1;
  flex-shrink: 0;
}

.vertical-option-text {
  flex: 1;
  min-width: 0;
}

.vertical-option-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-heading);
  line-height: 1.2;
}

.vertical-option.active .vertical-option-name {
  color: var(--accent);
}

.vertical-option-desc {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
  line-height: 1.3;
}

.vertical-option-check {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  opacity: 0;
  transform: scale(0.6);
  transition: opacity var(--t-fast), transform var(--t-fast);
}

.vertical-option.active .vertical-option-check {
  opacity: 1;
  transform: scale(1);
}

.vertical-option-check::after {
  content: '';
  width: 5px;
  height: 3px;
  border-left: 1.5px solid white;
  border-bottom: 1.5px solid white;
  transform: rotate(-45deg) translate(0.5px, -0.5px);
  display: block;
}

.app-status-pill {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11.5px;
  color: var(--text-secondary);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  padding: 5px 12px;
}

.app-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse-dot 2.2s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(10,108,79,0.45); }
  50%       { opacity: 0.8; box-shadow: 0 0 0 5px rgba(10,108,79,0); }
}

.app-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #d4e0d9, #c0cfd8);
  border: 1.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  font-family: var(--font-mono);
  color: var(--text-secondary);
  cursor: pointer;
}

/* Body below header */
.app-body {
  display: flex;
  flex: 1;
  min-height: calc(100vh - 58px);
}

/* Sidebar */
.app-sidebar {
  width: 220px;
  flex-shrink: 0;
  background: rgba(244,244,239,0.9);
  border-right: 1px solid var(--border-subtle);
  padding: 12px 8px 20px;
  display: flex;
  flex-direction: column;
}

.nav-section-label {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 16px 12px 5px;
}

.nav-section-label:first-child { padding-top: 4px; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 12px;
  border-radius: var(--r-md);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
  transition: color var(--t-fast), background var(--t-fast);
  position: relative;
  font-family: var(--font-body);
}

.nav-item:hover {
  color: var(--text-heading);
  background: var(--bg-hover);
}

.nav-item.active {
  color: var(--text-accent);
  background: var(--accent-soft);
  font-weight: 600;
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 7px;
  bottom: 7px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--accent);
  box-shadow: 0 0 6px rgba(10,108,79,0.35);
}

.nav-icon {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  opacity: 0.5;
}

.nav-item.active .nav-icon,
.nav-item:hover  .nav-icon { opacity: 0.8; }

/* Main */
.app-main {
  flex: 1;
  padding: 28px 32px;
  min-width: 0;
  overflow-y: auto;
}

.app-main > section {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

/* View enter animation */
.view-entering {
  animation: fade-up-in 0.22s ease both;
}

@keyframes fade-up-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── PAGE HEADERS ───────────────────────────────── */

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.page-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--text-heading);
  margin: 0;
  line-height: 1.2;
}

.page-subtitle {
  font-size: 12.5px;
  color: var(--text-secondary);
  margin: 4px 0 0;
}

/* ── CARDS ──────────────────────────────────────── */

.card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.card-title {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0;
}

/* Metric cards */
.metric-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}

.metric-card:hover {
  border-color: var(--border);
  box-shadow: var(--shadow-md);
}



.metric-label {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.metric-value {
  font-family: var(--font-mono);
  font-size: 28px;
  font-weight: 600;
  color: var(--text-heading);
  line-height: 1;
  letter-spacing: -1px;
}

.metric-value.accent { color: var(--accent); }

/* ── BUTTONS ────────────────────────────────────── */

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: var(--r-md);
  background: var(--accent);
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-body);
  color: #f0f0eb;
  border: none;
  cursor: pointer;
  transition: background var(--t-med), box-shadow var(--t-med), transform var(--t-fast);
  white-space: nowrap;
  text-decoration: none;
}

.btn-primary:hover {
  background: #0c7e5c;
  box-shadow: 0 0 0 3px var(--accent-glow), 0 4px 16px rgba(10,108,79,0.22);
  transform: translateY(-1px);
}

.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: var(--r-md);
  background: var(--bg-elevated);
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 500;
  font-family: var(--font-body);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all var(--t-fast);
  white-space: nowrap;
}

.btn-secondary:hover {
  color: var(--text-heading);
  border-color: var(--border-accent);
  background: var(--bg-hover);
}

.btn-secondary:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-md);
  background: transparent;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 500;
  font-family: var(--font-body);
  color: var(--failed);
  border: 1px solid rgba(220,38,38,0.22);
  cursor: pointer;
  transition: all var(--t-fast);
}

.btn-danger:hover {
  background: rgba(220,38,38,0.06);
  border-color: rgba(220,38,38,0.40);
}

/* ── INPUTS ─────────────────────────────────────── */

.input {
  width: 100%;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  padding: 9px 12px;
  font-size: 13px;
  font-family: var(--font-body);
  background: var(--bg-input);
  color: var(--text);
  box-sizing: border-box;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
  -webkit-appearance: none;
}

.input::placeholder { color: var(--text-muted); }
.input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(10,108,79,0.10);
}

.input option {
  background: var(--bg-elevated);
  color: var(--text);
}

textarea.input { resize: vertical; line-height: 1.55; }

.form-label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.form-section {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-md);
  padding: 12px 14px;
}

/* ── BADGES ─────────────────────────────────────── */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 999px;
  padding: 3px 9px 3px 7px;
  font-size: 11px;
  font-weight: 600;
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.badge::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  flex-shrink: 0;
}

.badge-running {
  background: var(--running-bg);
  color: var(--running);
  border: 1px solid rgba(29,78,216,0.2);
}
.badge-running::before {
  background: var(--running);
  animation: badge-blink 1.6s ease-in-out infinite;
}

.badge-completed {
  background: var(--completed-bg);
  color: var(--completed);
  border: 1px solid rgba(10,122,88,0.2);
}
.badge-completed::before { background: var(--completed); }

.badge-failed {
  background: var(--failed-bg);
  color: var(--failed);
  border: 1px solid rgba(220,38,38,0.2);
}
.badge-failed::before { background: var(--failed); }

.badge-paused {
  background: var(--paused-bg);
  color: var(--paused);
  border: 1px solid rgba(180,83,9,0.2);
}
.badge-paused::before { background: var(--paused); }

.badge-live {
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid rgba(10,108,79,0.2);
}
.badge-live::before {
  background: var(--accent);
  animation: badge-blink 1.6s ease-in-out infinite;
}

@keyframes badge-blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.3; }
}

/* ── MODALS ─────────────────────────────────────── */

.modal {
  position: fixed;
  inset: 0;
  background: rgba(25,24,15,0.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 50;
  animation: modal-backdrop-in 0.18s ease;
}

@keyframes modal-backdrop-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.modal-card {
  width: 100%;
  max-width: 520px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 28px;
  box-shadow: var(--shadow-modal);
  animation: modal-card-in 0.22s cubic-bezier(0.32, 1.25, 0.55, 1);
  max-height: 90vh;
  overflow-y: auto;
}

@keyframes modal-card-in {
  from { opacity: 0; transform: scale(0.94) translateY(10px); }
  to   { opacity: 1; transform: scale(1)    translateY(0);    }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}

.modal-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--text-heading);
  letter-spacing: -0.3px;
}

.modal-close {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 13px;
  transition: all var(--t-fast);
  padding: 0;
  line-height: 1;
  font-family: var(--font-body);
}

.modal-close:hover {
  color: var(--text-heading);
  background: var(--bg-hover);
  border-color: var(--border);
}

/* ── TABLES ─────────────────────────────────────── */

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

.data-table th {
  text-align: left;
  padding: 10px 16px;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-subtle);
  white-space: nowrap;
}

.data-table td {
  padding: 13px 16px;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-faint);
  vertical-align: middle;
}

.data-table td.primary {
  color: var(--text-heading);
  font-weight: 500;
}

.data-table td.mono {
  font-family: var(--font-mono);
  font-size: 12px;
}

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

.data-table tbody tr:hover td {
  background: rgba(0,0,0,0.02);
}

/* ── TASK CARDS ─────────────────────────────────── */

.task-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg);
  padding: 16px 18px;
  transition: border-color var(--t-fast);
}

.task-card:hover { border-color: var(--border); }

.task-step-num {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.task-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-heading);
  margin-top: 2px;
}

.task-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 3px;
}

.task-prompt {
  font-size: 12.5px;
  color: var(--text-secondary);
  margin-top: 10px;
  line-height: 1.55;
}

.task-footer {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border-faint);
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ── PROGRESS BARS ──────────────────────────────── */

.progress-bar-track {
  height: 4px;
  background: var(--bg-hover);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 12px;
}

.progress-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent) 0%, #1d4ed8 100%);
  border-radius: 999px;
  transition: width 0.3s ease;
}

/* ── LOG PANEL ──────────────────────────────────── */

.log-panel {
  background: #1c1a15;
  border: 1px solid rgba(0,0,0,0.18);
  border-radius: var(--r-md);
  padding: 14px 16px;
  max-height: 420px;
  overflow-y: auto;
  box-shadow: inset 0 2px 8px rgba(0,0,0,0.12);
}

.log-line {
  font-family: var(--font-mono);
  font-size: 11px;
  color: #8a9b84;
  padding: 1.5px 0;
  line-height: 1.65;
}

.log-line:first-child { color: #5fcf9e; }

/* ── WORKFLOW CARDS ─────────────────────────────── */

.workflow-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg);
  padding: 16px 18px 16px 22px;
  position: relative;
  overflow: hidden;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}

.workflow-card:hover {
  border-color: var(--border);
  box-shadow: var(--shadow-md);
}

.workflow-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
}

.wf-completed::before { background: var(--completed); }
.wf-running::before   { background: var(--running); }
.wf-failed::before    { background: var(--failed); }
.wf-paused::before    { background: var(--paused); }

/* ── INTEGRATION CARDS ──────────────────────────── */

.integration-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg);
  padding: 20px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  transition: border-color var(--t-fast);
}

.integration-card:hover { border-color: var(--border); }

.integration-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--r-md);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

/* ── COMPLIANCE CHECKS ──────────────────────────── */

.compliance-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-md);
}

.check-icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  flex-shrink: 0;
}

.check-pass    { background: rgba(10,122,88,0.12);   color: var(--completed); }
.check-caution { background: rgba(180,83,9,0.12);    color: var(--paused);   }
.check-fail    { background: rgba(220,38,38,0.12);   color: var(--failed);   }

/* ── CHECKBOX LABELS ────────────────────────────── */

.check-label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-md);
  font-size: 12.5px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--t-fast);
  user-select: none;
  background: var(--bg-input);
}

.check-label:hover {
  border-color: var(--border);
  color: var(--text-heading);
  background: var(--bg-hover);
}

.check-label input[type="checkbox"] {
  accent-color: var(--accent);
  width: 13px;
  height: 13px;
  flex-shrink: 0;
  cursor: pointer;
}

.tool-group-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-md);
  padding: 12px;
}

.tool-group-label {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
}

/* ── MISC COMPONENTS ────────────────────────────── */

.vars-hint {
  background: var(--accent-soft);
  border: 1px solid rgba(10,108,79,0.14);
  border-radius: var(--r-md);
  padding: 10px 12px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-accent);
  line-height: 1.8;
}

.api-url-block {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--border-accent);
  border-radius: var(--r-md);
  padding: 10px 14px;
  word-break: break-all;
  line-height: 1.6;
}

.trigger-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-secondary);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-sm);
  padding: 3px 8px;
}

.pii-notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: rgba(29,78,216,0.04);
  border: 1px solid rgba(29,78,216,0.12);
  border-radius: var(--r-md);
  padding: 12px 16px;
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.file-type-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: var(--r-sm);
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 600;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  letter-spacing: 0.04em;
}

/* ── TAILWIND LIGHT OVERRIDES ───────────────────── */

.text-slate-800 { color: var(--text-heading)   !important; }
.text-slate-700 { color: var(--text)           !important; }
.text-slate-600 { color: var(--text-secondary) !important; }
.text-slate-500 { color: var(--text-secondary) !important; }
.text-slate-400 { color: var(--text-muted)     !important; }
.text-slate-200 { color: var(--text-secondary) !important; }

.bg-white     { background: var(--bg-elevated) !important; }
.bg-slate-50  { background: var(--bg-surface)  !important; }
.bg-slate-100 { background: var(--bg-hover)    !important; }
.bg-slate-800 { background: var(--text-heading) !important; }
.bg-slate-900 { background: #19180f            !important; }

.border-slate-200 { border-color: var(--border-subtle) !important; }
.border-slate-100 { border-color: var(--border-faint)  !important; }

.bg-emerald-100   { background: rgba(10,122,88,0.09)   !important; }
.text-emerald-700 { color: var(--completed)            !important; }

.bg-amber-100     { background: rgba(180,83,9,0.09)    !important; }
.text-amber-700   { color: var(--paused)               !important; }

.bg-rose-100      { background: rgba(220,38,38,0.09)   !important; }
.text-rose-700    { color: var(--failed)               !important; }
.text-rose-100    { color: var(--failed)               !important; }

.text-brand-500, .text-cyan-500 { color: var(--accent) !important; }
.bg-brand-500  { background: var(--accent)             !important; }

.bg-dbeafe  { background: var(--running-bg)  !important; }
.text-1e40af { color: var(--running)         !important; }

/* ── UTILITY ────────────────────────────────────── */

.hidden { display: none !important; }

/* ── SCROLLBARS ─────────────────────────────────── */

::-webkit-scrollbar          { width: 5px; height: 5px; }
::-webkit-scrollbar-track    { background: transparent; }
::-webkit-scrollbar-thumb    { background: rgba(0,0,0,0.14); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,0.24); }
