:root {
    --bbva-blue: #001489;
    --bbva-dark: #000938;
    --text-color: #121212;
    --gray-label: #555555;
    --border-color: #4a5568;
    --bg-light: #f0f4f8;
    --card-bg: #ffffff;
    --error-color: #d9381e;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: var(--bg-light);
    color: var(--text-color);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.page-container {
    width: 100%;
    max-width: 480px;
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Cabecera */
.main-header {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-left: 4px;
}

.logo {
    font-size: 24px;
    letter-spacing: -0.5px;
}

.logo-bold {
    font-weight: 800;
    color: var(--bbva-blue);
}

.logo-light {
    font-weight: 300;
    color: var(--bbva-blue);
}

.sub-header {
    font-size: 16px;
    font-weight: 500;
    color: var(--bbva-dark);
}

.security-notice {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-color);
    margin-top: 4px;
}

.lock-icon {
    width: 15px;
    height: 15px;
    fill: var(--text-color);
}

/* Tarjeta Principal */
.main-card-container {
    width: 100%;
}

.login-card {
    background-color: var(--card-bg);
    border-radius: 20px;
    padding: 40px 32px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
    border: 1px solid #e2e8f0;
}

.view {
    display: none;
    width: 100%;
    animation: fadeIn 0.35s ease-in-out;
}

.view.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

.login-card h2 {
    font-size: 34px;
    font-weight: 800;
    color: var(--bbva-blue);
    margin-bottom: 28px;
    letter-spacing: -1px;
}

/* Grupos de Inputs */
.input-group {
    margin-bottom: 20px;
    position: relative;
    text-align: left;
}

.input-group label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: var(--gray-label);
    margin-bottom: 4px;
}

.input-field {
    width: 100%;
    background-color: #ffffff;
    border: 1.5px solid var(--border-color);
    border-radius: 8px;
    padding: 14px 16px;
    font-size: 16px;
    color: var(--text-color);
    outline: none;
    transition: border-color 0.2s;
}

.input-field:focus {
    border-color: var(--bbva-blue);
    box-shadow: 0 0 0 2px rgba(0, 20, 137, 0.1);
}

.input-field::placeholder {
    color: #a0aec0;
}

.input-group.error .input-field {
    border-color: var(--error-color);
}

.error-msg {
    display: none;
    font-size: 11px;
    color: var(--error-color);
    margin-top: 5px;
    font-weight: 500;
}

.input-group.error .error-msg {
    display: block;
}

/* Select personalizado */
.select-wrapper {
    position: relative;
}

select.input-field {
    appearance: none;
    cursor: pointer;
    padding-right: 40px;
    font-weight: 400;
    color: var(--text-color);
}

.arrow-icon {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 22px;
    height: 22px;
    pointer-events: none;
}

/* Checkbox */
.checkbox-group {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 24px 0 28px 0;
}

.checkbox-group input[type="checkbox"] {
    width: 22px;
    height: 22px;
    border: 1.5px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
    accent-color: var(--bbva-blue);
}

.checkbox-group label {
    font-size: 15px;
    color: var(--bbva-blue);
    font-weight: 500;
    cursor: pointer;
}

/* Botón Ingresar */
.btn-ingresar {
    width: 100%;
    background-color: var(--bbva-blue);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 16px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.2s;
    box-shadow: 0 4px 12px rgba(0, 20, 137, 0.2);
}

.btn-ingresar:hover {
    background-color: #000f6b;
}

/* Enlace inferior */
.recover-container {
    text-align: center;
    margin-top: 28px;
}

.recover-link {
    color: var(--bbva-blue);
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
}

.recover-link:hover {
    text-decoration: underline;
}

/* --- NUEVO ESTILO PROFESIONAL PARA PANTALLAS DE CARGA --- */
.loading-view {
    text-align: center;
    padding: 20px 0;
}

.loading-main-title {
    font-size: 28px;
    font-weight: 600;
    color: var(--bbva-blue);
    margin-bottom: 35px;
    letter-spacing: -0.5px;
}

.loader-circle-container {
    margin: 0 auto 25px auto;
    width: 90px;
    height: 90px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.circle-spinner {
    width: 90px;
    height: 90px;
    border: 3px solid #e1ecf4;
    border-top: 3px solid var(--bbva-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.circle-lock-icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: counterSpin 1s linear infinite; /* Mantiene el icono estático mientras gira el borde */
}

.circle-lock-icon svg {
    width: 22px;
    height: 22px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes counterSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(-360deg); }
}

.loading-status-text {
    font-size: 15px;
    color: var(--bbva-blue);
    font-weight: 500;
    margin-top: 10px;
}

.loading-sub-text {
    font-size: 14px;
    color: var(--gray-label);
    margin-top: 8px;
}

.countdown-num {
    font-weight: bold;
    color: var(--text-color);
}

/* Sección Token */
.token-illustration {
    width: 110px;
    height: 110px;
    margin: 0 auto 20px;
    background: #f0f7ff;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.phone-mock {
    width: 48px;
    height: 76px;
    background: var(--bbva-blue);
    border-radius: 6px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-bubble {
    position: absolute;
    background: #e1f5fe;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: bold;
    color: #01579b;
    bottom: 25px;
    right: -20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.token-instruction {
    font-size: 15px;
    color: var(--text-color);
    margin-bottom: 20px;
    text-align: center;
}

.text-center {
    text-align: center;
}

.label-center {
    text-align: center;
    font-size: 15px !important;
    color: var(--text-color) !important;
    margin-bottom: 15px !important;
}