/* ============================================
   ESTILOS DE ACCESIBILIDAD
   ============================================ */

/* Focus visible para navegación por teclado */
:focus-visible {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

/* Skip link para navegación por teclado */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: #0073aa;
    color: white;
    padding: 8px;
    text-decoration: none;
    z-index: 100;
}

.skip-link:focus {
    top: 0;
}

/* Contraste mejorado */
.login-form-wrapper label {
    color: #222;
    font-weight: 600;
}

.dashboard-sidebar {
    background-color: #2c3e50;
}

.dashboard-sidebar a {
    color: #ffffff;
}

/* Texto legible */
body {
    line-height: 1.6;
    letter-spacing: 0.3px;
}

.login-form-wrapper h1,
.dashboard-title {
    line-height: 1.4;
}

/* Botones accesibles */
button,
.btn-login,
.dashboard-logout-btn,
.report-link {
    min-height: 44px;
    min-width: 44px;
    padding: 12px 16px;
}

/* Iconos con texto */
.hamburger-btn::after {
    content: 'Menú';
    display: none;
    margin-left: 8px;
}

@media (max-width: 480px) {
    .hamburger-btn::after {
        display: inline;
        font-size: 12px;
    }
}

/* Reducir movimiento para usuarios que lo prefieren */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}

/* Modo oscuro */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #1a1a1a;
        color: #e0e0e0;
    }

    .login-form-section {
        background-color: #2a2a2a;
        color: #e0e0e0;
    }

    .login-form-wrapper h1 {
        color: #e0e0e0;
    }

    .login-form-wrapper label {
        color: #b0b0b0;
    }

    .login-form-wrapper input[type="text"],
    .login-form-wrapper input[type="password"] {
        background-color: #3a3a3a;
        border-color: #555;
        color: #e0e0e0;
    }

    .dashboard-content {
        background-color: #1a1a1a;
    }

    .dashboard-top-bar {
        background-color: #2a2a2a;
        border-color: #444;
        color: #e0e0e0;
    }

    .report-placeholder {
        background: linear-gradient(135deg, #444 0%, #555 100%);
    }
}

/* Alto contraste */
@media (prefers-contrast: more) {
    .login-form-wrapper input[type="text"],
    .login-form-wrapper input[type="password"] {
        border-width: 2px;
    }

    button {
        border: 2px solid currentColor;
    }

    .menu-reports a {
        border-width: 2px;
    }
}

/* Fuente más grande para usuarios con baja visión */
@media (prefers-reduced-data: no-preference) {
    @supports (font-size-adjust: ex-height) {
        body {
            font-size-adjust: 0.5;
        }
    }
}
