/* ============================================================================
   KGN CSC DASHBOARD — V3.2  |  VIVID COLORFUL LIGHT THEME (DEFAULT)
   Acrylic Glass • Gradient Mesh • Premium Fintech
   ============================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Space+Grotesk:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* ==========================================================================
   DESIGN TOKENS — LIGHT/COLORFUL BASE (DEFAULT)
   ========================================================================== */
:root {
  /* App background */
  --bg-app:       #F4F7FE;
  --bg-surface:   #FFFFFF;
  --bg-surface2:  #F0F4FF;
  --bg-surface3:  #E8EDFF;
  --bg-glass:     rgba(255,255,255,0.72);
  --bg-acrylic:   rgba(255,255,255,0.58);

  /* Sidebar — always deep dark */
  --sb-top:     #0F0C29;
  --sb-mid:     #1A154B;
  --sb-bottom:  #0A0820;

  /* Borders */
  --border:      rgba(99,102,241,0.14);
  --border-md:   rgba(99,102,241,0.28);
  --border-glow: rgba(79,110,247,0.5);

  /* Brand Palette */
  --indigo:      #4F46E5;
  --indigo-lt:   #6366F1;
  --indigo-pale: #EEF2FF;
  --blue:        #2563EB;
  --blue-lt:     #3B82F6;
  --blue-pale:   #EFF6FF;
  --cyan:        #0891B2;
  --cyan-lt:     #06B6D4;
  --cyan-pale:   #ECFEFF;
  --violet:      #7C3AED;
  --violet-lt:   #8B5CF6;
  --violet-pale: #F5F3FF;
  --emerald:     #059669;
  --emerald-lt:  #10B981;
  --emerald-pale:#ECFDF5;
  --amber:       #D97706;
  --amber-lt:    #F59E0B;
  --amber-pale:  #FFFBEB;
  --rose:        #E11D48;
  --rose-lt:     #F43F5E;
  --rose-pale:   #FFF1F3;
  --pink:        #DB2777;

  /* Gradient presets */
  --grad-primary:  linear-gradient(135deg, #4F46E5 0%, #7C3AED 100%);
  --grad-blue:     linear-gradient(135deg, #2563EB 0%, #0891B2 100%);
  --grad-success:  linear-gradient(135deg, #059669 0%, #0891B2 100%);
  --grad-danger:   linear-gradient(135deg, #E11D48 0%, #DB2777 100%);
  --grad-mesh:     radial-gradient(ellipse at 20% 20%, rgba(99,102,241,0.09) 0%, transparent 55%),
                   radial-gradient(ellipse at 80% 70%, rgba(6,182,212,0.07) 0%, transparent 55%),
                   radial-gradient(ellipse at 50% 100%, rgba(124,58,237,0.05) 0%, transparent 55%);

  /* Shadows — soft and layered */
  --shadow-xs:  0 1px 2px rgba(0,0,0,0.04);
  --shadow-sm:  0 1px 4px rgba(0,0,0,0.06), 0 2px 8px rgba(99,102,241,0.05);
  --shadow-md:  0 4px 16px rgba(0,0,0,0.07), 0 2px 6px rgba(99,102,241,0.06);
  --shadow-lg:  0 8px 30px rgba(0,0,0,0.09), 0 4px 12px rgba(99,102,241,0.08);
  --shadow-xl:  0 20px 48px rgba(0,0,0,0.11), 0 8px 20px rgba(99,102,241,0.09);
  --shadow-colored-blue:   0 8px 24px rgba(79,70,229,0.25);
  --shadow-colored-rose:   0 8px 24px rgba(225,29,72,0.22);
  --shadow-colored-green:  0 8px 24px rgba(5,150,105,0.22);

  /* Glow */
  --glow-indigo:  0 0 20px rgba(79,70,229,0.18), 0 4px 8px rgba(79,70,229,0.1);
  --glow-blue:    0 0 20px rgba(37,99,235,0.16);
  --glow-cyan:    0 0 20px rgba(8,145,178,0.16);
  --glow-green:   0 0 20px rgba(5,150,105,0.16);
  --glow-rose:    0 0 20px rgba(225,29,72,0.16);
  --glow-violet:  0 0 20px rgba(124,58,237,0.16);

  /* Text — high contrast dark on light */
  --text-1:    #0F172A;
  --text-2:    #334155;
  --text-3:    #64748B;
  --text-4:    #94A3B8;

  /* Layout */
  --sidebar-w:         268px;
  --sidebar-collapsed: 72px;
  --header-h:          64px;

  /* Transitions */
  --t-fast:   120ms cubic-bezier(.4,0,.2,1);
  --t-normal: 220ms cubic-bezier(.4,0,.2,1);
  --t-slow:   380ms cubic-bezier(.4,0,.2,1);
  --t-bounce: 380ms cubic-bezier(.34,1.56,.64,1);
}

/* ==========================================================================
   DARK THEME OVERRIDE
   ========================================================================== */
[data-theme="dark"] {
  --bg-app:       #07070F;
  --bg-surface:   #10102A;
  --bg-surface2:  #15153A;
  --bg-surface3:  #1A1A48;
  --bg-glass:     rgba(16,16,42,0.78);
  --bg-acrylic:   rgba(16,16,42,0.55);

  --sb-top:     #060614;
  --sb-mid:     #0E0B30;
  --sb-bottom:  #040410;

  --border:      rgba(255,255,255,0.07);
  --border-md:   rgba(91,158,255,0.2);
  --border-glow: rgba(91,158,255,0.5);

  --indigo:      #818CF8;
  --indigo-lt:   #A5B4FC;
  --indigo-pale: rgba(99,102,241,0.12);
  --blue:        #60A5FA;
  --blue-lt:     #93C5FD;
  --blue-pale:   rgba(96,165,250,0.1);
  --cyan:        #22D3EE;
  --cyan-lt:     #67E8F9;
  --cyan-pale:   rgba(34,211,238,0.1);
  --violet:      #A78BFA;
  --violet-lt:   #C4B5FD;
  --violet-pale: rgba(167,139,250,0.12);
  --emerald:     #34D399;
  --emerald-lt:  #6EE7B7;
  --emerald-pale:rgba(52,211,153,0.1);
  --amber:       #FBBF24;
  --amber-lt:    #FCD34D;
  --amber-pale:  rgba(251,191,36,0.1);
  --rose:        #FB7185;
  --rose-lt:     #FDA4AF;
  --rose-pale:   rgba(251,113,133,0.1);

  --grad-primary:  linear-gradient(135deg, #6366F1 0%, #8B5CF6 100%);
  --grad-mesh:     radial-gradient(ellipse at 20% 20%, rgba(99,102,241,0.08) 0%, transparent 55%),
                   radial-gradient(ellipse at 80% 70%, rgba(6,182,212,0.06) 0%, transparent 55%);

  --shadow-xs:  0 1px 2px rgba(0,0,0,0.3);
  --shadow-sm:  0 1px 4px rgba(0,0,0,0.35);
  --shadow-md:  0 4px 16px rgba(0,0,0,0.45);
  --shadow-lg:  0 8px 30px rgba(0,0,0,0.55);
  --shadow-xl:  0 20px 48px rgba(0,0,0,0.65);
  --shadow-colored-blue:   0 8px 24px rgba(99,102,241,0.3);
  --shadow-colored-rose:   0 8px 24px rgba(251,113,133,0.25);
  --shadow-colored-green:  0 8px 24px rgba(52,211,153,0.25);

  --glow-indigo:  0 0 24px rgba(99,102,241,0.4);
  --glow-blue:    0 0 24px rgba(96,165,250,0.35);
  --glow-cyan:    0 0 24px rgba(34,211,238,0.35);
  --glow-green:   0 0 24px rgba(52,211,153,0.35);
  --glow-rose:    0 0 24px rgba(251,113,133,0.35);
  --glow-violet:  0 0 24px rgba(167,139,250,0.35);

  --text-1:    #F1F5FF;
  --text-2:    #CBD5E1;
  --text-3:    #6B7BAD;
  --text-4:    #3D4A70;
}

/* ==========================================================================
   RESET & BASE
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 14px; line-height: 1.6;
  color: var(--text-2);
  background: var(--bg-app);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden; min-height: 100vh;
  transition: background 0.3s ease, color 0.3s ease;
}

/* Gradient mesh background — light theme */
body::before {
  content: '';
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background: var(--grad-mesh);
}

/* Dot grid overlay */
body::after {
  content: '';
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image: radial-gradient(circle, rgba(99,102,241,0.07) 1px, transparent 1px);
  background-size: 28px 28px;
}

[data-theme="dark"] body::after {
  background-image: radial-gradient(circle, rgba(255,255,255,0.025) 1px, transparent 1px);
}

/* Floating teal orb bottom-right */
.orb-secondary {
  position: fixed; width: 480px; height: 480px;
  bottom: -200px; right: -140px;
  background: radial-gradient(circle, rgba(8,145,178,0.09) 0%, transparent 70%);
  pointer-events: none; z-index: 0; border-radius: 50%;
}

[data-theme="dark"] .orb-secondary {
  background: radial-gradient(circle, rgba(0,229,255,0.05) 0%, transparent 70%);
}

h1,h2,h3,h4,h5,h6 {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-weight: 700; color: var(--text-1);
}

a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: 14px; }

/* ==========================================================================
   APP SHELL
   ========================================================================== */
.app-wrapper { display: flex; min-height: 100vh; position: relative; z-index: 1; }

/* ==========================================================================
   SIDEBAR — REDESIGNED PREMIUM DARK GRADIENT
   ========================================================================== */
.app-sidebar {
  width: var(--sidebar-w);
  background: linear-gradient(175deg, var(--sb-top) 0%, var(--sb-mid) 45%, var(--sb-bottom) 100%);
  display: flex; flex-direction: column;
  position: fixed; top: 0; left: 0; bottom: 0;
  z-index: 200;
  transition: width var(--t-normal);
  overflow: hidden;
  /* rich multi-layer shadow */
  box-shadow:
    6px 0 32px rgba(0,0,0,0.28),
    2px 0 8px rgba(0,0,0,0.15),
    inset -1px 0 0 rgba(255,255,255,0.05);
}

/* Star-field dots inside sidebar */
.app-sidebar::before {
  content: '';
  position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(circle, rgba(255,255,255,0.055) 1px, transparent 1px);
  background-size: 22px 22px;
  opacity: 0.6;
}

/* Gradient glow orbs inside sidebar */
.app-sidebar::after {
  content: '';
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 200px 180px at 60% 10%, rgba(99,102,241,0.25) 0%, transparent 70%),
    radial-gradient(ellipse 160px 200px at 20% 80%, rgba(6,182,212,0.18) 0%, transparent 70%),
    radial-gradient(ellipse 120px 120px at 80% 60%, rgba(124,58,237,0.12) 0%, transparent 70%);
}

/* Right accent line */
.sidebar-accent-line {
  position: absolute; top: 0; right: 0;
  width: 2px; height: 100%; z-index: 10;
  background: linear-gradient(180deg,
    transparent 0%, rgba(99,102,241,0.7) 20%,
    rgba(6,182,212,0.8) 55%, rgba(124,58,237,0.5) 80%, transparent 100%);
}

/* Collapse */
.app-sidebar.collapsed { width: var(--sidebar-collapsed); }
.app-sidebar.collapsed .sidebar-brand-name,
.app-sidebar.collapsed .sidebar-brand-sub,
.app-sidebar.collapsed .nav-label,
.app-sidebar.collapsed .sidebar-profile-info,
.app-sidebar.collapsed .nav-section-title {
  opacity: 0; width: 0; overflow: hidden; white-space: nowrap;
}

/* === Brand / Logo Area === */
.sidebar-brand {
  position: relative; z-index: 5;
  display: flex; align-items: center; gap: 13px;
  padding: 24px 18px 20px;
}

.sidebar-brand::after {
  content: '';
  position: absolute; bottom: 0; left: 16px; right: 16px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.12), rgba(99,102,241,0.3), rgba(255,255,255,0.12), transparent);
}

.brand-logo {
  width: 46px; height: 46px; border-radius: 14px; flex-shrink: 0;
  background: linear-gradient(135deg, #6366F1 0%, #06B6D4 100%);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 900; font-size: 20px; color: #fff;
  position: relative; overflow: hidden;
  box-shadow:
    0 4px 18px rgba(99,102,241,0.55),
    0 1px 0 rgba(255,255,255,0.25) inset,
    0 -1px 0 rgba(0,0,0,0.2) inset;
}

.brand-logo::before {
  content: '';
  position: absolute; inset: 0;
  background: conic-gradient(from 0deg, transparent 0deg, rgba(255,255,255,0.18) 60deg, transparent 120deg);
  animation: logo-conic 5s linear infinite;
}

@keyframes logo-conic { to { transform: rotate(360deg); } }

.sidebar-brand-name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 17px; font-weight: 800; color: #FFFFFF;
  letter-spacing: -0.015em; line-height: 1.1; white-space: nowrap;
  transition: var(--t-normal);
  text-shadow: 0 1px 8px rgba(0,0,0,0.4);
}

.sidebar-brand-sub {
  font-size: 9px; font-weight: 700; letter-spacing: 0.25em;
  text-transform: uppercase; color: #06B6D4;
  white-space: nowrap; transition: var(--t-normal);
  margin-top: 2px; opacity: 0.9;
}

/* === Navigation === */
.sidebar-nav {
  flex: 1; overflow-y: auto; overflow-x: hidden;
  padding: 10px 10px 4px; position: relative; z-index: 5;
}

.sidebar-nav::-webkit-scrollbar { width: 0; }

.nav-section-title {
  font-size: 9px; font-weight: 800;
  color: rgba(255,255,255,0.28);
  letter-spacing: 0.22em; text-transform: uppercase;
  padding: 14px 16px 5px; white-space: nowrap;
  transition: var(--t-normal);
}

.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px;
  border-radius: 12px;
  color: rgba(255,255,255,0.52);
  font-size: 13.5px; font-weight: 500;
  cursor: pointer; position: relative;
  white-space: nowrap; margin-bottom: 2px;
  border: 1px solid transparent;
  transition: all var(--t-fast);
}

.nav-item:hover {
  color: rgba(255,255,255,0.92);
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.06);
}

.nav-item:hover .nav-icon { transform: scale(1.18) translateY(-1px); }

.nav-item.active {
  color: #FFFFFF;
  background: linear-gradient(130deg,
    rgba(99,102,241,0.4) 0%, rgba(6,182,212,0.2) 100%);
  border: 1px solid rgba(99,102,241,0.45);
  box-shadow:
    0 4px 18px rgba(99,102,241,0.22),
    inset 0 1px 0 rgba(255,255,255,0.12);
  font-weight: 600;
}

/* Active left indicator */
.nav-item.active::before {
  content: '';
  position: absolute; left: 0; top: 18%; height: 64%;
  width: 3px; border-radius: 0 3px 3px 0;
  background: linear-gradient(180deg, #6366F1, #06B6D4);
  box-shadow: 0 0 10px rgba(6,182,212,0.8);
}

.nav-item.active .nav-icon {
  filter: drop-shadow(0 0 5px rgba(6,182,212,0.8));
}

.nav-icon {
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; flex-shrink: 0;
  transition: transform var(--t-bounce), filter var(--t-fast);
}

.nav-label { transition: var(--t-normal); letter-spacing: 0.01em; }

/* === Sidebar Footer / Profile === */
.sidebar-footer {
  flex-shrink: 0; padding: 10px 10px 14px;
  position: relative; z-index: 5;
}

.sidebar-footer::before {
  content: '';
  position: absolute; top: 0; left: 14px; right: 14px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), rgba(99,102,241,0.25), rgba(255,255,255,0.1), transparent);
}

.sidebar-profile-card {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 14px;
  border-radius: 14px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.1);
  cursor: pointer;
  transition: all var(--t-fast);
  position: relative; overflow: hidden;
}

.sidebar-profile-card::after {
  content: '';
  position: absolute; inset: 0; border-radius: 14px;
  background: linear-gradient(135deg, rgba(99,102,241,0), rgba(6,182,212,0));
  transition: background var(--t-normal);
}

.sidebar-profile-card:hover {
  background: rgba(255,255,255,0.11);
  border-color: rgba(99,102,241,0.42);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
}

.sidebar-profile-card:hover::after {
  background: linear-gradient(135deg, rgba(99,102,241,0.1), rgba(6,182,212,0.07));
}

.sidebar-profile-avatar {
  width: 40px; height: 40px; border-radius: 12px; flex-shrink: 0;
  background: linear-gradient(135deg, #7C3AED, #4F46E5);
  display: flex; align-items: center; justify-content: center;
  font-size: 19px;
  box-shadow: 0 4px 12px rgba(124,58,237,0.45);
  border: 1.5px solid rgba(255,255,255,0.18);
  position: relative; z-index: 1;
}

.sidebar-profile-info { position: relative; z-index: 1; overflow: hidden; }

.sidebar-profile-name {
  font-size: 13px; font-weight: 700; color: #FFFFFF;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  letter-spacing: -0.01em;
}

.sidebar-profile-role {
  font-size: 10.5px; color: rgba(255,255,255,0.42); font-weight: 500;
}

.sidebar-profile-status {
  font-size: 10px; font-weight: 700; color: #34D399;
  display: flex; align-items: center; gap: 5px; margin-top: 2px;
}

.sidebar-profile-status::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: #34D399; box-shadow: 0 0 6px #34D399;
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.75); }
}

/* ==========================================================================
   MAIN CONTAINER
   ========================================================================== */
.main-container {
  flex: 1; margin-left: var(--sidebar-w);
  display: flex; flex-direction: column; min-height: 100vh;
  transition: margin-left var(--t-normal);
}

.app-sidebar.collapsed ~ .main-container { margin-left: var(--sidebar-collapsed); }

/* ==========================================================================
   HEADER — Acrylic Frosted Glass
   ========================================================================== */
.app-header {
  height: var(--header-h);
  background: rgba(255,255,255,0.75);
  backdrop-filter: blur(24px) saturate(1.8);
  -webkit-backdrop-filter: blur(24px) saturate(1.8);
  border-bottom: 1px solid rgba(99,102,241,0.12);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 28px;
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 1px 20px rgba(99,102,241,0.06), 0 1px 3px rgba(0,0,0,0.04);
  transition: background var(--t-normal);
}

[data-theme="dark"] .app-header {
  background: rgba(10,10,26,0.82);
  border-bottom-color: rgba(99,102,241,0.1);
  box-shadow: 0 1px 20px rgba(0,0,0,0.4);
}

.header-left { display: flex; align-items: center; gap: 14px; }

.page-breadcrumb { display: flex; align-items: center; gap: 10px; }

.breadcrumb-icon { font-size: 20px; line-height: 1; }

.breadcrumb-text {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 17px; font-weight: 800;
  color: var(--text-1); letter-spacing: -0.025em;
}

.header-right { display: flex; align-items: center; gap: 10px; }

.header-clock {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px; font-weight: 600;
  color: var(--indigo);
  background: var(--indigo-pale);
  padding: 6px 14px; border-radius: 20px;
  border: 1px solid rgba(99,102,241,0.18);
}

[data-theme="dark"] .header-clock {
  color: var(--indigo-lt);
  background: rgba(99,102,241,0.1);
  border-color: rgba(99,102,241,0.2);
}

.header-btn {
  width: 38px; height: 38px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px;
  background: var(--bg-surface2);
  border: 1px solid var(--border);
  color: var(--text-3); transition: all var(--t-fast);
}

.header-btn:hover {
  border-color: var(--border-glow); color: var(--indigo);
  background: var(--indigo-pale); box-shadow: var(--glow-indigo);
}

.sidebar-toggle-btn {
  width: 36px; height: 36px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-3);
  background: var(--bg-surface2);
  border: 1px solid var(--border);
  font-size: 16px; transition: all var(--t-fast);
}

.sidebar-toggle-btn:hover {
  color: var(--indigo); border-color: rgba(99,102,241,0.3);
  background: var(--indigo-pale);
}

/* ==========================================================================
   CONTENT AREA
   ========================================================================== */
.content-area { padding: 26px 28px; flex: 1; }

.view-section { display: none; }
.view-section.active {
  display: block;
  animation: viewEnter 0.28s cubic-bezier(0.4,0,0.2,1);
}

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

.section-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 22px; flex-wrap: wrap; gap: 12px;
}

.section-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 22px; font-weight: 800;
  color: var(--text-1); letter-spacing: -0.035em;
}

.section-subtitle { font-size: 13px; color: var(--text-3); margin-top: 2px; }

/* ==========================================================================
   STAT CARDS — Colorful Glass
   ========================================================================== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px; margin-bottom: 22px;
}

.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 20px 20px 18px;
  position: relative; overflow: hidden;
  transition: all var(--t-normal);
  display: flex; flex-direction: column; justify-content: space-between;
  min-height: 124px;
  box-shadow: var(--shadow-sm);
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg), var(--glow-indigo);
  border-color: rgba(99,102,241,0.3);
}

/* Color orb in top-right */
.stat-card-glow {
  position: absolute; top: -28px; right: -28px;
  width: 90px; height: 90px; border-radius: 50%;
  filter: blur(28px); opacity: 0.55; pointer-events: none;
}

[data-theme="dark"] .stat-card-glow { opacity: 0.75; }

.stat-card-label {
  font-size: 10.5px; font-weight: 700;
  color: var(--text-3);
  text-transform: uppercase; letter-spacing: 0.1em;
  margin-bottom: 10px;
  display: flex; align-items: center; gap: 8px;
}

.stat-card-icon-sm {
  width: 30px; height: 30px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px;
}

.stat-card-value {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 28px; font-weight: 800;
  color: var(--text-1); line-height: 1.1; letter-spacing: -0.03em;
}

.stat-card-sub { font-size: 12px; color: var(--text-3); margin-top: 6px; }

/* ==========================================================================
   PANELS — Frosted Glass Cards
   ========================================================================== */
.panel {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 20px; margin-bottom: 20px;
  overflow: hidden; box-shadow: var(--shadow-sm);
  transition: border-color var(--t-normal), box-shadow var(--t-normal);
}

.panel:hover { border-color: rgba(99,102,241,0.25); box-shadow: var(--shadow-md); }

.panel-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 22px 14px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap; gap: 12px;
}

.panel-title {
  font-size: 14px; font-weight: 700; color: var(--text-1);
  display: flex; align-items: center; gap: 9px;
}

.panel-title-icon {
  width: 32px; height: 32px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px;
  background: var(--indigo-pale);
  border: 1px solid rgba(99,102,241,0.18);
}

[data-theme="dark"] .panel-title-icon {
  background: rgba(99,102,241,0.12);
  border-color: rgba(99,102,241,0.25);
}

.panel-body { padding: 20px 22px; }

/* ==========================================================================
   TABS
   ========================================================================== */
.tabs-nav {
  display: flex; gap: 3px;
  padding: 4px; border-radius: 12px;
  background: var(--bg-surface2);
  width: fit-content; border: 1px solid var(--border);
}

.tab-pill {
  padding: 7px 18px; border-radius: 9px;
  font-size: 13px; font-weight: 600; color: var(--text-3);
  cursor: pointer; transition: all var(--t-fast); white-space: nowrap;
  display: flex; align-items: center; gap: 6px;
}

.tab-pill:hover { color: var(--text-1); }

.tab-pill.active {
  background: var(--bg-surface); color: var(--indigo);
  box-shadow: var(--shadow-xs); border: 1px solid var(--border);
}

[data-theme="dark"] .tab-pill.active { color: var(--indigo-lt); }

.tab-content { display: none; }
.tab-content.active { display: block; animation: viewEnter 0.2s ease; }

/* ==========================================================================
   DATA TABLE
   ========================================================================== */
.table-wrap {
  width: 100%; overflow-x: auto; border-radius: 14px;
  border: 1px solid var(--border);
}

.table-wrap::-webkit-scrollbar { height: 4px; }
.table-wrap::-webkit-scrollbar-thumb {
  background: rgba(99,102,241,0.2); border-radius: 2px;
}

.data-table { width: 100%; border-collapse: collapse; text-align: left; }

.data-table thead th {
  background: var(--bg-surface2);
  padding: 11px 16px;
  font-size: 10.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--text-3); border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.data-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background var(--t-fast);
}

.data-table tbody tr:last-child { border-bottom: none; }
.data-table tbody tr:hover { background: var(--indigo-pale); }
[data-theme="dark"] .data-table tbody tr:hover { background: rgba(99,102,241,0.07); }

.data-table td { padding: 11px 16px; font-size: 13px; color: var(--text-2); }

/* UID badge */
.uid-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px; font-weight: 600; color: var(--indigo);
  background: var(--indigo-pale);
  padding: 3px 9px; border-radius: 6px;
  border: 1px solid rgba(99,102,241,0.18); white-space: nowrap;
}

[data-theme="dark"] .uid-badge { color: var(--indigo-lt); background: rgba(99,102,241,0.12); }

/* Chips */
.chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 20px;
  font-size: 11px; font-weight: 700; white-space: nowrap;
}

.chip-blue    { background: var(--blue-pale);    color: var(--blue);    border: 1px solid rgba(37,99,235,0.18); }
.chip-emerald { background: var(--emerald-pale); color: var(--emerald); border: 1px solid rgba(5,150,105,0.18); }
.chip-rose    { background: var(--rose-pale);    color: var(--rose);    border: 1px solid rgba(225,29,72,0.18); }
.chip-amber   { background: var(--amber-pale);   color: var(--amber);   border: 1px solid rgba(217,119,6,0.18); }
.chip-violet  { background: var(--violet-pale);  color: var(--violet);  border: 1px solid rgba(124,58,237,0.18); }

[data-theme="dark"] .chip-blue    { background: var(--blue-pale);    color: var(--blue-lt);    }
[data-theme="dark"] .chip-emerald { background: var(--emerald-pale); color: var(--emerald-lt); }
[data-theme="dark"] .chip-rose    { background: var(--rose-pale);    color: var(--rose-lt);    }
[data-theme="dark"] .chip-amber   { background: var(--amber-pale);   color: var(--amber-lt);   }
[data-theme="dark"] .chip-violet  { background: var(--violet-pale);  color: var(--violet-lt);  }

/* ==========================================================================
   AEPS LEDGER — REDESIGNED TRANSACTION CARDS
   ========================================================================== */
.ledger-month-block { margin-bottom: 28px; }

.ledger-month-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 18px;
  margin-bottom: 10px;
  border-radius: 12px;
  background: var(--grad-primary);
  box-shadow: var(--shadow-colored-blue);
  position: relative; overflow: hidden;
}

.ledger-month-header::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(255,255,255,0.08), transparent);
}

.ledger-month-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 14px; font-weight: 800; color: #FFFFFF;
  display: flex; align-items: center; gap: 8px;
  letter-spacing: -0.01em; position: relative;
}

.ledger-month-count {
  font-size: 12px; font-weight: 600;
  color: rgba(255,255,255,0.75); position: relative;
}

/* Date sub-header */
.ledger-date-header {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 16px; margin: 12px 0 6px;
  background: var(--indigo-pale);
  border: 1px solid rgba(99,102,241,0.2);
  border-radius: 9px;
  font-size: 11.5px; font-weight: 700; color: var(--indigo);
  letter-spacing: 0.03em;
}

[data-theme="dark"] .ledger-date-header {
  background: rgba(99,102,241,0.1);
  border-color: rgba(99,102,241,0.2);
  color: var(--indigo-lt);
}

/* Individual Transaction Cards */
.txn-card-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }

.txn-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 16px;
  display: flex; align-items: center; gap: 14px;
  transition: all var(--t-normal);
  position: relative; overflow: hidden;
  box-shadow: var(--shadow-xs);
}

.txn-card::before {
  content: '';
  position: absolute; top: 0; left: 0;
  width: 4px; height: 100%;
  background: linear-gradient(180deg, var(--indigo), var(--cyan-lt));
  border-radius: 14px 0 0 14px;
}

.txn-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md), 0 0 0 1px rgba(99,102,241,0.15);
  border-color: rgba(99,102,241,0.28);
}

[data-theme="dark"] .txn-card:hover { box-shadow: var(--shadow-lg), var(--glow-indigo); }

/* Avatar circle */
.txn-card-avatar {
  width: 42px; height: 42px; border-radius: 12px;
  background: linear-gradient(135deg, var(--indigo-pale), var(--blue-pale));
  border: 1px solid rgba(99,102,241,0.2);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 16px; font-weight: 800; color: var(--indigo);
  flex-shrink: 0; text-transform: uppercase;
}

[data-theme="dark"] .txn-card-avatar {
  background: rgba(99,102,241,0.15);
  border-color: rgba(99,102,241,0.25);
  color: var(--indigo-lt);
}

.txn-card-main { flex: 1; min-width: 0; }

.txn-card-name {
  font-size: 14px; font-weight: 700; color: var(--text-1);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-bottom: 2px;
}

.txn-card-meta {
  font-size: 12px; color: var(--text-3);
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}

.txn-card-meta-dot {
  width: 3px; height: 3px; border-radius: 50%;
  background: var(--text-4); flex-shrink: 0;
}

.txn-card-uid {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; font-weight: 600; color: var(--indigo);
  background: var(--indigo-pale);
  padding: 2px 8px; border-radius: 5px;
  border: 1px solid rgba(99,102,241,0.15);
}

[data-theme="dark"] .txn-card-uid { color: var(--indigo-lt); background: rgba(99,102,241,0.1); }

/* Amount block */
.txn-card-amounts { text-align: right; flex-shrink: 0; }

.txn-card-amount-main {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 17px; font-weight: 800; color: var(--text-1);
  letter-spacing: -0.02em; line-height: 1.2;
}

.txn-card-commission {
  font-size: 11.5px; font-weight: 600; color: var(--emerald);
  margin-top: 2px;
}

/* ID mask row */
.txn-card-id-row {
  display: flex; align-items: center; gap: 6px;
  font-size: 11.5px; color: var(--text-3);
}

.txn-id-masked {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; font-weight: 600;
  color: var(--text-3); letter-spacing: 0.06em;
}

.txn-id-reveal-btn {
  width: 20px; height: 20px; border-radius: 5px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; color: var(--text-4);
  background: var(--bg-surface2); border: 1px solid var(--border);
  cursor: pointer; flex-shrink: 0;
  transition: all var(--t-fast);
}

.txn-id-reveal-btn:hover {
  color: var(--indigo); border-color: rgba(99,102,241,0.3);
  background: var(--indigo-pale);
}

/* Clickable card */
.txn-card-clickable {
  cursor: pointer;
}

.txn-card-clickable:hover .txn-card-avatar {
  background: var(--grad-primary);
  color: #fff;
  border-color: transparent;
}

/* Actions */
.txn-card-actions {
  display: flex; align-items: center; gap: 5px; flex-shrink: 0;
}

/* ==========================================================================
   CUSTOMER PROFILE MODAL
   ========================================================================== */
.customer-profile-modal .modal-box {
  max-width: 680px;
}

.cust-profile-header {
  display: flex; align-items: center; gap: 16px;
  padding: 22px 24px 18px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg, var(--indigo-pale) 0%, var(--blue-pale) 100%);
  border-radius: 22px 22px 0 0;
  position: relative; overflow: hidden;
}

[data-theme="dark"] .cust-profile-header {
  background: linear-gradient(135deg, rgba(99,102,241,0.12) 0%, rgba(37,99,235,0.08) 100%);
}

.cust-profile-header::before {
  content: '';
  position: absolute; top: 0; right: 0;
  width: 180px; height: 100%;
  background: radial-gradient(ellipse at right, rgba(99,102,241,0.15), transparent 70%);
}

.cust-profile-avatar-lg {
  width: 60px; height: 60px; border-radius: 16px; flex-shrink: 0;
  background: var(--grad-primary);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 26px; font-weight: 900; color: #fff;
  box-shadow: var(--shadow-colored-blue);
  position: relative; z-index: 1;
}

.cust-profile-meta { flex: 1; min-width: 0; position: relative; z-index: 1; }

.cust-profile-name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 18px; font-weight: 800; color: var(--text-1);
  letter-spacing: -0.02em; margin-bottom: 4px;
}

.cust-profile-id {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12.5px; font-weight: 600;
  color: var(--indigo); background: rgba(99,102,241,0.1);
  padding: 3px 10px; border-radius: 6px;
  display: inline-block; margin-bottom: 6px;
}

.cust-profile-tags {
  display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px;
}

.cust-profile-stat-row {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border-top: 1px solid var(--border);
}

.cust-profile-stat {
  background: var(--bg-surface);
  padding: 14px 20px; text-align: center;
}

.cust-profile-stat-val {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 20px; font-weight: 800; color: var(--text-1);
  letter-spacing: -0.02em;
}

.cust-profile-stat-lbl {
  font-size: 10.5px; font-weight: 700; color: var(--text-3);
  text-transform: uppercase; letter-spacing: 0.1em; margin-top: 2px;
}

.cust-profile-body { padding: 20px 24px; }

.cust-profile-section-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 12px; font-weight: 800; color: var(--text-3);
  text-transform: uppercase; letter-spacing: 0.14em;
  margin-bottom: 10px; margin-top: 18px;
  display: flex; align-items: center; gap: 8px;
}

.cust-profile-section-title:first-child { margin-top: 0; }

/* Print-specific: customer report */
@media print {
  #custProfilePrintArea {
    display: block !important;
    font-family: 'Inter', Arial, sans-serif;
  }
}

/* ==========================================================================
   DASHBOARD RECENT (card list)
   ========================================================================== */
.dash-recent-card-list {
  display: flex; flex-direction: column; gap: 8px;
  padding: 16px;
}


/* ==========================================================================
   FILTER BAR
   ========================================================================== */
.filter-bar {
  display: flex; align-items: center; gap: 10px;
  flex-wrap: wrap; padding: 14px 20px;
  border-bottom: 1px solid var(--border);
}

.search-box { position: relative; flex: 1; min-width: 200px; }
.search-box-icon {
  position: absolute; left: 12px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-3); font-size: 14px; pointer-events: none;
}
.search-input { padding-left: 36px !important; height: 36px; border-radius: 9px !important; }

/* ==========================================================================
   FORM ELEMENTS
   ========================================================================== */
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.form-group { display: flex; flex-direction: column; gap: 7px; }

.form-label {
  font-size: 11.5px; font-weight: 700; color: var(--text-3);
  text-transform: uppercase; letter-spacing: 0.08em;
}

.form-input, .form-select {
  width: 100%; padding: 11px 14px;
  border-radius: 11px; border: 1.5px solid var(--border);
  background: var(--bg-surface2); color: var(--text-1);
  font-size: 14px; font-weight: 500;
  transition: all var(--t-fast); outline: none; -webkit-appearance: none;
}

.form-input::placeholder { color: var(--text-4); }

.form-input:focus, .form-select:focus {
  border-color: var(--indigo-lt);
  background: var(--bg-surface);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.11);
}

.form-input[readonly] {
  cursor: not-allowed; color: var(--text-3);
  background: var(--bg-surface3);
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 7px; padding: 10px 20px;
  border-radius: 11px; font-family: 'Inter', sans-serif;
  font-size: 13.5px; font-weight: 600; cursor: pointer; border: none;
  transition: all var(--t-fast); white-space: nowrap; position: relative;
}

.btn-primary {
  background: var(--grad-primary);
  color: #fff;
  box-shadow: var(--shadow-colored-blue), inset 0 1px 0 rgba(255,255,255,0.2);
}

.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(79,70,229,0.38); }
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  background: var(--bg-surface2); color: var(--text-2);
  border: 1.5px solid var(--border);
}
.btn-secondary:hover { background: var(--bg-surface3); color: var(--text-1); border-color: var(--border-md); }

.btn-danger {
  background: var(--grad-danger); color: #fff;
  box-shadow: var(--shadow-colored-rose);
}
.btn-danger:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(225,29,72,0.38); }

.btn-success {
  background: var(--grad-success); color: #fff;
  box-shadow: var(--shadow-colored-green);
}
.btn-success:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(5,150,105,0.38); }

.btn-ghost {
  background: transparent; color: var(--text-3);
  border: 1.5px solid var(--border);
}
.btn-ghost:hover { background: var(--bg-surface2); color: var(--text-1); border-color: var(--border-md); }

.btn-sm  { padding: 7px 14px; font-size: 12.5px; border-radius: 9px; }
.btn-xs  { padding: 5px 10px; font-size: 11.5px; border-radius: 7px; }

/* ==========================================================================
   TOGGLE SWITCH
   ========================================================================== */
.toggle-switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; }
.toggle-switch input { display: none; }
.toggle-track {
  width: 42px; height: 22px; border-radius: 11px;
  background: var(--bg-surface3); border: 1.5px solid var(--border);
  position: relative; transition: all var(--t-fast);
}
.toggle-track::after {
  content: ''; position: absolute; top: 3px; left: 3px;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--text-3); transition: all var(--t-bounce);
}
.toggle-switch input:checked + .toggle-track {
  background: var(--indigo-lt); border-color: var(--indigo-lt);
  box-shadow: 0 0 12px rgba(99,102,241,0.3);
}
.toggle-switch input:checked + .toggle-track::after { transform: translateX(20px); background: #fff; }
.toggle-label { font-size: 13px; font-weight: 600; color: var(--text-2); }

/* Timeframe */
.timeframe-btns {
  display: flex; gap: 3px;
  background: var(--bg-surface2); padding: 4px;
  border-radius: 10px; border: 1px solid var(--border);
}
.timeframe-btn {
  padding: 6px 14px; border-radius: 7px;
  font-size: 12.5px; font-weight: 600; color: var(--text-3); cursor: pointer;
  transition: all var(--t-fast);
}
.timeframe-btn:hover { color: var(--text-1); }
.timeframe-btn.active { background: var(--bg-surface); color: var(--indigo); box-shadow: var(--shadow-xs); }
[data-theme="dark"] .timeframe-btn.active { color: var(--indigo-lt); }

/* Preset row */
.preset-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 22px; border-bottom: 1px solid var(--border); transition: background var(--t-fast);
}
.preset-row:last-child { border-bottom: none; }
.preset-row:hover { background: var(--indigo-pale); }
[data-theme="dark"] .preset-row:hover { background: rgba(99,102,241,0.06); }

/* ==========================================================================
   MODALS — smooth visibility transition
   ========================================================================== */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(15,23,42,0.45);
  backdrop-filter: blur(10px) saturate(1.5);
  -webkit-backdrop-filter: blur(10px) saturate(1.5);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000; padding: 20px;
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity 200ms ease, visibility 200ms ease;
}

[data-theme="dark"] .modal-backdrop { background: rgba(4,4,16,0.78); }

.modal-backdrop.active { opacity: 1; visibility: visible; pointer-events: auto; }

.modal-box {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: var(--shadow-xl), 0 0 0 1px rgba(99,102,241,0.06);
  width: 100%; max-width: 500px;
  max-height: 90vh; overflow-y: auto;
  position: relative;
  transform: scale(0.91) translateY(12px);
  opacity: 0;
  transition: transform 300ms cubic-bezier(.34,1.56,.64,1), opacity 240ms ease;
}

.modal-backdrop.active .modal-box { transform: scale(1) translateY(0); opacity: 1; }

/* Top shimmer line */
.modal-box::before {
  content: '';
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 55%; height: 2px;
  background: linear-gradient(90deg, transparent, var(--indigo-lt), var(--cyan-lt), transparent);
  border-radius: 0 0 4px 4px; opacity: 0.8;
}

.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 22px 16px; border-bottom: 1px solid var(--border);
}

.modal-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 16px; font-weight: 700; color: var(--text-1);
  display: flex; align-items: center; gap: 10px;
}

.modal-close-btn {
  width: 32px; height: 32px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-3); font-size: 16px;
  background: var(--bg-surface2); border: 1px solid var(--border);
  transition: all var(--t-fast); cursor: pointer;
}

.modal-close-btn:hover {
  color: var(--rose); border-color: rgba(225,29,72,0.3);
  background: var(--rose-pale);
}

[data-theme="dark"] .modal-close-btn:hover { background: rgba(251,113,133,0.1); }

.modal-body  { padding: 22px; }
.modal-footer {
  padding: 16px 22px; border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: flex-end; gap: 10px;
}

/* PIN Modal */
.pin-lock-icon {
  width: 64px; height: 64px; border-radius: 18px;
  background: linear-gradient(135deg, var(--indigo-pale), var(--cyan-pale));
  border: 1.5px solid rgba(99,102,241,0.25);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; margin: 0 auto 16px; box-shadow: var(--glow-indigo);
}

.pin-input {
  text-align: center;
  font-family: 'JetBrains Mono', monospace !important;
  font-size: 28px !important; letter-spacing: 0.5em !important;
  padding: 16px !important;
  background: var(--bg-surface2) !important; border-color: var(--border) !important;
}
.pin-input:focus {
  border-color: var(--indigo-lt) !important;
  box-shadow: 0 0 0 3px rgba(99,102,241,0.12) !important;
}

/* ==========================================================================
   RECEIPT BOX  (always pure white / print-ready)
   ========================================================================== */
.receipt-box {
  background: #ffffff; color: #0f172a;
  border-radius: 14px; padding: 24px;
  max-width: 380px; margin: 0 auto;
  border: 1px solid #e2e8f0;
  font-family: 'Inter', sans-serif;
  box-shadow: 0 4px 20px rgba(0,0,0,0.07);
}

.receipt-header {
  text-align: center;
  padding-bottom: 14px; margin-bottom: 14px;
  border-bottom: 2px solid #1e293b;
}

.receipt-brand-name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 15px; font-weight: 800; color: #111827; letter-spacing: 0.01em;
}

.receipt-brand-sub   { font-size: 10px; color: #64748b; margin-top: 2px; }
.receipt-slip-title  {
  margin-top: 8px; font-size: 10.5px; font-weight: 800;
  letter-spacing: 0.14em; text-transform: uppercase; color: #334155;
}

.receipt-row {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 6px 0; border-bottom: 1px dotted #e2e8f0;
  font-size: 13px;
}
.receipt-row:last-of-type { border-bottom: none; }
.receipt-row span:first-child { color: #475569; }
.receipt-row strong { color: #111827; font-weight: 700; }

.receipt-separator { border: none; border-top: 2px dashed #334155; margin: 12px 0 8px; }

.receipt-amount-row {
  display: flex; justify-content: space-between;
  padding: 7px 0; font-size: 13.5px;
}

.receipt-footer-note {
  text-align: center; font-size: 11px; color: #94a3b8;
  margin-top: 12px; padding-top: 12px;
  border-top: 1px solid #e2e8f0;
}

/* ==========================================================================
   TOASTS
   ========================================================================== */
.toast-container {
  position: fixed; bottom: 90px; right: 24px;
  display: flex; flex-direction: column; gap: 8px;
  z-index: 3000; max-width: 360px;
}

.toast-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 16px; border-radius: 14px;
  background: var(--bg-surface); border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  animation: toastIn 0.3s var(--t-bounce);
}

@keyframes toastIn {
  from { opacity: 0; transform: translateX(40px) scale(0.9); }
  to   { opacity: 1; transform: translateX(0) scale(1); }
}

.toast-icon {
  width: 32px; height: 32px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; flex-shrink: 0;
}

.toast-content { flex: 1; }
.toast-title { font-size: 13px; font-weight: 700; color: var(--text-1); }
.toast-msg   { font-size: 12px; color: var(--text-3); margin-top: 1px; }

.toast-success { border-left: 3px solid var(--emerald); }
.toast-success .toast-icon { background: var(--emerald-pale); }
.toast-danger  { border-left: 3px solid var(--rose); }
.toast-danger  .toast-icon { background: var(--rose-pale); }
.toast-warning { border-left: 3px solid var(--amber); }
.toast-warning .toast-icon { background: var(--amber-pale); }
.toast-info    { border-left: 3px solid var(--indigo); }
.toast-info    .toast-icon { background: var(--indigo-pale); }

[data-theme="dark"] .toast-success .toast-icon { background: var(--emerald-pale); }
[data-theme="dark"] .toast-danger  .toast-icon { background: var(--rose-pale); }
[data-theme="dark"] .toast-warning .toast-icon { background: var(--amber-pale); }
[data-theme="dark"] .toast-info    .toast-icon { background: var(--indigo-pale); }

/* ==========================================================================
   FLOATING DB STATUS
   ========================================================================== */
.floating-db-status {
  position: fixed; bottom: 24px; right: 24px; z-index: 1100;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 16px; border-radius: 20px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  font-size: 12px; font-weight: 600; color: var(--text-2);
  cursor: default; transition: all var(--t-normal);
}

.floating-db-status:hover {
  border-color: var(--border-glow);
  box-shadow: var(--glow-indigo), var(--shadow-md);
  transform: translateY(-2px);
}

.db-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--emerald); box-shadow: 0 0 6px var(--emerald);
  animation: pulse-dot 2s infinite;
}

.db-dot.offline { background: var(--rose); box-shadow: 0 0 6px var(--rose); animation: none; }

/* ==========================================================================
   SCROLLBARS
   ========================================================================== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(99,102,241,0.2); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(99,102,241,0.4); }

/* ==========================================================================
   PRINT STYLES — Exact match to preview
   ========================================================================== */
#printable-receipt-container { display: none; }

@media print {
  /* Hide all app UI */
  body > *        { display: none !important; }
  body::before, body::after, .orb-secondary { display: none !important; }

  /* Receipt print */
  #printable-receipt-container {
    display: flex !important;
    position: fixed; inset: 0;
    background: #fff !important;
    align-items: flex-start;
    justify-content: center;
    padding: 20px;
  }

  #printable-receipt-container .receipt-box {
    border: 1px solid #334155 !important;
    box-shadow: none !important;
    width: 100% !important; max-width: 380px !important;
    page-break-inside: avoid;
    font-family: 'Inter', Arial, sans-serif !important;
    background: #fff !important;
    color: #0f172a !important;
  }

  /* Customer report print */
  #custProfilePrintArea {
    display: block !important;
    position: fixed; inset: 0;
    background: #fff !important;
    padding: 20px;
    overflow: auto;
  }

  @page {
    size: A4;
    margin: 10mm;
  }
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 768px) {
  .app-sidebar { width: var(--sidebar-collapsed); }
  .main-container { margin-left: var(--sidebar-collapsed); }
  .content-area { padding: 16px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .content-area { padding: 12px; }
  .filter-bar { padding: 12px; }
}
