/* ========================================
   LOGIN PAGE - ESTILOS INDEPENDIENTES
   ======================================== */

/* Reset global */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body.layout-auth {
    padding: 0;
    margin: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: #ffffff;
}

/* Contenedor principal */
.layout-auth .auth-wrapper {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    flex: 1;
    display: grid;
    grid-template-columns: 55% 45%;
    background: #ffffff;
    box-sizing: border-box;
    overflow: hidden;
}

.layout-auth .auth-card {
    width: 100%;
    margin: 0;
    border-radius: 0;
    box-shadow: none;
    border: none;
    padding: 0;
    background: transparent;
    display: contents;
    gap: 0;
}

.auth-layout {
    display: contents;
}

/* ========================================
   SECCIÓN HERO (IZQUIERDA)
   ======================================== */
.auth-hero {
    background: linear-gradient(135deg, #1e3a5f 0%, #2d5a8c 50%, #1a2f4a 100%);
    color: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 3.5rem 3rem;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
}

/* Efectos visuales sutiles de fondo */
.auth-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -30%;
    width: 700px;
    height: 700px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.auth-hero::after {
    content: '';
    position: absolute;
    bottom: -40%;
    left: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(34, 197, 94, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.auth-hero > div {
    position: relative;
    z-index: 2;
}

.auth-hero__logo {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 3rem;
}

.auth-hero__mark {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.15);
    border: 1.5px solid rgba(255, 255, 255, 0.3);
    font-weight: 800;
    font-size: 1.1rem;
    color: #ffffff;
}

.auth-hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.75rem;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    border: 1px solid rgba(34, 197, 94, 0.5);
    background: rgba(34, 197, 94, 0.15);
    color: #86efac;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.auth-hero__title {
    font-size: 2.5rem;
    line-height: 1.25;
    margin: 0 0 1.2rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.01em;
}

.auth-hero__subtitle {
    margin: 0 0 2.2rem;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.7;
    max-width: 90%;
    font-weight: 400;
}

.auth-hero__list {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
}

.auth-hero__list li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1.1rem;
    line-height: 1.6;
    font-weight: 400;
}

.auth-hero__list i {
    flex-shrink: 0;
    margin-top: 0.2rem;
    color: #22c55e;
    font-size: 1.1rem;
}

/* ========================================
   SECCIÓN FORMULARIO (DERECHA)
   ======================================== */
.auth-panel {
    background: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2.5rem 2.5rem;
    box-sizing: border-box;
    gap: 1.5rem;
    max-width: none;
    margin: 0;
}

.auth-intro {
    width: 100%;
    max-width: 360px;
}

.auth-intro__title {
    font-size: 1.6rem;
    margin: 0 0 0.5rem;
    font-weight: 700;
    color: #1f2937;
    letter-spacing: -0.01em;
}

.auth-intro__subtitle {
    margin: 0;
    font-size: 0.9rem;
    color: #6b7280;
    line-height: 1.6;
    font-weight: 400;
}

.auth-form {
    width: 100%;
    max-width: 360px;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.auth-field {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 0.7rem;
}

.auth-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #374151;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.auth-input {
    width: 100%;
    border-radius: 8px;
    border: 1.5px solid #e5e7eb;
    background: #f9fafb;
    padding: 0.85rem 1rem;
    font-size: 0.95rem;
    color: #1f2937;
    transition: all 0.2s ease;
    box-sizing: border-box;
    font-weight: 400;
    font-family: inherit;
}

.auth-input::placeholder {
    color: #9ca3af;
}

.auth-input:focus {
    outline: none;
    border-color: #3b82f6;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.auth-remember {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.88rem;
    color: #4b5563;
    margin-bottom: 1rem;
    font-weight: 400;
}

.auth-checkbox-input {
    width: 18px;
    height: 18px;
    border-radius: 6px;
    border: 1.5px solid #d1d5db;
    accent-color: #3b82f6;
    cursor: pointer;
    transition: all 0.2s ease;
}

.auth-checkbox-input:hover {
    border-color: #3b82f6;
}

.auth-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
    margin-top: 0.5rem;
}

.auth-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 1rem 1.6rem;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.25);
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    transition: all 0.2s ease;
    font-family: inherit;
}

.auth-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 28px rgba(59, 130, 246, 0.35);
}

.auth-submit:active {
    transform: translateY(0);
}

.auth-submit i {
    font-size: 1rem;
    margin-right: 0.5rem;
}

.auth-secondary-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.82rem;
    color: #6b7280;
    font-weight: 400;
}

.auth-link {
    color: #3b82f6;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease;
}

.auth-link:hover {
    color: #2563eb;
}

.auth-alert {
    width: 100%;
    max-width: 360px;
    padding: 0.95rem 1rem;
    border-radius: 8px;
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: #991b1b;
    font-size: 0.87rem;
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}

.auth-alert--error {
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.25);
    color: #991b1b;
}

.auth-alert i {
    flex-shrink: 0;
    margin-top: 0.1rem;
    font-size: 1rem;
}

.auth-alert__body {
    flex: 1;
}

.auth-alert__body p {
    margin: 0;
    line-height: 1.5;
}

.auth-field__errors {
    margin: 0;
    color: #dc2626;
    font-size: 0.78rem;
    list-style: none;
    padding: 0;
    font-weight: 500;
}

.auth-error-text {
    margin: 0.25rem 0 0;
}

.auth-messages {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    width: 100%;
    max-width: 360px;
}

/* Ocultar footer global */
.auth-footer {
    display: none;
}

/* Ocultar header del card */
.auth-card__header {
    display: none;
}

/* ========================================
   RESPONSIVE: TABLET (1024px y menor)
   ======================================== */
@media (max-width: 1024px) {
    .layout-auth .auth-wrapper {
        grid-template-columns: 50% 50%;
    }

    .auth-hero {
        padding: 3rem 2.5rem;
    }

    .auth-panel {
        padding: 2.5rem 2rem;
    }

    .auth-hero__title {
        font-size: 2rem;
    }

    .auth-intro__title {
        font-size: 1.5rem;
    }
}

/* ========================================
   RESPONSIVE: MÓVIL (768px y menor)
   ======================================== */
@media (max-width: 768px) {
    .layout-auth .auth-wrapper {
        grid-template-columns: 1fr;
    }

    .auth-hero {
        display: none;
    }

    .auth-panel {
        padding: 2rem 1.5rem;
        justify-content: flex-start;
        padding-top: 2.5rem;
    }

    .auth-intro {
        max-width: 100%;
    }

    .auth-form {
        max-width: 100%;
    }

    .auth-intro__title {
        font-size: 1.4rem;
    }

    .auth-alert {
        max-width: 100%;
    }

    .auth-messages {
        max-width: 100%;
    }
}

/* ========================================
   RESPONSIVE: MÓVIL PEQUEÑO (480px y menor)
   ======================================== */
@media (max-width: 480px) {
    .auth-panel {
        padding: 1.5rem 1.2rem;
        padding-top: 2rem;
    }

    .auth-intro__title {
        font-size: 1.25rem;
    }

    .auth-submit {
        padding: 0.9rem 1.4rem;
        font-size: 0.9rem;
    }

    .auth-label {
        font-size: 0.75rem;
    }

    .auth-input {
        padding: 0.8rem 0.9rem;
        font-size: 0.9rem;
    }
}

/* ========================================
   DARK MODE
   ======================================== */
.layout-auth.layout-dark .auth-hero {
    background: linear-gradient(135deg, #0f172a 0%, #1a2f4a 50%, #0a0e27 100%);
}

.layout-auth.layout-dark .auth-panel {
    background: #1b2036;
}

.layout-auth.layout-dark .auth-intro__title {
    color: #f3f4f6;
}

.layout-auth.layout-dark .auth-intro__subtitle {
    color: #d1d5db;
}

.layout-auth.layout-dark .auth-input {
    background: #222946;
    border-color: #2f3656;
    color: #f3f4f6;
}

.layout-auth.layout-dark .auth-input:focus {
    border-color: #3b82f6;
    background: #1b2036;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.layout-auth.layout-dark .auth-label {
    color: #d1d5db;
}

.layout-auth.layout-dark .auth-remember {
    color: #9ca3af;
}

.layout-auth.layout-dark .auth-secondary-actions {
    color: #9ca3af;
}
