/* public/css/tokens.css  —  TEMA OBRA 360 (claro + barra lateral azul marino, acento violeta)
 * Tokens de diseño y base común (panel admin, portal propietario y login).
 * Tipografía: Inter. Iconos: Material Symbols Outlined (monocromos).
 */
:root {
    color-scheme: light;

    /* Superficies */
    --bg-outer: #e8eaf4;
    --bg-app: #f5f6fb;
    --bg-card: #ffffff;
    --bg-subtle: #f7f8fd;
    --bg-muted: #eceefa;
    --bg-hover: rgba(95, 82, 224, .07);
    --panel: #ffffff;

    /* Texto */
    --text-main: #151a3d;
    --text-muted: #666c8c;
    --text-light: #9aa0bb;

    /* Bordes */
    --border-color: #e6e8f3;
    --border-subtle: #eff0f8;
    --border-strong: #cdd1e6;

    /* Acento violeta */
    --accent: #5f52e0;
    --accent-strong: #5044cc;
    --accent-hover: #5044cc;
    --accent-ink: #ffffff;
    --accent-soft: rgba(95, 82, 224, .10);
    --accent-line: rgba(95, 82, 224, .30);
    --accent-glow: rgba(95, 82, 224, .35);
    --accent-2: #9a8cff;
    --alert: #e5484d;

    /* Barra lateral y cabecera móvil (azul marino) */
    --sb-bg: #0f1235;
    --sb-bg-2: #171b4a;
    --sb-text: #aeb3d9;
    --sb-text-strong: #ffffff;
    --sb-border: rgba(255, 255, 255, .09);
    --sb-hover: rgba(255, 255, 255, .07);
    --sb-active: #6a5ef0;

    /* Estados */
    --success: #1f9d6b;
    --success-bg: #e5f6ee;
    --warning: #b7791f;
    --warning-bg: #fdf3dc;
    --danger: #d64560;
    --danger-bg: #fde9ed;
    --info: #2f6fe4;
    --info-bg: #e6eefe;
    --green: #1f9d6b;

    --grad-progress: linear-gradient(90deg, #6a5ef0, #9a8cff);

    /* Alias heredados (los usan clases ya existentes) */
    --primary: var(--accent);
    --primary-hover: var(--accent-hover);
    --primary-contrast: var(--accent-ink);
    --accent-blue: var(--info);
    --accent-blue-bg: var(--info-bg);
    --accent-orange: var(--warning);
    --badge-bg: var(--bg-muted);
    --badge-text: var(--text-main);
    --ly-surface: var(--bg-card);
    --ly-surface-2: var(--bg-subtle);
    --ly-border: var(--border-color);
    --ly-text: var(--text-main);
    --ly-muted: var(--text-muted);
    --ly-hover: var(--bg-hover);
    --ly-accent: var(--accent);
    --ly-accent-soft: var(--accent-soft);

    /* Forma */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-pill: 9999px;

    --shadow-card: 0 1px 2px rgba(21, 26, 61, .04), 0 8px 20px -10px rgba(21, 26, 61, .12);
    --shadow-float: 0 18px 44px -14px rgba(21, 26, 61, .30);
    --shadow-modal: 0 28px 64px -16px rgba(21, 26, 61, .45);
    --ly-shadow: var(--shadow-float);

    --font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { background: var(--bg-app); -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: var(--font-family);
    font-size: 14px;
    line-height: 1.5;
    background: var(--bg-app);
    color: var(--text-main);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6, p { margin: 0; }
a { color: inherit; }
img { max-width: 100%; }
button, input, select, textarea { font-family: inherit; }
[hidden] { display: none !important; }
::selection { background: var(--accent-soft); color: var(--text-main); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Iconos monocromos (Material Symbols): toman el color del texto */
.material-symbols-outlined {
    font-family: 'Material Symbols Outlined';
    font-weight: 400;
    font-style: normal;
    font-size: 20px;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    flex: none;
    user-select: none;
    -webkit-font-smoothing: antialiased;
    font-feature-settings: 'liga';
}

* { scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* Botón de instalación de la app (PWA) */
.pwa-instalar { margin-top: 18px; text-align: center; }
.push-box .pwa-btn { width: 100%; }
.pwa-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 10px 20px;
    background: var(--accent-soft);
    color: var(--accent);
    border: 1px solid var(--accent-line);
    border-radius: var(--radius-pill);
    font-size: .92rem;
    font-weight: 700;
    cursor: pointer;
}
.pwa-btn:hover { background: rgba(95, 82, 224, .18); }
.pwa-ayuda { font-size: .82rem; line-height: 1.6; color: var(--text-muted); }
.pwa-ayuda .material-symbols-outlined { font-size: 18px; vertical-align: -4px; color: var(--accent); }
.push-info { margin: 8px 0 0; font-size: .8rem; color: var(--success); }
.push-btn { display: inline-flex; align-items: center; gap: 6px; }
.push-btn .material-symbols-outlined { font-size: 18px; }
