/**
 * Login / auth light-mode text visibility — loads after Tailwind CDN
 */

html.light .ec-auth-page {
  color: #0f172a;
}

/* ── Hero panel (left column) ── */
html.light .ec-auth-hero [class*="text-white"] {
  color: #0f172a !important;
}

html.light .ec-auth-hero [class*="text-white/90"],
html.light .ec-auth-hero [class*="text-white/80"],
html.light .ec-auth-hero [class*="text-white/75"] {
  color: #334155 !important;
}

html.light .ec-auth-hero [class*="text-white/70"],
html.light .ec-auth-hero [class*="text-white/65"],
html.light .ec-auth-hero [class*="text-white/60"],
html.light .ec-auth-hero [class*="text-white/55"],
html.light .ec-auth-hero [class*="text-white/50"] {
  color: #475569 !important;
}

html.light .ec-auth-hero h1 {
  color: #0f172a !important;
}

html.light .ec-auth-stat-chip,
html.light .ec-auth-stat-chip [class*="text-white"] {
  color: #0f172a !important;
}

html.light .ec-auth-stat-chip [class*="text-white/"] {
  color: #64748b !important;
}

html.light .ec-auth-stat-chip .text-apc-gold {
  color: #0369a1 !important;
}

html.light .ec-auth-stat-chip .text-emerald-400 {
  color: #15803d !important;
}

html.light .ec-auth-globe {
  background: #ffffff !important;
  border-color: rgba(15, 23, 42, 0.1) !important;
}

/* ── Login form glass panel ── */
html.light .ec-auth-glass {
  background: #ffffff !important;
  color: #0f172a !important;
  border: 1px solid rgba(15, 23, 42, 0.1) !important;
  box-shadow: 0 4px 24px rgba(15, 23, 42, 0.06) !important;
}

html.light .ec-auth-glass::before {
  display: none !important;
}

html.light .ec-auth-glass [class*="text-white"] {
  color: #0f172a !important;
}

html.light .ec-auth-glass [class*="text-white/90"],
html.light .ec-auth-glass [class*="text-white/80"],
html.light .ec-auth-glass [class*="text-white/75"] {
  color: #334155 !important;
}

html.light .ec-auth-glass [class*="text-white/70"],
html.light .ec-auth-glass [class*="text-white/65"],
html.light .ec-auth-glass [class*="text-white/60"],
html.light .ec-auth-glass [class*="text-white/55"],
html.light .ec-auth-glass [class*="text-white/50"],
html.light .ec-auth-glass [class*="text-white/45"] {
  color: #64748b !important;
}

html.light .ec-auth-glass label {
  color: #475569 !important;
}

html.light .ec-auth-glass .text-apc-gold {
  color: #0369a1 !important;
}

html.light .ec-auth-glass .text-emerald-400 {
  color: #15803d !important;
}

html.light .ec-auth-glass .bg-black\/20,
html.light .ec-auth-glass .bg-black\/30 {
  background: #f8fafc !important;
  border-color: rgba(15, 23, 42, 0.08) !important;
}

/* Role cards */
html.light .ec-auth-role-card {
  background: #ffffff !important;
  border: 1px solid rgba(15, 23, 42, 0.1) !important;
  color: #0f172a !important;
}

html.light .ec-auth-role-card:hover {
  border-color: rgba(47, 168, 79, 0.35) !important;
}

html.light .ec-auth-role-card.is-selected {
  background: #f0fdf4 !important;
  border-color: rgba(47, 168, 79, 0.45) !important;
  box-shadow: 0 0 0 1px rgba(47, 168, 79, 0.2) !important;
}

html.light .ec-auth-role-title {
  color: #0f172a !important;
}

html.light .ec-auth-role-desc {
  color: #64748b !important;
}

html.light .ec-auth-role-icon {
  background: rgba(47, 168, 79, 0.12) !important;
  color: #15803d !important;
}

/* Inputs */
html.light .ec-auth-input {
  background: #ffffff !important;
  color: #0f172a !important;
  border: 1px solid rgba(15, 23, 42, 0.15) !important;
}

html.light .ec-auth-input::placeholder {
  color: #94a3b8 !important;
}

html.light .ec-auth-input:focus {
  border-color: rgba(47, 168, 79, 0.5) !important;
  box-shadow: 0 0 0 3px rgba(47, 168, 79, 0.12) !important;
}

/* Badges */
html.light .ec-auth-badge-secure {
  color: #b91c1c !important;
  background: rgba(233, 30, 47, 0.08) !important;
  border-color: rgba(233, 30, 47, 0.25) !important;
}

html.light .ec-auth-badge-encrypt {
  color: #0369a1 !important;
  background: rgba(110, 198, 232, 0.12) !important;
  border-color: rgba(110, 198, 232, 0.3) !important;
}

/* Submit keeps white on gradient */
html.light .ec-auth-submit,
html.light .ec-auth-submit[class*="text-white"] {
  color: #ffffff !important;
}

html.light #auth-toggle-pw:hover {
  color: #0f172a !important;
}

/* Verify / auth loading overlay */
html.light .ec-auth-verify-overlay {
  z-index: 10000 !important;
  background: rgba(15, 23, 42, 0.32) !important;
  backdrop-filter: blur(8px) saturate(1.1) !important;
  -webkit-backdrop-filter: blur(8px) saturate(1.1) !important;
}

html.light .ec-auth-verify-overlay:not(.hidden) {
  display: flex !important;
}

html.light .ec-auth-verify-box {
  background: #ffffff !important;
  border: 1px solid rgba(15, 23, 42, 0.12) !important;
  box-shadow:
    0 4px 6px rgba(15, 23, 42, 0.04),
    0 24px 64px rgba(15, 23, 42, 0.18) !important;
}

html.light .ec-auth-verify-box .font-heading,
html.light .ec-auth-verify-box [class*="text-white"] {
  color: #0f172a !important;
}

html.light .ec-auth-verify-box [class*="text-white/"] {
  color: #475569 !important;
}

html.light #auth-verify-label {
  color: #475569 !important;
}

html.light .ec-auth-progress-track {
  background: #e8ecf2 !important;
  border: 1px solid rgba(15, 23, 42, 0.06);
}

html.light .ec-auth-progress-bar,
html.light #auth-verify-bar {
  background: linear-gradient(90deg, #2fa84f 0%, #6ec6e8 100%) !important;
  min-height: 6px;
}

/* Toast */
html.light .ec-auth-toast {
  background: #ffffff !important;
  color: #0f172a !important;
  border: 1px solid rgba(15, 23, 42, 0.12) !important;
  box-shadow: 0 8px 32px rgba(15, 23, 42, 0.1) !important;
}

html.light .ec-auth-toast--error {
  color: #b91c1c !important;
  border-color: rgba(220, 38, 38, 0.3) !important;
}

/* Mobile: form-only view */
@media (max-width: 1023px) {
  html.light .ec-auth-page {
    background: linear-gradient(180deg, #fefdfb 0%, #f7f6f3 100%);
  }
}
