/* ─────────────────────────────────────────────────────────────
   Azhum Platform · azhum-theme.css
   ─────────────────────────────────────────────────────────────
   THEME RULES — clases utilitarias y reglas globales que se
   apoyan en las variables definidas en azhum-tokens.css.

   Capa: Azhum.Components (plataforma compartida).
   Consumido por: hosts vía `_content/Azhum.Components/css/azhum-theme.css`.

   Debe cargarse DESPUÉS de:
     · _content/Telerik.UI.for.Blazor/css/kendo-theme-default/all.css
     · _content/Azhum.Components/css/azhum-tokens.css
   ───────────────────────────────────────────────────────────── */

/* ── Base ─────────────────────────────────────────────────── */
html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: var(--az-font-ui);
    background: var(--az-bg);
    color: var(--az-text);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Ambient glow radial sobre el body — da profundidad sin distraer.
   Solo activo en dark (en light el bg ya es claro y el glow se pierde). */
[data-theme="dark"] body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background:
        radial-gradient(ellipse 60% 50% at 50% 0%, rgba(79, 124, 255, 0.08), transparent 70%),
        radial-gradient(ellipse 40% 40% at 100% 100%, rgba(34, 211, 238, 0.05), transparent 70%);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--az-font-display);
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--az-text);
    margin-top: 0;
}

/* Suprime el outline de focus en headings — Blazor's FocusOnNavigate
   los focusea programáticamente tras cambiar de ruta (accesibilidad
   para screen readers), pero visualmente dibuja un rectángulo feo.
   Los headings no son elementos interactivos: quitar el outline es seguro. */
h1:focus, h2:focus, h3:focus, h4:focus, h5:focus, h6:focus {
    outline: none;
}

a {
    color: var(--az-blue);
    text-decoration: none;
    transition: color var(--az-transition-fast);
}

a:hover {
    color: var(--az-cyan);
}

::selection {
    background: var(--az-blue);
    color: #FFFFFF;
}

/* ── Utilidades ───────────────────────────────────────────── */
.data-value,
.kpi-number,
[data-numeric] {
    font-family: var(--az-font-mono);
    font-variant-numeric: tabular-nums;
}

/* ── Page header (patrón estándar de cabecera de página) ─── */
.page-header {
    margin-bottom: 28px;
    position: relative;
    z-index: 1;
}

.page-header h1 {
    font-size: 32px;
    margin: 0 0 8px;
    letter-spacing: -0.025em;
    font-weight: 700;
}

.page-subtitle {
    color: var(--az-text-muted);
    margin: 0;
    font-size: 14px;
    max-width: 70ch;
    line-height: 1.6;
}

/* ── Page placeholder (card de módulo en desarrollo) ─────── */
.page-placeholder {
    position: relative;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent),
        var(--az-surface);
    border: 1px solid var(--az-border-subtle);
    border-radius: 14px;
    padding: 56px 48px;
    text-align: center;
    color: var(--az-text-muted);
    font-size: 14px;
    box-shadow: var(--az-inset-hi), var(--az-elev-2);
    overflow: hidden;
    z-index: 1;
}

.page-placeholder::before {
    content: "";
    position: absolute;
    top: -50%;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 100%;
    background: radial-gradient(ellipse, rgba(79, 124, 255, 0.06), transparent 70%);
    pointer-events: none;
}

.page-placeholder p {
    margin: 0;
    position: relative;
    z-index: 1;
}

/* ── Config section (Configuración u otras páginas de ajustes) ── */
.config-section {
    margin-bottom: 32px;
    position: relative;
    z-index: 1;
}

.config-section-head {
    margin-bottom: 16px;
}

.config-section-head h2 {
    font-size: 18px;
    margin: 0 0 4px;
    font-weight: 600;
    letter-spacing: -0.015em;
}

.config-section-head p {
    margin: 0;
    font-size: 13px;
    color: var(--az-text-muted);
    max-width: 70ch;
}

.config-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 18px 22px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent),
        var(--az-surface);
    border: 1px solid var(--az-border-subtle);
    border-radius: 12px;
    box-shadow: var(--az-inset-hi), var(--az-elev-1);
}

.config-row-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.config-row-title {
    font-weight: 600;
    color: var(--az-text);
    font-size: 14px;
}

.config-row-hint {
    color: var(--az-text-muted);
    font-size: 12px;
    line-height: 1.5;
    max-width: 60ch;
}

.config-row-action {
    flex-shrink: 0;
}

/* ── Error overlay nativo de Blazor Server ────────────────── */
#blazor-error-ui {
    background: var(--az-amber);
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
    color: #1A1A1A;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}
