
/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Playfair+Display:wght@400;600;700;800&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:wght,FILL@100..700,0..1&display=swap');

/* Color Variables - New Professional Palette */
:root {
    --color-primary: #0A1128;  /* CHANGED: was #10b77f, now navy */
    --color-primary-hover: #1C2B50;  /* CHANGED: was #0e9f6e, now lighter navy */
    --color-secondary: #50E3C2;
    --color-accent: #FFC107;
    --color-text-dark: #0A1128;
    --color-text-light: #f4f4f4;
    --color-bg-light: #F9FAFB;
    --color-bg-dark: #0A1128;
    --color-border: #E5E7EB;
    --color-shadow: rgba(0, 0, 0, 0.1);
    --color-navy-teal-bg: linear-gradient(135deg, #2c3e50 0%, #50E3C2 100%);
    --color-navy-action: #0A1128;
    --color-navy-action-hover: #070c1d;
    --background-light: #F9FAFB;
    --card-white: #FFFFFF;
    --border-light: #E5E7EB;
    --text-navy: #0A1128;
    --text-slate: #334155;
    --text-slate-light: #64748B;
    --academic-gold: #C5A059;
    --academic-gold-fade: #E8DCC4;
    --sage-light: #F0F7F4;
    --cream: #FDFBF7;
}

/* General Reset and Body Styling */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--background-light);
    min-height: 100vh;
    color: var(--text-slate);
    display: flex;
    flex-direction: column;
}

/* Typography */
h1, h2, h3, .serif-font {
    font-family: 'Playfair Display', serif;
}

/* Container for overall layout */
.container {
    max-width: 1400px; /* increased from 1200px */
    margin: 0 auto;
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

/* Header Styling */

/* Update existing styles to match new design */
.header {
    background: white;
    border-bottom: 1px solid var(--border-light);
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.header h1 {
    color: var(--text-navy);
    font-size: 1.875rem;
    font-weight: 700;
    font-family: 'Playfair Display', serif;
    margin-bottom: 8px;
}

.header p {
    color: var(--text-slate);
    font-size: 1rem;
    font-weight: 300;
}



#featured-insights-banner.collapsed {
    max-height: 0;
    padding: 0;
    margin: 0;
    opacity: 0;
    border-width: 0;
}

#featured-insights-banner {
    max-height: 1000px;
    transition: all 0.3s ease;
}

/* Main Content Layout (Sidebar + Models) */
.main-content {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 20px;
    margin-bottom: 40px;
    transition: grid-template-columns 0.3s ease;
}

.main-content.sidebar-minimized-grid {
    grid-template-columns: 64px 1fr;
}

/* Sidebar Styling */
.sidebar {
    background: white;
    padding: 12px;
    border-radius: 10px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.01);
    height: fit-content;
    position: sticky;
    top: 16px;
    width: 280px;
    transition: width 0.3s ease, padding 0.3s ease;
    overflow: hidden;
}

.sidebar h3 {
    color: var(--text-navy);
    margin-bottom: 12px;
    font-size: 1.2em;
    font-weight: 600;
}

.sidebar-minimized {
    width: 64px !important;
    padding: 8px;
}

.sidebar-minimized .filter-content,
.sidebar-minimized .tab-navigation,
.sidebar-minimized .tab-content,
.sidebar-minimized .time-config h3,
.sidebar-minimized .filters h3 {
    display: none;
}

.sidebar-minimized .sidebar-header {
    justify-content: center;
}

/* Sidebar Header for Toggle Button */
.sidebar-header {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 6px;
    padding: 5px;
}

.sidebar-header button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: background-color 0.3s ease, color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-header button:hover {
    background-color: #e9ecef;
    color: var(--color-primary);
}

#toggleIcon {
    font-size: 1.2em;
    color: #666;
    transition: color 0.3s ease, transform 0.3s ease;
}

.sidebar-minimized #toggleIcon {
    transform: rotate(180deg);
}

/* Time Period Configuration */
.time-config {
    margin-bottom: 15px;
}

.time-toggle {
    display: flex;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 3px;
    margin-bottom: 8px;
}

.time-toggle button {
    flex: 1;
    padding: 6px;
    border: none;
    background: transparent;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.time-toggle button.active {
    background: var(--color-primary);
    color: white;
}

.time-input {
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.time-input label {
    margin-bottom: 0;
    font-weight: 500;
    color: #555;
    white-space: nowrap;
}

.time-input input {
    flex-grow: 1;
    padding: 7px;
    border: 2px solid var(--border-light);
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
    text-align: left;
}

.time-input input:focus {
    outline: none;
    border-color: var(--color-primary);
}

.time-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 8px;
    justify-content: flex-start;
}

.preset-btn {
    padding: 4px 8px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s ease;
}

.preset-btn:hover {
    background: #e9ecef;
}

.preset-btn.active {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

.helper-text {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
    text-align: left;
}

/* Filters Styling */
.filters {
    margin-bottom: 20px;
}

.search-bar {
    width: 100%;
    padding: 7px;
    border: 2px solid var(--border-light);
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 8px;
    text-align: left;
}

.search-bar:focus {
    outline: none;
    border-color: var(--color-primary);
}

/* Filter Groups */
.filter-group {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.filter-group label {
    margin-bottom: 0;
    font-weight: 500;
    color: #555;
    flex-shrink: 0;
}

.filter-group select {
    flex-grow: 0;
    width: auto;
    max-width: 120px !important;
    padding: 6px;
    border: 2px solid var(--border-light);
    border-radius: 8px;
    font-size: 14px;
    text-align: left;
    text-align-last: left;
}

.filter-group select:focus {
    outline: none;
    border-color: var(--color-primary);
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    margin-bottom: 15px;
    justify-content: flex-start;
}

.checkbox-group label {
    order: 0;
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--color-primary);
}

.reset-filters-btn {
    width: 100%;
    padding: 10px;
    background: transparent;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.reset-filters-btn:hover {
    background: var(--color-primary);
    color: white;
}

/* Models Section Styling */
/* Models Section Styling */
.models-section {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.01);
    transition: all 0.3s ease;
    flex: 1; /* Let it take remaining space */
}

/* If they're in a flex container, make sure parent has this: */
.main-content {
    display: flex;
    gap: 20px;
}


.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.section-title {
    color: var(--text-navy);
    font-size: 1.5em;
    font-weight: 600;
}

.help-link {
    color: var(--color-primary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

.help-link:hover {
    text-decoration: underline;
}


.models-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}




/* Model Card Styling */
.model-card {
    background: white;
    border: 2px solid var(--border-light);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.01);
}

.model-card:hover {
    border-color: var(--color-primary);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.model-card.selected {
    border-color: var(--color-primary);
    background: #f8f9ff;
}

.model-card.selected::after {
    content: "✓";
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--color-primary);
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
}

.model-card.unsupported {
    opacity: 0.6;
    cursor: not-allowed;
    border-color: #dee2e6;
    box-shadow: none;
}

.model-card.unsupported:hover {
    transform: none;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.01);
    border-color: #dee2e6;
}

.model-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.model-title {
    font-size: 1.1em;
    font-weight: 600;
    color: var(--text-navy);
    margin-bottom: 5px;
}

.model-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.badge {
    padding: 4px 8px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge.free {
    background: #28A745;
    color: white;
}

.badge.premium {
    background: var(--color-primary);
    color: white;
}

.badge.popular {
    background: var(--academic-gold);
    color: white;
}

.badge.coming-soon {
    background: #6c757d;
    color: white;
}

.complexity {
    display: inline-block;
    padding: 2px 6px;
    font-size: 10px;
    background: #f8f9fa;
    border-radius: 3px;
    color: #666;
    margin-top: 5px;
}

.model-description {
    color: var(--text-slate);
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 15px;
}

.model-icon {
    width: 40px;
    height: 40px;
    background: var(--color-primary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    margin-bottom: 10px;
}

/* Button Styling */
.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: var(--color-primary);
    color: white;
}

.btn-primary:hover {
    background: var(--color-primary-hover);
}

.btn-secondary {
    background: transparent;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
}

.btn-secondary:hover {
    background: var(--color-primary);
    color: white;
}

.btn-text {
    background: transparent;
    color: var(--color-primary);
    border: none;
    padding: 4px 8px;
}

.btn-text:hover {
    text-decoration: underline;
}

.btn:disabled, .btn[disabled] {
    background-color: #cccccc;
    color: #666666;
    cursor: not-allowed;
    border: none;
    opacity: 0.8;
}

/* Action Bar at the bottom */
.action-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.01);
    margin-top: 40px;
}

.action-left {
    display: flex;
    gap: 15px;
}

.btn-large {
    padding: 15px 30px;
    font-size: 16px;
    font-weight: 600;
}

/* Recently Used Models */
.recently-used {
}

.recently-used h4 {
    color: #555;
    margin-bottom: 15px;
}

.recent-models {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: flex-start;
}

.recent-model {
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 6px;
    font-size: 14px;
    color: #666;
    text-decoration: none;
    transition: all 0.3s ease;
}

.recent-model:hover {
    background: #e9ecef;
    color: #333;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.empty-state h3 {
    margin-bottom: 10px;
    color: #999;
}

/* Loading Skeleton */
.loading-skeleton {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    animation: pulse 1.5s infinite ease-in-out;
}

.skeleton-line {
    height: 20px;
    background: #e9ecef;
    border-radius: 4px;
    margin-bottom: 10px;
}

.skeleton-line.short {
    width: 60%;
}

.skeleton-line.medium {
    width: 80%;
}

@keyframes pulse {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}

/* Modal Styling */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(8px);
}

.modal-content {
    background: white;
    border-radius: 15px;
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    border-bottom: 1px solid var(--border-light);
}

.modal-header h3 {
    color: var(--text-navy);
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: var(--color-primary);
}

.modal-body {
    padding: 30px;
}

/* Help Section */
.help-section {
    margin-top: 40px;
}

.help-section > div {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.01);
}

.help-section h3 {
    color: var(--text-navy);
    margin-bottom: 20px;
}

.help-section .help-item {
    text-align: center;
    padding: 20px;
}

.help-section .help-icon {
    width: 60px;
    height: 60px;
    background: var(--sage-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    font-size: 24px;
}

.help-section h4 {
    margin-bottom: 10px;
    color: var(--text-navy);
}

.help-section p {
    color: #666;
    font-size: 14px;
    margin-bottom: 15px;
}

/* Footer */
footer {
    margin-top: 60px;
    padding: 40px 0;
    border-top: 1px solid var(--border-light);
    text-align: center;
    color: #666;
}

footer a {
    color: #666;
    text-decoration: none;
    margin: 0 15px;
    transition: color 0.3s ease;
}

footer a:hover {
    text-decoration: underline;
    color: var(--color-primary);
}




/* Sidebar Container */
.model-sidebar {
    width: 260px;
    background: white;
    border-right: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    flex-shrink: 0;
}

/* Sidebar Header */
.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid #e5e7eb;
}

.sidebar-header h2 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-navy);
    margin: 0;
}

.sidebar-header .subtitle {
    font-size: 11px;
    color: #94a3b8;
    margin-top: 4px;
}

/* Sheets Label */
.sheets-label {
    padding: 16px 20px 8px 20px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #94a3b8;
}

/* Sheet Tabs Container */
#sheet-tabs {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 8px 12px;
    margin: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    overflow-y: auto;
    flex: 1;
}

/* Sheet Tab Buttons */
#sheet-tabs button {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    text-align: left;
    font-size: 13.5px;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #64748b;
    background: transparent;
    border: none;
    width: 100%;
    text-transform: none;
    letter-spacing: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#sheet-tabs button:hover {
    background: #f1f5f9;
    color: #334155;
}

#sheet-tabs button.active {
    background: rgba(197, 160, 89, 0.1);
    color: #C5A059;
    border-left: 3px solid #C5A059;
    padding-left: 11px;
    font-weight: 600;
}

/* Icons in Sheet Tabs */
#sheet-tabs button .material-icons-outlined {
    font-size: 18px;
    color: #94a3b8;
    transition: color 0.2s ease;
    flex-shrink: 0;
    font-family: 'Material Icons Outlined';
}

#sheet-tabs button:hover .material-icons-outlined {
    color: #C5A059;
}

#sheet-tabs button.active .material-icons-outlined {
    color: #C5A059;
}

/* Main Content Area */
.model-main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Top Header */
.model-header {
    height: 70px;
    background: white;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 32px;
    flex-shrink: 0;
}

.model-header h1 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-navy);
    margin: 0;
}

.model-header p {
    font-size: 12px;
    color: #94a3b8;
    margin: 4px 0 0 0;
}

/* Content Wrapper */
.sheet-content-wrapper {
    flex: 1;
    overflow: auto;
    padding: 24px;
}

/* Sheet Content */
.sheet-content {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.sheet-content table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.sheet-content th,
.sheet-content td {
    border: 1px solid #e5e7eb;
    padding: 10px 14px;
    text-align: left;
}

.sheet-content th {
    background: #f8fafc;
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #475569;
}

.sheet-content tr:nth-child(even) {
    background-color: #fafbfc;
}

.sheet-content tr:hover {
    background-color: #f8fafc;
}

/* Footer */
.model-footer {
    background: white;
    border-top: 1px solid #e5e7eb;
    padding: 16px 24px;
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    flex-shrink: 0;
}

/* Custom Scrollbar */
#sheet-tabs::-webkit-scrollbar,
.sheet-content-wrapper::-webkit-scrollbar {
    width: 4px;
    height: 4px;
}

#sheet-tabs::-webkit-scrollbar-track,
.sheet-content-wrapper::-webkit-scrollbar-track {
    background: transparent;
}

#sheet-tabs::-webkit-scrollbar-thumb,
.sheet-content-wrapper::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

#sheet-tabs::-webkit-scrollbar-thumb:hover,
.sheet-content-wrapper::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* END OF SHEET STYLE */
.print-buttons-container {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

/* Tab Navigation */
.tab-navigation {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-light);
    gap: 5px;
    background: var(--background-light);
    border-radius: 8px;
    padding: 4px;
}

.tab-button {
    flex: 1;
    padding: 10px 15px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    border-radius: 6px;
    color: #666;
    font-size: 0.9em;
}

.tab-button.active {
    color: var(--color-primary);
    background: white;
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.tab-content {
    display: none;
    padding-top: 10px;
}

.tab-content.active {
    display: block;
}

/* Update Model Button */
#update-model-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
    padding: 16px 32px;
    font-size: 16px;
    font-weight: 600;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-hover) 100%);
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(16, 183, 127, 0.4), 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateY(0);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
}

#update-model-btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(16, 183, 127, 0.5), 0 6px 16px rgba(0, 0, 0, 0.2);
}


/* Language Switcher in Top Bar */
.language-select-model {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    padding: 8px 32px 8px 12px;
    border: 2px solid #E2E8F0;
    border-radius: 8px;
    background: white;
    color: #0A1128;
    cursor: pointer;
    transition: all 0.2s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23334155' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    min-width: 150px;
}

.language-select-model:hover {
    border-color: #C5A059;
    box-shadow: 0 0 0 3px rgba(197, 160, 89, 0.1);
}

.language-select-model:focus {
    outline: none;
    border-color: #C5A059;
    box-shadow: 0 0 0 3px rgba(197, 160, 89, 0.15);
}



/* Print Styles */
@media print {
    body > *:not(#model-display-section) {
        display: none !important;
    }
    #model-display-section {
        display: block !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        box-shadow: none !important;
        background: none !important;
    }
    #model-display-section .sheet-content {
        display: block !important;
        visibility: visible !important;
    }
    .sheet-tabs, .model-controls-top, .header, footer, .action-bar, .model-actions-bottom, .help-section {
        display: none !important;
    }
    .printable-chart-image {
        max-width: 100%;
        height: auto;
        margin-bottom: 20px;
        border: 1px solid #eee;
        box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    }
}

/* Chart Styling */
.chart-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    padding: 20px;
}

.chart-container {
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.chart-container canvas {
    width: 100% !important;
    height: 300px !important;
}

.chart-container h3 {
    text-align: center;
    margin-bottom: 15px;
    color: var(--text-navy);
}

/* Assumptions Styling */
.assumption-input-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 10px;
    background-color: #f0f4f7;
    border-radius: 8px;
    margin-bottom: 10px;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}

.assumption-label {
    font-weight: 600;
    color: var(--text-navy);
    font-size: 0.95em;
}

.current-value-display {
    font-size: 1.1em;
    font-weight: bold;
    color: var(--color-primary);
    margin-bottom: 5px;
}

.range-slider-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 5px;
}

.range-slider-container input[type="range"] {
    flex-grow: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 8px;
    background: #d3d3d3;
    outline: none;
    opacity: 0.7;
    transition: opacity .2s;
    border-radius: 5px;
}

.range-slider-container input[type="range"]:hover {
    opacity: 1;
}

.range-slider-container input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--color-primary);
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.range-slider-container input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--color-primary);
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.range-min-max {
    font-size: 0.8em;
    color: #666;
    white-space: nowrap;
}

.input-description-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 5px;
    flex-wrap: wrap;
}

.precise-value-input {
    flex-grow: 1;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 0.9em;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.08);
}

.precise-value-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px rgba(16, 183, 127, 0.2);
}

.assumption-description {
    font-size: 0.85em;
    color: #666;
    flex-shrink: 0;
    max-width: 40%;
    text-align: left;
}

.assumptions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    padding: 20px;
}

/* Insights Content */
.insights-content {
    padding: 20px;
    line-height: 1.6;
    color: #444;
}

.insights-content h3 {
    color: var(--color-primary);
    margin-top: 25px;
    margin-bottom: 15px;
    font-size: 1.4em;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
}

.insights-content p {
    margin-bottom: 10px;
    font-size: 1.05em;
}

.insights-content ul {
    list-style-type: disc;
    margin-left: 25px;
    margin-bottom: 20px;
}

.insights-content ul li {
    margin-bottom: 8px;
}

/* Explanation Active State */
#sheet-content.explanation-active {
    background-color: #FFFFFF;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

#sheet-content.explanation-active table {
    width: 100%;
    border-collapse: collapse;
    border: none;
    margin: 0;
}

#sheet-content.explanation-active td,
#sheet-content.explanation-active th {
    color: #294A65;
    font-size: 16px;
    line-height: 1.5;
    padding: 10px;
    border: none;
    vertical-align: top;
}

#sheet-content.explanation-active td {
    display: flex;
    align-items: flex-start;
}

.entry {
    display: flex;
    align-items: flex-start;
    width: 100%;
    margin-left: 20px;
}

.green-text {
    color: var(--color-primary);
    font-size: 16px;
    font-weight: bold;
    flex-shrink: 0;
    width: 200px;
    margin-right: 10px;
    margin-left: 5px;
}

.colon {
    color: #294A65;
    flex-shrink: 0;
    width: 10px;
    margin-right: 5px;
}

.post-colon {
    flex-grow: 1;
    word-break: break-word;
}

/* Currency and Percentage Formatting */
.currency {
    text-align: right;
    font-family: 'Inter', sans-serif;
}

.percentage {
    text-align: right;
    font-family: 'Inter', sans-serif;
}

/* Load More Container */
.load-more-container {
    text-align: center;
    margin-top: 20px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .main-content {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        position: static;
        width: 100%;
    }
    
    .sidebar-minimized {
        width: 100% !important;
        padding: 8px;
    }
    
    .sidebar-minimized .sidebar-header {
        justify-content: flex-end;
    }
    
    .models-grid {
        grid-template-columns: 1fr;
    }
    
    .action-bar {
        flex-direction: column;
        gap: 15px;
    }

    .input-description-wrapper {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .assumption-description {
        max-width: 100%;
        text-align: left;
    }
    
    .assumptions-grid {
        grid-template-columns: 1fr;
    }

    .filter-group {
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        gap: 5px;
    }
    
    .filter-group label {
        width: auto;
        flex-basis: 100%;
        margin-bottom: 5px;
        text-align: left;
    }
    
    .filter-group select {
        width: 100%;
        max-width: 100% !important;
    }

    #update-model-btn {
        bottom: 20px;
        right: 20px;
        padding: 14px 24px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 10px;
    }
    
    .header h1 {
        font-size: 2em;
    }
    
    .time-presets {
        flex-direction: column;
    }
    
    .preset-btn {
        width: 100%;
        text-align: center;
    }
}





/* ==========================================
   CSS PATCH FOR MODEL DISPLAY SECTION ONLY
   Add this to the END of your existing CSS file
   ========================================== */

/* CSS Variables for Model Display */
:root {
    --sidebar-width: 260px;
    --actions-height: 70px;
}

/* ==========================================
   UPDATED MODEL DISPLAY SECTION STYLES
   ========================================== */

/* Model Display Section - Full Screen Layout */
.model-display-section {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: #f9fafb;
    z-index: 9999;
    display: flex;
    overflow: hidden;
}

.model-display-section.hidden {
    display: none !important;
}

/* Sidebar Container - FIXED WIDTH */
.model-sidebar {
    width: var(--sidebar-width);
    min-width: var(--sidebar-width);
    max-width: var(--sidebar-width);
    background: white;
    border-right: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    flex-shrink: 0;
}

/* Sidebar Header */
.model-sidebar .sidebar-header {
    padding: 20px;
    border-bottom: 1px solid #e5e7eb;
    flex-shrink: 0;
}

.model-sidebar .sidebar-header h2 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-navy);
    margin: 0;
}

.model-sidebar .sidebar-header .subtitle {
    font-size: 11px;
    color: #94a3b8;
    margin-top: 4px;
}

/* Sheets Label */
.sheets-label {
    padding: 16px 20px 8px 20px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #94a3b8;
    flex-shrink: 0;
}

/* Sheet Tabs Container */
#sheet-tabs {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 8px 12px;
    margin: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    overflow-y: auto;
    flex: 1;
}

/* Sheet Tab Buttons */
#sheet-tabs button {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    text-align: left;
    font-size: 13.5px;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #64748b;
    background: transparent;
    border: none;
    width: 100%;
    text-transform: none;
    letter-spacing: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#sheet-tabs button:hover {
    background: #f1f5f9;
    color: #334155;
}

#sheet-tabs button.active {
    background: rgba(197, 160, 89, 0.1);
    color: #C5A059;
    border-left: 3px solid #C5A059;
    padding-left: 11px;
    font-weight: 600;
}

/* Icons in Sheet Tabs */
#sheet-tabs button .material-icons-outlined {
    font-size: 18px;
    color: #94a3b8;
    transition: color 0.2s ease;
    flex-shrink: 0;
    font-family: 'Material Icons Outlined';
}

#sheet-tabs button:hover .material-icons-outlined {
    color: #C5A059;
}

#sheet-tabs button.active .material-icons-outlined {
    color: #C5A059;
}

/* Main Content Area - FILLS REMAINING SPACE */
.model-main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    width: calc(100% - var(--sidebar-width));
}

/* ==================== UPDATED MODEL DISPLAY TOP BAR STYLING ==================== */

/* Top action bar - three-column layout */
.model-actions-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    background: white;
    border-bottom: 1px solid #E2E8F0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    gap: 20px;
}

/* Left section - Back button */
.model-actions-top .action-group:first-child {
    flex: 0 0 auto;
    min-width: 200px;
}

/* Center section - Model name */
.model-actions-top .action-group:nth-child(2) {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

/* Right section - Actions dropdown */
.model-actions-top .action-group:last-child {
    flex: 0 0 auto;
    min-width: 250px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

/* Model title styling */
#model-display-title {
    font-family: 'Inter', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: #0A1128;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 400px;
}

/* Icon next to model title */
#model-display-title + .material-icons-outlined,
.action-group .material-icons-outlined {
    color: #C5A059;
    font-size: 24px;
    flex-shrink: 0;
}

/* Logo in sidebar */
.sidebar-header img {
    max-width: 180px;
    height: auto;
    display: block;
}

/* Remove the old title and subtitle from sidebar header */
.sidebar-header h2,
.sidebar-header .subtitle {
    display: none;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .model-actions-top {
        flex-wrap: wrap;
        gap: 12px;
    }
    
    /* Stack on smaller screens */
    .model-actions-top .action-group:first-child,
    .model-actions-top .action-group:nth-child(2),
    .model-actions-top .action-group:last-child {
        flex: 1 1 100%;
        min-width: unset;
    }
    
    .model-actions-top .action-group:nth-child(2) {
        justify-content: flex-start;
    }
    
    .model-actions-top .action-group:last-child {
        justify-content: flex-start;
    }
    
    #model-display-title {
        max-width: none;
    }
}

@media (max-width: 768px) {
    .model-actions-top {
        padding: 12px 16px;
    }
    
    #model-display-title {
        font-size: 18px;
    }
    
    .sidebar-header img {
        max-width: 140px;
    }
}

/* Ensure logo is centered in sidebar header */
.sidebar-header > div:first-child {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 0 20px 0;
}

/* Back button hover effect */
#backToSelectionBtn {
    display: flex;
    align-items: center;
    text-decoration: none;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #64748B;
    padding: 10px 16px;
    border-radius: 8px;
    transition: all 0.2s ease;
    border: none;
    background: transparent;
    cursor: pointer;
}

#backToSelectionBtn:hover {
    color: #C5A059;
    background: rgba(197, 160, 89, 0.1);
}

#backToSelectionBtn .material-icons-outlined {
    font-size: 18px;
    margin-right: 8px;
}

/* Action select dropdown styling */
.action-select {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    padding: 8px 32px 8px 12px;
    border: 2px solid #E2E8F0;
    border-radius: 8px;
    background: white;
    color: #0A1128;
    cursor: pointer;
    transition: all 0.2s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23334155' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    min-width: 200px;
}

.action-select:hover {
    border-color: #C5A059;
    box-shadow: 0 0 0 3px rgba(197, 160, 89, 0.1);
}

.action-select:focus {
    outline: none;
    border-color: #C5A059;
    box-shadow: 0 0 0 3px rgba(197, 160, 89, 0.15);
}

/* Label for action select */
.action-group label {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #334155;
    margin-right: 8px;
}

/* Sheet Content */
.sheet-content {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    max-width: 100%;
}

.sheet-content table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.sheet-content th,
.sheet-content td {
    border: 1px solid #e5e7eb;
    padding: 10px 14px;
    text-align: left;
}

.sheet-content th {
    background: #f8fafc;
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #475569;
}

.sheet-content tr:nth-child(even) {
    background-color: #fafbfc;
}

.sheet-content tr:hover {
    background-color: #f8fafc;
}

/* Bottom Actions Bar */
.model-actions-bottom {
    height: var(--actions-height);
    min-height: var(--actions-height);
    background: white;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 24px;
    gap: 12px;
    flex-shrink: 0;
    flex-wrap: wrap;
}

.model-actions-left {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

/* Print Buttons Container */
.print-buttons-container {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

/* Update Model Button - FLOATING */
#update-model-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 10000;
    padding: 16px 32px;
    font-size: 16px;
    font-weight: 600;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-hover) 100%);
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(16, 183, 127, 0.4), 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateY(0);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
}

#update-model-btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(16, 183, 127, 0.5), 0 6px 16px rgba(0, 0, 0, 0.2);
}

/* Hide old elements that are being replaced */
.model-display-section .model-header {
    display: none !important;
}

.model-display-section .model-footer {
    display: none !important;
}

/* Hide old model-controls-top if it exists */
#model-controls-top {
    display: none !important;
}

/* Custom Scrollbar for Model Display */
.model-display-section #sheet-tabs::-webkit-scrollbar,
.model-display-section .sheet-content-wrapper::-webkit-scrollbar {
    width: 4px;
    height: 4px;
}

.model-display-section #sheet-tabs::-webkit-scrollbar-track,
.model-display-section .sheet-content-wrapper::-webkit-scrollbar-track {
    background: transparent;
}

.model-display-section #sheet-tabs::-webkit-scrollbar-thumb,
.model-display-section .sheet-content-wrapper::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.model-display-section #sheet-tabs::-webkit-scrollbar-thumb:hover,
.model-display-section .sheet-content-wrapper::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Responsive Updates for Model Display */
@media (max-width: 1024px) {
    :root {
        --sidebar-width: 220px;
    }
}

@media (max-width: 768px) {
    :root {
        --sidebar-width: 180px;
    }
    
    .model-actions-top,
    .model-actions-bottom {
        padding: 0 12px;
        height: auto;
        min-height: var(--actions-height);
    }
    
    .sheet-content-wrapper {
        padding: 12px;
    }
}

@media (max-width: 480px) {
    /* Stack sidebar on very small screens */
    .model-display-section {
        flex-direction: column;
    }
    
    .model-sidebar {
        width: 100%;
        min-width: 100%;
        max-width: 100%;
        height: 40vh;
        border-right: none;
        border-bottom: 1px solid #e5e7eb;
    }
    
    .model-main-content {
        width: 100%;
        height: 60vh;
    }
    
    #update-model-btn {
        bottom: 20px;
        right: 20px;
        padding: 14px 24px;
        font-size: 14px;
    }
}


/* ==========================================
   ACTION SELECT DROPDOWN STYLES
   Add this to your CSS patch
   ========================================== */

/* Action Select Dropdown */
.action-select {
    padding: 10px 16px;
    border: 2px solid var(--border-light, #E5E7EB);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #334155;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 250px;
    outline: none;
}

.action-select:hover {
    border-color: var(--color-primary, #10b77f);
    background: #f9fafb;
}

.action-select:focus {
    border-color: var(--color-primary, #10b77f);
    box-shadow: 0 0 0 3px rgba(16, 183, 127, 0.1);
}

.action-select option {
    padding: 10px;
    font-size: 14px;
}

.action-select option:first-child {
    color: #94a3b8;
    font-style: italic;
}

/* Responsive - make dropdown full width on mobile */
@media (max-width: 768px) {
    .action-select {
        min-width: 200px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .action-select {
        min-width: 150px;
        width: 100%;
    }
    
    .model-actions-top .action-group,
    .model-actions-bottom .action-group {
        width: 100%;
    }
    
    .model-actions-top .action-group label,
    .model-actions-bottom .action-group label {
        display: none; /* Hide "Actions:" label on very small screens */
    }
}



/* css to make sure the backgroud selection of the power point will be above the other parts **/
:root {
    --z-modal: 10000;
    --z-model-display: 9999;
    --z-floating-button: 10000;
}

.modal {
    z-index: var(--z-modal);
}

.model-display-section {
    z-index: var(--z-model-display);
}

#update-model-btn {
    z-index: var(--z-floating-button);
}



/* style the action group button (which enables export to excel, word, etc) */

/* Style the Actions select dropdown to match new design */
#model-actions-select {
    background: #0f172a; /* navy-900 */
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    border: none;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    appearance: none;
    padding-right: 40px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='white'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
}

#model-actions-select:hover {
    background-color: #1e293b; /* navy-800 */
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

#model-actions-select:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(197, 160, 89, 0.3); /* primary color ring */
}

/* Style the label */
.action-group label[for="model-actions-select"] {
    display: none; /* Hide the "Actions:" label since it's now inside the button appearance */
}

/* Remove emoji icons from options if you don't want them */
#model-actions-select option {
    background: white;
    color: #334155;
    padding: 8px;
}


/* Sidebar Updates */
.model-selection-sidebar {
    width: 256px;
    transition: width 0.3s ease, padding 0.3s ease;
    overflow: hidden;
}

/* Collapsed sidebar state */
.model-selection-sidebar.collapsed {
    width: 50px;
    padding-left: 0;
    padding-right: 0;
}

/* Hide content when collapsed */
.model-selection-sidebar.collapsed .tab-navigation,
.model-selection-sidebar.collapsed .sidebar-header > *:not(#toggleSidebar),
.model-selection-sidebar.collapsed > *:not(.sidebar-header) {
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
}

/* Center the toggle button when collapsed */
.model-selection-sidebar.collapsed .sidebar-header {
    display: flex;
    justify-content: center;
    align-items: center;
}

.model-selection-sidebar.collapsed #toggleSidebar {
    margin: 0;
}

/* Smooth transitions for content */
.tab-navigation,
.sidebar-header > * {
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* Toggle button styling */
#toggleSidebar {
    transition: transform 0.3s ease;
    padding: 8px;
    border-radius: 4px;
}

#toggleSidebar:hover {
    background: #F1F5F9;
}

/* Icon transition */
#toggleIcon {
    transition: transform 0.2s ease;
}

.custom-scrollbar::-webkit-scrollbar {
    width: 5px;
}
.custom-scrollbar::-webkit-scrollbar-track {
    background: #F1F5F9;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #CBD5E1;
    border-radius: 4px;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #94A3B8;
}

/* Time Toggle Buttons */
.time-toggle button {
    color: var(--text-slate);
    background: transparent;
}
.time-toggle button.active {
    background: var(--color-primary);
    color: white;
    font-weight: 600;
}

/* Preset Buttons */
.preset-btn {
    color: var(--text-slate);
    background: #F9FAFB;
}
.preset-btn.active,
.preset-btn:hover {
    background: var(--color-primary);
    color: white;
}


/* Select Dropdowns - ADD THIS IF NOT PRESENT */
select {
    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='%2364748B'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 16px;
}

/* ==========================================
   RTL FIX - Replace the FORCE LTR section at the end of your CSS
   Remove the old "FORCE LTR BY DEFAULT" section and replace with this
   ========================================== */

/* FORCE LTR BY DEFAULT - but allow RTL override */
.model-display-section {
    direction: ltr;
    flex-direction: row;
}

.model-sidebar {
    order: -1;
    border-right: 1px solid #e5e7eb;
    border-left: none;
}

.model-main-content {
    order: 0;
    direction: ltr;
}

/* DON'T use !important on sheet-content - allow RTL to override */
.sheet-content-wrapper,
.sheet-content,
.sheet-content table {
    direction: ltr;
}

.sheet-content th,
.sheet-content td {
    text-align: left;
}

#sheet-tabs button {
    text-align: left;
}

#sheet-tabs button.active {
    border-left: 3px solid #C5A059;
    border-right: none;
    padding-left: 11px;
    padding-right: 14px;
}

/* Force LTR for page-title and sheet by default */
.page-title {
    direction: ltr;
    text-align: left;
}

.sheet {
    direction: ltr;
    text-align: left;
}

/* RTL MODE - Use !important here to override defaults */
.model-display-section.rtl-mode-active {
    direction: rtl !important;
    flex-direction: row-reverse !important;
}

.model-display-section.rtl-mode-active .model-sidebar {
    order: 1 !important;
    border-left: 1px solid #e5e7eb !important;
    border-right: none !important;
}

.model-display-section.rtl-mode-active .model-main-content {
    order: -1 !important;
}

/* RTL Sheet Content - STRONG override */
.model-display-section.rtl-mode-active .sheet-content-wrapper,
.model-display-section.rtl-mode-active .sheet-content-wrapper *,
.model-display-section.rtl-mode-active .sheet-content,
.model-display-section.rtl-mode-active .sheet-content *,
.model-display-section.rtl-mode-active .sheet-content table,
.model-display-section.rtl-mode-active .sheet-content table * {
    direction: rtl !important;
}

.model-display-section.rtl-mode-active .sheet-content th,
.model-display-section.rtl-mode-active .sheet-content td {
    text-align: right !important;
    direction: rtl !important;
}

/* RTL Sheet Tabs */
.model-display-section.rtl-mode-active #sheet-tabs {
    direction: rtl !important;
}

.model-display-section.rtl-mode-active #sheet-tabs button {
    text-align: right !important;
    flex-direction: row-reverse !important;
    direction: rtl !important;
    unicode-bidi: embed !important;

}

.model-display-section.rtl-mode-active #sheet-tabs button .material-icons-outlined {
    margin-left: 10px !important;
    margin-right: 0 !important;
}

.model-display-section.rtl-mode-active #sheet-tabs button.active {
    border-right: 3px solid #C5A059 !important;
    border-left: none !important;
    padding-right: 11px !important;
    padding-left: 14px !important;
}

/* RTL Sidebar elements */
.model-display-section.rtl-mode-active .sheets-label {
    text-align: right !important;
    direction: rtl !important;
}

.model-display-section.rtl-mode-active .sidebar-header {
    direction: rtl !important;
}

/* RTL page-title */
.model-display-section.rtl-mode-active .page-title {
    direction: rtl !important;
    text-align: right !important;
}

/* RTL sheet */
.model-display-section.rtl-mode-active .sheet {
    direction: rtl !important;
    text-align: right !important;
}

.model-display-section.rtl-mode-active .sheet * {
    direction: rtl !important;
}

/* Force RTL for ALL content inside sheet-content */
.model-display-section.rtl-mode-active #sheet-content,
.model-display-section.rtl-mode-active #sheet-content *,
.model-display-section.rtl-mode-active #sheet-content div,
.model-display-section.rtl-mode-active #sheet-content p,
.model-display-section.rtl-mode-active #sheet-content span,
.model-display-section.rtl-mode-active #sheet-content h1,
.model-display-section.rtl-mode-active #sheet-content h2,
.model-display-section.rtl-mode-active #sheet-content h3,
.model-display-section.rtl-mode-active #sheet-content h4,
.model-display-section.rtl-mode-active #sheet-content h5,
.model-display-section.rtl-mode-active #sheet-content h6,
.model-display-section.rtl-mode-active #sheet-content td,
.model-display-section.rtl-mode-active #sheet-content th {
    text-align: right !important;
    direction: rtl !important;
}

/* REMOVE the old rtl-mode class override - DELETE THIS IF IT EXISTS:
.model-display-section.rtl-mode {
    direction: ltr !important;
    flex-direction: row !important;
}
*/


/* Horizontal scroll fix for wide tables */
.sheet-content-wrapper {
    overflow-x: auto !important;
    overflow-y: auto !important;
    width: 100%;
    max-width: 100%;
}

#sheet-content {
    min-width: min-content;
    width: auto;
}

#sheet-content table {
    width: auto !important;
    min-width: 100%;
    table-layout: auto;
}

.financial-table {
    width: auto !important;
    min-width: 300vw;  /* ✅ This makes thumb 33% */
}

/* Essential enhanced scrollbar CSS */
.sheet-content-wrapper::-webkit-scrollbar {
    height: 14px;
    width: 14px;
}

.sheet-content-wrapper::-webkit-scrollbar-track {
    background: #e2e8f0;
    border-radius: 8px;
    margin: 0 20px;
}

.sheet-content-wrapper::-webkit-scrollbar-thumb {
    background: #64748b;
    border-radius: 8px;
    border: 2px solid #e2e8f0;
}

.sheet-content-wrapper::-webkit-scrollbar-thumb:hover {
    background: #475569;
}

.sheet-content-wrapper {
    padding-bottom: 20px;
    padding-right: 20px;
    scrollbar-width: auto;
    scrollbar-color: #64748b #e2e8f0;
}


/* AI Narrative Modal - matches PowerPoint modal pattern */
#ai-narrative-modal .modal-content {
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
}

#ai-narrative-modal-body {
    padding: 24px;
}

/* Prompt Cards */
.prompt-card {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.prompt-card:hover {
    border-color: #C5A059;
    box-shadow: 0 4px 12px rgba(197, 160, 89, 0.15);
    transform: translateY(-2px);
}

.prompt-card.copied {
    border-color: #22c55e;
    background: #f0fdf4;
}

.prompt-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.prompt-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 16px;
    color: #0A1128;
}

.prompt-icon {
    color: #C5A059;
    font-size: 24px;
}

.prompt-category {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(197, 160, 89, 0.1);
    color: #C5A059;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.prompt-description {
    color: #64748B;
    font-size: 13px;
    margin-bottom: 12px;
    line-height: 1.5;
}

.prompt-text {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px;
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 12px;
    line-height: 1.6;
    color: #334155;
    white-space: pre-wrap;
    max-height: 200px;
    overflow-y: auto;
}

.copy-indicator {
    position: absolute;
    top: 16px;
    right: 16px;
    background: #22c55e;
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    display: none;
    align-items: center;
    gap: 6px;
}

.prompt-card.copied .copy-indicator {
    display: flex;
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.prompt-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #f1f5f9;
    font-size: 12px;
    color: #94a3b8;
}

.prompt-footer .material-symbols-outlined {
    font-size: 16px;
}