/* ============================================
   IMPORT FONT
   ============================================ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

/* ============================================
   ROOT VARIABLES
   ============================================ */
:root {
    --primary: #4158D0;
    --primary-light: #6c7ee0;
    --primary-dark: #2a3aa0;
    --secondary: #C850C0;
    --tertiary: #FFCC70;
    --success: #2ecc71;
    --warning: #f1c40f;
    --danger: #e74c3c;
    --info: #3498db;

    --gradient-1: linear-gradient(43deg, #4158D0 0%, #C850C0 46%, #FFCC70 100%);
    --gradient-2: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-3: linear-gradient(225deg, #FF3CAC 0%, #784BA0 50%, #2B86C5 100%);
    --gradient-4: linear-gradient(to right, #ffecd2 0%, #fcb69f 100%);

    --bg-dark: #0a0f1e;
    --bg-darker: #050814;
    --bg-card: rgba(255, 255, 255, 0.05);
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.05);

    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.5);

    --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1);
    --shadow-2xl: 0 25px 50px -12px rgba(0,0,0,0.25);
    --shadow-colored: 0 10px 40px rgba(65, 88, 208, 0.3);

    --border-radius-sm: 8px;
    --border-radius-md: 12px;
    --border-radius-lg: 16px;
    --border-radius-xl: 24px;
    --border-radius-2xl: 32px;
}

/* ============================================
   GLOBAL RESET & BASE
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    line-height: 1.6;
    background: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

input::placeholder {
    color: rgba(255, 255, 255, 0.6) !important;
}

/* ============================================
   ANIMATED BACKGROUND
   ============================================ */
.animated-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.gradient-circle {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
    animation: float 20s infinite;
}

.circle-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, #4158D0, #C850C0);
    top: -250px;
    left: -250px;
    animation-delay: 0s;
}

.circle-2 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, #FFCC70, #FF3CAC);
    bottom: -300px;
    right: -300px;
    animation-delay: -5s;
}

.circle-3 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, #2B86C5, #784BA0);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -10s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25%       { transform: translate(5%, 5%) scale(1.1); }
    50%       { transform: translate(-5%, 10%) scale(0.9); }
    75%       { transform: translate(10%, -5%) scale(1.05); }
}

/* ============================================
   LAYOUT - WRAPPER & SIDEBAR SYSTEM
   ============================================ */
#wrapper {
    display: flex !important;
    width: 100%;
    min-height: 100vh;
    align-items: stretch;
    transition: all 0.3s ease;
}

/* SIDEBAR - Desktop (sticky) */
#sidebar-wrapper {
    width: 280px;
    min-width: 280px;
    height: 100vh;
    position: sticky;
    top: 0;
    z-index: 1050;
    transition: transform 0.3s ease, margin 0.3s ease;
    display: flex;
    flex-direction: column;
}

/* MAIN CONTENT */
#page-content-wrapper {
    flex: 1 !important;
    min-width: 0 !important;
    width: 100%;
    max-width: 1600px;
    margin-left: auto;
    margin-right: auto;
    transition: all 0.3s ease !important;
}

/* Desktop toggle - geser sidebar ke kiri, content melebar */
#wrapper.toggled #sidebar-wrapper {
    margin-left: -280px;
}

/* ============================================
   MOBILE SIDEBAR
   ============================================ */
@media (max-width: 768px) {
    #sidebar-wrapper {
        position: fixed !important;
        left: 0 !important;
        top: 0 !important;
        height: 100vh !important;
        width: 280px !important;
        transform: translateX(-280px) !important;
        margin-left: 0 !important;
        z-index: 9999 !important;
        transition: transform 0.3s ease !important;
        overflow-y: auto !important;
        background: linear-gradient(180deg, #0d0d1a 0%, #0a0f1e 100%) !important;
    }

    #wrapper.toggled #sidebar-wrapper {
        transform: translateX(0px) !important;
    }

    /* Overlay */
    #wrapper.toggled::after {
        content: '' !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        background: rgba(0, 0, 0, 0.55) !important;
        z-index: 9998 !important;
    }

    #page-content-wrapper {
        width: 100% !important;
        margin-left: 0 !important;
        position: relative !important;
        z-index: 1 !important;
    }
}

/* ============================================
   SIDEBAR CONTENT
   ============================================ */
.sidebar-header {
    padding: 24px;
    border-bottom: 1px solid var(--glass-border);
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    font-size: 32px;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: pulse 2s infinite;
}

.logo-text {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.text-gradient {
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-left: 4px;
}

.user-info {
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--glass-border);
}

.avatar-container {
    width: 48px;
    height: 48px;
    background: var(--gradient-1);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.avatar-icon {
    font-size: 28px;
    color: white;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.2));
}

.avatar-container::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(to bottom right, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0) 50%);
    transform: rotate(45deg);
    animation: shine 3s infinite;
}

.user-details { flex: 1; }

.user-name {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.user-role {
    font-size: 12px;
    color: var(--text-muted);
    background: rgba(255,255,255,0.05);
    padding: 4px 8px;
    border-radius: 20px;
}

.sidebar-menu {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
}

.menu-section { margin-bottom: 24px; }

.menu-section-title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 12px;
    padding-left: 12px;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--border-radius-md);
    transition: all 0.3s ease;
    position: relative;
    margin-bottom: 4px;
}

.menu-item i {
    font-size: 18px;
    width: 24px;
}

.menu-item span {
    flex: 1;
    font-size: 13px;
    font-weight: 500;
}

.menu-item:hover {
    background: rgba(255,255,255,0.1);
    color: var(--text-primary);
    transform: translateX(4px);
}

.menu-item.active {
    background: var(--gradient-1);
    color: white;
    box-shadow: var(--shadow-colored);
}

.menu-badge {
    background: var(--danger);
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 12px;
}

.menu-dot {
    width: 6px;
    height: 6px;
    background: var(--success);
    border-radius: 50%;
    animation: blink 2s infinite;
}

.sidebar-footer {
    padding: 24px;
    border-top: 1px solid var(--glass-border);
}

.logout-btn {
    width: 100%;
    padding: 12px;
    background: rgba(231, 76, 60, 0.1);
    border: 1px solid rgba(231, 76, 60, 0.2);
    border-radius: var(--border-radius-md);
    color: var(--danger);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 16px;
}

.logout-btn:hover {
    background: var(--danger);
    color: white;
    transform: translateY(-2px);
}

.system-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 11px;
    color: var(--text-muted);
}

.separator { color: var(--text-muted); }

/* ============================================
   TOP NAVIGATION
   ============================================ */
.top-navbar {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 24px;
}

.menu-toggle {
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 24px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--border-radius-md);
    transition: all 0.3s ease;
}

.menu-toggle:hover { background: rgba(255,255,255,0.1); }

.page-title h2 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 4px;
}

.breadcrumb {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.date-container {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(255,255,255,0.05);
    border-radius: 30px;
    font-size: 13px;
    color: var(--text-secondary);
}

.date-container i { color: var(--primary); }

.search-container {
    position: relative;
    width: 300px;
}

.search-container i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 14px;
}

.search-input {
    width: 100%;
    padding: 10px 16px 10px 40px;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--glass-border);
    border-radius: 30px;
    color: var(--text-primary);
    font-size: 14px;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    background: rgba(255,255,255,0.1);
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(65, 88, 208, 0.2);
}

.search-shortcut {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 12px;
    background: rgba(255,255,255,0.1);
    padding: 4px 8px;
    border-radius: 6px;
}

.notification-icon {
    font-size: 22px;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.notification-icon:hover {
    color: var(--primary);
    transform: rotate(10deg);
}

.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--danger);
    color: white;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 12px;
    min-width: 18px;
    text-align: center;
    animation: pulse 2s infinite;
}

.notification-container {
    position: relative;
    cursor: pointer;
}

/* ============================================
   DASHBOARD CONTAINER
   ============================================ */
.dashboard-container {
    max-width: 1400px;
    margin: auto;
}

@media (min-width: 1600px) {
    .dashboard-container { max-width: 1600px; }
}

/* ============================================
   STAT CARDS
   ============================================ */
.stat-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-xl);
    padding: 20px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
    overflow: hidden;
    transition: all 0.25s ease;
    cursor: pointer;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--gradient-1);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-colored);
}

.stat-card:hover::before { transform: scaleX(1); }

.stat-card-primary::before  { background: linear-gradient(90deg, var(--primary), var(--secondary)); }
.stat-card-success::before  { background: linear-gradient(90deg, var(--success), #27ae60); }
.stat-card-warning::before  { background: linear-gradient(90deg, var(--warning), #f39c12); }
.stat-card-danger::before   { background: linear-gradient(90deg, var(--danger), #c0392b); }

.stat-icon {
    width: 56px;
    height: 56px;
    background: var(--gradient-1);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    box-shadow: var(--shadow-colored);
    flex-shrink: 0;
}

.stat-details { flex: 1; line-height: 1.3; }

.stat-label {
    font-size: 12px;
    color: var(--text-muted);
    display: block;
    margin-bottom: 4px;
    opacity: 0.7;
}

.stat-value {
    font-size: 22px;
    font-weight: 600;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.3px;
}

.stat-trend {
    font-size: 11px;
    padding: 4px 8px;
    border-radius: 20px;
    background: rgba(255,255,255,0.05);
}

.stat-trend.positive { color: var(--success); }
.stat-trend.negative { color: var(--danger); }
.stat-trend.warning  { color: var(--warning); }

/* ============================================
   CHART CARDS
   ============================================ */
.chart-card {
    background: var(--glass-bg);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-xl);
    padding: 24px 28px;
    transition: all 0.25s ease;
}

.chart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
}

.chart-title {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.chart-title h5, .chart-title-main {
    font-size: 14px !important;
    font-weight: 600;
    display: inline-block;
    margin-right: 20px;
    margin-bottom: 2px;
}

.chart-subtitle {
    font-size: 11px !important;
    color: rgba(255,255,255,0.6);
    opacity: 0.8;
    margin-top: 4px;
    display: block;
}

.chart-body {
    flex: 1;
    min-height: 0;
    padding-bottom: 10px;
    display: flex;
}

.chart-body canvas {
    width: 100% !important;
    height: 100% !important;
}

canvas { image-rendering: auto; }

.chart-actions { display: flex; gap: 8px; }

.btn-chart {
    padding: 6px 12px;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    color: var(--text-secondary);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-chart:hover,
.btn-chart.active {
    background: var(--gradient-1);
    color: white;
    border-color: transparent;
}

/* ============================================
   PRESET BUTTONS (DATE FILTER)
   ============================================ */
.preset-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    margin-right: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 13px;
}

.preset-btn:hover,
.preset-btn.active {
    background: var(--gradient-1);
    border-color: transparent;
}

.preset-small {
    font-size: 13px;
    padding: 6px 14px;
}

/* ============================================
   TABLE CARDS
   ============================================ */
.table-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-xl);
    padding: 24px;
}

.table-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.table-title h5 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.table-badge {
    font-size: 11px;
    color: var(--text-muted);
    background: rgba(255,255,255,0.05);
    padding: 4px 8px;
    border-radius: 20px;
}

.view-all {
    color: var(--primary);
    text-decoration: none;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all 0.3s ease;
}

.view-all:hover {
    gap: 8px;
    color: var(--secondary);
}

/* ============================================
   MODERN TABLE
   ============================================ */
.modern-table {
    width: 100%;
    border-collapse: collapse;
}

.modern-table thead th {
    text-align: left;
    padding: 12px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.4px;
    border-bottom: 1px solid var(--glass-border);
    background-color: rgba(0, 0, 0, 0.2);
}

.modern-table tbody td {
    padding: 16px 12px;
    font-size: 13px;
    vertical-align: middle;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    color: var(--text-secondary);
}

.modern-table tbody tr { transition: all 0.3s ease; }

.modern-table tbody tr:hover {
    background: rgba(255,255,255,0.05);
    transform: scale(1.01);
}

/* Legacy table styles */
.table thead th {
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 1px;
    color: #888eb3;
    border-bottom: 1px solid #2d325a;
    padding: 15px;
}

.table tbody td {
    padding: 15px;
    vertical-align: middle;
    color: #ffffff;
    border-bottom: 1px solid #2d325a;
}

.table-modern {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 8px;
}

.table-modern thead th {
    background: rgba(255, 255, 255, 0.05);
    color: var(--primary);
    padding: 15px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 1px;
    border: none;
}

.table-modern tbody tr {
    background: rgba(255, 255, 255, 0.03);
    transition: all 0.3s ease;
}

.table-modern tbody tr:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: scale(1.01);
}

.table-modern td {
    padding: 15px;
    color: #fff;
    border: none;
    vertical-align: middle;
}

/* Status badges */
.status-success {
    background: rgba(46, 204, 113, 0.1);
    color: var(--success);
    border: 1px solid rgba(46, 204, 113, 0.2);
}

.status-warning {
    background: rgba(241, 196, 15, 0.1);
    color: var(--warning);
    border: 1px solid rgba(241, 196, 15, 0.2);
}

.status-danger {
    background: rgba(231, 76, 60, 0.1);
    color: var(--danger);
    border: 1px solid rgba(231, 76, 60, 0.2);
}

.status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: bold;
    text-transform: uppercase;
}

.badge-warna {
    background: rgba(13, 202, 240, 0.1);
    color: #0dcaf0;
    border: 1px solid rgba(13, 202, 240, 0.3);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
}

/* ============================================
   QUICK ACTIONS
   ============================================ */
.quick-actions-container {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-xl);
    padding: 24px;
}

.quick-actions-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.quick-actions-header h5 {
    font-size: 16px;
    font-weight: 600;
}

.shortcut-hint {
    font-size: 11px;
    color: var(--text-muted);
    background: rgba(255,255,255,0.05);
    padding: 4px 8px;
    border-radius: 20px;
}

.quick-actions-grid {
    display: grid !important;
    grid-template-columns: repeat(5, 1fr) !important;
    gap: 16px !important;
}

.quick-action-btn {
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-lg);
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.quick-action-btn::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--gradient-1);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.quick-action-btn:hover {
    background: rgba(255,255,255,0.08);
    transform: translateY(-5px);
    box-shadow: var(--shadow-colored);
}

.quick-action-btn:hover::before { transform: scaleX(1); }

.quick-action-btn i {
    font-size: 32px;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.quick-action-btn span {
    font-size: 13px;
    font-weight: 500;
}

.shortcut {
    font-size: 11px;
    color: var(--text-muted);
    background: rgba(255,255,255,0.05);
    padding: 4px 8px;
    border-radius: 6px;
}

/* ============================================
   CATEGORY LEGEND
   ============================================ */
.category-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--glass-border);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 4px;
}

#categoryLegend .fw-bold,
#categoryLegend strong,
#categoryLegend .nama-kategori {
    font-size: 12px !important;
    font-weight: 500;
    text-transform: capitalize;
}

#categoryLegend .text-muted,
#categoryLegend .jumlah-stok,
#categoryLegend span:last-child,
.category-legend-item span:last-child {
    font-size: 11px !important;
    color: rgba(255,255,255,0.7) !important;
    font-weight: 500;
    opacity: 1;
}

#categoryLegend .lainnya {
    font-size: 11px !important;
    font-style: italic;
    opacity: 0.8;
}

/* ============================================
   STATUS STOK PROGRESS
   ============================================ */
.stock-status-list { padding: 15px; }

.status-color {
    width: 12px;
    height: 12px;
    border-radius: 4px;
    flex-shrink: 0;
}

.progress {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.progress-bar {
    border-radius: 10px;
    transition: width 0.5s ease;
}

/* ============================================
   NOTIFICATION DROPDOWN
   ============================================ */
.notification-dropdown {
    position: absolute;
    top: 50px;
    right: 0;
    width: 300px;
    background: #1e1e2d;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: none;
}

.notification-dropdown.show { display: block; }

.notification-item {
    padding: 12px 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: all 0.3s ease;
}

.notification-item:hover { background: rgba(255, 255, 255, 0.05); }
.notification-item:last-child { border-bottom: none; }

.notifikasi-dropdown { animation: slideDown 0.3s ease; }

.notifikasi-item {
    transition: all 0.3s ease;
    cursor: pointer;
}

.notifikasi-item:hover {
    transform: translateX(5px);
    background: rgba(255,255,255,0.1) !important;
}

/* ============================================
   SAAS LIST STYLE
   ============================================ */
.saas-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.saas-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.saas-item:last-child { border-bottom: none; }

.saas-name {
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.2px;
}

.saas-rank {
    opacity: 0.4;
    margin-right: 6px;
}

.saas-value {
    font-size: 13px;
    font-weight: 600;
}

.value-warning { color: #facc15; }
.value-success { color: #10b981; }

/* ============================================
   FILTER DATE RANGE
   ============================================ */
.filter-date-range {
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ============================================
   VARIANT ITEMS (BARANG FORM)
   ============================================ */
#container-warna, #container-ukuran {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
    background: #1e1e1e;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #333;
    max-height: 200px;
    overflow-y: auto;
}

.variant-item {
    display: flex;
    align-items: center;
    padding: 8px;
    background: #2c2c2c;
    border-radius: 5px;
    cursor: pointer;
    transition: 0.3s;
}

.variant-item:hover { background: #3d3d3d; }

.variant-item input {
    margin-right: 10px;
    accent-color: #bb86fc;
}

/* ============================================
   LOADING MODAL
   ============================================ */
.loading-modal {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.loading-modal.show {
    opacity: 1;
    visibility: visible;
}

.loading-content {
    text-align: center;
}

.spinner-gradient {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    border-radius: 50%;
    background: conic-gradient(
        from 0deg,
        #4158D0 0deg 120deg,
        #C850C0 120deg 240deg,
        #FFCC70 240deg 360deg
    );
    animation: spin 1.5s linear infinite;
    box-shadow: 0 0 20px rgba(65, 88, 208, 0.3);
    position: relative;
}

.spinner-gradient::before {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 55px; height: 55px;
    background: var(--glass-bg);
    border-radius: 50%;
    backdrop-filter: blur(10px);
}

.loading-text {
    color: white;
    font-size: 16px;
    font-weight: 500;
    margin-top: 15px;
}

.loading-subtext {
    color: var(--text-muted);
    font-size: 13px;
    margin-top: 5px;
}

/* ============================================
   SKELETON LOADING
   ============================================ */
.skeleton {
    background: linear-gradient(
        90deg,
        rgba(255,255,255,0.05) 25%,
        rgba(255,255,255,0.1) 50%,
        rgba(255,255,255,0.05) 75%
    );
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 4px;
}

.skeleton-row {
    display: flex;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.skeleton-cell {
    height: 20px;
    margin-right: 15px;
    flex: 1;
}

.skeleton-cell:last-child { margin-right: 0; }
.skeleton-stat   { height: 80px;  width: 100%; border-radius: 12px; }
.skeleton-chart  { height: 300px; width: 100%; border-radius: 12px; }
.skeleton-text   { height: 16px;  width: 100%; margin-bottom: 8px; }
.skeleton-text-small { height: 12px; width: 60%; }

/* ============================================
   UTILITY CLASSES
   ============================================ */
.glass-effect {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
}

.gradient-text {
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.neon-glow {
    box-shadow: 0 0 5px var(--primary),
                0 0 20px var(--primary),
                0 0 60px var(--primary);
}

.spin {
    animation: spin 1s linear infinite;
    display: inline-block;
}

/* ============================================
   SCROLLBAR
   ============================================ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: rgba(255,255,255,0.05); }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.3); }

/* ============================================
   TOOLTIP
   ============================================ */
[data-tooltip] { position: relative; cursor: pointer; }

[data-tooltip]:before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%; left: 50%;
    transform: translateX(-50%);
    padding: 4px 8px;
    background: rgba(0,0,0,0.8);
    color: white;
    font-size: 11px;
    border-radius: 4px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

[data-tooltip]:hover:before {
    opacity: 1;
    visibility: visible;
    bottom: 120%;
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50%       { transform: scale(1.1); }
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.3; }
}

@keyframes shine {
    0%       { transform: translateX(-100%) rotate(45deg); }
    20%, 100% { transform: translateX(100%) rotate(45deg); }
}

@keyframes spin {
    0%   { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes skeleton-loading {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    @page { size: 104mm 15mm; margin: 0; }

    html, body { margin: 0; padding: 0; width: 104mm; height: auto; }

    body * { visibility: hidden; display: none; }

    .print-section,
    .print-section * { visibility: visible !important; display: block !important; }

    .print-section {
        position: absolute; left: 0; top: 0;
        width: 104mm; margin: 0; padding: 0; background: white;
    }

    .print-grid {
        display: flex !important;
        flex-direction: row;
        width: 104mm; height: 15mm;
        margin: 0; padding: 0;
        page-break-after: always;
        page-break-inside: avoid;
    }

    .print-label {
        width: 33mm; height: 15mm;
        display: flex !important;
        align-items: center;
        background: white; color: black;
        border: none; margin: 0;
        padding: 0 0 0 1mm;
        box-sizing: border-box;
    }

    .print-qr { width: 10mm; height: 10mm; margin-right: 2mm; }

    .print-text { font-size: 8pt; line-height: 1.2; color: black; }
    .print-text .nama { font-weight: bold; }
}

/* ============================================
   RESPONSIVE - TABLET (max 1200px)
   ============================================ */
@media (max-width: 1200px) {
    .search-container { width: 200px; }
    .quick-actions-grid { grid-template-columns: repeat(3, 1fr) !important; }
    .col-xl-4 { width: 100%; margin-bottom: 20px; }
}

/* ============================================
   RESPONSIVE - MOBILE (max 768px)
   Tujuan: compact, natural, SaaS mobile feel
   ============================================ */
@media (max-width: 768px) {

    /* === BASE === */
    body { font-size: 13px; }

    .dashboard-container {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    /* Kurangi padding container utama */
    .dashboard-container.p-lg-4.p-2,
    .container-fluid.dashboard-container {
        padding: 10px !important;
    }

    /* Row gap lebih rapat */
    .row.g-4 { 
        --bs-gutter-x: 10px !important;
        --bs-gutter-y: 10px !important;
        row-gap: 10px !important;
    }

    /* === TOP NAVBAR === */
    .top-navbar {
        padding: 10px 14px;
        min-height: 52px;
    }

    .page-title h2 {
        font-size: 15px;
        font-weight: 600;
        margin-bottom: 0;
    }

    .breadcrumb { display: none; }
    .search-container { display: none; }

    .date-container {
        padding: 5px 10px;
        font-size: 11px;
        border-radius: 20px;
    }

    .date-container i { font-size: 11px; }

    /* === STAT CARDS === */
    .stat-card {
        padding: 12px 14px;
        gap: 0;
        border-radius: 14px;
        flex-direction: column;
        align-items: flex-start;
        min-height: unset;
    }

    .stat-icon { display: none; }

    .stat-label {
        font-size: 10px;
        opacity: 0.6;
        margin-bottom: 2px;
        letter-spacing: 0.2px;
    }

    .stat-value {
        font-size: 18px;
        font-weight: 700;
        line-height: 1.2;
    }

    /* === CHART CARDS === */
    .chart-card {
        padding: 14px;
        border-radius: 16px;
    }

    .chart-header {
        margin-bottom: 8px;
        gap: 6px;
    }

    .chart-title { gap: 6px; }

    .chart-title h5,
    .chart-title-main {
        font-size: 13px !important;
        font-weight: 600;
        margin-right: 0 !important;
        margin-bottom: 0;
    }

    .chart-subtitle {
        font-size: 10px !important;
        margin-top: 2px;
    }

    /* Preset date buttons - scroll horizontal */
    .chart-header .chart-title > span {
        display: flex !important;
        overflow-x: auto;
        gap: 6px;
        padding-bottom: 2px;
        scrollbar-width: none;
        -ms-overflow-style: none;
        flex-wrap: nowrap !important;
    }

    .chart-header .chart-title > span::-webkit-scrollbar { display: none; }

    .preset-btn {
        font-size: 11px;
        padding: 4px 10px;
        border-radius: 14px;
        white-space: nowrap;
        margin-right: 0;
        flex-shrink: 0;
    }

    /* === TABLE CARDS === */
    .table-card {
        padding: 14px;
        border-radius: 16px;
    }

    .table-header { margin-bottom: 12px; }

    .table-title h5 {
        font-size: 13px;
        font-weight: 600;
        margin-bottom: 2px;
    }

    .table-badge { font-size: 10px; }

    .view-all { font-size: 11px; }

    /* === MODERN TABLE === */
    .modern-table thead th {
        font-size: 9px;
        padding: 8px 8px;
        letter-spacing: 0.3px;
    }

    .modern-table tbody td {
        font-size: 12px;
        padding: 10px 8px;
    }

    /* Sembunyikan kolom warna & ukuran di tabel kecil */
    .modern-table .col-hide-mobile { display: none; }

    /* === CHART CARD (produk terlaris dll) === */
    .chart-card .chart-header h5 {
        font-size: 13px !important;
    }

    /* === QUICK ACTIONS === */
    .quick-actions-container {
        padding: 14px;
        border-radius: 16px;
    }

    .quick-actions-header {
        margin-bottom: 12px;
    }

    .quick-actions-header h5 { font-size: 13px; }
    .shortcut-hint { font-size: 10px; }

    .quick-actions-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 8px !important;
    }

    .quick-action-btn {
        padding: 12px 8px;
        gap: 6px;
        border-radius: 12px;
    }

    .quick-action-btn i { font-size: 20px; }

    .quick-action-btn span {
        font-size: 10px;
        font-weight: 500;
        text-align: center;
    }

    .shortcut { display: none; }

    /* === STATUS STOK PROGRESS === */
    .stock-status-list { padding: 8px 4px; }

    .stock-status-item { margin-bottom: 10px !important; }

    .status-color {
        width: 8px;
        height: 8px;
    }

    .stock-status-item .text-white { font-size: 12px; }
    .stock-status-item .text-muted { font-size: 11px; }

    /* === SECTION TITLES === */
    .menu-section-title { font-size: 9px; }
    .menu-item span { font-size: 12px; }
    .menu-item { padding: 10px 12px; }

    /* === FILTER DATE RANGE === */
    .filter-date-range { padding: 10px; }

    /* === NOTIFICATION DROPDOWN === */
    .notification-dropdown {
        width: 260px;
        right: -10px;
    }

    /* === BADGE & CHIPS === */
    .badge { font-size: 10px; padding: 3px 6px; }

    /* === LOADING MODAL === */
    .spinner-gradient { width: 60px; height: 60px; }
    .spinner-gradient::before { width: 42px; height: 42px; }
    .loading-text { font-size: 14px; }
    .loading-subtext { font-size: 11px; }
}

/* ================================================================ */

/* ============================================
   TOKO ONLINE - FONT SIZE ADJUSTMENT
   ============================================ */
body {
    font-size: 14px !important;
    line-height: 1.6 !important;
}

/* Harga produk */
.produk-harga, .product-price, .harga-produk {
    font-size: 18px !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
}

/* Nama produk */
.produk-nama, .product-name, .nama-produk {
    font-size: 14px !important;
    font-weight: 500 !important;
    line-height: 1.4 !important;
}

/* Kategori */
.produk-kategori, .product-kategori, .kategori-produk {
    font-size: 12px !important;
    color: var(--text-secondary) !important;
    line-height: 1.4 !important;
}

/* Judul section */
.section-title, h2, h3 {
    font-size: 20px !important;
    font-weight: 700 !important;
    margin-bottom: 20px !important;
}

/* Button text */
.btn, button {
    font-size: 14px !important;
}

/* Responsive mobile */
@media (max-width: 768px) {
    body { font-size: 13px !important; }
    .produk-harga { font-size: 16px !important; }
    .produk-nama { font-size: 13px !important; }
    .section-title { font-size: 18px !important; }
}

/* Tambahkan ini di bagian TOKO ONLINE */

/* Card produk */
.produk-card, .product-card {
    padding: 15px;
}

/* Spasi antar elemen */
.produk-info > * {
    margin-bottom: 8px;
}

/* Label (Kategori, Stok, dll) */
.meta-label {
    font-size: 12px;
    color: var(--text-muted);
    min-width: 100px;
}

/* Value */
.meta-value {
    font-size: 14px;
    font-weight: 500;
}

/* Variasi button */
.variasi-btn {
    font-size: 13px;
    padding: 6px 15px;
}
