/* Orbit · Light Theme override
 * Aplica-se quando <html data-theme="light"> está definido.
 * Sobrescreve as variáveis :root do build de produção.
 */
html[data-theme="light"] {
  color-scheme: light;

  --bg-primary: #f6f6fa;
  --bg-secondary: #ffffff;
  --bg-tertiary: #eef0f5;
  --bg-elevated: #ffffff;
  --bg-hover: rgba(15, 15, 30, .04);
  --bg-active: rgba(15, 15, 30, .07);

  --surface: #ffffff;
  --surface-hover: #f3f3f8;
  --surface-active: #e9e9f1;
  --surface-border: rgba(15, 15, 30, .10);
  --surface-border-hover: rgba(15, 15, 30, .18);

  --text-primary: #14141d;
  --text-secondary: #52525e;
  --text-muted: #7a7a87;
  --text-disabled: #b6b6c0;

  --accent: #6a59e0;
  --accent-hover: #5848c9;
  --accent-active: #4a3cb3;
  --accent-subtle: rgba(106, 89, 224, .10);
  --accent-border: rgba(106, 89, 224, .28);
  --accent-glow: rgba(106, 89, 224, .22);

  --success: #16a34a;
  --success-subtle: rgba(22, 163, 74, .10);
  --warning: #d97706;
  --warning-subtle: rgba(217, 119, 6, .10);
  --error: #dc2626;
  --error-subtle: rgba(220, 38, 38, .10);
  --info: #2563eb;
  --info-subtle: rgba(37, 99, 235, .10);

  --color-blue: #2563eb;
  --color-purple: #7c3aed;
  --color-pink: #db2777;
  --color-orange: #d97706;
  --color-cyan: #0891b2;
  --color-green: #059669;
  --color-red: #dc2626;

  --shadow-sm: 0 1px 2px rgba(15, 15, 30, .06);
  --shadow: 0 1px 3px rgba(15, 15, 30, .08), 0 1px 2px rgba(15, 15, 30, .05);
  --shadow-md: 0 4px 12px rgba(15, 15, 30, .10);
  --shadow-lg: 0 12px 32px rgba(15, 15, 30, .14);
  --shadow-glow: 0 0 12px rgba(106, 89, 224, .18);

  --glass-bg: rgba(255, 255, 255, .75);
  --glass-border: rgba(15, 15, 30, .08);
}

/* Cascade overrides do build (existem regras :root depois das principais
 * que reescrevem alguns vars com tons claros sobre fundo escuro).
 * Re-fixamos para manter a paleta clara consistente. */
html[data-theme="light"]:root,
html[data-theme="light"] {
  --surface-border: rgba(15, 15, 30, .10);
  --surface-border-hover: rgba(15, 15, 30, .18);
  --text-secondary: #52525e;
  --text-muted: #7a7a87;
}

/* Date/time picker icon não deve ser invertido no claro */
html[data-theme="light"] input[type="date"]::-webkit-calendar-picker-indicator,
html[data-theme="light"] input[type="time"]::-webkit-calendar-picker-indicator {
  filter: none;
}

/* Body background fallback */
html[data-theme="light"] body {
  background: var(--bg-primary);
  color: var(--text-primary);
}

/* Gradientes brancos sobre fundo claro ficariam invisíveis — ajusta shimmer do skeleton */
html[data-theme="light"] .skeleton:after {
  background: linear-gradient(90deg, transparent 0%, rgba(15, 15, 30, .06) 50%, transparent 100%);
}

/* Tap highlight do botão também usa cor escura translúcida no claro */
html[data-theme="light"] button,
html[data-theme="light"] a,
html[data-theme="light"] [role="button"],
html[data-theme="light"] [onclick] {
  -webkit-tap-highlight-color: rgba(106, 89, 224, .12);
}

/* Botão flutuante de troca de tema */
.orbit-theme-toggle {
  position: fixed;
  right: 16px;
  bottom: 16px;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 9998;
  border-radius: 999px;
  border: 1px solid var(--surface-border);
  background: var(--surface);
  color: var(--text-primary);
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.orbit-theme-toggle:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
  background: var(--surface-hover);
}
.orbit-theme-toggle:active { transform: translateY(0) scale(.97); }
.orbit-theme-toggle svg { width: 18px; height: 18px; }
