@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Gurmukhi:wght@400;700&family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #2B9348;
    --primary-light: #80B918;
    --secondary: #FF9E1B;
    --tertiary: #8B5E34;
    --dark: #1E1E1E;
    --light: #F8F9FA;
}

body {
    font-family: 'Poppins', 'Noto Sans Gurmukhi', sans-serif;
    background-color: #f5f7fa;
    color: var(--dark);
}

.map-container {
    height: 100%;
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.gradient-bg {
    background: linear-gradient(135deg, rgba(43, 147, 72, 0.1) 0%, rgba(128, 185, 24, 0.05) 100%);
}

.dashboard-card {
    transition: all 0.3s ease;
}

.dashboard-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.language-selector {
    position: relative;
}

.language-selector:hover .language-dropdown {
    display: block;
}

.nav-item {
    position: relative;
}

.nav-item:after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--primary);
    transition: width 0.3s ease;
}

.nav-item:hover:after {
    width: 100%;
}

.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: var(--primary-light);
    border-radius: 10px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

canvas {
    height: 300px !important;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
}

.tab-content {
    transition: all 0.3s ease;
}

.tab-content:not(.active) {
    display: none;
}

/* Mobile responsiveness */
@media (max-width: 767px) {
    body.overflow-hidden {
        overflow: hidden;
    }

    #mobile-menu {
        position: fixed;
        top: 0;
        right: -80%;
        width: 80%;
        max-width: 300px;
        height: 100%;
        background-color: white;
        z-index: 100;
        padding: 1.5rem;
        box-shadow: -2px 0 8px rgba(0, 0, 0, 0.1);
        transition: right 0.3s ease-in-out;
        display: flex;
        flex-direction: column;
    }

    #mobile-menu.menu-open {
        right: 0;
    }

    #mobile-menu .nav-item {
        margin-bottom: 1rem;
        border-bottom: 1px solid #f3f4f6;
        padding-bottom: 0.5rem;
        width: 100%;
        text-align: left;
        font-size: 1rem;
    }
}

/* Alert animation */
@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

.alert-critical {
    animation: pulse 2s infinite;
    border-left-width: 6px;
}

.add-field-form {
    max-width: 600px;
    margin: 0 auto;
    padding: 2rem;
}

.mobile-scroll {
    overflow-x: auto;
}

/* Cube animation styles */
.scene {
    width: 200px;
    height: 200px;
    perspective: 600px;
    margin: auto;
}

.cube {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    animation: rotate 20s infinite linear;
}

.cube__face {
    position: absolute;
    width: 200px;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    font-weight: bold;
    color: white;
    background: rgba(43, 147, 72, 0.8);
    border: 2px solid #fff;
    border-radius: 10px;
}

.cube__face--front  { transform: rotateY(  0deg) translateZ(100px); }
.cube__face--right  { transform: rotateY( 90deg) translateZ(100px); }
.cube__face--back   { transform: rotateY(180deg) translateZ(100px); }
.cube__face--left   { transform: rotateY(-90deg) translateZ(100px); }
.cube__face--top    { transform: rotateX( 90deg) translateZ(100px); }
.cube__face--bottom { transform: rotateX(-90deg) translateZ(100px); }

@keyframes rotate {
    from { transform: rotateX(0deg) rotateY(0deg); }
    to { transform: rotateX(360deg) rotateY(360deg); }
}

/* Loader for connection status */
.loader {
    border: 6px solid #f3f3f3;
    border-top: 6px solid #2B9348;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 2s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Toast notifications */
#toast-container {
    pointer-events: none;
}

#toast-container > div {
    pointer-events: auto;
}

/* Error state for containers */
.error-state {
    text-align: center;
    padding: 2rem 1rem;
    color: #6b7280;
}

.error-state svg {
    margin: 0 auto 0.5rem;
}

/* Loading state for containers */
.loading-state {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.loading-state .spinner {
    border: 3px solid #f3f4f6;
    border-top: 3px solid #16a34a;
    border-radius: 50%;
    width: 2rem;
    height: 2rem;
    animation: spin 0.8s linear infinite;
}