/* ============================================
           PALETA CORPORATIVA EXPANDIDA (REUTILIZADA)
           ============================================ */
:root {
    --green-primary: #0d6832;
    --green-dark: #0a3d1f;
    --green-darker: #062a14;
    --green-light: #198754;
    --green-lighter: #20c997;
    --green-soft: #d1e7dd;
    --green-bg: #f4f8f5;
    --green-accent: #28a745;
    --gold-primary: #d4af37;
    --gold-light: #f4d03f;
    --gold-soft: #fef5e7;
    --gold-dark: #b8941f;
    --blue-primary: #2c5f7c;
    --blue-light: #3a7ca5;
    --blue-soft: #e3f2fd;
    --blue-dark: #1e3f5a;
    --coral-primary: #e57373;
    --coral-light: #ff8a80;
    --coral-soft: #ffebee;
    --coral-dark: #c62828;
    --purple-primary: #7e57c2;
    --purple-light: #9575cd;
    --purple-soft: #f3e5f5;
    --gray-warm: #5a6c5d;
    --gray-light: #8a9a8d;
    --cream: #fafbfa;
    --off-white: #f8f9f8;
    --shadow-sm: 0 2px 4px rgba(13, 104, 50, 0.08);
    --shadow-md: 0 4px 12px rgba(13, 104, 50, 0.12);
    --shadow-lg: 0 8px 24px rgba(13, 104, 50, 0.18);
    --shadow-gold: 0 4px 12px rgba(212, 175, 55, 0.25);
    --shadow-blue: 0 4px 12px rgba(44, 95, 124, 0.25);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background-color: var(--green-bg);
    color: #2c3e2d;
    overflow-x: hidden;
    min-height: 100vh;
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--green-light), var(--green-primary));
    border-radius: 4px;
}

/* ============================================
           LOGIN LAYOUT
           ============================================ */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: linear-gradient(135deg, var(--green-bg) 0%, var(--cream) 100%);
}

.login-container {
    width: 100%;
    max-width: 1200px;
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    animation: fadeInUp 0.6s ease;
}

/* ============================================
           PANEL IZQUIERDO CON IMAGEN
           ============================================ */
.login-brand-panel {
    position: relative;
    overflow: hidden;
    min-height: 600px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.brand-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.brand-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(10, 61, 31, 0.85) 0%, rgba(6, 42, 20, 0.75) 50%, rgba(30, 63, 90, 0.85) 100%);
    z-index: 2;
}

.brand-content {
    position: relative;
    z-index: 3;
    padding: 3rem 2.5rem;
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 600px;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin-bottom: 2.5rem;
    text-decoration: none;
    color: #fff;
}

.brand-logo-icon {
    background: linear-gradient(135deg, var(--gold-primary), var(--gold-light));
    padding: 0.75rem;
    border-radius: 14px;
    font-size: 1.5rem;
    box-shadow: var(--shadow-gold);
}

.brand-logo-text {
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.brand-logo-sub {
    font-size: 0.75rem;
    color: var(--gold-light);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 600;
}

.brand-title {
    font-size: 2.2rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1rem;
}

.brand-title span {
    color: var(--gold-light);
}

.brand-description {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.6;
    margin-bottom: 2rem;
}

.brand-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.brand-footer {
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.brand-footer-text {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
}

.brand-footer-badges {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* ============================================
           PANEL DERECHO (FORMULARIO)
           ============================================ */
.login-form-panel {
    padding: 3rem 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: linear-gradient(135deg, #fff 0%, var(--cream) 100%);
}

.form-header {
    margin-bottom: 2rem;
}

.form-title {
    font-size: 1.75rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--green-dark), var(--green-primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.form-subtitle {
    color: var(--gray-warm);
    font-size: 0.95rem;
    margin: 0;
}

.form-footer {
    margin-top: 2rem;
    text-align: center;
    color: var(--gray-warm);
    font-size: 0.9rem;
}

.form-footer a {
    color: var(--green-primary);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.form-footer a:hover {
    color: var(--gold-primary);
}

.copyright {
    text-align: center;
    color: var(--gray-light);
    font-size: 0.8rem;
    margin-top: 1.5rem;
}

/* ============================================
           BOTONES Y COMPONENTES (REUTILIZADOS)
           ============================================ */
.btn-green {
    background: linear-gradient(135deg, var(--green-primary), var(--green-light));
    color: #fff;
    border: none;
    padding: 0.75rem 1.25rem;
    border-radius: 10px;
    font-weight: 600;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    width: 100%;
}

.btn-green:hover {
    background: linear-gradient(135deg, var(--green-dark), var(--green-primary));
    color: #fff;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-soft-green {
    background: var(--green-soft);
    color: var(--green-dark);
    border: none;
    padding: 0.65rem 1.25rem;
    border-radius: 10px;
    font-weight: 600;
    transition: var(--transition);
}

.btn-soft-green:hover {
    background: var(--green-primary);
    color: #fff;
}

.form-label-custom {
    font-weight: 600;
    color: var(--green-dark);
    font-size: 0.88rem;
    margin-bottom: 0.4rem;
}

.form-control-custom {
    border: 1.5px solid #dee2e6;
    border-radius: 10px;
    padding: 0.75rem 1rem;
    transition: var(--transition);
    font-size: 0.95rem;
    background: #fff;
}

.form-control-custom:focus {
    border-color: var(--gold-primary);
    box-shadow: 0 0 0 0.2rem rgba(212, 175, 55, 0.15);
}

.input-group-text-custom {
    background: linear-gradient(135deg, var(--green-soft), var(--gold-soft));
    border: 1.5px solid var(--green-soft);
    color: var(--green-dark);
    border-radius: 10px 0 0 10px;
    padding: 0.75rem 1rem;
}

.input-group .form-control-custom {
    border-radius: 0 10px 10px 0;
}

.badge-green {
    background: linear-gradient(135deg, var(--green-primary), var(--green-light));
    color: #fff;
    padding: 0.4rem 0.75rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.72rem;
}

.badge-gold {
    background: linear-gradient(135deg, var(--gold-primary), var(--gold-light));
    color: #fff;
    padding: 0.4rem 0.75rem;
    border-radius: 6px;
    font-weight: 600;
    box-shadow: var(--shadow-gold);
    font-size: 0.72rem;
}

.badge-blue {
    background: linear-gradient(135deg, var(--blue-primary), var(--blue-light));
    color: #fff;
    padding: 0.4rem 0.75rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.72rem;
}

/* ============================================
           ANIMACIONES
           ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
           RESPONSIVE
           ============================================ */
@media (max-width: 991.98px) {
    .login-container {
        max-width: 600px;
    }

    .login-brand-panel {
        min-height: auto;
        height: 150px;
    }

    .brand-content {
        min-height: auto;
        height: 100%;
        padding: 1.5rem;
        justify-content: center;
    }

    .brand-logo {
        margin-bottom: 0;
    }

    .brand-title {
        font-size: 1.75rem;
    }
}

@media (max-width: 575.98px) {
    .login-wrapper {
        padding: 0;
    }

    .login-container {
        border-radius: 0;
        min-height: 100vh;
    }

    .login-form-panel {
        padding: 2rem 1.5rem;
    }

    .brand-content {
        min-height: auto;
        padding: 1.25rem;
    }
}