/**
 * AUTONOMIA DESIGN SYSTEM
 * Tomorrow Theme - A refined, professional aesthetic
 *
 * THEME PRESETS:
 *   - tomorrow-night (default): Dark, calm, focused
 *   - tomorrow-day: Light, clean, accessible
 *   - tomorrow-bright: High contrast dark for emphasis
 *
 * ENTITY CUSTOMIZATION:
 * Entities can override accent colors via brand settings:
 *   --brand-primary, --brand-primary-light, --brand-primary-dark, --brand-primary-subtle
 */

/* =============================================
   TOMORROW NIGHT (Default Dark Theme)
   ============================================= */
:root,
body[data-theme="tomorrow-night"] {
  /* Tomorrow Night Background Palette */
  --surface-base: #1d1f21;
  --surface-base-alpha: rgba(29, 31, 33, 0.95);
  --surface-raised: #282a2e;
  --surface-overlay: #373b41;
  --surface-elevated: #4a4d4a;

  /* Tomorrow Night Text */
  --text-primary: #c5c8c6;
  --text-secondary: #969896;
  --text-muted: #636563;

  /* Tomorrow Night Borders */
  --border-subtle: #282a2e;
  --border-default: #373b41;
  --border-strong: #4a4d4a;

  /* Tomorrow Semantic Colors */
  --color-red: #cc6666;
  --color-orange: #de935f;
  --color-yellow: #f0c674;
  --color-green: #b5bd68;
  --color-aqua: #8abeb7;
  --color-blue: #81a2be;
  --color-purple: #b294bb;

  /* Brand - Tomorrow Green (Growth) */
  --brand-primary: #b5bd68;
  --brand-primary-light: #c9d17c;
  --brand-primary-dark: #8f9752;
  --brand-primary-subtle: rgba(181, 189, 104, 0.15);
  --brand-primary-muted: rgba(181, 189, 104, 0.6);

  /* Legacy aliases */
  --accent: var(--brand-primary);
  --success: var(--color-green);
  --warning: var(--color-yellow);
  --error: var(--color-red);
  --info: var(--color-blue);

  --bg-primary: var(--surface-base);
  --bg-secondary: var(--surface-raised);
  --bg-tertiary: var(--surface-elevated);
  --border-color: var(--border-default);
  --input-border: var(--border-strong);

  /* Short aliases used in application inline styles */
  --primary: var(--brand-primary);
  --bg: var(--surface-base);
  --text: var(--text-primary);
  --border: var(--border-default);
  --danger: var(--color-red);
  --input-bg: var(--surface-raised);

  /* Scrollbar colors */
  --scrollbar-thumb: rgba(255, 255, 255, 0.1);
  --scrollbar-thumb-hover: rgba(255, 255, 255, 0.2);

  /* Theme indicator for JS */
  --theme-mode: dark;
}

/* =============================================
   TOMORROW DAY (Light Theme)
   ============================================= */
body[data-theme="tomorrow-day"],
body.light-mode {
  /* Tomorrow Day Background Palette */
  --surface-base: #ffffff;
  --surface-base-alpha: rgba(255, 255, 255, 0.95);
  --surface-raised: #efefef;
  --surface-overlay: #e0e0e0;
  --surface-elevated: #d6d6d6;

  /* Tomorrow Day Text */
  --text-primary: #4d4d4c;
  --text-secondary: #8e908c;
  --text-muted: #a0a1a0;

  /* Tomorrow Day Borders */
  --border-subtle: #e0e0e0;
  --border-default: #d6d6d6;
  --border-strong: #c5c5c5;

  /* Tomorrow Day Semantic Colors (adjusted for light bg) */
  --color-red: #c82829;
  --color-orange: #f5871f;
  --color-yellow: #eab700;
  --color-green: #718c00;
  --color-aqua: #3e999f;
  --color-blue: #4271ae;
  --color-purple: #8959a8;

  /* Brand - Tomorrow Green (adjusted for light) */
  --brand-primary: #718c00;
  --brand-primary-light: #8ba600;
  --brand-primary-dark: #556800;
  --brand-primary-subtle: rgba(113, 140, 0, 0.1);
  --brand-primary-muted: rgba(113, 140, 0, 0.6);

  /* Legacy aliases */
  --accent: var(--brand-primary);
  --success: var(--color-green);
  --warning: var(--color-yellow);
  --error: var(--color-red);
  --info: var(--color-blue);

  --bg-primary: var(--surface-base);
  --bg-secondary: var(--surface-raised);
  --bg-tertiary: var(--surface-elevated);
  --border-color: var(--border-default);
  --input-border: var(--border-strong);

  /* Short aliases used in application inline styles */
  --primary: var(--brand-primary);
  --bg: var(--surface-base);
  --text: var(--text-primary);
  --border: var(--border-default);
  --danger: var(--color-red);
  --input-bg: var(--surface-raised);

  /* Scrollbar colors */
  --scrollbar-thumb: rgba(0, 0, 0, 0.15);
  --scrollbar-thumb-hover: rgba(0, 0, 0, 0.25);

  /* Theme indicator */
  --theme-mode: light;
}

/* =============================================
   TOMORROW NIGHT BRIGHT (High Contrast Dark)
   ============================================= */
body[data-theme="tomorrow-bright"] {
  /* Tomorrow Night Bright - True black for OLED/emphasis */
  --surface-base: #000000;
  --surface-base-alpha: rgba(0, 0, 0, 0.95);
  --surface-raised: #0a0a0a;
  --surface-overlay: #151515;
  --surface-elevated: #202020;

  /* Tomorrow Night Bright Text - Higher contrast */
  --text-primary: #eaeaea;
  --text-secondary: #b0b0b0;
  --text-muted: #6a6a6a;

  /* Tomorrow Night Bright Borders */
  --border-subtle: #1a1a1a;
  --border-default: #2a2a2a;
  --border-strong: #3a3a3a;

  /* Tomorrow Night Bright Semantic Colors - More vivid */
  --color-red: #d54e53;
  --color-orange: #e78c45;
  --color-yellow: #e7c547;
  --color-green: #b9ca4a;
  --color-aqua: #70c0b1;
  --color-blue: #7aa6da;
  --color-purple: #c397d8;

  /* Brand - Bright Green */
  --brand-primary: #b9ca4a;
  --brand-primary-light: #cede5e;
  --brand-primary-dark: #95a33b;
  --brand-primary-subtle: rgba(185, 202, 74, 0.15);
  --brand-primary-muted: rgba(185, 202, 74, 0.6);

  /* Legacy aliases */
  --accent: var(--brand-primary);
  --success: var(--color-green);
  --warning: var(--color-yellow);
  --error: var(--color-red);
  --info: var(--color-blue);

  --bg-primary: var(--surface-base);
  --bg-secondary: var(--surface-raised);
  --bg-tertiary: var(--surface-elevated);
  --border-color: var(--border-default);
  --input-border: var(--border-strong);

  /* Short aliases used in application inline styles */
  --primary: var(--brand-primary);
  --bg: var(--surface-base);
  --text: var(--text-primary);
  --border: var(--border-default);
  --danger: var(--color-red);
  --input-bg: var(--surface-raised);

  /* Scrollbar colors */
  --scrollbar-thumb: rgba(255, 255, 255, 0.12);
  --scrollbar-thumb-hover: rgba(255, 255, 255, 0.22);

  /* Theme indicator */
  --theme-mode: dark;
}

/* =============================================
   TOMORROW SUNSET (Warm Light Theme)
   Inspired by warm paper/parchment tones
   ============================================= */
body[data-theme="tomorrow-sunset"] {
  /* Warm cream/parchment background palette */
  --surface-base: #f8f4e9;
  --surface-base-alpha: rgba(248, 244, 233, 0.95);
  --surface-raised: #f3ecdd;
  --surface-overlay: #ebe3d0;
  --surface-elevated: #e2d8c3;

  /* Warm sepia-tinted text */
  --text-primary: #3d3830;
  --text-secondary: #6b6358;
  --text-muted: #9a9183;

  /* Warm borders */
  --border-subtle: #e8e0cf;
  --border-default: #dcd2be;
  --border-strong: #cfc3ab;

  /* Tomorrow Sunset Semantic Colors - Warm, earthy palette */
  --color-red: #bf4545;
  --color-orange: #c97a3a;
  --color-yellow: #b89820;
  --color-green: #5d7a2a;
  --color-aqua: #3a7d7d;
  --color-blue: #456690;
  --color-purple: #704080;

  /* Brand - Earthy Green */
  --brand-primary: #5d7a2a;
  --brand-primary-light: #729538;
  --brand-primary-dark: #455c1e;
  --brand-primary-subtle: rgba(93, 122, 42, 0.12);
  --brand-primary-muted: rgba(93, 122, 42, 0.6);

  /* Legacy aliases */
  --accent: var(--brand-primary);
  --success: var(--color-green);
  --warning: var(--color-yellow);
  --error: var(--color-red);
  --info: var(--color-blue);

  --bg-primary: var(--surface-base);
  --bg-secondary: var(--surface-raised);
  --bg-tertiary: var(--surface-elevated);
  --border-color: var(--border-default);
  --input-border: var(--border-strong);

  /* Short aliases used in application inline styles */
  --primary: var(--brand-primary);
  --bg: var(--surface-base);
  --text: var(--text-primary);
  --border: var(--border-default);
  --danger: var(--color-red);
  --input-bg: var(--surface-raised);

  /* Scrollbar colors */
  --scrollbar-thumb: rgba(61, 56, 48, 0.15);
  --scrollbar-thumb-hover: rgba(61, 56, 48, 0.25);

  /* Theme indicator */
  --theme-mode: light;
}

/* =============================================
   TYPOGRAPHY
   ============================================= */
:root {
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;

  /* Type Scale - 7 standard sizes + 3 display sizes */
  --text-xs: 11px;
  --text-sm: 13px;
  --text-base: 15px;
  --text-lg: 17px;
  --text-xl: 20px;
  --text-2xl: 24px;
  --text-3xl: 30px;
  /* Display sizes for heroes and large headings */
  --text-4xl: 36px;
  --text-5xl: 48px;
  --text-6xl: 64px;

  /* Line Heights */
  --leading-tight: 1.25;
  --leading-normal: 1.5;
  --leading-relaxed: 1.625;

  /* Font Weights */
  --font-normal: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;
}

/* =============================================
   SPACING
   ============================================= */
:root {
  --space-0: 0;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;

  /* Legacy aliases */
  --space-xs: var(--space-1);
  --space-sm: var(--space-2);
  --space-md: var(--space-4);
  --space-lg: var(--space-6);
  --space-xl: var(--space-8);
  --space-2xl: var(--space-12);
}

/* =============================================
   RADII
   ============================================= */
:root {
  --radius-none: 0;
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --radius-xl: 12px;
  --radius-2xl: 16px;
  --radius-full: 9999px;
}

/* =============================================
   SHADOWS
   ============================================= */
:root {
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.15);
  --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.2);
}

/* =============================================
   TRANSITIONS
   ============================================= */
:root {
  --transition-fast: 100ms ease;
  --transition-normal: 200ms ease;
  --transition-slow: 300ms ease-out;
  --transition-layout: 500ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* =============================================
   LAYOUT
   ============================================= */
:root {
  --header-height: 56px;
  --sidebar-width: 280px;
  --sidebar-width-collapsed: 0px;
  --safe-area-top: env(safe-area-inset-top, 0px);
  --safe-area-bottom: env(safe-area-inset-bottom, 0px);
}

/* =============================================
   GLOBAL RESETS
   ============================================= */
*, *::before, *::after {
  box-sizing: border-box;
}

/* =============================================
   SCROLLBAR STYLING
   ============================================= */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--scrollbar-thumb-hover);
}

/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) transparent;
}

/* =============================================
   FOCUS STYLES
   ============================================= */
:focus-visible {
  outline: 2px solid var(--brand-primary);
  outline-offset: 2px;
}

/* =============================================
   UTILITY CLASSES
   ============================================= */
.font-sans { font-family: var(--font-sans); }
.font-mono { font-family: var(--font-mono); }

/* =============================================
   BRAND COMPONENTS (shared across all pages)
   ============================================= */

/* Autonomia wordmark — consistent across all pages */
.autonomia-wordmark {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--text-primary);
  text-decoration: none;
  line-height: 1;
}
.autonomia-wordmark.small {
  font-size: 11px;
  letter-spacing: 2px;
}
.autonomia-wordmark.muted {
  color: var(--text-muted);
}

/* Shared external page layout */
.ext-page {
  min-height: 100vh;
  background: var(--surface-base);
  color: var(--text-primary);
  font-family: var(--font-sans);
}

/* Shared header bar for external pages */
.ext-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  background: var(--surface-base);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 10;
}
.ext-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.ext-header-divider {
  width: 1px;
  height: 16px;
  background: var(--border-default);
}
.ext-header-entity {
  font-size: var(--text-sm, 13px);
  color: var(--text-secondary);
}
.ext-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Shared button styles for external pages */
.ext-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  font-family: var(--font-sans);
  font-size: var(--text-sm, 13px);
  font-weight: 500;
  border-radius: var(--radius-md, 6px);
  border: 1px solid var(--brand-primary);
  background: transparent;
  color: var(--brand-primary);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  text-decoration: none;
  line-height: 1.4;
}
.ext-btn:hover {
  background: var(--brand-primary-subtle);
}
.ext-btn.filled {
  background: var(--brand-primary);
  color: var(--surface-base);
  border-color: var(--brand-primary);
}
.ext-btn.filled:hover {
  opacity: 0.9;
}

/* Shared card for external pages */
.ext-card {
  background: var(--surface-base);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg, 8px);
  padding: 32px;
}

/* Shared input for external pages */
.ext-input {
  width: 100%;
  padding: 10px 14px;
  background: var(--surface-raised);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md, 6px);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: var(--text-base, 15px);
  outline: none;
  transition: border-color 0.15s;
  box-sizing: border-box;
}
.ext-input:focus {
  border-color: var(--brand-primary);
}
.ext-input::placeholder {
  color: var(--text-muted);
}

/* Footer for external pages */
.ext-footer {
  text-align: center;
  padding: 24px;
  color: var(--text-muted);
  font-size: 12px;
}
.ext-footer a {
  color: var(--brand-primary);
  text-decoration: none;
}

/* Message bubbles shared across chat pages */
.ext-msg-own {
  padding: 10px 14px;
  border-radius: 16px;
  border-bottom-right-radius: 4px;
  background: var(--brand-primary-subtle);
  border: 1px solid var(--brand-primary-muted);
  color: var(--text-primary);
  font-size: var(--text-base, 15px);
  line-height: 1.5;
  max-width: 70%;
  word-wrap: break-word;
}
.ext-msg-other {
  padding: 10px 14px;
  border-radius: 16px;
  border-bottom-left-radius: 4px;
  background: var(--surface-raised);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-size: var(--text-base, 15px);
  line-height: 1.5;
  max-width: 70%;
  word-wrap: break-word;
}

@media (max-width: 600px) {
  .autonomia-wordmark { font-size: 11px; letter-spacing: 2px; }
  .ext-header { padding: 10px 16px; }
  .ext-card { padding: 24px 20px; }
}

.text-primary { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-muted { color: var(--text-muted); }
.text-brand { color: var(--brand-primary); }

.bg-base { background: var(--surface-base); }
.bg-raised { background: var(--surface-raised); }
.bg-overlay { background: var(--surface-overlay); }
.bg-elevated { background: var(--surface-elevated); }

/* =============================================
   INLINE FORM COMPONENTS
   ============================================= */

/* Inline form container */
.inline-form {
  background: var(--surface-raised);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  margin-top: var(--space-3);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

/* Choice buttons group */
.choice-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

/* Individual choice button */
.choice-btn {
  background: var(--surface-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: var(--space-2) var(--space-4);
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  color: var(--text-primary);
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.choice-btn:hover {
  background: var(--surface-overlay);
  border-color: var(--brand-primary);
}

.choice-btn.selected {
  background: var(--brand-primary-subtle);
  border-color: var(--brand-primary);
  color: var(--brand-primary);
}

/* Custom text input for choice_or_text */
.choice-custom {
  display: none;
  margin-top: var(--space-2);
}

.choice-custom.visible {
  display: block;
}

/* Text input field */
.text-input {
  width: 100%;
  background: var(--surface-base);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: var(--space-2) var(--space-3);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  color: var(--text-primary);
  transition: all var(--transition-fast);
  resize: vertical;
  min-height: 40px;
}

.text-input:focus {
  outline: none;
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px var(--brand-primary-subtle);
}

.text-input::placeholder {
  color: var(--text-muted);
}

/* Checkbox group for multi-select */
.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.checkbox-item:hover {
  background: var(--surface-elevated);
}

.checkbox-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--brand-primary);
}

.checkbox-item label {
  flex: 1;
  cursor: pointer;
  font-size: var(--text-sm);
  color: var(--text-primary);
  user-select: none;
}

/* Form submit button */
.form-submit {
  align-self: flex-end;
  background: var(--brand-primary);
  border: none;
  border-radius: var(--radius-md);
  padding: var(--space-2) var(--space-5);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: var(--font-medium);
  color: var(--surface-base);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.form-submit:hover {
  background: var(--brand-primary-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.form-submit:active {
  transform: translateY(0);
}

.form-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Workflow preview section */
.workflow-preview {
  background: var(--surface-base);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-3);
  margin-bottom: var(--space-3);
}

.workflow-preview h4 {
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  color: var(--text-secondary);
  margin: 0 0 var(--space-2) 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.workflow-preview ol {
  margin: 0;
  padding-left: var(--space-5);
  color: var(--text-primary);
  font-size: var(--text-sm);
}

.workflow-preview li {
  margin-bottom: var(--space-1);
}

/* Mobile responsive breakpoints */
@media (max-width: 640px) {
  .inline-form {
    padding: var(--space-3);
    gap: var(--space-3);
  }

  .choice-buttons {
    flex-direction: column;
  }

  .choice-btn {
    width: 100%;
    text-align: center;
  }

  .form-submit {
    width: 100%;
  }
}

/* ============================================================================
   Automation Live View — real-time browser stream card
   Generic: works for filing, EIN, banking, compliance, etc.
   ============================================================================ */

.automation-live-view {
  background: var(--surface-raised, #1a1a1a);
  border: 1px solid var(--border-subtle, #333);
  border-radius: var(--radius-xl, 12px);
  overflow: hidden;
  margin: 12px 0;
  max-width: 640px;
}

.automation-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  font-weight: 600;
  font-size: var(--text-sm, 13px);
  color: var(--text-primary, #fff);
  border-bottom: 1px solid var(--border-subtle, #333);
}

.automation-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--status-success, #22c55e);
  flex-shrink: 0;
}

.automation-status-dot.pulsing {
  animation: automationPulse 1.5s ease-in-out infinite;
}

@keyframes automationPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.automation-title {
  flex: 1;
}

.automation-step-count {
  font-size: 11px;
  color: var(--text-secondary, #888);
  font-weight: 400;
}

.automation-browser-frame {
  background: #000;
  line-height: 0;
}

.automation-canvas {
  width: 100%;
  display: block;
}

.automation-step-label {
  padding: 8px 16px;
  font-size: 12px;
  color: var(--text-secondary, #888);
  min-height: 20px;
}

.automation-progress-bar {
  height: 3px;
  background: var(--surface-base, #222);
}

.automation-progress-fill {
  height: 100%;
  background: var(--brand-primary, #8f9752);
  transition: width 0.3s ease;
  width: 0%;
}

.automation-details {
  padding: 0 16px;
  font-size: var(--text-sm, 13px);
  color: var(--text-secondary, #888);
}

.automation-details:not(:empty) {
  padding: 12px 16px;
}

.automation-details strong {
  color: var(--text-primary, #fff);
}

/* Success state */
.automation-live-view.automation-complete .automation-header {
  color: var(--status-success, #22c55e);
  border-bottom: none;
}

.automation-live-view.automation-complete .automation-browser-frame {
  display: none;
}

.automation-live-view.automation-complete .automation-details {
  padding-bottom: 16px;
}

/* Failed state */
.automation-live-view.automation-failed .automation-header {
  color: var(--status-error, #ef4444);
  border-bottom: none;
}

.automation-live-view.automation-failed .automation-browser-frame {
  display: none;
}

.automation-success-icon {
  font-size: 16px;
  font-weight: bold;
}

.automation-error-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--status-error, #ef4444);
  color: #fff;
  font-size: 12px;
  font-weight: bold;
}

/* Paused state (CAPTCHA, login, MFA) */
.automation-live-view.automation-paused .automation-canvas {
  opacity: 0.5;
}

.automation-status-dot.paused {
  background: var(--status-warning, #f59e0b);
  animation: none;
}

.automation-human-input {
  padding: 12px 16px;
  background: var(--surface-base, #222);
  border-radius: 8px;
  margin-top: 8px;
}

.automation-human-input p {
  margin: 0 0 12px 0;
  color: var(--text-secondary, #999);
  font-size: 13px;
}

.automation-input-actions {
  display: flex;
  gap: 8px;
}

.automation-input-actions .btn {
  padding: 6px 16px;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  border: none;
  font-family: inherit;
}

.automation-input-actions .btn-primary {
  background: var(--brand-primary, #8f9752);
  color: white;
}

.automation-input-actions .btn-primary:hover {
  filter: brightness(1.1);
}

.automation-input-actions .btn-secondary {
  background: var(--surface-raised, #1a1a1a);
  color: var(--text-primary, #e5e5e5);
  border: 1px solid var(--border-subtle, #333);
}

.automation-input-actions .btn-secondary:hover {
  background: var(--surface-hover, #2a2a2a);
}
