* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Outfit', sans-serif;
}

::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #0ea5e9, #6366f1);
    border-radius: 10px;
}

.glass {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.dark .glass {
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.glass-sidebar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border-right: 1px solid rgba(0, 0, 0, 0.06);
}

.dark .glass-sidebar {
    background: rgba(15, 23, 42, 0.97);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.glass-card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.dark .glass-card {
    background: rgba(30, 41, 59, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.gradient-text {
    background: linear-gradient(135deg, #0ea5e9, #6366f1, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.card-lift {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.card-lift:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.12);
}

.dark .card-lift:hover {
    box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.4);
}

.btn-ripple {
    position: relative;
    overflow: hidden;
}

.btn-ripple::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    background-image: radial-gradient(circle, #fff 10%, transparent 10.01%);
    background-repeat: no-repeat;
    background-position: 50%;
    transform: scale(10, 10);
    opacity: 0;
    transition: transform .5s, opacity 1s;
}

.btn-ripple:active::after {
    transform: scale(0, 0);
    opacity: .3;
    transition: 0s;
}

.sidebar-link {
    position: relative;
    display: flex;
    align-items: center;
    padding: 10px 16px;
    border-radius: 12px;
    color: #64748b;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    gap: 12px;
    text-decoration: none;
    white-space: nowrap;
}

.sidebar-link:hover {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.1), rgba(99, 102, 241, 0.1));
    color: #0ea5e9;
    transform: translateX(4px);
}

.sidebar-link.active {
    background: linear-gradient(135deg, #0ea5e9, #6366f1);
    color: white;
    box-shadow: 0 8px 25px -5px rgba(14, 165, 233, 0.4);
}

.sidebar-link.active i {
    color: white;
}

.sidebar-link i {
    width: 20px;
    text-align: center;
    font-size: 15px;
    transition: all 0.3s;
    flex-shrink: 0;
}

.dark .sidebar-link {
    color: #94a3b8;
}

.dark .sidebar-link:hover {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.15), rgba(99, 102, 241, 0.15));
    color: #38bdf8;
}

.dark .sidebar-link.active {
    background: linear-gradient(135deg, #0ea5e9, #6366f1);
    color: white;
}

.sidebar-tooltip {
    position: absolute;
    left: calc(100% + 12px);
    top: 50%;
    transform: translateY(-50%);
    padding: 5px 12px;
    background: #0f172a;
    color: white;
    font-size: 12px;
    font-weight: 500;
    border-radius: 8px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    z-index: 999;
}

.sidebar-link:hover .sidebar-tooltip {
    opacity: 1;
}

.sidebar-tooltip::before {
    content: '';
    position: absolute;
    right: 100%;
    top: 50%;
    transform: translateY(-50%);
    border: 5px solid transparent;
    border-right-color: #0f172a;
}

/* ===== CRITICAL FIX: Chart container overflow ===== */
.chart-container {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.chart-container canvas {
    max-width: 100% !important;
    height: auto !important;
}

.apexcharts-canvas {
    max-width: 100% !important;
}

.apexcharts-svg {
    overflow: hidden !important;
}

[id$="Chart"] {
    max-width: 100%;
    overflow: hidden;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px)
    }

    to {
        opacity: 1;
        transform: translateY(0)
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px)
    }

    to {
        opacity: 1;
        transform: translateY(0)
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px)
    }

    to {
        opacity: 1;
        transform: translateX(0)
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px)
    }

    to {
        opacity: 1;
        transform: translateX(0)
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9)
    }

    to {
        opacity: 1;
        transform: scale(1)
    }
}

@keyframes pulse-soft {

    0%,
    100% {
        opacity: 1
    }

    50% {
        opacity: 0.7
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px)
    }

    50% {
        transform: translateY(-8px)
    }
}

@keyframes spin-slow {
    from {
        transform: rotate(0deg)
    }

    to {
        transform: rotate(360deg)
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% 0
    }

    100% {
        background-position: 200% 0
    }
}

@keyframes plane-fly {
    0% {
        transform: translateX(-8px) translateY(3px)
    }

    50% {
        transform: translateX(8px) translateY(-3px)
    }

    100% {
        transform: translateX(-8px) translateY(3px)
    }
}

@keyframes dot-pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 1
    }

    50% {
        transform: scale(1.5);
        opacity: 0.5
    }
}

@keyframes music-bounce {

    0%,
    100% {
        transform: scaleY(1)
    }

    50% {
        transform: scaleY(0.3)
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

.animate-fade-in-down {
    animation: fadeInDown 0.5s ease forwards;
}

.animate-fade-in-left {
    animation: fadeInLeft 0.6s ease forwards;
}

.animate-fade-in-right {
    animation: fadeInRight 0.6s ease forwards;
}

.animate-scale-in {
    animation: scaleIn 0.4s ease forwards;
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

.animate-spin-slow {
    animation: spin-slow 8s linear infinite;
}

.animate-plane {
    animation: plane-fly 3s ease-in-out infinite;
}

.delay-100 {
    animation-delay: .1s
}

.delay-200 {
    animation-delay: .2s
}

.delay-300 {
    animation-delay: .3s
}

.delay-400 {
    animation-delay: .4s
}

.delay-500 {
    animation-delay: .5s
}

.delay-600 {
    animation-delay: .6s
}

.progress-bar {
    height: 7px;
    border-radius: 999px;
    background: #e2e8f0;
    overflow: hidden;
}

.dark .progress-bar {
    background: #334155;
}

.progress-fill {
    height: 100%;
    border-radius: 999px;
    transition: width 1.5s ease-in-out;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    gap: 4px;
}

.badge-success {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
}

.dark .badge-success {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
}

.badge-warning {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
}

.dark .badge-warning {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
}

.badge-danger {
    background: rgba(244, 63, 94, 0.1);
    color: #e11d48;
}

.dark .badge-danger {
    background: rgba(244, 63, 94, 0.2);
    color: #fb7185;
}

.badge-info {
    background: rgba(14, 165, 233, 0.1);
    color: #0284c7;
}

.dark .badge-info {
    background: rgba(14, 165, 233, 0.2);
    color: #38bdf8;
}

.badge-purple {
    background: rgba(139, 92, 246, 0.1);
    color: #7c3aed;
}

.dark .badge-purple {
    background: rgba(139, 92, 246, 0.2);
    color: #a78bfa;
}

.notification-dot {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 8px;
    height: 8px;
    background: #ef4444;
    border-radius: 50%;
    border: 2px solid white;
    animation: dot-pulse 2s infinite;
}

.dark .notification-dot {
    border-color: #0f172a;
}

.music-wave {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 16px;
}

.music-bar {
    width: 3px;
    background: linear-gradient(to top, #0ea5e9, #6366f1);
    border-radius: 2px;
    animation: music-bounce 0.8s ease infinite;
}

.music-bar:nth-child(1) {
    height: 40%;
    animation-delay: 0s
}

.music-bar:nth-child(2) {
    height: 70%;
    animation-delay: 0.1s
}

.music-bar:nth-child(3) {
    height: 50%;
    animation-delay: 0.2s
}

.music-bar:nth-child(4) {
    height: 90%;
    animation-delay: 0.3s
}

.music-bar:nth-child(5) {
    height: 60%;
    animation-delay: 0.4s
}

.tab-btn {
    padding: 7px 16px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 500;
    color: #64748b;
    transition: all 0.3s;
    cursor: pointer;
    border: none;
    background: transparent;
}

.tab-btn.active {
    background: linear-gradient(135deg, #0ea5e9, #6366f1);
    color: white;
    box-shadow: 0 4px 15px rgba(14, 165, 233, 0.3);
}

.tab-btn:hover:not(.active) {
    background: rgba(14, 165, 233, 0.1);
    color: #0ea5e9;
}

.flight-path {
    position: relative;
}

.flight-path::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 15%;
    right: 15%;
    height: 2px;
    background: repeating-linear-gradient(90deg, #cbd5e1 0px, #cbd5e1 6px, transparent 6px, transparent 12px);
}

.weather-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    padding: 14px 22px;
    border-radius: 12px;
    color: white;
    font-weight: 500;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* ===== CRITICAL: Prevent all overflow ===== */
.overflow-fix {
    overflow: hidden;
    min-width: 0;
}

main {
    overflow-x: hidden;
}

.grid {
    min-width: 0;
}

.grid>* {
    min-width: 0;
    overflow: hidden;
}

@media(max-width:1024px) {
    .sidebar-desktop {
        display: none
    }
}

@media(min-width:1025px) {
    .mobile-sidebar-btn {
        display: none
    }
}

@media(max-width:640px) {
    .stat-card-grid {
        grid-template-columns: 1fr !important;
    }
}