:root {
    --primary-color: #5C3B1E;
    --secondary-color: #8B5E34;
    --bg-color: #F5F1E8;
    --text-light: #FFFFFF;
    --accent-color: #D4AF37;
    --sidebar-width: 250px;
    --topbar-height: 60px;
}

body {
    background-color: var(--bg-color);
    font-family: 'Inter', sans-serif;
    color: #333;
    overflow-x: hidden;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    background: linear-gradient(180deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--text-light);
    z-index: 1000;
    transition: all 0.3s;
    box-shadow: 4px 0 10px rgba(0,0,0,0.1);
}

.sidebar .sidebar-brand {
    height: var(--topbar-height);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    color: var(--accent-color);
}

.sidebar .nav-link {
    color: rgba(255,255,255,0.8);
    padding: 12px 20px;
    margin: 5px 15px;
    border-radius: 8px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
}

.sidebar .nav-link:hover, .sidebar .nav-link.active {
    color: var(--primary-color);
    background-color: var(--accent-color);
    font-weight: 600;
}

.sidebar .nav-link i {
    width: 25px;
    font-size: 1.1rem;
}

/* Main Content */
.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    transition: all 0.3s;
}

/* Topbar */
.topbar {
    height: var(--topbar-height);
    background-color: var(--text-light);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    position: sticky;
    top: 0;
    z-index: 999;
}

/* Cards */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: transform 0.2s;
}

.card:hover {
    transform: translateY(-2px);
}

.card-header {
    background-color: transparent;
    border-bottom: 1px solid #f0f0f0;
    font-weight: bold;
    color: var(--primary-color);
    padding: 15px 20px;
}

/* Stats Cards */
.stat-card {
    border-radius: 15px;
    padding: 20px;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.stat-card .icon {
    font-size: 2.5rem;
    opacity: 0.8;
}
.bg-gradient-primary { background: linear-gradient(45deg, var(--primary-color), var(--secondary-color)); }
.bg-gradient-success { background: linear-gradient(45deg, #198754, #20c997); }
.bg-gradient-warning { background: linear-gradient(45deg, #ffc107, #ffcd39); color: #333 !important;}
.bg-gradient-danger { background: linear-gradient(45deg, #dc3545, #f87171); }

/* Buttons */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}
.btn-primary:hover {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
}
.btn-accent {
    background-color: var(--accent-color);
    color: var(--primary-color);
    font-weight: bold;
}
.btn-accent:hover {
    background-color: #c4a133;
    color: var(--primary-color);
}

/* Auth Page */
.auth-bg {
    background: url('https://images.unsplash.com/photo-1541888086225-f52a781b212f?auto=format&fit=crop&q=80&w=1920') no-range center/cover;
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}
.auth-bg::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(92, 59, 30, 0.7); /* primary-color with opacity */
    backdrop-filter: blur(5px);
}
.auth-card {
    position: relative;
    z-index: 1;
    background: white;
    border-radius: 15px;
    padding: 40px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

/* DataTables customization */
.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: var(--primary-color) !important;
    color: white !important;
    border: none;
    border-radius: 5px;
}

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