:root {
    --primary-blue: #004481;
    --light-blue-bg: #f4f8fb;
    --accent-yellow: #fabd00;
    --text-dark: #2c2a29;
    --text-gray: #6e6e6e;
    --border-color: #d1d1d1;
    --white: #ffffff;
    --alert-bg: #eeffff;
    /* Approximate light blue for alert */
    --hover-blue: #003366;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Open Sans', sans-serif;
    background-color: var(--white);
    height: 100vh;
    overflow-x: hidden;
}

.main-layout {
    display: flex;
    height: 100%;
}

/* --- Left Column: Login --- */
.login-section {
    width: 45%;
    min-width: 400px;
    background: var(--white);
    display: flex;
    flex-direction: column;
    padding: 40px 60px;
    overflow-y: auto;
}

.login-content {
    max-width: 400px;
    margin: 0 auto;
    width: 100%;
}

.brand-logo {
    width: 85%;
    /* Match card alignment */
    margin: 0 auto 15px auto;
    /* Reduced spacing */
}

.brand-logo img {
    height: 40px;
    /* Adjust based on SVG */
    display: block;
    /* Ensure no inline spacing issues */
}

.welcome-title {
    font-size: 1.3rem;
    /* Reduced to fit on one line */
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 auto 15px auto;
    /* Reduced spacing */
    width: 85%;
    /* Match card alignment */
}

/* Hero Banner (Direct Image) */
.hero-banner {
    width: 100%;
    height: auto;
    display: block;
    margin-bottom: 0px;
    /* Consolidate blocking */
    border: none;
    background: transparent;
    border-radius: 15px;
}

/* Obsolete banner styles removed */

/* Login Card Container */
.login-card-container {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background-color: var(--white);
    overflow: hidden;
    /* Contains the tabs and body */
    width: 85%;
    /* Reduced width to align with banner as requested */
    margin: 0 auto;
    /* Centered */
}

/* Tabs */
.login-tabs {
    display: flex;
    border-bottom: 1px solid #e0e0e0;
    /* margin-bottom: 20px; Removed margin from here, handled by padding in body */
}

.tab-btn {
    flex: 1;
    background: none;
    border: none;
    padding: 15px;
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--text-gray);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: color 0.3s;
}

.tab-btn.active {
    color: var(--primary-blue);
    font-weight: 700;
    border-bottom-color: var(--primary-blue);
    background: transparent !important;
    /* Force transparent to avoid unwanted blue bg */
    outline: none;
}

.tab-btn:focus {
    outline: none;
    background: transparent;
}

.card-body {
    padding: 20px 25px;
}

/* Alert Box */
.alert-box {
    background-color: #f0f8ff;
    border: 1px solid #cce5ff;
    padding: 12px;
    border-radius: 4px;
    font-size: 0.8rem;
    color: var(--text-gray);
    margin-bottom: 20px;
    position: relative;
    line-height: 1.4;
}

.close-alert {
    position: absolute;
    top: 5px;
    right: 10px;
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--text-gray);
}

/* Form Styles */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.input-group-row {
    display: flex;
    gap: 10px;
}

.select-wrapper {
    position: relative;
    width: 30%;
}

.select-wrapper select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    appearance: none;
    background: var(--white);
    font-size: 1rem;
    color: var(--text-dark);
}

.arrow-down {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.7rem;
    pointer-events: none;
    color: var(--primary-blue);
}

.input-wrapper {
    position: relative;
    flex: 1;
}

.input-prefix {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-gray);
    font-size: 1rem;
}

.input-wrapper input {
    width: 100%;
    padding: 10px 12px 10px 30px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
}

.password-wrapper {
    position: relative;
}

.password-wrapper input {
    width: 100%;
    padding: 10px 40px 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
}

.eye-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--primary-blue);
}

.btn-submit {
    width: 100%;
    background-color: #e0e0e0;
    color: #a0a0a0;
    border: none;
    padding: 12px;
    border-radius: 20px;
    /* More rounded as per design */
    font-size: 1rem;
    font-weight: 600;
    cursor: not-allowed;
    margin-top: 10px;
    transition: all 0.3s;
}

.btn-submit.active {
    background-color: var(--primary-blue);
    color: var(--white);
    cursor: pointer;
}

.form-footer-links {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
}

.form-footer-links a {
    font-size: 0.85rem;
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 600;
}

.recaptcha-text {
    margin-top: 40px;
    font-size: 0.7rem;
    color: #888;
    line-height: 1.4;
}

.recaptcha-text a {
    color: var(--primary-blue);
    text-decoration: none;
}

/* --- Right Column: Promo --- */
.promo-section {
    flex: 1;
    background-color: var(--light-blue-bg);
    display: flex;
    flex-direction: column;
    /* To place version tag at bottom */
    justify-content: flex-start;
    /* Move content to top */
    align-items: center;
    padding: 40px;
    position: relative;
}

.promo-content {
    width: 100%;
    max-width: 600px;
}

.feature-banner {
    background-color: var(--accent-yellow);
    border-radius: 12px;
    padding: 0;
    /* Removed padding for full image */
    margin-bottom: 15px;
    /* Reduced gap to action cards */
    margin-top: 80px;
    /* Push down to align with Blue Banner on left */
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    min-height: auto;
    /* Let image define height */
}

.full-banner-img {
    width: 100%;
    margin-left: 0;
    height: auto;
    display: block;
}

/* Removed/Obsolete text and graphic styles for banner */
.feature-text,
.feature-graphic {
    display: none;
}

.action-grid {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.action-card {
    background: var(--white);
    padding: 20px;
    /* Square-ish */
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    text-decoration: none;
    color: var(--primary-blue);
    width: 140px;
    /* Fixed width for uniformity */
    height: 140px;
    justify-content: center;
    transition: transform 0.2s;
    position: relative;
}

.action-card:hover {
    transform: translateY(-5px);
}

.icon-circle {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: var(--primary-blue);
}

.action-card span {
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.3;
}

.arrow-right {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    display: none;
    /* Only for the last one if specific layout */
}

/* Specific hack for the last card if it needs to look like "Atención... >" */
.action-card:last-child {
    flex-direction: row;
    align-items: center;
    text-align: left;
    padding: 15px;
    gap: 10px;
}

.action-card:last-child .icon-circle {
    margin-bottom: 0;
}

.action-card:last-child::after {
    content: '›';
    font-size: 1.5rem;
    margin-left: auto;
    color: var(--primary-blue);
}

.version-tag {
    position: absolute;
    bottom: 20px;
    right: 20px;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    font-size: 0.7rem;
    color: #ccc;
}

@media (max-width: 900px) {
    .main-layout {
        flex-direction: column;
        height: auto;
    }

    .login-section,
    .promo-section {
        width: 100%;
        padding: 30px 20px;
    }

    .promo-section {
        order: 2;
    }
}

/* --- Token Page Styles --- */
.token-page-body {
    background-color: var(--light-blue-bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.token-header {
    background-color: var(--white);
    padding: 15px 40px;
    display: flex;
    justify-content: center;
    /* Center the logo */
    align-items: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    position: relative;
    /* For absolute positioning of abandon link */
}

.header-logo img {
    height: 30px;
}

.abandon-link {
    color: var(--primary-blue);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
    position: absolute;
    /* Take out of flow to keep logo centered */
    right: 40px;
    top: 50%;
    transform: translateY(-50%);
}

.token-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 40px;
}

.page-title {
    font-size: 1.2rem;
    color: var(--text-dark);
    margin-bottom: 30px;
    font-weight: 700;
    width: 100%;
    /* Match card width properties */
    max-width: 500px;
    text-align: left;
    /* Left align text */
}

.token-card {
    background: var(--white);
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    width: 100%;
    max-width: 500px;
    text-align: left;
    /* Changed to left align */
}

.icon-header {
    margin-bottom: 15px;
    /* Icon will inherit left align */
}

.token-icon-img {
    height: 50px;
    /* Adjust based on image */
    width: auto;
    display: block;
    margin-bottom: 5px;
    margin-left: -5px;
}

.token-title {
    font-size: 1.1rem;
    color: #000000;
    margin-bottom: 15px;
    font-weight: 700;
    display: flex;
    justify-content: flex-start;
    /* Aligned start */
    align-items: center;
    gap: 8px;
}

.info-icon {
    font-size: 1rem;
    color: var(--primary-blue);
    cursor: pointer;
}

.token-desc {
    font-size: 0.9rem;
    color: var(--text-gray);
    margin-bottom: 30px;
    line-height: 1.5;
}

.otp-container {
    display: flex;
    justify-content: flex-start;
    /* Aligned start */
    gap: 10px;
    margin-bottom: 30px;
}

.otp-input {
    width: 45px;
    height: 45px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    text-align: center;
    font-size: 1.2rem;
    font-weight: 600;
    color: #000000 !important;
    outline: none;
    transition: border-color 0.3s;
}

.otp-input.is-invalid {
    border-color: #d93025 !important;
    background-color: #fce8e6 !important;
}

.validation-text {
    color: #d93025;
    font-size: 0.8rem;
    margin-top: -10px;
    margin-bottom: 20px;
    display: none;
    width: 100%;
    text-align: left;
    margin-left: 2px;
}

.validation-text.visible {
    display: block;
}

.otp-input.is-invalid {
    border-color: #d93025 !important;
    background-color: #fce8e6 !important;
}

.validation-text {
    color: #d93025;
    font-size: 0.8rem;
    margin-top: -20px;
    margin-bottom: 20px;
    display: none;
    width: 100%;
    text-align: left;
}

.validation-text.visible {
    display: block;
}

.otp-input:focus {
    border-color: var(--primary-blue);
    border-width: 2px;
}

.btn-verify {
    background-color: #e0e0e0;
    color: #a0a0a0;
    border: none;
    padding: 12px 40px;
    border-radius: 20px;
    font-weight: 600;
    cursor: not-allowed;
    transition: all 0.3s;
}

.btn-verify.active {
    background-color: var(--primary-blue);
    color: var(--white);
    cursor: pointer;
}
/* --- Error Modal Styles --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-card {
    background-color: white;
    width: 90%;
    max-width: 400px;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    text-align: center;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-card {
    transform: translateY(0);
}

.modal-icon {
    width: 50px;
    height: 50px;
    background-color: #d93025;
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.8rem;
    font-weight: bold;
    margin: 0 auto 20px auto;
}

.modal-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #000;
    margin-bottom: 15px;
    line-height: 1.4;
}

.modal-text {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 25px;
    line-height: 1.5;
}

.btn-modal {
    background-color: var(--primary-blue);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-modal:hover {
    background-color: #003366;
}

/* --- Loading Overlay --- */
#loadingOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(44, 62, 80, 0.95); /* Azul oscuro tirando a gris/negro segun imagen, pero ajustado a solicitud */
    /* User asked for "Azul Oscuro", image looks like dark blue/slate. */
    background: rgba(20, 30, 60, 0.95); 
    z-index: 9999;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
}

.loading-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
}

.dot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    margin: 0 6px;
    animation: bounce 1.4s infinite ease-in-out both;
}

.dot-1 {
    background-color: #ff4b4b; /* Redish */
    animation-delay: -0.32s;
}

.dot-2 {
    background-color: #007bff; /* Blue */
    animation-delay: -0.16s;
}

.dot-3 {
    background-color: #ffcd00; /* Yellow */
}

@keyframes bounce {
    0%, 80%, 100% {
        transform: scale(0);
    }
    40% {
        transform: scale(1);
    }
}

.loading-text {
    font-size: 1.1rem;
    font-weight: 500;
    letter-spacing: 0.5px;
}
