/* =========================================================================
   DASHBOARD STYLES (Admin & User)
   ========================================================================= */

:root {
    --primary-gradient: #000000;
    --secondary-gradient: #333333;
    --accent-gradient: #111111;
    
    --primary-color: #000000;
    --text-main: #111111;
    --text-muted: #666666;
    --bg-main: #ffffff;
    --bg-light: #f9f9f9;
    --border-color: #e0e0e0;
    --border-radius: 4px;
    --transition: all 0.2s ease-in-out;
}

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

body {
    font-family: 'Poppins', sans-serif;
    color: var(--text-main);
    background-color: var(--bg-main);
    line-height: 1.6;
    overflow-x: hidden;
}

.dashboard-body {
    background-color: #f4f6f8;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

.dashboard-wrapper {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background-color: rgba(255, 255, 255, 0.85); /* Transparan/Glassmorphism */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-right: 1px solid rgba(0, 0, 0, 0.05);
    color: #111111;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 1050;
    transition: transform 0.3s ease;
}

.sidebar-header {
    padding: 20px 25px;
    font-size: 1.5rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.sidebar-header i.bi-gem {
    color: #111111;
    margin-right: 10px;
}

.close-sidebar {
    background: none;
    border: none;
    color: #111111;
    font-size: 1.2rem;
    cursor: pointer;
    display: none;
}

.sidebar-menu {
    padding: 20px 0;
    flex-grow: 1;
    overflow-y: auto;
}

.sidebar-menu .menu-label {
    padding: 10px 25px;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: #888888;
    font-weight: 700;
    letter-spacing: 1px;
    margin-top: 10px;
}

.sidebar-menu li a {
    display: flex;
    align-items: center;
    padding: 12px 25px;
    color: #555555;
    font-weight: 500;
    transition: all 0.2s;
    font-size: 0.95rem;
}

.sidebar-menu li a i {
    margin-right: 12px;
    font-size: 1.1rem;
}

.sidebar-menu li a:hover, .sidebar-menu li a.active {
    background-color: rgba(0, 0, 0, 0.04);
    color: #111111;
    border-left: 4px solid #111111;
}

.text-danger {
    color: #d32f2f !important;
}

/* Dashboard Enhancements */
.welcome-banner {
    background: linear-gradient(135deg, #111111 0%, #333333 100%);
    border-radius: 16px;
    padding: 30px;
    color: #ffffff;
    margin-bottom: 25px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}
.welcome-banner::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -5%;
    width: 300px;
    height: 300px;
    background: rgba(255,255,255,0.03);
    border-radius: 50%;
}
.welcome-banner h2 {
    font-size: 1.8rem;
    margin-bottom: 5px;
    font-weight: 700;
}
.welcome-banner p {
    color: #cccccc;
    margin-bottom: 0;
    font-size: 0.95rem;
}
.stat-card.dark {
    background: linear-gradient(135deg, #1a1a1a 0%, #000000 100%);
    color: #ffffff;
    border: none;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}
.stat-card.dark .stat-icon {
    background: rgba(255,255,255,0.1);
    color: #ffffff;
}
.stat-card.dark h3 {
    color: #aaaaaa;
}
.stat-card.dark p {
    color: #ffffff;
}
.quick-action-btn {
    display: flex;
    align-items: center;
    padding: 15px;
    background: #ffffff;
    border: 1px solid #eeeeee;
    border-radius: 12px;
    color: #111111;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
    margin-bottom: 12px;
}
.quick-action-btn i {
    font-size: 1.2rem;
    margin-right: 15px;
    background: #f8f9fa;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: #111111;
}
.quick-action-btn:hover {
    border-color: #111111;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

/* Main Content */
.main-content {
    flex-grow: 1;
    margin-left: 260px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: margin-left 0.3s ease;
}

/* Header */
.dashboard-header {
    background-color: #ffffff;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-left {
    display: flex;
    align-items: center;
}

.menu-toggle {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-main);
    display: none;
    margin-right: 15px;
}

.page-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0;
}

.header-right {
    display: flex;
    align-items: center;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    background-color: #eeeeee;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #555555;
}

.user-info {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.2;
}

.user-role {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Content Area */
.content-area {
    padding: 30px;
    flex-grow: 1;
}

.welcome-card {
    background: linear-gradient(135deg, #111111 0%, #333333 100%);
    color: #ffffff;
    padding: 30px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.welcome-card h2 {
    margin-bottom: 10px;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.stat-card {
    background-color: #ffffff;
    padding: 25px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.2s;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.03);
}

.stat-icon {
    width: 60px;
    height: 60px;
    background-color: #f4f6f8;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: #111111;
}

.stat-details h3 {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 5px;
    font-weight: 600;
}

.stat-details p {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-main);
    margin: 0;
}

/* Content Cards & Tables */
.content-card {
    background-color: #ffffff;
    padding: 25px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

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

.table-responsive {
    overflow-x: auto;
}

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

.data-table th, .data-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.95rem;
}

.data-table th {
    font-weight: 600;
    color: var(--text-muted);
    background-color: #fbfbfb;
}

.badge {
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
}
.badge-success {
    background-color: #e8f5e9;
    color: #2e7d32;
}

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

/* Progress Bar */
.progress-container {
    width: 100%;
}
.progress-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 8px;
}
.progress-bar {
    width: 100%;
    height: 10px;
    background-color: #eeeeee;
    border-radius: 5px;
    overflow: hidden;
}
.progress-fill {
    height: 100%;
    background-color: #111111;
    border-radius: 5px;
}

/* Mobile Sidebar Overlay */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0,0,0,0.5);
    z-index: 1040;
    display: none;
}
.sidebar-overlay.show {
    display: block;
}

/* Responsive Media Queries */
@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.show {
        transform: translateX(0);
    }
    .main-content {
        margin-left: 0;
    }
    .menu-toggle {
        display: block;
    }
    .close-sidebar.d-md-none {
        display: block;
    }
}

@media (max-width: 576px) {
    .content-area {
        padding: 20px 15px;
    }
    .dashboard-header {
        padding: 0 15px;
    }
    .user-info {
        display: none;
    }
    .dashboard-buttons {
        flex-direction: column;
    }
    .dashboard-buttons .btn {
        width: 100%;
        text-align: center;
    }
}
