/* =====================================================================
   Tema del sistema: tres temas con variables CSS.
   El tema activo lo pone index.html en <html data-tema="oscuro|claro|liquid">.
   Los componentes solo usan var(--…), así que cambiar el atributo repinta todo.
   ===================================================================== */
:root{
  --radius-full: 999px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
:root[data-tema="oscuro"]{
  --bg:#262624; --bg-sidebar:#1f1e1d; --card-bg:#30302e; --card-border:rgba(222,220,209,0.13);
  --text:#faf9f5; --text-dim:#c2c0b6; --text-faint:#8f8d85;
  --sky:#d97757; --sky-bg:rgba(217,119,87,0.14); --sky-border:rgba(217,119,87,0.45); --sky-text:#f0b49c;
  --emerald:#6fbf8a; --emerald-bg:rgba(111,191,138,0.14); --emerald-border:rgba(111,191,138,0.40); --ok-text:#b5dfc2;
  --amber:#e0a84f; --amber-bg:rgba(224,168,79,0.14); --amber-border:rgba(224,168,79,0.40); --amber-text:#f1d09a;
  --danger:#e5716a; --danger-bg:rgba(229,113,106,0.14); --danger-border:rgba(229,113,106,0.40); --danger-text:#f4b8b3;
  --hover:rgba(250,249,245,0.05); --hover-strong:rgba(250,249,245,0.09); --track:rgba(250,249,245,0.12);
  --sunken:#1f1e1d; --overlay:rgba(20,19,18,0.88); --nav-active:#3b3a37; --on-accent:#ffffff;
  --brand:#d97757; --avatar:#c4633f; --shadow:0 8px 24px rgba(0,0,0,0.35); --focus:#d97757;
  --radius-lg:14px; --radius-md:9px; color-scheme:dark;
}
:root[data-tema="claro"]{
  --bg:#f7f7f7; --bg-sidebar:#ffffff; --card-bg:#ffffff; --card-border:#e4e4e4;
  --text:#111111; --text-dim:#555555; --text-faint:#9a9a9a;
  --sky:#4a7aa8; --sky-bg:#eaf1f8; --sky-border:#c5d7e9; --sky-text:#335d86;
  --emerald:#3d8f69; --emerald-bg:#e8f4ed; --emerald-border:#bcdcc9; --ok-text:#24694b;
  --amber:#b07a22; --amber-bg:#fbf3e3; --amber-border:#edd9ae; --amber-text:#85560e;
  --danger:#c0554f; --danger-bg:#fbeded; --danger-border:#ecc4c1; --danger-text:#9a3a35;
  --hover:rgba(0,0,0,0.04); --hover-strong:rgba(0,0,0,0.07); --track:#e6e6e6;
  --sunken:#f1f1f1; --overlay:rgba(10,10,10,0.82); --nav-active:#111111; --on-accent:#ffffff;
  --brand:#111111; --avatar:#555555; --shadow:0 4px 16px rgba(0,0,0,0.08); --focus:#111111;
  --radius-lg:10px; --radius-md:6px; color-scheme:light;
}
:root[data-tema="liquid"]{
  --bg:#07120e; --bg-sidebar:rgba(9,24,19,0.55); --card-bg:rgba(255,255,255,0.045); --card-border:rgba(140,255,215,0.13);
  --text:#eaf6f1; --text-dim:rgba(234,246,241,0.68); --text-faint:rgba(234,246,241,0.42);
  --sky:#3ee8b5; --sky-bg:rgba(62,232,181,0.14); --sky-border:rgba(62,232,181,0.45); --sky-text:#9ff5d9;
  --emerald:#3ee8b5; --emerald-bg:rgba(62,232,181,0.14); --emerald-border:rgba(62,232,181,0.42); --ok-text:#a9f7dd;
  --amber:#f5c451; --amber-bg:rgba(245,196,81,0.14); --amber-border:rgba(245,196,81,0.40); --amber-text:#fbe2a4;
  --danger:#ff7b7b; --danger-bg:rgba(255,123,123,0.14); --danger-border:rgba(255,123,123,0.40); --danger-text:#ffc4c4;
  --hover:rgba(255,255,255,0.06); --hover-strong:rgba(255,255,255,0.10); --track:rgba(255,255,255,0.12);
  --sunken:rgba(0,0,0,0.28); --overlay:rgba(3,10,8,0.80); --nav-active:#3ee8b5; --on-accent:#05221a;
  --brand:#3ee8b5; --avatar:#1f8f6d; --shadow:0 10px 30px rgba(0,0,0,0.45); --focus:#3ee8b5;
  --radius-lg:20px; --radius-md:12px; color-scheme:dark;
}

/* ---------- Tema Liquid: fondo con resplandor y vidrio esmerilado ---------- */
:root[data-tema="liquid"] body{
  background:
    radial-gradient(1100px 620px at 50% -12%, rgba(46,120,96,0.55) 0%, rgba(24,66,53,0.35) 38%, transparent 72%),
    linear-gradient(180deg, #0d201a 0%, #07120e 55%, #050c09 100%);
  background-attachment: fixed;
}
:root[data-tema="liquid"] .sidebar,
:root[data-tema="liquid"] .topbar,
:root[data-tema="liquid"] .card,
:root[data-tema="liquid"] .tarea,
:root[data-tema="liquid"] .barra-inferior,
:root[data-tema="liquid"] #toast{
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  backdrop-filter: blur(18px) saturate(160%);
}
:root[data-tema="liquid"] .card,
:root[data-tema="liquid"] .tarea{
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.07), 0 12px 36px rgba(0,0,0,0.38);
}
:root[data-tema="liquid"] .topbar{ background: rgba(7,18,14,0.55); }
:root[data-tema="liquid"] .btn.primary,
:root[data-tema="liquid"] .fab{
  background: linear-gradient(180deg, #5ef0c3 0%, #2fd3a2 100%);
  color: #05221a; border-color: transparent; font-weight:700;
  box-shadow: 0 6px 18px rgba(62,232,181,0.28), inset 0 1px 0 rgba(255,255,255,0.35);
}
:root[data-tema="liquid"] .ui-nav-item.activo{ box-shadow: 0 4px 14px rgba(62,232,181,0.25); }
:root[data-tema="liquid"] input:focus,
:root[data-tema="liquid"] select:focus,
:root[data-tema="liquid"] textarea:focus{ border-color: var(--sky-border) !important; box-shadow: 0 0 0 3px rgba(62,232,181,0.18); outline:none; }

/* Listas desplegables: el sistema dibuja la lista; se fija fondo y letra por tema */
:root[data-tema="oscuro"] select option,
:root[data-tema="oscuro"] select optgroup{ background:#30302e; color:#faf9f5; }
:root[data-tema="liquid"] select option,
:root[data-tema="liquid"] select optgroup{ background:#0f241d; color:#eaf6f1; }
:root[data-tema="liquid"] select option:checked{ background:#1f5a47; color:#ffffff; }
:root[data-tema="claro"] select option,
:root[data-tema="claro"] select optgroup{ background:#ffffff; color:#111111; }
:root[data-tema="oscuro"] select, :root[data-tema="liquid"] select{ color-scheme: dark; }
:root[data-tema="claro"] .card{ box-shadow:none; }

/* Títulos en serif solo en el tema Oscuro */
:root[data-tema="oscuro"] h1,
:root[data-tema="oscuro"] .topbar-titulo{ font-family:"Tiempos Headline","Iowan Old Style",Georgia,ui-serif,serif; font-weight:500; }
