/* =============================================================================
 * MedSuite — public/assets/css/base.css
 * Copiado de Bizsuite @98ceec0 (public/assets/css/base.css).
 * -----------------------------------------------------------------------------
 * El reinicio y los elementos base: cuerpo, títulos, enlaces, formularios y botones.
 *
 * Es la primera de las capas de MedSuite (docs/PLAN_DESARROLLO.md §4,
 * docs/ARQUITECTURA.md §1.1): theme → base → components → nav → clinica →
 * hoja del módulo. Lo de abajo es la hoja de Bizsuite SIN CAMBIOS, a propósito:
 * así se compara línea por línea con la de origen y se puede volver a copiar.
 * Lo que MedSuite corrige (contraste AA de --muted, --ok, --warn, --error e
 * --idle; foco visible en los campos) y la capa médica van en clinica.css, que
 * se carga después. No tiene url() ni @import: nada se pide fuera del sitio.
 * ============================================================================= */

/* =============================================================================
 * Bizsuite — base.css
 * -----------------------------------------------------------------------------
 * Reset moderno + estilos base de elementos (body, tipografía, inputs, botones).
 * Depende de theme.css (usa sus variables).
 *
 * Orden de carga: theme.css → base.css → components.css → módulo.
 * ============================================================================= */

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
    font-family: var(--font-body);
    font-size: var(--fs-base);
    line-height: 1.55;
    color: var(--ink);
    background: var(--paper);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ---- Tipografía base ---- */
h1, h2, h3, h4 {
    font-family: var(--font-display);
    color: var(--sky-900);
    line-height: 1.2;
    font-weight: var(--fw-bold);
}
h1 { font-size: var(--fs-xl); }
h2 { font-size: var(--fs-lg); }
h3 { font-size: var(--fs-md); }

p { color: var(--ink-soft); }

a {
    color: var(--sky-600);
    text-decoration: none;
    transition: color var(--t-fast);
}
a:hover { color: var(--sky-900); }

/* Números y datos: tipografía tabular para alineación */
.data, .num {
    font-family: var(--font-data);
    font-variant-numeric: tabular-nums;
}

/* ---- Formularios ---- */
label {
    display: block;
    font-size: var(--fs-sm);
    color: var(--ink-soft);
    font-weight: var(--fw-medium);
    margin-bottom: var(--sp-2);
}

input, select, textarea {
    width: 100%;
    padding: 0.7rem 0.9rem;
    font-family: var(--font-body);
    font-size: var(--fs-base);
    color: var(--ink);
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--sky-600);
    box-shadow: 0 0 0 3px rgba(29, 117, 189, 0.12);
}

/* ---- Botones ---- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--sp-2);
    width: auto;
    padding: 0.7rem 1.25rem;
    font-family: var(--font-body);
    font-size: var(--fs-base);
    font-weight: var(--fw-bold);
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--r-sm);
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    transition: background var(--t-fast), border-color var(--t-fast), transform var(--t-fast);
}
.btn:active { transform: translateY(1px); }

/* Botón primario: acción principal Bizsuite */
.btn-primary {
    background: var(--sky-600);
    color: var(--white);
}
.btn-primary:hover { background: var(--sky-700); }

/* Botón secundario: contorno azul */
.btn-secondary {
    background: var(--white);
    color: var(--sky-700);
    border-color: var(--line);
}
.btn-secondary:hover {
    border-color: var(--sky-600);
    color: var(--sky-900);
}

.btn-block { width: 100%; }

/* ---- Accesibilidad ---- */
:focus-visible { outline: 2px solid var(--sky-600); outline-offset: 2px; }

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