/**
 * Sistema de Login - Estilos Principales
 * @package Divi Child Login System
 * @version 2.0.0
 */

/* ==================================================
 * 1. VARIABLES Y CONFIGURACIÓN BASE
 * ================================================== */
:root {
    /* Colores Principales */
    --login-primary: #1E3D5D;
    --login-primary-dark: #153658;
    --login-primary-light: #2a527a;
    --login-secondary: #3a6a9a;

    /* Textos */
    --login-text-primary: #2c3e50;
    --login-text-secondary: #6c757d;
    --login-text-tertiary: #a0a9b8;

    /* Backgrounds */
    --login-bg-page: #f5f7fa;
    --login-bg-light: #f8f9fa;
    --login-bg-white: #ffffff;
    --login-bg-input: #f8f9fb;

    /* Borders */
    --login-border: #e1e5eb;
    --login-border-light: #e1e5eb;

    /* Placeholders y estados */
    --login-placeholder: #a8b4c4;
    --login-error: #dc3545;
    --login-error-bg: #fff5f5;
    --login-success-bg: #e8f4ff;

    /* Sombras */
    --login-shadow-sm: 0 1px 4px rgba(0,0,0,0.05);
    --login-shadow-md: 0 2px 8px rgba(0,0,0,0.08);
    --login-shadow-lg: 0 10px 30px rgba(0,0,0,0.1);

    /* Border Radius */
    --login-radius-sm: 8px;
    --login-radius-md: 12px;
    --login-radius-lg: 16px;
    --login-radius-xl: 24px;
}

/* ==================================================
 * 2. ESTRUCTURA BASE
 * ================================================== */
html {
    height: 100%;
    overflow-x: hidden;
}

/* Box sizing global para evitar problemas de desbordamiento */
*, *::before, *::after {
    box-sizing: border-box;
}

body.login {
    display: grid;
    grid-template-columns: 50% 50%;
    min-height: 100vh;
    height: 100%;
    margin: 0;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: var(--login-bg-light);
}

/* Ocultar elementos predeterminados de WordPress */
.login h1,
.wp-login-logo,
.language-switcher {
    display: none !important;
}

/* Pantalla de bienvenida - Solo visible en mobile y tablet */
.login-welcome-screen {
    display: none;
}

@media (max-width: 1366px) {
    .login-welcome-screen {
        display: flex;
    }
}

/* Botón volver - Solo visible en mobile y tablet */
.login-back-btn {
    display: none;
}

@media (max-width: 1366px) {
    .login-back-btn {
        display: flex;
    }
}

/* ==================================================
 * 3. PANEL IZQUIERDO (BRANDING)
 * ================================================== */
.login-left-panel {
    grid-column: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--login-primary-dark) 0%, var(--login-primary) 100%);
    padding: 60px;
    overflow: hidden;
}

/* Overlay con patrón sutil */
.login-left-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(135deg, rgba(21, 54, 88, 0.7) 0%, rgba(30, 61, 93, 0.85) 100%),
        url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    z-index: 1;
}

/* Contenido del panel izquierdo */
.login-left-panel-content {
    position: relative;
    z-index: 2;
    color: white;
    text-align: center;
    max-width: 450px;
    width: 100%;
}

/* Logo */
.login-left-panel .login-logo {
    margin-bottom: 40px;
}

.login-left-panel .login-logo img {
    max-width: 280px;
    height: auto;
    filter: brightness(0) invert(1);
}

/* Textos de bienvenida */
.login-welcome h2 {
    color: white;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    text-shadow: 0 4px 15px rgba(0,0,0,0.3);
    letter-spacing: -0.5px;
    animation: fadeInUp 0.8s ease-out;
}

.login-welcome p {
    color: rgba(255,255,255,0.95);
    font-size: 1.2rem;
    line-height: 1.6;
    margin: 0;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

/* ==================================================
 * 4. PANEL DERECHO (FORMULARIO)
 * ================================================== */
#login {
    grid-column: 2;
    background: var(--login-bg-white);
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px;
}

/* Header del formulario */
.login-right-panel-header {
    margin-bottom: 30px;
    text-align: center;
    width: 100%;
    max-width: 420px;
}

.login-right-panel-header h2 {
    color: var(--login-primary);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 10px;
    letter-spacing: -0.5px;
}

.login-right-panel-header .subtitle {
    color: var(--login-text-secondary);
    font-size: 0.95rem;
    font-weight: 400;
}

/* ==================================================
 * 5. FORMULARIO
 * ================================================== */
#loginform {
    margin: 0 auto;
    padding: 40px;
    background: var(--login-bg-white);
    border-radius: var(--login-radius-md);
    width: 100%;
    max-width: 420px;
    position: relative;
    animation: fadeInUp 0.8s cubic-bezier(0.215, 0.610, 0.355, 1.000);
}

/* Contenedores de campos */
#loginform p,
#loginform .user-pass-wrap {
    position: relative;
    margin-bottom: 20px;
}

/* Campos de entrada */
#loginform input[type="text"],
#loginform input[type="password"],
#loginform input[type="email"] {
    background: var(--login-bg-light);
    border: 1px solid var(--login-border);
    border-radius: var(--login-radius-sm);
    height: 48px;
    width: 100%;
    padding: 0 18px 0 42px;
    font-size: 1rem;
    color: var(--login-text-primary);
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

#loginform input:focus {
    border-color: var(--login-primary);
    background: var(--login-bg-white);
    box-shadow: 0 0 0 3px rgba(30, 61, 93, 0.08);
    outline: none;
}

#loginform input::placeholder {
    color: var(--login-placeholder);
}

/* Iconos de campos */
#loginform p:first-child::before,
.user-pass-wrap::before {
    content: '';
    position: absolute;
    left: 14px;
    top: 14px;
    width: 18px;
    height: 18px;
    z-index: 2;
    opacity: 0.4;
    transition: opacity 0.3s ease;
}

#loginform p:first-child::before {
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%236c757d'%3E%3Cpath d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 3c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3zm0 14.2c-2.5 0-4.71-1.28-6-3.22.03-1.99 4-3.08 6-3.08 1.99 0 5.97 1.09 6 3.08-1.29 1.94-3.5 3.22-6 3.22z'/%3E%3C/svg%3E") no-repeat;
}

.user-pass-wrap::before {
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%236c757d'%3E%3Cpath d='M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zm-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zm3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.1 1.71 0 3.1 1.39 3.1 3.1v2z'/%3E%3C/svg%3E") no-repeat;
}

/* Labels ocultos */
#loginform label[for="user_login"],
#loginform label[for="user_pass"] {
    display: none;
}

/* ==================================================
 * 6. CHECKBOX Y BOTÓN
 * ================================================== */
.forgetmenot {
    display: flex;
    align-items: center;
    margin: 20px 0 !important;
}

.forgetmenot label {
    font-size: 0.95rem;
    color: var(--login-text-secondary);
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
    position: relative;
    padding-left: 32px;
}

/* Ocultar checkbox nativo */
.forgetmenot input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    width: 0;
    height: 0;
}

/* Crear checkbox personalizado */
.forgetmenot label::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    border: 2px solid var(--login-border);
    border-radius: 6px;
    background: var(--login-bg-white);
    transition: all 0.3s ease;
}

/* Checkmark (palomita) */
.forgetmenot label::after {
    content: '';
    position: absolute;
    left: 7px;
    top: 50%;
    transform: translateY(-50%) scale(0);
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform-origin: center;
    transition: all 0.2s ease;
}

/* Estado checked */
.forgetmenot input[type="checkbox"]:checked + label::before {
    background: var(--login-primary);
    border-color: var(--login-primary);
    box-shadow: 0 2px 8px rgba(30, 61, 93, 0.3);
}

.forgetmenot input[type="checkbox"]:checked + label::after {
    transform: translateY(-60%) rotate(45deg) scale(1);
}

/* Estado hover */
.forgetmenot label:hover::before {
    border-color: var(--login-primary);
    box-shadow: 0 0 0 3px rgba(30, 61, 93, 0.08);
}

/* Estado focus (accesibilidad) */
.forgetmenot input[type="checkbox"]:focus + label::before {
    outline: 2px solid var(--login-primary);
    outline-offset: 2px;
}

/* Botón principal */
#wp-submit {
    background: var(--login-primary);
    border: none;
    border-radius: var(--login-radius-sm);
    width: 100%;
    height: 48px;
    font-size: 1rem;
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 25px;
    position: relative;
    overflow: hidden;
}

#wp-submit::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

#wp-submit:hover {
    background: var(--login-primary-light);
    box-shadow: var(--login-shadow-md);
    transform: translateY(-1px);
}

#wp-submit:hover::before {
    width: 300px;
    height: 300px;
}

#wp-submit:active {
    transform: translateY(0);
}

/* ==================================================
 * 7. MENSAJES Y NOTIFICACIONES
 * ================================================== */
#login .message,
#login #login_error {
    border-radius: var(--login-radius-sm);
    border: none;
    padding: 16px 20px;
    margin: 0 0 25px 0;
    box-shadow: var(--login-shadow-md);
    font-size: 0.95rem;
    line-height: 1.5;
}

#login #login_error {
    background-color: var(--login-error-bg);
    color: var(--login-error);
    border-left: 4px solid var(--login-error);
}

#login .message {
    background-color: var(--login-success-bg);
    color: var(--login-primary);
    border-left: 4px solid var(--login-primary);
}

/* ==================================================
 * 8. BOTÓN MOSTRAR CONTRASEÑA
 * ================================================== */
.wp-hide-pw,
.dashicons-visibility {
    display: none !important;
}

.wp-pwd {
    position: relative !important;
}

.wp-pwd input {
    padding-right: 55px !important;
}

.custom-password-toggle {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: var(--login-primary);
    opacity: 0.6;
    transition: all 0.3s ease;
    z-index: 10;
    border-radius: 5px;
}

.custom-password-toggle:hover {
    opacity: 1;
    background-color: rgba(30, 61, 93, 0.05);
}

.custom-password-toggle svg {
    display: block;
    width: 20px;
    height: 20px;
}

/* ==================================================
 * 9. ENLACES FOOTER
 * ================================================== */
#nav,
#backtoblog {
    text-align: center;
    margin-top: 20px;
}

#nav {
    margin-top: 25px;
}

#backtoblog {
    margin-top: 15px;
    opacity: 0.7;
}

.login #nav a {
    color: var(--login-primary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 5px 10px;
    border-radius: 5px;
}

.login #nav a:hover {
    color: white;
    background-color: var(--login-primary);
    transform: translateY(-1px);
}

/* ==================================================
 * 10. RESPONSIVE
 * ================================================== */

/* Tablets y Móviles - Mismo diseño (incluye iPad Pro) */
@media screen and (max-width: 1366px) {
    body.login {
        display: block;
        grid-template-columns: none;
        overflow-y: auto;
        overflow-x: hidden;
        background: var(--login-bg-page);
        min-height: 100vh;
        position: relative;
        width: 100%;
    }

    /* === PANTALLA DE BIENVENIDA (Estado inicial en mobile) === */
    .login-welcome-screen {
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 100vh;
        background: linear-gradient(135deg, var(--login-primary-dark) 0%, var(--login-primary) 100%);
        padding: 40px 24px;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        z-index: 100;
        opacity: 1;
        visibility: visible;
        transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                    visibility 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        /* Agregar imagen de fondo igual que el panel izquierdo */
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
    }

    .login-welcome-screen::before {
        content: '';
        position: absolute;
        inset: 0;
        background:
            linear-gradient(135deg, rgba(21, 54, 88, 0.7) 0%, rgba(30, 61, 93, 0.85) 100%),
            url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
        z-index: 1;
    }

    .login-welcome-content {
        position: relative;
        z-index: 2;
        text-align: center;
        width: 100%;
        max-width: 400px;
        animation: fadeIn 0.6s ease-out;
    }

    .login-welcome-screen .login-logo {
        margin-bottom: 32px;
    }

    .login-welcome-screen .login-logo img {
        max-width: 180px;
        height: auto;
        filter: brightness(0) invert(1) drop-shadow(0 4px 12px rgba(0,0,0,0.2));
    }

    .login-welcome-text h2 {
        color: white;
        font-size: 2rem;
        font-weight: 700;
        margin-bottom: 12px;
        letter-spacing: -0.5px;
        text-shadow: 0 2px 12px rgba(0,0,0,0.2);
    }

    .login-welcome-text p {
        color: rgba(255, 255, 255, 0.95);
        font-size: 1.05rem;
        line-height: 1.5;
        margin-bottom: 48px;
        text-shadow: 0 1px 8px rgba(0,0,0,0.15);
    }

    /* Botón "Iniciar Sesión" principal */
    .login-welcome-btn {
        width: 100%;
        max-width: 320px;
        height: 56px;
        background: #1a1a1a;
        color: white;
        border: none;
        border-radius: 16px;
        font-size: 1.05rem;
        font-weight: 700;
        letter-spacing: 0.3px;
        cursor: pointer;
        box-shadow:
            0 8px 24px rgba(0, 0, 0, 0.35),
            0 2px 6px rgba(0, 0, 0, 0.2);
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        margin: 0 auto 20px;
        display: block;
    }

    .login-welcome-btn:active {
        transform: translateY(2px);
        box-shadow:
            0 4px 12px rgba(0, 0, 0, 0.3),
            0 1px 3px rgba(0, 0, 0, 0.15);
    }

    /* Link "¿Olvidaste tu contraseña?" */
    .login-welcome-forgot {
        display: inline-block;
        color: rgba(255, 255, 255, 0.9);
        font-size: 0.9rem;
        text-decoration: none;
        padding: 12px 20px;
        border-radius: 10px;
        transition: all 0.2s ease;
        margin-top: 8px;
    }

    .login-welcome-forgot:active {
        background: rgba(255, 255, 255, 0.1);
    }

    /* === ESTADOS DE TRANSICIÓN === */
    /* Cuando se muestra el formulario */
    body.login-form-active .login-welcome-screen {
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
    }

    body.login-form-active #login {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    /* Cuando se muestra la pantalla de bienvenida */
    body.login-welcome-active .login-welcome-screen {
        opacity: 1;
        visibility: visible;
        pointer-events: all;
    }

    body.login-welcome-active #login {
        opacity: 0;
        visibility: hidden;
        transform: translateY(20px);
    }

    /* Panel superior con branding - OCULTO EN MOBILE */
    .login-left-panel {
        display: none;
    }

    /* === ÁREA DEL FORMULARIO === */
    #login {
        width: 100%;
        max-width: 100%;
        padding: 24px 16px 40px;
        background: var(--login-bg-page);
        display: block;
        position: relative;
        min-height: 100vh;
        opacity: 0;
        visibility: hidden;
        transform: translateY(20px);
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        box-sizing: border-box;
    }

    /* Botón "← Volver" */
    .login-back-btn {
        display: flex;
        align-items: center;
        gap: 8px;
        background: none;
        border: none;
        color: var(--login-text-primary);
        font-size: 0.95rem;
        font-weight: 600;
        padding: 12px 20px;
        margin: 0 0 24px 4px;
        cursor: pointer;
        border-radius: 10px;
        transition: all 0.2s ease;
    }

    .login-back-btn svg {
        width: 20px;
        height: 20px;
    }

    .login-back-btn:active {
        background: rgba(30, 61, 93, 0.06);
        transform: translateX(-2px);
    }

    .login-right-panel-header {
        margin-bottom: 32px;
        text-align: left;
        padding: 0;
        width: 100%;
        max-width: 100%;
    }

    .login-right-panel-header h2 {
        font-size: 1.75rem;
        color: var(--login-text-primary);
        margin-bottom: 8px;
        font-weight: 700;
        letter-spacing: -0.5px;
        line-height: 1.2;
    }

    .login-right-panel-header .subtitle {
        font-size: 1rem;
        color: var(--login-text-secondary);
        line-height: 1.4;
        font-weight: 400;
    }

    /* Formulario - Diseño limpio sin card */
    #loginform {
        margin: 0;
        padding: 0 0 28px;
        background: transparent;
        border: none;
        border-radius: 0;
        box-shadow: none;
        width: 100%;
        max-width: 100%;
        position: relative;
        box-sizing: border-box;
    }

    /* Prevenir overflow de cualquier elemento dentro del formulario */
    #loginform * {
        max-width: 100%;
        box-sizing: border-box;
    }

    /* Etiquetas de campos */
    #loginform label[for="user_login"],
    #loginform label[for="user_pass"] {
        display: block !important;
        font-size: 0.875rem;
        font-weight: 600;
        color: var(--login-text-primary);
        margin-bottom: 8px;
        letter-spacing: -0.1px;
    }

    /* Grupos de campos con espaciado mejorado */
    #loginform p,
    #loginform .user-pass-wrap,
    #loginform .submit {
        margin-bottom: 20px;
        width: 100%;
        box-sizing: border-box;
    }

    /* Inputs con diseño moderno limpio */
    #loginform input[type="text"],
    #loginform input[type="password"],
    #loginform input[type="email"] {
        height: 54px;
        font-size: 16px;
        padding: 0 18px;
        -webkit-appearance: none;
        margin-bottom: 0;
        background: var(--login-bg-input);
        border: 1px solid #e8e8e8;
        border-radius: 14px;
        color: var(--login-text-primary);
        font-weight: 400;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    #loginform input::placeholder {
        color: var(--login-placeholder);
        font-weight: 400;
    }

    #loginform input:focus {
        background: white;
        border-color: var(--login-primary);
        box-shadow:
            0 0 0 4px rgba(30, 61, 93, 0.08),
            0 2px 8px rgba(30, 61, 93, 0.12);
        outline: none;
        transform: translateY(-1px);
    }

    /* Iconos - Ocultos en mobile para diseño limpio */
    #loginform p:first-child::before,
    .user-pass-wrap::before {
        display: none;
    }

    /* Password toggle mejorado */
    .wp-pwd input {
        padding-right: 56px !important;
    }

    .custom-password-toggle {
        right: 14px;
        padding: 12px;
        -webkit-tap-highlight-color: transparent;
        background: transparent;
        border-radius: 8px;
        transition: all 0.2s ease;
    }

    .custom-password-toggle:active {
        background: rgba(30, 61, 93, 0.06);
        transform: scale(0.95);
    }

    /* Checkbox "Recordarme" mejorado */
    .forgetmenot {
        margin: 20px 0 !important;
        display: flex;
        align-items: center;
    }

    .forgetmenot label {
        font-size: 0.95rem;
        color: var(--login-text-primary);
        font-weight: 500;
        padding-left: 34px;
    }

    .forgetmenot label::before {
        width: 22px;
        height: 22px;
        border-radius: 7px;
    }

    .forgetmenot label::after {
        left: 8px;
        width: 6px;
        height: 11px;
    }

    /* Botón submit - Diseño negro como la referencia */
    #wp-submit {
        height: 54px;
        margin-top: 28px;
        font-size: 1rem;
        background: #1a1a1a;
        color: white;
        border: none;
        border-radius: 14px;
        font-weight: 700;
        letter-spacing: 0.3px;
        box-shadow:
            0 6px 20px rgba(0, 0, 0, 0.25),
            0 2px 6px rgba(0, 0, 0, 0.15);
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        width: 100%;
    }

    #wp-submit:active {
        background: #0a0a0a;
        transform: translateY(2px);
        box-shadow:
            0 3px 10px rgba(0, 0, 0, 0.2),
            0 1px 3px rgba(0, 0, 0, 0.1);
    }

    /* Enlaces mejorados */
    #nav,
    #backtoblog {
        margin-top: 20px;
        padding: 0;
        text-align: center;
        width: 100%;
        box-sizing: border-box;
    }

    #nav {
        margin-top: 24px;
    }

    #backtoblog {
        margin-bottom: 24px;
    }

    #nav a,
    #backtoblog a {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 12px 20px;
        font-size: 0.9rem;
        color: var(--login-primary);
        font-weight: 600;
        border-radius: 10px;
        transition: all 0.2s ease;
        background: transparent;
        min-height: 44px;
    }

    #nav a:active,
    #backtoblog a:active {
        background: rgba(30, 61, 93, 0.08);
        transform: scale(0.98);
    }

    /* Mensajes mejorados */
    #login .message,
    #login #login_error {
        margin: 0 0 16px;
        padding: 16px 18px;
        font-size: 0.9rem;
        border-radius: 12px;
        border: none;
        font-weight: 500;
        line-height: 1.5;
        box-shadow: 0 2px 8px rgba(0,0,0,0.06);
        width: 100%;
        box-sizing: border-box;
    }

    #login #login_error {
        background: linear-gradient(135deg, var(--login-error-bg) 0%, #ffe8e8 100%);
        color: var(--login-error);
        border-left: 4px solid var(--login-error);
    }

    #login .message {
        background: linear-gradient(135deg, var(--login-success-bg) 0%, #d4e9ff 100%);
        color: var(--login-primary);
        border-left: 4px solid var(--login-primary);
    }

}

/* Móviles pequeños */
@media screen and (max-width: 480px) {
    .login-left-panel {
        height: 200px;
        padding: 25px 15px 20px;
    }

    .login-left-panel .login-logo img {
        max-width: 140px;
    }

    .login-welcome h2 {
        font-size: 1.35rem;
        margin-bottom: 6px;
    }

    .login-welcome p {
        font-size: 0.9rem;
        line-height: 1.4;
    }

    #login {
        margin-top: -25px;
    }

    .login-right-panel-header {
        margin-bottom: 20px;
        padding: 0;
    }

    .login-right-panel-header h2 {
        font-size: 1.5rem;
    }

    .login-right-panel-header .subtitle {
        font-size: 0.9rem;
    }

    #loginform {
        margin: 0;
        padding: 28px 0 24px;
        border-radius: 0;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    #loginform * {
        max-width: 100%;
        box-sizing: border-box;
    }

    #loginform label[for="user_login"],
    #loginform label[for="user_pass"] {
        font-size: 0.85rem;
        margin-bottom: 7px;
    }

    #loginform p,
    #loginform .user-pass-wrap {
        margin-bottom: 18px;
    }

    #loginform input[type="text"],
    #loginform input[type="password"],
    #loginform input[type="email"] {
        height: 50px;
        padding: 0 16px;
        font-size: 16px;
        border-radius: 11px;
        width: 100%;
    }

    #loginform p:first-child::before,
    .user-pass-wrap::before {
        top: 16px;
        left: 15px;
        width: 19px;
        height: 19px;
    }

    .wp-pwd input {
        padding-right: 54px !important;
    }

    .custom-password-toggle {
        right: 12px;
        padding: 11px;
    }

    .custom-password-toggle svg {
        width: 19px;
        height: 19px;
    }

    #wp-submit {
        height: 50px;
        font-size: 0.95rem;
        margin-top: 20px;
        border-radius: 11px;
    }

    .forgetmenot {
        margin: 16px 0 !important;
    }

    .forgetmenot label {
        font-size: 0.9rem;
        padding-left: 32px;
    }

    .forgetmenot label::before {
        width: 20px;
        height: 20px;
        border-radius: 6px;
    }

    .forgetmenot label::after {
        left: 7px;
        width: 5px;
        height: 10px;
    }

    #nav,
    #backtoblog {
        padding: 0;
        width: 100%;
        box-sizing: border-box;
    }

    #nav a,
    #backtoblog a {
        font-size: 0.875rem;
        padding: 11px 18px;
        border-radius: 9px;
    }

    #login .message,
    #login #login_error {
        margin: 0 0 14px;
        padding: 14px 16px;
        font-size: 0.875rem;
        border-radius: 11px;
        width: 100%;
        box-sizing: border-box;
    }
}

/* Dispositivos táctiles */
@media (hover: none) and (pointer: coarse) {
    #loginform input {
        min-height: 50px;
    }

    .forgetmenot label::before {
        width: 24px;
        height: 24px;
    }

    .forgetmenot label::after {
        left: 9px;
        width: 6px;
        height: 12px;
    }

    #wp-submit {
        min-height: 50px;
    }
}

/* ==================================================
 * 11. ANIMACIONES
 * ================================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

