:root {
	--font-main: 'Inter', sans-serif;
	
	/* ==========================================================================
	   1. CORE APP LAYOUT COLORS (LIGHT MODE DEFAULT)
	   ========================================================================== */
	--bg-app: #f1f5f9;
	--bg-card: #ffffff;
	--text-main: #0f172a;
	--text-muted: #64748b;
	--border-color: #e2e8f0;

	/* ==========================================================================
	   2. SEMANTIC & STANDARD COLORS
	   ========================================================================== */
	/* Blue Tema */
	--blue: #3b82f6;
	--blue-light: rgba(59, 130, 246, 0.12);
	--indigo: #6366f1;
	--indigo-light: rgba(99, 102, 241, 0.12);
	
	/* Emerald (Ijo) Tema */
	--emerald: #10b981;
	--emerald-light: rgba(16, 185, 129, 0.12);
	--emerald-deep: #0B8457;
	--emerald-deep-light: rgba(11, 132, 87, 0.12);

	/* Purple (Ungu) Tema */
	--purple: #9333ea;
	--purple-light: rgba(147, 51, 234, 0.12);

	/* Status Warning & Danger Tema */
	--amber: #f59e0b;
	--amber-light: rgba(245, 158, 11, 0.12);
	--rose: #f43f5e;
	--rose-light: rgba(244, 63, 94, 0.12);
	
	/* Aura */
	--aura-emerald: rgba(11, 132, 87, 0.4);
	--aura-blue: rgba(59, 130, 246, 0.4);
	--aura-purple: rgba(147, 51, 234, 0.4);
	--aura-amber: rgba(245, 158, 11, 0.4);
	--aura-rose: rgba(244, 63, 94, 0.4);

	/* ==========================================================================
	   3. PREMIUM FINTECH & NEOBANK EXTENSION (SOLID & LIGHT)
	   ========================================================================== */
	/* Blue & Purple Premium Varian */
	--blue-royal: #1E40AF;
	--blue-royal-light: rgba(30, 64, 175, 0.12);
	--blue-cyber: #06B6D4;
	--blue-cyber-light: rgba(6, 182, 212, 0.12);
	--electric-cobalt: #2563EB;
	--electric-cobalt-light: rgba(37, 99, 235, 0.12);
	--purple-deep: #6D28D9;
	--purple-deep-light: rgba(109, 40, 217, 0.12);
	--lavender-tech: #8B5CF6;
	--lavender-tech-light: rgba(139, 92, 246, 0.12);
	--neon-violet: #7C3AED;
	--neon-violet-light: rgba(124, 58, 237, 0.12);

	/* Emerald Premium Varian */
	--emerald-teal: #0EA87E;
	--emerald-mint: #129A7D;
	--fintech-jade: #059669;
	--fintech-jade-light: rgba(5, 150, 105, 0.1);

	/* Luxury Sultan & Tech Minimalist Varian */
	--gold-luxury: #C5A880;
	--gold-luxury-light: rgba(197, 168, 128, 0.15);
	--luxury-slate: #334155;
	--luxury-slate-light: rgba(51, 65, 85, 0.08);
	--luxury-graphite: #1E293B;
	--luxury-graphite-light: rgba(30, 41, 59, 0.06);
	--fintech-crimson: #E11D48;
	--fintech-crimson-light: rgba(225, 29, 72, 0.1);

	/* ==========================================================================
	   4. GRADIENT PREMIUM COLLECTION
	   ========================================================================== */
	/* Standard Solid Gradient */
	--rose-gradient: linear-gradient(135deg, #f43f5e, #fda4af);
	--emerald-gradient: linear-gradient(135deg, #0B8457, #34D399);
	--blue-gradient: linear-gradient(135deg, #1E40AF, #3B82f6);
	--purple-gradient: linear-gradient(135deg, #6D28D9, #A78BFA);
	--amber-gradient: linear-gradient(135deg, #f59e0b, #fcd34d);	
	
	/* Luxury & Tech Ultimate Gradient */
	--sunset-gradient: linear-gradient(135deg, #FF5A5F, #FF8A00);
	--gold-gradient: linear-gradient(135deg, #BF953F, #FCF6BA, #B38728, #FBF5B7);
	--dark-premium-gradient: linear-gradient(135deg, #1E293B, #0F172A);
	--aurora-gradient: linear-gradient(135deg, #4F46E5, #06B6D4, #10B981);
	--cyber-pink-gradient: linear-gradient(135deg, #7C3AED, #ED4264);
	--ocean-deep-gradient: linear-gradient(135deg, #0284C7, #014F86);
	--platinum-gradient: linear-gradient(135deg, #E2E8F0, #F8FAFC, #CBD5E1);
	
	/* ==========================================================================
	   5. SHADOWS & RADIUS
	   ========================================================================== */
	--shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
	--shadow-md: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -1px rgba(0,0,0,0.03);
	--shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
	--radius-lg: 24px;
	--radius-md: 16px;
	--radius-sm: 12px;
}

/* ==========================================================================
   6. DARK MODE OVERRIDES (Menimpa Variabel, Layout Tetap Sama)
   ========================================================================== */
html.dark {
	--bg-app: #0f172a;
	--bg-card: #1e293b;
	--text-main: #f8fafc;
	--text-muted: #94a3b8;
	--border-color: #334155;
	
	/* Standard Light Sync */
	--blue-light: rgba(59, 130, 246, 0.2);
	--emerald-light: rgba(16, 185, 129, 0.2);
	--emerald-deep-light: rgba(52, 211, 153, 0.15);
	--emerald-deep-dark-text: #34d399;
	--amber-light: rgba(245, 158, 11, 0.2);
	--rose-light: rgba(244, 63, 94, 0.2);
	--indigo-light: rgba(99, 102, 241, 0.2);
	--purple-light: rgba(147, 51, 234, 0.12);
	
	/* Extension Premium Light Sync */
	--blue-royal-light: rgba(59, 130, 246, 0.25);
	--blue-cyber-light: rgba(6, 182, 212, 0.25);
	--purple-deep-light: rgba(139, 92, 246, 0.25);
	--lavender-tech-light: rgba(167, 139, 250, 0.25);
	--gold-luxury-light: rgba(197, 168, 128, 0.25);
	
	/* Extension Varian Baru Light Sync */
	--luxury-slate-light: rgba(255, 255, 255, 0.1);
	--luxury-graphite-light: rgba(255, 255, 255, 0.12);
	--fintech-crimson-light: rgba(225, 29, 72, 0.25);
	--fintech-jade-light: rgba(5, 150, 105, 0.25);
	--electric-cobalt-light: rgba(37, 99, 235, 0.25);
	--neon-violet-light: rgba(124, 58, 237, 0.25);
	
	/* Dark Mode Shadows */
	--shadow-md: 0 4px 6px -1px rgba(0,0,0,0.2);
	--shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
}

html.dark .text-emerald-deep { color: var(--emerald-deep-dark-text) !important; }

/* ==========================================================================
   7. BASE & RESET + NATIVE RIGID LOCK
   ========================================================================== */
html {
	overflow: hidden;
	height: 100%;
	overscroll-behavior: none;
}

* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
	-webkit-tap-highlight-color: transparent;
}

/* ✅ Proteksi Font-Family Font Awesome dari resiko crash/tertimpa */
i[class^="fa-"], i[class*=" fa-"] {
	font-family: 'Font Awesome 6 Free' !important;
	font-weight: 900;
}

.icon-box-bg i, 
.icon-circle-bg i,
.card-item i {
    font-style: normal !important;
}

body {
	font-family: var(--font-main);
	background-color: var(--bg-app); /* ✅ Perbaikan: Diubah ke variabel dinamis agar sinkron di light mode */
	color: var(--text-main);
	display: flex;
	justify-content: center;
	min-height: 100vh;
	height: 100%;
	width: 100%;
	overflow: hidden; 
	position: fixed; 
	overscroll-behavior: none; 
	-webkit-overflow-scrolling: none;
}

/* ==========================================================================
   8. HELPER & UTILITY CLASSES
   ========================================================================== */
.font-bold { font-weight: 700; }
.border-x { border-left: 1px solid var(--border-color); border-right: 1px solid var(--border-color); }
.text-center { text-align: center; }
.text-right { text-align: right; }
.mr-4 { margin-right: 8px; }
.mr-5 { margin-right: 10px; }
.hidden { display: none !important; }

/* Width Utilities */
.w-15 { width: 15%; }
.w-40 { width: 40%; }
.w-72-5 { width: 72.5%; }

/* A. TEXT COLOR UTILITIES */
.text-blue { color: var(--blue) !important; }
.text-indigo { color: var(--indigo) !important; }
.text-emerald { color: var(--emerald) !important; }
.text-emerald-deep { color: var(--emerald-deep) !important; }
.text-purple { color: var(--purple) !important; }
.text-amber { color: var(--amber) !important; }
.text-rose { color: var(--rose) !important; }
.text-blue-royal { color: var(--blue-royal) !important; }
.text-blue-cyber { color: var(--blue-cyber) !important; }
.text-electric-cobalt { color: var(--electric-cobalt) !important; }
.text-purple-deep { color: var(--purple-deep) !important; }
.text-lavender-tech { color: var(--lavender-tech) !important; }
.text-neon-violet { color: var(--neon-violet) !important; }
.text-emerald-teal { color: var(--emerald-teal) !important; }
.text-emerald-mint { color: var(--emerald-mint) !important; }
.text-fintech-jade { color: var(--fintech-jade) !important; }
.text-fintech-crimson { color: var(--fintech-crimson) !important; }
.text-gold-luxury { color: var(--gold-luxury) !important; }
.text-luxury-slate { color: var(--luxury-slate) !important; }
.text-luxury-graphite { color: var(--luxury-graphite) !important; }

.text-sunset {
    background: var(--sunset-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text; /* Fallback standar */
}

.text-gold {
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text; /* Fallback standar */
}

/* B. SOFT BACKGROUND COLOR UTILITIES */
.bg-light-blue { background-color: var(--blue-light); }
.bg-light-indigo { background-color: var(--indigo-light); }
.bg-light-emerald { background-color: var(--emerald-light); }
.bg-light-emerald-deep { background-color: var(--emerald-deep-light) !important; }
.bg-light-purple { background-color: var(--purple-light); }
.bg-light-amber { background-color: var(--amber-light); }
.bg-light-rose { background-color: var(--rose-light); }
.bg-light-blue-royal { background-color: var(--blue-royal-light); }
.bg-light-blue-cyber { background-color: var(--blue-cyber-light); }
.bg-light-electric-cobalt { background-color: var(--electric-cobalt-light); }
.bg-light-purple-deep { background-color: var(--purple-deep-light); }
.bg-light-lavender-tech { background-color: var(--lavender-tech-light); }
.bg-light-neon-violet { background-color: var(--neon-violet-light); }
.bg-light-fintech-jade { background-color: var(--fintech-jade-light); }
.bg-light-fintech-crimson { background-color: var(--fintech-crimson-light); }
.bg-light-gold-luxury { background-color: var(--gold-luxury-light); }
.bg-light-luxury-slate { background-color: var(--luxury-slate-light); }
.bg-light-luxury-graphite { background-color: var(--luxury-graphite-light); }

/* C. BACKGROUND GRADIENT UTILITIES */
.bg-blue-gradient { background: var(--blue-gradient); }
.bg-emerald-gradient { background: var(--emerald-gradient); }
.bg-purple-gradient { background: var(--purple-gradient); }
.bg-amber-gradient   { background: var(--amber-gradient); }
.bg-rose-gradient { background: var(--rose-gradient); }
.bg-sunset-gradient { background: var(--sunset-gradient); }
.bg-gold-gradient { background: var(--gold-gradient); }
.bg-dark-premium-gradient { background: var(--dark-premium-gradient); }
.bg-aurora-gradient { background: var(--aurora-gradient); }
.bg-cyber-pink-gradient { background: var(--cyber-pink-gradient); }
.bg-ocean-deep-gradient { background: var(--ocean-deep-gradient); }
.bg-platinum-gradient { background: var(--platinum-gradient); }

/* ==========================================================================
   9. APP SHELL LAYOUT & MAIN CONTENT
   ========================================================================== */
#app-container {
	width: 100%;
	max-width: 425px;
	height: calc(var(--vh, 1vh) * 100); 		
	background-color: var(--bg-app);
	color: var(--text-main);
	position: relative;
	overflow: hidden; 
	display: flex;
	flex-direction: column;
	box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
	overscroll-behavior: none; 
}

#main-content {
	flex: 1;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	height: 100%;
	position: relative;
	transition: opacity 0.4s ease, transform 0.4s ease;
}

.scroll-container {
	flex: 1;
	overflow-y: auto; 
	overflow-x: hidden;
	scroll-behavior: smooth; 	
	-webkit-overflow-scrolling: touch; 
	overscroll-behavior-y: contain; 
	position: relative;
	padding: 76px 20px calc(98px + env(safe-area-inset-bottom)) 20px;
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.scroll-container::-webkit-scrollbar {
	display: none;
	width: 0px;
}

.feature-buttons-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 6px;
	width: 100%;
	margin-top:2px;
}

/* ==========================================================================
   10. HEADER SECTION
   ========================================================================== */
.main-header {
	position: fixed;
	top: 0 !important;
	margin-top: 0 !important;
	left: 50%;
	transform: translateX(-50%);	
	width: 100%;
	max-width: 425px;
	height: 70px;
	padding: 16px 20px;
	background-color: var(--bg-app); 
	display: flex;
	justify-content: space-between;
	align-items: center;
	z-index: 10001 !important; 
	border: none !important;
}

.main-header.scrolled {
	box-shadow: 0 4px 18px rgba(15, 23, 42, 0.08), 0 2px 6px rgba(15, 23, 42, 0.04);
	border-bottom: none !important; 
	background-color: var(--bg-card);
}

html.dark .main-header.scrolled {
	box-shadow: 0 4px 22px rgba(0, 0, 0, 0.5), 0 2px 8px rgba(0, 0, 0, 0.4) !important;
	border-bottom: none !important;
	background-color: var(--bg-app);
}

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

.avatar-wrapper {
	width: 46px;
	height: 46px;
	border-radius: 50%;
	overflow: hidden;
	border: 2px solid var(--emerald);
	cursor: pointer;
}
.avatar-wrapper:active {
	transform: scale(0.95);
}
.avatar-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.user-info h3 {
	font-size: 10px;
	font-weight: 500;
	color: var(--text-muted);
	margin-bottom: 1px;
}
.user-info h2 {
	font-size: 13px;
	font-weight: 700;
	color: var(--text-main);
}
.current-date {
	font-size: 10px;
	color: var(--text-muted);
	margin-top: 1px;
}		

/* Theme Toggle */
#theme-toggle {
	width: 71px;
	height: 34px;
	background-color: var(--border-color);
	border-radius: 9999px;
	position: relative;
	cursor: pointer;
	overflow: hidden;
	transition: background-color 0.3s ease;
	box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
	margin-top: 7px;
}

#toggle-bg {
	width: 28px;
	height: 28px;
	background-color: var(--emerald-deep);
	border-radius: 50%;
	position: absolute;
	left: 3px;
	top: 3px;
	transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.3s ease; 
	z-index: 1; 
	box-shadow: 0 3px 8px rgba(11, 132, 87, 0.3);
}

.toggle-icons-grid {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 2; 
	display: flex;
	pointer-events: none; 
}

.icon-slot {
	width: 50%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 14px;
	transition: color 0.25s ease, transform 0.25s ease;
}

.slot-left { 
	padding-right: 2px; 
	color: #ffffff; 
}
.slot-right { 
	padding-left: 2px; 
	color: var(--text-muted); 
}

html.dark #theme-toggle {
	background-color: #0f172a;
	border: 1px solid var(--border-color);
}
html.dark #toggle-bg {
	background-color: var(--purple-deep);
	left: 3px;
	top: 2px;
}
html.dark .slot-left { color: var(--text-muted); }
html.dark .slot-right { color: #ffffff; }

/* ==========================================================================
   11. CARD SALDO
   ========================================================================== */
.card-saldo {
	background-color: var(--bg-card);
	border-radius: var(--radius-lg);
	padding: 20px;
	box-shadow: var(--shadow-md);
	border: 1px solid var(--border-color);
	flex-shrink: 0;
}
.card-saldo.skeleton-effect {
	
}
.card-label {
	font-size: 10px;
	color: var(--text-muted);
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}
.card-balance {
	font-size: 25px;
	font-weight: 700;
	margin: 4px 0 15px 0;
	letter-spacing: -0.5px;
}
.card-footer-grid {
	display: grid;
	grid-template-columns: 1fr 1fr 1fr;
	gap: 4px;
	padding-top: 15px;
	border-top: 1px dashed var(--border-color);
}
.footer-col p:first-child {
	font-size: 9px;
	color: var(--text-muted);
	margin-bottom: 2px;
}
.footer-col p:last-child {
	font-size: 11px;
}

/* ==========================================================================
   12. FEATURE BUTTON (WIDGET SWITCHER)
   ========================================================================== */
.circle-btn-wrapper {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	cursor: pointer;
	flex: 1;			
}
.circle-icon {
	width: 54px;
	height: 54px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 18px;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.circle-btn-wrapper span {
	font-size: 11px;
	font-weight: 500;
	color: var(--text-muted);
}

/* Focused States Aura Pulsa */
.circle-btn-wrapper.active.focused-health .circle-icon { 
	border: 2px solid var(--emerald-deep); 
	--aura-pulse-color: var(--aura-emerald);
	animation: circle-pulse-only 2s infinite ease-in-out;
}
.circle-btn-wrapper.active.focused-health span { color: var(--emerald-deep);}
html.dark .circle-btn-wrapper.active.focused-health span { 
	color: var(--emerald-deep-dark-text); 
}

.circle-btn-wrapper.active.focused-pocket .circle-icon { 	
	border: 2px solid var(--blue); 
	--aura-pulse-color: var(--aura-blue);
	animation: circle-pulse-only 2s infinite ease-in-out;
}
.circle-btn-wrapper.active.focused-pocket span { color: var(--blue); font-weight:600; }

.circle-btn-wrapper.active.focused-goals .circle-icon {
	border: 2px solid var(--purple); 
	--aura-pulse-color: var(--aura-purple);
	animation: circle-pulse-only 2s infinite ease-in-out;
}
.circle-btn-wrapper.active.focused-goals span { color: var(--purple); font-weight:600; }

.circle-btn-wrapper.active.focused-gold .circle-icon {
	border: 2px solid var(--amber); 
	--aura-pulse-color: var(--aura-amber);
	animation: circle-pulse-only 2s infinite ease-in-out;
}
.circle-btn-wrapper.active.focused-gold span { color: var(--amber); font-weight:600; }

.circle-btn-wrapper.active.focused-paylater .circle-icon { 
	border: 2px solid var(--rose); 
	--aura-pulse-color: var(--aura-rose);
	animation: circle-pulse-only 2s infinite ease-in-out;
}
.circle-btn-wrapper.active.focused-paylater span { color: var(--rose); font-weight:600; }

@keyframes circle-pulse-only {
	0% { box-shadow: 0 0 0 0 var(--aura-pulse-color); }
	70% { box-shadow: 0 0 0 10px rgba(0, 0, 0, 0); }
	100% { box-shadow: 0 0 0 0 rgba(0, 0, 0, 0); }
}

/* ==========================================================================
   13. FEATURE - WIDGET DISPLAY
   ========================================================================== */
.widget-display-box {
	background-color: var(--bg-card);
	border-radius: var(--radius-md);
	padding: 15px 16px 16px 16px;
	box-shadow: var(--shadow-sm);
	border: 1px solid var(--border-color);
	box-sizing: border-box; 
	overflow: visible; 
}

/* Trik Utama: Jika di dalam box ada #widget-health, 
   hilangkan style box utama agar tidak double border/background */
.widget-display-box:has(#widget-health) {
	background-color: transparent !important;
	border: none !important;
	box-shadow: none !important;
	padding: 0 !important;
}

.widget-pane {
	animation: fadeInWidget 0.25s ease-in-out;
	height: auto;
	overflow: visible;
}

@keyframes fadeInWidget { 
	from { opacity: 0; transform: translateY(3px); } 
	to { opacity: 1; transform: translateY(0); } 
}

.widget-pane-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 16px;
}
.widget-pane-header h5 {
	font-size: 13px;
	font-weight: 600;
	margin: 0;
}
.badge-status {
	font-size: 10px;
	padding: 4px 8px;
	border-radius: 999px;
	font-weight: 600;
}
.widget-action-btn-box {
	width: 24px;
	height: 24px;
	border-radius: 6px;
	background-color: var(--bg-app);
	border: 1px solid var(--border-color);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 12px;
	cursor: pointer;
}    
.widget-action-btn-box:active { transform: scale(0.9); }
.widget-pane-desc {
	font-size: 11px;
	color: var(--text-muted);
	margin-bottom: 12px;
	line-height: 1.5;
}

/* Pocket Grid View */
.pocket-list-grid {
	display: grid;
	gap: 12px;
	width: 100%;
	box-sizing: border-box;
	margin-bottom: 4px; 
}
.pocket-grid-2-2 { grid-template-columns: 1fr 1fr; }
.pocket-grid-full { grid-template-columns: 1fr; }

.pocket-mini-item {
	background-color: var(--bg-app);
	border: 1px solid var(--border-color);
	padding: 15px 12px;
	border-radius: var(--radius-sm);
	display: flex;
	flex-direction: column;
	gap: 2px;
	box-sizing: border-box;
}
.pocket-mini-item.pocket { padding: 10px 12px; }
.pocket-title { font-size: 10px; color: var(--text-muted); }
.pocket-val { font-size: 13px; color: var(--text-main); margin-top: 3px; }

/* Progress Bars Components */
.progress-bar-container {
	width: 100%;
	height: 9px;
	background-color: var(--border-color);
	border-radius: 999px;
	overflow: hidden;
	margin: 12px 0 6px 0;
}
.progress-bar-fill { height: 100%; border-radius: 999px; }
.progress-bar-labels {
	display: flex;
	justify-content: space-between;
	font-size: 10px;
	color: var(--text-muted);
	width: 100%;
	box-sizing: border-box;
}

.health-progress-container { height: 9px; margin: 14px 0 8px 0; }
.health-progress-fill { width: 5.6%; } 
.health-progress-labels { font-size: 10px; font-weight: 500; margin-top: 12px; line-height:15px;}

.goal-box-item { 
	background-color: var(--bg-app); 
	border: 1px solid var(--border-color);
	padding: 14px 12px; 
	border-radius: var(--radius-sm);
	display: flex;
	flex-direction: column;
	box-sizing: border-box;
	width: 100%;
}
.goal-meta-top { display: flex; justify-content: space-between; align-items: center; font-size: 11.5px; }

#widget-gold .progress-bar-labels {
	border-top: 1px solid var(--border-color);
	margin-top: 15px;
	padding-top: 13px;
	font-size: 11px;
	color: var(--text-muted);
	display: flex;
	justify-content: space-between;
	align-items: center;
	width: 100%;
	box-sizing: border-box;
}

/* STYLING KHAS WIDGET HEALTH (Pecah Kotak) */
#widget-health {
	display: flex;
	flex-direction: column;
	gap: 16px; /* Jarak renggang antar kotak luar */
}

.data-card {
	background-color: var(--bg-card);
	border-radius: var(--radius-md);
	padding: 15px 16px 16px 16px;
	box-shadow: var(--shadow-sm);
	border: 1px solid var(--border-color);
	box-sizing: border-box;
}

/* ==========================================================================
   14. HABIT STREAK DISIPLIN TRACKER
   ========================================================================== */
.habit-streak-section {
	background-color: var(--bg-card);
	border-radius: var(--radius-md);
	padding: 16px;
	box-shadow: var(--shadow-sm);
	border: 1px solid var(--border-color);
}
.habit-header-flex {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 14px;
}
.section-title { font-size: 11px; font-weight: 600; text-transform: uppercase; margin-top: 2px; }
.streak-count-badge {
	font-size: 12px;
	background-color: var(--rose-light);
	color: var(--rose);
	padding: 4px 10px;
	border-radius: 999px;
	font-weight: 600;
}
.streak-days-row { display: flex; justify-content: space-between; gap: 4px; margin-bottom: 14px; }
.day-bubble { display: flex; flex-direction: column; align-items: center; gap: 6px; flex: 1; }
.day-name { font-size: 10px; color: var(--text-muted); }
.day-bubble .bubble-icon {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background-color: var(--bg-app);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 11px;
	color: var(--text-muted);
}
.day-bubble.done .bubble-icon { background-color: var(--emerald); color: #ffffff; }
.day-bubble.current .bubble-icon { border: 2px solid var(--rose); color: var(--rose); background-color: transparent; }

.btn-safe-habit-check {
	width: 100%;
	padding: 12px;
	background-color: var(--text-main);
	color: var(--bg-card);
	border: none;
	border-radius: var(--radius-sm);
	font-family: var(--font-main);
	font-size: 12px;
	font-weight: 600;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	cursor: pointer;
}
.btn-safe-habit-check:active { transform: scale(0.98); }
.btn-safe-habit-check.habit-completed {
	background-color: var(--emerald-light) !important;
	color: var(--emerald) !important;
	cursor: default;
	pointer-events: none;
}

/* ==========================================================================
   15. FILTER PERIODE SECTION & POPOVER DIALOG
   ========================================================================== */
.filter-periode-section { display: flex; flex-direction: column; gap: 12px; }
.section-header-flex { display: flex; justify-content: space-between; align-items: center; position: relative; }

#popover-trigger {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	background-color: var(--bg-card);
	padding: 10px 15px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 600;
	cursor: pointer;
	border: 1px solid var(--border-color);
	line-height: 1;
}
#popover-trigger .icon-cal { 
	color: var(--text-main); display: inline-flex; align-items: center; line-height: 1; position: relative; top: -1px; margin-right: 1px;
}
#popover-trigger .icon-arrow { font-size: 9px; color: var(--text-muted); }

#popover-menu {
	position: absolute;
	top: 36px;
	right: 0;
	width: 240px;
	background-color: var(--bg-card);
	border-radius: var(--radius-md);
	box-shadow: var(--shadow-lg);
	border: 1px solid var(--border-color);
	z-index: 100;
	padding: 12px;
}
.popover-year-nav { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; padding: 0 4px; }
#popover-year-text { font-size: 13px; font-weight: 700; color: var(--text-main); }
.popover-year-nav i { font-size: 10px; color: var(--text-muted); cursor: pointer; padding: 4px 8px; border-radius: 4px; }
.popover-year-nav i:hover { background-color: var(--bg-app); color: var(--text-main); }

#months-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.month-btn { padding: 8px 0; font-size: 11px; text-align: center; border-radius: 8px; cursor: pointer; color: var(--text-main); font-weight: 500; }
.month-btn:hover:not(.disabled) { background-color: var(--bg-app); }
.month-btn.active { background-color: var(--text-main) !important; color: var(--bg-card) !important; font-weight: 600; }
.month-btn.disabled { color: var(--text-muted) !important; cursor: not-allowed; opacity: 0.4; }

.popover-footer { display: flex; justify-content: space-between; margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--border-color); font-size: 10px; font-weight: 600; }
#clear-popover { color: var(--text-muted); cursor: pointer; }
#this-month-popover { color: var(--text-main); cursor: pointer; }

.summary-boxes-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.summary-box { background-color: var(--bg-card); padding: 18px 15px; border-radius: var(--radius-sm); box-shadow: var(--shadow-sm); border: 1px solid var(--border-color); }
.summary-box p:first-child { font-size: 10px; color: var(--text-muted); margin-bottom: 5px; }
.summary-box p:last-child { font-size: 15px; font-weight: 700; }

/* ==========================================================================
   16. DATA LIST VIEW (TRANSAKSI & TAGIHAN / HUTANG)
   ========================================================================== */
.list-section { display: flex; flex-direction: column; gap: 12px; }
.btn-pdf-flat {
	display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; color: var(--text-muted); cursor: pointer; padding: 10px 15px; border: 1px solid var(--border-color); border-radius: 999px; background-color: transparent;
}
.btn-pdf-flat i { color: var(--rose); font-size: 13px; display: inline-flex; align-items: center; line-height: 1; }
.btn-pdf-flat:hover { background-color: var(--border-color); color: var(--text-main); border-color: var(--text-muted); }

.debt-filter-container { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 8px; }
.debt-filter-container::-webkit-scrollbar { display: none; }
.debt-filter-chip { padding: 10px 15px; background-color: var(--bg-card); border: 1px solid var(--border-color); font-size: 12px; border-radius: 999px; white-space: nowrap; cursor: pointer; color: var(--text-muted); }
.debt-filter-chip.active { background-color: var(--text-main); color: var(--bg-card); border-color: var(--text-main); font-weight: 500; }

.items-stack { display: flex; flex-direction: column; gap: 8px; }
.card-item { background-color: var(--bg-card); border-radius: var(--radius-sm); padding: 17px 13px; display: flex; justify-content: space-between; align-items: center; border: 1px solid var(--border-color); margin-bottom: 4px; }

.item-left-content { display: flex; align-items: center; gap: 12px; }
.icon-box-bg { width: 38px; height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 14px; }
.icon-circle-bg { width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 14px; }
.item-main-title { font-size: 12px; font-weight: 600; color: var(--text-main); margin-bottom: 3px; }
.item-sub-date { font-size: 10px; color: var(--text-muted); display: flex; align-items: center; gap: 4px; }
.tag-label { font-size: 9px; padding: 2px 6px; border-radius: 4px; font-weight: 600; display: inline-block; }
.item-right-content { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.item-amount { font-size: 12px; font-weight: 700; }
.item-time-stamp { font-size: 9px; color: var(--text-muted); }

.badge { font-size: 9px; padding: 3px 8px; border-radius: 999px; font-weight: 600; }
.badge-rose { background-color: var(--rose-light); color: var(--rose); }
.badge-amber { background-color: var(--amber-light); color: var(--amber); }
.badge-emerald { background-color: var(--emerald-light); color: var(--emerald); }

.border-rose-alert { border-left: 4px solid var(--rose) !important; border-color: var(--rose) !important; }
.border-amber-alert { border-left: 4px solid var(--amber) !important; border-color: var(--amber) !important; }
.border-purple-alert { border-left: 4px solid var(--purple) !important; border-color: var(--purple) !important; }
.border-blue-alert { border-left: 4px solid var(--blue) !important; border-color: var(--blue) !important; }
.border-emerald-alert { border-left: 4px solid var(--emerald) !important; border-color: var(--emerald) !important; }

.empty-state { text-align: center; padding: 20px 16px; background-color: var(--bg-card); border-radius: var(--radius-sm); border: 1px dashed var(--border-color); }
.empty-icon-circle { width: 44px; height: 44px; border-radius: 50%; background-color: var(--bg-app); color: var(--text-muted); display: flex; align-items: center; justify-content: center; margin: 0 auto 10px auto; font-size: 16px; }
.empty-title { font-size: 12px; font-weight: 600; color: var(--text-main); margin-bottom: 2px; }
.empty-desc { font-size: 10px; color: var(--text-muted); line-height: 1.4; }

.transaction-filter-container { 
    display: flex; 
    gap: 6px; 
    overflow-x: auto; 
    margin: 8px 0; 
    box-sizing: border-box; 
}
.transaction-filter-container::-webkit-scrollbar { display: none; }

.tx-filter-chip { 
    padding: 10px 15px;
    background-color: var(--bg-card); 
    border: 1px solid var(--border-color); 
    font-size: 12px; 
    border-radius: 999px; 
    white-space: nowrap; 
    cursor: pointer; 
    color: var(--text-muted); 
    font-weight: 500; 
    user-select: none; 
}
.tx-filter-chip.active { background-color: var(--text-main); color: var(--bg-card); border-color: var(--text-main); }

.run-fade-animation {
    animation: fadeInWidget 0.28s cubic-bezier(0.215, 0.610, 0.355, 1) both;
}

/* ==========================================================================
   17. PREMIUM STICKY BOTTOM APP NAVIGATION BAR (FIXED POSITION)
   ========================================================================== */
#app-nav {
	position: fixed; 
	bottom: 0;
	left: 50%;
	transform: translateX(-50%);		
	width: 100%;
	max-width: 425px; 
	height: 64px;
	background-color: var(--bg-card);
	border-top: 1px solid var(--border-color);
	display: flex;
	justify-content: space-between;
	align-items: center;		
	padding: 0;
	box-sizing: content-box; 
	z-index: 9999;
	box-shadow: 0 -4px 12px -2px rgba(0, 0, 0, 0.03), 0 -2px 4px -1px rgba(0, 0, 0, 0.02);
}

html.dark #app-nav {
	background-color: var(--bg-app); 
}

.nav-item {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 2px;
	flex: 1;
	height: 68px; 
	cursor: pointer;
	color: var(--text-muted);
	transition: color 0.2s ease;
	position: relative;
	overflow: visible;
}
.nav-item i { font-size: 22px; margin-bottom: 4px; position: relative; z-index: 6; }
.nav-item span { font-size: 10px; font-weight: 500; position: relative; z-index: 6; }
.nav-item.active { color: var(--emerald-deep); }
html.dark .nav-item.active {
    color: var(--emerald-deep-dark-text);
}

/* Top Active Line */
.nav-item.active::after {
	content: ''; 
	position: absolute; 
	top: 0; 
	width: 24px; 
	height: 3px; 
	background-color: var(--emerald-deep); 
	border-radius: 0 0 4px 4px; 
	animation: tab-line-fade 0.2s ease-out;
	z-index: 10; 
}

@keyframes tab-line-fade {
	from { opacity: 0; transform: scaleX(0); }
	to { opacity: 1; transform: scaleX(1); }
}

/* Tab Ripple Effect */
.nav-item::before {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	width: 60px; 
	height: 60px;
	background: rgba(16, 185, 129, 0.22); 
	border-radius: 50%;
	transform: translate(-50%, -50%) scale(0);
	opacity: 0;
	pointer-events: none; 
	z-index: 5; 
}

html.dark .nav-item::before {
	background: rgba(255, 255, 255, 0.15); 
}

.nav-item.run-ripple::before {
	animation: premiumRippleActive 0.45s cubic-bezier(0.1, 0.8, 0.3, 1) forwards;
}

@keyframes premiumRippleActive {
	0% { transform: translate(-50%, -50%) scale(0); opacity: 0.8; }
	50% { opacity: 0.4; }
	100% { transform: translate(-50%, -50%) scale(1.8); opacity: 0; }
}

/* Center Glass/Floating Button Custom */
.nav-center-action { 
	flex: 1; 
	display: flex; 
	justify-content: center; 
	position: relative; 
	height: 64px; 
}

.action-plus-btn {
	width: 55px; 
	height: 55px; 
	border-radius: 50%; 
	background-color: var(--emerald-deep) !important;
	color: #ffffff; 
	font-size: 22px; 
	display: flex; 
	align-items: center; 
	justify-content: center; 
	position: absolute; 
	top: -25px; 
	cursor: pointer; 
	box-shadow: 
		0 4px 14px rgba(11, 132, 87, 0.5),                      
		inset 0 0 0 3px var(--emerald-deep),                    
		inset 0 0 0 5px var(--bg-card),                         
		inset 0 0 0 7px var(--emerald-deep);                    
	transition: transform 0.1s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.1s ease; 
	animation: aura-glow-only 2.4s infinite ease-in-out; 
	z-index: 20; 
}

.action-plus-btn:active { 
	transform: scale(0.95);
	box-shadow: 
		0 2px 6px rgba(11, 132, 87, 0.6),
		inset 0 0 0 3px var(--emerald-deep), 
		inset 0 0 0 5px var(--bg-card),                        
		inset 0 0 0 7px var(--emerald-deep);
}

@keyframes aura-glow-only {
	0% { 
		box-shadow: 
			0 4px 14px rgba(11, 132, 87, 0.5),                  
			0 0 0 0 rgba(11, 132, 87, 0.4),                    
			inset 0 0 0 3px var(--emerald-deep), 
			inset 0 0 0 5px var(--bg-card), 
			inset 0 0 0 7px var(--emerald-deep);
	}
	50% { 
		box-shadow: 
			0 5px 20px rgba(11, 132, 87, 0.7),                  
			0 0 0 14px rgba(11, 132, 87, 0),                    
			inset 0 0 0 3px var(--emerald-deep), 
			inset 0 0 0 5px var(--bg-card),          
			inset 0 0 0 7px var(--emerald-deep);
	}
	100% { 
		box-shadow: 
			0 4px 14px rgba(11, 132, 87, 0.5), 
			0 0 0 0 rgba(11, 132, 87, 0), 
			inset 0 0 0 3px var(--emerald-deep), 
			inset 0 0 0 5px var(--bg-card), 
			inset 0 0 0 7px var(--emerald-deep);
	}
}

/* ==========================================================================
   18. SKELETON ANIMATION COMPONENTS
   ========================================================================== */
.skeleton-effect {
	background: #e2e8f0 !important;
	color: transparent !important;
	border-color: transparent !important;
	position: relative;
	overflow: hidden;
	pointer-events: none;
	z-index: 1 !important;
	white-space: nowrap !important;
	animation: skeleton-blink 1.5s infinite ease-in-out;
}

/* Sembunyikan semua konten anak saat skeleton aktif */
.skeleton-effect *, 
.skeleton-effect i, 
.skeleton-effect span {
	opacity: 0 !important;
	visibility: hidden !important;
	color: transparent !important;
}

/* Efek Shimmer (Garis cahaya jalan) */
.skeleton-effect::after {
	content: "";
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	left: -50%; 
	width: 200%;
	background: linear-gradient(90deg, var(--border-color) 25%, var(--bg-app) 50%, var(--border-color) 75%);
	background-size: 200% 100%;
	animation: shimmer 1s infinite linear;
	z-index: 2 !important;
}

/* DARK MODE OVERRIDES */
html.dark .skeleton-effect {
	background: #334155 !important;
}

html.dark .skeleton-effect::after {
	background: linear-gradient(90deg, rgba(255,255,255,0.03) 25%, rgba(255,255,255,0.06) 50%, rgba(255,255,255,0.03) 75%);
	background-size: 200% 100%;
}

/* ANIMATIONS */
@keyframes shimmer {
	0% { transform: translateX(-30%); }
	100% { transform: translateX(50%); }
}

@keyframes skeleton-blink {
	0%, 100% { opacity: 1; }
	50% { opacity: 0.65; }
}

/* UTILITIES */
.skeleton-effect.se-60 { width: 60px; }
.skeleton-effect.se-70 { width: 70px; }
.skeleton-effect.se-90 { width: 90px; }
.skeleton-effect.se-120 { width: 120px; }

.skeleton-effect.se-h-20 { height :20px; }

.skeleton-effect.se-br { border-radius: 999px !important; }

/* SPESIFIK UNTUK ICON LINGKARAN */
.circle-icon.skeleton-effect {
	border: transparent !important;
	animation: skeleton-blink 2s infinite ease-in-out !important;
	transform: none !important;
	box-shadow: none !important;
}

.circle-icon.skeleton-effect::before,
.circle-icon.skeleton-effect::after {
	display: none !important;
}


/* ==========================================================================
   19. CUSTOM PULL TO REFRESH COMPONENT (MELAYANG PREMIUM NATIVE)
   ========================================================================== */
.pull-to-refresh-box {
	width: 100%;
	display: flex;
	justify-content: center;
	align-items: center;
	overflow: visible;
	height: 0;
	opacity: 0;
	margin-bottom: 0;
	
	position: absolute;
	top: 75px; /* Sesuai revisi lo, aman dari tumpukan data lain */
	left: 0;
	z-index: 9999; 
	pointer-events: none;
	transition: height 0.25s ease, opacity 0.2s ease; 
}

.ptr-content {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background-color: var(--bg-card);
	color: var(--emerald);
	padding: 8px 16px; /* Sedikit dirapatkan biar makin compact & pas */
	border-radius: 999px; 
	font-size: 11px; /* Dikunci konsisten di 12px tidak membesar/mengecil */
	font-weight: 600;
	box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.12), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
	border: 1px solid var(--border-color);
	white-space: nowrap;
	
	/* PERUBAHAN: Buang transform: scale() biar ukuran font konstan dari awal ditarik */
	transition: color 0.2s ease, background-color 0.2s ease; 
}

/* Transisi keadaan siap lepas: Hanya ganti warna agar mata user nyaman */
.pull-to-refresh-box.ptr-ready .ptr-content {
	color: var(--blue); 
	background-color: var(--bg-card); /* Menjaga background stabil */
}

.ptr-icon {
	font-size: 11px; /* Ukuran ikon disamakan dengan teks biar seimbang */
	transition: transform 0.2s ease;
}

/* Modifiers State Berbasis Class */
.pull-to-refresh-box.ptr-ready .ptr-icon {
	transform: rotate(180deg); 
}
.pull-to-refresh-box.ptr-loading .ptr-icon {
	animation: ptr-spin 0.8s infinite linear;
}

@keyframes ptr-spin {
	from { transform: rotate(0deg); }
	to { transform: rotate(360deg); }
}
	
/* ==========================================================================
   20. CSS SLIDER TAB TRIV STYLE - ULTRA PERFORMANCE (GPU ACTIVE)
   ========================================================================== */
#tab-viewport {
	position: relative;
	flex: 1;
	width: 100%;
	height: 100%;
	overflow: hidden; 
}

.tab-slider-wrapper {
	display: flex;
	width: 400%; /* ✅ Jika menu app-nav ada 5, ganti ke 500% */
	height: 100%;
	position: relative;
	will-change: transform; 
}

.tab-page {
	width: 25%;  /* ✅ Jika menu app-nav ada 5, ganti ke 20% */
	height: 100%;
	flex-shrink: 0;
	position: relative;
	box-sizing: border-box;
	-webkit-font-smoothing: antialiased;
}

.tab-page .scroll-container {
	width: 100%;
	height: 100%;
	box-sizing: border-box;
}

/* ==========================================================================
   👛 STYLE UTAMA UNTUK ICON KANTONG / POCKET AVATAR
   ========================================================================== */

/* Class khusus untuk mengatur layout & ukuran gambar saku */
.pocket-avatar {
    width: 15px;
    height: 15px;
    object-fit: cover;
    border-radius: 6px;
    vertical-align: middle;
    margin-right: 10px;
    display: inline-block; /* Memastikan image rendering stabil */
}

/* Opsional: Class tambahan untuk text nama kantong (biar gampang diatur alignment-nya) */
.pocket-text-name {
    vertical-align: middle;
}