:root {
    /* Color Palette */
    --primary-green: #0F5132;
    /* Deep Emerald */
    --accent-gold: #FFC107;
    /* Golden Harvest */
    --text-dark: #212529;
    /* Slate Black */
    --text-muted: #6c757d;
    --bg-light: #F8F9FA;
    --white: #FFFFFF;

    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);

    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
}

/* Typography */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Montserrat:wght@500;600;700&display=swap');

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-light);
}

h1,
h2,
h3,
h4,
h5,
h6,
.navbar-brand {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
}

/* Navigation */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
    padding: 1.2rem 0;
    transition: all 0.3s ease;
}

.navbar-brand {
    font-size: 1.5rem;
    letter-spacing: -0.5px;
    color: var(--primary-green) !important;
}

.nav-link {
    font-weight: 500;
    color: var(--text-dark) !important;
    padding: 0.5rem 1rem !important;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-green) !important;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    background-color: var(--primary-green);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 70%;
}

.dropdown-menu {
    border: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-radius: var(--radius-md);
    padding: 1rem;
    margin-top: 1rem;
    animation: fadeInUp 0.3s ease;
}

.dropdown-item {
    padding: 0.7rem 1.2rem;
    border-radius: var(--radius-sm);
    font-weight: 500;
    color: var(--text-dark);
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background-color: rgba(15, 81, 50, 0.05);
    color: var(--primary-green);
    transform: translateX(5px);
}

.dropdown-item i {
    width: 20px;
    text-align: center;
    margin-right: 10px;
    color: var(--primary-green);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hero Section */
.hero-section {
    background: linear-gradient(rgba(15, 81, 50, 0.85), rgba(15, 81, 50, 0.7)),
        url('https://images.unsplash.com/photo-1625246333195-78d9c38ad449?q=80&w=1740&auto=format&fit=crop') center/cover;
    min-height: 85vh;
    display: flex;
    align-items: center;
    text-align: center;
    color: white;
    margin-top: 80px;
    /* Spacing for fixed header */
}

.hero-title {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

/* Components */
.btn {
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

.btn-primary {
    background-color: var(--primary-green);
    border: none;
    color: white;
    box-shadow: 0 4px 14px 0 rgba(15, 81, 50, 0.39);
}

.btn-primary:hover {
    background-color: #0b3d26;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(15, 81, 50, 0.23);
}

.btn-outline-light {
    border-width: 2px;
}

.btn-outline-light:hover {
    background-color: white;
    color: var(--primary-green);
    transform: translateY(-2px);
}

.card {
    border: none;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.service-card {
    padding: 2.5rem;
    text-align: center;
    height: 100%;
    background: white;
}

.service-icon {
    width: 80px;
    height: 80px;
    background: rgba(15, 81, 50, 0.1);
    color: var(--primary-green);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
    transition: all 0.3s ease;
}

.service-card:hover .service-icon {
    background: var(--primary-green);
    color: white;
    transform: scale(1.1);
}

.stat-card {
    background: linear-gradient(135deg, var(--primary-green), #0b3d26);
    color: white;
}

/* Footer */
.footer {
    background: #0b3d26;
    color: rgba(255, 255, 255, 0.8);
    padding: 4rem 0 2rem;
    font-size: 0.95rem;
}

.footer h5,
.footer h6 {
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1.2rem;
}

.footer p,
.footer a,
.footer li {
    font-size: 0.9rem;
}

.footer a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer a:hover {
    color: white;
}

/* Dashboard Layout */
.dashboard-container {
    display: flex;
    min-height: 100vh;
    background-color: #f8f9fa;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: #ffffff;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.02);
    position: fixed;
    top: 80px;
    /* Below fixed header */
    bottom: 0;
    left: 0;
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    border-right: 1px solid rgba(0, 0, 0, 0.05);
}

.sidebar.collapsed {
    width: 80px;
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.sidebar-menu {
    padding: 1rem 0;
    list-style: none;
    margin: 0;
}

.sidebar-item {
    padding: 0.25rem 1rem;
    margin-bottom: 0.25rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    padding: 0.8rem 1rem;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
}

.sidebar-link:hover,
.sidebar-link.active {
    background-color: rgba(15, 81, 50, 0.08);
    color: var(--primary-green);
}

.sidebar-link i {
    width: 24px;
    margin-right: 12px;
    font-size: 1.1rem;
    text-align: center;
    transition: margin 0.3s ease;
}

.sidebar.collapsed .sidebar-link {
    justify-content: center;
    padding: 0.8rem 0;
}

.sidebar.collapsed .sidebar-link i {
    margin-right: 0;
}

.sidebar.collapsed .sidebar-text,
.sidebar.collapsed .sidebar-badge,
.sidebar.collapsed .fa-chevron-down {
    display: none;
}

/* Submenu */
.sidebar-submenu {
    list-style: none;
    padding-left: 3rem;
    margin-top: 0.25rem;
    display: none;
}

.sidebar-submenu.show {
    display: block;
}

.sidebar.collapsed .sidebar-submenu {
    display: none !important;
}

.submenu-link {
    display: block;
    padding: 0.5rem 0;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.submenu-link:hover {
    color: var(--primary-green);
}

/* Main Content Area */
.main-content {
    flex: 1;
    margin-left: 280px;
    padding: 2rem;
    margin-top: 80px;
    /* Below fixed header */
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.main-content.expanded {
    margin-left: 80px;
}

/* Mobile Responsiveness */
@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
        width: 280px !important;
        top: 70px;
        /* Adjust for mobile header height */
    }

    .sidebar.show {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0 !important;
        padding: 1.5rem;
    }

    .sidebar-toggle-btn {
        display: block !important;
    }
}

/* Scrollbar Styling */
.sidebar::-webkit-scrollbar {
    width: 5px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.2);
}

/* Dashboard Cards */
.dashboard-card {
    background: white;
    border-radius: var(--radius-md);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.dashboard-footer {
    margin-left: 280px;
    transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background-color: #f8f9fa;
}

.dashboard-footer.expanded {
    margin-left: 80px;
}

@media (max-width: 991.98px) {
    .dashboard-footer {
        margin-left: 0 !important;
    }
}

.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin-right: 10px;
    transition: all 0.3s ease;
    text-decoration: none;
}

.social-links a:hover {
    background: var(--primary-green);
    color: white !important;
    transform: translateY(-3px);
}

/* Utilities */
.text-primary {
    color: var(--primary-green) !important;
}

.text-success {
    color: var(--primary-green) !important;
}

.bg-success {
    background-color: var(--primary-green) !important;
}

.text-warning {
    color: var(--accent-gold) !important;
}

.section-padding {
    padding: 100px 0;
}

/* Forms */
.form-control {
    padding: 12px 15px;
    border-radius: var(--radius-sm);
    border: 1px solid #e0e0e0;
}

.form-control:focus {
    border-color: var(--primary-green);
    box-shadow: 0 0 0 3px rgba(15, 81, 50, 0.1);
}

/* Calendar */
.farming-calendar {
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.calendar-header {
    background: var(--primary-green);
    color: white;
    padding: 1.5rem;
    text-align: center;
}