:root {
    --primary-green: #2D5016;
    --light-green: #3A5F1B;
    --golden: #D4AF37;
    --golden-light: #E6B422;
    --danger: #C41E3A;
    --dark: #1A1A1A;
    --gray: #6c757d;
    --light-gray: #f8f9fa;
    --white: #ffffff;
    --sidebar-width: 260px;
    --topbar-height: 60px;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f0f2f5;
    color: var(--dark);
    overflow-x: hidden;
}

.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--light-green) 50%, var(--golden) 100%);
    padding: 20px;
}

.login-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    max-width: 450px;
    width: 100%;
    animation: slideIn 0.5s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-header {
    background: var(--primary-green);
    color: white;
    padding: 30px;
    text-align: center;
}

.login-header img {
    width: 80px;
    height: 80px;
    margin-bottom: 15px;
}

.login-header h2 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 5px;
}

.login-body {
    padding: 40px;
}

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: linear-gradient(180deg, var(--primary-green) 0%, #1a3a0f 100%);
    color: white;
    z-index: 1000;
    overflow-y: auto;
    transition: all 0.3s ease;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.sidebar-brand {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-brand img {
    width: 60px;
    height: 60px;
    margin-bottom: 10px;
}

.sidebar-brand h3 {
    font-size: 18px;
    font-weight: 700;
    margin: 0;
    line-height: 1.3;
}

.sidebar-menu {
    padding: 20px 0;
}

.menu-section-title {
    padding: 15px 20px 10px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--golden-light);
    opacity: 0.8;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 14px;
    border-left: 3px solid transparent;
}

.sidebar-menu a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-left-color: var(--golden);
    padding-left: 25px;
}

.sidebar-menu a.active {
    background: rgba(212, 175, 55, 0.2);
    color: white;
    border-left-color: var(--golden);
    font-weight: 600;
}

.sidebar-menu a i {
    width: 20px;
    margin-right: 12px;
    font-size: 16px;
    text-align: center;
}

.topbar {
    position: fixed;
    top: 0;
    left: var(--sidebar-width);
    right: 0;
    height: var(--topbar-height);
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    z-index: 999;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    color: var(--dark);
    cursor: pointer;
}

.topbar h4 {
    font-size: 20px;
    font-weight: 600;
    color: var(--dark);
    margin: 0;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.notification-icon {
    position: relative;
    color: var(--gray);
    font-size: 20px;
    cursor: pointer;
    transition: color 0.3s;
}

.notification-icon:hover {
    color: var(--primary-green);
}

.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--danger);
    color: white;
    border-radius: 10px;
    padding: 2px 6px;
    font-size: 10px;
    font-weight: 600;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 8px 15px;
    border-radius: 8px;
    transition: background 0.3s;
}

.user-menu:hover {
    background: var(--light-gray);
}

.user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--light-green);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 16px;
}

.user-info h6 {
    font-size: 14px;
    font-weight: 600;
    margin: 0;
    color: var(--dark);
}

.user-info span {
    font-size: 12px;
    color: var(--gray);
}

.main-content {
    margin-left: var(--sidebar-width);
    margin-top: var(--topbar-height);
    padding: 30px;
    min-height: calc(100vh - var(--topbar-height));
}

.page-header {
    margin-bottom: 30px;
}

.page-header h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 5px;
}

.page-header p {
    color: var(--gray);
    margin: 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border-left: 4px solid var(--primary-green);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.stat-card.golden {
    border-left-color: var(--golden);
}

.stat-card.danger {
    border-left-color: var(--danger);
}

.stat-card.success {
    border-left-color: #28a745;
}

.stat-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
}

.stat-icon.primary {
    background: linear-gradient(135deg, var(--light-green), var(--primary-green));
}

.stat-icon.golden {
    background: linear-gradient(135deg, var(--golden-light), var(--golden));
}

.stat-icon.danger {
    background: linear-gradient(135deg, #e74c3c, var(--danger));
}

.stat-icon.success {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
}

.stat-card h3 {
    font-size: 32px;
    font-weight: 700;
    color: var(--dark);
    margin: 0;
}

.stat-card p {
    color: var(--gray);
    margin: 5px 0 0 0;
    font-size: 14px;
}

.card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 20px;
    overflow: hidden;
}

.card-header {
    padding: 20px 25px;
    background: var(--light-gray);
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h5 {
    font-size: 18px;
    font-weight: 600;
    color: var(--dark);
    margin: 0;
}

.card-body {
    padding: 25px;
}

.btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-primary {
    background: var(--light-green);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-green);
}

.btn-golden {
    background: var(--golden);
    color: white;
}

.btn-golden:hover {
    background: #c4a033;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover {
    background: #a01729;
}

.btn-secondary {
    background: var(--gray);
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #218838;
}

.btn-warning {
    background: var(--golden);
    color: white;
}

.btn-warning:hover {
    background: #c4a033;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
    background-color: #3a5f1b;
    color: white;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 16px;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--dark);
    font-size: 14px;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s;
    background: white;
}

.form-control:focus {
    outline: none;
    border-color: var(--light-green);
    box-shadow: 0 0 0 3px rgba(58, 95, 27, 0.1);
}

.form-select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    cursor: pointer;
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

.table-responsive {
    overflow-x: auto;
    margin: -25px;
    padding: 25px;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table thead th {
    background: var(--light-gray);
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: var(--dark);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--light-green);
}

.table tbody td {
    padding: 15px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
}

.table tbody tr:hover {
    background: #f8f9fa;
}

.badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    display: inline-block;
}

.badge-primary {
    background: var(--light-green);
    color: white;
}

.badge-golden {
    background: var(--golden);
    color: white;
}

.badge-danger {
    background: var(--danger);
    color: white;
}

.badge-success {
    background: #28a745;
    color: white;
}

.badge-warning {
    background: #ffc107;
    color: var(--dark);
}

.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border-left: 4px solid #28a745;
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border-left: 4px solid var(--danger);
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border-left: 4px solid #ffc107;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border-left: 4px solid #17a2b8;
}

.pagination {
    display: flex;
    gap: 5px;
    justify-content: center;
    margin-top: 20px;
}

.pagination a,
.pagination span {
    padding: 8px 14px;
    border-radius: 6px;
    border: 1px solid #ddd;
    color: var(--dark);
    text-decoration: none;
    transition: all 0.3s;
}

.pagination a:hover {
    background: var(--light-green);
    color: white;
    border-color: var(--light-green);
}

.pagination .active {
    background: var(--light-green);
    color: white;
    border-color: var(--light-green);
}

@media (max-width: 768px) {
    .sidebar {
        left: calc(-1 * var(--sidebar-width));
    }

    .sidebar.active {
        left: 0;
    }

    .topbar {
        left: 0;
    }

    .main-content {
        margin-left: 0;
    }

    .menu-toggle {
        display: block;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .user-info {
        display: none;
    }
}

@media print {
    .sidebar,
    .topbar,
    .btn,
    .no-print {
        display: none !important;
    }

    .main-content {
        margin: 0;
        padding: 0;
    }

    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

.d-flex {
    display: flex;
}

.justify-between {
    justify-content: space-between;
}

.align-center {
    align-items: center;
}

.gap-2 {
    gap: 10px;
}

.gap-3 {
    gap: 15px;
}

.mb-0 {
    margin-bottom: 0;
}

.mb-2 {
    margin-bottom: 10px;
}

.mb-3 {
    margin-bottom: 15px;
}

.mb-4 {
    margin-bottom: 20px;
}

.mt-3 {
    margin-top: 15px;
}

.mt-4 {
    margin-top: 20px;
}

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.w-100 {
    width: 100%;
}

.btn-group {
    display: flex;
    gap: 5px;
}

.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-menu {
    position: absolute;
    right: 0;
    top: 100%;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 200px;
    margin-top: 10px;
    display: none;
    z-index: 1000;
}

.dropdown-menu.show {
    display: block;
}

.dropdown-item {
    padding: 12px 20px;
    display: block;
    color: var(--dark);
    text-decoration: none;
    transition: background 0.3s;
    border-bottom: 1px solid #f0f0f0;
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-item:hover {
    background: var(--light-gray);
}

.chart-container {
    position: relative;
    height: 300px;
    margin: 20px 0;
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -10px;
}

.row1 {
    flex-wrap: wrap;
    margin: 0 -10px;
}

.col-md-3,
.col-md-4,
.col-md-6,
.col-md-8,
.col-md-12 {
    padding: 0 10px;
    margin-bottom: 20px;
}

.col-md-3 {
    flex: 0 0 25%;
    max-width: 25%;
}

.col-md-4 {
    flex: 0 0 33.333%;
    max-width: 33.333%;
}

.col-md-6 {
    flex: 0 0 50%;
    max-width: 50%;
}

.col-md-8 {
    flex: 0 0 66.666%;
    max-width: 66.666%;
}

.col-md-12 {
    flex: 0 0 100%;
    max-width: 100%;
}

@media (max-width: 768px) {
    .col-md-3,
    .col-md-4,
    .col-md-6,
    .col-md-8,
    .col-md-12 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}
