:root {
    --primary: #2E7D32;
    --primary-dark: #1B5E20;
    --secondary: #FFD700;
    --dark: #1a1a2e;
    --sidebar-width: 260px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Segoe UI', sans-serif; background: #f5f7fa; min-height: 100vh; display: flex; }

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    transition: transform 0.3s;
    z-index: 1000;
}

.sidebar-header {
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-header .logo { width: 45px; height: 45px; border-radius: 50%; }
.sidebar-header h4 { font-size: 1.2rem; margin: 0; }

.sidebar .nav { padding: 15px 0; }
.sidebar .nav-section {
    padding: 15px 20px 8px;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: rgba(255,255,255,0.5);
    letter-spacing: 1px;
}

.sidebar .nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.sidebar .nav-link:hover { background: rgba(255,255,255,0.1); color: white; }
.sidebar .nav-link.active { background: rgba(255,255,255,0.15); color: white; border-left-color: var(--secondary); }
.sidebar .nav-link i { font-size: 1.1rem; width: 24px; }
.sidebar .nav-link .badge { margin-left: auto; font-size: 0.7rem; }

.sidebar-footer { padding: 20px; border-top: 1px solid rgba(255,255,255,0.1); margin-top: auto; }

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

.header {
    background: white;
    padding: 15px 25px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f5f7fa;
    padding: 8px 15px;
    border-radius: 25px;
    flex: 1;
    max-width: 400px;
}

.search-box input { border: none; background: none; outline: none; flex: 1; }
.search-box i { color: #999; }

.header-right { display: flex; align-items: center; gap: 15px; margin-left: auto; }

.btn-icon {
    background: none;
    border: none;
    padding: 8px;
    border-radius: 50%;
    position: relative;
    cursor: pointer;
}

.btn-icon:hover { background: #f5f7fa; }
.btn-icon .badge { position: absolute; top: 0; right: 0; font-size: 0.65rem; padding: 2px 5px; background: #dc3545; color: white; border-radius: 10px; }
.btn-icon .avatar { width: 35px; height: 35px; border-radius: 50%; }

.content-area { padding: 25px; }

/* Cards */
.card {
    background: white;
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.card-header {
    background: none;
    border-bottom: 1px solid #eee;
    padding: 15px 20px;
}

.card-header h5 { margin: 0; font-size: 1rem; font-weight: 600; }
.card-body { padding: 20px; }

/* Stat Cards */
.stat-card {
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    color: white;
}

.stat-card.bg-primary { background: linear-gradient(135deg, #2E7D32, #1B5E20); }
.stat-card.bg-success { background: linear-gradient(135deg, #28a745, #20c997); }
.stat-card.bg-info { background: linear-gradient(135deg, #17a2b8, #6f42c1); }
.stat-card.bg-warning { background: linear-gradient(135deg, #ffc107, #fd7e14); }
.stat-card.bg-danger { background: linear-gradient(135deg, #dc3545, #e83e8c); }

.stat-icon { font-size: 2.5rem; opacity: 0.8; }
.stat-content h3 { font-size: 1.8rem; margin: 0; font-weight: 700; }
.stat-content p { margin: 0; opacity: 0.9; font-size: 0.9rem; }

/* Tables */
.table { margin: 0; }
.table th { background: #f8f9fa; font-weight: 600; border-bottom: 2px solid #dee2e6; }
.table td { vertical-align: middle; }

/* Page Header */
.page-header { margin-bottom: 25px; }
.page-header h2 { margin: 0 0 5px; font-size: 1.5rem; }
.page-header p { margin: 0; color: #6c757d; }

/* Page visibility */
.page { display: none; }
.page.active { display: block; }

/* Badges */
.badge-role-SUPER_ADMIN { background: #e83e8c; }
.badge-role-ADMIN { background: #dc3545; }
.badge-role-MODERATOR { background: #fd7e14; }
.badge-role-MEMBER { background: #28a745; }

/* List Items */
.list-group-item { border: none; border-bottom: 1px solid #eee; padding: 12px 20px; }
.list-group-item:last-child { border-bottom: none; }

/* User Item */
.user-item { display: flex; align-items: center; gap: 12px; }
.user-item .avatar { width: 40px; height: 40px; border-radius: 50%; background: #e9ecef; display: flex; align-items: center; justify-content: center; }
.user-item .info { flex: 1; }
.user-item .name { font-weight: 500; margin: 0; }
.user-item .email { font-size: 0.85rem; color: #6c757d; margin: 0; }

/* Post Item */
.post-item { padding: 15px; }
.post-item .author { font-weight: 500; }
.post-item .content { margin: 8px 0; color: #333; }
.post-item .meta { font-size: 0.85rem; color: #6c757d; display: flex; gap: 15px; }

/* Filters */
.filters { display: flex; gap: 15px; margin-bottom: 20px; flex-wrap: wrap; }
.filters .form-control, .filters .form-select { max-width: 200px; }

/* Actions */
.actions { display: flex; gap: 5px; }
.actions .btn { padding: 5px 10px; font-size: 0.85rem; }

/* Responsive */
@media (max-width: 991px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.active { transform: translateX(0); }
    .main-content { margin-left: 0; }
}

/* Loading */
.loading { display: flex; align-items: center; justify-content: center; padding: 40px; color: #6c757d; }
.spinner { width: 30px; height: 30px; border: 3px solid #f3f3f3; border-top: 3px solid var(--primary); border-radius: 50%; animation: spin 1s linear infinite; margin-right: 10px; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* Empty State */
.empty-state { text-align: center; padding: 40px; color: #6c757d; }
.empty-state i { font-size: 3rem; margin-bottom: 15px; opacity: 0.5; }

/* Image Preview */
.media-preview { max-width: 100px; max-height: 60px; object-fit: cover; border-radius: 8px; }
