/* System layout styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 1. Default / Navy Dark (Original) */
:root {
    --primary: #0f3b5e;
    --primary-light: #1e4976;
    --primary-dark: #0a2a42;
    --secondary: #e67e22;
    --secondary-light: #f39c12;
    --success: #27ae60;
    --danger: #e74c3c;
    --warning: #f1c40f;
    --info: #3498db;
    --purple: #8e44ad;

    --sidebar-width: 260px;
    --navbar-height: 72px;
    --bg-body: #f0f2f5;
    --bg-card: #ffffff;
    --text-primary: #1a1a2e;
    --text-secondary: #4a4a6a;
    --text-muted: #8a8aaa;

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.12);
    --radius: 10px;
    --radius-sm: 6px;

    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================================
   DARK MODE PREMIUM STYLES
   ============================================================ */
html[data-mode="dark"] {
    --bg-body: #090d16;
    --bg-card: #131927;
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
}

/* ------------------------------------------------------------
   THEME MODE 1: FULL LIGHT MODE (DEFAULT ERP: White Sidebar + Light Content)
   ------------------------------------------------------------ */
:root .sidebar,
html[data-mode="light"] .sidebar,
:root:not([data-mode="navy"]):not([data-mode="dark"]) .sidebar {
    background: #ffffff !important;
    border-right: 1px solid #e2e8f0 !important;
    color: #1e293b !important;
}

:root .sidebar .sidebar-brand,
html[data-mode="light"] .sidebar .sidebar-brand {
    border-bottom: 1px solid #e2e8f0 !important;
}

:root .sidebar .sidebar-brand .brand-text h1,
html[data-mode="light"] .sidebar .sidebar-brand .brand-text h1 {
    color: #0f3b5e !important;
}

:root .sidebar .sidebar-brand .brand-text span,
html[data-mode="light"] .sidebar .sidebar-brand .brand-text span {
    color: #64748b !important;
}

:root .sidebar-menu .menu-label,
html[data-mode="light"] .sidebar-menu .menu-label {
    color: #94a3b8 !important;
    opacity: 1 !important;
}

:root .sidebar-menu .menu-item,
html[data-mode="light"] .sidebar-menu .menu-item {
    color: #475569 !important;
}

:root .sidebar-menu .menu-item i,
html[data-mode="light"] .sidebar-menu .menu-item i {
    color: #64748b;
}

:root .sidebar-menu .menu-item:hover,
html[data-mode="light"] .sidebar-menu .menu-item:hover {
    background: #f1f5f9 !important;
    color: #0f3b5e !important;
}

:root .sidebar-menu .menu-item:hover i,
html[data-mode="light"] .sidebar-menu .menu-item:hover i {
    color: #0f3b5e !important;
}

:root .sidebar-menu .menu-item.active,
html[data-mode="light"] .sidebar-menu .menu-item.active {
    background: #0f3b5e !important;
    color: #ffffff !important;
    border-left: none !important;
}

:root .sidebar-menu .menu-item.active i,
html[data-mode="light"] .sidebar-menu .menu-item.active i {
    color: #ffffff !important;
}

:root .sidebar-footer,
html[data-mode="light"] .sidebar-footer {
    color: #94a3b8 !important;
    border-top-color: #e2e8f0 !important;
}

/* ------------------------------------------------------------
   THEME MODE 2: NAVY KLASIK (Dark Navy Sidebar + Dark Navy Navbar)
   ------------------------------------------------------------ */
html[data-mode="navy"] .sidebar {
    background: linear-gradient(180deg, #0a2a42 0%, #0f3b5e 100%) !important;
    border-right: none !important;
    color: #ffffff !important;
}

html[data-mode="navy"] .navbar {
    background: linear-gradient(90deg, #0a2a42 0%, #0f3b5e 100%) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: #ffffff !important;
}

html[data-mode="navy"] .navbar-left .page-title h2 {
    color: #ffffff !important;
}

html[data-mode="navy"] .navbar-left .hamburger {
    color: #ffffff !important;
}

html[data-mode="navy"] .navbar-right .search-box {
    background: rgba(255, 255, 255, 0.12) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

html[data-mode="navy"] .navbar-right .search-box input {
    background: transparent !important;
    color: #ffffff !important;
}

html[data-mode="navy"] .navbar-right .search-box input::placeholder,
html[data-mode="navy"] .navbar-right .search-box i {
    color: rgba(255, 255, 255, 0.7) !important;
}

html[data-mode="navy"] .navbar-right .nav-btn {
    background: rgba(255, 255, 255, 0.12) !important;
    color: #ffffff !important;
}

html[data-mode="navy"] .navbar-right .nav-btn:hover {
    background: rgba(255, 255, 255, 0.22) !important;
}

html[data-mode="navy"] .navbar-right .user-profile .user-info .name {
    color: #ffffff !important;
}

html[data-mode="navy"] .navbar-right .user-profile .user-info .role {
    color: rgba(255, 255, 255, 0.7) !important;
}

html[data-mode="navy"] .navbar-right .user-profile:hover {
    background: rgba(255, 255, 255, 0.12) !important;
}

html[data-mode="navy"] .sidebar .sidebar-brand {
    border-bottom: 1px solid rgba(255,255,255,0.08) !important;
}

html[data-mode="navy"] .sidebar .sidebar-brand .brand-text h1 {
    color: #ffffff !important;
}

html[data-mode="navy"] .sidebar .sidebar-brand .brand-text span {
    color: rgba(255,255,255,0.7) !important;
}

html[data-mode="navy"] .sidebar-menu .menu-label {
    color: rgba(255,255,255,0.4) !important;
}

html[data-mode="navy"] .sidebar-menu .menu-item {
    color: rgba(255,255,255,0.7) !important;
}

html[data-mode="navy"] .sidebar-menu .menu-item i {
    color: rgba(255,255,255,0.7);
}

html[data-mode="navy"] .sidebar-menu .menu-item:hover {
    background: rgba(255,255,255,0.08) !important;
    color: #ffffff !important;
}

html[data-mode="navy"] .sidebar-menu .menu-item:hover i {
    color: #ffffff !important;
}

html[data-mode="navy"] .sidebar-menu .menu-item.active {
    background: rgba(255,255,255,0.12) !important;
    color: #ffffff !important;
}

html[data-mode="navy"] .sidebar-menu .menu-item.active i {
    color: #ffffff !important;
}

/* ------------------------------------------------------------
   THEME MODE 3: FULL DARK MODE (Dark Charcoal Sidebar + Dark Content)
   ------------------------------------------------------------ */
html[data-mode="dark"] .sidebar {
    background: #131927 !important;
    border-right: 1px solid rgba(255, 255, 255, 0.08) !important;
}

html[data-mode="dark"] .navbar {
    background: #131927 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

html[data-mode="dark"] .sidebar .sidebar-brand {
    border-bottom-color: rgba(255, 255, 255, 0.08) !important;
}

html[data-mode="dark"] .sidebar .sidebar-brand .brand-text h1 {
    color: #ffffff !important;
}

html[data-mode="dark"] .sidebar .sidebar-brand .brand-text span {
    color: #94a3b8 !important;
}

html[data-mode="dark"] .sidebar-menu .menu-label {
    color: #64748b !important;
    opacity: 1 !important;
    font-weight: 700 !important;
}

html[data-mode="dark"] .sidebar-menu .menu-item {
    color: #cbd5e1 !important;
    font-weight: 500 !important;
}

html[data-mode="dark"] .sidebar-menu .menu-item i {
    color: #94a3b8 !important;
}

html[data-mode="dark"] .sidebar-menu .menu-item:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    color: #ffffff !important;
}

html[data-mode="dark"] .sidebar-menu .menu-item:hover i {
    color: #38bdf8 !important;
}

html[data-mode="dark"] .sidebar-menu .menu-item.active {
    background: rgba(255, 255, 255, 0.15) !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    border-left: 3px solid #38bdf8 !important;
}

html[data-mode="dark"] .sidebar-menu .menu-item.active i {
    color: #38bdf8 !important;
}

html[data-mode="dark"] .sidebar-footer {
    color: #94a3b8 !important;
    border-top-color: rgba(255, 255, 255, 0.08) !important;
}

html[data-mode="dark"] .form-control-custom,
html[data-mode="dark"] .select-trigger,
html[data-mode="dark"] .datepicker-trigger,
html[data-mode="dark"] .search-input-wrapper input {
    background: #1c2436 !important;
    color: #f8fafc !important;
    border-color: #2e3a52 !important;
}

html[data-mode="dark"] .select-dropdown,
html[data-mode="dark"] .datepicker-dropdown,
html[data-mode="dark"] .datepicker-popover {
    background: #1c2436 !important;
    border-color: #2e3a52 !important;
    color: #f8fafc !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5) !important;
}

html[data-mode="dark"] .option,
html[data-mode="dark"] .popover-item,
html[data-mode="dark"] .datepicker-day {
    color: #e2e8f0 !important;
}

html[data-mode="dark"] .option:hover,
html[data-mode="dark"] .popover-item:hover,
html[data-mode="dark"] .datepicker-day:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    color: #ffffff !important;
}

html[data-mode="dark"] .table-responsive table thead tr {
    background: #1c2436 !important;
    color: #94a3b8 !important;
    border-bottom-color: #2e3a52 !important;
}

html[data-mode="dark"] .table-responsive table tbody tr {
    background: #131927 !important;
    color: #e2e8f0 !important;
}

html[data-mode="dark"] .table-responsive table td {
    border-bottom-color: #1c2436 !important;
}

html[data-mode="dark"] .table-responsive table tbody tr:hover {
    background: #1c2436 !important;
}

html[data-mode="dark"] .po-filter-card,
html[data-mode="dark"] .stok-filter-card,
html[data-mode="dark"] .invoice-filter-card,
html[data-mode="dark"] .laporan-filter-card,
html[data-mode="dark"] .users-card,
html[data-mode="dark"] .po-card,
html[data-mode="dark"] .penerimaan-card,
html[data-mode="dark"] .penjualan-card,
html[data-mode="dark"] .invoice-card,
html[data-mode="dark"] .stok-card,
html[data-mode="dark"] .settings-card,
html[data-mode="dark"] .profile-card {
    background: #131927 !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}

html[data-mode="dark"] .settings-tabs {
    background: #1c2436 !important;
    border-bottom-color: #2e3a52 !important;
}

html[data-mode="dark"] .settings-tab-btn.active {
    background: #131927 !important;
    color: #ffffff !important;
    border-color: #2e3a52 !important;
}

html[data-mode="dark"] .theme-card-option {
    background: #1c2436 !important;
    border-color: #2e3a52 !important;
}

html[data-mode="dark"] .theme-title {
    color: #f1f5f9 !important;
}

/* Comprehensive Dark Mode Overrides Across All Modules */
html[data-mode="dark"] .navbar-right .search-box input {
    background: #1c2436 !important;
    color: #f8fafc !important;
    border-color: #2e3a52 !important;
}

html[data-mode="dark"] .navbar-right .nav-btn,
html[data-mode="dark"] .hamburger {
    background: #1c2436 !important;
    color: #cbd5e1 !important;
}

html[data-mode="dark"] .stat-card,
html[data-mode="dark"] .brief-card,
html[data-mode="dark"] .chart-card,
html[data-mode="dark"] .card,
html[data-mode="dark"] .opname-card,
html[data-mode="dark"] .harga-card,
html[data-mode="dark"] .komisi-card,
html[data-mode="dark"] .laporan-card,
html[data-mode="dark"] .users-table-card,
html[data-mode="dark"] .po-table-card,
html[data-mode="dark"] .stok-table-card,
html[data-mode="dark"] .penjualan-table-card,
html[data-mode="dark"] .invoice-table-card {
    background: #131927 !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}

html[data-mode="dark"] .report-summary-box {
    background: #1c2436 !important;
    border: 1px solid #2e3a52 !important;
    color: #cbd5e1 !important;
}

html[data-mode="dark"] .report-summary-box strong {
    color: #f8fafc !important;
}

html[data-mode="dark"] .dropzone-container {
    background: #1c2436 !important;
    border-color: #334155 !important;
}

html[data-mode="dark"] .upload-item-card {
    background: #1e293b !important;
    border-color: #334155 !important;
    color: #f8fafc !important;
}

html[data-mode="dark"] .modal-content {
    background: #131927 !important;
    border-color: #2e3a52 !important;
    color: #f8fafc !important;
}

html[data-mode="dark"] .datepicker-btn-month,
html[data-mode="dark"] .datepicker-btn-year,
html[data-mode="dark"] .datepicker-nav-btn,
html[data-mode="dark"] .popover-item {
    background: #1c2436 !important;
    border-color: #2e3a52 !important;
    color: #e2e8f0 !important;
}

html[data-mode="dark"] .card-header,
html[data-mode="dark"] .card-header-clean {
    border-bottom-color: rgba(255, 255, 255, 0.08) !important;
}

html[data-mode="dark"] label,
html[data-mode="dark"] .form-group label,
html[data-mode="dark"] .card-header h3,
html[data-mode="dark"] .card-header-clean h3,
html[data-mode="dark"] .user-name,
html[data-mode="dark"] h1,
html[data-mode="dark"] h2,
html[data-mode="dark"] h3,
html[data-mode="dark"] h4 {
    color: #f8fafc !important;
}

html[data-mode="dark"] .form-help,
html[data-mode="dark"] .text-muted,
html[data-mode="dark"] .dashboard-header p,
html[data-mode="dark"] .users-header p,
html[data-mode="dark"] .po-header p,
html[data-mode="dark"] .penerimaan-header p,
html[data-mode="dark"] .stok-header p,
html[data-mode="dark"] .penjualan-header p,
html[data-mode="dark"] .invoice-header p,
html[data-mode="dark"] .komisi-header p,
html[data-mode="dark"] .laporan-header p,
html[data-mode="dark"] .settings-header p,
html[data-mode="dark"] .profile-header p {
    color: #94a3b8 !important;
}

/* Inputs inside tables (Stok Opname, Harga Jual 4 Level, etc.) */
html[data-mode="dark"] table input,
html[data-mode="dark"] .stok-input,
html[data-mode="dark"] .harga-input,
html[data-mode="dark"] .form-control,
html[data-mode="dark"] .form-control-custom {
    background: #1c2436 !important;
    color: #f8fafc !important;
    border-color: #334155 !important;
}

/* Info Box & Banners in Dark Mode (Harga Jual Petunjuk) */
html[data-mode="dark"] div[style*="background:#eff6ff"],
html[data-mode="dark"] div[style*="background: #eff6ff"],
html[data-mode="dark"] div[style*="background:#f8fafc"],
html[data-mode="dark"] div[style*="background: #f8fafc"] {
    background: #1c2436 !important;
    border-color: #334155 !important;
    color: #cbd5e1 !important;
}

html[data-mode="dark"] div[style*="color:#1e40af"],
html[data-mode="dark"] div[style*="color: #1e40af"] {
    color: #93c5fd !important;
}

/* Summary Mini White Cards (Laporan & Rekonsiliasi) */
html[data-mode="dark"] div[style*="background:#ffffff"],
html[data-mode="dark"] div[style*="background: #ffffff"],
html[data-mode="dark"] .logo-preview-box {
    background: #1c2436 !important;
    color: #f8fafc !important;
    border-color: #334155 !important;
}

/* Table Cell Text Color Readability */
html[data-mode="dark"] table td,
html[data-mode="dark"] .table-responsive td {
    color: #cbd5e1 !important;
}

html[data-mode="dark"] table td strong,
html[data-mode="dark"] table td b,
html[data-mode="dark"] td[style*="color:#1e293b"],
html[data-mode="dark"] td[style*="color: #1e293b"],
html[data-mode="dark"] span[style*="color:#1e293b"],
html[data-mode="dark"] span[style*="color: #1e293b"],
html[data-mode="dark"] h2[style*="color:#1e293b"],
html[data-mode="dark"] h2[style*="color: #1e293b"],
html[data-mode="dark"] h3[style*="color:#1e293b"],
html[data-mode="dark"] h3[style*="color: #1e293b"],
html[data-mode="dark"] p[style*="color:#1e293b"],
html[data-mode="dark"] p[style*="color: #1e293b"] {
    color: #f8fafc !important;
}

/* Settings Mode Card Options in Dark Mode */
html[data-mode="dark"] .mode-card-option {
    background: #1c2436 !important;
    border-color: #334155 !important;
}

html[data-mode="dark"] .mode-card-option.active {
    background: #1e293b !important;
    border-color: var(--primary, #0f3b5e) !important;
    box-shadow: 0 0 0 3px rgba(15, 59, 94, 0.3) !important;
}

html[data-mode="dark"] .mode-card-option .theme-title {
    color: #f8fafc !important;
}

html[data-mode="dark"] .navbar-right .search-box {
    background: #1c2436 !important;
    border-color: #2e3a52 !important;
}

html[data-mode="dark"] .navbar-right .search-box input {
    background: transparent !important;
    color: #f8fafc !important;
}

html[data-mode="dark"] .navbar-right .search-box input::placeholder,
html[data-mode="dark"] .navbar-right .search-box i {
    color: #94a3b8 !important;
}

html[data-mode="dark"] .navbar-right .user-profile .user-info .name {
    color: #f8fafc !important;
}

html[data-mode="dark"] .navbar-right .user-profile .user-info .role {
    color: #94a3b8 !important;
}

html[data-mode="dark"] .navbar-right .user-profile:hover {
    background: rgba(255, 255, 255, 0.08) !important;
}

html[data-mode="dark"] .profile-dropdown-menu,
html[data-mode="dark"] .nav-dropdown-menu {
    background: #1c2436 !important;
    border-color: #2e3a52 !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5) !important;
}

html[data-mode="dark"] .profile-dropdown-menu a,
html[data-mode="dark"] .nav-dropdown-menu a {
    color: #cbd5e1 !important;
}

html[data-mode="dark"] .nav-dropdown-menu div[style*="background: var(--bg-subtle"],
html[data-mode="dark"] .nav-dropdown-menu div[style*="background:#f8fafc"] {
    background: #131927 !important;
    border-color: #2e3a52 !important;
}

/* Custom Sleek Scrollbars Across Entire System (Body, Sidebar, Tables, Select Dropdowns) */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.35);
    border-radius: 999px;
    transition: background 0.2s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(148, 163, 184, 0.6);
}

/* Sidebar Specific Scrollbar */
.sidebar::-webkit-scrollbar {
    width: 5px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 999px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.4);
}

/* Dark Mode & Navy Mode Scrollbars */
html[data-mode="dark"] ::-webkit-scrollbar-thumb,
html[data-mode="navy"] ::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.16) !important;
}

html[data-mode="dark"] ::-webkit-scrollbar-thumb:hover,
html[data-mode="navy"] ::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.35) !important;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-body);
    color: var(--text-primary);
    display: flex;
    min-height: 100vh;
    overflow-x: hidden;
}

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    max-height: 100vh;
    background: linear-gradient(180deg, var(--primary-dark) 0%, var(--primary) 100%);
    color: #fff;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    overflow-y: auto !important;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}

.sidebar-brand {
    padding: 20px 24px;
    display: flex;
    align-items: center;
    gap: 14px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    min-height: var(--navbar-height);
}

.sidebar-brand .brand-icon {
    width: 44px;
    height: 44px;
    background: transparent;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 800;
    color: #fff;
    flex-shrink: 0;
}

.sidebar-brand .brand-text {
    display: flex;
    flex-direction: column;
}

.sidebar-brand .brand-text h1 {
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.sidebar-brand .brand-text span {
    font-size: 10px;
    opacity: 0.7;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 600;
}

.sidebar-menu {
    padding: 20px 16px;
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.sidebar-menu .menu-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    opacity: 0.4;
    padding: 12px 12px 8px;
    font-weight: 700;
}

.sidebar-menu .menu-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    border-radius: 6px;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 2px;
    position: relative;
}

.sidebar-menu .menu-item:hover {
    background: rgba(255,255,255,0.08);
    color: #fff;
}

.sidebar-menu .menu-item.active {
    background: rgba(255,255,255,0.12);
    color: #fff;
}



.sidebar-menu .menu-item i {
    width: 20px;
    font-size: 16px;
    text-align: center;
    flex-shrink: 0;
}

.sidebar-menu .menu-item .badge {
    margin-left: auto;
    background: var(--danger);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 20px;
    min-width: 20px;
    text-align: center;
}

.sidebar-menu .menu-item .badge.warning {
    background: var(--warning);
    color: #1a1a2e;
}

.sidebar-menu .menu-item .badge.success {
    background: var(--success);
}

.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid rgba(255,255,255,0.08);
    font-size: 12px;
    opacity: 0.5;
    text-align: center;
}

.main-wrapper {
    margin-left: var(--sidebar-width);
    flex: 1;
    min-width: 0;
    max-width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--navbar-height);
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(0,0,0,0.04);
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.navbar-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.navbar-left .hamburger {
    display: none;
    background: none;
    border: none;
    font-size: 22px;
    color: var(--text-primary);
    cursor: pointer;
    padding: 4px;
}

.navbar-left .page-title h2 {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.navbar-left .page-title p {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 400;
    margin-top: -2px;
}

.navbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.navbar-right .search-box {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f5f7fb;
    border: 1px solid rgba(0,0,0,0.04);
    border-radius: 10px;
    padding: 8px 14px;
    min-width: 260px;
}

.navbar-right .search-box i {
    color: var(--text-muted);
}

.navbar-right .search-box input {
    border: none;
    outline: none;
    background: transparent;
    width: 100%;
    font-family: inherit;
    font-size: 13px;
    color: var(--text-primary);
}

.navbar-right .nav-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: none;
    background: #f5f7fb;
    color: var(--text-secondary);
    cursor: pointer;
    position: relative;
    transition: var(--transition);
}

.navbar-right .nav-btn:hover {
    background: #eef2f7;
    color: var(--primary);
}

.navbar-right .nav-btn .dot {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--danger);
}

.navbar-right .nav-btn .dot.warning-dot {
    background: var(--warning);
}

.navbar-right .user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 999px;
    cursor: pointer;
    transition: var(--transition);
}

.navbar-right .user-profile:hover {
    background: #f5f7fb;
}

.navbar-right .user-profile .avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.navbar-right .user-profile .avatar.avatar-admin { background: linear-gradient(135deg, #0f3b5e, #1a5276); }
.navbar-right .user-profile .avatar.avatar-operator { background: linear-gradient(135deg, #059669, #10b981); }
.navbar-right .user-profile .avatar.avatar-keuangan { background: linear-gradient(135deg, #0284c7, #38bdf8); }
.navbar-right .user-profile .avatar.avatar-sales { background: linear-gradient(135deg, #ea580c, #f97316); }
.navbar-right .user-profile .avatar.avatar-gudang { background: linear-gradient(135deg, #4f46e5, #6366f1); }

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

.navbar-right .user-profile .user-info .name {
    font-size: 13px;
    font-weight: 700;
}

.navbar-right .user-profile .user-info .role {
    font-size: 11px;
    color: var(--text-muted);
}

.dashboard-content {
    padding: 28px 32px 32px;
    flex: 1;
    min-width: 0;
    width: 100%;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

@media (max-width: 1024px) {
    :root {
        --sidebar-width: 0px;
        --navbar-height: 64px;
    }

    .sidebar {
        transform: translateX(-100%);
        width: 280px;
        box-shadow: none;
    }

    .sidebar.open {
        transform: translateX(0);
        box-shadow: var(--shadow-lg);
    }

    .main-wrapper {
        margin-left: 0;
    }

    .navbar-left .hamburger {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .navbar {
        padding: 0 20px;
    }

    .navbar-right .search-box {
        display: none !important;
    }

    .dashboard-content {
        padding: 20px;
    }
}

@media (max-width: 768px) {
    .navbar-left .page-title {
        display: none;
    }

    .navbar-right .search-box {
        display: none !important;
    }

    .navbar-right .user-profile .user-info {
        display: none;
    }
}

@media (max-width: 480px) {
    .navbar {
        padding: 0 14px;
    }

    .navbar-right .nav-btn {
        width: 36px;
        height: 36px;
    }
}

/* ============================================================
   DASHBOARD GRID & LAYOUT UTILITIES
   ============================================================ */

.greeting {
    margin-bottom: 24px;
}
.greeting h1 {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}
.greeting h1 span {
    color: #2563eb;
}
.greeting p {
    font-size: 14px;
    color: var(--text-muted);
    margin-top: 4px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.hot-issue-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-radius: var(--radius);
    margin-bottom: 24px;
    gap: 16px;
    flex-wrap: wrap;
}
.hot-issue-banner .issue-left {
    display: flex;
    align-items: center;
    gap: 16px;
}
.hot-issue-banner .issue-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}
.hot-issue-banner .issue-meta {
    display: flex;
    gap: 16px;
    font-size: 12.5px;
    margin-top: 6px;
}

.chart-section {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}
@media (max-width: 992px) {
    .chart-section {
        grid-template-columns: 1fr;
    }
}
.chart-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 24px;
    border: 1px solid rgba(0,0,0,0.04);
    box-shadow: var(--shadow-sm);
}
.chart-card .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}
.chart-card .card-header h3 {
    font-size: 16px;
    font-weight: 700;
}
.chart-card .card-action {
    font-size: 13px;
    color: #2563eb;
    text-decoration: none;
    font-weight: 600;
}
.chart-wrapper {
    position: relative;
    height: 280px;
    width: 100%;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}
@media (max-width: 992px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

.task-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-bottom: 1px solid #f1f5f9;
}
.task-item:last-child {
    border-bottom: none;
}
.task-status {
    width: 8px;
    height: 36px;
    border-radius: 4px;
    flex-shrink: 0;
}
.task-status.blue { background: #2563eb; }
.task-status.orange { background: #f59e0b; }
.task-status.green { background: #10b981; }
.task-status.red { background: #ef4444; }

.task-info {
    flex: 1;
}
.task-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}
.task-meta {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: var(--text-muted);
}

/* ============================================================
   GLOBAL BADGE & BUTTON HELPERS
   ============================================================ */

.btn-sm {
    padding: 6px 14px !important;
    font-size: 12px !important;
    border-radius: 6px !important;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
}

.badge.success {
    background: #dcfce7 !important;
    color: #15803d !important;
}

.badge.warning {
    background: #fef3c7 !important;
    color: #b45309 !important;
}

.badge.danger {
    background: #fee2e2 !important;
    color: #b91c1c !important;
}

.badge.info {
    background: #dbeafe !important;
    color: #1d4ed8 !important;
}

.badge.primary {
    background: #f3e8ff !important;
    color: #6b21a8 !important;
}


