:root {
    /* Colores corporativos extraídos del logo de Innoges / Innovation Studio */
    --brand-primary: #1FB090;
    --brand-primary-hover: #18987b;
    --brand-primary-light: rgba(31, 176, 144, 0.12);
    --brand-primary-glow: rgba(31, 176, 144, 0.28);
    --brand-navy: #162c4b;
    --brand-dark: #0f1d30;
    --brand-text-dark: #1e293b;
    --brand-text-muted: #64748b;
    
    /* Degradado de botones y acentos */
    --brand-gradient: linear-gradient(135deg, #1FB090 0%, #15856c 100%);
    --brand-gradient-hover: linear-gradient(135deg, #25c7a4 0%, #179579 100%);
    
    /* Overlay del panel derecho estilo Licita pero con los colores del logo */
    --overlay-panel: linear-gradient(145deg, rgba(31, 176, 144, 0.90) 0%, rgba(18, 38, 64, 0.94) 100%);
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    min-height: 100%;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--brand-dark);
    color: var(--brand-text-dark);
    -webkit-font-smoothing: antialiased;
}

/* Contenedor principal estilo Licita */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    background-image: var(--login-fondo);
    background-attachment: fixed;
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center center;
    position: relative;
}

/* ===== PANEL IZQUIERDO: FORMULARIO ===== */
.login-form-panel {
    flex: 1 1 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 3rem 1.75rem;
    background-color: rgba(15, 23, 42, 0.35);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    z-index: 2;
}

.login-card {
    width: 100%;
    max-width: 440px;
    background: #ffffff;
    border-radius: 28px;
    padding: 2.75rem 2.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.25);
    transition: all 0.3s ease;
}

.login-card-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-card-logo {
    max-height: 55px;
    max-width: 82%;
    object-fit: contain;
    display: block;
    margin: 0 auto 1.25rem;
}

.login-card-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--brand-navy);
    margin: 0 0 0.35rem;
    letter-spacing: -0.5px;
}

.login-card-subtitle {
    font-size: 0.95rem;
    color: var(--brand-text-muted);
    margin: 0;
    font-weight: 500;
}

/* Inputs modernos con iconos */
.form-group-custom {
    margin-bottom: 1.35rem;
}

.form-label-custom {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #475569;
    margin-bottom: 0.45rem;
}

.input-wrapper-custom {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper-custom .input-icon-left {
    position: absolute;
    left: 16px;
    color: #94a3b8;
    font-size: 1.05rem;
    pointer-events: none;
    transition: color 0.2s ease;
    z-index: 4;
}

.form-control-custom {
    width: 100%;
    height: 52px;
    padding: 0 16px 0 48px;
    background-color: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 14px;
    font-size: 0.98rem;
    font-weight: 500;
    color: #1e293b;
    transition: all 0.2s ease;
}

.form-control-custom:focus {
    background-color: #ffffff;
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 4px var(--brand-primary-light);
    outline: none;
}

.input-wrapper-custom:focus-within .input-icon-left {
    color: var(--brand-primary);
}

.btn-password-toggle {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    transition: color 0.2s ease;
    z-index: 5;
}

.btn-password-toggle:hover {
    color: var(--brand-primary);
}

.btn-password-toggle:focus {
    outline: none;
}

/* Enlace recuperar password */
.link-forgot {
    color: var(--brand-primary);
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease;
}

.link-forgot:hover {
    color: var(--brand-primary-hover);
    text-decoration: underline;
}

/* Botón de acceso */
.btn-login-submit {
    width: 100%;
    height: 52px;
    background: var(--brand-gradient);
    border: none;
    border-radius: 14px;
    color: #ffffff;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    box-shadow: 0 10px 22px -4px var(--brand-primary-glow);
    transition: all 0.25s ease;
    margin-top: 1.75rem;
}

.btn-login-submit:hover {
    background: var(--brand-gradient-hover);
    box-shadow: 0 14px 28px -4px rgba(31, 176, 144, 0.45);
    transform: translateY(-2px);
    color: #ffffff;
}

.btn-login-submit:active {
    transform: translateY(1px);
    box-shadow: 0 6px 14px -2px rgba(31, 176, 144, 0.35);
}

/* ===== PANEL DERECHO: CORPORATIVO (ESTILO LICITA) ===== */
.login-aside-panel {
    flex: 1 1 50%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 3.5rem 3.5rem 2.25rem;
    background: var(--overlay-panel);
    color: #ffffff;
    position: relative;
    z-index: 2;
}

.login-aside-top {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
}

.login-aside-brand {
    margin-bottom: 2.5rem;
}

.login-aside-logo {
    max-height: 80px;
    max-width: 320px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.2));
}

.login-aside-brand-text {
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: 2px;
    color: #ffffff;
    text-decoration: none;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

/* Lista de beneficios/características idéntica a la imagen de Licita */
.login-aside-features {
    max-width: 580px;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin: auto; /* centrado vertical entre el logo (arriba) y los enlaces (abajo) */
}

.feature-box {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    text-align: left;
}

.feature-icon-circle {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 19px;
    margin-top: 2px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.feature-text h3 {
    font-size: 1.45rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 0.35rem;
    line-height: 1.25;
    letter-spacing: -0.2px;
}

.feature-text p {
    font-size: 1.02rem;
    color: rgba(255, 255, 255, 0.92);
    margin: 0;
    line-height: 1.55;
    font-weight: 400;
}

/* Botón de acción en el Aside (idéntico al de la imagen adjunta) */
.login-aside-cta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
    margin-top: 2.4rem;
}

.btn-aside-action {
    display: inline-block;
    background-color: #ffffff;
    color: var(--brand-primary);
    font-size: 1.25rem;
    font-weight: 700;
    padding: 13px 52px;
    border-radius: 10px;
    text-decoration: none;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16);
    transition: all 0.25s ease;
    letter-spacing: 0.2px;
}

.btn-aside-action:hover {
    background-color: #f8fafc;
    color: var(--brand-primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
    text-decoration: none;
}

/* Variante de contorno (p. ej. "Abrir un ticket" del módulo Ticketing). Doble clase para
   ganar a .btn-aside-action, que se define después en el fichero original. */
.btn-aside-action.btn-aside-action-outline {
    background-color: transparent;
    color: #ffffff;
    border: 2px solid #ffffff;
    padding: 11px 50px;
    box-shadow: none;
}

.btn-aside-action.btn-aside-action-outline:hover {
    background-color: #ffffff;
    color: var(--brand-primary-hover);
}

/* ===== ENLACES INFERIORES (TÉRMINOS Y CONDICIONES, TARIFAS, CONTACTO) ===== */
/* Exactamente igual que en la imagen adjunta */
.login-aside-footer {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px 34px;
    margin-top: 2.5rem;
    padding-top: 1.25rem;
}

.login-aside-footer a {
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease, opacity 0.2s ease;
}

.login-aside-footer a:hover {
    color: #ffffff;
    text-decoration: underline;
}

/* Alertas estilizadas */
.custom-alert {
    border-radius: 14px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 0.92rem;
    line-height: 1.45;
    position: relative;
}

.custom-alert-danger {
    background-color: #fef2f2;
    color: #991b1b;
    border: 1px solid #fee2e2;
    border-left: 4px solid #ef4444;
}

.custom-alert-success {
    background-color: #ecfdf5;
    color: #065f46;
    border: 1px solid #d1fae5;
    border-left: 4px solid #10b981;
}

.custom-alert .alert-close {
    position: absolute;
    top: 10px;
    right: 12px;
    background: none;
    border: none;
    color: inherit;
    opacity: 0.6;
    cursor: pointer;
    font-size: 1.1rem;
}

.custom-alert .alert-close:hover {
    opacity: 1;
}

/* Header móvil (solo en pantallas pequeñas) */
.login-mobile-header {
    display: none;
    width: 100%;
    background: var(--overlay-panel);
    padding: 1.5rem 1rem;
    text-align: center;
}

.login-mobile-header img {
    max-height: 48px;
    max-width: 220px;
    object-fit: contain;
}

.login-mobile-footer {
    display: none;
    margin-top: 1.5rem;
    text-align: center;
}

/* Responsive Breakpoints */
@media (max-width: 991.98px) {
    .login-wrapper {
        flex-direction: column;
    }

    .login-mobile-header {
        display: block;
    }

    .login-form-panel {
        padding: 2.5rem 1.25rem;
        min-height: auto;
    }

    .login-card {
        padding: 2rem 1.5rem;
        border-radius: 20px;
    }

    .login-aside-panel {
        padding: 3rem 1.5rem 2rem;
    }

    .login-aside-brand {
        display: none; /* Ya se muestra en login-mobile-header */
    }

    .login-aside-features {
        gap: 1.5rem;
    }

    .feature-text h3 {
        font-size: 1.25rem;
    }

    .login-aside-footer {
        gap: 10px 20px;
        margin-top: 2rem;
    }
}

@media (max-width: 575.98px) {
    .feature-box {
        gap: 12px;
    }
    .feature-icon-circle {
        width: 38px;
        height: 38px;
        font-size: 16px;
    }
    .btn-aside-action {
        padding: 12px 36px;
        font-size: 1.1rem;
        width: 100%;
    }
    .login-aside-footer {
        flex-direction: column;
        gap: 8px;
    }
}
