/* ==========================================================
   ADMIN DATABASE DESIGN SYSTEM
   Versi: EMIS Solid Minimalis (Clean & White)
========================================================== */

:root {
    --primary: #059669; /* Kemenag Green - Minimalist use */
    --primary-light: #ecfdf5;
    --text-main: #1f2937;
    --text-muted: #6b7280;
    --bg-app: #f9fafb; /* Sangat bersih */
    --surface: #ffffff;
    --border-color: #e5e7eb;
    --sidebar-width: 250px;
    --card-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

body.db-body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-app);
    color: var(--text-main);
    margin: 0;
    padding: 0;
    display: flex;
    min-height: 100vh;
    overflow-x: hidden;
}

/* UTILITIES */
.cursor-pointer { cursor: pointer; }

/* SIDEBAR - CLEAN WHITE */
.db-sidebar {
    width: var(--sidebar-width);
    background: var(--surface);
    border-right: 1px solid var(--border-color);
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 1040;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
}

.db-brand {
    padding: 20px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
}

.db-brand img {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.db-nav {
    display: flex;
    flex-direction: column;
    padding: 15px 12px;
    gap: 4px;
    overflow-y: auto;
}

.db-nav::-webkit-scrollbar { width: 4px; }
.db-nav::-webkit-scrollbar-thumb { background: #e5e7eb; border-radius: 4px; }

.db-nav-item {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    border-radius: 6px;
    transition: all 0.2s;
}

.db-nav-item i {
    width: 24px;
    font-size: 1rem;
    margin-right: 10px;
    text-align: center;
    color: #9ca3af;
    transition: color 0.2s;
}

.db-nav-item:hover {
    background: #f3f4f6;
    color: var(--text-main);
}

.db-nav-item:hover i {
    color: var(--text-muted);
}

.db-nav-item.active {
    color: var(--primary);
    background: var(--primary-light);
    font-weight: 600;
}

.db-nav-item.active i {
    color: var(--primary);
}

.db-nav-item.text-danger:hover {
    color: #dc2626 !important;
    background: #fef2f2;
}
.db-nav-item.text-danger:hover i {
    color: #dc2626 !important;
}

/* MAIN CONTENT */
.db-main-content {
    flex-grow: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* TOPBAR - DINAMIS (TRANSPARENT TO SOLID) */
.db-topbar {
    min-height: 75px;
    padding: 16px 24px;
    background: transparent;
    position: sticky;
    top: 0;
    z-index: 1030;
    transition: background-color 0.3s ease, border-bottom 0.3s ease, box-shadow 0.3s ease;
    border-bottom: 1px solid transparent;
}

.db-topbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

/* CONTENT AREA */
.db-content-area {
    padding: 24px;
    flex-grow: 1;
}

/* CARDS - MINIMALIST */
.db-card {
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: var(--card-shadow);
    padding: 20px;
}

.db-card-header {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 12px;
    margin-bottom: 16px;
    font-weight: 600;
    color: var(--text-main);
}

/* RESPONSIVE OVERLAY */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(17, 24, 39, 0.4);
    z-index: 1035;
}

.sidebar-overlay.show {
    display: block;
}

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