
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
  --tl-azul-principal: #002749;
  --tl-naranja-acento: #ff6b35; 
  --tl-naranja-opaco: #FF8C00;
  --tl-gris-neutro: #6c757d; 
  --tl-blanco-puro: #ffffff; 
}

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

html, body {
    height: 100%;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
}

input[type="password"]::-ms-reveal,
input[type="password"]::-ms-clear {
  display: none;
}

input[type="password"]::-webkit-credentials-auto-fill-button,
input[type="password"]::-webkit-password-toggle {
  display: none;
}


/* ===========================================
   SPLASH SCREEN
   =========================================== */
.splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #002749;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.splash-screen.fade-out {
    animation: splashFadeOut 0.6s ease forwards;
}

.splash-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: splashEntry 0.8s ease-out;
}

.splash-logo img {
    width: 90px;
    height: 90px;
    object-fit: contain;
    margin-bottom: 20px;
}

.splash-logo span {
    color: white;
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

@keyframes splashEntry {
    0% { opacity: 0; transform: scale(0.8); }
    50% { transform: scale(1.05); }
    100% { opacity: 1; transform: scale(1); }
}

@keyframes splashFadeOut {
    to { opacity: 0; visibility: hidden; }
}

/* ===========================================
   CONTENEDOR PRINCIPAL
   =========================================== */
.login-wrapper {
    display: none;
    min-height: 100vh;
}

.login-wrapper.visible {
    display: block;
    animation: fadeIn 0.5s ease;
}

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

/* ===========================================
   VERSIÓN MÓVIL
   =========================================== */
.login-mobile {
    min-height: 100vh;
    background: linear-gradient(180deg, #002749 0%, #003d6b 100%);
    display: flex;
    flex-direction: column;
    padding: 60px 32px 40px;
}

.mobile-logo-section {
    text-align: center;
    margin-bottom: 50px;
    animation: slideDown 0.6s ease-out 0.1s backwards;
}

.mobile-logo-section img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    margin-bottom: 16px;
}

.mobile-logo-section h1 {
    color: white;
    font-size: 1.6rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.mobile-form {
    flex: 1;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.6s ease-out 0.2s backwards;
}

/* Selector de cuenta móvil */
.account-toggle {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 40px;
}

.toggle-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    padding: 8px 0;
    position: relative;
    transition: color 0.3s ease;
}

.toggle-btn.active {
    color: white;
}

.toggle-btn.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: #ff6b35;
    border-radius: 2px;
}

/* Inputs móvil */
.input-group {
    margin-bottom: 28px;
    position: relative;
}

.input-label {
    display: block;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.input-field {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    padding: 10px 40px 10px 0;
    font-family: inherit;
    font-size: 1.1rem;
    color: white;
    transition: border-color 0.3s ease;
}

.input-field:focus {
    outline: none;
    border-bottom-color: white;
}

.input-field::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.input-icon {
    position: absolute;
    right: 0;
    bottom: 12px;
    color: rgba(255, 255, 255, 0.4);
    font-size: 1.2rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.input-icon.valid {
    color: #4ade80;
}

/* Botón móvil */
.btn-login {
    width: 100%;
    padding: 16px 24px;
    background: white;
    color: #002749;
    border: none;
    border-radius: 30px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 20px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 56px;
}

.btn-login:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.btn-login:disabled {
    cursor: not-allowed;
    transform: none;
}

.btn-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(0, 39, 73, 0.2);
    border-top-color: #002749;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Mensaje dinámico móvil */
.dynamic-message-mobile {
    text-align: center;
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.dynamic-message-mobile p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
    margin-bottom: 6px;
}

.dynamic-message-mobile a {
    color: #ff6b35;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.dynamic-message-mobile a:hover {
    color: #ff8c5a;
    text-decoration: underline;
}

.dynamic-message-mobile .info-text {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.82rem;
    font-style: italic;
}

/* Link inferior móvil */
.bottom-link {
    text-align: center;
    margin-top: auto;
    padding-top: 30px;
}

.bottom-link a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: color 0.3s ease;
}

.bottom-link a:hover {
    color: white;
}

.bottom-link a:hover i {
    transform: translateX(4px);
}

.bottom-link a i {
    transition: transform 0.3s ease;
}

/* Ocultar desktop en móvil */
.login-desktop {
    display: none;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-30px); }
    to { opacity: 1; transform: translateY(0); }
}

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

/* ===========================================
   VERSIÓN DESKTOP (768px)
   =========================================== */
@media (min-width: 768px) {
    .login-mobile {
        display: none;
    }
    
    .login-desktop {
        display: flex;
        flex-direction: column;
        min-height: 100vh;
        background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    }
    
    /* ===== NAVBAR ===== */
    .desktop-navbar {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 16px 40px;
        background: white;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
        position: relative;
        z-index: 100;
    }
    
    .navbar-brand {
        display: flex;
        align-items: center;
        gap: 10px;
        text-decoration: none;
    }
    
    .navbar-brand img {
        height: 38px;
        width: auto;
    }
    
    .navbar-brand span {
        font-size: 1.15rem;
        font-weight: 700;
        color: #002749;
    }
    
    .navbar-links {
        display: flex;
        align-items: center;
        gap: 8px;
    }
    
    .navbar-links a {
        color: #64748b;
        text-decoration: none;
        font-size: 0.9rem;
        font-weight: 500;
        padding: 10px 18px;
        border-radius: 8px;
        transition: all 0.25s ease;
    }
    
    .navbar-links a:hover {
        color: #002749;
        background: #f1f5f9;
    }
    
    .navbar-links a.active {
        color: #002749;
        background: rgba(0, 39, 73, 0.08);
    }
    
    .navbar-links .btn-register {
        background: #ff6b35;
        color: white;
        padding: 10px 22px;
        border-radius: 8px;
        margin-left: 10px;
        font-weight: 600;
    }
    
    .navbar-links .btn-register:hover {
        background: #e55a2b;
        color: white;
    }
    
    /* ===== CONTENIDO PRINCIPAL ===== */
    .desktop-main {
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 30px 40px;
    }
    
    .desktop-card {
        display: flex;
        width: 100%;
        max-width: 950px;
        min-height: 520px;
        background: white;
        border-radius: 20px;
        box-shadow: 0 25px 80px rgba(0, 39, 73, 0.12);
        overflow: visible;
        animation: fadeInUp 0.6s ease-out;
        position: relative;
    }
    
    /* ===== PANEL IZQUIERDO ===== */
   
.desktop-panel-left {
    flex: 0 0 38%;
    background: var(--tl-azul-principal);
    border-radius: 20px 0 0 20px;
    padding: 40px 30px 40px 35px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    z-index: 2;
}

/* Overlay azul sobre la ilustración */
.desktop-panel-left::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        170deg,
        rgba(0, 39, 73, 0.0) 0%,
        rgba(0, 39, 73, 0.4) 50%,
        rgba(0, 39, 73, 0.85) 100%
    );
    z-index: 1;
    pointer-events: none;
}

.desktop-panel-left::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(
        circle,
        rgba(255, 255, 255, 0.04) 1px,
        transparent 1px
    );
    background-size: 20px 20px;
    z-index: 1;
    pointer-events: none;
}

/* Contenedor de la ilustración */
.panel-illustration {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 0;
    overflow: hidden;
}

.panel-illustration img {
    width: 90%;
    height: auto;
    max-height: 75%;
    opacity: 0.12;
    object-fit: contain;
}

    
    /* Redes*/
    .panel-social {
        position: relative;
        z-index: 5;
    }
    
    .panel-social-title {
        color: white;
        font-size: 0.85rem;
        font-weight: 600;
        margin-bottom: 14px;
    }
    
    .social-links {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }
    
    .social-link {
        display: flex;
        align-items: center;
        gap: 10px;
        color: rgba(255, 255, 255, 0.75);
        text-decoration: none;
        font-size: 0.85rem;
        transition: all 0.3s ease;
    }
    
    .social-link:hover {
        color: white;
        transform: translateX(4px);
    }
    
    .social-link i {
        font-size: 1rem;
        width: 20px;
    }
    
    .panel-tabs-container {
        position: absolute;
        right: -1px;
        top: 50%;
        transform: translateY(-50%);
        z-index: 10;
    }
    
    .panel-tab {
        display: block;
        background: transparent;
        border: none;
        color: rgba(255, 255, 255, 0.6);
        font-family: inherit;
        font-size: 0.95rem;
        font-weight: 500;
        padding: 16px 28px;
        cursor: pointer;
        transition: all 0.3s ease;
        text-align: left;
        position: relative;
        border-radius: 0;
    }
    
    .panel-tab:hover:not(.active) {
        color: rgba(255, 255, 255, 0.85);
    }
    
    /* Tab activo*/
    .panel-tab.active {
        background: white;
        color: #ff6b35;
        font-weight: 600;
        border-radius: 12px 0 0 12px;
        box-shadow: -5px 0 20px rgba(0, 0, 0, 0.08);
        padding-right: 35px;
        margin-right: -1px;
    }
    
    /* Footer del panel */
    .panel-footer {
        position: relative;
        z-index: 5;
        color: rgba(255, 255, 255, 0.45);
        font-size: 0.72rem;
    }
    
    /* ===== PANEL DERECHO (Formulario) ===== */
    .desktop-panel-right {
        flex: 1;
        padding: 45px 50px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        position: relative;
        z-index: 1;
        background: white;
        border-radius: 0 20px 20px 0;
    }
    
    .form-header {
        text-align: center;
        margin-bottom: 28px;
    }
    
    .form-header-icon {
        width: 55px;
        height: 55px;
        margin: 0 auto 14px;
        background: linear-gradient(135deg, rgba(0, 39, 73, 0.08), rgba(255, 107, 53, 0.08));
        border-radius: 14px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .form-header-icon img {
        width: 34px;
        height: 34px;
    }
    
    .form-header h2 {
        color: #002749;
        font-size: 1.4rem;
        font-weight: 700;
        margin-bottom: 4px;
    }
    
    .form-header p {
        color: #64748b;
        font-size: 0.88rem;
    }
    
    /* Selector en formulario */
    .desktop-form-container .account-toggle {
        justify-content: center;
        gap: 32px;
        margin-bottom: 28px;
    }
    
    .desktop-form-container .toggle-btn {
        color: #94a3b8;
        font-size: 0.9rem;
    }
    
    .desktop-form-container .toggle-btn.active {
        color: #002749;
    }
    
    .desktop-form-container .toggle-btn.active::after {
        background: #002749;
    }
    
    /* Inputs desktop */
    .desktop-form-container .input-group {
        margin-bottom: 22px;
        max-width: 350px;
        margin-left: auto; 
        margin-right: auto;
    }
    
    .desktop-form-container .input-label {
        color: #64748b;
        font-size: 0.72rem;
    }
    
    .desktop-form-container .input-field {
        color: #1a202c;
        border-bottom-color: #e2e8f0;
        padding: 12px 40px 12px 0;
        font-size: 1rem;
        width: 100%;
    }
    
    .desktop-form-container .input-field:focus {
        border-bottom-color: #002749;
    }
    
    .desktop-form-container .input-field::placeholder {
        color: #a0aec0;
    }
    
    .desktop-form-container .input-icon {
        color: #cbd5e1;
        bottom: 14px;
        right: 0;
    }
    
    .desktop-form-container .input-icon.valid {
        color: #4ade80;
    }
    
    /* Botón desktop */
    .desktop-form-container .btn-login {
        background: linear-gradient(135deg, #ff6b35, #ff8c5a);
        color: white;
        border-radius: 10px;
        margin-top: 8px;
        min-height: 48px;
        font-size: 0.9rem;
        max-width: 240px;
        margin-left: auto;
        margin-right: auto;
        padding: 12px 24px;
    }
    
    .desktop-form-container .btn-login:hover {
        background: linear-gradient(135deg, #e55a2b, #ff6b35);
        box-shadow: 0 8px 25px rgba(255, 107, 53, 0.35);
    }
    
    .desktop-form-container .btn-spinner {
        border-color: rgba(255, 255, 255, 0.3);
        border-top-color: white;
    }
    
    /* Links desktop */
    .desktop-links {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-top: 20px;
        font-size: 0.85rem;
    }
    
    .desktop-links a {
        color: #64748b;
        text-decoration: none;
        transition: color 0.3s ease;
    }
    
    .desktop-links a:hover {
        color: #ff6b35;
    }
    
    .desktop-links .support-link {
        display: flex;
        align-items: center;
        gap: 6px;
    }
    
    /* Mensaje dinámico desktop */
    .dynamic-message-desktop {
        text-align: center;
        margin-top: 24px;
        padding-top: 20px;
        border-top: 1px solid #e2e8f0;
    }
    
    .dynamic-message-desktop p {
        color: #64748b;
        font-size: 0.88rem;
        margin-bottom: 4px;
    }
    
    .dynamic-message-desktop a {
        color: #ff6b35;
        text-decoration: none;
        font-weight: 600;
        font-size: 0.9rem;
        transition: color 0.3s ease;
    }
    
    .dynamic-message-desktop a:hover {
        color: #e55a2b;
        text-decoration: underline;
    }
    
    .dynamic-message-desktop .info-text {
        color: #94a3b8;
        font-size: 0.82rem;
        font-style: italic;
    }
    
    @keyframes fadeInUp {
        from { opacity: 0; transform: translateY(20px); }
        to { opacity: 1; transform: translateY(0); }
    }
}

/* Desktop grande */
@media (min-width: 1024px) {
    .desktop-navbar {
        padding: 18px 60px;
    }
    
    .desktop-main {
        padding: 35px 60px;
    }
    
    .desktop-card {
        max-width: 1000px;
        min-height: 540px;
    }
    
    .desktop-panel-left {
        padding: 45px 35px 45px 40px;
    }
    
    .desktop-panel-right {
        padding: 50px 55px;
    }
    
    .panel-tab {
        font-size: 1rem;
        padding: 18px 32px;
    }
    
    .panel-tab.active {
        padding-right: 40px;
    }
}

/* ===========================================
   SWEETALERT2
   =========================================== */
.swal2-popup {
    border-radius: 16px !important;
    font-family: 'Poppins', sans-serif !important;
}

.swal2-title {
    color: #002749 !important;
    font-weight: 600 !important;
}

.swal2-confirm {
    background: #ff6b35 !important;
    border-radius: 8px !important;
    font-weight: 500 !important;
    padding: 12px 28px !important;
}