/* OMVELIO · tokens de diseño (única fuente). Los usan la landing, las páginas públicas, el acceso, el alta y el panel.
   Claro por defecto; oscuro con el sistema o con la preferencia del usuario (data-theme de theme.js). */
:root {
  /* Tipografía y escala */
  --o-font: system-ui, -apple-system, "Segoe UI", Roboto, Inter, sans-serif;
  --o-fs-xs: 12px; --o-fs-sm: 13px; --o-fs-md: 15px; --o-fs-lg: 17px; --o-fs-xl: 20px; --o-fs-2xl: 28px;
  /* Espaciado (escala de 4 px) */
  --o-s1: 4px; --o-s2: 8px; --o-s3: 12px; --o-s4: 16px; --o-s5: 24px; --o-s6: 32px; --o-s7: 48px; --o-s8: 72px;
  /* Forma */
  --o-r-sm: 8px; --o-r: 12px; --o-r-lg: 18px;
  --o-shadow: 0 12px 40px rgb(14 31 25 / .08);
  --o-ctl: 44px;            /* alto mínimo de controles */
  --o-ease: cubic-bezier(.2, .8, .2, 1);
  --o-spring: cubic-bezier(.34, 1.4, .64, 1);
  --o-glow-a: 154 216 181; --o-glow-b: 29 95 140;   /* brillos del fondo «Aurora» */
  /* Color · claro */
  --o-bg: #f6f8f7; --o-surface: #ffffff; --o-surface-2: #eaf1ee;
  --o-text: #0e1f19; --o-muted: #4a5f57;
  --o-line: #d5e1db; --o-line-strong: #8796a0;
  --o-accent: #0f6b52; --o-accent-ink: #ffffff;
  --o-mint: #9ad8b5; --o-dark: #0c1a17; --o-on-dark: #e8f3ee; --o-dark-muted: #a9c2b8;
  --o-ok: #0b6b50; --o-ok-bg: #e3f3ec;
  --o-warn: #8a5a00; --o-warn-bg: #fdf1d8;
  --o-info: #1d5f8c; --o-info-bg: #e2eef8;
  --o-bad: #a83a2a; --o-bad-bg: #fbe7e3;
  color-scheme: light;
}
/* Color · oscuro (sistema oscuro salvo que el usuario haya elegido un tema claro) */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]):not([data-theme="warm"]):not([data-theme="stone"]) {
    --o-bg: #0e1815; --o-surface: #15241f; --o-surface-2: #1c3029;
    --o-text: #e8f3ee; --o-muted: #a9c2b8; --o-line: #284038; --o-line-strong: #52706a;
    --o-accent: #9ad8b5; --o-accent-ink: #06251b; --o-shadow: 0 12px 40px rgb(0 0 0 / .35);
    --o-ok: #9ad8b5; --o-ok-bg: #1f3a30; --o-warn: #f2c46b; --o-warn-bg: #3a2e14;
    --o-info: #8cc4ef; --o-info-bg: #1b3142; --o-bad: #f19a8b; --o-bad-bg: #3d2320;
    color-scheme: dark;
  }
}
:root[data-theme="dark"], :root[data-theme="midnight"], :root[data-theme="forest"], :root[data-theme="ocean"] {
  --o-bg: #0e1815; --o-surface: #15241f; --o-surface-2: #1c3029;
  --o-text: #e8f3ee; --o-muted: #a9c2b8; --o-line: #284038; --o-line-strong: #52706a;
  --o-accent: #9ad8b5; --o-accent-ink: #06251b; --o-shadow: 0 12px 40px rgb(0 0 0 / .35);
  --o-ok: #9ad8b5; --o-ok-bg: #1f3a30; --o-warn: #f2c46b; --o-warn-bg: #3a2e14;
  --o-info: #8cc4ef; --o-info-bg: #1b3142; --o-bad: #f19a8b; --o-bad-bg: #3d2320;
  color-scheme: dark;
}

/* Temas personales del panel (theme.js pone data-appearance). Misma identidad, distinta luz.
   :root:root iguala la especificidad de la regla automática de arriba; al ir después, gana. */
:root:root[data-theme="dark"][data-appearance="midnight"] {
  --o-bg: #080e1d; --o-surface: #111a2f; --o-surface-2: #1b2644;
  --o-text: #edf2ff; --o-muted: #adbcd3; --o-line: #28365a; --o-line-strong: #5a6b96;
  --o-accent: #aaa7ff; --o-accent-ink: #14113a; --o-mint: #aaa7ff;
  --o-ok: #9ad8b5; --o-ok-bg: #173a33; --o-warn: #f2c46b; --o-warn-bg: #3a2e14;
  --o-info: #98cfff; --o-info-bg: #16304d; --o-bad: #f19a8b; --o-bad-bg: #3d2320;
  --o-glow-a: 129 114 236; --o-glow-b: 83 184 227; --o-shadow: 0 14px 44px rgb(0 0 0 / .45); color-scheme: dark;
}
:root:root[data-theme="dark"][data-appearance="forest"] {
  --o-bg: #0a140e; --o-surface: #12211a; --o-surface-2: #1a3024;
  --o-text: #eaf5ec; --o-muted: #a9c4b0; --o-line: #263f2e; --o-line-strong: #527360;
  --o-accent: #b9e27c; --o-accent-ink: #14260a; --o-mint: #b9e27c;
  --o-ok: #b9e27c; --o-ok-bg: #20371a; --o-warn: #f2c46b; --o-warn-bg: #3a2e14;
  --o-info: #8cc4ef; --o-info-bg: #1b3142; --o-bad: #f19a8b; --o-bad-bg: #3d2320;
  --o-glow-a: 185 226 124; --o-glow-b: 64 150 110; --o-shadow: 0 14px 44px rgb(0 0 0 / .4); color-scheme: dark;
}
:root:root[data-theme="dark"][data-appearance="ocean"] {
  --o-bg: #06151f; --o-surface: #0e2431; --o-surface-2: #163445;
  --o-text: #e8f4fb; --o-muted: #a5c1d1; --o-line: #22445a; --o-line-strong: #4d7790;
  --o-accent: #6fd3e8; --o-accent-ink: #04232c; --o-mint: #6fd3e8;
  --o-ok: #8fdcc0; --o-ok-bg: #143a33; --o-warn: #f2c46b; --o-warn-bg: #3a2e14;
  --o-info: #8cc4ef; --o-info-bg: #173247; --o-bad: #f19a8b; --o-bad-bg: #3d2320;
  --o-glow-a: 111 211 232; --o-glow-b: 62 108 214; --o-shadow: 0 14px 44px rgb(0 0 0 / .42); color-scheme: dark;
}
:root:root[data-theme="light"][data-appearance="warm"] {
  --o-bg: #faf5ee; --o-surface: #fffdf9; --o-surface-2: #f3e8d9;
  --o-text: #2a1d14; --o-muted: #6b5648; --o-line: #e6d7c4; --o-line-strong: #a08a76;
  --o-accent: #a8471f; --o-accent-ink: #ffffff;
  --o-glow-a: 240 170 110; --o-glow-b: 214 110 80; --o-shadow: 0 12px 40px rgb(60 35 15 / .10); color-scheme: light;
}
:root:root[data-theme="light"][data-appearance="stone"] {
  --o-bg: #f3f4f6; --o-surface: #ffffff; --o-surface-2: #e8ebef;
  --o-text: #16191d; --o-muted: #535b66; --o-line: #d6dae0; --o-line-strong: #8a929c;
  --o-accent: #2f3b4a; --o-accent-ink: #ffffff;
  --o-glow-a: 150 165 185; --o-glow-b: 110 125 150; --o-shadow: 0 12px 40px rgb(20 25 35 / .09); color-scheme: light;
}
