:root {
    --primary-blue: #1A3668;
    --accent-gold: #FFD100;
    --text-dark: #334155;
    --text-light: #94A3B8;
    --bg-light: #F8FAFC;
    --card-bg: rgba(255, 255, 255, 0.95);
    --border-color: #E2E8F0;
    --success-green: #10B981;
    --ch1: #10B981;
    --ch2: #F59E0B;
    --ch3: #EF4444;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    margin: 0;
    overflow-x: hidden;
}

/* Splash Screen */
.splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #1A3F8F;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    transition: opacity 0.5s ease-out;
}

.splash-content {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.splash-logo {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.premium-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 30px 20px 40px; /* Reduced from 100px to 30px */
    min-height: 100vh;
}

/* Header */
.premium-header {
    background: var(--primary-blue);
    background: white;
    padding: 15px 0;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
    margin-bottom: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80px;
}

.premium-logo {
    display: flex;
    align-items: center;
    justify-content: center;
}

.premium-logo img {
    height: 45px;
    width: auto;
}

/* Grid System */
.main-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 30px;
    transition: all 0.5s ease;
}

.main-grid.results-mode {
    grid-template-columns: 1fr;
}

.main-grid.results-mode #columna2 {
    display: none !important;
}

.main-grid.results-mode .content {
    max-width: 900px;
    margin: 0 auto;
    width: 100%;
}

@media (max-width: 991px) {
    .main-grid {
        grid-template-columns: 1fr;
    }
}

/* Cards */
.premium-card {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 35px;
    box-shadow: 0 15px 35px rgba(26, 54, 104, 0.05);
    border: 1px solid rgba(226, 232, 240, 0.5);
    backdrop-filter: blur(10px);
    margin-bottom: 30px;
}

.premium-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 25px;
    color: var(--primary-blue);
    display: flex;
    align-items: center;
    gap: 12px;
}

.premium-description {
    color: var(--text-light);
    font-size: 14px;
    margin-bottom: 30px;
    line-height: 1.6;
}

/* Forms */
label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-control {
    border-radius: 12px;
    border: 1.5px solid var(--border-color);
    padding: 12px 18px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: white;
}

.form-control:focus {
    border-color: var(--accent-gold);
    box-shadow: 0 0 0 4px rgba(255, 209, 0, 0.1);
    outline: none;
}

/* Buttons */
.premium-btn {
    padding: 14px 28px;
    border-radius: 14px;
    font-weight: 700;
    font-size: 15px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
}

.btn-primary-gold {
    background: var(--accent-gold);
    color: var(--primary-blue);
}

.btn-primary-gold:hover {
    background: #e6bc00;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 209, 0, 0.3);
}

.btn-outline-blue {
    background: transparent;
    border: 1.5px solid var(--primary-blue);
    color: var(--primary-blue);
}

/* 4-Step Navigation Indicators v4 */
.steps-nav { 
    display: flex; 
    justify-content: center; 
    margin-bottom: 50px; 
    gap: 15px; 
    flex-wrap: wrap; 
}

.step-item { 
    display: flex; 
    align-items: center; 
    gap: 8px; 
    color: #94A3B8; 
    font-weight: 500; 
    font-size: 13px; 
    transition: all 0.3s ease;
}

.step-item.active { 
    color: var(--primary-blue); 
    font-weight: 700; 
}

.step-item.active-prev {
    color: var(--primary-blue);
    opacity: 0.8;
}

.step-circle { 
    width: 28px; 
    height: 28px; 
    border-radius: 50%; 
    background: #E2E8F0; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    color: white; 
    font-size: 12px; 
    line-height: 1; 
    transition: all 0.3s ease;
}

.step-item.active .step-circle { 
    background: var(--primary-blue); 
    box-shadow: 0 4px 10px rgba(26, 54, 104, 0.2);
}

.step-item.active-prev .step-circle {
    background: var(--primary-blue);
}

/* Insurance Cards */
.insurance-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 25px;
}

.insurance-option-card {
    border: 2px solid var(--border-color);
    border-radius: 16px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    background: white;
}

.insurance-option-card:hover {
    border-color: var(--accent-gold);
    transform: translateY(-3px);
}

.insurance-option-card.selected {
    border-color: var(--accent-gold);
    background: rgba(255, 209, 0, 0.05);
    box-shadow: 0 8px 20px rgba(255, 209, 0, 0.1);
}

.insurance-option-card img {
    height: 40px;
    object-fit: contain;
    margin-bottom: 12px;
}

/* Gamified Selectors */
.gamified-selectors {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
}

.selector-box {
    flex: 1;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 16px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.selector-box.active {
    border-color: var(--success-green);
    background: rgba(16, 185, 129, 0.05);
}

.selector-title {
    font-weight: 700;
    font-size: 14px;
    color: var(--primary-blue);
}

.selector-desc {
    font-size: 11px;
    color: var(--text-light);
}

/* Custom Range */
.premium-slider-box {
    background: #F1F5F9;
    padding: 25px;
    border-radius: 20px;
    margin-bottom: 25px;
}

.premium-range {
    width: 100%;
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
    appearance: none;
    outline: none;
}

.premium-range::-webkit-slider-thumb {
    appearance: none;
    width: 24px;
    height: 24px;
    background: var(--accent-gold);
    border: 4px solid white;
    box-shadow: 0 0 10px rgba(255, 209, 0,0.5);
    border-radius: 50%;
    cursor: pointer;
    transition: 0.2s;
}

/* Results Sidebar */
.sidebar-sticky {
    position: sticky;
    top: 100px;
}

.summary-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--primary-blue);
}

.summary-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 14px;
}

.summary-val {
    font-weight: 700;
    color: var(--primary-blue);
}

.summary-total-box {
    background: var(--primary-blue);
    color: white;
    padding: 20px;
    border-radius: 15px;
    margin-top: 25px;
    text-align: center;
}

.summary-total-label {
    font-size: 12px;
    opacity: 0.8;
}

.summary-total-value {
    font-size: 24px;
    font-weight: 800;
    margin-top: 5px;
}

/* Custom Switch */
.custom-switch {
    width: 44px;
    height: 24px;
    background: #CBD5E1;
    border-radius: 20px;
    position: relative;
    transition: all 0.3s ease;
}

.selector-box.active .custom-switch {
    background: var(--success-green);
}

.custom-switch::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    background: white;
    border-radius: 50%;
    top: 3px;
    left: 3px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.selector-box.active .custom-switch::after {
    left: 23px;
}

/* Loader */
.loader {
    width: 48px;
    height: 48px;
    border: 5px solid var(--border-color);
    border-bottom-color: var(--primary-blue);
    border-radius: 50%;
    display: block;
    box-sizing: border-box;
    animation: rotation 1s linear infinite;
    margin: 30px auto;
}

@keyframes rotation {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Term Cards */
.term-card {
    transition: all 0.3s ease;
    border: 2px solid var(--border-color) !important;
}

.term-card:hover:not(.disabled) {
    border-color: var(--accent-gold) !important;
    transform: translateY(-2px);
}

.term-card.selected {
    border-color: var(--accent-gold) !important;
    background: rgba(255, 209, 0, 0.05) !important;
    box-shadow: 0 4px 15px rgba(255, 209, 0, 0.15);
}

.term-card.disabled {
    opacity: 0.4;
    cursor: not-allowed !important;
    filter: grayscale(1);
    pointer-events: none;
}

/* Results Grid & Table */
.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--bg-light);
    padding-bottom: 25px;
    margin-bottom: 25px;
}

.payment-highlight {
    background: var(--primary-blue);
    color: white;
    padding: 20px 35px;
    border-radius: 16px;
    text-align: center;
}

.payment-label {
    font-size: 11px;
    opacity: 0.7;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.payment-value {
    font-size: 28px;
    font-weight: 800;
    color: var(--accent-gold);
}

.technical-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 30px;
}

.tech-box {
    background: #F8FAFC;
    padding: 15px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.tech-box .lbl {
    font-size: 10px;
    color: var(--text-light);
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.tech-box .val {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary-blue);
}

.table-container {
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    margin-top: 20px;
}

.premium-table {
    width: 100%;
    font-size: 13px;
    border-collapse: collapse;
}

.premium-table th {
    background: #F1F5F9;
    padding: 15px;
    text-align: left;
    color: var(--primary-blue);
    font-weight: 700;
}

.premium-table td {
    padding: 12px 15px;
    border-bottom: 1px solid var(--border-color);
}

/* System Notifications (Toasts) */
.toast-notification {
    background: white;
    padding: 10px 18px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(26, 54, 104, 0.15);
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    animation: slideInRight 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    border: 1px solid rgba(226, 232, 240, 0.8);
    pointer-events: auto;
    max-width: 320px;
}

.toast-icon {
    width: 28px;
    height: 28px;
    background: #FFFBEB;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-gold);
    flex-shrink: 0;
}

.toast-message {
    font-size: 12px;
    line-height: 1.4;
    font-weight: 600;
    color: var(--primary-blue);
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(50px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes fadeOut {
    from { opacity: 1; transform: scale(1); }
    to { opacity: 0; transform: scale(0.95); }
}

/* Locked State */
.selector-box.locked {
    opacity: 0.6;
    cursor: not-allowed;
    background: #F1F5F9;
}

.selector-box.locked .custom-switch {
    background: #CBD5E1 !important;
}

.selector-box.locked .selector-title::after {
    content: "(Restringido)";
    font-size: 10px;
    color: var(--text-light);
    margin-left: 8px;
    font-weight: normal;
}

/* Bootstrap Select Overrides to fix overlap */
.bootstrap-select .dropdown-toggle .filter-option-inner-inner {
    font-weight: 600;
    color: var(--primary-blue);
}

.bootstrap-select .dropdown-menu {
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    padding: 8px;
}

.bootstrap-select .dropdown-menu li a {
    border-radius: 8px;
    padding: 10px 15px !important;
    margin: 2px 0;
    transition: all 0.2s ease;
}

.bootstrap-select .dropdown-menu li a:hover {
    background: var(--light-bg) !important;
    color: var(--primary-blue) !important;
}

.bootstrap-select .dropdown-menu .selected a {
    background: var(--primary-blue) !important;
    color: white !important;
}

@media (max-width: 768px) {
    .technical-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .results-header {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    .steps-nav {
        display: none;
    }
}

@media (orientation: portrait) {
    #columna2 {
        display: none;
    }

    .premium-container {
        padding: 10px;
        min-height: 60dvh;
    }

    .filter-option-inner-inner {
        text-wrap: wrap;
    }

    .premium-header {
        max-width: 100vw;
        margin-bottom: 0px;
        overflow-x: hidden;
    }

    .premium-card {
        margin-bottom: 0px;
        max-width: 95vw;
    }

    .dropdown-menu {
        max-width: 80vw;
    }

    .dropdown-item {
       text-wrap: wrap;
    }

    .insurance-price {
        overflow: hidden;
    }

    .insurance-grid {
        display: flex;
        flex-direction: column;
    }

    .insurance-grid > * {
        min-width: 0%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .gamified-selectors {
        display: flex;
        flex-direction: column;
    }

    .premium-slider-box {
        padding: 25px 25px 40px 25px;
    }

    #currentEng {
        position: absolute;
        margin-top: 20px;
        text-align: center;
        left: 50%;
        transform: translateX(-50%);
    }

    .premium-btn-group {
        display: flex;
        flex-direction: column;
    }
}