:root {
    --primary: #2d5a27;
    --primary-light: #3d7a36;
    --primary-dark: #1a3c1a;
    --accent: #f59e0b;
    --sidebar-width: 250px;
}

/* Sidebar */
.wrapper { display: flex; min-height: 100vh; }
.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, var(--primary-dark) 0%, var(--primary) 100%);
    min-height: 100vh;
    position: fixed;
    top: 0; left: 0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
}
.sidebar.collapsed { transform: translateX(-100%); }
.sidebar-header { border-bottom: 1px solid rgba(255,255,255,0.1); }
.sidebar-menu { padding: 8px 0; flex: 1; overflow-y: auto; }
.sidebar-menu li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    color: rgba(255,255,255,0.75);
    text-decoration: none;
    font-size: 0.875rem;
    transition: all 0.2s;
}
.sidebar-menu li a:hover,
.sidebar-menu li.active a {
    background: rgba(255,255,255,0.12);
    color: #fff;
    border-right: 3px solid var(--accent);
}
.sidebar-menu li a i { width: 18px; text-align: center; font-size: 0.9rem; }
.sidebar-section-label {
    padding: 12px 20px 4px;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255,255,255,0.4);
    font-weight: 600;
}
.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
}
.sidebar-footer a {
    font-size: 0.875rem;
    text-decoration: none;
}

/* Main content */
.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    background: #f5f7f5;
    min-height: 100vh;
    transition: margin-left 0.3s ease;
}
.main-content.expanded { margin-left: 0; }

/* Topbar */
.topbar {
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    height: 56px;
    position: sticky;
    top: 0;
    z-index: 100;
}

/* Stats Cards */
.stat-card {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    padding: 20px;
    transition: box-shadow 0.2s;
}
.stat-card:hover { box-shadow: 0 4px 20px rgba(0,0,0,0.08); }
.stat-card .icon {
    width: 48px; height: 48px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.25rem;
}
.icon-green  { background: #dcfce7; color: #16a34a; }
.icon-blue   { background: #dbeafe; color: #2563eb; }
.icon-amber  { background: #fef3c7; color: #d97706; }
.icon-red    { background: #fee2e2; color: #dc2626; }
.icon-teal   { background: #ccfbf1; color: #0d9488; }
.icon-purple { background: #ede9fe; color: #7c3aed; }

/* Tables */
.table-card {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    overflow: hidden;
}
.table-card .table { margin-bottom: 0; font-size: 0.875rem; }
.table-card .table thead th {
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
    font-weight: 600;
    color: #374151;
    padding: 12px 16px;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.table-card .table td { padding: 12px 16px; vertical-align: middle; color: #374151; }
.table-card .table tbody tr:hover { background: #f9fafb; }

/* Page header */
.page-header {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    padding: 20px 24px;
    margin-bottom: 24px;
}
.page-header h4 { font-weight: 700; color: #111827; margin: 0; }
.page-header p { color: #6b7280; font-size: 0.875rem; margin: 0; }

/* Badges */
.badge-growing  { background: #dcfce7; color: #15803d; }
.badge-harvested { background: #dbeafe; color: #1d4ed8; }
.badge-failed   { background: #fee2e2; color: #b91c1c; }
.badge-rabi     { background: #fef3c7; color: #92400e; }
.badge-kharif   { background: #dcfce7; color: #166534; }

/* Responsive */
@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.show { transform: translateX(0); }
    .main-content { margin-left: 0; }
}
