:root, [data-theme="dark"] {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --bg-gradient: linear-gradient(135deg, #0f172a 0%, #020617 100%);
    --card-bg: rgba(30, 41, 59, 0.4);
    --card-border: rgba(255, 255, 255, 0.08);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --success: #10b981;
    --error: #ef4444;
    --header-bg: rgba(15, 23, 42, 0.9);
    --slider-track-bg: rgba(255, 255, 255, 0.08);
    --slider-badge-bg: rgba(255, 255, 255, 0.05);
    --slider-badge-border: rgba(255, 255, 255, 0.1);
}

[data-theme="light"] {
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --bg-gradient: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    --card-bg: #ffffff;
    --card-border: #e2e8f0;
    --text-main: #0f172a;
    --text-muted: #475569;
    --header-bg: rgba(255, 255, 255, 0.9);
    --slider-track-bg: rgba(0, 0, 0, 0.08);
    --slider-badge-bg: rgba(0, 0, 0, 0.05);
    --slider-badge-border: rgba(0, 0, 0, 0.1);
}

[data-theme="indigo"] {
    --primary: #818cf8;
    --primary-hover: #a5b4fc;
    --bg-gradient: linear-gradient(135deg, #1e1b4b 0%, #0f1133 100%);
    --card-bg: rgba(30, 27, 75, 0.6);
    --card-border: rgba(129, 140, 248, 0.15);
    --text-main: #e0e7ff;
    --text-muted: #94a3b8;
    --header-bg: rgba(30, 27, 75, 0.9);
    --slider-track-bg: rgba(129, 140, 248, 0.15);
    --slider-badge-bg: rgba(129, 140, 248, 0.08);
    --slider-badge-border: rgba(129, 140, 248, 0.25);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-gradient);
    background-attachment: fixed;
    color: var(--text-main);
    min-height: 100vh;
    line-height: 1.4;
    font-size: 0.9rem; /* Slightly smaller default */
}

.container {
    max-width: 1400px; /* Wider for more data */
    margin: 0 auto;
    padding: 15px;
}

header {
    background: var(--header-bg);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--card-border);
    padding: 10px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.3rem; /* Compact logo */
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -1px;
    text-decoration: none;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.theme-selector {
    background: var(--card-bg);
    border: 1px solid var(--primary);
    color: var(--text-main);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    outline: none;
}

/* Theme Selector specific styles removed as they are now global */

.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.3);
    margin-bottom: 15px;
    animation: fadeIn 0.4s ease forwards;
}

/* Explicit backdrop fix for dark modes where translucency might fail to render properly */
[data-theme="dark"] .glass-card, [data-theme="indigo"] .glass-card {
    background: rgba(15, 23, 42, 0.8) !important; /* Solid dark background */
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
}

.stat-icon {
    font-size: 1.4rem;
    margin-bottom: 8px;
    color: var(--primary);
}

.stat-info .value {
    font-size: 1.5rem;
    font-weight: 800;
}

/* Forms & Inputs */
input, select, textarea {
    width: 100%;
    padding: 10px 12px;
    margin: 5px 0;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.85rem;
}

/* Ensure solid background for dropdown options */
option {
    background: #1e293b;
    color: #fff;
}

/* Specific fix for form elements background in dark mode to prevent browser defaults */
[data-theme="dark"] input, [data-theme="dark"] select, [data-theme="dark"] textarea,
[data-theme="indigo"] input, [data-theme="indigo"] select, [data-theme="indigo"] textarea {
    background-color: #1e293b !important;
}

[data-theme="light"] input, [data-theme="light"] select, [data-theme="light"] textarea {
    background: #fff;
    color: #0f172a;
    border: 1px solid #cbd5e1;
}

[data-theme="light"] option {
    background: #ffffff;
    color: #0f172a;
}

button, .btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
    font-size: 0.85rem;
}

.btn-danger {
    background: var(--error);
    color: white !important;
}

.btn-danger:hover {
    background: #dc2626;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.btn-success {
    background: var(--success);
    color: white !important;
}

/* Tables */
.table-container {
    overflow-x: auto;
    border-radius: 12px;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    text-align: left;
    padding: 10px 15px;
    color: var(--text-muted);
    border-bottom: 2px solid var(--card-border);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

td {
    padding: 8px 15px;
    border-bottom: 1px solid var(--card-border);
    font-size: 0.85rem;
}

/* Charts Grid */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 15px;
}

/* Active Filters Bar */
.filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.filter-tag {
    background: var(--primary);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-tag .remove {
    cursor: pointer;
    background: rgba(255,255,255,0.2);
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
}

/* Dashboard Controls */
.dash-controls {
    display: flex;
    flex-wrap: nowrap;
    overflow: hidden;
    border-left: 4px solid var(--success);
}

.selection-chip {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.selection-chip strong {
    color: var(--text-muted);
    font-weight: 500;
}

.selection-chip span {
    cursor: pointer;
    font-size: 1.1rem;
    line-height: 1;
    margin-top: -2px;
}

.selection-chip:hover {
    background: rgba(16, 185, 129, 0.25);
}

.btn-sm {
    padding: 4px 12px;
    font-size: 0.75rem;
    border-radius: 6px;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--card-border);
    color: var(--text-muted);
}

.btn-outline:hover {
    background: rgba(255,255,255,0.05);
    color: var(--text-main);
    border-color: var(--primary);
}

/* Professional BI Dashboard UI */
.dashboard-header {
    border-bottom: 1px solid var(--card-border);
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
}

.compact-filters {
    display: flex;
    gap: 1rem;
    align-items: center;
    padding: 0.75rem 1.25rem !important;
    background: rgba(255, 255, 255, 0.02) !important;
    border-radius: 99px !important;
    margin-bottom: 25px;
}

.compact-filters .form-group {
    margin: 0;
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
}

.compact-filters label {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    white-space: nowrap;
}

.compact-filters input {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid var(--card-border) !important;
    padding: 8px 12px !important;
    border-radius: 8px !important;
    font-weight: 600;
    transition: all 0.2s;
}

.compact-filters input:focus {
    border-color: var(--primary) !important;
    background: rgba(255, 255, 255, 0.08) !important;
    outline: none;
}

/* Takvim İkonu Rengi (Koyu Temalar İçin Global Çözüm) */
[data-theme="dark"] input::-webkit-calendar-picker-indicator,
[data-theme="indigo"] input::-webkit-calendar-picker-indicator {
    filter: invert(1) brightness(10) !important;
    cursor: pointer;
    opacity: 1 !important;
}

[data-theme="light"] .compact-filters input {
    background: #fff !important;
    border: 1px solid #cbd5e1 !important;
    color: #0f172a !important;
}

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.kpi-card {
    padding: 1.5rem !important;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    border-left: 4px solid var(--primary);
    background: var(--card-bg) !important;
}

.preview-item {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 8px;
    border: 1px solid var(--card-border);
    background: rgba(0, 0, 0, 0.3) !important;
    color: var(--text-main);
}

[data-theme="light"] .preview-item {
    background: #f8fafc !important;
    border-color: #e2e8f0;
}

.kpi-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.kpi-data .label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 4px;
}

.kpi-data .value {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1;
}

.dash-controls {
    background: rgba(16, 185, 129, 0.05);
    border: 1px solid rgba(16, 185, 129, 0.1);
    border-left: 4px solid var(--success);
    margin-bottom: 25px;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Launchpad (User Dashboard) UI */
.launchpad-hero {
    margin-bottom: 2.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--card-border);
}

.launchpad-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

.launchpad-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    text-decoration: none;
    min-height: 220px;
    padding: 1.75rem !important;
    border-top: 4px solid transparent;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.launchpad-card:hover {
    transform: translateY(-8px) !important;
    border-top-color: var(--primary);
    box-shadow: 0 20px 50px -15px rgba(0, 0, 0, 0.4);
    background: rgba(255, 255, 255, 0.05);
}

.launchpad-icon-box {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    margin-bottom: 1.25rem;
    transition: all 0.3s;
}

.launchpad-card:hover .launchpad-icon-box {
    background: var(--primary);
    color: white;
    transform: rotate(-5deg) scale(1.1);
}

.launchpad-card h3 {
    color: var(--text-main);
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
}

.launchpad-card .desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.launchpad-card .cta {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    color: var(--primary);
    font-size: 0.85rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    gap: 8px;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.launchpad-card:hover .cta {
    opacity: 1;
}

/* Tab Navigation */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease-in-out;
}

.tab-btn {
    background: none;
    border: none;
    padding: 12px 24px;
    cursor: pointer;
    color: var(--text-muted);
    border-bottom: 3px solid transparent;
    font-weight: 700;
    font-size: 0.95rem;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tab-btn:hover {
    color: var(--text-main);
    background: rgba(255,255,255,0.02);
}

.tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

/* Modal System (Drill-through) */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(2, 6, 23, 0.85);
    backdrop-filter: blur(8px);
    z-index: 10000;
    display: none;
    align-items: center; justify-content: center;
    padding: 2rem;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    width: 100%;
    max-width: 1100px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    position: relative;
}

.modal-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--card-border);
    display: flex; justify-content: space-between; align-items: center;
}

.modal-body {
    padding: 0;
    overflow-y: auto;
    flex: 1;
}

/* TV / Presentation Mode Controls */
.tv-hidden { display: block; } /* Visible by default */
body.tv-mode .tv-hidden { display: none !important; } /* Hidden ONLY in TV Mode */

body.tv-mode {
    background: #020617;
    padding: 0 !important;
}

body.tv-mode .container {
    max-width: 100% !important;
    padding: 2rem !important;
}

body.tv-mode .charts-grid {
    grid-template-columns: repeat(auto-fit, minmax(600px, 1fr)) !important;
    gap: 2rem;
}

/* Chart Box Toolbar */
.chart-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--primary);
    padding-left: 12px;
}

.chart-toolbar {
    display: flex; gap: 8px; opacity: 0.3; transition: opacity 0.3s;
}

.chart-box:hover .chart-toolbar { opacity: 1; }

.toolbar-btn {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--card-border);
    color: var(--text-muted); padding: 4px 8px; border-radius: 6px;
    font-size: 0.75rem; cursor: pointer; transition: all 0.2s;
}

.toolbar-btn:hover { background: var(--primary); color: white; border-color: var(--primary); }

/* Modal System (Drill-through) */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(2, 6, 23, 0.85);
    backdrop-filter: blur(8px);
    z-index: 10000;
    display: none;
    align-items: center; justify-content: center;
    padding: 2rem;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    width: 100%;
    max-width: 1100px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    position: relative;
    color: var(--text-main);
}

.modal-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--card-border);
    display: flex; justify-content: space-between; align-items: center;
}

.modal-body {
    padding: 0;
    flex: 1;
}

body.tv-mode .charts-grid {
    grid-template-columns: repeat(auto-fit, minmax(600px, 1fr)) !important;
    gap: 2rem;
}

/* Chart Box Toolbar */
.chart-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--primary);
    padding-left: 12px;
}

.chart-toolbar {
    display: flex; gap: 8px; opacity: 0.3; transition: opacity 0.3s;
}

.chart-box:hover .chart-toolbar { opacity: 1; }

.toolbar-btn {
    background: rgba(128,128,128,0.1);
    border: 1px solid var(--card-border);
    color: var(--text-main); padding: 4px 8px; border-radius: 6px;
    font-size: 0.75rem; cursor: pointer; transition: all 0.2s;
}

.toolbar-btn:hover { background: var(--primary); color: white; border-color: var(--primary); }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Enhanced Chart UI */
.chart-box {
    display: flex;
    flex-direction: column;
    min-height: 520px;
    height: 100%;
    overflow: hidden;
    padding: 0 !important;
}
.chart-box.collapsed {
    min-height: 0 !important;
    height: auto !important;
    align-self: start;
}
.chart-box.collapsed .chart-header {
    border-bottom: none !important;
}

.chart-header {
    padding: 1.25rem 1.75rem !important;
    border-bottom: 1px solid var(--card-border);
    margin-bottom: 0 !important;
}

.chart-footer {
    padding: 1rem 1.75rem;
    border-top: 1px solid var(--card-border);
    background: rgba(255,255,255,0.03);
    margin-top: auto;
}

.btn-detail {
    background: var(--primary);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.2);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-detail:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 12px 30px rgba(99, 102, 241, 0.4);
    filter: brightness(1.2);
}

.btn-detail i {
    font-size: 1.2rem;
    transition: transform 0.3s;
}

.btn-detail:hover i {
    transform: translateX(3px);
}

/* Administrative Split View Layout */
.admin-split-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 20px;
    align-items: start;
    margin-top: 1.5rem;
}

@media (max-width: 1024px) {
    .admin-split-layout {
        grid-template-columns: 1fr;
    }
}

.admin-sidebar {
    position: sticky;
    top: 80px;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
}

.sidebar-header {
    padding: 1.25rem;
    border-bottom: 1px solid var(--card-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-list {
    display: flex;
    flex-direction: column;
}

.sidebar-item {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--card-border);
    text-decoration: none;
    transition: all 0.2s;
    border-left: 4px solid transparent;
    display: block;
}

.sidebar-item:hover {
    background: rgba(255, 255, 255, 0.03);
}

.sidebar-item.active {
    background: rgba(99, 102, 241, 0.08);
    border-left-color: var(--primary);
}

.sidebar-item h4 {
    font-size: 0.85rem;
    color: var(--text-main);
    margin-bottom: 2px;
    font-weight: 700;
}

.sidebar-item .meta {
    font-size: 0.7rem;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.admin-content {
    min-width: 0;
}

/* Analysis Panel Animation */
#analysis-panel {
    animation: slideInDown 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideInDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Modal Visibility Classes */
.modal {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(2, 6, 23, 0.85);
    backdrop-filter: blur(8px);
    z-index: 10000;
    display: none;
    align-items: center; justify-content: center;
    padding: 2rem;
    animation: fadeIn 0.3s ease;
}
.modal.show {
    display: flex !important;
}

/* FullCalendar Theme Overrides */
.fc-theme-standard .fc-scrollgrid, .fc-theme-standard td, .fc-theme-standard th {
    border-color: var(--card-border) !important;
}
.fc-col-header-cell-cushion, .fc-daygrid-day-number {
    color: var(--text-main) !important;
    text-decoration: none;
}
.fc-toolbar-title {
    color: var(--text-main) !important;
    font-weight: 700 !important;
}
.fc-button-primary {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
    box-shadow: none !important;
}
.fc-button-primary:hover {
    filter: brightness(1.2);
}
.fc-event {
    border: none !important;
    border-radius: 4px;
    padding: 2px 4px;
    font-size: 0.8rem;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}
.fc-event:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

/* Mobile Responsive Adjustments (Native App Feel) */
@media (max-width: 768px) {
    /* Layout */
    .container {
        padding: 10px;
    }
    .charts-grid {
        grid-template-columns: minmax(100%, 1fr) !important;
        gap: 12px;
    }
    .launchpad-grid {
        grid-template-columns: minmax(100%, 1fr) !important;
    }
    .kpi-grid, .stat-grid {
        grid-template-columns: 1fr !important;
        gap: 10px;
    }
    .kpi-card {
        padding: 1rem !important;
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }
    
    /* Filters on Mobile */
    .compact-filters form {
        gap: 10px !important;
    }
    .compact-filters .form-group {
        min-width: 0 !important;
        flex: 1 1 47% !important;
    }
    .compact-filters input {
        font-size: 0.9rem;
    }
    
    /* Header & Navigation */
    .dashboard-header {
        flex-direction: column;
        align-items: flex-start !important;
        margin-bottom: 1rem;
        padding-bottom: 1rem;
    }
    .dashboard-header h1 {
        font-size: 1.5rem !important;
    }
    .dashboard-header > div:nth-child(2) {
        width: 100%;
        justify-content: flex-start;
        margin-top: 10px;
    }
    .nav-container {
        flex-direction: column;
        gap: 10px;
    }
    .desktop-selectors {
        display: none !important;
    }
    .mobile-selectors {
        display: inline-block !important;
    }
    .logo {
        font-size: 1.15rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
        display: block;
        text-align: center;
    }
    .nav-right {
        width: 100%;
        flex-wrap: wrap;
        justify-content: flex-start;
        gap: 10px;
    }
    nav {
        width: 100%;
        overflow-x: auto;
        padding-bottom: 5px;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
    }
    
    /* App-like behavior */
    body {
        -webkit-user-select: none;
        user-select: none;
        -webkit-tap-highlight-color: transparent;
        overflow-x: hidden;
    }
    input, textarea, select {
        -webkit-user-select: auto;
        user-select: auto;
    }
    
    /* Filters */
    .compact-filters {
        flex-direction: column;
        align-items: stretch !important;
        border-radius: 12px !important;
        padding: 15px !important;
    }
    .compact-filters form {
        flex-direction: column;
        align-items: stretch !important;
    }
    .compact-filters .form-group {
        width: 100%;
        min-width: 100% !important;
    }
    
    /* Charts */
    .chart-box {
        min-height: 380px;
    }
    .chart-header {
        padding: 1rem !important;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .chart-toolbar {
        opacity: 1;
        width: 100%;
        justify-content: flex-end;
    }
    
    /* Modals */
    .modal-content {
        max-height: 95vh;
        width: 95%;
        margin: 10px;
    }
    
    /* Compact Launchpad (User Dashboard) */
    .launchpad-card {
        flex-direction: row !important;
        align-items: center !important;
        padding: 1rem !important;
        min-height: auto !important;
        margin-bottom: 0px !important;
    }
    .launchpad-card > div:first-child {
        display: flex;
        align-items: center;
        gap: 15px;
        width: 100%;
    }
    .launchpad-icon-box {
        width: 40px !important;
        height: 40px !important;
        margin-bottom: 0 !important;
        font-size: 1.1rem !important;
        flex-shrink: 0;
    }
    .launchpad-card h3 {
        margin-bottom: 0 !important;
        font-size: 1.05rem !important;
    }
    .launchpad-card .desc,
    .launchpad-card .cta {
        display: none !important;
    }
}

@media (max-width: 480px) {
    .kpi-grid, .stat-grid {
        grid-template-columns: 1fr !important;
    }
}
