/* ==========================================================================
   DUKAAN PRO - PREMIUM MODERN SaaS STYLESHEET
   ========================================================================== */

/* ============ IMPORT PREMIUM FONTS ============ */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800;900&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Noto+Sans+Devanagari:wght@400;600;700&display=swap');

/* ============ THEME DEFINITIONS ============ */
:root {
  /* Brand Palette (Premium Monochrome Zinc/Obsidian & Silver Accent) */
  --p: #09090b;          /* Obsidian Black Primary */
  --p-text: #ffffff;     /* White text on primary button/badge */
  --p2: #27272a;         /* Dark Charcoal Tint */
  --p3: #71717a;         /* Zinc/Silver Muted */
  --p4: #f4f4f5;         /* Premium Silver/Zinc Light Tint */
  --menu-active: #8a704c; /* Gold/Bronze active state */
  --menu-hover-bg: rgba(138, 112, 76, 0.04); /* Warm gold/bronze hover background tint */
  
  --acc: #8a704c;        /* Warm Gold/Bronze Primary */
  --acc2: #a38a68;       /* Gold/Bronze Tint */
  --acc3: #fcf9f2;       /* Warm Offset Gold Muted background */
  
  --g: #2d6a4f;          /* Muted Sage/Teal Green Primary */
  --g2: #40916c;         /* Sage/Teal Tint */
  --g3: #edf7f4;         /* Sage/Teal Light background */
  
  --r: #a63a50;          /* Crimson Red Primary */
  --r2: #c84c61;         /* Crimson Tint */
  --r3: #fdf2f4;         /* Crimson Light background */
  
  --o: #c25e00;          /* Muted Amber Primary */
  --o2: #e07a1a;         /* Muted Amber Tint */
  --o3: #fef7ed;         /* Muted Amber Light background */
  
  /* Neutral Palette (Light Mode Default Offset White) */
  --bg: #fafafd;         /* Premium Off-White / Alabaster */
  --bg2: #f4f4f6;        /* Light Gray Offset */
  --bg3: #e5e5ea;        /* Medium Gray Offset */
  
  --card: #ffffff;       /* Pure White Card */
  --card2: #fafafa;
  --card-glass: rgba(250, 250, 253, 0.85);
  
  --t1: #18181b;         /* Zinc 900 (Primary text) */
  --t2: #3f3f46;         /* Zinc 700 (Secondary text) */
  --t3: #52525b;         /* Zinc 600 */
  --t4: #71717a;         /* Zinc 500 */
  --t5: #a1a1aa;         /* Zinc 400 */
  
  --bdr: #ededf0;        /* Micro-fine zinc border */
  --bdr2: #e4e4e7;       /* Zinc 200 Border */
  --bdr-glow: rgba(138, 112, 76, 0.05);
  
  /* Shadows & Layout */
  --sh: 0 2px 8px -1px rgba(0, 0, 0, 0.02), 0 1px 3px -1px rgba(0, 0, 0, 0.01);
  --sh2: 0 12px 24px -4px rgba(0, 0, 0, 0.04), 0 4px 12px -2px rgba(0, 0, 0, 0.02);
  --sh3: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.03);
  --sh-glow: 0 0 20px rgba(138, 112, 76, 0.02);
  
  --sidebar-w: 280px;
  --header-h: 72px;
  --nav-h: 72px;
  
  --rad: 16px;
  --rad2: 12px;
  --rad3: 8px;
  
  --tr: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font: 'Plus Jakarta Sans', 'Noto Sans Devanagari', sans-serif;
  --font-display: 'Outfit', sans-serif;
}

[data-theme="dark"] {
  /* Neutral Palette (Premium Obsidian Dark Mode) */
  --bg: #09090b;         /* Obsidian Space Black */
  --bg2: #18181b;        /* Obsidian Dark */
  --bg3: #27272a;        /* Obsidian Medium */
  
  --p: #fafafa;          /* Silver/White Primary in dark mode */
  --p2: #e4e4e7;         /* Silver Tint */
  --p3: #a1a1aa;         /* Silver Muted */
  --p-text: #09090b;     /* Dark text on primary buttons/badges */
  --menu-active: var(--acc2);
  --menu-hover-bg: rgba(250, 250, 250, 0.05);
  
  --card: #18181b;       /* Card Obsidian Base */
  --card2: #27272a;      /* Card Obsidian Light */
  --card-glass: rgba(24, 24, 27, 0.85);
  
  --t1: #f4f4f5;         /* Zinc 100 */
  --t2: #d4d4d8;         /* Zinc 300 */
  --t3: #a1a1aa;         /* Zinc 400 */
  --t4: #71717a;         /* Zinc 500 */
  --t5: #52525b;         /* Zinc 600 */
  
  --bdr: #27272a;        /* Obsidian Border */
  --bdr2: #3f3f46;       /* Obsidian Border Light */
  --bdr-glow: rgba(250, 250, 250, 0.06);
  
  --p4: rgba(250, 250, 250, 0.08); /* Silver Accent */
  --acc3: #2a2218;       /* Dark Gold/Bronze */
  --g3: #14241c;         /* Dark Muted Green */
  --r3: #2d161a;         /* Dark Crimson */
  --o3: #2e1c0c;         /* Dark Amber */
  
  --sh: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -2px rgba(0, 0, 0, 0.4);
  --sh2: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -4px rgba(0, 0, 0, 0.5);
  --sh3: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
  --sh-glow: 0 0 25px rgba(250, 250, 250, 0.04);
}

/* ============ RESET & GLOBAL STYLES ============ */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  height: 100%;
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--t1);
  min-height: 100%;
  overflow-x: hidden;
  transition: background 0.3s ease, color 0.3s ease;
  line-height: 1.5;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--bg3);
  border-radius: 20px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--t5);
}

/* ============ APP LAYOUT ============ */
#app-shell {
  display: flex;
  min-height: 100vh;
}

/* SIDEBAR DESKTOP */
#sidebar {
  width: var(--sidebar-w);
  height: 100vh;
  background: var(--card);
  border-right: 1px solid var(--bdr);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 300;
  transition: var(--tr);
  overflow: hidden;
}

.sidebar-brand {
  padding: 24px 20px;
  border-bottom: 1px solid var(--bdr);
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, #27272a, #09090b);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--sh2);
  flex-shrink: 0;
  overflow: hidden;
}

.brand-logo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand-text {
  line-height: 1.25;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--t1);
  letter-spacing: -0.03em;
}

.brand-sub {
  font-size: 0.72rem;
  color: var(--t4);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.sidebar-shop {
  padding: 14px 16px;
  margin: 16px;
  background: var(--bg2);
  border-radius: var(--rad2);
  border: 1px solid var(--bdr);
  transition: var(--tr);
}
.sidebar-shop:hover {
  border-color: var(--p3);
  background: var(--card2);
}

.sidebar-shop-name {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--t1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-shop-sub {
  font-size: 0.7rem;
  color: var(--t4);
  margin-top: 2px;
  font-family: monospace;
}

.sidebar-nav {
  flex: 1;
  padding: 8px 12px;
  overflow-y: auto;
}

.sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--rad2);
  cursor: pointer;
  color: var(--t3);
  font-weight: 600;
  font-size: 0.9rem;
  transition: var(--tr);
  margin-bottom: 4px;
  position: relative;
}

.sidebar-nav-item:hover {
  background: var(--menu-hover-bg);
  color: var(--menu-active);
  transform: translateX(3px);
}

.sidebar-nav-item.active {
  background: var(--p4);
  color: var(--menu-active);
  font-weight: 700;
}
/* Inherit standard active styling for sidebar navigation items in dark mode */

.sidebar-nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 25%;
  bottom: 25%;
  width: 4px;
  background: var(--menu-active);
  border-radius: 0 4px 4px 0;
}

.nav-icon-s {
  font-size: 1.15rem;
  width: 20px;
  text-align: center;
}

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--bdr);
}

/* MAIN AREA */
#main-area {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: var(--tr);
}

/* TOP HEADER BAR */
#topbar {
  height: var(--header-h);
  background: var(--card-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--bdr);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  position: sticky;
  top: 0;
  z-index: 200;
  box-shadow: var(--sh);
}

.topbar-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--t1);
  letter-spacing: -0.02em;
}

.topbar-subtitle {
  font-size: 0.75rem;
  color: var(--t4);
  font-weight: 500;
  margin-top: 1px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 20px;
  border: 1px solid var(--bdr);
  background: var(--card);
  color: var(--t2);
  font-family: var(--font);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--tr);
}

.topbar-btn:hover {
  background: var(--bg2);
  color: var(--p);
  border-color: var(--bdr2);
  transform: translateY(-1px);
}

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--bdr);
  background: var(--card);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: var(--tr);
}

.icon-btn:hover {
  background: var(--bg2);
  border-color: var(--bdr2);
  transform: scale(1.05);
}

/* PAGE CONTENT */
#page-content {
  flex: 1;
  padding: 32px;
  overflow-y: auto;
  scroll-behavior: smooth;
}

.page {
  display: none;
  animation: pageFadeIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.page.active {
  display: block;
}

@keyframes pageFadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* BOTTOM NAVIGATION (MOBILE - MODERN BUBBLE TAB BAR) */
#bottom-nav {
  display: none;
  position: fixed;
  bottom: 16px;
  left: 16px;
  right: 16px;
  height: 64px;
  background: rgba(24, 24, 27, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 32px;
  z-index: 500;
  box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.35), 0 8px 10px -6px rgba(0, 0, 0, 0.2);
}
[data-theme="light"] #bottom-nav {
  background: rgba(9, 9, 11, 0.93);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.bnav-inner {
  display: flex;
  align-items: center;
  justify-content: space-around;
  height: 100%;
  padding: 0 8px;
}

.bnav-item {
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #a1a1aa; /* Zinc 400 */
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 8px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
  gap: 6px;
}

.bnav-item span {
  display: none;
  animation: fadeInLabel 0.25s ease-out forwards;
}

.bnav-item.active {
  background: var(--acc); /* Premium Bronze/Gold */
  color: #ffffff;
  padding: 8px 16px;
}

.bnav-item.active span {
  display: inline-block;
}

@keyframes fadeInLabel {
  from { opacity: 0; transform: translateX(-4px); }
  to { opacity: 1; transform: translateX(0); }
}

.bnav-icon {
  font-size: 1.2rem;
  display: flex;
  align-items: center;
}

/* POPUP NAVIGATION MENU SHEET */
.menu-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding: 10px 0 20px;
}
.menu-item-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: var(--tr);
}
.menu-item-tile:hover {
  transform: translateY(-2px);
}
.menu-item-tile:active {
  transform: scale(0.95);
}
.menu-tile-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: #ffffff;
  box-shadow: var(--sh2);
}
.menu-tile-icon.purple { background: linear-gradient(135deg, #8a704c, #a38a68); }
.menu-tile-icon.green { background: linear-gradient(135deg, #2d6a4f, #40916c); }
.menu-tile-icon.amber { background: linear-gradient(135deg, #c25e00, #e07a1a); }
.menu-tile-icon.red { background: linear-gradient(135deg, #a63a50, #c84c61); }
.menu-tile-icon.blue { background: linear-gradient(135deg, #3f3f46, #18181b); }
.menu-tile-icon.gray { background: linear-gradient(135deg, #71717a, #52525b); }

.menu-tile-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--t1);
  text-align: center;
  line-height: 1.2;
}

/* MOBILE APP HEADER */
#mobile-header {
  display: none;
  background: var(--card-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--bdr);
  padding: 12px 16px;
  position: sticky;
  top: 0;
  z-index: 200;
  box-shadow: var(--sh);
}

.mh-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mh-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mh-logo {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, #27272a, #09090b);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: var(--sh);
  flex-shrink: 0;
}

.mh-logo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mh-name {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--t1);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.mh-shop {
  font-size: 0.72rem;
  color: var(--t4);
  font-weight: 500;
}

.mh-actions {
  display: flex;
  gap: 8px;
}

.mh-btn {
  padding: 6px 12px;
  border-radius: 16px;
  border: 1px solid var(--bdr);
  background: var(--card);
  color: var(--t2);
  font-family: var(--font);
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
}

/* ==========================================================================
   CARDS & CONTAINERS
   ========================================================================== */
.card {
  background: var(--card);
  border-radius: var(--rad);
  border: 1px solid var(--bdr);
  box-shadow: var(--sh);
  transition: var(--tr);
}

.card:hover {
  box-shadow: var(--sh2);
  border-color: var(--bdr2);
}

.card-p {
  padding: 24px;
}

.card-sm {
  padding: 16px;
}

/* STAT CARDS */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  border-radius: var(--rad);
  padding: 20px;
  position: relative;
  overflow: hidden;
  cursor: default;
  background: var(--card);
  border: 1px solid var(--bdr);
  box-shadow: var(--sh);
  transition: var(--tr);
  animation: cardSlideIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--sh2);
}

@keyframes cardSlideIn {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.stat-card:nth-child(1) { animation-delay: 0.04s; }
.stat-card:nth-child(2) { animation-delay: 0.08s; }
.stat-card:nth-child(3) { animation-delay: 0.12s; }
.stat-card:nth-child(4) { animation-delay: 0.16s; }

/* Glowing Indicator Accents on Stat Cards instead of ugly heavy solid gradients */
.stat-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
}
.stat-card.purple::before { background: var(--p); }
.stat-card.green::before { background: var(--g); }
.stat-card.amber::before { background: var(--acc); }
.stat-card.red::before { background: var(--r); }

.stat-icon-wrap {
  font-size: 1.5rem;
  margin-bottom: 12px;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--tr);
}
.stat-card.purple .stat-icon-wrap { background: var(--p4); color: var(--p); }
.stat-card.green .stat-icon-wrap { background: var(--g3); color: var(--g); }
.stat-card.amber .stat-icon-wrap { background: var(--acc3); color: var(--acc); }
.stat-card.red .stat-icon-wrap { background: var(--r3); color: var(--r); }

[data-theme="dark"] .stat-card.purple .stat-icon-wrap { background: rgba(13, 148, 136, 0.15); }
[data-theme="dark"] .stat-card.green .stat-icon-wrap { background: rgba(20, 184, 166, 0.15); }
[data-theme="dark"] .stat-card.amber .stat-icon-wrap { background: rgba(245, 158, 11, 0.15); }
[data-theme="dark"] .stat-card.red .stat-icon-wrap { background: rgba(244, 63, 94, 0.15); }

.stat-val {
  font-family: var(--font-display);
  font-size: 1.85rem;
  font-weight: 800;
  line-height: 1.1;
  color: var(--t1);
  letter-spacing: -0.03em;
}

.stat-lbl {
  font-size: 0.78rem;
  color: var(--t4);
  margin-top: 6px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--rad2);
  border: 1px solid transparent;
  font-family: var(--font);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--tr);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: var(--p);
  color: var(--p-text, #ffffff);
  box-shadow: 0 4px 12px rgba(9, 9, 11, 0.15);
}
.btn-primary:hover {
  background: var(--p2);
  color: var(--p-text, #ffffff);
  box-shadow: 0 6px 16px rgba(9, 9, 11, 0.25);
  transform: translateY(-1px);
}

.btn-accent {
  background: var(--acc);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(217, 119, 6, 0.2);
}
.btn-accent:hover {
  background: var(--acc2);
  transform: translateY(-1px);
}

.btn-green {
  background: var(--g);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.2);
}
.btn-green:hover {
  background: var(--g2);
  transform: translateY(-1px);
}

.btn-red {
  background: var(--r);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(225, 29, 72, 0.2);
}
.btn-red:hover {
  background: var(--r2);
  transform: translateY(-1px);
}

.btn-wa {
  background: #128c7e;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(18, 140, 126, 0.2);
}
.btn-wa:hover {
  background: #25d366;
  transform: translateY(-1px);
}

.btn-ghost {
  background: var(--bg2);
  color: var(--t2);
  border: 1px solid var(--bdr);
}
.btn-ghost:hover {
  background: var(--bg3);
  color: var(--t1);
}

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--p);
  color: var(--p);
}
.btn-outline:hover {
  background: var(--p4);
}
[data-theme="dark"] .btn-outline:hover {
  background: rgba(250, 250, 250, 0.08);
}

.btn-block {
  width: 100%;
}

.btn-sm {
  padding: 8px 14px;
  font-size: 0.8rem;
  border-radius: 10px;
}

.btn-xs {
  padding: 6px 10px;
  font-size: 0.72rem;
  border-radius: var(--rad3);
}

.btn-icon {
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 10px;
}

/* ==========================================================================
   FORMS & INPUTS
   ========================================================================== */
.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--t3);
  margin-bottom: 6px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.form-control {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--bdr);
  border-radius: var(--rad2);
  font-family: var(--font);
  font-size: 0.88rem;
  color: var(--t1);
  background: var(--card);
  transition: var(--tr);
  outline: none;
}

.form-control:focus {
  border-color: var(--p);
  box-shadow: 0 0 0 3px rgba(9, 9, 11, 0.08);
  background: var(--card);
}

.form-control::placeholder {
  color: var(--t5);
}

select.form-control {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19.5 8.25l-7.5 7.5-7.5-7.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px;
  padding-right: 40px;
}

textarea.form-control {
  resize: vertical;
  min-height: 80px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.input-group {
  display: flex;
}
.input-group .form-control {
  border-radius: var(--rad2) 0 0 var(--rad2);
}
.input-group .btn {
  border-radius: 0 var(--rad2) var(--rad2) 0;
}

/* ==========================================================================
   APP SCREENS & STEPS
   ========================================================================== */

/* ONBOARDING SETUP SCREEN - MODERN MESH GLASS LOOK */
#setup-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  overflow-y: auto;
  background: #060913;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 0;
  min-height: 100vh;
}

.setup-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}
.setup-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  animation: orbFloat 12s ease-in-out infinite;
}
.setup-orb1 { width: 500px; height: 500px; background: rgba(255, 255, 255, 0.08); top: -100px; right: -100px; }
.setup-orb2 { width: 450px; height: 450px; background: rgba(138, 112, 76, 0.06); bottom: -100px; left: -100px; animation-delay: 4s; }
.setup-orb3 { width: 350px; height: 350px; background: rgba(255, 255, 255, 0.03); top: 30%; left: 20%; animation-delay: 7s; }

@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(30px, -30px) scale(1.08); }
}

.setup-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
  background-size: 40px 40px;
}

.setup-outer {
  width: 100%;
  max-width: 580px;
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 48px 20px;
}

.setup-topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}
.setup-topbar-logo {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--p), var(--p2));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}
.setup-topbar-name {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 900;
  color: #ffffff;
}
.setup-topbar-name span {
  color: var(--acc2);
}
.setup-topbar-badge {
  padding: 3px 8px;
  border-radius: 20px;
  background: rgba(20, 184, 166, 0.2);
  border: 1px solid rgba(20, 184, 166, 0.4);
  color: #2dd4bf;
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.setup-headline {
  text-align: center;
  margin-bottom: 32px;
}
.setup-headline h1 {
  font-size: 2.15rem;
  color: #ffffff;
  line-height: 1.15;
  margin-bottom: 12px;
}
.setup-headline h1 .hl {
  background: linear-gradient(135deg, #ffffff, var(--acc2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.setup-headline p {
  color: var(--t4);
  font-size: 0.95rem;
  max-width: 460px;
  margin: 0 auto;
}

.setup-feat-strip {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 32px;
}
.setup-feat-pill {
  padding: 6px 14px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--t3);
  font-size: 0.75rem;
  font-weight: 600;
}

.setup-card {
  width: 100%;
  background: rgba(17, 24, 39, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  padding: 32px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.setup-logo-upload {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 2px dashed rgba(255, 255, 255, 0.15);
  border-radius: var(--rad2);
  margin-bottom: 24px;
  cursor: pointer;
  transition: var(--tr);
}
.setup-logo-upload:hover {
  border-color: var(--acc2);
  background: rgba(255, 255, 255, 0.05);
}
.setup-logo-preview {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}
.setup-logo-txt strong {
  display: block;
  font-size: 0.85rem;
  color: #ffffff;
}
.setup-logo-txt span {
  font-size: 0.72rem;
  color: var(--t4);
}
.setup-logo-btn {
  margin-left: auto;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.75rem;
  cursor: pointer;
}

.setup-fields-new {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}
.setup-fg {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.setup-fg.full {
  grid-column: 1 / -1;
}
.setup-lbl {
  font-size: 0.73rem;
  font-weight: 700;
  color: var(--t3);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.setup-lbl .req {
  color: var(--r2);
}
.setup-inp {
  padding: 11px 14px;
  border: 1.5px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--rad2);
  font-size: 0.88rem;
  font-family: var(--font);
  color: #ffffff;
  background: rgba(255, 255, 255, 0.04);
  transition: var(--tr);
  outline: none;
}
.setup-inp:focus {
  border-color: var(--acc2);
  background: rgba(255, 255, 255, 0.07);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.08);
}
.setup-inp-hint {
  font-size: 0.68rem;
  color: var(--t4);
}
.setup-err {
  font-size: 0.7rem;
  color: #f87171;
  font-weight: 600;
  min-height: 16px;
  display: block;
  animation: fadeIn 0.2s ease;
}
.setup-inp.error {
  border-color: #f87171 !important;
  background: rgba(248, 113, 113, 0.06) !important;
}
.setup-scan-btn {
  padding: 10px 14px;
  border-radius: var(--rad2);
  border: 1.5px solid var(--acc2);
  background: rgba(163, 138, 104, 0.15);
  color: var(--acc2);
  font-family: var(--font);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--tr);
  display: flex;
  align-items: center;
  gap: 6px;
}
.setup-scan-btn:hover {
  background: rgba(163, 138, 104, 0.3);
  transform: scale(1.03);
}

.setup-submit {
  width: 100%;
  padding: 14px;
  border-radius: var(--rad2);
  border: none;
  background: linear-gradient(135deg, #ffffff, #e4e4e7);
  color: #09090b;
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  transition: var(--tr);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 16px;
}
.setup-submit:hover {
  transform: translateY(-1px);
  background: linear-gradient(135deg, #e4e4e7, #d4d4d8);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
}
.setup-submit-arr {
  font-size: 1.1rem;
}

.setup-trust {
  display: flex;
  justify-content: center;
  gap: 16px;
}
.setup-trust-item {
  font-size: 0.68rem;
  color: var(--t4);
  font-weight: 600;
}

/* REMINDER HERO DASHBOARD BANNER */
.reminder-hero {
  background: linear-gradient(135deg, #18181b 0%, #09090b 100%);
  border-radius: var(--rad);
  padding: 32px;
  color: #ffffff;
  position: relative;
  overflow: hidden;
  margin-bottom: 24px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: var(--sh2);
}

.reminder-hero::before {
  content: '';
  position: absolute;
  right: -50px;
  top: -50px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(138, 112, 76, 0.12) 0%, transparent 70%);
}

.hero-label {
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--p3);
  font-weight: 700;
  margin-bottom: 8px;
}

.hero-title {
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 6px;
}
.hero-title span {
  color: var(--acc2);
}

.hero-sub {
  font-size: 0.88rem;
  color: var(--t3);
  margin-bottom: 24px;
  max-width: 450px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  position: relative;
  z-index: 1;
}

.hero-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: var(--rad2);
  font-family: var(--font);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: var(--tr);
}
.hero-btn:hover {
  transform: translateY(-2px);
}
.hero-btn-primary {
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.15);
}
.hero-btn-outline {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
}

.hero-stats {
  display: flex;
  gap: 32px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.hero-stat {
  flex: 1;
}
.hero-stat-val {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--acc2);
}
.hero-stat-lbl {
  font-size: 0.68rem;
  color: var(--t3);
  font-weight: 600;
  text-transform: uppercase;
  margin-top: 2px;
}

/* SECTION HEADERS */
.section-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.section-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--t1);
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-icon {
  font-size: 1.25rem;
}
.section-link {
  font-size: 0.8rem;
  color: var(--p);
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.section-link:hover {
  color: var(--p2);
}

/* QUICK ACTIONS GRID */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.qa-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px;
  border-radius: var(--rad);
  border: 1px solid var(--bdr);
  background: var(--card);
  cursor: pointer;
  transition: var(--tr);
}
.qa-btn:hover {
  border-color: var(--p2);
  transform: translateY(-2px);
  box-shadow: var(--sh2);
}
.qa-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  transition: var(--tr);
}
.qa-icon-p { background: var(--p4); color: var(--p); }
.qa-icon-g { background: var(--g3); color: var(--g); }
.qa-icon-a { background: var(--acc3); color: var(--acc); }
.qa-icon-r { background: var(--r3); color: var(--r); }

[data-theme="dark"] .qa-icon-p { background: rgba(20, 184, 166, 0.15); }
[data-theme="dark"] .qa-icon-g { background: rgba(20, 184, 166, 0.15); }
[data-theme="dark"] .qa-icon-a { background: rgba(245, 158, 11, 0.15); }
[data-theme="dark"] .qa-icon-r { background: rgba(244, 63, 94, 0.15); }

.qa-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--t2);
  text-align: center;
}

/* ==========================================================================
   LIST COMPONENTS
   ========================================================================== */

/* CUSTOMER LIST ITEM */
.cust-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: var(--card);
  border-radius: var(--rad);
  margin-bottom: 10px;
  border: 1px solid var(--bdr);
  cursor: pointer;
  transition: var(--tr);
  animation: listIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.cust-card:hover {
  border-color: var(--p2);
  box-shadow: var(--sh2);
  transform: translateX(4px);
}

.cust-av {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--p), var(--p2));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--p-text, #ffffff);
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(9, 9, 11, 0.1);
}

.cust-info {
  flex: 1;
  min-width: 0;
}

.cust-name {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--t1);
}

.cust-phone {
  font-size: 0.78rem;
  color: var(--t4);
  margin-top: 1px;
}

.cust-bal {
  text-align: right;
  flex-shrink: 0;
}

.bal-amt {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 800;
}
.bal-due { color: var(--r2); }
.bal-ok { color: var(--g2); }
.bal-zero { color: var(--t4); }

.bal-lbl {
  font-size: 0.68rem;
  color: var(--t4);
  font-weight: 700;
  text-transform: uppercase;
  margin-top: 1px;
}

@keyframes listIn {
  from { opacity: 0; transform: translateX(-12px); }
  to { opacity: 1; transform: translateX(0); }
}

/* TRANSACTION LIST */
.txn-list {
  border-radius: var(--rad);
  overflow: hidden;
  border: 1px solid var(--bdr);
}
.txn-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
  background: var(--card);
  border-bottom: 1px solid var(--bdr);
  transition: var(--tr);
}
.txn-row:last-child {
  border-bottom: none;
}
.txn-row:hover {
  background: var(--bg2);
}
.txn-dot {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.t-credit { background: var(--r3); color: var(--r); }
.t-payment { background: var(--g3); color: var(--g); }
.t-discount { background: var(--acc3); color: var(--acc); }
.t-return { background: var(--o3); color: var(--o); }
.t-reminder { background: var(--p4); color: var(--p); }

.txn-info {
  flex: 1;
}
.txn-note {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--t1);
}
.txn-date {
  font-size: 0.75rem;
  color: var(--t4);
  margin-top: 2px;
}
.txn-amt {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 800;
}

/* TRANSACTION QUICK BUTTONS */
.txn-btns {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}
.txn-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 8px;
  border-radius: var(--rad2);
  border: 1.5px solid var(--bdr);
  background: var(--card);
  cursor: pointer;
  transition: var(--tr);
}
.txn-btn:hover {
  border-color: var(--p2);
  background: var(--p4);
  transform: translateY(-1px);
}
[data-theme="dark"] .txn-btn:hover {
  background: rgba(20, 184, 166, 0.15);
}
.txn-btn-icon {
  font-size: 1.25rem;
}
.txn-btn-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--t2);
}

/* PRODUCT LIST ITEM */
.product-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: var(--card);
  border-radius: var(--rad);
  border: 1px solid var(--bdr);
  margin-bottom: 10px;
  transition: var(--tr);
}
.product-item:hover {
  box-shadow: var(--sh2);
  border-color: var(--bdr2);
}
.prod-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--acc), var(--o2));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  color: #ffffff;
  flex-shrink: 0;
}
.prod-info {
  flex: 1;
  min-width: 0;
}
.prod-name {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--t1);
}
.prod-meta {
  font-size: 0.78rem;
  color: var(--t4);
  margin-top: 1px;
}
.prod-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.stock-pill {
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
}
.sp-ok { background: var(--g3); color: var(--g); }
.sp-low { background: var(--r3); color: var(--r); }
.sp-none { background: var(--bg3); color: var(--t4); }

/* ==========================================================================
   MODAL DIALOGS
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(9, 13, 22, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 600;
  display: flex;
  align-items: flex-end;
  animation: overlayIn 0.25s ease;
}

.modal-overlay.center {
  align-items: center;
  justify-content: center;
}

@keyframes overlayIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-sheet {
  background: var(--card);
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  border-radius: 24px 24px 0 0;
  padding: 24px 24px 36px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--sh3);
  animation: sheetUp 0.35s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.modal-overlay.center .modal-sheet {
  border-radius: 20px;
  margin: 16px;
  max-height: 85vh;
}

@keyframes sheetUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.modal-drag {
  width: 40px;
  height: 4px;
  background: var(--bg3);
  border-radius: 2px;
  margin: 0 auto 20px;
}

.modal-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--t1);
  margin-bottom: 20px;
}

/* ==========================================================================
   LEDGER SCREEN
   ========================================================================== */
.ledger-hero {
  background: linear-gradient(135deg, var(--p) 0%, var(--p2) 100%);
  border-radius: var(--rad);
  padding: 24px;
  color: #ffffff;
  margin-bottom: 20px;
  box-shadow: var(--sh2);
}
.ledger-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 18px;
}
.ledger-stat {
  background: rgba(255, 255, 255, 0.12);
  border-radius: var(--rad2);
  padding: 12px;
  text-align: center;
  backdrop-filter: blur(8px);
}
.ledger-stat-val {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
}
.ledger-stat-lbl {
  font-size: 0.68rem;
  opacity: 0.8;
  text-transform: uppercase;
  margin-top: 3px;
  font-weight: 600;
}

/* ==========================================================================
   INVOICE / BILLING
   ========================================================================== */
.invoice-print {
  background: #ffffff;
  padding: 32px;
  border-radius: var(--rad);
  border: 1px solid var(--bdr);
  color: #0f172a;
}
.inv-hd {
  border-bottom: 3px solid var(--p);
  padding-bottom: 16px;
  margin-bottom: 20px;
}
.inv-shop {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--p);
}
.inv-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
}
.inv-table th {
  background: var(--p4);
  color: var(--p);
  padding: 10px 12px;
  text-align: left;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}
.inv-table td {
  padding: 12px;
  border-bottom: 1px solid var(--bdr);
  font-size: 0.88rem;
}
.inv-table tr:hover td {
  background: var(--bg2);
}
.inv-total-row {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--p);
  text-align: right;
  padding: 12px 0;
}

/* ==========================================================================
   TABS & SEGMENTS
   ========================================================================== */
.tab-strip {
  display: flex;
  background: var(--bg2);
  border-radius: 12px;
  padding: 4px;
  gap: 4px;
  margin-bottom: 20px;
  border: 1px solid var(--bdr);
}
.tab-btn {
  flex: 1;
  padding: 10px;
  border: none;
  background: transparent;
  font-family: var(--font);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--t4);
  border-radius: 9px;
  cursor: pointer;
  transition: var(--tr);
}
.tab-btn.active {
  background: var(--card);
  color: var(--p);
  box-shadow: var(--sh);
}

/* ==========================================================================
   UTILITY CHIPS & BADGES
   ========================================================================== */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
}
.badge-p { background: var(--p4); color: var(--p); }
.badge-g { background: var(--g3); color: var(--g); }
.badge-r { background: var(--r3); color: var(--r); }
.badge-a { background: var(--acc3); color: var(--acc); }
.badge-n { background: var(--bg3); color: var(--t4); }

/* SEARCH INPUT BOX */
.search-wrap {
  position: relative;
  margin-bottom: 20px;
}
.search-wrap input {
  width: 100%;
  padding: 12px 14px 12px 42px;
  border: 1.5px solid var(--bdr);
  border-radius: var(--rad2);
  font-size: 0.9rem;
  font-family: var(--font);
  color: var(--t1);
  background: var(--card);
  transition: var(--tr);
  outline: none;
}
.search-wrap input:focus {
  border-color: var(--p);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}
.search-wrap::before {
  content: "";
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%2364748b' viewBox='0 0 16 16'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001q.044.06.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1 1 0 0 0-.115-.1zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  opacity: 0.65;
}

/* EMPTY STATES */
.empty {
  text-align: center;
  padding: 64px 20px;
}
.empty-icon {
  font-size: 3.5rem;
  margin-bottom: 16px;
  animation: float 3s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
.empty-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--t1);
  margin-bottom: 6px;
}
.empty-sub {
  font-size: 0.88rem;
  color: var(--t4);
  margin-bottom: 20px;
}

/* CHART & WRAPPERS */
.chart-wrap {
  position: relative;
  height: 220px;
}

/* ALERTS */
.alert {
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 16px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border: 1px solid transparent;
}
.alert-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
  margin-top: 1px;
}
.alert-warn { background: var(--acc3); color: #78350f; border-color: rgba(245, 158, 11, 0.2); }
.alert-info { background: var(--p4); color: var(--p); border-color: var(--p3); }
.alert-success { background: var(--g3); color: #064e3b; border-color: rgba(20, 184, 166, 0.2); }
.alert-danger { background: var(--r3); color: #9f1239; border-color: rgba(244, 63, 94, 0.2); }

/* QR BOX CODE */
#qr-box {
  display: flex;
  justify-content: center;
  margin: 16px 0;
}
#qr-box canvas, #qr-box img {
  border-radius: 16px;
  padding: 16px;
  background: #ffffff;
  box-shadow: var(--sh2);
}

/* DUE DANGER ROW ALERT */
.due-alert {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-radius: var(--rad2);
  margin-bottom: 10px;
  background: var(--card);
  border: 1.5px solid var(--bdr);
  cursor: pointer;
  transition: var(--tr);
}
.due-alert:hover {
  transform: translateX(4px);
  border-color: var(--r2);
}
.due-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--r2);
  animation: blink 1.5s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

/* GRID LAYOUTS */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.three-col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

/* PAYMENT DUES */
.pay-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
}
.ps-paid { background: var(--g3); color: var(--g); }
.ps-due { background: var(--r3); color: var(--r); }
.ps-partial { background: var(--acc3); color: var(--acc); }

/* REPORT ROW DETAILS */
.rpt-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: var(--card);
  border-radius: var(--rad2);
  border: 1px solid var(--bdr);
  margin-bottom: 10px;
  transition: var(--tr);
}
.rpt-card:hover {
  box-shadow: var(--sh2);
  border-color: var(--bdr2);
}

/* SETTINGS OPTIONS */
.set-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: var(--card);
  border-radius: var(--rad2);
  margin-bottom: 8px;
  border: 1px solid var(--bdr);
  cursor: pointer;
  transition: var(--tr);
}
.set-item:hover {
  border-color: var(--p3);
  box-shadow: var(--sh2);
}
.set-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--p4);
  color: var(--p);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}
.set-icon-g { background: var(--g3); color: var(--g); }
.set-icon-a { background: var(--acc3); color: var(--acc); }
.set-icon-r { background: var(--r3); color: var(--r); }

.set-body {
  flex: 1;
}
.set-title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--t1);
}
.set-sub {
  font-size: 0.78rem;
  color: var(--t4);
  margin-top: 1px;
}
.set-arrow {
  color: var(--t5);
  font-size: 1.15rem;
}

/* TITLES AND SUBTITLES */
.pg-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--t1);
  letter-spacing: -0.02em;
}
.pg-sub {
  font-size: 0.85rem;
  color: var(--t4);
  margin-bottom: 24px;
}

/* PROGRESS METRIC BAR */
.progress {
  height: 6px;
  background: var(--bg3);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 6px;
}
.progress-fill {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--p), var(--p2));
  transition: width 1s cubic-bezier(0.16, 1, 0.3, 1);
}

/* INVOICE ENTRY ITEM */
.inv-item-card {
  background: var(--bg2);
  border-radius: var(--rad2);
  border: 1.5px solid var(--bdr);
  margin-bottom: 12px;
  overflow: hidden;
  transition: var(--tr);
}
.inv-item-card:hover {
  border-color: var(--bdr2);
  box-shadow: var(--sh);
}
.inv-item-top {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-bottom: 1.5px solid var(--bdr);
  background: var(--card);
}
.inv-item-top .form-control {
  background: var(--bg2);
}
.inv-item-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 12px;
}
.inv-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.inv-field-lbl {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--t4);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.inv-field .form-control {
  padding: 8px 10px;
  font-size: 0.85rem;
}
.inv-item-amt {
  padding: 8px 10px;
  background: var(--p4);
  border-radius: var(--rad3);
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--p);
  border: 1.5px solid var(--p3);
  min-height: 38px;
  display: flex;
  align-items: center;
}
[data-theme="dark"] .inv-item-amt {
  background: rgba(20, 184, 166, 0.15);
  border-color: rgba(20, 184, 166, 0.3);
}

.pay-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

/* UPI BANNER BOX */
.upi-display-box {
  background: var(--bg2);
  border-radius: var(--rad2);
  padding: 14px 18px;
  border: 1.5px solid var(--bdr);
  text-align: center;
}
.upi-display-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--t4);
  margin-bottom: 4px;
}
.upi-display-val {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--p);
  word-break: break-all;
  letter-spacing: 0.02em;
}

.pay-link-box {
  background: var(--bg2);
  border-radius: var(--rad2);
  padding: 14px;
  font-size: 0.78rem;
  color: var(--t3);
  word-break: break-all;
  border: 1.5px solid var(--bdr);
  font-family: monospace;
  line-height: 1.5;
  max-height: 80px;
  overflow-y: auto;
}

/* CONTACT ACTION BUTTONS */
.pick-btns {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.pick-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1.5px solid var(--p3);
  background: var(--p4);
  color: var(--p);
  font-family: var(--font);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--tr);
  white-space: nowrap;
}
.pick-btn:hover {
  background: var(--p3);
  color: #ffffff;
  transform: translateY(-1px);
}
.pick-btn.green {
  background: var(--g3);
  border-color: var(--g2);
  color: var(--g);
}
.pick-btn.green:hover {
  background: var(--g2);
  color: #ffffff;
}

[data-theme="dark"] .pick-btn {
  background: rgba(20, 184, 166, 0.15);
  border-color: rgba(20, 184, 166, 0.35);
  color: var(--p3);
}
[data-theme="dark"] .pick-btn.green {
  background: rgba(20, 184, 166, 0.15);
  border-color: rgba(20, 184, 166, 0.35);
  color: var(--g2);
}

/* KHATA PICKER MODAL LISTS */
#mod-khata-pick { z-index: 2000; }
.khata-pick-list {
  max-height: 320px;
  overflow-y: auto;
  margin-top: 10px;
}
.khata-pick-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--rad2);
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: var(--tr);
  margin-bottom: 6px;
}
.khata-pick-item:hover {
  background: var(--bg2);
  border-color: var(--bdr2);
}
.khata-pick-item.selected {
  background: var(--p4);
  border-color: var(--p3);
}
[data-theme="dark"] .khata-pick-item.selected {
  background: rgba(20, 184, 166, 0.15);
  border-color: var(--p2);
}
.kp-av {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--p), var(--p2));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 800;
  color: #ffffff;
  flex-shrink: 0;
}
.kp-name {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--t1);
}
.kp-meta {
  font-size: 0.72rem;
  color: var(--t4);
}
.kp-bal {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 800;
  margin-left: auto;
  flex-shrink: 0;
}
.kp-search {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--bdr);
  border-radius: var(--rad2);
  font-size: 0.88rem;
  font-family: var(--font);
  color: var(--t1);
  background: var(--bg2);
  outline: none;
  margin-bottom: 8px;
}
.kp-search:focus {
  border-color: var(--p);
}

.ldg-extra-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}
.ldg-extra-item {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.15);
}
.ldg-extra-item strong {
  display: block;
  font-size: 0.82rem;
  color: #ffffff;
  font-weight: 700;
  margin-bottom: 2px;
}

/* BRAND AND USER AVATARS LOGO PICTURES */
.setup-logo-img {
  width: 64px;
  height: 64px;
  border-radius: var(--rad2);
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.2);
  box-shadow: var(--sh2);
}

.mh-logo-img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: cover;
}

/* FLOATING ACTIONS (FAB) */
.fab {
  position: fixed;
  right: 20px;
  bottom: calc(var(--nav-h) + 16px);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--acc);
  border: none;
  color: #ffffff;
  font-size: 1.6rem;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(138, 112, 76, 0.3);
  z-index: 250;
  display: none;
  align-items: center;
  justify-content: center;
  transition: var(--tr);
}
.fab:hover {
  transform: scale(1.08) rotate(90deg);
  box-shadow: 0 6px 20px rgba(109, 40, 217, 0.6);
}

.set-section-title {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--t4);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 12px 4px 6px;
  margin-top: 10px;
  border-bottom: 1px solid var(--bdr);
  margin-bottom: 10px;
}

/* SHIMMER LOADING PLACEHOLDER SKELETONS */
.skeleton {
  background: linear-gradient(90deg, var(--bg2) 25%, var(--bg3) 50%, var(--bg2) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--rad3);
}
@keyframes shimmer {
  from { background-position: 200% 0; }
  to { background-position: -200% 0; }
}

/* TOAST FLOATING BANNER ALERT */
#toast {
  position: fixed;
  bottom: calc(var(--nav-h) + 24px);
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  background: var(--t1);
  color: var(--bg);
  padding: 12px 24px;
  border-radius: 30px;
  font-size: 0.88rem;
  font-weight: 700;
  z-index: 9998;
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  white-space: nowrap;
  pointer-events: none;
  box-shadow: var(--sh3);
}
#toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* DARK MODE SWITCH DOCK */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  padding: 10px 14px;
  border-radius: var(--rad2);
  background: var(--bg2);
  border: 1px solid var(--bdr);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--t2);
  transition: var(--tr);
}
.theme-toggle:hover {
  background: var(--bg3);
  border-color: var(--bdr2);
}
.toggle-track {
  width: 44px;
  height: 24px;
  background: var(--bdr2);
  border-radius: 12px;
  position: relative;
  transition: background 0.3s;
}
.toggle-track.on {
  background: var(--p);
}
.toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background: #ffffff;
  border-radius: 50%;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: var(--sh);
}
.toggle-track.on .toggle-thumb {
  transform: translateX(20px);
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--p);
  margin-bottom: 16px;
  transition: var(--tr);
}
.back-btn:hover {
  color: var(--p2);
  transform: translateX(-2px);
}

.divider {
  height: 1px;
  background: var(--bdr);
  margin: 16px 0;
}

/* BARCODE SCANNER CAMERA FRAME OVERLAYS */
#barcode-overlay {
  position: fixed;
  inset: 0;
  background: rgba(9, 13, 22, 0.95);
  z-index: 10000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  backdrop-filter: blur(10px);
}
#barcode-overlay.hidden {
  display: none;
}
#scanner-video {
  width: 100%;
  max-width: 400px;
  height: 300px;
  border-radius: 20px;
  object-fit: cover;
  border: 2px solid var(--p2);
  box-shadow: var(--sh-glow);
}
.scanner-frame {
  position: relative;
  max-width: 400px;
  width: 100%;
}
.scanner-corners {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.scanner-corners::before, .scanner-corners::after {
  content: '';
  position: absolute;
  width: 40px;
  height: 40px;
  border-color: var(--p2);
  border-style: solid;
}
.scanner-corners::before {
  top: 0;
  left: 0;
  border-width: 4px 0 0 4px;
  border-radius: 20px 0 0 0;
}
.scanner-corners::after {
  bottom: 0;
  right: 0;
  border-width: 0 4px 4px 0;
  border-radius: 0 0 20px 20px;
}
.scanner-line {
  position: absolute;
  top: 50%;
  left: 8%;
  right: 8%;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--p2), transparent);
  animation: scanLine 2s ease-in-out infinite;
}
@keyframes scanLine {
  0%, 100% { top: 15%; }
  50% { top: 85%; }
}
.scanner-hint {
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 600;
  margin-top: 20px;
  text-align: center;
  letter-spacing: 0.02em;
}
.scanner-close-btn {
  margin-top: 24px;
  padding: 12px 32px;
  border-radius: var(--rad2);
  background: #ffffff;
  color: #0f172a;
  border: none;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: var(--sh2);
  transition: var(--tr);
}
.scanner-close-btn:hover {
  transform: translateY(-1px);
  background: var(--bg2);
}

/* ==========================================================================
   REMINDERS & MASS SENDING STUFF
   ========================================================================== */
.rem-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, #18181b 0%, #09090b 100%);
  border-radius: var(--rad);
  padding: 24px;
  margin-bottom: 20px;
  gap: 16px;
  flex-wrap: wrap;
  border: 1px solid rgba(255, 255, 255, 0.05);
}
.rem-hero-left {
  display: flex;
  align-items: center;
  gap: 16px;
}
.rem-hero-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}
.rem-hero-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  color: #ffffff;
}
.rem-hero-sub {
  font-size: 0.8rem;
  color: var(--t3);
  margin-top: 2px;
}
.rem-hero-bulk-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  color: #0f172a;
  padding: 11px 20px;
  border-radius: var(--rad2);
  font-family: var(--font);
  font-weight: 700;
  font-size: 0.88rem;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.15);
  transition: var(--tr);
}
.rem-hero-bulk-btn:hover {
  transform: translateY(-2px);
  background: var(--bg2);
}

.rem-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}
.rem-stat-card {
  background: var(--card);
  border-radius: var(--rad2);
  padding: 16px;
  border: 1px solid var(--bdr);
  text-align: center;
  box-shadow: var(--sh);
}
.rem-stat-val {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 800;
}
.rem-stat-val.red { color: var(--r2); }
.rem-stat-val.green { color: var(--g2); }
.rem-stat-val.purple { color: var(--p); }

.rem-stat-lbl {
  font-size: 0.72rem;
  color: var(--t4);
  font-weight: 600;
  margin-top: 2px;
  text-transform: uppercase;
}

.rem-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.rem-tabs {
  display: flex;
  background: var(--bg2);
  border-radius: 10px;
  padding: 3px;
  gap: 3px;
  border: 1px solid var(--bdr);
}
.rem-tab {
  padding: 8px 16px;
  border: none;
  background: transparent;
  font-family: var(--font);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--t4);
  border-radius: 8px;
  cursor: pointer;
  transition: var(--tr);
  white-space: nowrap;
}
.rem-tab.active {
  background: var(--card);
  color: var(--p);
  box-shadow: var(--sh);
}

.rem-search-box {
  flex: 1;
  min-width: 180px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--card);
  border: 1.5px solid var(--bdr);
  border-radius: 10px;
  padding: 8px 14px;
  transition: var(--tr);
}
.rem-search-box:focus-within {
  border-color: var(--p);
  box-shadow: 0 0 0 3px rgba(9, 9, 11, 0.08);
}
.rem-search-box input {
  flex: 1;
  border: none;
  outline: none;
  font-family: var(--font);
  font-size: 0.88rem;
  color: var(--t1);
  background: transparent;
}

/* MASS ACTION FLOATING BAR */
.rem-bulk-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--card);
  border: 1.5px solid var(--p2);
  box-shadow: var(--sh3);
  padding: 12px 20px;
  border-radius: var(--rad2);
  margin-bottom: 16px;
  animation: slideDown 0.3s ease;
}
@keyframes slideDown {
  from { transform: translateY(-10px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.rem-card {
  background: var(--card);
  border-radius: var(--rad);
  border: 1.5px solid var(--bdr);
  margin-bottom: 12px;
  transition: var(--tr);
  overflow: hidden;
  box-shadow: var(--sh);
}
.rem-card:hover {
  border-color: var(--bdr2);
  box-shadow: var(--sh2);
}
.rem-card.is-due {
  border-left: 4px solid var(--r2);
}
.rem-card.is-clear {
  border-left: 4px solid var(--g2);
}
.rem-card.is-selected {
  border-color: var(--p2);
  background: var(--p4);
}
[data-theme="dark"] .rem-card.is-selected {
  background: rgba(20, 184, 166, 0.08);
}

.rem-card-main {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  cursor: pointer;
}
.rem-card-checkbox {
  width: 18px;
  height: 18px;
  accent-color: var(--p);
  cursor: pointer;
  flex-shrink: 0;
}
.rem-av {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
  color: #ffffff;
  box-shadow: var(--sh);
}
.rem-info {
  flex: 1;
  min-width: 0;
}
.rem-name {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--t1);
}
.rem-meta {
  font-size: 0.78rem;
  color: var(--t4);
  margin-top: 2px;
}
.rem-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  flex-shrink: 0;
}
.rem-due-amt {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 800;
}
.rem-due-amt.is-due { color: var(--r2); }
.rem-due-amt.is-clear { color: var(--g2); }

.rem-due-label {
  font-size: 0.65rem;
  font-weight: 700;
}
.rem-due-label.is-due { color: var(--r2); }
.rem-due-label.is-clear { color: var(--g2); }

.rem-card-progress {
  padding: 0 20px 14px 80px;
}
.rem-progress-track {
  height: 5px;
  background: var(--bg3);
  border-radius: 3px;
  overflow: hidden;
}
.rem-progress-fill {
  height: 100%;
  border-radius: 3px;
}

.rem-card-actions {
  display: flex;
  gap: 8px;
  border-top: 1px solid var(--bdr);
  padding: 10px 20px;
  background: var(--card2);
  align-items: center;
}
.rem-action-btn {
  padding: 6px 12px;
  border-radius: 8px;
  font-family: var(--font);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid var(--bdr);
  background: var(--card);
  color: var(--t2);
  transition: var(--tr);
}
.rem-action-btn:hover {
  background: var(--bg2);
  color: var(--t1);
}
.rem-action-btn.wa {
  background: rgba(18, 140, 126, 0.1);
  color: #128c7e;
  border-color: rgba(18, 140, 126, 0.2);
}
.rem-action-btn.wa:hover {
  background: #128c7e;
  color: #ffffff;
}
.rem-action-btn.link {
  background: var(--p4);
  color: var(--p);
  border-color: rgba(79, 70, 229, 0.2);
}
.rem-action-btn.link:hover {
  background: var(--p);
  color: #ffffff;
}

/* INSTANT REMINDER STYLES */
.instant-rem-card {
  background: var(--card);
  border-radius: var(--rad);
  border: 1px solid var(--bdr);
  box-shadow: var(--sh);
  margin-bottom: 20px;
  overflow: hidden;
}
.instant-rem-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: var(--card2);
  cursor: pointer;
  border-bottom: 1px solid var(--bdr);
  transition: var(--tr);
}
.instant-rem-header:hover {
  background: var(--bg2);
}
.instant-rem-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--p4);
  color: var(--p);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
}
[data-theme="dark"] .instant-rem-icon {
  background: rgba(20, 184, 166, 0.15);
}
.instant-rem-title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--t1);
}
.instant-rem-sub {
  font-size: 0.75rem;
  color: var(--t4);
  margin-top: 1px;
}
.instant-rem-chevron {
  font-size: 0.85rem;
  color: var(--t4);
  transition: transform 0.3s;
}
.instant-rem-chevron.collapsed {
  transform: rotate(180deg);
}

.instant-rem-body {
  padding: 24px;
  transition: var(--tr);
}
.instant-rem-body.hidden {
  display: none;
}
.instant-rem-form {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 24px;
}

.instant-preview-col {
  border-left: 1px solid var(--bdr);
  padding-left: 24px;
  display: flex;
  flex-direction: column;
}
.instant-preview-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--t3);
  text-transform: uppercase;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.instant-preview-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--g2);
  animation: blink 1.2s infinite;
}

/* WHATSAPP CONTAINER CHAT PREVIEW */
.wa-phone-wrap {
  width: 100%;
  max-width: 280px;
  background: #efeae2;
  border-radius: 18px;
  border: 1px solid var(--bdr2);
  overflow: hidden;
  box-shadow: var(--sh);
  display: flex;
  flex-direction: column;
}
.wa-phone-header {
  background: #075e54;
  color: #ffffff;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.wa-av {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #128c7e;
  color: #ffffff;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.wa-contact-info {
  line-height: 1.2;
}
.wa-contact-name {
  font-size: 0.8rem;
  font-weight: 700;
  max-width: 130px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wa-contact-sub {
  font-size: 0.6rem;
  opacity: 0.8;
}
.wa-chat-area {
  flex: 1;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 160px;
  max-height: 240px;
  overflow-y: auto;
}
.wa-date-chip {
  align-self: center;
  background: rgba(255, 255, 255, 0.7);
  color: #4a4a4a;
  font-size: 0.55rem;
  padding: 2px 8px;
  border-radius: 8px;
  box-shadow: 0 1px 1px rgba(0,0,0,0.05);
}
.wa-bubble-wrap {
  align-self: flex-start;
  max-width: 85%;
}
.wa-bubble {
  background: #ffffff;
  color: #303030;
  padding: 8px 10px;
  border-radius: 0 10px 10px 10px;
  font-size: 0.72rem;
  line-height: 1.4;
  white-space: pre-wrap;
  word-break: break-word;
  box-shadow: 0 1px 1px rgba(0,0,0,0.06);
}
.wa-bubble-time {
  font-size: 0.55rem;
  color: #8c8c8c;
  text-align: right;
  margin-top: 2px;
  margin-right: 4px;
}

.ir-lang-btn {
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid var(--bdr);
  background: var(--card2);
  color: var(--t3);
  font-family: var(--font);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--tr);
}
.ir-lang-btn.active {
  background: var(--p4);
  color: var(--p);
  border-color: var(--p3);
}

.rem-save-khata-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}
.rem-save-khata-row input {
  width: 16px;
  height: 16px;
  accent-color: var(--p);
  cursor: pointer;
}
.rem-save-khata-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--t3);
  cursor: pointer;
}

/* BULK CONFIRM DIALOG LIST */
.bulk-cust-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: var(--bg2);
  border-radius: var(--rad2);
  margin-bottom: 6px;
  border: 1px solid var(--bdr);
}

/* AUTOCOMPLETE COMPONENT */
.inv-cust-autocomplete {
  position: relative;
  width: 100%;
}
.inv-cust-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--card);
  border: 1.5px solid var(--bdr2);
  border-radius: var(--rad2);
  z-index: 500;
  margin-top: 4px;
  box-shadow: var(--sh3);
  max-height: 240px;
  overflow-y: auto;
  display: none;
}
.inv-cust-dropdown.show {
  display: block;
}
.inv-cust-opt {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  cursor: pointer;
  transition: var(--tr);
  border-bottom: 1px solid var(--bdr);
}
.inv-cust-opt:last-child {
  border-bottom: none;
}
.inv-cust-opt:hover {
  background: var(--bg2);
}
.inv-cust-opt-av {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--p4);
  color: var(--p);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
}
.inv-cust-opt-info {
  line-height: 1.35;
}
.inv-cust-opt-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--t1);
}
.inv-cust-opt-meta {
  font-size: 0.72rem;
  color: var(--t4);
}

/* KHATA ACTIVITY STRIP IN LEDGER */
.khata-activity-strip {
  background: var(--bg2);
  border-radius: var(--rad2);
  padding: 12px 16px;
  border: 1px solid var(--bdr);
  width: 100%;
}
.kas-title {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--t4);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}
.kas-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.78rem;
  margin-bottom: 6px;
}
.kas-row:last-child {
  margin-bottom: 0;
}
.kas-icon {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
}
.kas-label {
  font-weight: 700;
  color: var(--t2);
}
.kas-val {
  color: var(--t4);
  margin-left: auto;
}

/* RECENT ACTIVITY LIST ITEM */
.activity-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--bdr);
}
.activity-item:last-child {
  border-bottom: none;
}
.activity-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}
.activity-info {
  flex: 1;
  min-width: 0;
  line-height: 1.35;
}
.activity-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--t1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.activity-sub {
  font-size: 0.73rem;
  color: var(--t4);
}
.activity-time {
  font-size: 0.7rem;
  color: var(--t5);
  white-space: nowrap;
}

/* Contact Picker Modal sheets */
.cp-sheet {
  background: var(--card);
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
  border-radius: 20px 20px 0 0;
  padding: 16px 16px 32px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
}
.cp-header {
  border-bottom: 1px solid var(--bdr);
  padding-bottom: 14px;
  margin-bottom: 14px;
}
.cp-drag {
  width: 36px;
  height: 4px;
  background: var(--bg3);
  border-radius: 2px;
  margin: 0 auto 12px;
}
.cp-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 800;
}
.cp-sub {
  font-size: 0.75rem;
  color: var(--t4);
}
.cp-tabs {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.cp-tab {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid var(--bdr);
  background: var(--bg2);
  color: var(--t3);
  font-family: var(--font);
  font-size: 0.8rem;
  font-weight: 700;
  border-radius: 10px;
  cursor: pointer;
  transition: var(--tr);
}
.cp-tab.active {
  background: var(--p4);
  color: var(--p);
  border-color: var(--p3);
}
.cp-search {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  background: var(--bg2);
  border: 1px solid var(--bdr);
  border-radius: 10px;
  padding: 6px 12px;
}
.cp-search input {
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  font-family: var(--font);
  font-size: 0.85rem;
  color: var(--t1);
}
.cp-list {
  flex: 1;
  overflow-y: auto;
  max-height: 300px;
}
.cp-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 8px;
  border-radius: 10px;
  cursor: pointer;
  transition: var(--tr);
}
.cp-item:hover {
  background: var(--bg2);
}
.cp-info {
  flex: 1;
  line-height: 1.3;
}
.cp-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--t1);
}
.cp-meta {
  font-size: 0.72rem;
  color: var(--t4);
}
.cp-badge-due {
  background: var(--r3);
  color: var(--r2);
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 0.68rem;
  font-weight: 700;
}
.cp-badge-clear {
  background: var(--g3);
  color: var(--g2);
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 0.68rem;
  font-weight: 700;
}
.cp-phone-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--p4);
  border: 1px solid var(--p3);
  border-radius: 12px;
  cursor: pointer;
  margin-bottom: 12px;
  transition: var(--tr);
}
.cp-phone-btn:hover {
  background: var(--p3);
  color: #ffffff;
}
.cp-phone-btn-icon {
  font-size: 1.3rem;
}
.cp-phone-btn-text {
  line-height: 1.3;
}
.cp-phone-btn-text strong {
  display: block;
  font-size: 0.85rem;
}
.cp-phone-btn-text span {
  font-size: 0.72rem;
  opacity: 0.8;
}
.cp-empty {
  text-align: center;
  padding: 24px;
  font-size: 0.82rem;
  color: var(--t4);
}

/* Unified dialog center layout overrides */
#contact-picker-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(9, 13, 22, 0.6);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
#contact-picker-modal.hidden {
  display: none;
}

@media(min-width: 560px) {
  #contact-picker-modal {
    align-items: center;
  }
  .cp-sheet {
    border-radius: 20px;
    margin: 16px;
  }
}

/* ==========================================================================
   RESPONSIVENESS AND COLLAPSING SHELLS
   ========================================================================== */
@media(max-width: 1024px) {
  #sidebar {
    width: 80px;
  }
  .brand-text, .sidebar-shop, .sidebar-nav-item span:not(.nav-icon-s) {
    display: none;
  }
  .sidebar-brand {
    justify-content: center;
    padding: 16px 0;
  }
  .sidebar-nav-item {
    justify-content: center;
    padding: 12px 0;
  }
  #main-area {
    margin-left: 80px;
  }
}

@media(max-width: 768px) {
  #sidebar {
    display: none;
  }
  #main-area {
    margin-left: 0;
    padding-bottom: calc(var(--nav-h) + 16px);
  }
  #topbar {
    display: none;
  }
  #mobile-header {
    display: block;
  }
  #bottom-nav {
    display: block;
  }
  #page-content {
    padding: 20px 16px;
  }
  .stats-row {
    grid-template-columns: repeat(2, 1fr);
  }
  .two-col, .three-col, .pay-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .fab {
    display: flex;
  }
  .setup-fields-new {
    grid-template-columns: 1fr;
  }
  .setup-headline h1 {
    font-size: 1.8rem;
  }
  .setup-feat-strip {
    display: none;
  }
  .setup-card {
    padding: 20px 16px;
  }
  .instant-rem-form {
    grid-template-columns: 1fr;
  }
  .instant-preview-col {
    border-left: none;
    border-top: 1px solid var(--bdr);
    padding-left: 0;
    padding-top: 20px;
    align-items: center;
  }
  .rem-stats-row {
    grid-template-columns: 1fr;
  }
}

/* ============ PRINT STYLES ============ */
@media print {
  .no-print { display: none !important; }
  #bottom-nav, .fab, .back-btn, #sidebar { display: none !important; }
  body { background: white; }
  .invoice-print { box-shadow: none; border: none; }
}

/* UPI ID MANAGEMENT STYLING */
.upi-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--bg-card, var(--bg));
  border: 1px solid var(--bdr);
  border-radius: 12px;
  margin-bottom: 10px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.upi-item-row:hover {
  border-color: var(--p) !important;
  box-shadow: 0 4px 12px rgba(9, 9, 11, 0.05);
  transform: translateY(-1px);
}

.upi-item-row label {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  width: 100%;
  cursor: pointer;
  user-select: none;
}

.upi-item-row input[type="radio"] {
  accent-color: var(--p);
  width: 18px;
  height: 18px;
  cursor: pointer;
  margin: 0;
}

.upi-item-row .upi-text {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--t1);
  letter-spacing: 0.01em;
}

.upi-item-row .delete-btn {
  color: var(--r2);
  background: transparent;
  border: none;
  padding: 8px;
  border-radius: 8px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.upi-item-row .delete-btn:hover {
  background: var(--r4) !important;
  color: var(--r) !important;
}
