:root {
    --primary-color: #244c30; /* Deep Agri Green */
    --primary-dark: #1a3622;
    --accent-color: #ef4444; /* Alert/Red accent */
    --bg-main: #ffffff;
    --bg-sidebar: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border-color: #f1f5f9;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    font-size: 13.5px;
    background-color: #ffffff;
    background-image: 
        radial-gradient(at 100% 100%, hsla(24, 100%, 85%, 0.8) 0, transparent 80%),
        radial-gradient(at 0% 0%, hsla(20, 100%, 96%, 0.8) 0, transparent 80%),
        radial-gradient(at 0% 100%, hsla(180, 20%, 98%, 0.8) 0, transparent 80%);
    background-attachment: fixed;
    color: var(--text-main);
    overflow-x: hidden;
    line-height: 1.6;
}

.wrapper {
    display: flex;
    width: 100%;
    align-items: stretch;
}

/* Sidebar Styling - Clean & Premium */
#sidebar {
    min-width: 280px;
    max-width: 280px;
    background: var(--bg-sidebar);
    color: var(--text-main);
    transition: all 0.3s;
    height: 100vh;
    position: fixed;
    z-index: 999;
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    background: transparent;
}

#sidebar ul.components {
    padding: 20px 15px;
}

#sidebar ul li a {
    padding: 12px 18px;
    font-size: 14.5px;
    display: block;
    color: #475569;
    text-decoration: none;
    border-radius: 12px;
    margin-bottom: 4px;
    transition: all 0.2s ease;
    font-weight: 500;
}

#sidebar ul li a i {
    margin-right: 12px;
    width: 20px;
    text-align: center;
    font-size: 16px;
    opacity: 0.7;
}

#sidebar ul li a:hover {
    background: #f8fafc;
    color: var(--primary-color);
}

#sidebar ul li.active > a {
    background: rgba(36, 76, 48, 0.08);
    color: var(--primary-color);
    font-weight: 600;
}

#sidebar ul li.active > a i {
    opacity: 1;
}

/* Content Area */
#content {
    width: 100%;
    padding: 30px 45px;
    padding-top: 100px; /* Space for topbar */
    min-height: 100vh;
    margin-left: 280px;
}

/* Top Navbar */
.top-navbar {
    position: fixed;
    top: 0;
    right: 0;
    width: calc(100% - 280px);
    height: 80px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(15px);
    display: flex;
    align-items: center;
    padding: 0 45px;
    z-index: 998;
    border-bottom: 1px solid var(--border-color);
}

.page-title {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 26px;
    color: #1a1a1a;
    letter-spacing: -0.5px;
}

/* Card Styling - Axiom Inspired */
.card-premium {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 18px;
    padding: 28px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.02);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-premium:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.05);
}

/* Stats Cards */
.stat-card-label {
    font-size: 12px;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.stat-card-value {
    font-size: 32px;
    font-weight: 700;
    color: #1a1a1a;
    letter-spacing: -1px;
}

/* Table Styling */
.table-premium {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 8px;
}

.table-premium thead th {
    border: none;
    color: var(--text-muted);
    font-weight: 700;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 15px 20px;
}

.table-premium tbody tr {
    background: #ffffff;
    transition: all 0.2s;
}

.table-premium tbody td {
    padding: 18px 20px;
    border-top: 1px solid var(--border-color) !important;
    border-bottom: 1px solid var(--border-color) !important;
    vertical-align: middle;
}

.table-premium tbody td:first-child {
    border-left: 1px solid var(--border-color) !important;
    border-top-left-radius: 12px;
    border-bottom-left-radius: 12px;
}

.table-premium tbody td:last-child {
    border-right: 1px solid var(--border-color) !important;
    border-top-right-radius: 12px;
    border-bottom-right-radius: 12px;
}

.table-premium tbody tr:hover {
    background: #f8fafc;
}

/* Badges */
.badge-custom {
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

/* Buttons */
.btn-premium-primary {
    background: var(--primary-color);
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 12.5px;
    transition: all 0.2s;
}

.btn-premium-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(36, 76, 48, 0.2);
    color: #fff;
}

.btn-outline-primary-custom {
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    border-radius: 12px;
    font-weight: 600;
    font-size: 12.5px;
    padding: 10px 20px;
    transition: all 0.2s;
    background: transparent;
}

.btn-outline-primary-custom:hover {
    background: var(--primary-color);
    color: #fff;
}

.btn-premium-orange {
    background: #f97316; /* Tailwind Orange 500 */
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 12.5px;
    transition: all 0.2s;
}

.btn-premium-orange:hover {
    background: #ea580c; /* Tailwind Orange 600 */
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.2);
    color: #fff;
}

.btn-outline-orange {
    color: #f97316;
    border: 1px solid #f97316;
    border-radius: 12px;
    font-weight: 600;
    font-size: 12.5px;
    padding: 10px 20px;
    transition: all 0.2s;
}

.btn-outline-orange:hover {
    background: #f97316;
    color: #fff;
}

.btn-premium-secondary {
    background: #f1f5f9;
    color: #475569;
    border: none;
    padding: 10px 20px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 12.5px;
}

/* Pagination */
.pagination-container {
    margin-top: 30px;
    display: flex;
    justify-content: center;
    gap: 8px;
}

.btn-page {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: #fff;
    color: var(--text-main);
    transition: all 0.2s;
    font-weight: 600;
}

.btn-page.active {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.btn-page:hover:not(.active) {
    background: #f1f5f9;
}

/* Typography Helpers */
.font-heading {
    font-family: 'Outfit', sans-serif;
}

.font-mono {
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 12px;
}

/* Utility classes */
.bg-primary-custom { background-color: var(--primary-color) !important; }
.text-primary-custom { color: var(--primary-color) !important; }
.text-orange { color: #f97316 !important; }
.border-primary-custom { border-color: var(--primary-color) !important; }

/* Premium Form Styling */
.form-control {
    border: 1px solid #e2e8f0;
    font-weight: 500;
    transition: all 0.2s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(36, 76, 48, 0.1);
    background-color: #fff !important;
}

/* Date & Time Picker Thematic Overrides */
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    filter: invert(24%) sepia(18%) saturate(1212%) hue-rotate(85deg) brightness(95%) contrast(88%);
    /* This filter makes the icon match #244c30 approximately */
}

input[type="date"], input[type="time"] {
    position: relative;
    padding-right: 40px;
}

/* Modal styles */
.modal-content {
    border: none;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Responsive */
@media (max-width: 992px) {
    #sidebar { margin-left: -280px; }
    #sidebar.active { margin-left: 0; }
    #content { margin-left: 0; width: 100%; padding: 20px; padding-top: 90px; }
    .top-navbar { width: 100%; padding: 0 20px; }
}
