/* ========================================
   Farmer Management System - Main Styles
   ======================================== */

:root {
    --sidebar-width: 240px;
    --navbar-height: 56px;
    --primary-green: #198754;
    --light-green: #d1e7dd;
}

/* Typography */
body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background-color: #f5f6f8;
    font-size: 0.9rem;
}

/* Navbar */
.navbar {
    z-index: 1040;
    height: var(--navbar-height);
}
.navbar-brand i { color: #ffc107; }

/* Sidebar */
.sidebar {
    position: fixed;
    top: var(--navbar-height);
    left: 0;
   /* width: var(--sidebar-width); */
	width: 194px;
    height: calc(100vh - var(--navbar-height));
    background: #fff;
    border-right: 1px solid #e0e0e0;
    overflow-y: auto;
    z-index: 1030;
}

.sidebar-nav .nav-link {
    display: flex;
    align-items: center;
    padding: 0.6rem 1rem;
    color: #444;
    font-size: 0.875rem;
    border-left: 3px solid transparent;
    transition: all 0.15s;
}

.sidebar-nav .nav-link i {
    width: 24px;
    margin-right: 10px;
    font-size: 1rem;
    text-align: center;
}

.sidebar-nav .nav-link:hover {
    background: var(--light-green);
    color: var(--primary-green);
}

.sidebar-nav .nav-link.active {
    background: var(--light-green);
    color: var(--primary-green);
    border-left-color: var(--primary-green);
    font-weight: 600;
}

/* Main Content */
.main-content {
    margin-left: var(--sidebar-width);
    margin-top: var(--navbar-height);
    min-height: calc(100vh - var(--navbar-height));
}

/* Cards */
.stat-card {
    border: none;
    border-radius: 10px;
    transition: transform 0.15s;
}
.stat-card:hover { transform: translateY(-2px); }

.stat-card .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

.stat-card .stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
}

.stat-card .stat-label {
    font-size: 0.8rem;
    color: #6c757d;
}

/* Tables */
.table th {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    color: #6c757d;
    border-bottom-width: 1px;
}

.table td { vertical-align: middle; }

.table-action-btn {
    padding: 0.2rem 0.5rem;
    font-size: 0.8rem;
}

/* Forms */
.form-label { font-weight: 500; font-size: 0.85rem; }
.form-control, .form-select { font-size: 0.9rem; }

/* Page Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.page-header h4 { margin: 0; font-weight: 600; }

/* Auth Pages */
.auth-card {
    width: 100%;
    max-width: 420px;
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
}
.auth-card .card-header {
    background: var(--primary-green);
    color: #fff;
    text-align: center;
    border-radius: 12px 12px 0 0 !important;
    padding: 1.5rem;
}
.auth-card .card-header i { font-size: 2rem; }

/* Badges */
.badge { font-weight: 500; font-size: 0.75rem; }

/* Print */
@media print {
    .sidebar, .navbar, .no-print { display: none !important; }
    .main-content { margin: 0 !important; }
}

/* Mobile Responsive */
@media (max-width: 991.98px) {
    .sidebar {
        position: fixed;
        top: 0;
        height: 100vh;
        border-right: none;
        box-shadow: 4px 0 12px rgba(0,0,0,0.15);
    }
    .main-content {
        margin-left: 0;
    }
}

/* Touch-friendly buttons on mobile */
@media (max-width: 575.98px) {
    .btn { min-height: 44px; }
    .table-responsive { font-size: 0.8rem; }
    .page-header { flex-direction: column; align-items: flex-start; }
}

/* Chart containers */
.chart-container {
    position: relative;
    height: 300px;
}

/* Quick action cards */
.quick-action {
    text-align: center;
    padding: 1rem;
    border-radius: 10px;
    transition: all 0.15s;
    text-decoration: none;
    color: #444;
    display: block;
}
.quick-action:hover {
    background: var(--light-green);
    color: var(--primary-green);
    transform: translateY(-2px);
}
.quick-action i { font-size: 1.8rem; display: block; margin-bottom: 0.5rem; }
.quick-action span { font-size: 0.8rem; font-weight: 500; }

/* Skeleton loading */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 4px;
}
@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
