/*
 * DIS-20261014-20, -21 y -22, fusionadas al reabrir -20 el 16-oct). Copia de
 * direccion/diseno/kit/foundation.css (claro y oscuro), acotada a la raíz de cada componente nuevo: no se
 * carga foundation.css, que repintaría el panel ui2 entero (tiene sus propios tokens --ink/--surface/--line).
 * Lo único cambiado es la tipografía, la de la casa (Inter en el cuerpo). Oscuro: ui2-app.js (aplicarTema)
 * espeja su tema en <html class="theme-dark|theme-light">, igual que en Dashboard y Startup, para que este
 * fichero sea la copia literal de los suyos.
 *
 * DIS-20261014-22 (Fase B, ajustes y seguridad): añade .aui-set (settings-page) y .aui-sec
 * (security-settings) a las tres listas de abajo, mismas variables.
 *
 * PLA-20261015-20 (foto de perfil): añade .aui-avatar-upload (avatar-upload) a las tres listas
 * (DIS-20261019-2: fusionado desde produccion/2.68, sustituye a .aui-file-dropzone para esa UI).
 *
 * DIS-20261016-1 (Fase B, Tu plan+facturas y cancelar): añade .aui-billing-overview
 * (billing-overview) y .aui-cancel-flow (cancel-flow) a las tres listas.
 *
 * 2.91.0 (17-nov-2026): añade .aui-button a las tres listas. Sin estar en ellas, un botón de Arc
 * suelto en el panel se queda SIN tokens y sale como texto con un borde fino (medido: 24,5 px de
 * alto y esquinas rectas), porque aquí no se carga foundation.css entera.
 */
:where([data-aui-layer], .aui-toast-stack-viewport, .aui-empty-state, .aui-empty-states, .aui-empty-states-single, .aiden-404, .aui-expanding-search, .aui-notification-center, .aui-share-sheet, .aui-action-morph, .aui-metric-card, .aui-bar-chart, .aui-set, .aui-sec, .aui-avatar-upload, .aui-billing-overview, .aui-cancel-flow, .aui-button) {
    color-scheme: light;
    --neutral-0: oklch(100% 0 0);
    --neutral-1: oklch(99% 0 0);
    --neutral-2: oklch(97.8% 0 0);
    --neutral-3: oklch(95.8% 0 0);
    --neutral-4: oklch(91.5% 0 0);
    --neutral-5: oklch(84% 0 0);
    --neutral-6: oklch(72% 0 0);
    --neutral-7: oklch(59% 0 0);
    --neutral-8: oklch(46% 0 0);
    --neutral-9: oklch(34% 0 0);
    --neutral-10: oklch(23% 0 0);
    --neutral-11: oklch(15% 0 0);
    --background: var(--neutral-0);
    --surface: var(--neutral-0);
    --surface-raised: var(--neutral-0);
    --surface-muted: var(--neutral-2);
    --foreground: var(--neutral-11);
    --text-secondary: var(--neutral-8);
    --text-muted: var(--neutral-7);
    --border: oklch(93.5% 0 0);
    --border-subtle: oklch(96.5% 0 0);
    --border-strong: oklch(82% 0 0);
    --accent: oklch(33% 0 0);
    --accent-strong: oklch(24% 0 0);
    --accent-subtle: oklch(33% 0 0 / .1);
    --accent-foreground: var(--background);
    --control-on: oklch(23% 0 0);
    --control-glyph: oklch(100% 0 0);
    --control-track: oklch(89.5% 0 0);
    --control-track-hover: oklch(86% 0 0);
    --control-thumb: oklch(100% 0 0);
    --control-thumb-on: oklch(100% 0 0);
    --control-thumb-shadow: 0 0 0 .5px oklch(0% 0 0 / .07), 0 1px 2px oklch(0% 0 0 / .14), 0 2px 6px oklch(0% 0 0 / .06);
    --control-on-subtle: color-mix(in oklab, var(--control-on) 10%, transparent);
    --control-fill: var(--control-on);
    --focus-ring: transparent;
    --success: oklch(49% .19 150);
    --warning: oklch(58% .18 75);
    --danger: oklch(54% .21 25);
    --shadow-resting: 0 1px 2px oklch(0% 0 0 / .035);
    --shadow-raised: 0 6px 18px oklch(0% 0 0 / .065), 0 1px 3px oklch(0% 0 0 / .035);
    --shadow-floating: 0 20px 48px oklch(0% 0 0 / .105), 0 3px 10px oklch(0% 0 0 / .045);
    --space-1: .25rem;
    --space-2: .5rem;
    --space-3: .75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;
    --space-24: 6rem;
    --radius-control: 1.125rem;
    --radius-panel: 1.625rem;
    --radius-surface: 2.125rem;
    --radius-pill: 9999px;
    --control-height-sm: 2.25rem;
    --control-height-md: 2.75rem;
    --control-height-lg: 3.125rem;
    --font-display: "Sora", sans-serif;
    --font-body: "Inter", "Inter Variable", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --text-xs: .75rem;
    --text-sm: .875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.375rem;
    --text-2xl: 1.75rem;
    --text-3xl: 2.25rem;
    --text-4xl: 3.25rem;
    --text-5xl: 4.5rem;
    --tracking-display: -.03em;
    --tracking-body: -.01em;
    --leading-display: 1.1;
    --leading-body: 1.4;
    --ease-enter: cubic-bezier(.16,1,.3,1);
    --ease-standard: cubic-bezier(.22,1,.36,1);
    --ease-exit: cubic-bezier(.7,0,.84,0);
    --ease-in-out: cubic-bezier(.65,0,.35,1);
    --ease-spring: linear(0, 0.0258, 0.09, 0.1763, 0.2732, 0.3724, 0.4683, 0.5573, 0.6376, 0.7082, 0.7689, 0.8202, 0.8628, 0.8976, 0.9256, 0.9476, 0.9648, 0.9778, 0.9875, 0.9945, 0.9994, 1.0026, 1.0047, 1.0058, 1.0062, 1.0062, 1.0059, 1.0055, 1.0049, 1.0043, 1.0036, 1.0031, 1.0025, 1.002, 1.0016, 1.0013, 1);
    --duration-instant: 120ms;
    --duration-fast: 160ms;
    --duration-standard: 240ms;
    --duration-considered: 480ms;
    --duration-spring: 580ms;
    --duration-exit: 180ms;
    --duration-smooth: 400ms;
    --ease-smooth: linear(0, 0.0229, 0.0788, 0.1532, 0.2361, 0.3208, 0.403, 0.4802, 0.5509, 0.6146, 0.6711, 0.7207, 0.7638, 0.801, 0.8329, 0.8601, 0.8832, 0.9027, 0.9191, 0.9329, 0.9445, 0.9541, 0.9621, 0.9688, 0.9743, 0.9789, 0.9827, 0.9858, 0.9884, 0.9905, 0.9922, 0.9936, 0.9948, 0.9958, 0.9965, 0.9972, 0.9977, 0.9981, 0.9985, 0.9988, 1);
    --duration-snappy: 260ms;
    --ease-snappy: linear(0, 0.0446, 0.1474, 0.2743, 0.4046, 0.526, 0.6327, 0.7224, 0.7952, 0.8527, 0.897, 0.9301, 0.9544, 0.9717, 0.9837, 0.9918, 0.997, 1.0001, 1.0019, 1.0027, 1.003, 1.0029, 1.0026, 1.0022, 1.0018, 1.0014, 1);
    --duration-morph: 420ms;
    --ease-morph: linear(0, 0.0193, 0.0686, 0.1373, 0.2172, 0.302, 0.3872, 0.4696, 0.5471, 0.6181, 0.6821, 0.7388, 0.7883, 0.8309, 0.8671, 0.8974, 0.9226, 0.9431, 0.9597, 0.9728, 0.983, 0.9909, 0.9967, 1.001, 1.0039, 1.0059, 1.007, 1.0076, 1.0077, 1.0075, 1.0071, 1.0066, 1.0059, 1.0053, 1.0046, 1.004, 1.0034, 1.0029, 1.0024, 1.0019, 1.0016, 1.0012, 1);
    /* Paleta de gráficas (bar-chart), copiada de kit/foundation.css: acento neutro → el
       fallback de serie que usa Arc cuando no hay color relativo (nuestro caso, acento
       neutro sin data-accent). */
    --series-1: #1f7dcf;
    --series-2: #7128a5;
    --series-3: #e58f00;
    --series-4: #009e84;
}
:root.theme-dark :where([data-aui-layer], .aui-toast-stack-viewport, .aui-empty-state, .aui-empty-states, .aui-empty-states-single, .aiden-404, .aui-expanding-search, .aui-notification-center, .aui-share-sheet, .aui-action-morph, .aui-metric-card, .aui-bar-chart, .aui-set, .aui-sec, .aui-avatar-upload, .aui-billing-overview, .aui-cancel-flow, .aui-button) {
    color-scheme: dark;
    --background: oklch(19% 0 0);
    --surface: oklch(21.5% 0 0);
    --surface-raised: oklch(24% 0 0);
    --surface-muted: oklch(26% 0 0);
    --foreground: oklch(96% 0 0);
    --text-secondary: oklch(77% 0 0);
    --text-muted: oklch(64% 0 0);
    --border: oklch(29% 0 0);
    --border-subtle: oklch(25% 0 0);
    --border-strong: oklch(40% 0 0);
    --focus-ring: transparent;
    --accent: oklch(80% 0 0);
    --accent-strong: oklch(91% 0 0);
    --accent-subtle: oklch(80% 0 0 / .13);
    --control-on: oklch(93% 0 0);
    --control-glyph: oklch(19% 0 0);
    --control-track: oklch(33% 0 0);
    --control-track-hover: oklch(37% 0 0);
    --control-thumb: oklch(97% 0 0);
    --control-thumb-on: oklch(19% 0 0);
    --control-fill: oklch(62% 0 0);
    --control-thumb-shadow: 0 0 0 .5px oklch(0% 0 0 / .3), 0 1px 2px oklch(0% 0 0 / .35), 0 2px 6px oklch(0% 0 0 / .2);
    --success: oklch(78% .18 150);
    --warning: oklch(83% .17 80);
    --danger: oklch(76% .2 25);
    --shadow-resting: 0 1px 2px oklch(0% 0 0 / .18);
    --shadow-raised: 0 8px 22px oklch(0% 0 0 / .22);
    --shadow-floating: 0 22px 55px oklch(0% 0 0 / .34);
    --series-1: #55adff;
    --series-2: #9c37be;
    --series-3: #e66e00;
    --series-4: #00a861;
}
/* Móvil: el panel tiene su barra de abajo (glass-tabbar, assets/menu-movil). La pila de avisos de
   Arc va abajo a 16 px y la taparía mientras se ve el aviso: se sube por encima, con el hueco de
   Arc (12 px). Mismo ajuste que en Startup (assets/toast/arc-toast.css). */
@media (max-width: 680px) {
    body:has(#barraMovil.aui-glass-tabbar) > .aui-toast-stack-viewport:not(.aui-toast-stack-contained) {
        bottom: calc(16px + 62px + var(--space-3) + env(safe-area-inset-bottom, 0px));
    }
}

@media (prefers-color-scheme: dark) {
    :root:not(.theme-light) :where([data-aui-layer], .aui-toast-stack-viewport, .aui-empty-state, .aui-empty-states, .aui-empty-states-single, .aiden-404, .aui-expanding-search, .aui-notification-center, .aui-share-sheet, .aui-action-morph, .aui-metric-card, .aui-bar-chart, .aui-set, .aui-sec, .aui-avatar-upload, .aui-billing-overview, .aui-cancel-flow, .aui-button) {
        color-scheme: dark;
        --background: oklch(19% 0 0);
        --surface: oklch(21.5% 0 0);
        --surface-raised: oklch(24% 0 0);
        --surface-muted: oklch(26% 0 0);
        --foreground: oklch(96% 0 0);
        --text-secondary: oklch(77% 0 0);
        --text-muted: oklch(64% 0 0);
        --border: oklch(29% 0 0);
        --border-subtle: oklch(25% 0 0);
        --border-strong: oklch(40% 0 0);
        --focus-ring: transparent;
        --accent: oklch(80% 0 0);
        --accent-strong: oklch(91% 0 0);
        --accent-subtle: oklch(80% 0 0 / .13);
        --control-on: oklch(93% 0 0);
        --control-glyph: oklch(19% 0 0);
        --control-track: oklch(33% 0 0);
        --control-track-hover: oklch(37% 0 0);
        --control-thumb: oklch(97% 0 0);
        --control-thumb-on: oklch(19% 0 0);
        --control-fill: oklch(62% 0 0);
        --control-thumb-shadow: 0 0 0 .5px oklch(0% 0 0 / .3), 0 1px 2px oklch(0% 0 0 / .35), 0 2px 6px oklch(0% 0 0 / .2);
        --success: oklch(78% .18 150);
        --warning: oklch(83% .17 80);
        --danger: oklch(76% .2 25);
        --shadow-resting: 0 1px 2px oklch(0% 0 0 / .18);
        --shadow-raised: 0 8px 22px oklch(0% 0 0 / .22);
        --shadow-floating: 0 22px 55px oklch(0% 0 0 / .34);
        --series-1: #55adff;
        --series-2: #9c37be;
        --series-3: #e66e00;
        --series-4: #00a861;
    }
}
