:root {
    /* Clean Light Theme Palette */
    --bg-light: #f8fafc;
    --panel-bg: rgba(255, 255, 255, 0.9);
    --panel-border: rgba(203, 213, 225, 0.8);
    --text-main: #0f172a;
    --text-light: #64748b;
    
    /* Nature Accents */
    --eco-green: #16a34a; /* Leaf Green */
    --eco-gold: #d97706; /* Harvest Gold */
    --eco-leaf: #059669; /* Emerald */
    --eco-earth: #ea580c; /* Terracotta */
    
    --glow-green: 0 4px 14px rgba(22, 163, 74, 0.3);
    --glow-gold: 0 4px 14px rgba(217, 119, 6, 0.3);
    --glow-leaf: 0 4px 14px rgba(5, 150, 105, 0.3);
    --glow-earth: 0 4px 14px rgba(234, 88, 12, 0.3);
}

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

h1, h2, h3, h4, .logo {
    font-family: 'Outfit', sans-serif;
    letter-spacing: 0.5px;
    color: var(--text-main);
}

body.light-theme {
    background-color: var(--bg-light);
    background-image: 
        radial-gradient(at 0% 0%, rgba(22, 163, 74, 0.05) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(217, 119, 6, 0.05) 0px, transparent 50%);
    color: var(--text-main);
    min-height: 100vh;
}

/* Glass & Eco Panels */
.glass-panel {
    background: var(--panel-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--panel-border);
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 4px 24px -2px rgba(0, 0, 0, 0.05);
}

.eco-border {
    position: relative;
}
.eco-border::before {
    content: '';
    position: absolute;
    top: -1px; left: -1px; right: -1px; bottom: -1px;
    border-radius: 16px;
    background: linear-gradient(45deg, var(--eco-green), transparent, var(--eco-gold));
    z-index: -1;
    opacity: 0.15;
}

.glow-box {
    background: #ffffff;
    border: 1px solid var(--panel-border);
    padding: 1rem;
    border-radius: 10px;
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.01);
}

/* Layout */
.app-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Navigation */
.sidebar {
    width: 280px;
    margin: 1rem;
    height: calc(100vh - 2rem);
    position: sticky;
    top: 1rem;
    display: flex;
    flex-direction: column;
    padding: 2rem 1.5rem;
}

.logo {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 3rem;
}
.logo i { color: var(--eco-green); }

.sidebar-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
}

.nav-btn {
    background: transparent;
    border: 1px solid transparent;
    padding: 1rem 1.2rem;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-light);
    cursor: pointer;
    border-radius: 10px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 1rem;
    text-align: left;
}

.nav-btn:hover {
    background: rgba(22, 163, 74, 0.05);
    border-color: rgba(22, 163, 74, 0.2);
    color: var(--text-main);
    transform: translateX(5px);
}

.nav-btn.active {
    background: rgba(22, 163, 74, 0.1);
    border-color: var(--eco-green);
    color: var(--eco-green);
    box-shadow: inset 0 0 10px rgba(22, 163, 74, 0.05);
}

.system-status {
    padding-top: 1rem;
    border-top: 1px solid var(--panel-border);
    font-size: 0.85rem;
    color: var(--text-light);
}
.status-indicator {
    display: flex; align-items: center; gap: 0.5rem;
    color: var(--eco-leaf); font-weight: 600; margin-top: 0.5rem; letter-spacing: 1px;
}
.pulse {
    width: 8px; height: 8px; background: var(--eco-leaf); border-radius: 50%;
    box-shadow: var(--glow-leaf); animation: pulseAnim 2s infinite;
}
@keyframes pulseAnim {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(5, 150, 105, 0.4); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(5, 150, 105, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(5, 150, 105, 0); }
}

/* Main Content Area */
.main-content {
    flex: 1;
    padding: 2rem 3rem 2rem 1rem;
    max-width: 1200px;
}

.view-section { display: none; animation: fadeIn 0.4s ease-out forwards; }
.view-section.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.dashboard-header { margin-bottom: 2rem; }
.greeting h1 { font-size: 2rem; color: var(--text-main); margin-bottom: 0.3rem; }
.greeting p { color: var(--text-light); }

/* Banners */
.module-banner {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

/* Stats Grid */
.stats-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.5rem; margin-bottom: 2rem;
}
.stat-card { display: flex; align-items: center; gap: 1.5rem; }
.stat-card .icon {
    width: 60px; height: 60px; border-radius: 12px; display: flex; align-items: center; justify-content: center;
    font-size: 1.8rem; background: #ffffff; box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.icon.eco-green { color: var(--eco-green); border: 1px solid rgba(22,163,74,0.3); }
.icon.eco-gold { color: var(--eco-gold); border: 1px solid rgba(217,119,6,0.3); }
.icon.eco-leaf { color: var(--eco-leaf); border: 1px solid rgba(5,150,105,0.3); }
.icon.eco-earth { color: var(--eco-earth); border: 1px solid rgba(234,88,12,0.3); }

.stat-card p { color: var(--text-light); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 1px; }
.stat-card h3 { font-size: 1.8rem; color: var(--text-main); margin-top: 0.2rem; }

/* Cards & Lists */
.cards-row {
    display: flex; gap: 1.5rem; flex-wrap: wrap; align-items: start;
}
.flex-1 { flex: 1; min-width: 300px; }
.flex-2 { flex: 2; min-width: 400px; }
.main-card h3 { margin-bottom: 1.5rem; font-size: 1.2rem; color: var(--text-main); }

.list-view { display: flex; flex-direction: column; gap: 1rem; }
.list-item {
    display: flex; justify-content: space-between; align-items: center; padding: 1rem;
    background: #ffffff; border-radius: 8px; border: 1px solid var(--panel-border);
    box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}
.list-item:hover { background: #f8fafc; }
.list-item p { color: var(--text-light); font-size: 0.9rem; }
.list-item h4 { color: var(--text-main); margin-bottom: 0.2rem; }
.text-green { color: var(--eco-green); }
.text-red { color: var(--eco-earth); }

/* Forms */
.cyber-form { display: flex; flex-direction: column; gap: 0.8rem; }
.cyber-form label { font-size: 0.85rem; color: var(--text-light); text-transform: uppercase; letter-spacing: 1px; font-weight: 500; }
.cyber-input {
    background: #ffffff; border: 1px solid var(--panel-border); padding: 0.8rem; border-radius: 8px;
    color: var(--text-main); font-size: 1rem; outline: none; transition: 0.3s;
}
.cyber-input:focus { border-color: var(--eco-green); box-shadow: 0 0 0 3px rgba(22,163,74,0.1); }

.cyber-btn {
    background: #ffffff; border: 1px solid var(--panel-border); padding: 0.8rem 1.5rem;
    color: var(--text-main); border-radius: 8px; cursor: pointer; font-weight: 600; transition: 0.3s;
    display: flex; align-items: center; gap: 0.5rem; justify-content: center;
}
.cyber-btn.primary {
    background: var(--eco-green); border-color: var(--eco-green); color: white; text-transform: uppercase; letter-spacing: 1px;
}
.cyber-btn.primary:hover { background: #15803d; box-shadow: var(--glow-green); }
.cyber-btn:hover:not(.primary) { background: #f1f5f9; }
.mt-4 { margin-top: 1rem; }
.mt-2 { margin-top: 0.5rem; }

/* Tracking Stepper */
.tracking-list { display: flex; flex-direction: column; gap: 1rem; }
.tracking-card { background: #ffffff; border: 1px solid var(--panel-border); border-radius: 12px; padding: 1.5rem; }
.tracking-header { display: flex; justify-content: space-between; margin-bottom: 1.5rem; border-bottom: 1px solid var(--panel-border); padding-bottom: 0.8rem; }
.tracking-header h4 { font-family: 'Inter'; color: var(--text-main);}
.tracking-header span { color: var(--text-light); font-size: 0.85rem; }

.stepper { display: flex; justify-content: space-between; position: relative; }
.stepper::before { content: ''; position: absolute; top: 12px; left: 0; right: 0; height: 2px; background: var(--panel-border); z-index: 1; }
.step { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 0.5rem; width: 60px; }
.step-circle {
    width: 26px; height: 26px; border-radius: 50%; background: #ffffff; border: 2px solid var(--panel-border);
    display: flex; align-items: center; justify-content: center; font-size: 0.8rem; color: var(--text-light);
}
.step.active .step-circle { border-color: var(--eco-green); color: var(--eco-green); box-shadow: 0 0 0 3px rgba(22,163,74,0.1); }
.step.completed .step-circle { background: var(--eco-green); border-color: var(--eco-green); color: white; }
.step-label { font-size: 0.7rem; color: var(--text-light); text-align: center; font-weight: 500; }
.step.active .step-label { color: var(--text-main); }

.eco-text-leaf  { color: var(--eco-leaf);  font-weight: 600; }
.eco-text-green { color: var(--eco-green); font-weight: 600; }
.eco-text-earth { color: var(--eco-earth); font-weight: 600; }
.eco-text-gold  { color: var(--eco-gold);  font-weight: 600; }

/* Status text */
.status-text { font-size: 0.9rem; font-weight: 500; min-height: 1.2rem; }

/* Loader spinner */
.loader {
    width: 20px; height: 20px; border-radius: 50%;
    border: 2px solid var(--panel-border);
    border-top-color: var(--eco-green);
    animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Spacing helpers */
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }

/* Modal UI */
.modal {
    display: none; position: fixed; z-index: 1000; left: 0; top: 0; width: 100%; height: 100%;
    background-color: rgba(15, 23, 42, 0.4); backdrop-filter: blur(5px); align-items: center; justify-content: center;
}
.modal.active { display: flex; animation: fadeIn 0.3s ease-out forwards; }
.close:hover { color: var(--text-main); }

/* Login View */
.login-wrapper {
    display: flex; justify-content: center; align-items: center; min-height: 100vh; padding: 1rem;
}
.login-card {
    width: 100%; max-width: 400px; padding: 3rem 2rem; animation: fadeIn 0.5s ease-out; background: #ffffff;
}

/* Slide-out Notifications Panel */
.notif-panel {
    position: fixed; top: 0; right: -400px; width: 350px; height: 100vh; z-index: 1000;
    transition: right 0.3s ease-in-out; border-radius: 0; border-left: 1px solid var(--panel-border);
    background: #ffffff;
}
.notif-panel.open { right: 0; }

/* Chart Container */
.chart-container { position: relative; height: 250px; width: 100%; margin-top: 1rem; }

/* Awesomplete Light Theme Overrides */
div.awesomplete { display: block; }
div.awesomplete > ul {
    background: #ffffff; border: 1px solid var(--panel-border); border-radius: 8px;
    color: var(--text-main); box-shadow: 0 10px 25px rgba(0,0,0,0.1); z-index: 9999;
}
div.awesomplete > ul > li { padding: 0.8rem 1rem; font-size: 0.95rem; border-bottom: 1px solid var(--panel-border); }
div.awesomplete > ul > li:hover, div.awesomplete > ul > li[aria-selected="true"] { background: rgba(22, 163, 74, 0.1); color: var(--eco-green); }
div.awesomplete mark { background: transparent; color: var(--eco-green); font-weight: 700; }

@media (max-width: 768px) {
    .app-layout { flex-direction: column; }
    .sidebar { width: auto; height: auto; margin: 1rem; position: static; padding: 1rem; }
    .sidebar-links { flex-direction: row; flex-wrap: wrap; justify-content: center; }
    .nav-btn { padding: 0.8rem; }
    .nav-btn span, .nav-btn text { display: none; }
    .main-content { padding: 1rem; }
    .stepper { flex-direction: column; gap: 1.5rem; align-items: flex-start; }
    .stepper::before { left: 12px; top: 0; bottom: 0; width: 2px; height: auto; }
    .step { flex-direction: row; width: 100%; }
}
