* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

:root {
	--bg: #0f172a;
	--bg-gradient-start: #0f172a;
	--bg-gradient-end: #1e293b;
	--btn-bg: rgba(255, 255, 255, 0.05);
	--card: rgba(255, 255, 255, 0.03);
	--card-border: rgba(255, 255, 255, 0.05);
	--text: #f1f5f9;
	--subtext: #94a3b8;
	--accent: #38bdf8;
	--accent-secondary: #818cf8;
	--accent-tertiary: #c084fc;
	--success: #22c55e;
	--warning: #f59e0b;
	--danger: #ef4444;
	--accent-glow: rgba(56, 189, 248, 0.2);
	--font-body: 'Inter', 'Segoe UI', system-ui, sans-serif;
	--gold: #c9a44c;
	--text-primary: #f4e3b8;
	--ease-spring: cubic-bezier(0.22, 1, 0.36, 1);
	--ease-out-expo: cubic-bezier(0.19, 1, 0.22, 1);
	--premium-glass: rgba(255, 255, 255, 0.07);
	--premium-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
	--premium-shadow-light: 0 10px 30px -8px rgba(0, 0, 0, 0.2);
	--premium-blur: blur(12px);
	--transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
	font-family: 'Inter', sans-serif;
    background: 
        radial-gradient(circle at 0% 0%, rgba(212, 175, 55, 0.08) 0%, transparent 40%),
        linear-gradient(
            145deg,
            #04070d 0%,
            #0a0f1a 100%
        );
	color: var(--text);
	overflow-x: hidden;
	transition: var(--transition-smooth);
	min-height: 100vh;
	background-image:
		radial-gradient(ellipse at 20% 20%, rgba(120, 90, 40, 0.06) 0%, transparent 55%),
		radial-gradient(ellipse at 75% 60%, rgba(160, 130, 60, 0.04) 0%, transparent 50%),
		radial-gradient(ellipse at 50% 80%, rgba(40, 30, 15, 0.5) 0%, transparent 60%),
		linear-gradient(180deg, #060a12 0%, #0a0f1a 40%, #04070d 100%);
	background-attachment: fixed;
}

::-webkit-scrollbar {
	width: 8px;
	height: 8px;
}
::-webkit-scrollbar-track {
	background: var(--card);
	border-radius: 10px;
}
::-webkit-scrollbar-thumb {
	background: linear-gradient(135deg, var(--accent), var(--accent-secondary));
	border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
	background: linear-gradient(135deg, var(--accent-secondary), var(--accent-tertiary));
}

/* ========== DROPDOWN ========== */
.select-sm {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-color: var(--bg);
    color: var(--text);
    border: 1px solid var(--card-border);
    border-radius: 6px;
    padding: 4px 24px 4px 10px;
    font-family: var(--font-body);
    font-size: 13px;
    cursor: pointer;
    transition: var(--transition-smooth);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://w3.org' fill='none' viewBox='0 0 24 24' stroke='%2394a3b8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 12px;
}
.select-sm option {
    background-color: #0f172a;
    color: #f8fafc;
}
.select-sm:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

/* Kontainer Utama Baru */
.dashboard-sync {
    display: flex;
    flex-direction: row;       /* Berjejer horizontal ke samping */
    align-items: center;       /* Ratakan vertikal tepat di tengah */
    justify-content: flex-start; /* Elemen rapat ke kiri */
    gap: 12px;                 /* Jarak aman antar komponen */
    padding: 16px;
    width: 100%;
    box-sizing: border-box;
}
.dashboard-sync .periode-info {
    margin-left: auto;         /* KUNCI: Memaksa filter periode mojok ke kanan */
    display: flex;
    align-items: center;
    gap: 8px;
}
#syncStatus {
    display: inline-block;
    margin-bottom: 12px;
    font-size: 12px;
    font-weight: 600;
}

.login-overlay {
    position: fixed;
    inset: 0;
    background: #111;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
}
.login-card {
    width: 320px;
    padding: 24px;
    border-radius: 16px;
    background: #1c1c1c;
    text-align: center;
}
.login-logo {
    width: 80px;
    height: 80px;
    margin-bottom: 12px;
}
.login-card h2 {
    color: #fff;
    margin-bottom: 20px;
}
.login-card input {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    border: none;
    margin-bottom: 12px;
}
.login-card button {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}
.login-subtitle {
    color: #aaa;
    font-size: 14px;
    margin-bottom: 20px;
}
.login-overlay {
    display: none;
}

/* ========== SIDEBAR ========== */
.sidebar {
    width: 260px;
    min-width: 260px;
    max-width: 260px;
    overflow-x: hidden;
	position: fixed;
    background: transparent;
	backdrop-filter: blur(24px);
	-webkit-backdrop-filter: blur(24px);
    color: white;
    position: fixed;
	scrollbar-gutter: stable;
    height: 100vh;
    transition: transform 0.3s ease, width 0.3s ease, background 0.3s ease; 
    z-index: 1000;
    overflow-y: auto;
	background:
		radial-gradient(circle at top left, rgba(168, 85, 247, 0.05), transparent 30%),
		radial-gradient(circle at bottom right, rgba(59, 130, 246, 0.03), transparent 30%),
		linear-gradient(165deg,
			rgba(10, 13, 20, 0.97) 0%,
			rgba(14, 17, 25, 0.96) 40%,
			rgba(3, 6, 12, 0.99) 100%);
}
.sidebar::after {
    content: "";
    position: fixed;
    top: 0;
    left: 256px;
    width: 4px;
    height: 100vh;
    background: linear-gradient(
        180deg, 
        #d4af37 0%, 
        #fcf6ba 20%, 
        #b38728 50%, 
        #fcf6ba 80%, 
        #d4af37 100%
    );
    
    box-shadow: 0.5px 0 2px rgba(252, 246, 186, 0.3);
    z-index: 1100;
    pointer-events: none;
}
.sidebar::-webkit-scrollbar {
    width: 5px;
}
.sidebar::-webkit-scrollbar-thumb {
    background: rgba(212, 175, 55, 0.2);
    border-radius: 10px;
}
.sidebar-header {
    padding: 24px 20px;
    font-size: 1.25rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 32px;
    position: relative;
}
.sidebar-header small {
    display: block;
    font-size: 0.7rem;
    opacity: 0.7;
    margin-top: 4px;
}
.sidebar-menu {
    padding: 16px 12px;
    padding-right: 16px;
}
.logo-img {
	width: 70px;
	height: 70px;
	object-fit: contain;
	animation: gentlePulse 3s ease-in-out infinite;
	filter: drop-shadow(0 0 10px var(--accent-glow));
}
@keyframes gentlePulse {
	0%, 100% { filter: drop-shadow(0 0 5px var(--accent)); transform: scale(1); }
	50% { filter: drop-shadow(0 0 20px var(--accent)); transform: scale(1.02); }
}
.brand {
	text-align: center;
	font-weight: 800;
	font-size: 20px;
	margin-top: 12px;
	letter-spacing: -0.5px;
	background: linear-gradient(
		135deg, 
		#38bdf8 0%, 
		#818cf8 30%, 
		#c084fc 60%, 
		#e879f9 100%
	);
	background-size: 200% auto;
	animation: brandFlow 4s linear infinite;
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
	color: transparent;
	filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
	transition: all 0.3s ease;
}
@keyframes brandFlow {
	0% { background-position: 0% center; }
	100% { background-position: 200% center; }
}
.brand:hover {
	filter: drop-shadow(0 0 8px rgba(129, 140, 248, 0.5));
	transform: scale(1.02);
}
.sidebar-bottom {
    display: flex;
    flex-direction: column; 
    gap: 10px;              
    padding: 20px 16px;     
    margin-top: auto;       /* Memaksa kontainer berada di paling bawah sidebar */
    border-top: 1px solid var(--border-dim); 
    background: rgba(8, 12, 20, 0.4); 
    
    /* Tambahkan ini untuk membuat tombol di dalamnya berada di tengah */
    align-items: center; 
}
.sidebar-bottom .btn-export-mono {
    display: inline-flex;
    align-items: center;
    justify-content: center; /* Membuat teks dan emoji di dalam tombol berada di tengah */
    gap: 8px;
    
    width: 100%;             /* Tombol akan melebar penuh mengikuti padding sidebar */
    max-width: 200px;        /* Batasi lebar maksimal tombol agar tidak terlalu melar */
    height: 38px;
    padding: 0 16px;
    box-sizing: border-box;
    
    background: var(--card);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    color: var(--text);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-smooth);
}
.sidebar-bottom .btn-export-mono:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--gold-1);
    color: var(--gold-2);
}
.diagnostic-panel {
    margin-top: 5px;
    padding: 10px;
    font-size: 12px;
	text-align: center;
}
.diagnostic-panel div {
    margin-bottom: 10px;
}

/* ========== MENU ITEMS ========== */
.menu-item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 16px;
	margin-bottom: 4px;
	margin-right: 8px;
	border-radius: 12px;
	cursor: pointer;
	position: relative;
	transition: all 0.3s ease;
	overflow: hidden;
}
.menu-item::before {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	width: 0;
	height: 0;
	background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
	transform: translate(-50%, -50%);
	transition: width 0.6s, height 0.6s;
}
.menu-item:hover::before {
	width: 200%;
	height: 200%;
}
.menu-item:hover {
	transform: translateX(5px);
	background: var(--premium-glass);
}
.menu-item.active {
	background: linear-gradient(135deg, rgba(56, 189, 248, 0.15), rgba(129, 140, 248, 0.15));
	border: 1px solid rgba(56, 189, 248, 0.3);
}
.menu-item:hover .menu-icon {
	transform: scale(1.05);
	opacity: 0.9;
}
.menu-item.active .menu-icon {
	stroke: var(--accent);
}
.menu-item.active::after {
	content: '';
	position: absolute;
	left: 0;
	top: 50%;
	transform: translateY(-50%);
	width: 3px;
	height: 50%;
	background: linear-gradient(135deg, var(--accent), var(--accent-secondary));
	border-radius: 0 4px 4px 0;
}
.menu-icon {
	width: 20px;
	height: 20px;
	stroke: currentColor;
	fill: none;
	stroke-width: 2;
	position: relative;
	z-index: 1;
}
.menu-text {
	font-size: 14px;
	font-weight: 500;
	position: relative;
	z-index: 1;
}

/* ========== MAIN CONTENT ========== */
.main {
	margin-left: 280px;
	padding: 24px 32px;
	min-height: 100vh;
	transition: margin-left 0.3s ease;
}
.page-content {
	display: none;
}
.page-content.active {
	display: block;
}

/* ========== CONTAINER & GRID ========== */
.container {
	display: grid;
	gap: 24px;
	margin-bottom: 32px;
}
.charts-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 32px;
}

/* ========== CARD ========== */
.luxury-card--noir {
	position: relative;
	display: flex;
	flex-direction: column;
	padding: 32px 28px;
	border-radius: 28px;
	border: 1px solid rgba(212, 175, 55, 0.12);
	cursor: pointer;
	isolation: isolate;
	transition: transform 0.5s var(--ease-spring), box-shadow 0.5s var(--ease-spring);
	background:
		linear-gradient(165deg,
			rgba(10, 11, 15, 0.99) 0%,
			rgba(14, 15, 20, 0.98) 40%,
			rgba(5, 6, 10, 1) 100%);
	box-shadow:
		0 35px 75px rgba(0, 0, 0, 0.8),
		0 10px 25px rgba(0, 0, 0, 0.55),
		0 0 0 1px rgba(255, 255, 255, 0.04),
		inset 0 1px 0 rgba(255, 255, 255, 0.015);
	overflow: hidden;
	margin-bottom: 25px;
}
.luxury-card--noir::before {
	content: "";
	position: absolute;
	top: 0;
	left: 50%;
	transform: translateX(-50%);
	width: 70%;
	height: 1px;
	background: linear-gradient(90deg,
			transparent,
			rgba(200, 165, 70, 0.5) 20%,
			rgba(220, 190, 100, 0.8) 40%,
			rgba(240, 210, 130, 1) 50%,
			rgba(220, 190, 100, 0.8) 60%,
			rgba(200, 165, 70, 0.5) 80%,
			transparent);
	z-index: 7;
	opacity: 0.85;
	transition: opacity 0.5s ease, width 0.5s var(--ease-spring);
}
.luxury-card--noir::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: 28px;
	background:
		radial-gradient(ellipse at 20% 8%, rgba(200, 160, 60, 0.04) 0%, transparent 45%),
		radial-gradient(ellipse at 80% 92%, rgba(180, 140, 40, 0.03) 0%, transparent 40%),
		linear-gradient(180deg,
			rgba(255, 255, 255, 0.01) 0%,
			transparent 18%,
			transparent 78%,
			rgba(0, 0, 0, 0.4) 100%);
	pointer-events: none;
	z-index: 2;
}
.luxury-card--noir .card-shimmer-sweep {
	position: absolute;
	top: -55%;
	left: -28%;
	width: 55%;
	height: 210%;
	background: linear-gradient(100deg,
			transparent 32%,
			rgba(220, 180, 100, 0.08) 44%,
			rgba(240, 210, 140, 0.16) 50%,
			rgba(220, 180, 100, 0.08) 56%,
			transparent 68%);
	transform: rotate(20deg) translateX(-125%);
	pointer-events: none;
	z-index: 6;
	transition: transform 0.9s var(--ease-out-expo);
}
.luxury-card--noir:hover .card-shimmer-sweep {
	transform: rotate(20deg) translateX(210%);
	transition: transform 0.7s var(--ease-out-expo);
}
.luxury-card--noir:hover {
	transform: translateY(-12px) scale(1.015);
	box-shadow:
		0 50px 100px rgba(0, 0, 0, 0.85),
		0 18px 38px rgba(0, 0, 0, 0.6),
		0 0 40px rgba(180, 140, 50, 0.18),
		0 0 80px rgba(160, 120, 30, 0.08),
		0 0 0 1px rgba(200, 160, 60, 0.2),
		inset 0 1px 0 rgba(255, 255, 255, 0.025);
}
.luxury-card--noir:hover::before {
	opacity: 1;
	width: 85%;
}
.luxury-card--noir .card-icon-wrapper {
	background: linear-gradient(145deg, rgba(16, 14, 8, 0.9), rgba(10, 9, 5, 0.95));
	border: 1px solid rgba(180, 145, 60, 0.35);
	color: #d4b860;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.55), 0 0 0 4px rgba(180, 140, 40, 0.05);
}
.luxury-card--noir:hover .card-icon-wrapper {
	transform: scale(1.1) rotate(3deg);
	border-color: rgba(210, 170, 70, 0.7);
	box-shadow: 0 14px 32px rgba(180, 135, 35, 0.3), 0 0 0 8px rgba(180, 140, 40, 0.07);
}
.luxury-card--noir .card-badge {
	color: #c4a548;
}
.luxury-card--noir .card-title {
	color: #efe0b8;
}
.luxury-card--noir .card-subtitle {
	color: rgba(195, 165, 100, 0.65);
}
.luxury-card--noir .card-cta {
	color: #d4b860;
	border-bottom-color: rgba(190, 150, 50, 0.4);
}
.luxury-card--noir .card-cta:hover {
	color: #f0d890;
	border-bottom-color: rgba(220, 180, 80, 0.8);
}
.card-title {
    font-weight: 600;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--card-border);
    color: var(--text);
}
.card-title span {
	font-size: 20px;
	filter: drop-shadow(0 0 6px rgba(56,189,248,0.5));
}
.card-inner {
	display: flex;
	align-items: center;
	gap: 16px;
}
.card-icon-wrapper {
	width: 60px;
	height: 60px;
	background: linear-gradient(135deg, var(--accent-glow), transparent);
	border-radius: 20px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 32px;
	transition: all 0.3s ease;
}
.card-icon {
    font-size: 24px;
    background: linear-gradient(135deg, var(--accent), var(--accent-secondary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.card-content {
	flex: 1;
}
.card-label {
	font-size: 14px;
	color: var(--subtext);
	margin-bottom: 6px;
	font-weight: 500;
}
.card-actions {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
	margin-bottom: 12px;
}

/* ========== BUTTON ========== */
.sync-status-btn {
    display: flex;
    align-items: center;    /* Sejajarkan ikon dan teks secara horizontal */
    justify-content: flex-start; /* Teks rata kiri */
    gap: 12px;              /* Jarak antara ikon/emoji dan teks */
    
    width: 100%;            /* Lebar penuh mengikuti area sidebar */
    height: 42px;           /* Tinggi tombol yang ideal untuk desktop */
    padding: 0 16px;
    box-sizing: border-box;
    
    background: var(--card); /* Gunakan glass transparan premium Anda */
    border: 1px solid var(--card-border);
    border-radius: 10px;
    
    color: var(--text);
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-smooth); /* Efek animasi halus saat di-hover */
}

/* 3. Pengaturan Ikon & Teks di Desktop */
.sync-status-btn .btn-icon {
    font-size: 14px;
    display: inline-flex;
    align-items: center;
}

.sync-status-btn .btn-text {
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
}

/* 4. Efek Hover & Fokus Tombol yang Mewah */
.sync-status-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--gold-1); /* Sentuhan border emas saat di-hover */
    color: var(--gold-2);         /* Warna teks berubah ke emas terang */
    transform: translateX(3px);   /* Efek bergeser sedikit ke kanan khas sidebar premium */
    box-shadow: 0 4px 12px rgba(212, 167, 69, 0.1); /* Glow emas tipis */
}

/* Gaya Khusus saat tombol diklik/ditekan */
.sync-status-btn:active {
    transform: translateX(0);
}
.btn-success, .btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: var(--transition-smooth);
}
.btn-success {
    background-color: rgba(34, 197, 94, 0.1);
    color: var(--success);
    border-color: rgba(34, 197, 94, 0.2);
}
.btn-success:hover {
    background-color: var(--success);
    color: #04070d;
    box-shadow: 0 0 15px rgba(34, 197, 94, 0.4);
}
.btn-secondary {
    background-color: rgba(148, 163, 184, 0.1);
    color: var(--subtext);
    border-color: rgba(148, 163, 184, 0.2);
}
.btn-secondary:hover {
    background-color: var(--subtext);
    color: #04070d;
    box-shadow: 0 0 15px rgba(148, 163, 184, 0.4);
}
.btn-group {
    display: flex;
    gap: 10px;
    align-items: flex-end;
}
.btn-add-to-cart {
    position: relative;
    width: 100%;
    height: 44px;
    background: #181818;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
	margin-top: 15px;
}
.btn-cart-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #a3a3a3;
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}
.btn-cart-content i {
    font-size: 14px;
    color: #6b7280;
    transition: all 0.3s ease;
}
.btn-add-to-cart:hover {
    background: #1e1e1e;
    border-color: #eab308; 
    box-shadow: 0 0 16px rgba(34, 197, 94, 0.2);
    transform: translateY(-2px);
}
.btn-add-to-cart:hover .btn-cart-content {
    color: #ffffff;
}
.btn-add-to-cart:hover .btn-cart-content i {
    color: #eab308;
    transform: scale(1.1) rotate(-5deg);
}
.btn-add-to-cart:active {
    transform: translateY(1px);
    box-shadow: 0 0 8px rgba(59, 130, 246, 0.15);
    background: #121212;
}
.btn-add-to-cart:disabled {
    background: #121212 !important;
    border-color: rgba(255, 255, 255, 0.03) !important;
    cursor: not-allowed !important;
    transform: none !important;
    box-shadow: none !important;
}
.btn-add-to-cart:disabled .btn-cart-content {
    color: #404040 !important;
}
.btn-add-to-cart:disabled .btn-cart-content i {
    color: #404040 !important;
}
.btn-export-mono {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    font-size: 12px;
    font-weight: 500;
    color: #9ca3af;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.btn-export-mono i {
    font-size: 13px;
    color: #6b7280;
}
.btn-export-mono:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: #eab308;
    color: #eab308;
}
.btn-export-mono:hover i {
    color: #eab308;
}
.btn-master-action {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    font-size: 12px;
    font-weight: 500;
    color: #9ca3af;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.btn-master-action i {
    font-size: 13px;
    color: #6b7280;
}
.btn-master-action:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: #eab308;
    color: #eab308;
}
.btn-master-action:hover i {
    color: #eab308;
}
/* ========== TABEL & KANVAS ========== */
.modern-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 13px;
}
.modern-table thead th {
    position: sticky;
    top: 0;
    background: linear-gradient(135deg, var(--bg-gradient-start), var(--bg-gradient-end));
    padding: 14px 8px;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--accent);
    border-bottom: 2px solid var(--accent);
    white-space: nowrap;
}
.modern-table tbody tr {
    transition: all 0.2s ease;
}
.modern-table tbody tr:hover {
    background: var(--premium-glass);
    transform: scale(1.01);
}
.modern-table td {
    padding: 12px 8px;
    border-bottom: 1px solid var(--card-border);
    color: var(--text);
}
table {
	width: 100%;
	border-collapse: collapse;
}
th, td {
	padding: 14px 12px;
	text-align: left;
	border-bottom: 1px solid var(--card-border);
}
th {
	color: var(--subtext);
	font-weight: 600;
	font-size: 13px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}
tr {
	transition: all 0.2s ease;
}
tr:hover {
	background: var(--premium-glass);
	transform: scale(1.01);
}
.charts-container canvas {
    max-height: 280px !important;
    width: 100% !important;
    margin-top: 16px;
}
canvas {
    max-height: 300px;
    width: 100% !important;
    margin: 0 auto;
}

/* ========== JUDUL CONTENT ========== */
.topbar-dashboard {
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 16px;
}
.topbar {
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 16px;
	margin-bottom: 50px;
}
.page-title {
	font-family: 'Plus Jakarta Sans', sans-serif;
	font-size: 2.4rem;
	font-weight: 800;
	letter-spacing: -0.02em;
	background: linear-gradient(
		120deg,
		#0a0a0a 0%,
		#d4af37 25%,
		#f5e6c8 40%,
		#ffffff 50%,
		#f5e6c8 60%,
		#d4af37 75%,
		#0a0a0a 100%
	);
	background-size: 250% auto;
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
	text-shadow:
		0 2px 8px rgba(212, 175, 55, 0.25),
		0 0 1px rgba(255, 255, 255, 0.2);
	animation: luxury-shine 12s ease-in-out infinite;
}
@keyframes luxury-shine {
	0% {
		background-position: 0% center;
	}
	50% {
		background-position: 100% center;
	}
	100% {
		background-position: 0% center;
	}
}
.page-title:hover {
	opacity: 0.9;
	transform: translateY(-3px);
	text-shadow: 0 2px 10px rgba(212, 175, 55, 0.4);
}

.target-subtitle{
    margin-top:6px;
    font-size:14px;
    color:var(--text-soft);
}
.target-badge{
    padding:10px 16px;
    border-radius:999px;
    background:rgba(34,197,94,0.12);
    color:var(--success);
    font-size:12px;
    font-weight:700;
    border:1px solid rgba(34,197,94,0.15);
}

#chartPlatform{
    width:100% !important;
    height:340px !important;
}
.platform-legend{
    display:flex;
    flex-direction:column;
    gap:14px;
    margin-top:24px;
}
.platform-item{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:16px;
    padding:16px 18px;
    border-radius:22px;
    background:
        linear-gradient(
            145deg,
            rgba(255,255,255,0.05),
            rgba(255,255,255,0.02)
        );
    border:
        1px solid rgba(
            255,
            255,
            255,
            0.06
        );
    backdrop-filter:blur(18px);
    transition:
        all 0.28s ease;
}
.platform-item:hover{
    transform:
        translateY(-3px);
    border-color:
        rgba(56,189,248,0.18);
    box-shadow:
        0 12px 30px rgba(
            56,
            189,
            248,
            0.10
        );
}
.platform-left{
    display:flex;
    align-items:center;
    gap:14px;
}
.platform-dot{
    width:13px;
    height:13px;
    border-radius:50%;
    flex-shrink:0;
    box-shadow:
        0 0 16px currentColor;
}
.platform-name{
    font-size:14px;
    font-weight:700;
    color:#f8fafc;
}
.platform-percent{
    margin-top:4px;
    font-size:12px;
    color:#64748b;
}
.platform-value{
    font-size:18px;
    font-weight:800;
    color:#38bdf8;
}

#chartKategori{
    width:100% !important;
    height:340px !important;
}
.kategori-legend{
    display:flex;
    flex-direction:column;
    gap:14px;
    margin-top:24px;
}
.kategori-item{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:16px;
    padding:16px 18px;
    border-radius:22px;
    background:
        linear-gradient(
            145deg,
            rgba(255,255,255,0.05),
            rgba(255,255,255,0.02)
        );
    border:
        1px solid rgba(
            255,
            255,
            255,
            0.06
        );
    backdrop-filter:blur(18px);
    transition:
        all 0.28s ease;
}
.kategori-item:hover{
    transform:
        translateY(-3px);
    border-color:
        rgba(168,85,247,0.18);
    box-shadow:
        0 12px 30px rgba(
            168,
            85,
            247,
            0.10
        );
}
.kategori-left{
    display:flex;
    align-items:center;
    gap:14px;
    min-width:0;
}
.kategori-dot{
    width:13px;
    height:13px;
    border-radius:50%;
    flex-shrink:0;
    box-shadow:
        0 0 14px currentColor;
}
.kategori-info{
    min-width:0;
}
.kategori-name{
    font-size:14px;
    font-weight:700;
    color:#f8fafc;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}
.kategori-percent{
    margin-top:4px;
    font-size:12px;
    color:#64748b;
}
.kategori-value{
    font-size:18px;
    font-weight:800;
    color:#c084fc;
    flex-shrink:0;
}

.target-main{
    display:flex;
    gap:40px;
    align-items:center;
    justify-content:space-between;
    flex-wrap:wrap;
}

.radial-wrap{
    position:relative;
    width:220px;
    height:220px;
}
.progress-ring{
    transform:rotate(-90deg);
}
.ring-bg{
    fill:none;
    stroke:#e5e7eb;
    stroke-width:14;
}
.ring-progress{
    fill:none;
    stroke:url(#gradientStroke);
    stroke-width:14;
    stroke-linecap:round;
    stroke-dasharray:553;
    stroke-dashoffset:553;
    transition:stroke-dashoffset 1.4s ease;
    filter:drop-shadow(0 0 12px rgba(124,58,237,0.45));
}
.ring-content{
    position:absolute;
    inset:0;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    text-align:center;
}
.ring-percent{
    font-size:42px;
    font-weight:800;
    color:var(--text-main);
    line-height:1;
}
.ring-value{
    margin-top:12px;
    font-size:20px;
    font-weight:700;
    color:#4c1d95;
}
.ring-target{
    margin-top:6px;
    font-size:13px;
    color:var(--text-soft);
}

.kpi-side{
    flex:1;
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(180px,1fr));
    gap:18px;
}

.card-search {
    display: flex;
    justify-content: space-between;
    align-items: center;
	gap: 15px;
	padding: 15px 20px;
	width: 100%;
	box-sizing: border-box;
}
.card-search > div {
    display: flex;
    align-items: center;
    gap: 8px;
}
.card-search label {
    font-size: 13px;
    color: #9ca3af;
    font-weight: 500;
    white-space: nowrap;
}
.card-search input,
.card-search select,
.card-search .btn-primary,
.card-search .btn-csv {
    height: 38px;
    box-sizing: border-box;
    font-size: 13px;
    border-radius: 6px;
}

.search-box input {
    width: 350px;
    padding: 0 12px;
    background: #1e1e1e;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    transition: all 0.3s ease;
}
.search-box input:focus {
    border-color: #3b82f6;
    outline: none;
}

/* SORTABLE HEADER */
.sortable{
    cursor:pointer;
    user-select:none;
    transition:
        all 0.25s ease;
    position:relative;
}
.sortable:hover{
    color:#c084fc;
}
.sortable::after{
    margin-left:8px;
    font-size:11px;
    opacity:0.4;
}

.loading {
    text-align: center;
    padding: 40px;
    color: var(--subtext)
}

#toastContainer {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;

    width: auto !important;

    height: auto !important;

    max-width: 320px;
}
.toast {
    background: #1a1a1a;
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 12px 20px;
    border-radius: 6px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
	pointer-events: auto;
}
.toast-success { border-left: 4px solid #22c55e; }
.toast-error { border-left: 4px solid #ef4444; }
.toast-warning { border-left: 4px solid #eab308; }
.toast-info { border-left: 4px solid #3b82f6; }

/* ========== DASHBOARD ========== */
.periode-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: #6b7280;
    padding: 10px 20px;
    border-radius: 40px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid var(--border);
    margin-top: 4px;
	margin-bottom: 25px;
}
.periode-info:hover {
    background: var(--hover-bg);
    border-color: var(--primary);
}
.periode-label {
    font-weight: 500;
}
.periode-value {
    font-weight: 600;
    color: #6366f1;
    background: #eef2ff;
    padding: 4px 12px;
    border-radius: 20px;
}
.periode-value:hover {
    background: #4f46e5;
    color: white;
}
.dropdown-icon {
    font-size: 10px;
    color: var(--subtext);
    transition: transform 0.2s;
}
.periode-info.active .dropdown-icon {
    transform: rotate(180deg);
}
.month-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 8px;
    background: var(--card-bg);
    border-radius: 16px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    width: 300px;
    z-index: 1000;
    backdrop-filter: blur(10px);
    animation: dropdownFadeIn 0.2s ease;
}
@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.month-dropdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    font-weight: 600;
}
.close-dropdown {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: var(--subtext);
    padding: 0;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    transition: all 0.2s;
}
.close-dropdown:hover {
    background: var(--hover-bg);
    color: var(--text);
}
.month-dropdown-search {
    padding: 12px;
    border-bottom: 1px solid var(--border);
}
.month-dropdown-search input {
    width: 100%;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--input-bg);
    color: var(--text);
    font-size: 13px;
}
.month-dropdown-search input:focus {
    outline: none;
    border-color: var(--primary);
}
.month-list {
    max-height: 300px;
    overflow-y: auto;
    padding: 8px;
}
.month-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 4px;
}
.month-item:hover {
    background: var(--hover-bg);
}
.month-item.active {
    background: rgba(124, 58, 237, 0.15);
    border-left: 3px solid var(--primary);
}
.month-name {
    font-weight: 500;
    font-size: 14px;
}
.month-year {
    font-size: 12px;
    color: var(--subtext);
}
.month-omzet {
    font-size: 12px;
    font-weight: 600;
    color: var(--primary);
}
.btn-reset-periode {
    background: var(--btn-bg);
    border: 1px solid var(--border);
    padding: 8px 16px;
    border-radius: 40px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text);
}
.btn-reset-periode:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}
.loading-month {
    text-align: center;
    padding: 20px;
    color: var(--subtext);
}
/* KPI Grid Premium */
.kpi-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 20px;
	margin-bottom: 25px;
}
.stat-value {
	font-size: 32px;
	font-weight: 800;
	background: linear-gradient(135deg, var(--text), var(--accent));
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
	letter-spacing: -1px;
}

/* Text alignment */
.text-right {
    text-align: right;
}
.text-center {
    text-align: center;
}
.text-danger {
    color: #ef4444;
    font-weight: 600;
}
.sparkline {
	position: absolute;
	bottom: 12px;
	right: 12px;
	width: 80px;
	height: 30px;
	opacity: 0.5;
}
#dashboardChartTrend {
    min-height: 220px;
}
#dashboardChartTopProduk {
    width:100% !important;
    height:420px !important;
	min-height: 280px;
}

#dashboardChartBulanan {
    min-height: 220px;
}

.analytics-margin-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    color: white;
}
.analytics-trend {
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
}
.trend-up { color: #22c55e; }
.trend-down { color: #ef4444; }
.trend-stable { color: #9ca3af; }

/* CSS Badge Margin */
.margin-high { color: #22c55e; font-weight: bold; }
.margin-medium { color: #eab308; }
.margin-low { color: #a8a29e; }
.margin-negative { color: #ef4444; font-weight: bold; text-decoration: underline; }
.analytics-platform {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}
.platform-shopee {
    color: #f97316;
}
.platform-tokped {
    color: #22c55e;
}
.platform-offline {
    color: #3b82f6;
}
.platform-unknown { color: #9ca3af; }

/* ========== STOCK OPNAME ========== */
.form-stock-inline {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 16px;
}
.form-group {
	display: flex;
	flex-direction: column;
	gap: 6px;
}
.form-group label {
	font-size: 12px;
	color: #94a3b8;
	font-weight: 500;
}
.form-group input {
	padding: 10px 12px;
	border-radius: 10px;
	background: rgba(255,255,255,0.04);
	border: 1px solid rgba(255,255,255,0.08);
	color: #e2e8f0;
	transition: all 0.2s ease;
}
.form-group input:focus {
	border-color: #38bdf8;
	box-shadow: 0 0 0 2px rgba(56,189,248,0.2);
	background: rgba(255,255,255,0.06);
}
.input-readonly {
	opacity: 0.7;
	background: rgba(255,255,255,0.02);
}
.info-produk {
	margin-top: 12px;
	padding: 12px;
	border-radius: 10px;
	background: rgba(56,189,248,0.08);
	border: 1px solid rgba(56,189,248,0.2);
	font-size: 13px;
	color: #e0f2fe;
}
.hidden {
	display: none;
}
.stock-value-wrap{
    display:flex;
    align-items:center;
}
.stock-value{
    font-size:22px;
    font-weight:800;
    letter-spacing:-0.02em;
    transition:
        all 0.25s ease;
}
tr:hover .stock-value{
    transform:
        scale(1.05);
}

/* ========== PENJUALAN ========== */
.layout-penjualan-top {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 20px;
    margin-bottom: 20px;
}
.form-penjualan-card {
    margin-bottom: 24px;
    overflow: visible;
}
.card-title h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
    margin: 0;
}
.form-section {
    margin-bottom: 28px;
    padding: 16px;
    background: var(--premium-glass);
    border-radius: 20px;
    border: 1px solid var(--card-border);
}
.section-label {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--card-border);
}
.section-label i {
    font-size: 18px;
    color: var(--accent);
}
.section-label span {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--subtext);
}
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.form-group label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--subtext);
}
.form-group .required {
    color: #ef4444;
    margin-left: 4px;
}
.form-group input,
.form-group select,
.form-select {
    padding: 12px 16px;
    background: var(--btn-bg);
    border: 1.5px solid var(--card-border);
    border-radius: 14px;
    font-size: 14px;
    color: var(--text);
    font-family: 'Inter', sans-serif;
    transition: all 0.2s ease;
    outline: none;
}
.form-group input:focus,
.form-group select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}
.form-group input::placeholder {
    color: var(--subtext);
    opacity: 0.5;
}

.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}
.input-with-icon i {
    position: absolute;
    left: 14px;
    color: var(--subtext);
    font-size: 14px;
}
.input-with-icon input {
    width: 100%;
    padding-left: 40px;
}
.suggestions-box {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 100;
    display: none;
    margin-top: 4px;
}
.suggestions-box.active {
    display: block;
}
.suggestion-item {
    padding: 10px 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid var(--card-border);
}
.suggestion-item:hover {
    background: var(--accent-glow);
    padding-left: 20px;
}
.btn-add-cart {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 28px;
    background: linear-gradient(135deg, var(--accent), var(--accent-secondary));
    border: none;
    border-radius: 16px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}
.btn-add-cart i {
    font-size: 16px;
    transition: transform 0.2s ease;
}
.btn-add-cart:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px var(--accent-glow);
}
.btn-add-cart:hover i {
    transform: scale(1.1);
}
/* Price Preview Box */
.price-preview-box {
    margin-top: 20px;
    padding: 16px 20px;
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.1), rgba(129, 140, 248, 0.05));
    border: 1px solid rgba(56, 189, 248, 0.3);
    border-radius: 20px;
    animation: fadeInUp 0.3s ease;
}
.preview-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(56, 189, 248, 0.2);
}
.preview-header i {
    color: var(--accent);
    font-size: 18px;
}
.preview-header span {
    font-size: 13px;
    font-weight: 600;
    color: var(--accent);
    text-transform: uppercase;
}
.preview-content {
    font-size: 14px;
    color: var(--text);
}
.preview-content .price-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px dashed var(--card-border);
}
.preview-content .price-item:last-child {
    border-bottom: none;
}
.preview-content .price-label {
    color: var(--subtext);
}
.preview-content .price-value {
    font-weight: 700;
    color: var(--accent);
    font-size: 16px;
}
/* Loading state for form */
.form-group input:disabled,
.form-group select:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
/* Success/Error states */
.form-group input.error {
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.05);
}
.form-group input.success {
    border-color: #22c55e;
    background: rgba(34, 197, 94, 0.05);
}
/* Validation message */
.error-message {
    font-size: 11px;
    color: #ef4444;
    margin-top: 4px;
}
/* Hover effect on form sections */
.form-section:hover {
    border-color: var(--accent);
    transition: all 0.3s ease;
}
.customer-suggestion-wrapper {
    position: relative;
}
.customer-suggestion-box {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: 100%;
    background: #111827;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    overflow: hidden;
    z-index: 100;
    box-shadow:
        0 10px 30px rgba(0,0,0,0.35);
}
.suggestion-item {
    padding: 12px 14px;
    cursor: pointer;
    transition: 0.2s;
    border-bottom:
        1px solid rgba(255,255,255,0.05);
}
.suggestion-item:hover {
    background:
        rgba(255,255,255,0.05);
}
.suggestion-name {
    color: #fff;
    font-weight: 600;
}
.suggestion-detail {
    margin-top: 4px;
    font-size: 12px;
    color: #9ca3af;
}
.invoice-content {
    padding: 24px;
    color: #fff;
}
.invoice-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}
.invoice-customer {
    margin-bottom: 24px;
}
.invoice-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 24px;
}
.invoice-table th,
.invoice-table td {
    padding: 14px;
    border-bottom:
        1px solid rgba(255,255,255,0.08);
}
.invoice-total {
    text-align: right;
    font-size: 24px;
    font-weight: 700;
    margin-top: 20px;
}
.invoice-footer {
    margin-top: 32px;
    text-align: center;
    color: #9ca3af;
}
.badge-offline {
    font-size: 9px;
    background: linear-gradient(135deg, #f59e0b, #ea580c);
    color: white;
    padding: 2px 8px;
    border-radius: 20px;
    margin-left: 8px;
    text-transform: uppercase;
    font-weight: 600;
}
@keyframes fadeOutDown {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(10px);
    }
}
.form-hint {
    font-size: 10px;
    color: var(--subtext);
    margin-top: 4px;
    display: block;
}
#div_harga_custom input {
    border-color: #f59e0b;
    background: rgba(245, 158, 11, 0.05);
}
#div_harga_custom input:focus {
    border-color: #f59e0b;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
}
#div_harga_custom {
    transition: all 0.3s ease;
    overflow: hidden;
}
.price-preview-box.offline-mode {
    border-color: #f59e0b;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(234, 88, 12, 0.05));
}

@keyframes draftCartPulse {
	0% {
		transform:
			scale(1);
		box-shadow:
			0 0 0 rgba(139,92,246,0);
	}
	30% {
		transform:
			scale(1.12);
		box-shadow:
			0 0 25px rgba(139,92,246,0.45);
	}
	60% {
		transform:
			scale(0.95);
	}
	100% {
		transform:
			scale(1);
		box-shadow:
			0 0 0 rgba(139,92,246,0);
	}
}
@keyframes badgeBounce {
	0% {
		transform:
			scale(1);
	}
	40% {
		transform:
			scale(1.35);
	}
	70% {
		transform:
			scale(0.9);
	}
	100% {
		transform:
			scale(1);
	}
}
.cart-pulse {
	animation:
		draftCartPulse .65s ease;
}
.badge-bounce {
	animation:
		badgeBounce .5s ease;
}
/* OPTIONAL PREMIUM LOOK */
.luxury-main-cart {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 10px 14px;
	border-radius: 16px;
	background:
		rgba(255,255,255,0.04);
	border:
		1px solid rgba(255,255,255,0.08);
	backdrop-filter:
		blur(10px);
	transition:
		all .25s ease;
}
.luxury-main-cart:hover {
	transform:
		translateY(-2px);
	background:
		rgba(255,255,255,0.06);
}

/* ========== HISTORY ========== */
.periode-info {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 20px;
}
.periode-dropdown {
    display: flex;
    align-items: center;
    gap: 12px;
    background:
        rgba(255,255,255,0.04);
    padding: 10px 14px;
    border-radius: 14px;
    border:
        1px solid rgba(255,255,255,0.08);
}
.historyPeriodeLabel {
    color: #9ca3af;
    font-size: 14px;
    font-weight: 600;
}
.select-sm {
    padding: 10px 16px;
    background: var(--btn-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    color: var(--text);
    font-size: 13px;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
}
.select-sm:focus {
    border-color: var(--accent);
    outline: none;
}
.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
}
.stat-item i {
    font-size: 24px;
    color: var(--accent);
}
.stat-label {
    font-size: 12px;
    color: var(--subtext);
    text-transform: uppercase;
    letter-spacing: 1px;
}
.stat-value {
    font-size: 28px;
    font-weight: 800;
}
.stat-value.text-success { color: #22c55e; }
.stat-value.text-primary { color: var(--accent); }
.stat-value.text-danger { color: #ef4444; }
.stat-value.text-gold { color: #d4af37; }
/* History Table Rows */
.history-row {
    transition: all 0.2s ease;
}
.history-row:hover {
    background: var(--premium-glass);
    transform: scale(1.01);
}
.time-cell {
    white-space: nowrap;
}
.time-main {
    font-weight: 600;
    color: var(--text);
    font-size: 13px;
}
.time-sub {
    font-size: 11px;
    color: var(--subtext);
    margin-top: 2px;
}
/* SKU Badge */
.sku-badge {
    font-family: monospace;
    background: var(--premium-glass);
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    color: var(--accent);
}
.product-name {
    font-weight: 500;
    color: var(--text);
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
/* Tipe Badge */
.tipe-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}
.tipe-masuk {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
}
.tipe-keluar {
    background: rgba(56, 189, 248, 0.15);
    color: #38bdf8;
}
.tipe-batal {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}
.history-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    color: white;
}
.badge-success {
    background: #10b981;
}
.badge-primary {
    background: #3b82f6;
}
.badge-danger {
    background: #ef4444;
}
/* Jumlah Badge */
.jumlah-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
}
/* Sumber Badge */
.sumber-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: var(--premium-glass);
    border-radius: 20px;
    font-size: 12px;
    color: var(--subtext);
}
/* Action Buttons */
.action-buttons-history {
    display: flex;
    gap: 8px;
    justify-content: center;
}
.btn-icon {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}
.btn-view {
    background: rgba(56, 189, 248, 0.15);
    color: #38bdf8;
}
.btn-view:hover {
    background: #38bdf8;
    color: white;
    transform: translateY(-2px);
}
.btn-cancel {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}
.btn-cancel:hover {
    background: #ef4444;
    color: white;
    transform: translateY(-2px);
}
/* Pagination */
.pagination {
    display: flex;
	align-items: center;
    gap: 8px;
    justify-content: center;
    margin-top: 20px;
	flex-wrap: wrap;
}
.pagination button {
    padding: 8px 14px;
    border: none;
    border-radius: 10px;
    background: #1f2937;
    color: white;
    cursor: pointer;
    transition: 0.2s ease;
}
.pagination button:hover {
    background: #374151;
}
.pagination button.active-page {
    background: #2563eb;
}
.pagination button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}
.pagination-btn {
    min-width: 38px;
    height: 38px;
    border: none;
    border-radius: 10px;
    background:
        rgba(255,255,255,0.06);
    color: #fff;
    cursor: pointer;
    transition: 0.2s;
}
.pagination-btn:hover {
    background:
        rgba(255,255,255,0.12);
}
.pagination-btn.active {
    background: #3b82f6;
}
.pagination-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}
/* Empty State */
.empty-history {
    text-align: center;
    padding: 60px 20px;
}
.empty-history i {
    font-size: 64px;
    color: var(--subtext);
    margin-bottom: 16px;
    opacity: 0.5;
}
.empty-history p {
    font-size: 16px;
    color: var(--text);
    margin-bottom: 8px;
}
.empty-history small {
    font-size: 12px;
    color: var(--subtext);
}
.trend-down {
    background:
        rgba(239,68,68,0.15);
    color: #ef4444;
}
.trend-stable {
    background:
        rgba(148,163,184,0.15);
    color: #94a3b8;
}
/* Modal Detail */
.modal-overlay {
    position: fixed;
    inset: 0;
    background:
        rgba(0,0,0,0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
}
.modal-overlay.active {
    display: flex !important;
}
.modal-content {
    background: #111827;
    border-radius: 20px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow:
        0 20px 60px rgba(0,0,0,0.45);
	pointer-events: auto;
}
.modal-lg {
    max-width: 900px;
}
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom:
        1px solid rgba(255,255,255,0.08);
}
.modal-close {
    border: none;
    background: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
}
.history-action-group {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}
.customer-detail-content {
    padding: 20px;
}
.customer-detail-grid {
    display: grid;
    grid-template-columns:
        repeat(auto-fit, minmax(220px,1fr));
    gap: 16px;
}
.customer-detail-card {
    background:
        rgba(255,255,255,0.04);
    border-radius: 16px;
    padding: 16px;
}
.detail-label {
    font-size: 12px;
    color: #9ca3af;
    margin-bottom: 8px;
}
.detail-value {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
}
.customer-history-wrapper {
    margin-top: 28px;
}
.customer-history-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
    border-bottom:
        1px solid rgba(255,255,255,0.05);
}
/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-grid-customer {
    display: grid;
	grid-template-columns: 2fr 3fr 1fr 1fr 1fr;
    gap: 18px 16px;
    flex: 1;
}

/* ========== CUSTOMER MODULE PREMIUM STYLES ========== */

/* Customer Stats Cards */
.customer-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}
.stat-card {
    background: linear-gradient(135deg, var(--card), var(--premium-glass));
    backdrop-filter: blur(10px);
    border-radius: 24px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    border: 1px solid var(--card-border);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}
.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--accent-secondary));
    opacity: 0;
    transition: opacity 0.3s;
}
.stat-card:hover::before {
    opacity: 1;
}
.stat-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
}
.stat-icon {
    width: 56px;
    height: 56px;
    background: var(--accent-glow);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: var(--accent);
}

.stat-info {
    flex: 1;
}
.stat-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--subtext);
    display: block;
    margin-bottom: 6px;
}
.stat-value {
    font-size: 24px;
    font-weight: 800;
    color: var(--text);
    background: linear-gradient(135deg, var(--text), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
/* Form Customer Card */
.form-customer-card {
    margin-bottom: 24px;
}
.form-customer-card .card-title {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.form-badge {
    background: linear-gradient(135deg, var(--accent), var(--accent-secondary));
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    color: #0f172a;
    margin-left: auto;
}
.form-grid-customer {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}
.form-actions-customer {
    display: flex;
    justify-content: flex-end;
    gap: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--card-border);
}
/* Customer Table */
.customer-table .customer-row {
    transition: all 0.2s ease;
}
.customer-table .customer-row:hover {
    background: var(--premium-glass);
    transform: scale(1.01);
}
.customer-info {
    display: flex;
    align-items: center;
    gap: 12px;
}
.customer-avatar .avatar-circle {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--accent), var(--accent-secondary));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    color: #0f172a;
}
.customer-details {
    flex: 1;
}
.customer-name {
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
}
.customer-level {
    font-size: 10px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 20px;
}
.level-platinum {
    background: linear-gradient(135deg, #d4af37, #f5e6c8);
    color: #0f172a;
}
.level-gold {
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
    color: #0f172a;
}
.level-silver {
    background: linear-gradient(135deg, #94a3b8, #cbd5e1);
    color: #0f172a;
}
.level-bronze {
    background: linear-gradient(135deg, #b45309, #d97706);
    color: white;
}
.level-regular {
    background: var(--btn-bg);
    color: var(--subtext);
}
/* Address and Phone Info */
.address-info, .phone-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text);
}
.address-info i, .phone-info i {
    width: 20px;
    color: var(--accent);
    font-size: 12px;
}
/* Order and Amount Badges */
.order-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--premium-glass);
    border-radius: 20px;
    font-weight: 600;
    font-size: 13px;
}
.amount-badge {
    display: inline-block;
    padding: 6px 12px;
    background: linear-gradient(135deg, var(--accent-glow), transparent);
    border-radius: 20px;
    font-weight: 700;
    color: var(--accent);
}
/* No Badge */
.no-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: var(--premium-glass);
    border-radius: 10px;
    font-weight: 700;
    color: var(--accent);
}
/* Action Buttons Customer */
.action-buttons-customer {
    display: flex;
    gap: 8px;
    justify-content: center;
}
.btn-edit {
    background: rgba(56, 189, 248, 0.15);
    color: #38bdf8;
}
.btn-edit:hover {
    background: #38bdf8;
    color: white;
    transform: translateY(-2px);
}
.btn-delete {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}
.btn-delete:hover {
    background: #ef4444;
    color: white;
    transform: translateY(-2px);
}
.btn-history {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}
.btn-history:hover {
    background: #f59e0b;
    color: white;
    transform: translateY(-2px);
}
/* Count Badge */
.count-badge {
    background: var(--premium-glass);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: var(--accent);
}
/* Card Actions Right */
.card-actions-right {
    margin-left: auto;
}
/* Modal Large */
.modal-container.modal-large {
    max-width: 800px;
    width: 90%;
}
/* Customer Profile Modal */
.customer-profile {
    margin-bottom: 24px;
    padding: 20px;
    background: var(--premium-glass);
    border-radius: 20px;
}
.profile-header {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}
.profile-header .avatar-circle {
    width: 70px;
    height: 70px;
    font-size: 28px;
    border-radius: 20px;
}
.profile-info {
    flex: 1;
}
.profile-info h4 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
}
.profile-info p {
    font-size: 13px;
    color: var(--subtext);
    margin: 4px 0;
}
.profile-stats {
    display: flex;
    gap: 24px;
}
.profile-stats .stat {
    text-align: center;
}
.profile-stats .stat span {
    font-size: 11px;
    color: var(--subtext);
    display: block;
}
.profile-stats .stat strong {
    font-size: 18px;
    color: var(--accent);
}
/* Mini Table for History */
.mini-table {
    width: 100%;
    border-collapse: collapse;
}
.mini-table th {
    background: var(--btn-bg);
    padding: 12px;
    font-size: 12px;
    font-weight: 600;
    color: var(--accent);
    border-bottom: 1px solid var(--card-border);
}
.mini-table td {
    padding: 10px 12px;
    font-size: 13px;
    color: var(--text);
    border-bottom: 1px solid var(--card-border);
}
.mini-table tr:hover {
    background: var(--premium-glass);
}
.empty-history-customer {
    text-align: center;
    padding: 40px;
}
.empty-history-customer i {
    font-size: 48px;
    color: var(--subtext);
    opacity: 0.5;
    margin-bottom: 12px;
}
/* Form editing animation */
.form-customer-master.editing {
    animation: highlightPulse 0.5s ease;
}
@keyframes highlightPulse {
    0%, 100% { border-color: transparent; }
    50% { border-color: var(--accent); box-shadow: 0 0 20px var(--accent-glow); }
}

/* ========== MASTER ========== */
.form-grid-master {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 18px 16px;
    flex: 1;
}
.action-group {
    grid-column: span 2; 
    display: flex;
    gap: 16px;
    align-items: flex-end; /* Sejajar bawah dengan input lainnya */
    width: 100%;
}
.action-group button {
    flex: 1;
    height: 40px; /* Samakan dengan tinggi input box Anda */
    width: 100%;
    box-sizing: border-box;
}
.stock-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 70px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    color: white;
}
.stock-danger {
    background: #ef4444;
}
.stock-warning {
    background: #f59e0b;
}
.stock-safe {
    background: #10b981;
}
.stock-many {
    background: #06b6d4;
}