/* ========================================
   BANCOLOMBIA - ESTILOS GLOBALES
   Incluir en todas las páginas:
   <link rel="stylesheet" href="styles.css">
   ======================================== */

/* ========== FUENTES Y RESET ========== */
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;600;700;800&amp;display=swap');

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Open Sans', Arial, sans-serif;
}

/* ========== CRÍTICO: evita scroll horizontal en todas las páginas ========== */
html, body {
    overflow-x: hidden;
    max-width: 100%;
}

body {
    background-color: #ffffff;
    min-height: 100vh;
    position: relative;
}

/* ========== LÍNEAS DE FONDO (CURVAS BANCOLOMBIA) ========== */
body::before {
    content: "";
    position: absolute;
    top: 250px;
    left: -50px;
    width: 800px;
    height: 400px;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="none"><path d="M-10,80 Q30,20 80,60 T120,40" fill="none" stroke="%23F47C20" stroke-width="3" stroke-linecap="round"/><path d="M10,80 Q50,20 100,60" fill="none" stroke="%23FDDA24" stroke-width="2" stroke-linecap="round"/></svg>') no-repeat;
    background-size: contain;
    z-index: -1;
    /* Contenido decorativo no causa overflow */
    pointer-events: none;
}

body::after {
    content: "";
    position: absolute;
    top: 150px;
    right: 0;
    width: 400px;
    height: 600px;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="none"><path d="M50,100 Q60,50 100,10" fill="none" stroke="%23FDDA24" stroke-width="4" stroke-linecap="round"/><path d="M20,100 Q50,60 90,20" fill="none" stroke="%23F47C20" stroke-width="2" stroke-linecap="round"/><path d="M70,40 Q85,20 100,15" fill="none" stroke="%238E44AD" stroke-width="2" stroke-linecap="round"/></svg>') no-repeat;
    background-size: contain;
    z-index: -1;
    pointer-events: none;
}

/* ========== HEADER ========== */
header {
    width: 100%;
    padding: 30px 0 20px 0;
    text-align: center;
}

header img {
    width: 200px;
    max-width: 60%;
}

/* ========== CONTAINER PRINCIPAL ========== */
.container {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 500px;
    width: 100%;
    margin: 0 auto;
    padding: 10px 20px 50px 20px;
    position: relative;
}

h1.main-title {
    font-size: 1.8rem;
    color: #2C2A29;
    font-weight: 300;
    margin-bottom: 20px;
    text-align: center;
}

/* ========== TARJETA BLANCA ========== */
.login-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    padding: 40px 30px;
    width: 100%;
    text-align: center;
}

.login-card h2 {
    font-size: 1.4rem;
    font-weight: 700;
    color: #2C2A29;
    margin-bottom: 10px;
}

.login-card p.subtitle {
    font-size: 0.95rem;
    color: #444;
    line-height: 1.5;
    margin-bottom: 30px;
    padding: 0 10px;
}

/* ========== INPUTS ========== */
.bancolombia-input {
    width: 100%;
    border: none;
    border-bottom: 1px solid #757575;
    padding: 10px 0;
    font-size: 1.1rem;
    outline: none;
    background: transparent;
    color: #2C2A29;
    transition: border-color 0.2s;
    margin-bottom: 10px;
}

.bancolombia-input:focus {
    border-bottom: 2px solid #2C2A29;
}

/* ========== BOTONES ========== */
.btn-submit {
    width: 100%;
    background-color: #FDDA24;
    color: #2C2A29;
    border: none;
    border-radius: 50px;
    padding: 16px;
    font-size: 1rem;
    font-weight: 700;
    margin-top: 20px;
    transition: all 0.3s;
    cursor: pointer;
}

.btn-submit:hover {
    background-color: #f2ce00;
}

.btn-submit:disabled,
.btn-submit.inactivo {
    background-color: #E0E0E0;
    color: #757575;
    cursor: not-allowed;
}

.btn-submit.activo {
    background-color: #FDDA24;
    color: #2C2A29;
    cursor: pointer;
}

.btn-submit.activo:hover {
    background-color: #f2ce00;
}

/* ========== LOADING OVERLAY ========== */
#loading-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.92);
    z-index: 9999;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
}

.spinner {
    width: 46px;
    height: 46px;
    border: 4px solid #e0e0e0;
    border-top-color: #FDDA24;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

#loading-overlay p {
    font-size: 0.9rem;
    color: #555;
    font-weight: 600;
}

/* ========== MODAL DE ERROR ========== */
#modal-error {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 99999;
    justify-content: center;
    align-items: center;
}

.modal-error-box {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    max-width: 380px;
    width: 90%;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
}

.modal-error-icon {
    width: 60px; height: 60px;
    background: #E03C31;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px auto;
}

.modal-error-icon svg { width: 30px; height: 30px; fill: white; }

.modal-error-box h2 { font-size: 1.4rem; font-weight: 700; color: #111; margin-bottom: 12px; }
.modal-error-box p  { font-size: 0.95rem; color: #444; line-height: 1.5; margin-bottom: 25px; }

.modal-error-btn {
    width: 100%;
    padding: 14px;
    background: #2C2A29;
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
}

/* ========== AVISO / TEXTO PEQUEÑO ========== */
.aviso {
    font-size: 0.8rem;
    color: #666;
    margin-top: 20px;
    text-align: center;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    body::before {
        top: 80px;
        left: -100px;
        width: 600px;
        height: 300px;
        opacity: 0.6;
    }

    body::after {
        top: 100px;
        right: -80px;
        width: 350px;
        height: 500px;
        opacity: 0.6;
    }

    .container {
        padding: 10px 15px 50px;
        max-width: 100%;
    }

    h1.main-title {
        font-size: 1.5rem;
    }

    .login-card {
        padding: 30px 20px;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    }
}

@media (max-width: 400px) {
    .login-card {
        padding: 24px 14px;
    }

    h1.main-title {
        font-size: 1.3rem;
    }
}