@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;1,400&family=Inter:wght@300;400;500;600&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ==================== FONDO ANIMADO AZUL ==================== */
.login-fullscreen {
    min-height: 100vh;
    width: 100%;
    /* Fondo animado tipo cielo: azul medio, sin ser muy claro ni muy oscuro */
    background: linear-gradient(-45deg,
        #0b1f3b 0%,
        #163a63 25%,
        #245f8f 50%,
        #1f4e79 75%,
        #0b1f3b 100%);
    background-size: 400% 400%;
    animation: gradientBG 10s ease-in-out infinite;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    font-family: 'Inter', sans-serif;
    position: relative;
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Partículas decorativas */
.login-fullscreen::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(circle at 20% 80%, rgba(248,120,6,0.18) 0%, transparent 55%),
        radial-gradient(circle at 80% 20%, rgba(255,255,255,0.10) 0%, transparent 55%),
        radial-gradient(circle at 40% 40%, rgba(255,255,255,0.06) 0%, transparent 35%);
    pointer-events: none;
    z-index: 0;
}

.login-container {
    display: flex;
    max-width: 1100px; /* más ancho que antes (950px) */
    width: 100%;
    min-height: 520px;
    border-radius: 1.5rem;
    overflow: hidden;
    box-shadow: 0 1.5rem 3rem -0.75rem rgba(0, 0, 0, 0.35);
    position: relative;
    z-index: 1;
    animation: slideUp 0.6s ease-out;
}

/* Barra luminosa inferior del contenedor */
.login-container::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 4px;
    background: linear-gradient(90deg, #f87806 0%, #002b5c 50%, #f87806 100%);
    opacity: 0.95;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(1.875rem); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==================== SECCIÓN IZQUIERDA - WELCOME ==================== */
.welcome-section {
    flex: 1;
    /* Degradado azul oscuro institucional */
    background: linear-gradient(135deg,
        #000814 0%,
        #001d3d 25%,
        #003566 55%,
        #001d3d 80%,
        #000814 100%);
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: #fff;
    position: relative;
}

.welcome-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(circle at 30% 70%, rgba(255,255,255,0.1) 0%, transparent 50%),
        radial-gradient(circle at 70% 30%, rgba(255,255,255,0.05) 0%, transparent 40%);
    pointer-events: none;
}

.welcome-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.logo-container {
    width: 5rem;
    height: 5rem;
    background: white;
    border-radius: 50%;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0.5rem 1.5rem rgba(0,0,0,0.15);
}

.logo-container img {
    width: 3.75rem;
    height: 3.75rem;
    border-radius: 50%;
    object-fit: cover;
}

.welcome-title {
    font-size: 2.5rem;
    font-weight: 600;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: #fff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.welcome-subtitle {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.6;
    margin-bottom: 2rem;
    max-width: 300px;
}

.welcome-footer {
    margin-top: auto; /* Empuja subtítulo + redes hacia la parte inferior */
}

.welcome-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #ffe9d3;
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}

.welcome-badge-dot {
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 50%;
    background: #f87806;
    box-shadow: 0 0 8px rgba(248, 120, 6, 0.9);
}

.social-icons {
    display: flex;
    gap: 1rem;
}

.social-icons a {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: rgba(0,0,0,0.35);
    border: 1px solid rgba(255,255,255,0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1rem;
    transition: all 0.3s ease;
    text-decoration: none;
}

.social-icons a:hover {
    background: #f87806;
    border-color: #f87806;
    transform: translateY(-0.125rem) scale(1.03);
    box-shadow: 0 0.25rem 0.9rem rgba(0,0,0,0.45);
}

/* ==================== SECCIÓN DERECHA - FORMULARIO ==================== */
.form-section {
    flex: 1;
    background: rgba(255, 255, 255, 0.98);
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: #111111;
    position: relative;
}

/* Sutil línea divisoria entre panel naranja y formulario */
.form-section::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10%;
    bottom: 10%;
    width: 1px;
    background: linear-gradient(to bottom, transparent, rgba(0,0,0,0.15), transparent);
}

.form-title {
    font-size: 1.75rem;
    font-weight: 600;
    color: #002b5c; /* azul oscuro */
    margin-bottom: 0.5rem;
    text-align: left;
}

.form-subtitle {
    color: #444444;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

/* ==================== CAMPOS DE FORMULARIO ==================== */
.form-group {
    margin-bottom: 1.25rem;
    position: relative;
}

.form-label {
    display: block;
    font-size: 0.85rem;
    color: #616161;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-section .ui-inputfield {
    width: 100% !important;
    padding: 0.875rem 1rem 0.875rem 2.75rem !important;
    background: #fafafa !important;
    border: 2px solid #e0e0e0 !important;
    border-radius: 0.625rem !important;
    color: #333 !important;
    font-size: 0.95rem !important;
    transition: all 0.3s ease !important;
}

.form-section .ui-inputfield:focus {
    border-color: #f87806 !important; /* naranja principal */
    background: white !important;
    box-shadow: 0 0 0 3px rgba(248, 120, 6, 0.22) !important;
    outline: none !important;
}

.form-section .ui-password {
    width: 100% !important;
}

.form-section .ui-password input {
    width: 100% !important;
    padding: 0.875rem 2.5rem 0.875rem 2.75rem !important;
    background: #fafafa !important;
    border: 2px solid #e0e0e0 !important;
    border-radius: 0.625rem !important;
    color: #333 !important;
    font-size: 0.95rem !important;
}

.form-section .ui-password input:focus {
    border-color: #f87806 !important;
    background: white !important;
    box-shadow: 0 0 0 3px rgba(248, 120, 6, 0.22) !important;
}

.input-icon {
    position: absolute;
    left: 1rem;
    top: 2.4rem;
    color: #90a4ae;
    font-size: 1rem;
    transition: color 0.3s ease;
    pointer-events: none;
    z-index: 3; /* asegurar que quede por encima del campo de contraseña */
}

.form-group:focus-within .input-icon {
    color: #f87806;
}

/* ==================== REMEMBER ME ==================== */
.remember-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.remember-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.remember-check label {
    color: #616161;
    font-size: 0.875rem;
    cursor: pointer;
}

.forgot-inline {
    color: #f87806;
    font-size: 0.85rem;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.forgot-inline:hover {
    color: #c95c00;
    text-decoration: underline;
}

/* ==================== BOTONES ==================== */
.btn-signin {
    width: 100%;
    padding: 0.9rem !important;
    background: linear-gradient(135deg, #f87806 0%, #e36800 100%) !important;
    border: none !important;
    border-radius: 0.625rem !important;
    color: #ffffff !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    cursor: pointer;
    transition: all 0.3s ease !important;
    box-shadow: 0 0.25rem 0.9375rem rgba(0, 0, 0, 0.35) !important;
}

.btn-signin:hover {
    background: linear-gradient(135deg, #e36800 0%, #c95c00 100%) !important;
    transform: translateY(-0.125rem);
    box-shadow: 0 0.375rem 1.25rem rgba(0, 0, 0, 0.45) !important;
}

/* ==================== SEPARADOR ==================== */
.divider {
    display: flex;
    align-items: center;
    margin: 1.5rem 0;
    color: #9e9e9e;
    font-size: 0.8rem;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, #e0e0e0, transparent);
}

.divider span {
    padding: 0 0.75rem;
}

/* ==================== TÉRMINOS ==================== */
.terms-text {
    text-align: center;
    font-size: 0.75rem;
    color: #9e9e9e;
    margin-top: 1.5rem;
    line-height: 1.5;
}

.terms-text a {
    color: #f87806;
    text-decoration: none;
}

.terms-text a:hover {
    text-decoration: underline;
}

/* ==================== REGISTRO ==================== */
.register-section {
    margin-top: 1rem;
}

.register-text {
    text-align: center;
    color: #757575;
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
}

.btn-register {
    width: 100%;
    padding: 0.8rem !important;
    background: transparent !important;
    border: 2px solid #e0e0e0 !important;
    border-radius: 0.625rem !important;
    color: #616161 !important;
    font-size: 0.9rem !important;
    font-weight: 500 !important;
    transition: all 0.3s ease !important;
}

.btn-register:hover {
    background: #fff9f1 !important;
    border-color: #f87806 !important;
    color: #f87806 !important;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
    .login-fullscreen {
        padding: 1rem;
    }

    .login-container {
        flex-direction: column;
        max-width: 100%;
        border-radius: 1.25rem;
    }

    .welcome-section {
        padding: 2rem;
        text-align: center;
    }

    .welcome-content {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .welcome-title {
        font-size: 2.25rem;
    }
 .welcome2-title {
        font-size: 1.50rem;
    }
    .welcome-subtitle {
        max-width: 100%;
        text-align: center;
    }

    .social-icons {
        justify-content: center;
    }

    .form-section {
        padding: 2rem 1.5rem;
    }

    .form-title {
        text-align: center;
    }

    .form-subtitle {
        text-align: center;
    }
}

/* ==================== GROWL ==================== */
.ui-growl {
    position: fixed !important;
    top: 1.25rem;
    right: 1.25rem;
    z-index: 9999;
}

/* PrimeFaces overrides */
.form-section .ui-button {
    border-radius: 0.625rem !important;
}

.form-section .ui-selectbooleancheckbox .ui-chkbox-box {
    border-radius: 0.25rem;
    border: 2px solid #e0e0e0;
}

.form-section .ui-selectbooleancheckbox .ui-chkbox-box.ui-state-active {
    background: #f87806;
    border-color: #f87806;
}
