/* TeamYou brand mapping (see DESIGN.md) — dark theme is the TeamYou cobalt
 * environment: cobalt surfaces, teamyou-green accent. Brand values mirror
 * the teamyou repo's DESIGN.md / tailwind scales. */
:root {
  --bg: #00141f; /* TeamYou dark --background */
  --bg-sidebar: #000d15; /* teamyou-cobalt-950 */
  --bg-content: #001f2d; /* TeamYou dark popover / brand cobaltSurface */
  --bg-hover: rgba(51, 151, 199, 0.08); /* cobalt-400 tint (hovers are cobalt, not green) */
  --bg-active: rgba(49, 238, 136, 0.08); /* green tint — pairs with accent text */
  --border: #023544; /* teamyou-cobalt-800 */
  --border-strong: #004b6f; /* teamyou-cobalt-700 */
  --text: #d4d4d8; /* zinc-300 */
  --text-muted: #a0aec0; /* TeamYou dark --muted-foreground */
  --text-dim: #64748b;
  --card-label-bright: #f4f4f5;
  --accent: #31ee88; /* teamyou-green-400 */
  --accent-dim: rgba(49, 238, 136, 0.4);
  --accent-link: #7afbb5; /* teamyou-green-300 */
  --orange: #fb923c; /* TeamYou dark caution (orange-400) */
  --comment: #6a737d;
  --keyword: #ff7b72;
  --string: #a5d6ff;
  --number: #79c0ff;
  --panel-bg-contrast: rgba(51, 151, 199, 0.07);
  --panel-border-contrast: rgba(51, 151, 199, 0.22);
  --field-bg-contrast: #001f2d; /* TeamYou dark --input-background */
  --field-border-contrast: #004b6f; /* teamyou-cobalt-700 */
  --field-menu-bg: #000d15; /* teamyou-cobalt-950 */

  /* ── Semantic theme tokens ────────────────────── */
  --text-bright: #ffffff;
  --overlay: rgba(0, 0, 0, 0.7);

  /* Status: error */
  --status-error: #fca5a5;
  --status-error-muted: #f87171;
  --status-error-bg: rgba(127, 29, 29, 0.95);
  --status-error-border: rgba(185, 28, 28, 0.8);

  /* Status: warning — TeamYou `warning` (amber) */
  --status-warning: #fbbf24; /* amber-400 */
  --status-warning-muted: #f59e0b; /* amber-500 */
  --status-warning-bg: rgba(69, 26, 3, 0.95); /* amber-950 */
  --status-warning-border: rgba(146, 64, 14, 0.8); /* amber-800 */

  /* Status: success — teamyou-green */
  --status-success: #7afbb5; /* green-300 */
  --status-success-muted: #31ee88; /* green-400 */
  --status-success-bg: rgba(0, 51, 26, 0.55); /* green-950 */
  --status-success-border: rgba(9, 140, 71, 0.8); /* green-700 */

  /* Status: info — teamyou-cobalt */
  --status-info: #99cbe3; /* cobalt-200 */
  --status-info-muted: #3397c7; /* cobalt-400 */
  --status-info-bg: rgba(1, 42, 58, 0.95); /* cobalt-900 */
  --status-info-border: rgba(0, 100, 148, 0.8); /* cobalt-600 */
}

/* ── Light theme ─────────────────────────────────── */
[data-theme="light"] {
  --bg: #ffffff; /* TeamYou light --background */
  --bg-sidebar: #fafafa; /* TeamYou light --sidebar-background */
  --bg-content: #ffffff;
  --bg-hover: rgba(0, 0, 0, 0.04);
  --bg-active: rgba(16, 215, 108, 0.1); /* green-500 tint */
  --border: #e4e4e7; /* TeamYou light --border */
  --border-strong: #d4d4d8;
  --text: #18181b; /* zinc-900 */
  --text-muted: #71717a; /* TeamYou light --muted-foreground */
  --text-dim: #a1a1aa;
  --text-bright: #09090b; /* TeamYou light --foreground */
  --card-label-bright: #18181b;
  --accent: #06b357; /* teamyou-green-600 (light-mode green text) */
  --accent-dim: rgba(6, 179, 87, 0.3);
  --accent-link: #098c47; /* teamyou-green-700 */
  --orange: #ea580c; /* TeamYou light caution (orange-600) */
  --comment: #9ca3af;
  --keyword: #dc2626;
  --string: #2563eb;
  --number: #0284c7;
  --panel-bg-contrast: rgba(0, 0, 0, 0.02);
  --panel-border-contrast: rgba(0, 0, 0, 0.1);
  --field-bg-contrast: rgba(0, 0, 0, 0.04);
  --field-border-contrast: rgba(0, 0, 0, 0.15);
  --field-menu-bg: #ffffff;
  --overlay: rgba(0, 0, 0, 0.5);

  --status-error: #dc2626;
  --status-error-muted: #ef4444;
  --status-error-bg: rgba(254, 226, 226, 0.95);
  --status-error-border: rgba(252, 165, 165, 0.8);
  /* warning — TeamYou `warning` (amber) */
  --status-warning: #d97706; /* amber-600 */
  --status-warning-muted: #b45309; /* amber-700 */
  --status-warning-bg: rgba(254, 243, 199, 0.95); /* amber-100 */
  --status-warning-border: rgba(253, 230, 138, 0.9); /* amber-200 */
  /* success — teamyou-green */
  --status-success: #06b357; /* green-600 */
  --status-success-muted: #10d76c; /* green-500 */
  --status-success-bg: rgba(216, 255, 234, 0.95); /* green-100 */
  --status-success-border: rgba(122, 251, 181, 0.8); /* green-300 */
  /* info — teamyou-cobalt */
  --status-info: #006494; /* cobalt-600 */
  --status-info-muted: #007db9; /* cobalt-500 */
  --status-info-bg: rgba(204, 229, 241, 0.95); /* cobalt-100 */
  --status-info-border: rgba(102, 177, 213, 0.8); /* cobalt-300 */
}

html, body { height: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Geist', ui-sans-serif, system-ui, -apple-system, sans-serif;
  font-size: 14px;
  line-height: 1.6;
}

.ac-logo-mark {
  display: inline-block;
  flex: 0 0 auto;
  width: var(--ac-logo-width, 20px);
  height: var(--ac-logo-height, 20px);
  background: #31ee88;
  -webkit-mask: url("../img/logo.svg") center / contain no-repeat;
  mask: url("../img/logo.svg") center / contain no-repeat;
}

[data-theme="light"] .ac-logo-mark {
  background: var(--accent);
}

/* Standardised card / section label. */
.card-label {
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.card-label-bright {
  color: var(--card-label-bright);
}

/* Sentence-case per DESIGN.md — no uppercase/tracked labels. */
.ac-small-heading {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
}

/* Shared collapsible history rows (incidents, webhook requests). */
.ac-history-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ac-history-list.ac-history-list-tight {
  gap: 0;
}

.ac-history-item {
  border: 1px solid var(--panel-border-contrast);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.12);
}

.ac-history-item.ac-history-item-flat {
  border: 0;
  border-bottom: 1px solid var(--panel-border-contrast);
  border-radius: 0;
  background: transparent;
}

.snippet-collapse-fade {
  background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.75) 70%);
}

/* Shared inset panel for "surface on surface" layouts. */
.ac-surface-inset {
  border: 1px solid var(--panel-border-contrast);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.12);
}

.ac-history-summary {
  cursor: pointer;
  list-style: none;
  padding: 8px 10px;
  color: #d1d5db;
}

.ac-history-summary::-webkit-details-marker {
  display: none;
}

.ac-history-summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.ac-history-toggle {
  color: var(--text-muted);
  transition: transform 0.15s ease, color 0.15s ease;
}

.ac-history-item[open] > .ac-history-summary .ac-history-toggle {
  transform: rotate(90deg);
  color: #d1d5db;
}

.ac-history-body {
  margin: 4px 10px 10px;
  padding-top: 8px;
  border-top: 1px solid var(--panel-border-contrast);
}

/* Unified panel treatment across tabs/pages. */
.bg-surface {
  background: var(--panel-bg-contrast) !important;
  border-color: var(--panel-border-contrast) !important;
}

/* Solid background for modals so page content doesn't bleed through. */
.bg-modal {
  background: var(--bg) !important;
  border-color: var(--panel-border-contrast) !important;
}

.border-border {
  border-color: var(--panel-border-contrast) !important;
}

.ac-tip-link {
  color: var(--accent-link);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.ac-tip-link:hover {
  color: var(--accent);
}

/* Universal field contrast treatment (all tabs/pages). */
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
select,
textarea {
  background: var(--field-bg-contrast);
  border-color: var(--field-border-contrast);
}

select {
  color-scheme: dark;
}

select option,
select optgroup {
  background-color: var(--field-menu-bg);
  color: var(--text);
}

select option:checked {
  background-color: var(--status-info-bg);
  color: var(--text-bright);
}

input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):focus,
select:focus,
textarea:focus {
  border-color: rgba(255, 255, 255, 0.28);
}

::placeholder { color: var(--text-dim) !important; opacity: 1 !important; }
::-webkit-input-placeholder { color: var(--text-dim) !important; }
::-moz-placeholder { color: var(--text-dim) !important; }

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.08); border-radius: 3px; }

.scrollbar-hidden {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.scrollbar-hidden::-webkit-scrollbar {
  display: none;
}

/* Google scope picker toggle buttons */
.scope-btn { background: rgba(255,255,255,0.03); color: var(--text-muted); border: 1px solid var(--border); transition: all 0.15s; }
.scope-btn:hover { border-color: var(--text-dim); color: var(--text); }
.scope-btn-read.active {
  background: rgba(255, 255, 255, 0.03);
  color: #f3f4f6;
  border-color: rgba(255, 255, 255, 0.35);
}
.scope-btn-write.active {
  background: rgba(255, 255, 255, 0.03);
  color: #f3f4f6;
  border-color: rgba(255, 255, 255, 0.35);
}

/* Primary (brand) action button — one per surface. */
.ac-btn-primary {
  border: 1px solid var(--accent-dim);
  background: linear-gradient(
    180deg,
    rgba(49, 238, 136, 0.14) 0%,
    rgba(49, 238, 136, 0.08) 100%
  );
  color: var(--accent);
  box-shadow: inset 0 0 0 1px rgba(49, 238, 136, 0.12);
  transition:
    border-color 0.15s ease,
    background 0.15s ease,
    color 0.15s ease,
    box-shadow 0.15s ease,
    transform 0.15s ease;
}

.ac-btn-primary:hover:not(:disabled) {
  border-color: rgba(49, 238, 136, 0.7);
  background: linear-gradient(
    180deg,
    rgba(49, 238, 136, 0.24) 0%,
    rgba(49, 238, 136, 0.12) 100%
  );
  color: #b4fed5;
  box-shadow: inset 0 0 0 1px rgba(49, 238, 136, 0.2);
}

.ac-btn-primary:active:not(:disabled) {
  transform: translateY(1px);
}

.ac-btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.ac-path-card {
  border: 1px solid var(--panel-border-contrast);
  background: rgba(0, 0, 0, 0.2);
  transition:
    border-color 0.15s ease,
    background 0.15s ease,
    box-shadow 0.15s ease,
    transform 0.15s ease;
}

.ac-path-card:hover {
  border-color: rgba(49, 238, 136, 0.5);
  background: rgba(49, 238, 136, 0.04);
  box-shadow: inset 0 0 0 1px rgba(49, 238, 136, 0.1);
}

.ac-path-card:hover .ac-path-icon {
  color: var(--accent);
  border-color: rgba(49, 238, 136, 0.3);
  background: rgba(49, 238, 136, 0.1);
}

.ac-path-card:hover .ac-path-title {
  color: #b4fed5;
}

.ac-path-card:hover .ac-path-desc {
  color: #94a3b8;
}

.ac-path-icon {
  transition:
    color 0.15s ease,
    border-color 0.15s ease,
    background 0.15s ease;
}

.ac-btn-secondary {
  border: 1px solid var(--panel-border-contrast);
  color: #d1d5db;
  background: rgba(255, 255, 255, 0.03);
  transition:
    border-color 0.15s ease,
    color 0.15s ease,
    background 0.15s ease,
    transform 0.15s ease;
}

.ac-btn-secondary:hover:not(:disabled) {
  border-color: rgba(255, 255, 255, 0.35);
  color: #f3f4f6;
  background: rgba(255, 255, 255, 0.06);
}

.ac-btn-secondary:active:not(:disabled) {
  transform: translateY(1px);
}

.ac-btn-secondary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.ac-btn-ghost {
  border: none;
  color: var(--text-muted);
  background: transparent;
  transition: color 0.15s ease;
}

.ac-btn-ghost:hover:not(:disabled) {
  color: #f3f4f6;
}

.ac-btn-ghost:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.ac-btn-danger {
  border: 1px solid rgba(239, 68, 68, 0.45);
  background: rgba(239, 68, 68, 0.08);
  color: #fca5a5;
  transition:
    border-color 0.15s ease,
    color 0.15s ease,
    background 0.15s ease,
    transform 0.15s ease;
}

.ac-btn-danger:hover:not(:disabled) {
  border-color: rgba(239, 68, 68, 0.7);
  background: rgba(239, 68, 68, 0.14);
  color: #fecaca;
}

.ac-btn-danger:active:not(:disabled) {
  transform: translateY(1px);
}

.ac-btn-danger:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.ac-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}

.ac-toggle-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.ac-toggle-track {
  position: relative;
  width: 34px;
  height: 20px;
  border-radius: 999px;
  border: 1px solid var(--panel-border-contrast);
  background: rgba(0, 0, 0, 0.35);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
  transition:
    border-color 0.18s ease,
    background-color 0.18s ease,
    box-shadow 0.18s ease;
}

.ac-toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: #94a3b8;
  box-shadow: 0 0 0 1px rgba(15, 21, 33, 0.3);
  transition:
    transform 0.18s ease,
    background-color 0.18s ease,
    box-shadow 0.18s ease;
}

.ac-toggle-label {
  font-size: 12px;
  color: #d1d5db;
}

.ac-toggle-input:checked + .ac-toggle-track {
  border-color: rgba(49, 238, 136, 0.8);
  background: rgba(49, 238, 136, 0.16);
  box-shadow: inset 0 0 0 1px rgba(49, 238, 136, 0.2);
}

.ac-toggle-input:checked + .ac-toggle-track .ac-toggle-thumb {
  transform: translateX(14px);
  background: #b4fed5;
  box-shadow: 0 0 0 1px rgba(15, 21, 33, 0.25);
}

.ac-toggle-input:focus-visible + .ac-toggle-track {
  outline: 2px solid rgba(49, 238, 136, 0.55);
  outline-offset: 2px;
}

.ac-toggle-input:disabled + .ac-toggle-track {
  opacity: 0.55;
  box-shadow: none;
}

.ac-toggle-input:disabled + .ac-toggle-track + .ac-toggle-label {
  opacity: 0.6;
}

@keyframes acStatusDotPulse {
  0%,
  100% {
    transform: scale(1);
    box-shadow:
      0 0 0 0 rgba(49, 238, 136, 0.14),
      0 0 5px rgba(49, 238, 136, 0.18);
  }
  50% {
    transform: scale(1.08);
    box-shadow:
      0 0 0 3px rgba(49, 238, 136, 0.08),
      0 0 9px rgba(49, 238, 136, 0.32);
  }
}

@keyframes acStatusDotPulseInfo {
  0%,
  100% {
    transform: scale(1);
    box-shadow:
      0 0 0 0 rgba(51, 151, 199, 0.16),
      0 0 5px rgba(51, 151, 199, 0.22);
  }
  50% {
    transform: scale(1.08);
    box-shadow:
      0 0 0 3px rgba(51, 151, 199, 0.1),
      0 0 9px rgba(51, 151, 199, 0.34);
  }
}

@keyframes acStepPillPulse {
  0%,
  100% {
    box-shadow:
      0 0 0 0 rgba(49, 238, 136, 0.14),
      0 0 5px rgba(49, 238, 136, 0.18);
  }
  50% {
    box-shadow:
      0 0 0 3px rgba(49, 238, 136, 0.08),
      0 0 9px rgba(49, 238, 136, 0.32);
  }
}

.ac-step-pill-pulse {
  animation: acStepPillPulse 2.6s ease-in-out infinite;
}

.ac-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
}

.ac-status-dot--healthy {
  background: #31ee88;
  animation: acStatusDotPulse 2.6s ease-in-out infinite;
}

.ac-status-dot--info {
  background: #3397c7;
  animation: acStatusDotPulseInfo 2.6s ease-in-out infinite;
}

.ac-status-dot--healthy-offset {
  animation-delay: 0.95s;
}

@keyframes acSpinnerOrbit {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.ac-spinner {
  animation: acSpinnerOrbit 1s cubic-bezier(0.3, 0.2, 0.7, 0.8) infinite;
  transform-origin: center;
  will-change: transform;
}

@media (prefers-reduced-motion: reduce) {
  .ac-spinner {
    animation-duration: 1.8s;
    animation-timing-function: linear;
  }
}

/* Reusable segmented control (pill toggle). */
.ac-segmented-control {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--panel-border-contrast);
  border-radius: 8px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.02);
  height: 28px;
}

.ac-segmented-control-full {
  display: flex;
  width: 100%;
}

.ac-segmented-control-button {
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 12px;
  letter-spacing: 0.03em;
  height: 100%;
  line-height: 1;
  padding: 0 10px;
  cursor: pointer;
  transition: color 0.12s, background 0.12s;
}

.ac-segmented-control-full .ac-segmented-control-button {
  flex: 1 1 0%;
}

.ac-segmented-control > .inline-flex {
  align-self: stretch;
  display: flex;
}

.ac-segmented-control-full > .inline-flex {
  flex: 1 1 0%;
}

.ac-segmented-control-lg {
  height: 36px;
  border-radius: 12px;
}

.ac-segmented-control-lg .ac-segmented-control-button {
  font-size: 14px;
  padding: 0 16px;
}

.ac-segmented-control-button:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
}

.ac-segmented-control-button.active {
  color: var(--accent);
  background: var(--bg-active);
}

.ac-segmented-control-dark {
  background: rgba(0, 0, 0, 0.25);
}

/* ── PopActions: animated action group ───────── */

.ac-pop-actions {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  flex-shrink: 0;
}

.ac-pop-actions-hidden {
  visibility: hidden;
  pointer-events: none;
}

.ac-pop-actions-in > * {
  animation: acPopIn 0.25s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.ac-pop-actions-in > *:nth-child(2) {
  animation-delay: 0.06s;
}

.ac-pop-actions-in .ac-btn-primary {
  animation: acPopIn 0.25s cubic-bezier(0.34, 1.56, 0.64, 1) 0.06s both;
}

.ac-pop-actions-out > * {
  animation: acPopOut 0.18s ease-in both;
}

.ac-pop-actions-out > *:first-child {
  animation-delay: 0.03s;
}

.ac-pop-actions > button:active:not(:disabled) {
  transform: translateY(1px) scale(0.98);
}

@keyframes acPopIn {
  from { opacity: 0; transform: scale(0.85); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes acPopOut {
  from { opacity: 1; transform: scale(1); }
  to   { opacity: 0; transform: scale(0.85); }
}

.watchdog-logs-panel {
  min-height: 160px;
  max-height: 80vh;
  resize: vertical;
}

.watchdog-terminal-host {
  position: relative;
}

.watchdog-terminal-host .xterm {
  height: 100%;
  letter-spacing: 0;
  font-kerning: none;
}

.watchdog-terminal-host .xterm-viewport {
  overflow-y: auto !important;
}

/* ── Light theme overrides for hardcoded dark patterns ── */

[data-theme="light"] .ac-history-item {
  background: rgba(0, 0, 0, 0.02);
}

[data-theme="light"] .ac-history-summary {
  color: var(--text);
}

[data-theme="light"] .ac-history-item[open] > .ac-history-summary .ac-history-toggle {
  color: var(--text);
}

[data-theme="light"] .ac-surface-inset {
  background: rgba(0, 0, 0, 0.02);
}

[data-theme="light"] .snippet-collapse-fade {
  background: linear-gradient(to bottom, transparent 0%, rgba(255, 255, 255, 0.85) 70%);
}

[data-theme="light"] input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):focus,
[data-theme="light"] select:focus,
[data-theme="light"] textarea:focus {
  border-color: rgba(0, 0, 0, 0.35);
}

[data-theme="light"] select {
  color-scheme: light;
}

[data-theme="light"] ::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.12);
}

[data-theme="light"] .scope-btn { background: rgba(0, 0, 0, 0.03); }
[data-theme="light"] .scope-btn-read.active,
[data-theme="light"] .scope-btn-write.active {
  background: rgba(0, 0, 0, 0.03);
  color: var(--text-bright);
  border-color: rgba(0, 0, 0, 0.35);
}

[data-theme="light"] .ac-btn-primary {
  border: 1px solid var(--accent-dim);
  background: linear-gradient(180deg, rgba(6, 179, 87, 0.1) 0%, rgba(6, 179, 87, 0.05) 100%);
  color: var(--accent);
  box-shadow: inset 0 0 0 1px rgba(6, 179, 87, 0.08);
}

[data-theme="light"] .ac-btn-primary:hover:not(:disabled) {
  border-color: rgba(6, 179, 87, 0.6);
  background: linear-gradient(180deg, rgba(6, 179, 87, 0.16) 0%, rgba(6, 179, 87, 0.08) 100%);
  color: #098c47;
  box-shadow: inset 0 0 0 1px rgba(6, 179, 87, 0.15);
}

[data-theme="light"] .ac-btn-secondary {
  color: var(--text);
  background: rgba(0, 0, 0, 0.02);
}

[data-theme="light"] .ac-btn-secondary:hover:not(:disabled) {
  border-color: rgba(0, 0, 0, 0.25);
  color: var(--text-bright);
  background: rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .ac-btn-ghost:hover:not(:disabled) {
  color: var(--text-bright);
}

[data-theme="light"] .ac-btn-danger {
  border: 1px solid rgba(220, 38, 38, 0.3);
  background: rgba(220, 38, 38, 0.06);
  color: #dc2626;
}

[data-theme="light"] .ac-btn-danger:hover:not(:disabled) {
  border-color: rgba(220, 38, 38, 0.5);
  background: rgba(220, 38, 38, 0.1);
  color: #b91c1c;
}

[data-theme="light"] .ac-toggle-track {
  background: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .ac-toggle-thumb {
  background: #9ca3af;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .ac-toggle-input:checked + .ac-toggle-track {
  border-color: rgba(6, 179, 87, 0.6);
  background: rgba(6, 179, 87, 0.12);
  box-shadow: inset 0 0 0 1px rgba(6, 179, 87, 0.15);
}

[data-theme="light"] .ac-toggle-input:checked + .ac-toggle-track .ac-toggle-thumb {
  background: #06b357;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .ac-toggle-label {
  color: var(--text);
}

[data-theme="light"] .ac-path-card {
  background: rgba(0, 0, 0, 0.02);
}

[data-theme="light"] .ac-path-card:hover {
  border-color: rgba(6, 179, 87, 0.4);
  background: rgba(6, 179, 87, 0.04);
  box-shadow: inset 0 0 0 1px rgba(6, 179, 87, 0.08);
}

[data-theme="light"] .ac-path-card:hover .ac-path-title {
  color: #098c47;
}

[data-theme="light"] .ac-path-card:hover .ac-path-desc {
  color: var(--text-muted);
}

[data-theme="light"] .ac-segmented-control {
  background: rgba(0, 0, 0, 0.02);
  border-color: rgba(0, 0, 0, 0.12);
}

[data-theme="light"] .ac-segmented-control-button:hover {
  background: rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .ac-segmented-control-button.active {
  background: rgba(6, 179, 87, 0.12);
  color: #098c47;
}

[data-theme="light"] .ac-segmented-control-dark {
  background: rgba(0, 0, 0, 0.04);
}

/* Modal and link overrides for light mode */
[data-theme="light"] .bg-modal {
  background: #ffffff;
}

[data-theme="light"] .text-blue-400 {
  color: #1d4ed8 !important;
}

[data-theme="light"] .text-indigo-300 {
  color: #4338ca !important;
}

[data-theme="light"] .text-purple-400 {
  color: #7e22ce !important;
}
