/* =========================================================================
   themes.css — FASE 17 (F17-2). Estéticas configurables de la aplicación.

   Cargado DESPUÉS de style.css / suite.css / ot.css (index.html).
   Reglas de la casa (CONVENCIONES_FRONTEND §1):
     - Solo tokens en :root[data-theme], que los temas sobrescriben.
     - "Sabor" de tema = un puñado de reglas por estética (glass, bordes 2px,
       guion editorial), nunca duplicar el design system completo.
   Alba (la actual) NO tiene bloque: es el conjunto base de style.css §1.
   Paletas de mockup/calendario/estilo_0{2,4,5}_*.html y mockup/asignaciones.
   ========================================================================= */

/* -------------------------------------------------------------------------
   CRISTAL · glassmorphism (estilo_02_cristal)
   ------------------------------------------------------------------------- */
:root[data-theme="cristal"] {
    --bg-app: oklch(0.944 0.015 272.0);
    --bg-app-image: linear-gradient(135deg, #e8eefc 0%, #f3e9fb 45%, #eafaf3 100%);
    --bg-card: rgba(255, 255, 255, 0.55);
    --bg-card-hover: rgba(255, 255, 255, 0.72);
    --bg-input: rgba(255, 255, 255, 0.70);
    --bg-subtle: rgba(255, 255, 255, 0.45);
    --border-color: rgba(255, 255, 255, 0.85);
    --border-strong: rgba(122, 138, 192, 0.45);
    --text-primary: oklch(0.315 0.030 271.0);   /* #2b2f47 */
    --text-secondary: oklch(0.470 0.045 271.0); /* #5b6288 */
    --text-muted: oklch(0.590 0.033 271.0);     /* #8a90b0 */
    --color-accent: oklch(0.545 0.215 273.0);   /* #5160f5 */
    --color-accent-hover: oklch(0.490 0.210 273.0);
    --color-accent-2: oklch(0.720 0.130 260.0); /* #6fb2ff */
    --radius-md: 16px;
    --radius-lg: 24px;
    --surface-blur: 14px;
    --shadow-card: 0 18px 44px rgba(90, 100, 180, 0.16);
}
/* sabor cristal: blur de superficies */
:root[data-theme="cristal"] .card,
:root[data-theme="cristal"] .modal,
:root[data-theme="cristal"] .dropdown-menu,
:root[data-theme="cristal"] .toast,
:root[data-theme="cristal"] .datatable-wrapper,
:root[data-theme="cristal"] .table-wrapper,
:root[data-theme="cristal"] .login-card,
:root[data-theme="cristal"] .person-card,
:root[data-theme="cristal"] .inc-card,
:root[data-theme="cristal"] .ot-card,
:root[data-theme="cristal"] .case-card,
:root[data-theme="cristal"] .calls-report,
:root[data-theme="cristal"] .ot-sheet,
:root[data-theme="cristal"] .expander,
:root[data-theme="cristal"] .app-header {
    backdrop-filter: blur(var(--surface-blur)) saturate(1.4);
    -webkit-backdrop-filter: blur(var(--surface-blur)) saturate(1.4);
}
/* tokens de tipo del calendario §47 → paleta cristal */
:root[data-theme="cristal"] .cal-view {
    --cal-llamada: #4e8cff;
    --cal-incidencia: #ff6b70;
    --cal-reparacion: #2fc98a;
    --cal-recordatorio: #ffb640;
}
:root[data-theme="cristal"] .cal-band {
    border-radius: 99px;
    background: linear-gradient(90deg, var(--cal-llamada), color-mix(in oklch, var(--cal-llamada), white 35%));
    box-shadow: 0 6px 14px rgba(50, 60, 110, 0.20);
}
:root[data-theme="cristal"] .cal-band--incidencia {
    background: linear-gradient(90deg, var(--cal-incidencia), color-mix(in oklch, var(--cal-incidencia), white 35%));
}
:root[data-theme="cristal"] .cal-band--reparacion {
    background: linear-gradient(90deg, var(--cal-reparacion), color-mix(in oklch, var(--cal-reparacion), white 35%));
}
:root[data-theme="cristal"] .cal-band--recordatorio {
    background: linear-gradient(90deg, var(--cal-recordatorio), color-mix(in oklch, var(--cal-recordatorio), white 35%));
}

/* -------------------------------------------------------------------------
   VIVO · color-block (estilo_04_vivo)
   ------------------------------------------------------------------------- */
:root[data-theme="vivo"] {
    --bg-app: oklch(1 0 0);                      /* #ffffff */
    --bg-card: oklch(0.976 0.006 264.0);         /* #f7f8fd */
    --bg-card-hover: oklch(0.965 0.009 264.0);
    --bg-input: oklch(1 0 0);
    --bg-subtle: oklch(0.958 0.007 264.0);
    --border-color: oklch(0.947 0.011 264.0);    /* #eceefa */
    --border-strong: oklch(0.860 0.018 262.0);
    --border-width: 2px;
    --text-primary: oklch(0.265 0.042 265.0);    /* #1d2340 */
    --text-secondary: oklch(0.420 0.050 262.0);  /* #51608c */
    --text-muted: oklch(0.650 0.030 259.0);      /* #98a0bf */
    --color-accent: oklch(0.265 0.042 265.0);    /* #1d2340 (tinta) */
    --color-accent-hover: oklch(0.360 0.045 265.0);
    --color-accent-2: oklch(0.890 0.160 90.0);   /* #ffcf33 */
    --radius-md: 14px;
    --radius-lg: 18px;
    --shadow-card: 0 3px 0 rgba(29, 35, 64, 0.14);
    --shadow-hard: 0 3px 0 rgba(29, 35, 64, 0.14);
}
/* sabor vivo: bordes 2px + sombra dura en superficies y bandas */
:root[data-theme="vivo"] .card,
:root[data-theme="vivo"] .modal,
:root[data-theme="vivo"] .datatable-wrapper,
:root[data-theme="vivo"] .table-wrapper,
:root[data-theme="vivo"] .login-card,
:root[data-theme="vivo"] .person-card,
:root[data-theme="vivo"] .inc-card,
:root[data-theme="vivo"] .ot-card,
:root[data-theme="vivo"] .case-card,
:root[data-theme="vivo"] .calls-report,
:root[data-theme="vivo"] .dropdown-menu,
:root[data-theme="vivo"] .expander,
:root[data-theme="vivo"] .form-input,
:root[data-theme="vivo"] .form-select {
    border-width: var(--border-width);
    box-shadow: var(--shadow-hard);
}
:root[data-theme="vivo"] .btn {
    border-width: 2px;
    box-shadow: var(--shadow-hard);
}
/* tokens de tipo del calendario §47 → paleta vivo */
:root[data-theme="vivo"] .cal-view {
    --cal-llamada: #3d8bfd;
    --cal-incidencia: #ff5c6a;
    --cal-reparacion: #29cc8b;
    --cal-recordatorio: #ffb200;
}
:root[data-theme="vivo"] .cal-band {
    border: 2px solid rgba(29, 35, 64, 0.28);
    box-shadow: 0 3px 0 rgba(29, 35, 64, 0.14);
}
:root[data-theme="vivo"] .cal-band--recordatorio {
    color: oklch(0.28 0.055 70.0);               /* #3a2a00 */
}

/* -------------------------------------------------------------------------
   PAPEL · agenda editorial (estilo_05_papel)
   ------------------------------------------------------------------------- */
:root[data-theme="papel"] {
    --bg-app: oklch(0.962 0.013 85.0);           /* #f6f1e6 */
    --bg-card: oklch(0.989 0.006 85.0);          /* #fffdf7 */
    --bg-card-hover: oklch(0.938 0.016 85.0);
    --bg-input: oklch(0.993 0.005 85.0);
    --bg-subtle: oklch(0.938 0.016 85.0);
    --border-color: oklch(0.852 0.024 85.0);     /* #d9d2bc */
    --border-strong: oklch(0.805 0.028 85.0);
    --text-primary: oklch(0.345 0.020 90.0);     /* #3a3f2f */
    --text-secondary: oklch(0.490 0.024 88.0);   /* #6f6a54 */
    --text-muted: oklch(0.620 0.020 85.0);       /* #9a937c */
    --color-accent: oklch(0.610 0.070 74.0);     /* #b5985e */
    --color-accent-hover: oklch(0.560 0.065 74.0);
    --color-accent-2: oklch(0.680 0.055 76.0);
    --radius-sm: 2px;
    --radius-md: 4px;
    --radius-lg: 8px;
    --font-display: Georgia, 'Times New Roman', serif;
    --shadow-card: none;
}
/* sabor papel: bandas como guion de color (editorial) + agenda con raíl */
:root[data-theme="papel"] .cal-view {
    --cal-llamada: #5b8def;
    --cal-incidencia: #d95763;
    --cal-reparacion: #57b37f;
    --cal-recordatorio: #d9a94a;
}
:root[data-theme="papel"] .cal-band {
    background: rgba(255, 255, 255, 0.55);
    color: var(--text-primary);
    border-left-width: 3px;
    border-radius: 0 4px 4px 0;
}
:root[data-theme="papel"] .cal-band--llamada      { border-left-color: var(--cal-llamada); }
:root[data-theme="papel"] .cal-band--incidencia   { border-left-color: var(--cal-incidencia); }
:root[data-theme="papel"] .cal-band--reparacion   { border-left-color: var(--cal-reparacion); }
:root[data-theme="papel"] .cal-band--recordatorio { border-left-color: var(--cal-recordatorio); /* fondo claro, texto oscuro */ }
:root[data-theme="papel"] .cal-band > i {
    background: var(--cal-llamada);
    box-shadow: none;
}
/* agenda: raíl de hora a la izquierda */
:root[data-theme="papel"] .cal-agenda-rows {
    display: flex;
    flex-direction: column;
}
:root[data-theme="papel"] .cal-agenda-day .cal-band--agenda {
    display: flex;
    align-items: baseline;
    gap: 10px;
    background: transparent;
    border-left: 3px solid var(--cal-llamada);
    border-radius: 0 4px 4px 0;
    padding: 3px 10px;
    margin: 0 0 4px;
}
:root[data-theme="papel"] .cal-agenda-day .cal-band--agenda > i {
    order: -1;
}
:root[data-theme="papel"] .cal-agenda-day .cal-band--agenda b {
    flex: none;
    width: 44px;
    text-align: right;
    color: var(--text-muted);
    font-weight: 700;
}
:root[data-theme="papel"] .cal-agenda-day .cal-band--agenda em {
    margin-left: auto;
    color: var(--text-muted);
    border-color: var(--border-color);
}

/* -------------------------------------------------------------------------
   NOCHE (dark) — fuera de alcance F17 (D0). Si en el futuro se activa, su
   bloque iría aquí tras la limpieza de hex heredados (PLAN §3.5).
   ------------------------------------------------------------------------- */
/* =====================================================
   F17 (retoque): calendario «puntos» + agenda — por estética
   (look de mockups *_puntos y agenda_0{2,4,5})
   ===================================================== */

/* ---------- CRISTAL · puntos (píldora translúcida) y agenda (chips gradiente) ---------- */
:root[data-theme="cristal"] .cal-punto,
:root[data-theme="cristal"] .cal-punto.cal-band--incidencia,
:root[data-theme="cristal"] .cal-punto.cal-band--reparacion,
:root[data-theme="cristal"] .cal-punto.cal-band--recordatorio {
    background: rgba(255, 255, 255, 0.68);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border-radius: 999px;
    border-left-width: 3px;
}
:root[data-theme="cristal"] .cal-punto > i,
:root[data-theme="cristal"] .cal-punto > i {
    box-shadow: 0 0 8px currentColor;
}
:root[data-theme="cristal"] .cal-punto.cal-band--llamada      { border-left-color: var(--cal-llamada);      & i { background: var(--cal-llamada); } }
:root[data-theme="cristal"] .cal-punto.cal-band--incidencia   { border-left-color: var(--cal-incidencia);   & i { background: var(--cal-incidencia); } }
:root[data-theme="cristal"] .cal-punto.cal-band--reparacion   { border-left-color: var(--cal-reparacion);   & i { background: var(--cal-reparacion); } }
:root[data-theme="cristal"] .cal-punto.cal-band--recordatorio { border-left-color: var(--cal-recordatorio); & i { background: var(--cal-recordatorio); } }

:root[data-theme="cristal"] .cal-band--agenda.cal-band--llamada      { background: linear-gradient(90deg, #4e8cff, #6faeff); }
:root[data-theme="cristal"] .cal-band--agenda.cal-band--incidencia   { background: linear-gradient(90deg, #ff6b70, #ff9a9d); }
:root[data-theme="cristal"] .cal-band--agenda.cal-band--reparacion   { background: linear-gradient(90deg, #2fc98a, #6ee6b3); }
:root[data-theme="cristal"] .cal-band--agenda.cal-band--recordatorio { background: linear-gradient(90deg, #ffb640, #ffd47a); color: #5f4a12; }
:root[data-theme="cristal"] .cal-band--agenda b { background: rgba(255, 255, 255, 0.22); }
:root[data-theme="cristal"] .cal-band--agenda em { background: rgba(255, 255, 255, 0.16); border-color: rgba(255, 255, 255, 0.55); }
:root[data-theme="cristal"] .cal-band--agenda.cal-band--recordatorio b,
:root[data-theme="cristal"] .cal-band--agenda.cal-band--recordatorio em { background: rgba(95, 74, 18, 0.12); border-color: rgba(95, 74, 18, 0.3); }

/* ---------- VIVO · puntos (tarjetitas pastel con borde 2px) y agenda (sólidos) ---------- */
:root[data-theme="vivo"] .cal-punto,
:root[data-theme="vivo"] .cal-punto.cal-band--incidencia,
:root[data-theme="vivo"] .cal-punto.cal-band--reparacion,
:root[data-theme="vivo"] .cal-punto.cal-band--recordatorio {
    background: #dcecff;
    border: 2px solid #3d8bfd;
    border-radius: 8px;
    color: #1d2340;
    padding: 1px 6px;
}
:root[data-theme="vivo"] .cal-punto.cal-band--incidencia   { background: #ffe2e5; border-color: #ff5c6a; }
:root[data-theme="vivo"] .cal-punto.cal-band--reparacion   { background: #d9f8e9; border-color: #29cc8b; }
:root[data-theme="vivo"] .cal-punto.cal-band--recordatorio { background: #fff1c4; border-color: #ffb200; }
:root[data-theme="vivo"] .cal-punto > i { border-radius: 3px; box-shadow: none; }

:root[data-theme="vivo"] .cal-band--agenda.cal-band--llamada      { background: #3d8bfd; }
:root[data-theme="vivo"] .cal-band--agenda.cal-band--incidencia   { background: #ff5c6a; }
:root[data-theme="vivo"] .cal-band--agenda.cal-band--reparacion   { background: #29cc8b; color: #063224; }
:root[data-theme="vivo"] .cal-band--agenda.cal-band--recordatorio { background: #ffb200; color: #3a2a00; }
:root[data-theme="vivo"] .cal-band--agenda b { background: rgba(29, 35, 64, 0.16); border-radius: 7px; }
:root[data-theme="vivo"] .cal-band--agenda em { border-width: 2px; border-color: rgba(255, 255, 255, 0.55); }
:root[data-theme="vivo"] .cal-band--agenda.cal-band--reparacion b,
:root[data-theme="vivo"] .cal-band--agenda.cal-band--reparacion em,
:root[data-theme="vivo"] .cal-band--agenda.cal-band--recordatorio b,
:root[data-theme="vivo"] .cal-band--agenda.cal-band--recordatorio em { border-color: rgba(29, 35, 64, 0.3); }

/* ---------- PAPEL · puntos (guion editorial) y agenda (raíl, sin píldora) ---------- */
:root[data-theme="papel"] .cal-punto,
:root[data-theme="papel"] .cal-punto.cal-band--incidencia,
:root[data-theme="papel"] .cal-punto.cal-band--reparacion,
:root[data-theme="papel"] .cal-punto.cal-band--recordatorio {
    background: rgba(255, 255, 255, 0.5);
    border-radius: 0 4px 4px 0;
    border-left-width: 3px;
    color: #4c4f3e;
}
:root[data-theme="papel"] .cal-punto > i {
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 50%;
    width: 6px; height: 6px;
    box-shadow: none;
}
:root[data-theme="papel"] .cal-punto-dur { border-left-color: #d9d2bc; font-style: italic; }

:root[data-theme="papel"] .cal-agenda-day .cal-band--agenda b {
    background: transparent;
    padding: 0;
}
