/* Generado por Theme::generate() — no editar a mano.
   Se reescribe solo cada vez que el admin guarda la apariencia. */

:root{
  /* Modo claro. Se define en :root pelado a propósito: si un color solo
     existiera dentro de un @media, el navegador de un visitante con el sistema
     en oscuro no encontraría nada que pintar. */
  --accent:#4f46e5; --accent-hover:#463eca; --accent-text:#ffffff;
  --accent-soft:#4f46e51f; --accent-line:#4f46e53d;

  --bg:#f6f7fb; --surface:#ffffff; --surface-2:#f9fafb; --surface-3:#f1f3f9;
  --border:#e4e7ee; --border-strong:#cfd4e0;
  --text:#111827; --text-soft:#5b6478; --text-mute:#8a93a6;

  --success:#16a34a; --warning:#d97706; --danger:#dc2626; --info:#2563eb;
  --success-soft:#16a34a1f; --warning-soft:#d977061f; --danger-soft:#dc26261f; --info-soft:#2563eb1f;

  --radius:14px;
  --radius-sm:calc(var(--radius) * .55);
  --radius-lg:calc(var(--radius) * 1.35);
  --radius-badge:999px;
  --card-border:1px;
  --shadow:0 1px 2px rgba(15,23,42,.04), 0 4px 16px rgba(15,23,42,.06);

  --nav-h:60px; --bottomnav-h:62px; --sidebar-w:248px;
  --font:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;

  color-scheme: light;
}

/* Modo oscuro por preferencia del sistema. La guarda :not([data-theme="light"])
   permite que quien haya elegido claro a mano no se lo pise el sistema. */
@media (prefers-color-scheme: dark){
  :root:not([data-theme="light"]){
    --accent:#818cf8; --accent-hover:#8e98f9; --accent-text:#ffffff;
    --accent-soft:#818cf824; --accent-line:#818cf845;

    --bg:#0d1017; --surface:#151a23; --surface-2:#1b212c; --surface-3:#222937;
    --border:#2a3241; --border-strong:#3a4457;
    --text:#e8ecf3; --text-soft:#a3adbf; --text-mute:#6f7a8c;

    --success-soft:#16a34a2b; --warning-soft:#d977062b; --danger-soft:#dc26262b; --info-soft:#60a5fa2b;
    --shadow:0 1px 2px rgba(0,0,0,.3), 0 4px 18px rgba(0,0,0,.35);

    color-scheme: dark;
  }
}

/* Elección explícita del usuario. Se repite el bloque para que el interruptor
   gane en los dos sentidos, venga de donde venga el sistema. */
:root[data-theme="dark"]{
  --accent:#818cf8; --accent-hover:#8e98f9; --accent-text:#ffffff;
  --accent-soft:#818cf824; --accent-line:#818cf845;

  --bg:#0d1017; --surface:#151a23; --surface-2:#1b212c; --surface-3:#222937;
  --border:#2a3241; --border-strong:#3a4457;
  --text:#e8ecf3; --text-soft:#a3adbf; --text-mute:#6f7a8c;

  --success-soft:#16a34a2b; --warning-soft:#d977062b; --danger-soft:#dc26262b; --info-soft:#60a5fa2b;
  --shadow:0 1px 2px rgba(0,0,0,.3), 0 4px 18px rgba(0,0,0,.35);

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