/* ───────────────────────────────────────────────────────────────
   sigRH — Palette ONG (dérivée du logo : bleu marine + or)
   Les couleurs --color-primary / --color-accent peuvent être
   surchargées par ONG via la variable injectée dans le layout.
   ─────────────────────────────────────────────────────────────── */
:root {
  /* Identité (surchargeable par ONG) */
  --color-primary: #1B3A8B;        /* bleu marine "sig" */
  --color-primary-soft: #2C6FBF;   /* bleu royal "RH" */
  --color-primary-deep: #122A66;   /* bleu nuit profond */
  --color-accent: #F5B800;         /* or / jaune */
  --color-accent-deep: #D89E00;

  /* Surfaces & texte */
  --color-surface: #F3F6FB;
  --color-card: #ffffff;
  --color-text: #16233D;
  --color-muted: #64748B;
  --color-border: #E3E9F2;

  /* Sémantique (statuts, alertes, badges) */
  --color-success: #2E9E5B;
  --color-danger: #E5484D;
  --color-warning: #F59E0B;
  --color-info: #29A9E0;

  /* Couleurs vives du logo (graphiques, catégories, accents) */
  --color-figure-orange: #F26A21;
  --color-figure-green: #8DC63F;
  --color-figure-magenta: #E6007E;
  --color-figure-sky: #29A9E0;

  --color-sidebar-bg: #122A66;
  --color-sidebar-active: rgba(245, 184, 0, 0.16);
  --color-shadow: 0 1px 3px rgba(18, 42, 102, 0.08);
  --color-shadow-md: 0 6px 20px rgba(18, 42, 102, 0.10);
  --radius: 0.65rem;

  /* Alias historiques encore utilisés par quelques vues métier. */
  --border-color: var(--color-border);
  --surface-soft: #F8FAFC;
  --text-muted: var(--color-muted);
}

[data-theme="dark"] {
  --color-primary: #4F86E0;
  --color-primary-soft: #6FA0EC;
  --color-primary-deep: #16233D;
  --color-accent: #F5B800;
  --color-accent-deep: #D89E00;
  --color-surface: #0E1626;
  --color-card: #1A2438;
  --color-text: #E6ECF5;
  --color-muted: #8696B0;
  --color-border: #2B3852;
  --color-success: #36B36A;
  --color-danger: #F0595E;
  --color-warning: #F5A623;
  --color-info: #4FB8EC;
  --color-sidebar-bg: #0B1322;
  --color-sidebar-active: rgba(245, 184, 0, 0.14);
  --color-shadow: 0 1px 3px rgba(0,0,0,0.4);
  --color-shadow-md: 0 6px 20px rgba(0,0,0,0.45);
  --border-color: var(--color-border);
  --surface-soft: rgba(51, 65, 85, 0.35);
  --text-muted: var(--color-muted);
}

[data-theme="dark"] body {
  background-color: var(--color-surface);
  color: var(--color-text);
}

[data-theme="dark"] .dash-card,
[data-theme="dark"] .kpi-card {
  background: var(--color-card);
  border-color: var(--color-border);
  color: var(--color-text);
}

[data-theme="dark"] .data-table thead tr {
  background: #1e293b;
}

[data-theme="dark"] .data-table tbody tr:hover {
  background: rgba(255,255,255,0.04);
}

/* form-textarea dark mode géré dans components.css */

[data-theme="dark"] .sidebar {
  background: var(--color-sidebar-bg);
}

[data-theme="dark"] .app-body {
  background: var(--color-surface);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Sora", "Segoe UI", sans-serif;
  color: var(--color-text);
}

a {
  text-decoration: none;
}

a:hover,
a:focus,
a:active {
  text-decoration: none;
}

a:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--color-primary, #1B3A8B) 35%, transparent);
  outline-offset: 2px;
}

.auth-page {
  min-height: 100dvh;
  background: var(--color-primary-deep);
  position: relative;
}

.auth-page::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 6px;
  background: var(--color-accent);
  z-index: 3;
}

.auth-layout {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(380px, 1fr);
}

.auth-left-panel {
  background:
    linear-gradient(160deg, rgba(10, 24, 58, 0.88) 0%, rgba(18, 42, 102, 0.85) 55%, rgba(27, 58, 139, 0.90) 100%),
    radial-gradient(circle at 18% 10%, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0) 40%),
    url("../img/background_login.png") center/cover no-repeat;
  color: #f1f8ff;
  padding: clamp(1.3rem, 3vw, 2.6rem);
  position: relative;
}

/* Voile dégradé en bas pour garder le pied de page lisible sans masquer l'image */
.auth-left-panel::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 45%;
  background: linear-gradient(to top, rgba(8, 20, 50, 0.55), rgba(8, 20, 50, 0));
  pointer-events: none;
}

.auth-left-panel > .auth-left-content {
  position: relative;
  z-index: 1;
}

.auth-left-content {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1.25rem;
  max-width: 680px;
  margin: 0 auto;
}

.auth-identity-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: #ffffff;
  border-radius: 0.8rem;
  padding: 0.8rem;
  color: #0a2f63;
  box-shadow: 0 20px 40px rgba(7, 30, 62, 0.22);
}

.auth-identity-logo {
  width: 76px;
  height: 76px;
  border-radius: 0.7rem;
  overflow: hidden;
  flex-shrink: 0;
  border: 2px solid #e8edf4;
}

.auth-identity-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.auth-identity-text strong {
  display: block;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}

.auth-identity-text p {
  margin: 0.3rem 0 0;
  font-size: 0.84rem;
  line-height: 1.4;
  color: #365071;
}

.auth-title-wrap {
  text-align: center;
}

.auth-app-name {
  margin: 0;
  font-size: clamp(2rem, 4vw, 2.7rem);
  font-weight: 800;
  letter-spacing: 0.03em;
  text-shadow: 0 2px 14px rgba(6, 18, 45, 0.45);
}

.auth-app-tagline {
  margin: 0.45rem auto 0;
  max-width: 30ch;
  color: rgba(238, 246, 255, 0.95);
  text-shadow: 0 1px 8px rgba(6, 18, 45, 0.4);
}

.auth-feature-list {
  display: grid;
  gap: 0.72rem;
}

.auth-feature-item {
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 0.85rem;
  padding: 0.95rem 1.05rem;
  background: rgba(13, 31, 70, 0.34);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 8px 24px rgba(6, 18, 45, 0.18);
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  transition: background 0.25s, border-color 0.25s, transform 0.25s;
}

.auth-feature-item:hover {
  background: rgba(20, 44, 96, 0.46);
  border-color: rgba(245, 184, 0, 0.4);
  transform: translateX(3px);
}

.auth-feature-icon {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: 0.65rem;
  background: color-mix(in srgb, var(--color-accent, #F5B800) 22%, transparent);
  border: 1px solid color-mix(in srgb, var(--color-accent, #F5B800) 40%, transparent);
  display: grid;
  place-items: center;
  color: #ffd874;
}

.auth-feature-icon svg {
  width: 20px;
  height: 20px;
}

.auth-feature-text h3 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: #ffffff;
}

.auth-feature-text p {
  margin: 0.25rem 0 0;
  color: rgba(230, 241, 255, 0.78);
  font-size: 0.84rem;
  line-height: 1.4;
}

.auth-left-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  margin-top: 0.3rem;
  padding-top: 0.85rem;
  display: grid;
  gap: 0.35rem;
  text-align: center;
}

.auth-left-footer-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.auth-left-footer-row svg {
  color: #ffd56a;
  flex-shrink: 0;
}

.auth-left-footer strong {
  color: #ffd56a;
}

.auth-left-footer span {
  color: rgba(228, 242, 255, 0.7);
  font-size: 0.84rem;
}

.auth-right-panel {
  background: linear-gradient(135deg, #f4f5f7 0%, #eef1f7 100%);
  display: grid;
  place-items: center;
  padding: clamp(1rem, 3vw, 2.3rem);
  position: relative;
  overflow: hidden;
}

.auth-right-panel::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -50%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(47, 104, 207, 0.08) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.auth-right-panel::after {
  content: "";
  position: absolute;
  bottom: -30%;
  left: -30%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(243, 177, 26, 0.06) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.auth-login-box {
  width: min(100%, 500px);
  padding: clamp(2rem, 3vw, 2.9rem);
  border-radius: 1.3rem;
  background: #ffffff;
  box-shadow:
    0 24px 70px rgba(18, 42, 102, 0.16),
    0 2px 6px rgba(18, 42, 102, 0.06);
  position: relative;
  z-index: 1;
  border: 1px solid rgba(226, 233, 244, 0.9);
  overflow: hidden;
}

/* Filet d'accent dégradé en haut de la carte */
.auth-login-box::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, var(--color-primary, #1B3A8B), var(--color-primary-soft, #2C6FBF), var(--color-accent, #F5B800));
}

.auth-mobile-hero {
  display: none;
  margin-bottom: 1.5rem;
}

.auth-mobile-hero-wrapper {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.auth-mobile-identity-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  border: 2px solid #2f68cf;
  border-radius: 0.9rem;
  background: #ffffff;
  padding: 1rem;
  box-shadow: 0 10px 25px rgba(24, 52, 92, 0.12);
}

.auth-mobile-identity-logos {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-shrink: 0;
}

.auth-mobile-identity-logo {
  width: 54px;
  height: 54px;
  border-radius: 0.5rem;
  object-fit: cover;
  border: 2px solid #e8edf4;
}

.auth-mobile-identity-text {
  flex: 1;
  min-width: 0;
}

.auth-mobile-identity-text strong {
  display: block;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  line-height: 1.3;
  color: #0a2f63;
  font-weight: 700;
}

.auth-mobile-identity-text p {
  margin: 0.25rem 0 0;
  font-size: 0.72rem;
  line-height: 1.3;
  color: #4d607d;
}

.auth-mobile-title {
  text-align: center;
  background: linear-gradient(135deg, #072061 0%, #072061 100%);
  border-radius: 0.9rem;
  padding: 1.2rem 1rem;
  color: #ffffff;
}

.auth-mobile-app-name {
  margin: 0;
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #ffffff;
}

.auth-mobile-app-subtitle {
  margin: 0.4rem 0 0;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
}

.auth-login-header {
  margin-bottom: 0.5rem;
}

.auth-login-header h1 {
  margin: 0;
  font-size: clamp(1.9rem, 2.7vw, 2.25rem);
  letter-spacing: -0.01em;
  font-weight: 800;
  color: var(--color-primary, #122A66);
}

.auth-login-header p {
  margin: 0.5rem 0 0;
  color: var(--color-muted);
  font-size: 1rem;
}

.auth-alert {
  padding: 1rem 1.1rem;
  border-radius: 0.8rem;
  margin-bottom: 1.2rem;
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  font-size: 0.95rem;
  line-height: 1.5;
  animation: slideDown 0.3s ease;
}

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

.auth-alert svg {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-top: 2px;
}

.auth-alert--error {
  background: #fef2f2;
  border: 1px solid #fee2e2;
  color: #991b1b;
}

.auth-alert--error svg {
  color: #dc2626;
}

.auth-alert--success {
  background: #f0fdf4;
  border: 1px solid #dcfce7;
  color: #166534;
}

.auth-alert--success svg {
  color: #16a34a;
}

.auth-form {
  margin-top: 1.8rem;
  display: grid;
  gap: 1.4rem;
}

.auth-form-group {
  display: grid;
  gap: 0.55rem;
  position: relative;
}

.auth-label-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}

.auth-form label {
  font-weight: 600;
  color: #344563;
  font-size: 0.86rem;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  letter-spacing: 0.01em;
}

.auth-label-text {
  display: block;
}

.auth-label-required {
  color: #dc2626;
  font-weight: 700;
  font-size: 1em;
  line-height: 1;
}

.auth-forgot-link {
  font-size: 0.82rem;
  color: var(--color-primary-soft, #2d4f89);
  text-decoration: none;
  font-weight: 600;
  white-space: nowrap;
  transition: color 0.25s ease, background 0.25s ease;
  padding: 0.25rem 0.6rem;
  border-radius: 0.4rem;
  text-transform: none;
  letter-spacing: normal;
}

.auth-forgot-link:hover {
  color: #2d6ee4;
  background: rgba(45, 110, 228, 0.08);
}

.auth-forgot-link:active {
  transform: scale(0.98);
}

.auth-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  background: #f7f9fc;
  border: 1.5px solid #e1e7f0;
  border-radius: 0.85rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  overflow: hidden;
}

.auth-input-wrapper:hover {
  border-color: #c3cede;
  background: #f1f5fb;
}

.auth-input-wrapper:focus-within {
  border-color: var(--color-primary-soft, #2C6FBF);
  background: #ffffff;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--color-primary-soft, #2C6FBF) 16%, transparent);
}

.auth-input-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  color: #4a6490;
  pointer-events: none;
  flex-shrink: 0;
  transition: color 0.25s ease, transform 0.25s ease;
  z-index: 3;
  opacity: 1;
  visibility: visible;
}

.auth-input-icon * {
  stroke: currentColor;
  stroke-width: 1.8;
}

.auth-input-wrapper:hover .auth-input-icon {
  color: #6b7fa0;
}

.auth-input-wrapper:focus-within .auth-input-icon {
  color: var(--color-primary-soft, #2C6FBF);
  transform: translateY(-50%) scale(1.05);
}

.auth-form input {
  width: 100%;
  border: none;
  background: transparent;
  padding: 0.85rem 1rem 0.85rem 2.85rem;
  font: inherit;
  color: #0f1f35;
  font-size: 0.95rem;
  transition: color 0.25s ease;
}

.auth-form input::placeholder {
  color: #b5bcc9;
  font-weight: 400;
}

.auth-form input:focus {
  outline: none;
}

.auth-input-wrapper--password {
  padding-right: 0.5rem;
}

.auth-password-toggle {
  position: absolute;
  right: 0.7rem;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.45rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
  transition: color 0.25s ease, background 0.25s ease;
  border-radius: 0.45rem;
  z-index: 3;
}

.auth-password-toggle:hover {
  color: var(--color-primary-soft, #2C6FBF);
  background: color-mix(in srgb, var(--color-primary-soft, #2C6FBF) 10%, transparent);
}

.auth-password-toggle:active {
  transform: scale(0.95);
}

.auth-password-icon {
  width: 20px;
  height: 20px;
  display: none;
}

.auth-password-icon--hidden {
  display: block;
}

.auth-password-toggle.auth-password-toggle--visible .auth-password-icon--hidden {
  display: none;
}

.auth-password-toggle.auth-password-toggle--visible .auth-password-icon--visible {
  display: block;
}

.auth-submit {
  margin-top: 1rem;
  border: none;
  border-radius: 0.85rem;
  background: linear-gradient(135deg, var(--color-primary, #1B3A8B) 0%, var(--color-primary-soft, #2C6FBF) 100%);
  color: #ffffff;
  padding: 1rem 1.4rem;
  font: inherit;
  font-weight: 700;
  font-size: 0.98rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  cursor: pointer;
  box-shadow: 0 8px 22px color-mix(in srgb, var(--color-primary, #1B3A8B) 35%, transparent);
  width: 100%;
  position: relative;
  overflow: hidden;
  transition: box-shadow 0.25s ease, transform 0.2s ease, filter 0.25s ease;
  letter-spacing: 0.02em;
}

/* Reflet doré au survol */
.auth-submit::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 40%, rgba(245, 184, 0, 0.28) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.auth-submit:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
  box-shadow: 0 12px 28px color-mix(in srgb, var(--color-primary, #1B3A8B) 42%, transparent);
}

.auth-submit:hover::before {
  opacity: 1;
}

.auth-submit:active {
  transform: translateY(0);
  box-shadow: 0 4px 12px color-mix(in srgb, var(--color-primary, #1B3A8B) 30%, transparent);
}

.auth-submit > * {
  position: relative;
  z-index: 1;
}

.auth-submit-icon {
  width: 17px;
  height: 17px;
  transition: transform 0.25s ease;
}

.auth-submit:hover .auth-submit-icon {
  transform: translateX(3px);
}

/* ── Vérification 2FA ─────────────────────────────────────────── */
.auth-code-input {
  letter-spacing: 0.55rem;
  font-size: 1.35rem !important;
  font-weight: 700;
  text-align: center;
}

.auth-code-input::placeholder {
  letter-spacing: 0.55rem;
}

.auth-resend-form {
  margin-top: 1rem;
  text-align: center;
}

.auth-resend-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: transparent;
  border: 1.5px solid var(--color-border, #e1e7f0);
  color: var(--color-primary, #1B3A8B);
  font: inherit;
  font-weight: 600;
  font-size: 0.86rem;
  padding: 0.55rem 1rem;
  border-radius: 0.6rem;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
}

.auth-resend-btn:hover:not(:disabled) {
  background: color-mix(in srgb, var(--color-primary, #1B3A8B) 8%, transparent);
  border-color: var(--color-primary-soft, #2C6FBF);
}

.auth-resend-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

button.is-loading,
.btn.is-loading,
a.is-loading {
  cursor: wait;
  pointer-events: none;
}

button.is-loading::after,
.btn.is-loading::after,
a.is-loading::after {
  content: "";
  width: 14px;
  height: 14px;
  margin-left: 0.5rem;
  border-radius: 50%;
  border: 2px solid rgba(0, 0, 0, 0.2);
  border-top-color: currentColor;
  display: inline-block;
  vertical-align: middle;
  animation: buttonSpinner 0.75s linear infinite;
}

button:disabled.is-loading,
.btn.is-loading {
  opacity: 0.96;
}

.app-content.app-content--updating {
  opacity: 0.58;
  pointer-events: none;
  transition: opacity 0.18s ease;
}

@keyframes buttonSpinner {
  to {
    transform: rotate(360deg);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.auth-login-footer {
  margin-top: 1.8rem;
  padding-top: 1.2rem;
  border-top: 2px solid #e5e7eb;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.95rem;
  color: #1f3552;
  font-weight: 600;
  letter-spacing: 0.01em;
  opacity: 1;
  visibility: visible;
  animation: fadeInUp 0.6s ease-out 0.3s both;
}

.auth-login-footer span {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  opacity: 1;
  visibility: visible;
}

.auth-login-footer svg {
  width: 20px;
  height: 20px;
  color: var(--color-primary-soft, #2d6ee4);
  flex-shrink: 0;
  stroke-width: 1.8;
  opacity: 1;
  visibility: visible;
  display: block;
}

/* Note de sécurité (page de connexion) */
.auth-secure-note {
  color: var(--color-muted, #64748b);
  font-weight: 600;
}

/* Lien « Retour à la connexion » (page de réinitialisation) */
.auth-back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--color-primary, #1B3A8B);
  font-weight: 600;
  text-decoration: none;
  padding: 0.3rem 0.7rem;
  border-radius: 0.45rem;
  transition: background 0.2s ease, color 0.2s ease;
}

.auth-back-link:hover {
  background: rgba(27, 58, 139, 0.08);
  color: var(--color-primary-soft, #2C6FBF);
}

[data-theme="dark"] .auth-back-link {
  color: #6fa0ec;
}
[data-theme="dark"] .auth-back-link:hover {
  background: rgba(111, 160, 236, 0.12);
}

.auth-bottom-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 6px;
  background: var(--color-accent);
  z-index: 3;
}

/* ── Preloader ───────────────────────────────────────────────── */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--color-primary-deep);
  display: grid;
  place-items: center;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.preloader--hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.preloader__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
}

.preloader__logo {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #ffffff;
  display: grid;
  place-items: center;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(7, 30, 62, 0.25);
  animation: preloaderPulse 1.8s ease-in-out infinite;
}

.preloader__logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.preloader__spinner {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(255, 255, 255, 0.15);
  border-top-color: var(--color-accent);
  border-radius: 50%;
  animation: preloaderSpin 0.8s linear infinite;
}

.preloader__text {
  margin: 0;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

@keyframes preloaderSpin {
  to { transform: rotate(360deg); }
}

@keyframes preloaderPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}

/* ── Auth Dark Mode ──────────────────────────────────────────── */
[data-theme="dark"] .auth-page {
  background: #0a0f1a;
}

[data-theme="dark"] .auth-right-panel {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}

[data-theme="dark"] .auth-right-panel::before {
  background: radial-gradient(circle, rgba(74, 142, 222, 0.06) 0%, transparent 70%);
}

[data-theme="dark"] .auth-right-panel::after {
  background: radial-gradient(circle, rgba(243, 177, 26, 0.04) 0%, transparent 70%);
}

[data-theme="dark"] .auth-login-box {
  background: #1e293b;
  border-color: #334155;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .auth-login-header h1 {
  color: #e2e8f0;
}

[data-theme="dark"] .auth-login-header p {
  color: #94a3b8;
}

[data-theme="dark"] .auth-label-text {
  color: #cbd5e1;
}

[data-theme="dark"] .auth-input-wrapper {
  background: #0f172a;
  border-color: #334155;
}

[data-theme="dark"] .auth-input-wrapper:hover {
  border-color: #475569;
  background: #1a2332;
}

[data-theme="dark"] .auth-input-wrapper:focus-within {
  border-color: #4a8ede;
  background: #0f172a;
  box-shadow: 0 0 0 3.5px rgba(74, 142, 222, 0.15);
}

[data-theme="dark"] .auth-input-icon {
  color: #64748b;
}

[data-theme="dark"] .auth-input-wrapper:focus-within .auth-input-icon {
  color: #4a8ede;
}

[data-theme="dark"] .auth-form input {
  color: #e2e8f0;
}

[data-theme="dark"] .auth-form input::placeholder {
  color: #475569;
}

[data-theme="dark"] .auth-password-toggle {
  color: #64748b;
}

[data-theme="dark"] .auth-password-toggle:hover {
  color: #4a8ede;
  background: rgba(74, 142, 222, 0.1);
}

[data-theme="dark"] .auth-submit {
  background: #1e40af;
  box-shadow: 0 4px 14px rgba(30, 64, 175, 0.35);
}

[data-theme="dark"] .auth-submit:hover {
  background: #2563eb;
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

[data-theme="dark"] .auth-forgot-link {
  color: #4a8ede;
}

[data-theme="dark"] .auth-login-footer {
  border-top-color: #334155;
  color: #94a3b8;
}

[data-theme="dark"] .auth-login-footer svg {
  color: #4a8ede;
}

[data-theme="dark"] .auth-alert--error {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.25);
  color: #fca5a5;
}

[data-theme="dark"] .auth-alert--success {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.25);
  color: #6ee7b7;
}

[data-theme="dark"] .auth-left-panel {
  background:
    linear-gradient(145deg, rgba(8, 18, 35, 0.9) 0%, rgba(10, 20, 40, 0.92) 58%, rgba(15, 40, 75, 0.9) 100%),
    url("../img/background_login.png") center/cover no-repeat;
}

[data-theme="dark"] .auth-bottom-bar,
[data-theme="dark"] .auth-page::before {
  background: var(--color-accent);
}

[data-theme="dark"] .auth-mobile-hero-wrapper {
  background: transparent;
}

[data-theme="dark"] .auth-mobile-identity-card {
  background: #1e293b;
  border-color: #334155;
  color: #e2e8f0;
}

[data-theme="dark"] .auth-mobile-identity-text strong {
  color: #e2e8f0;
}

[data-theme="dark"] .auth-mobile-identity-text p {
  color: #94a3b8;
}

[data-theme="dark"] .auth-mobile-title {
  background: #0f172a;
  border-color: #334155;
}

[data-theme="dark"] .auth-mobile-app-name {
  color: #e2e8f0;
}

[data-theme="dark"] .auth-mobile-app-subtitle {
  color: #94a3b8;
}

[data-theme="dark"] .preloader {
  background: #060a14;
}

[data-theme="dark"] .preloader__spinner {
  border-color: rgba(255, 255, 255, 0.08);
  border-top-color: var(--color-accent);
}
