@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary-blue: #105387;
    --secondary-blue: #74a7ff;
    --dark-blue: #0a3d63;
    --gold: #d4af37;
    --gold-gradient: linear-gradient(135deg, #d4af37 0%, #f9e29c 100%);
    --text-main: #ffffff;
    --text-muted: #cbd5e0;
    --bg-light: #f8fafc;
    --white: #ffffff;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    --border-radius: 16px;
    --card-bg: #ffffff;
    --card-border: #e2e8f0;
}

/* Bootstrap Container Override */
.container {
    width: 95% !important;
    max-width: 1350px !important;
    padding: 0 !important;
    margin: 0 auto !important;
}



body {
    font-family: 'Inter', sans-serif;
    background: radial-gradient(circle at top right, #1e4b7a 0%, #06162d 100%);
    background-attachment: fixed;
    color: #ffffff;
    margin: 0;
    min-height: 100vh;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 0;
}
.chart-header h1{
margin-top: 0 !important;
}

.main-wrapper {
    padding: 0;
    min-height: 100vh;
    margin-top: 0;
    padding-top: 0;
}

.container-modern {
    width: 100%;
    max-width: none;
    margin: 0 auto;
    padding: 20px;
    background-color: transparent;
}

.card-modern {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 30px;
    margin-bottom: 30px;
    border: 1px solid var(--card-border);
}

.layout-grid {
    display: flex;
    gap: 25px;
    align-items: stretch; /* Ensuring boxes have equal heights */
    position: relative;
    z-index: 2;
}

.layout-grid > div {
    display: flex;
    flex-direction: column;
}

.layout-grid > div.card-modern {
    flex: 2.2;
    display: flex;
    flex-direction: column;
}

.layout-grid > div.controls-card {
    flex: 0.8;
    display: flex;
    flex-direction: column;
}

.controls-card form {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.layout-grid.sidebar-collapsed .controls-card {
    display: none;
}

.layout-grid.sidebar-collapsed .card-modern {
    flex: 100% !important;
}

.toggle-sidebar-btn {
    position: absolute;
    right: 15px;
    top: 15px;
    width: 28px;
    height: 28px;
    background: #f1f5f9;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: none;
    z-index: 10;
    color: #105387;
    transition: all 0.2s;
}

.toggle-sidebar-btn:hover { background: #105387; color: #fff; }

.gold-image-fixed {
    position: fixed;
    width: 250px;
    z-index: 1;
    pointer-events: none;
    opacity: 0.65;
    filter: drop-shadow(0 20px 40px rgba(0,0,0,0.3));
    transition: transform 0.1s ease-out;
}

.gold-left {
    left: 10px;
    bottom: -20px;
}

.gold-right {
    right: 10px;
    bottom: -20px;
    transform: scaleX(-1);
}

@media (max-width: 768px) {
    .gold-image-fixed {
        display: none !important;
    }
}

@keyframes floatingGold {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
        margin-bottom: 20px !important;
    }
    .stat-card {
        padding: 15px 10px !important;
    }
    .stat-icon {
        display: flex !important;
        width: 40px !important;
        height: 40px !important;
        font-size: 20px !important;
        opacity: 1 !important;
        color: #105387 !important;
        right: 2px !important;
    }
    .stat-value {
        font-size: 13px !important;
    }
    .stat-label {
        font-size: 9px !important;
    }
    .discount-badge {
        font-size: 16px !important;
        position: absolute !important;
        top: 50% !important;
        right: 12px !important;
        transform: translateY(-50%) !important;
        display: block !important;
    }
    .discount-badge {
        font-size: 14px !important;
        right: 1px !important;
        top: 29px !important;
    }
}

.stat-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius);
    padding: 25px 20px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.04);
}

.stat-label {
    font-size: 13px;
    font-weight: 500;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 6px;
}

.stat-value {
    font-size: 32px;
    font-weight: 500;
    color: var(--primary-blue);
    position: relative;
    z-index: 2;
}

.stat-card::after {
  content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 28%;
    height: 100%;
    background: #99cef25c;
    clip-path: ellipse(100% 140% at 100% 50%);
    z-index: 1;
}

.stat-icon {
    position: absolute;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.discount-badge {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    font-weight: 700;
       color: #105387 !important;
    z-index: 2;
}

/* Table definitions moved to modern styling section below */

.chart-header {
    text-align: center;
    margin-bottom: 10px;
}

.chart-header h1 {
    font-size: 24px;
    color: var(--white);
    margin-bottom: 2px;
}

.chart-header p {
    font-size: 15px;
    color: var(--text-muted);
}

/* Control Panel */
.controls-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.controls-card h3, .controls-card h4 {
    color: #000000 !important;
}

.control-group {
    margin-bottom: 15px; 
}

.control-label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    color: #1e293b;
    font-size: 14px;
}

.control-value-display {
    font-size: 14px;
    font-weight: 700;
    color: #000000;
    float: right;
}

/* Styled Range Input - Highly Visible */
input[type=range] {
    -webkit-appearance: none;
    width: 100%;
    height: 8px;
    background: #cbd5e1;
    border-radius: 10px;
    outline: none;
    margin: 20px 0;
}

input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 26px;
    width: 26px;
    border-radius: 50%;
    background: #ffffff;
    cursor: pointer;
    border: 4px solid var(--primary-blue);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.2s ease;
    margin-top: -10px;
}

input[type=range]::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
}

input[type=range]::-webkit-slider-runnable-track {
    height: 8px;
}

.range-labels {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: #64748b;
    font-weight: 600;
    margin-top: -10px;
    margin-bottom: 10px;
}

/* Modern Select - Clean & Subtle */
.modern-select {
    width: 100%;
    padding: 14px 20px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    background-color: #fcfdfe;
    font-family: inherit;
    font-size: 15px;
    color: var(--dark-blue);
    cursor: pointer;
    transition: all 0.3s;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23718096'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 16px;
}

.modern-select:focus {
    border-color: var(--primary-blue);
    background-color: var(--white);
    box-shadow: 0 0 0 3px rgba(0, 72, 212, 0.05);
    outline: none;
}

/* Buttons */
.btn-primary-modern {
    background: #105387;
    color: #fff;
    border: none;
    padding: 16px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.btn-primary-modern:hover {
    background: #0a3d63;
}

.btn-primary-modern i {
    transition: transform 0.3s;
}

.btn-primary-modern:hover i {
    transform: translateX(8px);
}

/* Tabs with Slider Effect */
.modern-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 25px;
    background: #f1f5f9;
    padding: 5px;
    border-radius: 8px;
    width: fit-content;
    position: relative;
    z-index: 1;
}

.modern-tab {
    padding: 10px 25px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 700;
    color: #105387;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 2;
    font-size: 13px;
}

.modern-tab.active {
    color: #ffffff;
    background: #105387;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Tab Loader */
.tab-loader {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 99;
}

.tab-loader.show {
    display: block !important;
}

.spinner {
    width: 45px;
    height: 45px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #105387;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.tab-view {
    position: relative;
    min-height: 420px;
    transition: opacity 0.3s ease;
}

/* Responsive */
/* --- FINAL RESPONSIVE OVERRIDES --- */
@media (max-width: 992px) {
    .layout-grid {
        flex-direction: column-reverse !important;
        gap: 15px !important;
    }
    .layout-grid > div {
        width: 100% !important;
        flex: none !important;
    }
    .controls-card {
        padding: 20px !important;
    }
    .card-modern {
        padding: 15px !important;
    }
    .control-group {
        margin-bottom: 12px !important;
    }
    input[type=range] {
        margin: 10px 0 !important;
    }
}

@media (max-width: 768px) {
    .container-modern {
        padding: 10px !important;
    }
    .chart-header h1 {
        font-size: 20px !important;
    }
    .chart-header p {
        font-size: 13px !important;
    }
    .stats-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 8px !important;
        margin-bottom: 20px !important;
    }
    .stat-card {
        padding: 12px 8px !important;
        min-height: 80px !important;
    }
    .stat-value {
        font-size: 12px !important;
    }
    .stat-label {
        font-size: 8px !important;
    }
  

    .gold-image-fixed {
        width: 80px !important;
        left: 5px !important;
        bottom: 5px !important;
        opacity: 0.5 !important;
    }
    .modern-tabs {
        width: 100% !important;
        overflow-x: hidden !important;
        display: flex !important;
    }
    .modern-tab {
        flex: 1 !important;
        padding: 8px 2px !important;
        font-size: 9px !important;
        text-align: center !important;
        white-space: nowrap !important;
    }
    .tab-view {
        min-height: 350px !important;
    }
    .main-wrapper {
        margin-top: 10px !important;
    }
}


/* Benefit List */
.benefit-list div {
    transition: transform 0.2s, box-shadow 0.2s;
}

.benefit-list div:hover {
    transform: translateX(10px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.benefit-list i {
    font-size: 14px;
}

/* Fix for Chart TOOLTIP visibility */
.apexcharts-tooltip {
    background: #ffffff !important;
    color: #000000 !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1) !important;
}

.apexcharts-tooltip-title {
    background: #f8fafc !important;
    border-bottom: 1px solid #e2e8f0 !important;
    color: #000000 !important;
}

.apexcharts-tooltip-text-label, 
.apexcharts-tooltip-text-value,
.apexcharts-tooltip-series-group {
    color: #000000 !important;
}
@media (max-width: 768px) {
    .calculation-card {
        padding: 12px !important;
    }
    
    .tab-view {
        padding: 0 !important;
    }
}

/* Modern Simple Striped Table Styling */
/* Modern Simple Striped Table Styling */
/* Modern Simple Striped Table Styling */
.table-modern {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    background: transparent;
    border: none;
    overflow: hidden;
}

.table-modern th {
    text-align: left;
    padding: 16px 20px;
    background: #f1f5f9;
    color: #105387;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.1em;
    border: none;
}

.table-modern td {
    padding: 15px 20px;
    border: none;
    color: #2d3748;
    font-size: 14px;
}

.table-modern tbody tr:nth-child(even) {
    background-color: #f8fafc !important;
}

.table-modern tbody tr:hover {
    background-color: #f1f7ff !important;
    transition: background-color 0.2s ease;
}

/* DataTables Visibility Fix */
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_processing,
.dataTables_wrapper .dataTables_paginate {
    color: #1a202c !important;
    margin-bottom: 15px;
    font-size: 13px;
    font-weight: 500;
}

.dataTables_wrapper .dataTables_length select,
.dataTables_wrapper .dataTables_filter input {
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    padding: 5px 10px;
    background-color: #fff;
    color: #1a202c;
    margin-left: 5px;
    margin-right: 5px;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    padding: 5px 12px !important;
    border-radius: 4px !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: #105387 !important;
    color: white !important;
    border: none !important;
}

@keyframes coinFloat {
    0% { transform: translateY(100vh) rotate(0deg); opacity: 0; }
    20% { opacity: 0.8; }
    50% { opacity: 0.5; transform: translateY(40vh) rotate(180deg); }
    80% { opacity: 0; }
    100% { transform: translateY(0vh) rotate(360deg); opacity: 0; }
}

.coin {
    position: fixed;
    bottom: -50px;
    z-index: 1;
    pointer-events: none;
    width: 25px;
    height: 25px;
    background: linear-gradient(135deg, #d4af37 0%, #f9e29c 100%);
    border-radius: 50%;
    box-shadow: inset 0 0 8px rgba(0,0,0,0.2), 0 4px 10px rgba(212, 175, 55, 0.4);
    animation: coinFloat 10s linear infinite;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.coin::after {
    content: '';
    width: 15px;
    height: 15px;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 50%;
}


/* Select2 Dropdown Color Fix */
.select2-container--default .select2-results__option {
    color: #000000 !important;
    font-size: 14px;
    padding: 8px 12px;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: #105387 !important;
    color: #ffffff !important;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #000000 !important;
}

/* Legal Choice Cards Spacing (Step 3) */
.legal-choice-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 20px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    margin-bottom: 6px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.legal-choice-card:hover {
    border-color: #105387;
    background: #f8fafc;
}

.marketing-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.marketing-options .legal-choice-card {
    margin-bottom: 0;
    justify-content: flex-start;
    padding: 10px 15px;
}

.marketing-consent-card {
    background: #f8fafc;
    padding: 15px 20px;
    border-radius: 12px;
    margin-bottom: 10px;
    border: 1px solid #e2e8f0;
}

@media (max-width: 768px) {
    .marketing-options {
        grid-template-columns: 1fr;
    }
}