:root {
    --admin-primary: #0b5e2a;
    --admin-primary-light: #29a220;
    --admin-secondary: #2e7d32;
    --admin-danger: #d32f2f;
    --admin-warning: #f57c00;
    --admin-info: #0288d1;
    --admin-light: #f5f7fa;
    --admin-dark: #2c3e50;
    --admin-accent: #7e57c2;
    --admin-accent-light: #8e67d2;
    --admin-gray: #6c757d;
    --admin-border: #e1e5e9;
    --admin-bg: #f8f9fa;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--admin-bg);
    overflow-x: hidden;
}

.admin-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Styles */
.admin-sidebar {
    width: 260px;
    background: linear-gradient(180deg, var(--admin-primary) 0%, var(--admin-primary-light) 100%);
    color: white;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    z-index: 1000;
    transition: all 0.3s ease;
}

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

.sidebar-header h2 {
    margin-bottom: 5px;
    font-size: 1.3rem;
    font-weight: 600;
}

.sidebar-header p {
    opacity: 0.9;
    font-size: 0.85rem;
    color: #e3f2fd;
}

.admin-badge {
    background: var(--admin-accent);
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.65rem;
    margin-left: 5px;
    vertical-align: middle;
    font-weight: 600;
}

.sidebar-menu {
    list-style: none;
    padding: 15px 0;
    margin: 0;
}

.sidebar-menu li {
    margin: 0 10px 5px;
    border-radius: 8px;
    overflow: hidden;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    color: rgba(255,255,255,0.9);
    text-decoration: none;
    transition: all 0.3s;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 8px;
}

.sidebar-menu a:hover,
.sidebar-menu a:focus {
    background: rgba(255,255,255,0.15);
    color: white;
    transform: translateX(5px);
    outline: 2px solid rgba(255,255,255,0.3);
}

.sidebar-menu a.active {
    background: rgba(255,255,255,0.2);
    color: white;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

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

.admin-alert-badge {
    background: var(--admin-danger);
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 0.7rem;
    margin-left: auto;
    font-weight: bold;
    min-width: 20px;
    text-align: center;
}

/* Main Content Styles */
.admin-main {
    flex: 1;
    margin-left: 260px;
    padding: 20px;
    min-height: 100vh;
    transition: all 0.3s ease;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--admin-border);
    flex-wrap: wrap;
    gap: 15px;
}

.admin-header h1 {
    color: var(--admin-dark);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.6rem;
    font-weight: 700;
    margin: 0;
}

.admin-header h1 i {
    color: var(--admin-accent);
    font-size: 1.4rem;
}

.header-info {
    background: white;
    padding: 10px 15px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    font-size: 0.85rem;
    color: var(--admin-gray);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Alert Messages */
.alert {
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid transparent;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-success {
    background: #e8f5e8;
    border-color: var(--admin-secondary);
    color: #2e7d32;
}

.alert-error {
    background: #ffebee;
    border-color: var(--admin-danger);
    color: #c62828;
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    border-left: 4px solid var(--admin-primary);
    transition: transform 0.3s, box-shadow 0.3s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.1);
}

.stat-card.admin { border-left-color: var(--admin-primary); }
.stat-card.security { border-left-color: var(--admin-danger); }
.stat-card.audit { border-left-color: var(--admin-warning); }
.stat-card.reports { border-left-color: var(--admin-info); }
.stat-card.total { border-left-color: var(--admin-accent); }

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--admin-dark);
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--admin-gray);
    font-weight: 500;
}

/* Filters Section */
.filters-section {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.filters-header {
    margin-bottom: 15px;
    color: var(--admin-dark);
    padding-bottom: 10px;
    border-bottom: 1px solid var(--admin-border);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.2rem;
    font-weight: 600;
}

.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    align-items: end;
}

.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--admin-dark);
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--admin-border);
    border-radius: 6px;
    font-size: 0.9rem;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--admin-primary);
    box-shadow: 0 0 0 3px rgba(26, 75, 140, 0.1);
}

/* Logs Table */
.logs-section {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.section-header {
    margin-bottom: 15px;
    color: var(--admin-dark);
    padding-bottom: 10px;
    border-bottom: 1px solid var(--admin-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.2rem;
    font-weight: 600;
}

.section-title i {
    color: var(--admin-accent);
}

.batch-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

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

.btn:focus {
    outline: 2px solid var(--admin-accent);
    outline-offset: 2px;
}

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

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

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

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

.btn-outline {
    background: transparent;
    color: var(--admin-gray);
    border: 1px solid var(--admin-border);
}

.btn-outline:hover {
    background: var(--admin-light);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.8rem;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--admin-gray);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.5;
}

.empty-state p {
    font-size: 1rem;
    margin-bottom: 10px;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 15px;
    left: 15px;
    background: var(--admin-primary);
    color: white;
    border: none;
    border-radius: 6px;
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
    z-index: 1100;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* Responsive Design */
@media (max-width: 992px) {
    .admin-sidebar {
        width: 240px;
        transform: translateX(-100%);
    }
    
    .admin-sidebar.active {
        transform: translateX(0);
    }
    
    .admin-main {
        margin-left: 0;
        width: 100%;
    }
    
    .mobile-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .admin-main {
        padding: 15px;
    }
    
    .admin-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .header-info {
        width: 100%;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .batch-actions {
        width: 100%;
        justify-content: space-between;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .admin-main {
        padding: 10px;
    }
    
    .filters-section, .logs-section {
        padding: 15px;
    }
    
    .batch-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
}