:root {
    --bg-base: #020a07; /* Deep Abyss Green */
    --bg-glass: rgba(5, 25, 18, 0.65);
    --bg-glass-heavy: rgba(5, 25, 18, 0.92);
    --sidebar-bg: rgba(2, 10, 7, 0.96);
    --neon-lime: #ccff00; /* Signature Accent */
    --neon-lime-dim: rgba(204, 255, 0, 0.12);
    --neon-glow: 0 0 15px rgba(204, 255, 0, 0.2);
    --text-light: #eaf5f0;
    --text-muted: #8ca39a;
    --success: #00ff88;
    --danger: #ff3b3b;
    --warning: #ffb700;
    --accent: var(--neon-lime);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', 'Inter', sans-serif;
}

body {
    background-color: var(--bg-base);
    color: var(--text-light);
    display: flex;
    min-height: 100vh;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(204, 255, 0, 0.02) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(204, 255, 0, 0.03) 0%, transparent 40%);
    overflow-x: hidden;
}

/* Sidebar styling */
.sidebar {
    width: 280px;
    background: var(--sidebar-bg);
    height: 100vh;
    position: fixed;
    padding: 2.5rem 1.5rem;
    border-right: 1px solid var(--neon-lime-dim);
    z-index: 1000;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.sidebar h2 {
    font-size: 1.4rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: -0.5px;
    color: var(--neon-lime);
    text-shadow: var(--neon-glow);
    margin-bottom: 2.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar h2 i {
    text-shadow: var(--neon-glow);
}

.sidebar-nav {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    overflow-y: auto;
    flex-grow: 1;
    padding-right: 5px;
}

/* Sidebar scrollbar */
.sidebar-nav::-webkit-scrollbar {
    width: 4px;
}
.sidebar-nav::-webkit-scrollbar-thumb {
    background: var(--neon-lime-dim);
    border-radius: 4px;
}

.sidebar-nav a {
    text-decoration: none;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    padding: 0.7rem 1.1rem;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.sidebar-nav a i {
    margin-right: 12px;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.sidebar-nav a:hover, 
.sidebar-nav a.active {
    background: var(--neon-lime-dim);
    color: var(--neon-lime);
    border-color: rgba(204, 255, 0, 0.2);
    box-shadow: 0 4px 15px rgba(204, 255, 0, 0.05);
}

.sidebar-nav a:hover i, 
.sidebar-nav a.active i {
    transform: scale(1.1);
    color: var(--neon-lime);
}

/* Main Content area */
.main-content {
    margin-left: 280px;
    flex: 1;
    padding: 2.5rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: margin-left 0.3s ease;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    padding-bottom: 1.5rem;
}

.header-top h1 {
    font-size: 2rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: -0.5px;
    background: linear-gradient(180deg, #ffffff 0%, var(--text-muted) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header-top .btn-neon-outline {
    text-decoration: none;
}

/* Premium Glass Bento Cards */
.glass-card {
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--neon-lime-dim);
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

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

.stat-item {
    background: rgba(2, 10, 7, 0.4);
    border: 1px solid rgba(204, 255, 0, 0.08);
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.2rem;
    transition: all 0.3s ease;
}

.stat-item:hover {
    border-color: var(--neon-lime-dim);
    transform: translateY(-2px);
    box-shadow: var(--neon-glow);
}

.stat-item .icon-box {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: var(--neon-lime-dim);
    border: 1px solid var(--neon-lime);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--neon-lime);
    font-size: 1.4rem;
    text-shadow: var(--neon-glow);
}

.stat-item .stat-info {
    display: flex;
    flex-direction: column;
}

.stat-item h3 {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.3rem;
}

.stat-item .value {
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--text-light);
    line-height: 1;
}

/* Premium Form controls */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.6rem;
    color: var(--text-light);
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

input[type="text"], 
input[type="email"], 
input[type="password"], 
input[type="number"], 
input[type="date"], 
input[type="file"],
textarea, 
select {
    width: 100%;
    background: rgba(2, 10, 7, 0.6);
    border: 1px solid var(--neon-lime-dim);
    border-radius: 10px;
    padding: 0.8rem 1.1rem;
    color: var(--text-light);
    font-size: 0.95rem;
    outline: none;
    transition: all 0.3s ease;
}

input:focus, 
textarea:focus, 
select:focus {
    border-color: var(--neon-lime);
    box-shadow: var(--neon-glow);
    background: rgba(2, 10, 7, 0.8);
}

textarea {
    resize: vertical;
}

/* Buttons */
.btn {
    padding: 0.8rem 1.8rem;
    border-radius: 30px;
    border: none;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary {
    background: var(--neon-lime);
    color: var(--bg-base);
    box-shadow: var(--neon-glow);
}

.btn-primary:hover {
    background: #e6ff66;
    transform: translateY(-2px);
    box-shadow: 0 0 25px rgba(204, 255, 0, 0.4);
}

.btn-danger {
    background: rgba(255, 59, 59, 0.15);
    color: var(--danger);
    border: 1px solid rgba(255, 59, 59, 0.3);
}

.btn-danger:hover {
    background: var(--danger);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 0 15px rgba(255, 59, 59, 0.3);
}

.btn-neon-outline {
    background: transparent;
    color: var(--neon-lime);
    border: 1px solid var(--neon-lime);
    box-shadow: inset 0 0 8px rgba(204, 255, 0, 0.1);
}

.btn-neon-outline:hover {
    background: var(--neon-lime);
    color: var(--bg-base);
    box-shadow: var(--neon-glow);
    transform: translateY(-2px);
}

/* Interactive Table Styling */
.table-responsive {
    overflow-x: auto;
    width: 100%;
    border-radius: 12px;
    border: 1px solid var(--neon-lime-dim);
}

table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(2, 10, 7, 0.2);
}

th {
    background: rgba(5, 25, 18, 0.8);
    text-align: left;
    color: var(--neon-lime);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.8rem;
    padding: 1.1rem 1.5rem;
    border-bottom: 1px solid var(--neon-lime-dim);
}

td {
    padding: 1.1rem 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.03);
    color: var(--text-light);
    font-size: 0.9rem;
    transition: background 0.2s;
}

tr:hover td {
    background: rgba(204, 255, 0, 0.02);
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-success { background: rgba(0, 255, 136, 0.1); color: var(--success); border: 1px solid rgba(0, 255, 136, 0.3); }
.badge-danger { background: rgba(255, 59, 59, 0.1); color: var(--danger); border: 1px solid rgba(255, 59, 59, 0.3); }
.badge-warning { background: rgba(255, 183, 0, 0.1); color: var(--warning); border: 1px solid rgba(255, 183, 0, 0.3); }

/* Responsive Mobile Layouts */
.admin-mobile-topbar {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%;
    height: 60px;
    background: var(--sidebar-bg);
    border-bottom: 1px solid var(--neon-lime-dim);
    z-index: 999;
    padding: 0 1.5rem;
    align-items: center;
    justify-content: space-between;
}

.admin-mobile-topbar .toggle-btn {
    color: var(--neon-lime);
    font-size: 1.4rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: var(--neon-lime-dim);
    border: 1px solid rgba(204, 255, 0, 0.15);
}

.admin-mobile-topbar .brand-title {
    color: var(--neon-lime);
    font-weight: 900;
    text-transform: uppercase;
    font-size: 1.1rem;
    letter-spacing: -0.5px;
    text-shadow: var(--neon-glow);
}

@media (max-width: 991px) {
    .sidebar {
        left: -280px;
    }
    
    .sidebar.active {
        left: 0;
        box-shadow: 0 0 50px rgba(0,0,0,0.8), 0 0 20px rgba(204,255,0,0.05);
    }
    
    .main-content {
        margin-left: 0;
        padding: 6.5rem 1.5rem 2rem 1.5rem; /* Space for the topbar */
    }
    
    .admin-mobile-topbar {
        display: flex;
    }
    
    .header-top {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
}

/* Sustainability Telemetry Dashboard Grid */
.telemetry-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

@media (max-width: 991px) {
    .telemetry-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .telemetry-right {
        border-left: none !important;
        padding-left: 0 !important;
        padding-top: 2rem;
        border-top: 1px solid rgba(255, 255, 255, 0.05);
        display: flex;
        flex-direction: column;
        align-items: center;
    }
}

.sidebar-close {
    display: none;
}

@media (max-width: 991px) {
    .sidebar-close {
        display: block !important;
    }
}

/* Responsive Form and Bento Grid Utilities */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1.5rem;
}

@media (max-width: 768px) {
    .grid-2, .grid-3 {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

.grid-2-1 {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
}

@media (max-width: 768px) {
    .grid-2-1 {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

/* Eco-System Telemetry Card Styles */
.telemetry-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    align-items: center;
}

@media (max-width: 991px) {
    .telemetry-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .telemetry-right {
        border-left: none !important;
        border-top: 1px solid rgba(255, 255, 255, 0.05);
        padding-left: 0 !important;
        padding-top: 2rem;
    }
}
