* {
    margin: 0;
    padding: 0;
    box-sizing: border-box
}

html {
    overflow-x: hidden
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    overflow-x: hidden
}

::-webkit-scrollbar {
    width: 6px
}

::-webkit-scrollbar-track {
    background: transparent
}

::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.3);
    border-radius: 3px
}

.dark ::-webkit-scrollbar-thumb {
    background: rgba(71, 85, 105, 0.5)
}

.sidebar-nav {
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none
}

.sidebar-nav::-webkit-scrollbar {
    width: 0;
    display: none
}

.card-premium {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1)
}

.card-premium:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1)
}

.dark .card-premium:hover {
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4)
}

.status-online {
    animation: statusPulse 2s ease-in-out infinite
}

@keyframes statusPulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4)
    }

    50% {
        box-shadow: 0 0 0 8px rgba(16, 185, 129, 0)
    }
}

.menu-active {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(14, 165, 233, 0.1));
    border-right: 3px solid #10b981;
    color: #059669
}

.dark .menu-active {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(14, 165, 233, 0.15));
    color: #34d399
}

.badge-pulse {
    animation: badgePulse 2s ease-in-out infinite
}

@keyframes badgePulse {

    0%,
    100% {
        transform: scale(1)
    }

    50% {
        transform: scale(1.15)
    }
}

.sidebar-overlay {
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px)
}

.toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    pointer-events: none
}

.toast-container>* {
    pointer-events: auto
}

.dropdown-panel {
    position: absolute;
    right: 0;
    margin-top: 0.5rem
}

@media (max-width: 640px) {
    .dropdown-panel {
        position: fixed !important;
        top: 4.25rem !important;
        left: 0.5rem !important;
        right: 0.5rem !important;
        margin-top: 0 !important;
        width: auto !important;
        max-width: none !important;
        max-height: calc(100vh - 5rem) !important;
        overflow-y: auto !important;
    }
}

@media (max-width: 480px) {
    .toast-container {
        top: 0.5rem !important;
        right: 0.5rem !important;
        left: 0.5rem !important;
    }

    .toast-container>* {
        min-width: 0 !important;
        max-width: 100% !important;
        width: 100%;
    }
}

.tab-btn.active {
    background: white;
    color: #059669;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.dark .tab-btn.active {
    background: #334155;
    color: #34d399;
}

/* Solar Panel Visual */
.solar-panel-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 4px;
    padding: 8px;
    background: linear-gradient(135deg, #1e40af, #1e3a8a);
    border-radius: 8px;
}

.solar-cell {
    aspect-ratio: 1;
    background: linear-gradient(135deg, #3b82f6, #1e40af);
    border-radius: 2px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    position: relative;
    overflow: hidden;
}

.solar-cell::before {
    content: '';
    position: absolute;
    top: 20%;
    left: 20%;
    right: 20%;
    bottom: 20%;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 1px;
}

.solar-cell.active {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.6);
}

.solar-cell.inactive {
    background: linear-gradient(135deg, #1e293b, #0f172a);
    opacity: 0.5;
}

/* Battery Visual */
.battery-3d {
    width: 100%;
    height: 200px;
    background: linear-gradient(180deg, #f8fafc 0%, #e2e8f0 100%);
    border: 4px solid #64748b;
    border-radius: 16px;
    position: relative;
    overflow: hidden;
}

.dark .battery-3d {
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    border-color: #475569;
}

.battery-3d::before {
    content: '';
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 12px;
    background: #64748b;
    border-radius: 4px 4px 0 0;
}

.dark .battery-3d::before {
    background: #475569;
}

.battery-fill-3d {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(180deg, rgba(16, 185, 129, 0.9) 0%, rgba(16, 185, 129, 1) 50%, rgba(5, 150, 105, 1) 100%);
    border-radius: 12px 12px 0 0;
    transition: height 1s ease-in-out;
    box-shadow: 0 -4px 20px rgba(16, 185, 129, 0.4);
}

.battery-fill-3d.medium {
    background: linear-gradient(180deg, rgba(245, 158, 11, 0.9) 0%, rgba(217, 119, 6, 1) 100%);
    box-shadow: 0 -4px 20px rgba(245, 158, 11, 0.4);
}

.battery-fill-3d.low {
    background: linear-gradient(180deg, rgba(239, 68, 68, 0.9) 0%, rgba(220, 38, 38, 1) 100%);
    box-shadow: 0 -4px 20px rgba(239, 68, 68, 0.4);
}

/* Weather Icon */
.sun-icon {
    animation: sunGlow 3s ease-in-out infinite;
}

/* Panel Grid */
.installation-card {
    transition: all 0.3s;
    border: 2px solid transparent;
}

.installation-card:hover {
    border-color: #10b981;
    transform: translateY(-2px);
}

/* Energy Flow Arrow */
.flow-arrow {
    background: repeating-linear-gradient(90deg, #10b981 0, #10b981 8px, transparent 8px, transparent 16px);
    animation: flowMove 1s linear infinite;
    height: 3px;
}

@keyframes flowMove {
    0% {
        background-position: 0 0
    }

    100% {
        background-position: 32px 0
    }
}