/* ==========================================================================
   FINANCIAL HUB - SHADCN + BENTO GRID DESIGN SYSTEM & MODERN THEME
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Outfit:wght@500;600;700;800;900&display=swap');

:root {
    --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-heading: 'Outfit', 'Plus Jakarta Sans', sans-serif;

    /* Shadcn HSL Tokens - Base Neutral Palette */
    --background: 222.2 84% 4.9%;
    --foreground: 210 40% 98%;
    --card: 222.2 84% 6.5%;
    --card-foreground: 210 40% 98%;
    --popover: 222.2 84% 6.5%;
    --popover-foreground: 210 40% 98%;
    --primary: 238.7 83.5% 66.7%;
    --primary-foreground: 210 40% 98%;
    --muted: 217.2 32.6% 17.5%;
    --muted-foreground: 215 20.2% 65.1%;
    --border: 217.2 32.6% 17.5%;
    --radius: 1rem;

    /* High-Vibrancy Brand Tokens */
    --emerald-500: #10b981;
    --emerald-600: #059669;
    --rose-500: #f43f5e;
    --rose-600: #e11d48;
    --indigo-500: #6366f1;
    --indigo-600: #4f46e5;
    --cyan-500: #06b6d4;
    --cyan-600: #0891b2;
    --amber-500: #f59e0b;
    --amber-600: #d97706;
    --purple-500: #a855f7;
    --purple-600: #9333ea;
}

/* ==========================================================================
   DARK & LIGHT THEME ENGINE (Obsidian Pitch Black & Crisp Slate Light)
   ========================================================================== */
html.dark body, body {
    font-family: var(--font-sans);
    background-color: #09090b !important;
    color: #f4f4f5 !important;
    background-image: none !important;
    min-height: 100vh;
}

html.light body {
    background-color: #f8fafc !important;
    color: #0f172a !important;
}

/* Base Bento Card & Dark Card */
html.dark .bento-card, html.dark .dark-card, .bento-card, .dark-card {
    background: #121215 !important;
    border: 1px solid #222227 !important;
    box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.5), 0 2px 6px -1px rgba(0, 0, 0, 0.4);
    border-radius: 1rem;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

html.dark .bento-card:hover, html.dark .dark-card:hover {
    border-color: #3f3f46 !important;
    box-shadow: 0 10px 30px -4px rgba(0, 0, 0, 0.7);
    transform: translateY(-1px);
}

/* Light Mode Cards */
html.light .bento-card, html.light .dark-card {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.06), 0 2px 6px -1px rgba(0, 0, 0, 0.03);
    color: #0f172a !important;
}

html.light .bento-card:hover, html.light .dark-card:hover {
    border-color: #cbd5e1 !important;
    box-shadow: 0 10px 30px -4px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

/* Responsive Content Wrapper & Collapsed Sidebar Offset */
.content-wrapper { 
    margin-left: 0;
    transition: margin-left 0.25s cubic-bezier(0.4, 0, 0.2, 1), width 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 0;
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
@media (min-width: 768px) {
    .content-wrapper { 
        margin-left: 260px; 
        width: calc(100% - 260px);
    }
    .content-wrapper.sidebar-collapsed-offset {
        margin-left: 64px !important;
        width: calc(100% - 64px) !important;
    }
}

/* ==========================================================================
   VIBRANT FULL-COLOR BENTO STAT CARDS
   ========================================================================== */
.bento-stat-emerald {
    background: linear-gradient(135deg, #059669 0%, #10b981 50%, #14b8a6 100%);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #ffffff !important;
    box-shadow: 0 12px 28px -6px rgba(16, 185, 129, 0.45);
    border-radius: 1.25rem;
    position: relative;
    overflow: hidden;
    transition: all 0.25s ease;
}
.bento-stat-emerald:hover {
    transform: translateY(-3px) scale(1.01);
    box-shadow: 0 18px 35px -6px rgba(16, 185, 129, 0.6);
}
.bento-stat-emerald * {
    color: #ffffff !important;
}

.bento-stat-rose {
    background: linear-gradient(135deg, #e11d48 0%, #f43f5e 50%, #ec4899 100%);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #ffffff !important;
    box-shadow: 0 12px 28px -6px rgba(244, 63, 94, 0.45);
    border-radius: 1.25rem;
    position: relative;
    overflow: hidden;
    transition: all 0.25s ease;
}
.bento-stat-rose:hover {
    transform: translateY(-3px) scale(1.01);
    box-shadow: 0 18px 35px -6px rgba(244, 63, 94, 0.6);
}
.bento-stat-rose * {
    color: #ffffff !important;
}

.bento-stat-indigo {
    background: linear-gradient(135deg, #4338ca 0%, #6366f1 50%, #06b6d4 100%);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #ffffff !important;
    box-shadow: 0 12px 28px -6px rgba(99, 102, 241, 0.45);
    border-radius: 1.25rem;
    position: relative;
    overflow: hidden;
    transition: all 0.25s ease;
}
.bento-stat-indigo:hover {
    transform: translateY(-3px) scale(1.01);
    box-shadow: 0 18px 35px -6px rgba(99, 102, 241, 0.6);
}
.bento-stat-indigo * {
    color: #ffffff !important;
}

.bento-stat-purple {
    background: linear-gradient(135deg, #7e22ce 0%, #a855f7 50%, #d946ef 100%);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #ffffff !important;
    box-shadow: 0 12px 28px -6px rgba(168, 85, 247, 0.45);
    border-radius: 1.25rem;
    position: relative;
    overflow: hidden;
    transition: all 0.25s ease;
}
.bento-stat-purple:hover {
    transform: translateY(-3px) scale(1.01);
    box-shadow: 0 18px 35px -6px rgba(168, 85, 247, 0.6);
}
.bento-stat-purple * {
    color: #ffffff !important;
}

.bento-stat-amber {
    background: linear-gradient(135deg, #d97706 0%, #f59e0b 50%, #f97316 100%);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #ffffff !important;
    box-shadow: 0 12px 28px -6px rgba(245, 158, 11, 0.45);
    border-radius: 1.25rem;
    position: relative;
    overflow: hidden;
    transition: all 0.25s ease;
}
.bento-stat-amber:hover {
    transform: translateY(-3px) scale(1.01);
    box-shadow: 0 18px 35px -6px rgba(245, 158, 11, 0.6);
}
.bento-stat-amber * {
    color: #ffffff !important;
}

/* Glass Badge inside Bento Stat Cards */
.bento-glass-badge {
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #ffffff !important;
    font-weight: 700;
}

.bento-glass-icon {
    background: rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: #ffffff !important;
}

/* ==========================================================================
   POLKADOT & CLOUD MOTIFS (HERO BANNER)
   ========================================================================== */
.pattern-polkadot {
    background-image: radial-gradient(rgba(255, 255, 255, 0.18) 1.5px, transparent 1.5px);
    background-size: 20px 20px;
}
html.light .pattern-polkadot {
    background-image: radial-gradient(rgba(79, 70, 229, 0.2) 1.5px, transparent 1.5px);
    background-size: 20px 20px;
}

.pattern-polkadot-dense {
    background-image: radial-gradient(rgba(255, 255, 255, 0.25) 1.2px, transparent 1.2px);
    background-size: 14px 14px;
}

/* Cloud Orbs Motifs */
.cloud-orb-1 {
    position: absolute;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.4) 0%, rgba(6, 182, 212, 0.15) 50%, transparent 70%);
    filter: blur(40px);
    pointer-events: none;
    animation: floatOrb 8s ease-in-out infinite alternate;
}

.cloud-orb-2 {
    position: absolute;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(236, 72, 153, 0.35) 0%, rgba(168, 85, 247, 0.15) 50%, transparent 70%);
    filter: blur(45px);
    pointer-events: none;
    animation: floatOrb 10s ease-in-out infinite alternate-reverse;
}

.cloud-orb-3 {
    position: absolute;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.35) 0%, rgba(20, 184, 166, 0.1) 60%, transparent 75%);
    filter: blur(35px);
    pointer-events: none;
}

@keyframes floatOrb {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(15px, -15px) scale(1.08); }
    100% { transform: translate(-10px, 10px) scale(0.95); }
}

/* Glowing Top Accent Bars */
.card-glow-emerald::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, #10b981, #14b8a6, #06b6d4);
}
.card-glow-rose::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, #f43f5e, #fb7185, #ec4899);
}
.card-glow-indigo::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, #6366f1, #3b82f6, #06b6d4);
}
.card-glow-purple::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, #a855f7, #c084fc, #ec4899);
}
.card-glow-amber::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, #f59e0b, #fbbf24, #f97316);
}

/* ==========================================================================
   LIGHT MODE OVERHAUL - HIGH CONTRAST & CLEAN NEUTRAL (NO BLUE TINT)
   ========================================================================== */
html.light body {
    background-color: #f8fafc !important;
    color: #0f172a !important;
    background-image: 
        radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.04) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(16, 185, 129, 0.04) 0px, transparent 50%);
}

html.light .bento-card,
html.light .dark-card {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.06), 0 2px 6px -1px rgba(0, 0, 0, 0.04) !important;
    color: #0f172a !important;
}

html.light .bento-card:hover,
html.light .dark-card:hover {
    border-color: #cbd5e1 !important;
    box-shadow: 0 10px 25px -4px rgba(0, 0, 0, 0.1) !important;
}

/* Light Mode Navigation and Sidebars */
html.light #sidebar,
html.light #sidebar nav,
html.light #sidebar > div {
    background-color: #ffffff !important;
    border-color: #e2e8f0 !important;
    color: #0f172a !important;
}

html.light header {
    background-color: rgba(255, 255, 255, 0.92) !important;
    border-color: #e2e8f0 !important;
}

/* Light Mode Sharp Text Contrast */
html.light h1, 
html.light h2, 
html.light h3, 
html.light h4, 
html.light h5, 
html.light h6 {
    color: #0f172a !important;
    font-weight: 800;
}

html.light p,
html.light span,
html.light div,
html.light label {
    color: inherit;
}

html.light .text-white {
    color: #0f172a !important;
}

html.light .text-slate-100,
html.light .text-slate-200 {
    color: #0f172a !important;
}

html.light .text-slate-300,
html.light .text-slate-400 {
    color: #475569 !important;
}

html.light .text-slate-500 {
    color: #64748b !important;
}

/* Light Mode Form Elements */
html.light input, 
html.light select, 
html.light textarea {
    background-color: #ffffff !important;
    color: #0f172a !important;
}
html.light select option {
    background-color: #ffffff !important;
    color: #0f172a !important;
}

/* Light Mode Tables */
html.light table thead tr {
    background-color: #f1f5f9 !important;
    color: #334155 !important;
    border-bottom: 2px solid #e2e8f0 !important;
}

html.light table tbody tr {
    border-bottom-color: #f1f5f9 !important;
}

html.light table tbody td {
    color: #1e293b !important;
}

html.light .bg-slate-800, 
html.light .bg-slate-900, 
html.light .bg-slate-950 {
    background-color: #f1f5f9 !important;
    color: #0f172a !important;
}

html.light .border-slate-700, 
html.light .border-slate-800, 
html.light .border-slate-900 {
    border-color: #e2e8f0 !important;
}

/* Maintain Pure White for Colorful Bento Cards in Light Mode */
html.light .bento-stat-emerald *,
html.light .bento-stat-rose *,
html.light .bento-stat-indigo *,
html.light .bento-stat-purple *,
html.light .bento-stat-amber * {
    color: #ffffff !important;
}

/* ==========================================================================
   SHADCN / LINEAR MINIMALIST SIDEBAR STYLES (1-to-1 match with sidebar.md)
   ========================================================================== */
#sidebar {
    background-color: #0c0c0e !important;
    border-right: 1px solid #1f1f23 !important;
    transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s ease-in-out !important;
}

html.light #sidebar {
    background-color: #ffffff !important;
    border-right: 1px solid #e2e8f0 !important;
}

/* Sidebar Collapsed State (Menciut ke 64px - Icon-Only Mode) */
#sidebar.collapsed {
    width: 64px !important;
}

/* Hide all text, headings, badges, dots, and labels */
#sidebar.collapsed .sidebar-brand-text,
#sidebar.collapsed .shadcn-nav-heading,
#sidebar.collapsed .nav-label,
#sidebar.collapsed .nav-dot,
#sidebar.collapsed .shadcn-kbd,
#sidebar.collapsed .user-info-text,
#sidebar.collapsed .shadcn-badge,
#sidebar.collapsed .shadcn-nav-item span,
#sidebar.collapsed span:not(.sidebar-brand-logo),
#sidebar.collapsed kbd {
    display: none !important;
}

/* Center brand header logo */
#sidebar.collapsed .sidebar-brand-header {
    padding-left: 0 !important;
    padding-right: 0 !important;
    display: flex !important;
    justify-content: center !important;
}
#sidebar.collapsed .sidebar-brand-inner {
    padding-left: 0 !important;
    padding-right: 0 !important;
    justify-content: center !important;
    gap: 0 !important;
}
#sidebar.collapsed .sidebar-brand-logo {
    margin: 0 auto !important;
}

/* Center nav items */
#sidebar.collapsed nav {
    padding-left: 0 !important;
    padding-right: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
}

#sidebar.collapsed .shadcn-nav-item {
    width: 42px !important;
    height: 42px !important;
    padding: 0 !important;
    margin: 3px auto !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 10px !important;
}

#sidebar.collapsed .shadcn-nav-item .nav-item-content {
    justify-content: center !important;
    margin: 0 auto !important;
    gap: 0 !important;
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
}

#sidebar.collapsed .shadcn-nav-item i[data-lucide],
#sidebar.collapsed .shadcn-nav-item svg {
    width: 18px !important;
    height: 18px !important;
    margin: 0 auto !important;
    display: block !important;
}

/* Center bottom items */
#sidebar.collapsed .mt-auto {
    padding-left: 0 !important;
    padding-right: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
}

.shadcn-nav-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 7px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
    font-size: 13px;
    font-weight: 500;
    color: #a1a1aa;
    text-decoration: none;
}

html.light .shadcn-nav-item {
    color: #64748b;
}

.shadcn-nav-item:hover {
    background-color: rgba(255, 255, 255, 0.06);
    color: #ffffff;
}

html.light .shadcn-nav-item:hover {
    background-color: rgba(0, 0, 0, 0.05);
    color: #0f172a;
}

/* Active State (Subtle frosted pill matching Shadcn UI) */
.shadcn-nav-item.active {
    background-color: rgba(255, 255, 255, 0.12) !important;
    color: #ffffff !important;
    font-weight: 600;
}

html.light .shadcn-nav-item.active {
    background-color: rgba(0, 0, 0, 0.06) !important;
    color: #0f172a !important;
    font-weight: 600;
}

.shadcn-nav-item i[data-lucide] {
    width: 16px;
    height: 16px;
    stroke-width: 1.75;
    color: #a1a1aa;
    transition: color 0.15s ease;
}

html.light .shadcn-nav-item i[data-lucide] {
    color: #64748b;
}

.shadcn-nav-item:hover i[data-lucide] {
    color: #ffffff;
}

html.light .shadcn-nav-item:hover i[data-lucide] {
    color: #0f172a;
}

.shadcn-nav-item.active i[data-lucide] {
    color: #ffffff !important;
}

html.light .shadcn-nav-item.active i[data-lucide] {
    color: #0f172a !important;
}

/* Headings */
.shadcn-nav-heading {
    padding: 0 10px;
    margin-bottom: 6px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.35);
}

html.light .shadcn-nav-heading {
    color: #94a3b8;
}

/* KBD & Badges */
.shadcn-kbd {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 10px;
    font-weight: 500;
    padding: 1px 5px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

html.light .shadcn-kbd {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.1);
    color: #64748b;
}

.shadcn-badge {
    font-size: 10px;
    font-weight: 600;
    padding: 1px 6px;
    border-radius: 9999px;
    background: rgba(99, 102, 241, 0.18);
    color: #818cf8;
    height: 20px;
    min-width: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

html.light .shadcn-badge {
    background: #eef2ff;
    color: #4f46e5;
}

/* Pitch Dark Mode Controls Override (No Blue Wash) */
html.dark input, 
html.dark select, 
html.dark textarea {
    background-color: #141418 !important;
    border-color: #27272a !important;
    color: #fafafa !important;
}

html.dark table thead tr {
    background-color: #141418 !important;
    border-bottom: 1px solid #27272a !important;
    color: #a1a1aa !important;
}

html.dark table tbody tr {
    border-bottom-color: #1e1e24 !important;
}

html.dark table tbody tr:hover {
    background-color: #16161c !important;
}

html.dark .bg-slate-800, 
html.dark .bg-slate-900, 
html.dark .bg-slate-950 {
    background-color: #121215 !important;
    border-color: #222227 !important;
}

/* ==========================================================================
   VIBRANT BADGES
   ========================================================================== */
.badge-income {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.35);
    color: #10b981;
    font-weight: 700;
}
html.light .badge-income {
    background: rgba(16, 185, 129, 0.12);
    color: #059669;
    border-color: rgba(16, 185, 129, 0.3);
}

.badge-expense {
    background: rgba(244, 63, 94, 0.15);
    border: 1px solid rgba(244, 63, 94, 0.35);
    color: #f43f5e;
    font-weight: 700;
}
html.light .badge-expense {
    background: rgba(244, 63, 94, 0.12);
    color: #e11d48;
    border-color: rgba(244, 63, 94, 0.3);
}

.badge-indigo {
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.35);
    color: #818cf8;
    font-weight: 700;
}
html.light .badge-indigo {
    background: rgba(99, 102, 241, 0.12);
    color: #4f46e5;
    border-color: rgba(99, 102, 241, 0.3);
}

/* ==========================================================================
   SHADCN HIGH-CONTRAST MONOCHROME BUTTONS
   - Dark Mode: Pure White Button with Black Text & Icons
   - Light Mode: Solid Black Button with Pure White Text & Icons
   ========================================================================== */
.btn-gradient-primary,
.btn-primary,
.btn-shadcn-primary {
    background-color: #ffffff !important;
    background-image: none !important;
    color: #09090b !important;
    border: 1px solid rgba(255, 255, 255, 0.9) !important;
    box-shadow: 0 2px 10px rgba(255, 255, 255, 0.15) !important;
    font-weight: 800 !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-gradient-primary *,
.btn-primary *,
.btn-shadcn-primary * {
    color: #09090b !important;
}

.btn-gradient-primary:hover,
.btn-primary:hover,
.btn-shadcn-primary:hover {
    background-color: #f4f4f5 !important;
    color: #000000 !important;
    box-shadow: 0 4px 16px rgba(255, 255, 255, 0.25) !important;
    transform: translateY(-1px);
}

.btn-gradient-primary:active,
.btn-primary:active,
.btn-shadcn-primary:active {
    transform: scale(0.97);
}

/* Light Mode: Solid Black Button with Pure White Text & Icons */
html.light .btn-gradient-primary,
html.light .btn-primary,
html.light .btn-shadcn-primary {
    background-color: #0f172a !important;
    background-image: none !important;
    color: #ffffff !important;
    border: 1px solid #0f172a !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18) !important;
}

html.light .btn-gradient-primary *,
html.light .btn-primary *,
html.light .btn-shadcn-primary * {
    color: #ffffff !important;
}

html.light .btn-gradient-primary:hover,
html.light .btn-primary:hover,
html.light .btn-shadcn-primary:hover {
    background-color: #27272a !important;
    color: #ffffff !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.28) !important;
}

/* Secondary / Outline / Ghost Buttons */
.btn-secondary,
.btn-outline,
.btn-cancel {
    background-color: #141418 !important;
    color: #e4e4e7 !important;
    border: 1px solid #27272a !important;
    transition: all 0.2s ease !important;
}
.btn-secondary:hover,
.btn-outline:hover,
.btn-cancel:hover {
    background-color: #222227 !important;
    color: #ffffff !important;
    border-color: #3f3f46 !important;
}

html.light .btn-secondary,
html.light .btn-outline,
html.light .btn-cancel {
    background-color: #f1f5f9 !important;
    color: #0f172a !important;
    border: 1px solid #cbd5e1 !important;
}
html.light .btn-secondary:hover,
html.light .btn-outline:hover,
html.light .btn-cancel:hover {
    background-color: #e2e8f0 !important;
    color: #000000 !important;
    border-color: #94a3b8 !important;
}

/* Pulse animation */
@keyframes pulseGlow {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(1.2); }
}
.pulse-glow {
    animation: pulseGlow 2s infinite ease-in-out;
}

/* Input Glow */
.input-glow:focus {
    border-color: #6366f1 !important;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25) !important;
    outline: none !important;
}

/* Custom Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.2); border-radius: 9999px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.35); }

/* ==========================================================================
   COMMAND PALETTE & SEARCH BAR COMPREHENSIVE STYLING (High-Contrast & No-Blue)
   ========================================================================== */

/* 1. Desktop Header Search Trigger */
.header-search-btn {
    background-color: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    color: #e4e4e7 !important;
}
.header-search-btn span {
    color: #d4d4d8 !important;
}
.header-search-btn i {
    color: #a1a1aa !important;
}
.header-search-btn kbd {
    background-color: #27272a !important;
    border-color: #3f3f46 !important;
    color: #f4f4f5 !important;
}
.header-search-btn:hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
}
.header-search-btn:hover span {
    color: #ffffff !important;
}

html.light .header-search-btn {
    background-color: #f1f5f9 !important;
    border: 1px solid #cbd5e1 !important;
    color: #0f172a !important;
}
html.light .header-search-btn span {
    color: #334155 !important;
}
html.light .header-search-btn i {
    color: #64748b !important;
}
html.light .header-search-btn kbd {
    background-color: #ffffff !important;
    border-color: #cbd5e1 !important;
    color: #475569 !important;
}
html.light .header-search-btn:hover {
    background-color: #e2e8f0 !important;
}
html.light .header-search-btn:hover span {
    color: #0f172a !important;
}

/* 2. Command Palette Modal Dialog */
#commandPaletteCard {
    background-color: #121215 !important;
    border: 1px solid #27272a !important;
    color: #ffffff !important;
}
html.light #commandPaletteCard {
    background-color: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    color: #0f172a !important;
}

/* Input in Command Palette */
#commandPaletteInput {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    background-color: transparent !important;
}
#commandPaletteInput::placeholder {
    color: #a1a1aa !important;
    -webkit-text-fill-color: #a1a1aa !important;
}
html.light #commandPaletteInput {
    color: #0f172a !important;
    -webkit-text-fill-color: #0f172a !important;
}
html.light #commandPaletteInput::placeholder {
    color: #64748b !important;
    -webkit-text-fill-color: #64748b !important;
}

/* Command Items in List */
.command-item {
    color: #e4e4e7 !important;
    background-color: transparent !important;
}
.command-item span {
    color: #e4e4e7 !important;
}
.command-item i {
    color: #a1a1aa !important;
}
.command-item:hover,
.command-item.selected {
    background-color: #1f1f23 !important;
    color: #ffffff !important;
}
.command-item:hover span,
.command-item.selected span {
    color: #ffffff !important;
}
.command-item:hover i,
.command-item.selected i {
    color: #10b981 !important;
}

html.light .command-item {
    color: #1e293b !important;
}
html.light .command-item span {
    color: #1e293b !important;
}
html.light .command-item i {
    color: #64748b !important;
}
html.light .command-item:hover,
html.light .command-item.selected {
    background-color: #f1f5f9 !important;
    color: #0f172a !important;
}
html.light .command-item:hover span,
html.light .command-item.selected span {
    color: #0f172a !important;
}
html.light .command-item:hover i,
html.light .command-item.selected i {
    color: #059669 !important;
}

/* Dynamic Search Action (No Blue - Emerald Accent) */
#dynamicSearchLink {
    background-color: rgba(16, 185, 129, 0.1) !important;
    border: 1px solid rgba(16, 185, 129, 0.25) !important;
    color: #34d399 !important;
}
#dynamicSearchLink span {
    color: #34d399 !important;
}
#dynamicSearchLink:hover {
    background-color: rgba(16, 185, 129, 0.18) !important;
    color: #6ee7b7 !important;
}

html.light #dynamicSearchLink {
    background-color: #ecfdf5 !important;
    border: 1px solid #a7f3d0 !important;
    color: #047857 !important;
}
html.light #dynamicSearchLink span {
    color: #047857 !important;
}
html.light #dynamicSearchLink:hover {
    background-color: #d1fae5 !important;
}

/* Global input fields & select dropdowns for Dark Mode */
html.dark input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]),
html.dark select,
html.dark textarea {
    background-color: #141418 !important;
    border-color: #27272a !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}
html.dark input::placeholder,
html.dark textarea::placeholder {
    color: #71717a !important;
    -webkit-text-fill-color: #71717a !important;
}
html.dark input:focus,
html.dark select:focus,
html.dark textarea:focus {
    border-color: #ffffff !important;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.12) !important;
}

html.light input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]),
html.light select,
html.light textarea {
    background-color: #ffffff !important;
    border-color: #cbd5e1 !important;
    color: #0f172a !important;
    -webkit-text-fill-color: #0f172a !important;
}
html.light input::placeholder,
html.light textarea::placeholder {
    color: #94a3b8 !important;
    -webkit-text-fill-color: #94a3b8 !important;
}
html.light input:focus,
html.light select:focus,
html.light textarea:focus {
    border-color: #0f172a !important;
    box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.1) !important;
}

/* ==========================================================================
   SWEETALERT2 MODAL & TOAST ADAPTIVE THEME (Light & Dark)
   ========================================================================== */

/* DARK MODE (Default / html.dark) */
.swal2-popup {
    background-color: #0c0c0e !important;
    color: #f4f4f5 !important;
    border: 1px solid #27272a !important;
    border-radius: 1rem !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8) !important;
}
.swal2-title {
    color: #ffffff !important;
    font-weight: 800 !important;
    font-family: 'Plus Jakarta Sans', sans-serif !important;
}
.swal2-html-container {
    color: #a1a1aa !important;
    font-size: 0.875rem !important;
}
.swal2-toast {
    background-color: #0c0c0e !important;
    color: #f4f4f5 !important;
    border: 1px solid #27272a !important;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.6) !important;
    border-radius: 0.75rem !important;
}
.swal2-toast .swal2-title {
    color: #ffffff !important;
    font-size: 0.875rem !important;
}
.swal2-actions {
    gap: 0.5rem !important;
}
.swal2-cancel {
    background-color: #18181b !important;
    color: #e4e4e7 !important;
    border: 1px solid #27272a !important;
    border-radius: 0.75rem !important;
    font-weight: 700 !important;
    padding: 0.6rem 1.25rem !important;
}
.swal2-cancel:hover {
    background-color: #27272a !important;
    color: #ffffff !important;
}
.swal2-confirm {
    border-radius: 0.75rem !important;
    font-weight: 700 !important;
    padding: 0.6rem 1.25rem !important;
}

/* LIGHT MODE (html.light) */
html.light .swal2-popup {
    background-color: #ffffff !important;
    color: #0f172a !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.15) !important;
}
html.light .swal2-title {
    color: #0f172a !important;
}
html.light .swal2-html-container {
    color: #64748b !important;
}
html.light .swal2-toast {
    background-color: #ffffff !important;
    color: #0f172a !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1) !important;
}
html.light .swal2-toast .swal2-title {
    color: #0f172a !important;
}
html.light .swal2-cancel {
    background-color: #f1f5f9 !important;
    color: #334155 !important;
    border: 1px solid #cbd5e1 !important;
}
html.light .swal2-cancel:hover {
    background-color: #e2e8f0 !important;
    color: #0f172a !important;
}

/* ==========================================================================
   PERFECT SYMMETRY: SIDEBAR BRAND HEADER & TOPBAR HEADER HORIZONTAL LINE
   ========================================================================== */
.sidebar-brand-header {
    height: 56px !important;
    min-height: 56px !important;
    max-height: 56px !important;
    border-bottom: 1px solid #1f1f23 !important;
    display: flex !important;
    align-items: center !important;
    box-sizing: border-box !important;
}

html.light .sidebar-brand-header {
    border-bottom: 1px solid #e2e8f0 !important;
}

header.topbar-header,
header {
    height: 56px !important;
    min-height: 56px !important;
    max-height: 56px !important;
    border-bottom: 1px solid #1f1f23 !important;
    display: flex !important;
    align-items: center !important;
    box-sizing: border-box !important;
}

html.light header.topbar-header,
html.light header {
    border-bottom: 1px solid #e2e8f0 !important;
}


