/* =====================================================================
   LOGIN.CSS — Estilos completos de la pantalla de inicio de sesión
   ===================================================================== */

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

/* --- Variables --- */
:root {
    --corporate-color: #0D7377;
    --accent-color: #D4A843;
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
}

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

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

@media (max-width: 768px) {
    body {
        overflow-y: auto;
    }
}

/* =====================================================================
   CONTENEDOR SPLIT-SCREEN
   ===================================================================== */
.login-split-container {
    display: flex;
    height: 100vh;
    width: 100vw;
    transition: flex-direction 0.3s ease;
}

/* =====================================================================
   LADO IZQUIERDO — IMAGEN + MENSAJE INSTITUCIONAL
   ===================================================================== */
.login-left-side {
    width: 50%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    z-index: 1;
}

.nature-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        linear-gradient(
            135deg,
            rgba(8, 84, 84, 0.85) 0%,
            rgba(13, 115, 119, 0.60) 50%,
            rgba(8, 84, 84, 0.80) 100%
        ),
        url('/static/images/logos/img_remolque.jpeg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: -1;
}

.institutional-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
    padding: 2rem;
    max-width: 500px;
    animation: fadeInLeft 1s ease-out;
}

.logo-container {
    margin-bottom: 2rem;
}

.logo {
    width: 80px;
    height: 80px;
    margin-bottom: 1rem;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.3);
}

.bank-name {
    font-size: 2.5rem;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
    letter-spacing: 2px;
}

.main-message {
    margin-bottom: 2rem;
}

.main-title {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    line-height: 1.3;
    color: #f4f7fb;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.28);
}

.secondary-text {
    font-size: 1.1rem;
    line-height: 1.5;
    color: #d8e2ed;
    opacity: 0.9;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.18);
}

/* --- Lista de características (grid) --- */
.features-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    width: 100%;
    margin-top: 30px;
}

.feature-item,
.additional-links a {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    text-decoration: none;
    transition: all 0.4s ease;
    gap: 5px;
}

.feature-item:hover,
.additional-links a:hover {
    transform: translateY(-8px) scale(1.05);
}

.feature-item span {
    font-size: 0.85rem;
    font-weight: 600;
    color: #edf4fb;
    opacity: 0.96;
    max-width: 100px;
}

.feature-item i {
    font-size: 1.3rem;
    color: #D4A843;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* --- Iconos circulares --- */
.icon-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0D7377 0%, #085454 100%);
    margin-bottom: 8px;
    flex-shrink: 0;
    box-shadow: 0 4px 14px rgba(20, 120, 201, 0.28);
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1.5px solid rgba(91, 169, 230, 0.32);
    position: relative;
    z-index: 2;
}

.login-left-side .icon-wrapper {
    background: linear-gradient(135deg, rgba(13, 115, 119, 0.18), rgba(8, 84, 84, 0.22));
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.24);
    box-shadow: 0 8px 32px 0 rgba(13, 115, 119, 0.2);
}

.feature-item:hover .icon-wrapper,
.additional-links a:hover .icon-wrapper {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    box-shadow: 0 0 20px rgba(212, 168, 67, 0.42),
                inset 0 0 10px rgba(232, 196, 106, 0.2);
    transform: rotate(360deg) scale(1.1);
}

.icon-img-white {
    width: 22px;
    height: 22px;
    filter: brightness(0) invert(1);
    display: block;
    object-fit: contain;
    transition: all 0.5s ease;
}

.feature-item:hover .icon-img-white,
.additional-links a:hover .icon-img-white {
    filter: brightness(0);
    transform: rotate(-360deg);
}

/* =====================================================================
   LADO DERECHO — FORMULARIO
   ===================================================================== */
.login-right-side {
    width: 50%;
    background: linear-gradient(135deg, #0F1923 0%, #162233 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.login-form-container {
    width: 100%;
    max-width: 450px;
}

/* --- Barra fecha/hora --- */
.datetime-bar {
    background: #0B6E6E;
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 10px 10px 0 0;
    text-align: center;
    font-weight: 500;
    font-size: 0.9rem;
    box-shadow: 0 2px 10px rgba(11, 110, 110, 0.3);
    border-left: 4px solid #0D7377;
    border-right: 4px solid #0D7377;
}

/* --- Título del banco --- */
.bank-title {
    background: #f7f9fc;
    color: #0D7377;
    padding: 1rem 1.5rem;
    text-align: center;
    border-left: 4px solid #D4A843;
    border-right: 4px solid #D4A843;
}

.bank-title h3 {
    font-size: 1.3rem;
    font-weight: 600;
    letter-spacing: 1px;
    color: #0D7377;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.28);
}

/* --- Tarjeta del formulario --- */
.login-card {
    background: #ffffff;
    padding: 1rem 2.5rem;
    border-radius: 0 0 15px 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border-left: 4px solid #0D7377;
    border-right: 4px solid #0D7377;
    animation: fadeInUp 1s ease-out;
}

.login-title {
    color: #1f2937;
    font-size: 1.8rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 0.9rem;
    position: relative;
}

.login-title::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: #D4A843;
    border-radius: 2px;
}

/* --- Alertas --- */
.alert {
    padding: 0.8rem;
    border-radius: 8px;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}

.alert-error,
.alert.alert-danger {
    background: #fee;
    color: #c53030;
    border: 1px solid #feb2b2;
}

.alert-success {
    background: #f0fff4;
    color: #22543d;
    border: 1px solid #9ae6b4;
}

.alert-info {
    background: #ebf8ff;
    color: #2a69ac;
    border: 1px solid #90cdf4;
}

/* --- Grupos de formulario --- */
.form-group {
    margin-bottom: 0.75rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #2c3e50;
    font-weight: 600;
    font-size: 0.95rem;
}

/* --- Campos de formulario --- */
.form-group select,
.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="email"] {
    width: 100%;
    height: 50px;
    padding: 1rem;
    border: 2px solid #a0aec0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: #ffffff;
}

.form-group select:focus,
.form-group input[type="text"]:focus,
.form-group input[type="password"]:focus {
    outline: none;
    border-color: #0D7377;
    box-shadow: 0 0 0 3px rgba(13, 115, 119, 0.15);
}

/* --- Validación visual --- */
.form-group input:valid:not(:placeholder-shown) {
    border-color: #28a745;
}

.form-group input:invalid:not(:placeholder-shown) {
    border-color: #dc3545;
}

.form-group input:valid:not(:placeholder-shown) ~ .validation-icon.valid {
    opacity: 1;
}

.form-group input:invalid:not(:placeholder-shown) ~ .validation-icon.invalid {
    opacity: 1;
}

/* --- Errorlist --- */
.errorlist {
    list-style-type: none;
    padding: 0;
    margin: 0.5rem 0 0 0;
}

.errorlist li {
    background-color: #fee;
    color: #c53030;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.9rem;
}

/* --- Toggle password --- */
.password-input-container {
    position: relative;
    width: 100%;
}

.toggle-password {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: var(--corporate-color);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    padding: 0;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.toggle-password:hover {
    background-color: var(--accent-color);
    transform: translateY(-50%) scale(1.1);
}

/* --- Botón de login --- */
.login-btn {
    width: 100%;
    background: linear-gradient(135deg, #0B6E6E 0%, #1A8F8F 100%);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    position: relative;
    overflow: hidden;
}

.login-btn:hover {
    background: linear-gradient(135deg, #1A8F8F 0%, #0B6E6E 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(13, 115, 119, 0.3);
}

.login-btn:active {
    transform: translateY(0);
}

.login-btn .btn-content {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: opacity 0.2s ease;
}

.login-btn .btn-loader {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.45);
    border-top-color: #fff;
    border-radius: 50%;
    animation: login-spin 0.8s linear infinite;
    flex-shrink: 0;
}

.login-btn.is-loading .btn-loader {
    display: inline-block;
}

.login-btn.is-loading .btn-content {
    opacity: 0.85;
}

/* --- Enlaces adicionales --- */
.additional-links {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 30px;
    margin-top: 30px;
    padding-bottom: 10px;
}

.additional-links a {
    color: var(--corporate-color);
    font-size: 0.85rem;
    font-weight: 700;
}

.additional-links .icon-wrapper {
    width: 40px;
    height: 40px;
}

.forgot-password {
    color: #0D7377;
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.3s ease;
}

.forgot-password:hover {
    color: #174a84;
}

/* --- Checkbox (términos) --- */
.terms-container {
    width: 100%;
}

.checkbox-container {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    cursor: pointer;
    font-size: 0.9rem;
    color: #374151;
}

.checkbox-container input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #0D7377;
}

.terms-link {
    color: #0D7377;
    text-decoration: none;
    font-weight: 500;
}

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

/* --- Volver al inicio --- */
.back-home {
    color: #64748b;
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.3s ease;
    font-size: 0.9rem;
}

.back-home:hover {
    color: #334155;
}

/* =====================================================================
   CUSTOM DROPDOWN (reemplaza <select> nativo)
   ===================================================================== */
.custom-select-wrapper {
    position: relative;
    width: 100%;
}

.custom-select-display {
    width: 100%;
    height: 50px;
    padding: 0 1rem;
    border: 2px solid #a0aec0;
    border-radius: 8px;
    font-size: 1rem;
    background-color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    box-sizing: border-box;
    transition: border-color 0.3s ease;
    user-select: none;
    gap: 8px;
}

.custom-select-display.open {
    border-color: #0D7377;
    border-radius: 8px 8px 0 0;
}

.custom-select-display .placeholder {
    color: #a0aec0;
}

.custom-select-display .selected-value {
    color: #2c3e50;
}

.custom-select-arrow {
    flex-shrink: 0;
    color: #718096;
    transition: transform 0.3s ease;
    font-size: 0.7rem;
}

.custom-select-display.open .custom-select-arrow {
    transform: rotate(180deg);
}

.custom-select-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffff;
    border: 2px solid #0D7377;
    border-top: none;
    border-radius: 0 0 8px 8px;
    z-index: 200;
    display: none;
    box-shadow: 0 8px 24px rgba(0,0,0,0.18);
    max-height: 200px;
    overflow-y: auto;
}

.custom-select-options.show {
    display: block;
}

.custom-select-options .option {
    padding: 0.8rem 1rem;
    cursor: pointer;
    font-size: 1rem;
    color: #2c3e50;
    transition: background 0.15s ease;
    border-bottom: 1px solid #f0f0f0;
}

.custom-select-options .option:last-child {
    border-bottom: none;
}

.custom-select-options .option:hover {
    background: #eef3f8;
}

.custom-select-options .option.selected {
    background: #E8F0E8;
    font-weight: 600;
    color: #0D7377;
}

.custom-select-options .option:active {
    background: #c8d6e5;
}

/* =====================================================================
   MODAL DE RESTABLECER CONTRASEÑA
   ===================================================================== */
#passwordResetModal .modal-content {
    max-width: 560px;
    border-radius: 22px;
    box-shadow: 0 24px 80px rgba(18, 45, 48, 0.35);
}

.modal-title-wrap {
    text-align: center;
    margin-bottom: 10px;
}

#modal-title {
    margin-bottom: 4px;
}

#modal-subtitle {
    margin: 0;
    color: #6c7a86;
    font-size: 0.95rem;
}

.reset-progress {
    position: relative;
    margin: 10px 0 22px;
    padding-top: 10px;
}

.reset-progress-line {
    position: absolute;
    left: 10px;
    right: 10px;
    top: 28px;
    height: 4px;
    background: rgba(13, 115, 119, 0.14);
    border-radius: 999px;
    overflow: hidden;
}

.reset-progress-fill {
    display: block;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #0D7377, #D4A843);
    border-radius: 999px;
    transition: width 0.35s ease;
}

.reset-progress-steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    position: relative;
    z-index: 1;
}

.reset-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    color: #7a8793;
    font-size: 0.78rem;
    text-align: center;
}

.reset-step-icon {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 2px solid rgba(20, 120, 201, 0.2);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    transition: all 0.25s ease;
}

.reset-step-icon img {
    width: 18px;
    height: 18px;
    object-fit: contain;
    filter: saturate(0.9);
}

.reset-step.active {
    color: #0D7377;
    font-weight: 700;
}

.reset-step.active .reset-step-icon {
    border-color: #0D7377;
    transform: translateY(-1px) scale(1.04);
}

.reset-step.active .reset-step-icon img {
    filter: none;
}

.reset-step.done .reset-step-icon {
    background: linear-gradient(180deg, rgba(13, 115, 119, 0.08), rgba(212, 168, 67, 0.16));
    border-color: rgba(13, 115, 119, 0.45);
}

.reset-step.done .reset-step-icon img {
    filter: none;
}

.reset-step.current .reset-step-icon {
    background: linear-gradient(180deg, #0D7377, #085454);
    border-color: #0D7377;
}

.reset-step.current .reset-step-icon img {
    filter: brightness(0) invert(1);
}

.reset-step small {
    font-size: 0.72rem;
    letter-spacing: 0.02em;
}

.reset-card {
    padding: 18px;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255,255,255,0.82), rgba(255,255,255,0.95));
    border: 1px solid rgba(20, 120, 201, 0.12);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.7);
}

.reset-card.step-enter {
    animation: reset-step-in 220ms ease-out;
}

@keyframes reset-step-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.reset-card p {
    margin-top: 0;
}

.reset-dev-otp {
    display: none;
    margin: 10px 0 0;
    padding: 10px 12px;
    border: 1px dashed #0D7377;
    border-radius: 10px;
    background: rgba(13, 115, 119, 0.08);
    color: #0D7377;
    font-weight: 700;
    text-align: center;
}

.reset-hint {
    margin: 10px 0 0;
    color: #6c7a86;
    font-size: 0.9rem;
    text-align: center;
}

.reset-select {
    width: 100%;
    font-size: 1.04rem;
    line-height: 1.35;
    padding: 12px 14px;
    min-height: 48px;
    border-radius: 12px;
}

#modal_tipo_identificacion,
#modal_email,
#modal_identificacion,
#new_password,
#confirm_password {
    font-size: 1.02rem;
    line-height: 1.35;
    padding-top: 12px;
    padding-bottom: 12px;
}

.modal-step-actions {
    margin-top: 16px;
    display: flex;
    gap: 10px;
    align-items: stretch;
}

.login-btn.step-action {
    width: 100%;
    min-height: 50px;
    border: none;
    border-radius: 14px;
    background: linear-gradient(135deg, #0D7377 0%, #085454 100%);
    box-shadow: 0 10px 24px rgba(13, 115, 119, 0.25);
}

.login-btn.step-action .btn-content {
    gap: 8px;
}

.login-btn.step-action:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(13, 115, 119, 0.3);
}

.login-btn.step-action:disabled {
    opacity: 0.92;
    cursor: wait;
}

.login-btn.step-secondary {
    background: linear-gradient(180deg, #f7f9fc, #edf2f7);
    color: #0D7377;
    border: 1px solid rgba(13, 115, 119, 0.22);
    box-shadow: none;
}

.login-btn.step-secondary:hover {
    background: linear-gradient(180deg, #ffffff, #eef4fb);
    box-shadow: 0 8px 18px rgba(13, 115, 119, 0.12);
}

.login-btn.step-secondary .icon-img-white {
    filter: brightness(0) saturate(0) invert(22%) sepia(83%) saturate(1602%) hue-rotate(195deg) brightness(94%) contrast(93%);
}

.reset-actions-split {
    display: grid;
    grid-template-columns: 1fr 1.35fr;
    gap: 10px;
    width: 100%;
}

.reset-actions-split .login-btn.step-action {
    width: 100%;
}

.reset-otp-meta {
    display: flex;
    justify-content: center;
    margin-top: 10px;
}

.reset-back-icon {
    width: 16px;
    height: 16px;
    margin-right: 6px;
}

/* --- OTP Inputs --- */
.otp-input-container {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 20px 0;
}

.otp-field {
    width: 40px;
    height: 50px;
    text-align: center;
    font-size: 24px;
    font-weight: bold;
    border: 2px solid #ddd;
    border-radius: 8px;
    color: #0D7377;
}

.otp-field:focus {
    border-color: #0D7377;
    outline: none;
    box-shadow: 0 0 5px rgba(13, 115, 119, 0.3);
}

/* --- Step Indicator --- */
.step-indicator {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    padding: 0 10px;
}

.step-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #ddd;
}

.step-dot.active {
    background-color: #0D7377;
    box-shadow: 0 0 5px rgba(20, 120, 201, 0.5);
}

/* --- Modal overlay --- */
.modal-overlay {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: #fefefe;
    margin: auto;
    padding: 20px 30px;
    border: 1px solid #888;
    width: 90%;
    max-width: 500px;
    border-radius: 10px;
    position: relative;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.modal-close {
    color: #aaa;
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
}

.modal-close:hover,
.modal-close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

.modal-content h2 {
    text-align: center;
    color: #333;
    margin-bottom: 20px;
}

.modal-content .form-group {
    margin-bottom: 15px;
}

.modal-content .login-btn {
    width: 100%;
    margin-top: 10px;
}

/* =====================================================================
   RESPONSIVE — TABLETS (≤1024px)
   ===================================================================== */
@media (max-width: 1024px) {
    .login-split-container {
        flex-direction: column;
        height: auto;
        min-height: 100vh;
    }

    .login-left-side,
    .login-right-side {
        width: 100%;
    }

    .login-left-side {
        min-height: auto;
        padding: 2rem 1.5rem 1.5rem;
    }

    .logo { width: 72px; height: 72px; }

    .bank-name { font-size: 2rem; }

    .main-title { font-size: 1.4rem; }

    .secondary-text { font-size: 0.95rem; }

    .features-list {
        grid-template-columns: repeat(3, 1fr);
        gap: 14px;
        margin-top: 20px;
    }

    .feature-item span { font-size: 0.75rem; max-width: 90px; }

    .feature-item .icon-wrapper { width: 42px; height: 42px; }

    .feature-item .icon-img-white { width: 20px; height: 20px; }

    .institutional-content { max-width: 460px; padding: 0; }

    .login-right-side {
        min-height: auto;
        padding: 1.5rem;
        align-items: flex-start;
        overflow-y: auto;
    }

    .login-form-container {
        max-width: 100%;
        width: 100%;
        padding: 0;
    }

    .login-card { padding: 1.25rem 1.5rem; }

    .login-card form { display: flex; flex-direction: column; gap: 0; }

    .login-title { font-size: 1.5rem; margin-bottom: 1.5rem; }

    .form-group { margin-bottom: 1rem; }

    .form-group select,
    .form-group input[type="text"],
    .form-group input[type="password"] { height: 48px; font-size: 0.95rem; }

    .additional-links { margin-top: 1.5rem; gap: 24px; }

    .datetime-bar { font-size: 0.85rem; padding: 0.7rem 1.2rem; }
}

/* =====================================================================
   RESPONSIVE — TABLETS PEQUEÑAS / MÓVILES GRANDES (≤840px)
   ===================================================================== */
@media (max-width: 840px) {
    .features-list {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }

    .feature-item span { font-size: 0.65rem; max-width: 75px; }

    .feature-item .icon-wrapper { width: 38px; height: 38px; }

    .feature-item .icon-img-white { width: 18px; height: 18px; }

    .login-left-side { padding: 1.5rem 1rem; }

    .bank-name { font-size: 1.6rem; }

    .main-title { font-size: 1.2rem; }

    .secondary-text { font-size: 0.85rem; }
}

/* =====================================================================
   RESPONSIVE — MÓVILES (≤768px)
   ===================================================================== */
@media (max-width: 768px) {
    .login-left-side { display: none; }

    .login-right-side {
        width: 100%;
        min-height: 100dvh;
        padding: 0;
        overflow-y: auto;
    }

    .login-form-container {
        width: 100%;
        max-width: 100%;
        padding: 1rem;
    }

    .login-card {
        padding: 1rem 1.25rem;
        border-left: none;
        border-right: none;
        border-radius: 0 0 12px 12px;
    }

    .login-card form { display: flex; flex-direction: column; }

    .login-title { font-size: 1.3rem; margin-bottom: 1.25rem; }

    .form-group { margin-bottom: 0.9rem; }

    .form-group label { font-size: 0.85rem; }

    .form-group select,
    .form-group input[type="text"],
    .form-group input[type="password"] { height: 46px; font-size: 0.9rem; padding: 0.8rem; }

    .datetime-bar {
        font-size: 0.75rem;
        padding: 0.5rem 0.8rem;
        border-left: none;
        border-right: none;
    }

    .login-btn { padding: 0.85rem; font-size: 1rem; margin-bottom: 1rem; }

    .additional-links {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 20px;
        margin-top: 1rem;
        padding-bottom: 0.5rem;
    }

    .forgot-password,
    .back-home { font-size: 0.8rem; }

    .additional-links .icon-wrapper { width: 36px; height: 36px; }

    .additional-links .icon-img-white { width: 18px; height: 18px; }

    .checkbox-container { font-size: 0.8rem; }

    .custom-select-display { height: 44px; font-size: 0.9rem; }
}

/* =====================================================================
   RESPONSIVE — MÓVILES PEQUEÑOS (≤480px)
   ===================================================================== */
@media (max-width: 480px) {
    .login-form-container { padding: 0.6rem; }

    .login-card { padding: 0.75rem 10px; overflow-x: hidden; }

    .login-card form { gap: 0; }

    .login-title { font-size: 1.1rem; margin-bottom: 1rem; }

    .login-title::after { width: 40px; height: 2px; bottom: -6px; }

    .form-group { margin-bottom: 0.7rem; }

    .form-group label { font-size: 0.75rem; margin-bottom: 0.25rem; }

    .form-group select,
    .form-group input[type="text"],
    .form-group input[type="password"] {
        height: 40px;
        padding: 0.5rem;
        font-size: 0.82rem;
    }

    .custom-select-display { height: 38px; padding: 0 0.5rem; font-size: 0.8rem; }

    .custom-select-options .option { padding: 0.5rem 0.6rem; font-size: 0.8rem; }

    .datetime-bar { font-size: 0.65rem; padding: 0.35rem 0.5rem; }

    .login-btn { padding: 0.65rem; font-size: 0.85rem; margin-bottom: 0.8rem; }

    .additional-links { gap: 12px; margin-top: 0.8rem; }

    .additional-links .icon-wrapper { width: 32px; height: 32px; }

    .additional-links .icon-img-white { width: 16px; height: 16px; }

    .forgot-password,
    .back-home { font-size: 0.7rem; }

    .checkbox-container { font-size: 0.7rem; }

    .checkbox-container input[type="checkbox"] { width: 14px; height: 14px; }

    .icon-wrapper.alert-icon { width: 36px; height: 36px; }

    select {
        -webkit-appearance: menulist-button;
        appearance: auto;
        max-width: 100%;
    }

    .alert { padding: 0.6rem; font-size: 0.78rem; }

    /* OTP */
    .otp-input-container { gap: 4px; }
    .otp-field { width: 28px; height: 34px; font-size: 14px; }

    /* Reset modal */
    .reset-card { padding: 8px; }
    .reset-hint,
    #modal-subtitle { font-size: 0.72rem; }
    .login-btn.step-action { min-height: 36px; font-size: 0.8rem; }
    .reset-progress-steps { gap: 2px; }
    .reset-step { font-size: 0.55rem; }
    .reset-step-icon { width: 22px; height: 22px; }
    .reset-step-icon img { width: 12px; height: 12px; }
    .modal-step-actions,
    .reset-actions-split {
        grid-template-columns: 1fr;
        flex-direction: column;
    }
}

/* =====================================================================
   MODO OSCURO
   ===================================================================== */
body.dark-theme .login-right-side {
    background: linear-gradient(135deg, #0a141e 0%, #0f1923 100%);
}

body.dark-theme .bank-title {
    background: #101a2b;
    color: #6BB8B8;
}

body.dark-theme .login-card {
    background: #111d2b;
    color: #e6eef7;
}

body.dark-theme .login-title {
    color: #edf4fb;
}

body.dark-theme .form-group label,
body.dark-theme .back-home,
body.dark-theme .forgot-password {
    color: #c6d6e8;
}

body.dark-theme .form-group select,
body.dark-theme .form-group input[type="text"],
body.dark-theme .form-group input[type="password"],
body.dark-theme .form-group input[type="email"] {
    background: #0f1a2b;
    color: #edf4fb;
    border-color: #30455f;
}

body.dark-theme .form-group input:valid:not(:placeholder-shown) {
    border-color: #28a745;
}

body.dark-theme .form-group input:invalid:not(:placeholder-shown) {
    border-color: #dc3545;
}

body.dark-theme .custom-select-display {
    background: #0f1a2b;
    color: #edf4fb;
    border-color: #30455f;
}

body.dark-theme .custom-select-display .selected-value {
    color: #edf4fb;
}

body.dark-theme .custom-select-display.open {
    border-color: #0D7377;
}

body.dark-theme .custom-select-options {
    background: #162132;
    border-color: #0D7377;
}

body.dark-theme .custom-select-options .option {
    color: #edf4fb;
    border-color: #30455f;
}

body.dark-theme .custom-select-options .option:hover {
    background: #1e3045;
}

body.dark-theme .custom-select-options .option.selected {
    background: #1f3a54;
    color: #D4A843;
}
/* =====================================================================
   ANIMACIONES
   ===================================================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

.feature-item {
    animation: fadeInLeft 1s ease-out;
}

.feature-item:nth-child(1) { animation-delay: 0.2s; }
.feature-item:nth-child(2) { animation-delay: 0.4s; }
.feature-item:nth-child(3) { animation-delay: 0.6s; }
