:root {
    /* Color Palette - Premium Dark Mode (Default) */
    --bg-color: #0B0F19;
    --sidebar-bg: rgba(19, 26, 42, 0.7);
    --card-bg: rgba(30, 41, 59, 0.6);
    --card-border: rgba(255, 255, 255, 0.08);
    --text-primary: #F8FAFC;
    --text-secondary: #94A3B8;
    --accent-primary: #3B82F6;
    --accent-primary-rgb: 59, 130, 246;
    --accent-hover: #2563EB;
    --accent-secondary: #8B5CF6;
    --success: #10B981;
    --danger: #EF4444;
    --warning: #F59E0B;
    --sticky-bg: #1e293b;
    --sticky-header-bg: #0f172a;
    --input-bg: rgba(15, 23, 42, 0.6);
    
    /* Dynamic Theme Variables for Glass & Dashboard components */
    --glass-bg: rgba(30, 41, 59, 0.45);
    --glass-card-bg: linear-gradient(135deg, rgba(30, 41, 59, 0.4) 0%, rgba(15, 23, 42, 0.6) 100%);
    --pricing-ref-bg: rgba(255, 255, 255, 0.02);
    --header-bg: rgba(11, 15, 25, 0.4);
    --table-header-bg: rgba(0, 0, 0, 0.2);
    --table-row-hover-bg: rgba(255, 255, 255, 0.02);
    
    /* Typography */
    --font-family: 'Inter', sans-serif;
    
    /* Effects */
    --glass-blur: blur(12px);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --body-gradient: 
        radial-gradient(at 0% 0%, rgba(59, 130, 246, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(139, 92, 246, 0.15) 0px, transparent 50%);
}

[data-theme="light"] {
    --bg-color: #CBD5E1;
    --sidebar-bg: rgba(203, 213, 225, 0.85);
    --card-bg: rgba(226, 232, 240, 0.9);
    --card-border: rgba(15, 23, 42, 0.12);
    --text-primary: #0F172A;
    --text-secondary: #334155;
    --sticky-bg: #E2E8F0;
    --sticky-header-bg: #CBD5E1;
    --input-bg: rgba(226, 232, 240, 0.95);
    --body-gradient: 
        radial-gradient(at 0% 0%, rgba(59, 130, 246, 0.05) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(139, 92, 246, 0.05) 0px, transparent 50%);
    --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -2px rgba(15, 23, 42, 0.08);
    
    /* Light Mode Overrides for Glass & Dashboard components */
    --glass-bg: rgba(226, 232, 240, 0.75);
    --glass-card-bg: linear-gradient(135deg, rgba(226, 232, 240, 0.85) 0%, rgba(203, 213, 225, 0.9) 100%);
    --pricing-ref-bg: rgba(226, 232, 240, 0.8);
    --header-bg: rgba(203, 213, 225, 0.75);
    --table-header-bg: rgba(59, 130, 246, 0.12);
    --table-row-hover-bg: rgba(59, 130, 246, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
    overflow: hidden;
    background-image: var(--body-gradient);
}

/* Layout */
.app-container {
    display: flex;
    height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: var(--sidebar-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-right: 1px solid var(--card-border);
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    z-index: 10;
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.logo-img {
    height: 11rem;
    width: 100%;
    max-width: 400px;
    object-fit: contain;
    filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.4));
    transition: var(--transition);
    transform: scale(1.05);
}

.logo-img:hover {
    transform: scale(1.1);
    filter: drop-shadow(0 10px 15px rgba(0, 0, 0, 0.6));
}

.sidebar-header h2 {
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: -0.025em;
}

/* Location Selector */
.location-selector {
    margin-bottom: 2rem;
}

.location-selector label {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.select-wrapper {
    display: flex;
    gap: 0.5rem;
}

select {
    flex: 1;
    background: var(--input-bg);
    border: 1px solid var(--card-border);
    color: var(--text-primary);
    padding: 0.5rem;
    border-radius: 0.5rem;
    font-family: inherit;
    font-size: 0.875rem;
    outline: none;
    transition: var(--transition);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
}

select:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.icon-btn {
    background: rgba(59, 130, 246, 0.1);
    color: var(--accent-primary);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 0.5rem;
    width: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.icon-btn:hover {
    background: var(--accent-primary);
    color: white;
}

/* Navigation */
.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 0.5rem;
    font-weight: 500;
    transition: var(--transition);
}

.nav-item i {
    font-size: 1.25rem;
}

.nav-item:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.nav-item.active {
    color: white;
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.2), transparent);
    border-left: 3px solid var(--accent-primary);
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.top-header {
    height: 80px;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--card-border);
    background: var(--header-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
}

.top-header h1 {
    font-size: 1.5rem;
    font-weight: 600;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.date-display {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: white;
    box-shadow: var(--shadow-md);
}

.view-container {
    flex: 1;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden; /* Page doesn't scroll, inner components do */
}

/* Global scrollbars styled to be premium, highly visible, and easy to grab */
::-webkit-scrollbar {
    width: 14px;
    height: 14px;
}

::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.2);
    border-radius: 8px;
}

::-webkit-scrollbar-thumb {
    background: rgba(59, 130, 246, 0.3);
    border-radius: 8px;
    border: 3px solid var(--bg-color);
    transition: var(--transition);
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(59, 130, 246, 0.55);
}

[data-theme="light"] ::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
}

[data-theme="light"] ::-webkit-scrollbar-thumb {
    background: rgba(59, 130, 246, 0.4);
    border-color: var(--bg-color);
}

/* Cards & Components */
.card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: var(--shadow-lg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.grid {
    display: grid;
    gap: 1.5rem;
}

.grid-cols-3 {
    grid-template-columns: repeat(3, 1fr);
}
.grid-cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

/* Stat Cards */
.stat-card {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: var(--transition);
}
.stat-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.15);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-icon.blue { background: rgba(59, 130, 246, 0.1); color: var(--accent-primary); }
.stat-icon.purple { background: rgba(139, 92, 246, 0.1); color: var(--accent-secondary); }
.stat-icon.green { background: rgba(16, 185, 129, 0.1); color: var(--success); }

.stat-content h3 {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.stat-content p {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid var(--card-border);
    font-family: inherit;
    background: var(--input-bg);
    color: var(--text-primary);
}

.btn:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-1px);
    color: var(--text-primary);
}

[data-theme="light"] .btn:hover {
    background: rgba(0, 0, 0, 0.04);
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-hover));
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
    transform: translateY(-1px);
}

/* Forms & Inputs */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.form-control {
    width: 100%;
    background: var(--input-bg);
    border: 1px solid var(--card-border);
    color: var(--text-primary);
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    font-family: inherit;
    transition: var(--transition);
}

/* Fix for dark calendar icons in date inputs */
.form-control[type="date"] {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23f8fafc' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'%3E%3C/rect%3E%3Cline x1='16' y1='2' x2='16' y2='6'%3E%3C/line%3E%3Cline x1='8' y1='2' x2='8' y2='6'%3E%3C/line%3E%3Cline x1='3' y1='10' x2='21' y2='10'%3E%3C/line%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1.1rem;
}

/* Hide the native icon but keep it clickable */
.form-control[type="date"]::-webkit-calendar-picker-indicator {
    opacity: 0;
    cursor: pointer;
}

/* Light mode override for calendar icon to be visible on white input backgrounds */
[data-theme="light"] .form-control[type="date"] {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%230f172a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'%3E%3C/rect%3E%3Cline x1='16' y1='2' x2='16' y2='6'%3E%3C/line%3E%3Cline x1='8' y1='2' x2='8' y2='6'%3E%3C/line%3E%3Cline x1='3' y1='10' x2='21' y2='10'%3E%3C/line%3E%3C/svg%3E");
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: opacity 0.2s ease-out;
}

.modal-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.modal {
    background: var(--bg-color);
    border: 1px solid var(--card-border);
    border-radius: 1rem;
    width: 90%;
    max-width: 800px;
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    transform: scale(1);
    transition: transform 0.2s ease-out;
}

.modal-overlay.hidden .modal {
    transform: scale(0.95);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.modal-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
}

.close-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition);
}

.close-btn:hover {
    color: var(--text-primary);
}

/* File Dropzone */
.dropzone {
    border: 2px dashed var(--card-border);
    border-radius: 1rem;
    padding: 3rem 2rem;
    text-align: center;
    background: rgba(15, 23, 42, 0.3);
    transition: var(--transition);
    cursor: pointer;
}

.dropzone:hover, .dropzone.dragover {
    border-color: var(--accent-primary);
    background: rgba(59, 130, 246, 0.05);
}

.dropzone i {
    font-size: 3rem;
    color: var(--accent-primary);
    margin-bottom: 1rem;
}

.dropzone h3 {
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.dropzone p {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Tables */
.table-container {
    width: 100%;
    overflow: auto;
    flex: 1;
    min-height: 0;
    /* Custom Scrollbar for the table itself */
}

.table-container::-webkit-scrollbar {
    height: 10px; /* Thicker horizontal scrollbar */
    width: 8px;
}

.table-container::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 5px;
}

.table-container::-webkit-scrollbar-thumb {
    background: rgba(59, 130, 246, 0.3);
    border-radius: 5px;
    border: 2px solid rgba(15, 23, 42, 0.6);
}

.table-container::-webkit-scrollbar-thumb:hover {
    background: rgba(59, 130, 246, 0.5);
}

table {
    width: max-content;
    border-collapse: collapse;
    table-layout: auto;
}

th, td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--card-border);
    white-space: nowrap;
    width: auto; /* Let content dictate width */
}

/* No longer forcing the Name column to take all extra space */
th:nth-child(2), td:nth-child(2) {
    width: auto;
    min-width: 150px; /* Ensure names have at least some breathing room */
}

th {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: var(--table-header-bg);
}

.table-container th:nth-child(2),
.table-container td:nth-child(2) {
    position: sticky;
    left: 0;
    background: var(--sticky-bg); /* Solid dark color to obscure scrolling text */
    z-index: 10;
    border-right: 1px solid var(--card-border);
}

.table-container th:nth-child(2) {
    background: var(--sticky-header-bg);
    z-index: 11;
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background: rgba(255,255,255,0.02);
}

/* Login Screen Styles */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-image: var(--body-gradient);
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 2.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

/* Premium SaaS & Subscription Styling */
.status-badge-active {
    display: inline-flex;
    align-items: center;
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.2);
    padding: 0.25rem 0.65rem;
    border-radius: 0.375rem;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.status-badge-inactive {
    display: inline-flex;
    align-items: center;
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.2);
    padding: 0.25rem 0.65rem;
    border-radius: 0.375rem;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.quota-paywall-card {
    background: rgba(15, 23, 42, 0.65) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 1.25rem;
    padding: 2.5rem 2rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
    position: relative;
    overflow: hidden;
}

.quota-paywall-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.05) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}

.paywall-crown-icon {
    animation: bounceSlow 3s infinite ease-in-out;
}

@keyframes bounceSlow {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.pricing-tier-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.25rem;
    margin: 1.5rem 0;
    position: relative;
    z-index: 1;
}

.pricing-card {
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid var(--card-border);
    border-radius: 0.75rem;
    padding: 1.25rem;
    text-align: left;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.pricing-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.03);
    box-shadow: 0 12px 24px -10px rgba(0, 0, 0, 0.4);
}

.pricing-card.highlighted {
    background: rgba(59, 130, 246, 0.04);
    border-color: rgba(59, 130, 246, 0.4);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.1);
}

.pricing-card.highlighted:hover {
    border-color: var(--accent-primary);
    background: rgba(59, 130, 246, 0.08);
    box-shadow: 0 12px 28px -10px rgba(59, 130, 246, 0.25), 0 0 20px rgba(59, 130, 246, 0.1);
}

.pricing-card h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.pricing-card .price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-primary);
    margin-bottom: 0.75rem;
}

.pricing-card .price span {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 400;
}

.pricing-card ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.pricing-card ul li {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pricing-card ul li::before {
    content: "✓";
    color: var(--success);
    font-weight: bold;
}

/* Glassmorphic elements for Super-Admin view */
.glass-card {
    background: var(--glass-bg) !important;
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--card-border);
    box-shadow: var(--shadow-lg);
}

.table-row-hover:hover {
    background: var(--table-row-hover-bg) !important;
}

.super-admin-pricing-panel {
    background: var(--glass-card-bg) !important;
}

.pricing-ref-card {
    background: var(--pricing-ref-bg) !important;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.pricing-ref-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 500;
}

/* Premium Switch Toggle */
.switch-container {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.switch-container input {
    opacity: 0;
    width: 0;
    height: 0;
}

.switch-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(148, 163, 184, 0.3);
    transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 24px;
}

.switch-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .switch-slider:before {
    background-color: white;
}

input:checked + .switch-slider {
    background-color: var(--accent-primary);
}

input:checked + .switch-slider:before {
    transform: translateX(20px);
}

/* Premium Mobile & Tablet Responsive Layout Adaptations */
@media (max-width: 768px) {
    html, body {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow-x: hidden !important; /* Block horizontal document scroll */
        overflow-y: auto !important; /* Enable smooth vertical scroll */
        height: auto;
        min-height: 100vh;
    }
    
    .app-container {
        width: 100% !important;
        max-width: 100% !important;
        flex-direction: column !important; /* Stack sidebar vertically on top */
        height: auto;
        min-height: 100vh;
    }
    
    .sidebar {
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        border-right: none !important;
        border-bottom: 1px solid var(--card-border) !important;
        padding: 1.25rem !important;
    }
    
    .sidebar-header {
        margin-bottom: 1.25rem !important;
        justify-content: center;
    }
    
    .logo-img {
        height: 2.75rem !important; /* Shrink logo to top navbar size */
        margin: 0 auto !important;
    }
    
    .location-selector {
        margin-bottom: 1.25rem !important;
    }
    
    .sidebar-nav {
        flex-direction: row !important; /* Inline navbar scroll format */
        flex-wrap: wrap;
        gap: 0.5rem;
        justify-content: center;
    }
    
    .nav-item {
        padding: 0.5rem 0.875rem !important;
        font-size: 0.8rem !important;
    }
    
    .main-content {
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        overflow: visible !important;
    }
    
    .top-header {
        width: 100% !important;
        height: auto !important;
        padding: 1.25rem !important;
        flex-direction: column !important;
        gap: 0.75rem;
        align-items: center;
        text-align: center;
    }
    
    .view-container {
        width: 100% !important;
        padding: 1rem !important;
        overflow: visible !important;
        height: auto !important;
    }
    
    .card {
        width: 100% !important;
        overflow: visible !important;
        height: auto !important;
        padding: 1.25rem !important;
    }
    
    .grid {
        gap: 1.25rem !important;
    }
    
    .grid-cols-3, .grid-cols-2 {
        grid-template-columns: 1fr !important; /* Stack elements into single columns on mobile */
    }
    
    .table-container {
        overflow-x: auto !important; /* Let financial tables slide horizontally */
        width: 100% !important;
    }
    
    table {
        width: 100% !important;
        min-width: 600px; /* Keep tabular metrics readable */
    }
    
    /* Ensure modal overlays scale nicely on tiny screens */
    .modal {
        width: 95% !important;
        padding: 1.25rem !important;
        margin: 1rem auto;
    }
}


