/* ==========================================================================
   nanokhata - Production Design System
   Super Mobile-Friendly + Comprehensive Desktop POS Station Layout
   ========================================================================== */

:root {
  /* Surfaces & Canvas */
  --bg-canvas: #f1f5f9;
  --bg-surface: #ffffff;
  --bg-card: #ffffff;
  --bg-subtle: #f1f5f9;
  --bg-hover: #f8fafc;

  /* Borders & Hairlines */
  --border-hairline: #e2e8f0;
  --border-subtle: #cbd5e1;
  --border-focus: var(--primary-color);

  /* Typography */
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;

  /* Primary Brand Color: #368098 (matches brand logo) */
  --primary: #368098;
  --primary-color: #368098;
  --primary-dark: #286579;
  --primary-darker: #163f4e;
  --primary-light: #479db8;
  --primary-lighter: #67b9d2;
  --primary-soft: #eaf3f6;
  --primary-border: #b3d7e2;
  --primary-shadow: rgba(54, 128, 152, 0.22);

  /* Financial & Status Colors */
  --green-primary: #059669;
  --green-dark: #047857;
  --green-soft: #ecfdf5;
  --green-border: #a7f3d0;
  --green-shadow: rgba(5, 150, 105, 0.22);

  --red-primary: #dc2626;
  --red-dark: #b91c1c;
  --red-soft: #fef2f2;
  --red-border: #fecaca;
  --red-shadow: rgba(220, 38, 38, 0.22);

  --amber-primary: #d97706;
  --amber-soft: #fffbeb;
  --amber-border: #fde68a;

  --blue-primary: #2563eb;
  --blue-soft: #eff6ff;

  /* Radii */
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  /* Shadows - Card shadows disabled */
  --shadow-subtle: none;
  --shadow-card: none;
  --shadow-elevated: none;
  --shadow-modal: 0 10px 25px -5px rgba(15, 23, 42, 0.12);

  /* System Fonts */
  --font-stack: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --transition-fast: 0.12s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  height: 100%;
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  font-family: var(--font-stack);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  user-select: none;
  -webkit-user-select: none;
}

input, textarea, select, button {
  font-family: inherit;
  font-size: 0.95rem;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: transparent;
  outline: none;
}

/* Base Layout Shell */
.app-layout-shell {
  display: flex;
  min-height: 100vh;
  width: 100%;
  background-color: var(--bg-canvas);
}

.desktop-sidebar {
  display: none; /* Hidden on mobile */
}

.main-content-wrapper {
  flex: 1;
  min-width: 0;
  display: flex;
  justify-content: center;
}

.app-container {
  width: 100%;
  max-width: 520px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg-canvas);
  position: relative;
  box-shadow: none;
  border-left: 1px solid var(--border-hairline);
  border-right: 1px solid var(--border-hairline);
  padding-bottom: 74px; /* Space for mobile nav */
  margin: 0 auto;
}

@media (min-width: 600px) and (max-width: 1023px) {
  .app-container {
    max-width: 740px;
  }
}

/* ==========================================================================
   MOBILE HEADER
   ========================================================================== */
.app-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-hairline);
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-section {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: opacity var(--transition-fast);
}

.brand-section:active {
  opacity: 0.75;
}

.brand-avatar {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.15rem;
  color: #ffffff;
  box-shadow: none;
  flex-shrink: 0;
}

.brand-info {
  display: flex;
  flex-direction: column;
}

.brand-title-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.brand-title {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.brand-title .text-green {
  color: var(--primary-color);
}

.brand-badge {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  background: #0f172a;
  color: #ffffff;
  padding: 1px 5px;
  border-radius: 4px;
}

.brand-subtitle {
  font-size: 0.76rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.shop-status-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.store-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-block;
  background: var(--green-primary);
  animation: pulseDot 2s infinite ease-in-out;
}

.store-status-dot.online {
  background: var(--green-primary);
  animation: pulseDot 2s infinite ease-in-out;
}

.store-status-dot.offline {
  background: var(--out-red);
  animation: none;
}

.offline-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: var(--green-soft);
  color: var(--green-dark);
  border: 1px solid var(--green-border);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.offline-badge.offline {
  background: var(--red-soft);
  color: var(--red-dark);
  border-color: var(--red-border);
}

.pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green-primary);
  animation: pulseDot 1.8s infinite ease-in-out;
}

@keyframes pulseDot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.4; }
}

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

.store-avatar-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--border-subtle);
  background: var(--bg-surface);
  color: var(--text-primary);
  font-weight: 700;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: all var(--transition-fast);
}

.store-avatar-btn:hover {
  background: var(--bg-hover);
  border-color: var(--text-secondary);
}

.store-avatar-btn:active {
  transform: scale(0.92);
  background: var(--bg-subtle);
}

#header-store-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* ==========================================================================
   CASH IN HAND BANNER CARD (HISAB PAGE ONLY)
   ========================================================================== */
.galla-section {
  padding: 0 0 14px;
  background: transparent;
}

.galla-card {
  background: #ffffff;
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.galla-card.collapsible-card {
  cursor: pointer;
  user-select: none;
}

.galla-card.collapsible-card:hover {
  border-color: var(--border-medium);
}

.galla-card.collapsible-card:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

.galla-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.galla-header-right {
  display: flex;
  align-items: center;
}

.galla-toggle-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: var(--radius-full);
  background: var(--bg-subtle);
  color: var(--text-secondary);
  border: 1px solid var(--border-hairline);
  transition: var(--transition-fast);
}

.galla-card:hover .galla-toggle-badge {
  background: #f1f5f9;
  color: var(--text-primary);
  border-color: var(--border-medium);
}

.collapse-chevron {
  width: 14px;
  height: 14px;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.galla-card.is-open .collapse-chevron {
  transform: rotate(180deg);
}

.galla-collapsible-body {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease, margin 0.25s ease;
  margin-top: 0;
}

.galla-card.is-open .galla-collapsible-body {
  max-height: 350px;
  opacity: 1;
  margin-top: 4px;
}

.galla-label {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  text-transform: uppercase;
}

.galla-live-tag {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--green-primary);
}

.galla-main-amount {
  font-size: 2.35rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.galla-pills-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(105px, 1fr));
  gap: 6px;
  padding-top: 10px;
  border-top: 1px dashed var(--border-hairline);
}

.galla-pill {
  padding: 8px 8px;
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  border: 1px solid transparent;
}

.pill-in {
  background: var(--green-soft);
  border-color: var(--green-border);
  color: var(--green-dark);
}

.pill-qr {
  background: #eef2ff;
  border-color: #c7d2fe;
  color: #4338ca;
}

.pill-out {
  background: var(--red-soft);
  border-color: var(--red-border);
  color: var(--red-dark);
}

.pill-cash-drawer {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #15803d;
}

.pill-udharo {
  background: var(--amber-soft);
  border-color: var(--amber-border);
  color: var(--amber-primary);
}

.pill-label {
  font-size: 0.68rem;
  font-weight: 700;
  opacity: 0.85;
  display: inline-flex;
  align-items: center;
  gap: 4.5px;
}

.pill-label .pill-icon {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
  stroke: currentColor;
}

.pill-val {
  font-size: 1.05rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  margin-top: 1px;
}

/* ==========================================================================
   TAB PANELS
   ========================================================================== */
.tab-content {
  display: none;
  padding: 10px 16px 20px;
}

.tab-content.active {
  display: block;
  animation: tabFadeIn 0.16s ease-out;
}

/* Pre-paint Route Synchronizer: activates correct tab before JS loads */
html[data-initial-tab="delivery"] #tab-nano, html[data-initial-tab="delivery"] #tab-hisab { display: none !important; }
html[data-initial-tab="delivery"] #tab-delivery { display: block !important; }
html[data-initial-tab="khata"] #tab-nano, html[data-initial-tab="khata"] #tab-hisab { display: none !important; }
html[data-initial-tab="khata"] #tab-khata { display: block !important; }
html[data-initial-tab="reports"] #tab-nano, html[data-initial-tab="reports"] #tab-hisab { display: none !important; }
html[data-initial-tab="reports"] #tab-reports { display: block !important; }
html[data-initial-tab="profile"] #tab-nano, html[data-initial-tab="profile"] #tab-hisab { display: none !important; }
html[data-initial-tab="profile"] #tab-profile { display: block !important; }

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

/* ==========================================================================
   HISAB POS LAYOUT (Mobile: vertical stack, Desktop: 2-column split)
   ========================================================================== */
.pos-split-layout {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pos-keypad-col {
  order: 1; /* Keypad on top for mobile */
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pos-feed-col {
  order: 2; /* Feed below keypad on mobile */
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* POS Display Screen */
.amount-display-box {
  background: var(--bg-subtle);
  border: 1.5px solid var(--border-hairline);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 84px;
  box-shadow: none;
  cursor: text;
  transition: var(--transition-fast);
}

.amount-display-box:hover,
.amount-display-box:focus-within {
  border-color: var(--primary-color);
  background: #ffffff;
}

.amount-top-hint {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  user-select: none;
}

.amount-digits-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 2px;
}

.amount-currency {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-secondary);
  line-height: 1;
  user-select: none;
}

.amount-number-input {
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
  line-height: 1;
  border: none;
  outline: none;
  background: transparent;
  padding: 0;
  margin: 0;
  font-family: inherit;
  width: 1ch;
  min-width: 1ch;
  text-align: left;
  caret-color: var(--primary-color);
}

.amount-number {
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

/* POS Dialer / Symmetrical 3x4 Keypad */
.pos-keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}

.keypad-key {
  height: 56px;
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: var(--radius-md);
  font-size: 1.65rem;
  font-weight: 700;
  color: #0f172a;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04), 0 1px 2px rgba(15, 23, 42, 0.02);
  transition: transform 0.08s ease, background 0.1s ease, border-color 0.1s ease, box-shadow 0.1s ease;
  padding: 0;
  line-height: 1;
  font-family: inherit;
  font-variant-numeric: tabular-nums;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

.keypad-key:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.06);
}

.keypad-key:active {
  transform: scale(0.93);
  background: #f1f5f9;
  border-color: #94a3b8;
  box-shadow: none;
}

/* Clear Key (C) */
.keypad-key.key-clear {
  color: #dc2626;
  background: #fff5f5;
  border-color: #fecaca;
  font-weight: 800;
  font-size: 1.5rem;
}

.keypad-key.key-clear:hover {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #b91c1c;
}

.keypad-key.key-clear:active {
  background: #fca5a5;
  color: #7f1d1d;
  transform: scale(0.93);
}

/* Backspace Key */
.keypad-key.key-back {
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #475569;
}

.keypad-key.key-back:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #0f172a;
}

.keypad-key.key-back:active {
  background: #e2e8f0;
  border-color: #94a3b8;
  transform: scale(0.93);
}

.keypad-key.key-back svg {
  display: block;
  stroke: currentColor;
  transition: transform 0.06s ease;
}

.keypad-key.key-back:active svg {
  transform: scale(0.92);
}

/* ==========================================================================
   Special Charming Submit Button Tick Interaction
   ========================================================================== */

.btn-action-in,
.btn-action-cashout {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.btn-action-in > *,
.btn-action-cashout > * {
  transition: opacity 0.18s ease, transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Active Ticked State */
.btn-submitting-ticked {
  animation: btnSubmitCharmBounce 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
  background: linear-gradient(135deg, #059669 0%, #10b981 100%) !important;
  border-color: #34d399 !important;
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.35), 0 8px 24px rgba(5, 150, 105, 0.45) !important;
  color: #ffffff !important;
  pointer-events: none;
}

@keyframes btnSubmitCharmBounce {
  0% {
    transform: scale(0.93);
  }
  35% {
    transform: scale(1.06);
  }
  65% {
    transform: scale(0.98);
  }
  85% {
    transform: scale(1.02);
  }
  100% {
    transform: scale(1);
  }
}

/* Hide normal contents when ticked */
.btn-submitting-ticked > *:not(.btn-tick-overlay):not(.btn-ripple-aura) {
  opacity: 0 !important;
  transform: scale(0.35) translateY(4px) !important;
  pointer-events: none !important;
}

/* Radiant Ripple Aura */
.btn-ripple-aura {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  z-index: 1;
}

.btn-submitting-ticked .btn-ripple-aura {
  animation: submitAuraPulse 0.55s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes submitAuraPulse {
  0% {
    opacity: 0.8;
    transform: scale(0.4);
    background: radial-gradient(circle, rgba(255, 255, 255, 0.6) 0%, rgba(16, 185, 129, 0) 70%);
  }
  100% {
    opacity: 0;
    transform: scale(2.2);
    background: radial-gradient(circle, rgba(255, 255, 255, 0.6) 0%, rgba(16, 185, 129, 0) 70%);
  }
}

/* Charming Tick Overlay */
.btn-tick-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  pointer-events: none;
  z-index: 10;
  opacity: 0;
  transform: scale(0.25) rotate(-15deg);
  color: #ffffff;
  transition: opacity 0.16s ease-out, transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.btn-submitting-ticked .btn-tick-overlay {
  opacity: 1;
  transform: scale(1) rotate(0deg);
  animation: submitTickPop 0.38s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes submitTickPop {
  0% {
    opacity: 0;
    transform: scale(0.25) rotate(-15deg);
  }
  50% {
    opacity: 1;
    transform: scale(1.18) rotate(3deg);
  }
  75% {
    transform: scale(0.96) rotate(-1deg);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
}

.btn-tick-icon {
  width: 28px;
  height: 28px;
  display: block;
  stroke: #ffffff;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.3));
}

.btn-tick-icon polyline {
  stroke-dasharray: 26;
  stroke-dashoffset: 26;
}

.btn-submitting-ticked .btn-tick-icon polyline {
  animation: tickStrokeDraw 0.26s cubic-bezier(0.3, 0, 0.2, 1) 0.05s forwards;
}

@keyframes tickStrokeDraw {
  to {
    stroke-dashoffset: 0;
  }
}

/* Charming Golden Micro-Sparkles */
.btn-sparkle {
  position: absolute;
  width: 12px;
  height: 12px;
  opacity: 0;
  pointer-events: none;
  color: #fef08a; /* Golden spark */
  filter: drop-shadow(0 1px 3px rgba(254, 240, 138, 0.5));
}

.btn-submitting-ticked .btn-sparkle.sp-1 {
  animation: submitSparkle1 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.btn-submitting-ticked .btn-sparkle.sp-2 {
  animation: submitSparkle2 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.03s forwards;
}
.btn-submitting-ticked .btn-sparkle.sp-3 {
  animation: submitSparkle3 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.05s forwards;
}
.btn-submitting-ticked .btn-sparkle.sp-4 {
  animation: submitSparkle4 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.07s forwards;
}
.btn-submitting-ticked .btn-sparkle.sp-5 {
  animation: submitSparkle5 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.04s forwards;
}
.btn-submitting-ticked .btn-sparkle.sp-6 {
  animation: submitSparkle6 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.06s forwards;
}

@keyframes submitSparkle1 {
  0% { transform: translate(0, 0) scale(0) rotate(0deg); opacity: 1; }
  50% { opacity: 1; }
  100% { transform: translate(-22px, -16px) scale(1) rotate(45deg); opacity: 0; }
}
@keyframes submitSparkle2 {
  0% { transform: translate(0, 0) scale(0) rotate(0deg); opacity: 1; }
  50% { opacity: 1; }
  100% { transform: translate(22px, -15px) scale(0.95) rotate(-35deg); opacity: 0; }
}
@keyframes submitSparkle3 {
  0% { transform: translate(0, 0) scale(0) rotate(0deg); opacity: 1; }
  50% { opacity: 1; }
  100% { transform: translate(-20px, 16px) scale(0.9) rotate(40deg); opacity: 0; }
}
@keyframes submitSparkle4 {
  0% { transform: translate(0, 0) scale(0) rotate(0deg); opacity: 1; }
  50% { opacity: 1; }
  100% { transform: translate(21px, 16px) scale(0.95) rotate(-25deg); opacity: 0; }
}
@keyframes submitSparkle5 {
  0% { transform: translate(0, 0) scale(0) rotate(0deg); opacity: 1; }
  50% { opacity: 1; }
  100% { transform: translate(0, -18px) scale(1.05) rotate(20deg); opacity: 0; }
}
@keyframes submitSparkle6 {
  0% { transform: translate(0, 0) scale(0) rotate(0deg); opacity: 1; }
  50% { opacity: 1; }
  100% { transform: translate(0, 18px) scale(1.05) rotate(-20deg); opacity: 0; }
}

/* Gentle Warning Shake when amount is empty */
@keyframes btnShakeError {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-5px); }
  40%, 80% { transform: translateX(5px); }
}

.btn-shake-error {
  animation: btnShakeError 0.36s ease-in-out !important;
}

/* Streamlined Counter Actions (Top: Inflow Sales | Bottom: Outflow / Party Mode) */
.pos-actions-streamlined {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 6px;
}

.pos-actions-row-in {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.btn-action-in {
  height: 58px;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: #ffffff;
  transition: transform 0.08s ease, filter 0.12s ease;
  padding: 6px 4px;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}

.btn-action-in:active {
  transform: scale(0.95);
}

.btn-action-cashin {
  background: var(--primary-color);
  box-shadow: none;
}
.btn-action-cashin:active {
  background: var(--primary-dark);
}

.btn-action-qrin {
  background: #4f46e5;
  box-shadow: none;
}
.btn-action-qrin:active {
  background: #4338ca;
}

.btn-action-credit {
  background: var(--amber-primary);
  box-shadow: none;
}
.btn-action-credit:active {
  filter: brightness(0.92);
}

.btn-action-delivery {
  background: #0284c7;
  box-shadow: none;
}
.btn-action-delivery:active {
  background: #0369a1;
}

.action-btn-label {
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1;
}

.badge-qr {
  background: #eef2ff;
  color: #4f46e5;
  border: 1px solid #c7d2fe;
}

.text-qr {
  color: #4f46e5;
}

.btn-action-cashout {
  width: 100%;
  height: 48px;
  background: #ffffff;
  border: 1.5px solid #fca5a5;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--red-primary);
  box-shadow: var(--shadow-subtle);
  transition: var(--transition-fast);
  padding: 6px 14px;
}

.btn-action-cashout:active {
  transform: scale(0.98);
  background: #fef2f2;
}

.cashout-btn-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.cashout-btn-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--red-primary);
  display: flex;
  align-items: center;
  gap: 4px;
}

.cashout-btn-tag {
  font-size: 0.72rem;
  font-weight: 700;
  background: #fee2e2;
  color: var(--red-dark);
  padding: 3px 9px;
  border-radius: var(--radius-full);
}

.action-btn-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  text-align: center;
}

.action-btn-title {
  font-size: 0.98rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.action-btn-subtitle {
  font-size: 0.65rem;
  font-weight: 500;
  opacity: 0.92;
}

/* Activity Feed */
.feed-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  margin-bottom: 6px;
}

.feed-title {
  font-size: 0.74rem;
  font-weight: 800;
  color: var(--text-muted);
  letter-spacing: 0.06em;
}

.tx-feed-list {
  background: #ffffff;
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-subtle);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  gap: 0;
}

.tx-feed-list .empty-state {
  border: none;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  padding: 32px 16px;
}

.empty-state {
  text-align: center;
  padding: 28px 16px;
  color: var(--text-muted);
  font-size: 0.88rem;
  background: #ffffff;
  border: 1px dashed var(--border-hairline);
  border-radius: var(--radius-md);
}

.tx-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 14px;
  background: #ffffff;
  border: none;
  border-bottom: 1px solid var(--border-hairline);
  border-radius: 0;
  box-shadow: none;
  transition: background var(--transition-fast);
  gap: 12px;
}

.tx-item:last-child {
  border-bottom: none;
}

.tx-item:hover,
.tx-item:active {
  background: var(--bg-hover, #f8fafc);
}

.tx-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.tx-badge-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: transparent !important;
  border: none !important;
  border-radius: 0;
}

.tx-badge-icon svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  display: block;
}

.badge-in {
  color: var(--green-primary);
  background: transparent !important;
  border: none !important;
}

.badge-out {
  color: var(--red-primary);
  background: transparent !important;
  border: none !important;
}

.badge-credit {
  color: var(--amber-primary);
  background: transparent !important;
  border: none !important;
}

.badge-qr {
  color: #4f46e5;
  background: transparent !important;
  border: none !important;
}

.tx-amount {
  font-size: 1.05rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.tx-badge-credit-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 4px;
  background: var(--amber-soft);
  color: var(--amber-primary);
  border: 1px solid var(--amber-border);
  letter-spacing: 0.02em;
  line-height: 1.25;
  flex-shrink: 0;
}

.tx-del-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 4px;
  letter-spacing: 0.02em;
  line-height: 1.25;
  flex-shrink: 0;
}

.tx-contact-tag {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: transparent !important;
  border: none !important;
  padding: 0;
  margin-left: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
}

.tx-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.tx-time {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}

.text-in { color: var(--green-primary); }
.text-out { color: var(--red-primary); }
.text-amber { color: var(--amber-primary); }

.btn-del-mini {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.btn-del-mini:hover {
  color: var(--red-primary);
}

/* ==========================================================================
   PAGE 2 & 3 TOOLBARS, BUTTONS & SEGMENTS
   ========================================================================== */
.section-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 12px;
}

.page-title {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

.page-subtitle {
  font-size: 0.76rem;
  color: var(--text-secondary);
}

.btn-solid-primary {
  padding: 9px 16px;
  background: var(--primary-color, #368098);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.84rem;
  cursor: pointer;
  box-shadow: var(--shadow-subtle);
  transition: transform 0.08s, background 0.12s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.btn-solid-primary:hover {
  background: var(--primary-dark, #286579);
}
.btn-solid-primary:active {
  transform: scale(0.96);
  background: var(--primary-darker, #163f4e);
}

.segmented-pills {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  background: #e2e8f0;
  padding: 4px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-hairline);
  margin-bottom: 12px;
}

.segmented-pills.cols-3 {
  grid-template-columns: repeat(3, 1fr);
}

.seg-pill {
  padding: 9px;
  background: transparent;
  border: none;
  border-radius: 6px;
  color: var(--text-secondary);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition-fast);
}

.seg-pill.active {
  background: #ffffff;
  color: var(--text-primary);
  box-shadow: none;
  border: 1px solid var(--border-subtle);
}

/* Delivery Filter Controls: Borderless Date Dropdown + Filter Tabs */
.del-filter-controls-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.del-filter-controls-row .segmented-pills {
  flex: 1;
  margin-bottom: 0;
}

.del-filter-controls-row .seg-pill {
  padding: 7px 4px;
  font-size: 0.82rem;
  text-align: center;
  white-space: nowrap;
}

.del-date-select-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  cursor: pointer;
  padding: 2px 0;
}

.borderless-select {
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  border: none;
  outline: none;
  box-shadow: none;
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text-primary);
  padding: 6px 18px 6px 4px;
  cursor: pointer;
  line-height: 1.2;
  transition: color 0.15s ease;
}

.borderless-select:focus {
  outline: none;
}

.borderless-select option {
  background: var(--bg-surface, #ffffff);
  color: var(--text-primary, #0f172a);
  font-size: 0.84rem;
  font-weight: 600;
  padding: 6px 10px;
}

.del-dropdown-chevron {
  position: absolute;
  right: 2px;
  pointer-events: none;
  color: var(--text-secondary);
  transition: transform 0.15s ease, color 0.15s ease;
}

.del-date-select-wrap:hover .borderless-select {
  color: #0f172a;
}

.del-date-select-wrap:hover .del-dropdown-chevron {
  color: var(--text-primary);
}

@media (max-width: 340px) {
  .del-filter-controls-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  .del-filter-controls-row .segmented-pills {
    width: 100%;
  }
}

.search-bar-wrap {
  position: relative;
  margin-bottom: 12px;
}

.search-svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.search-field {
  width: 100%;
  padding: 10px 14px;
  padding-left: 38px;
  background: #ffffff;
  border: 1.5px solid var(--border-hairline);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  outline: none;
  box-shadow: var(--shadow-subtle);
}
.search-field:focus {
  border-color: var(--border-focus);
}

/* ==========================================================================
   DELIVERY CARDS
   ========================================================================== */
.delivery-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.delivery-card {
  background: #ffffff;
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: var(--shadow-card);
  position: relative;
}

.delivery-card.status-out {
  border-color: var(--amber-primary);
  background: #fffdf9;
}

.delivery-card.status-delivered {
  opacity: 0.85;
  background: #f8fafc;
}

.delivery-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.del-cust-info {
  display: flex;
  flex-direction: column;
}

.del-cust-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
}

.del-header-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
  gap: 3px;
  flex-shrink: 0;
}

.del-header-amt {
  font-size: 1.18rem;
  font-weight: 800;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.del-pay-badge {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  white-space: nowrap;
  letter-spacing: 0.01em;
}

.del-pay-badge-cod {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
}

.del-pay-badge-paid {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.del-pay-badge-credit {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.del-cust-contact {
  font-size: 0.82rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
}
.del-cust-contact a {
  color: var(--blue-primary);
  text-decoration: none;
  font-weight: 600;
}

.del-phone-wa-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #16a34a;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: var(--radius-sm);
  padding: 3px 6px;
  cursor: pointer;
  line-height: 1;
  transition: all 0.15s ease;
  box-shadow: var(--shadow-subtle);
}

.del-phone-wa-btn:hover {
  background: #dcfce7;
  border-color: #86efac;
  color: #15803d;
}

.del-phone-wa-btn:active {
  transform: scale(0.95);
}

.del-phone-wa-btn svg {
  display: block;
  flex-shrink: 0;
}

.del-status-badge {
  font-size: 0.7rem;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.del-status-packing {
  background: var(--blue-soft);
  color: var(--blue-primary);
  border: 1px solid #bfdbfe;
}

.del-status-out {
  background: var(--amber-soft);
  color: var(--amber-primary);
  border: 1px solid var(--amber-border);
}

.del-status-delivered {
  background: var(--green-soft);
  color: var(--green-dark);
  border: 1px solid var(--green-border);
}

/* Checklist Items */
.del-items-box {
  background: transparent;
  border: none;
  padding: 2px 0;
}

.del-item-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 0;
  border-bottom: 1px dashed var(--border-hairline);
  cursor: pointer;
}
.del-item-row:last-child {
  border-bottom: none;
}

.del-checkbox {
  width: 18px;
  height: 18px;
  accent-color: var(--primary-color);
  cursor: pointer;
}

.del-item-text {
  font-size: 0.9rem;
  color: var(--text-primary);
  flex: 1;
}

.del-item-row.checked .del-item-text {
  text-decoration: line-through;
  color: var(--text-muted);
}

.delivery-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 8px;
  border-top: 1px solid var(--border-hairline);
}

.del-total-wrap {
  display: flex;
  flex-direction: column;
}

.del-total-label {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-muted);
}

.del-total-amt {
  font-size: 1.18rem;
  font-weight: 800;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

.del-footer-left {
  display: flex;
  align-items: center;
}

.del-items-count {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-muted);
}

.del-footer-right {
  display: flex;
  align-items: center;
}

/* Delivery Stepper in Card Footer (Icon on top, label on bottom) */
.del-stepper-wrap {
  display: inline-flex;
  align-items: flex-start;
  gap: 0;
}

.del-step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0 4px;
  text-decoration: none;
  user-select: none;
  min-width: 50px;
  text-align: center;
}

.del-step-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  box-sizing: border-box;
}

.del-step-label {
  font-size: 0.7rem;
  font-weight: 700;
  white-space: nowrap;
  line-height: 1.2;
}

.del-step-connector {
  width: 26px;
  height: 2px;
  margin-top: 13px;
  background: var(--border-hairline);
  transition: background 0.2s ease;
  flex-shrink: 0;
}

/* 1. Pending step */
.del-step-item.is-pending .del-step-icon {
  background: var(--bg-subtle);
  border: 1.5px dashed #cbd5e1;
  color: #94a3b8;
}
.del-step-item.is-pending .del-step-label {
  color: var(--text-muted);
  font-weight: 600;
}
.del-step-item.is-pending:hover .del-step-icon {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

/* 2. Active step */
.del-step-item.is-active .del-step-icon {
  background: var(--primary-soft);
  border: 2px solid var(--primary-color);
  color: var(--primary-dark);
  box-shadow: 0 0 0 3px var(--primary-shadow);
}
.del-step-item.is-active .del-step-label {
  color: var(--primary-dark);
  font-weight: 800;
}
.del-step-item.is-active:hover .del-step-icon {
  transform: scale(1.08);
  background: #dcfce7;
}
.del-step-item.is-active:active .del-step-icon {
  transform: scale(0.94);
}

/* 3. Completed step (Dimmed when complete) */
.del-step-item.is-completed {
  cursor: default;
  opacity: 0.42;
  transition: opacity 0.2s ease;
}

.del-step-item.is-completed:hover {
  opacity: 0.75;
}

.del-step-item.is-completed .del-step-icon {
  background: var(--green-soft);
  border: 1.5px solid var(--green-primary);
  color: var(--green-dark);
}

.del-step-item.is-completed .del-step-label {
  color: var(--text-secondary);
  font-weight: 600;
}

.del-step-connector.is-completed {
  background: var(--green-primary);
  opacity: 0.35;
}

/* Trash button in completed stepper */
.del-step-trash {
  margin-top: 3px;
  margin-left: 8px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s;
}
.del-step-trash:hover {
  color: var(--red-primary);
}

.del-actions {
  display: flex;
  gap: 6px;
}

.btn-sm {
  padding: 7px 12px;
  font-size: 0.82rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-hairline);
  background: #ffffff;
  color: var(--text-primary);
  cursor: pointer;
  box-shadow: var(--shadow-subtle);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.btn-sm:active {
  transform: scale(0.96);
  background: var(--bg-subtle);
}

.btn-deliver-collect {
  background: transparent;
  color: var(--primary-dark);
  border: 1.5px solid var(--primary-color);
  font-weight: 700;
}
.btn-deliver-collect:hover {
  background: var(--primary-soft);
  color: var(--primary-dark);
  border-color: var(--primary-dark);
}
.btn-deliver-collect:active {
  background: var(--primary-border);
  border-color: var(--primary-dark);
}

.btn-del-whatsapp {
  color: #16a34a;
  background: #f0fdf4;
  border-color: #bbf7d0;
  padding: 7px 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-del-whatsapp:hover {
  background: #dcfce7;
  color: #15803d;
  border-color: #86efac;
}

.btn-del-whatsapp svg {
  display: block;
  flex-shrink: 0;
}

/* Delivery Payment Options Selector (COD vs Paid Now vs Credit) */
.del-payment-options-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.del-payment-option-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  background: var(--bg-subtle);
  border: 1.5px solid var(--border-hairline);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.12s ease;
  user-select: none;
  -webkit-user-select: none;
  box-shadow: none !important;
}

.del-payment-option-card:hover {
  background: #ffffff;
  border-color: #cbd5e1;
}

.del-payment-option-card.active-cod {
  background: #f0f9ff;
  border-color: #0284c7;
}

.del-payment-option-card.active-cod .del-pay-title {
  color: #0369a1;
}

.del-payment-option-card.active-paid {
  background: #f0fdf4;
  border-color: var(--green-primary);
}

.del-payment-option-card.active-paid .del-pay-title {
  color: var(--green-dark);
}

.del-payment-option-card.active-credit {
  background: #fffbeb;
  border-color: var(--amber-primary);
}

.del-payment-option-card.active-credit .del-pay-title {
  color: #b45309;
}

.del-pay-radio {
  margin: 0;
  width: 17px;
  height: 17px;
  accent-color: var(--primary-color);
  cursor: pointer;
  flex-shrink: 0;
}

#radio-del-cod {
  accent-color: #0284c7;
}

#radio-del-advance {
  accent-color: var(--primary-color);
}

#radio-del-credit {
  accent-color: var(--amber-primary);
}

.del-pay-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.del-pay-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--text-primary);
}

.del-pay-hint {
  font-size: 0.74rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.del-pay-badge-paid {
  color: var(--green-dark);
  font-weight: 800;
}

.del-pay-badge-cod {
  color: #0284c7;
  font-weight: 800;
}

.del-pay-badge-credit {
  color: #b45309;
  font-weight: 800;
}

/* ==========================================================================
   KHATA CONTACT CARDS (Single card with bordered bottom rows)
   ========================================================================== */
.contact-card-list {
  background: #ffffff;
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-subtle);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  width: 100%;
  gap: 0;
}

.contact-card-list .empty-state {
  border: none;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  padding: 36px 16px;
}

.contact-card {
  background: #ffffff;
  border: none;
  border-bottom: 1px solid var(--border-hairline);
  border-radius: 0;
  padding: 13px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: none;
  transition: background var(--transition-fast);
  position: relative;
  width: 100%;
}

.contact-card:last-child {
  border-bottom: none;
}

.contact-card:hover,
.contact-card:active {
  background: var(--bg-hover, #f8fafc);
}

.contact-card.contact-card-clickable {
  cursor: pointer;
}

@media (min-width: 640px) {
  .contact-card {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 18px;
  }

  .contact-card-top {
    flex: 1;
    align-items: center;
    gap: 16px;
  }

  .contact-card-footer {
    border-top: none;
    margin-top: 0;
    padding-top: 0;
    flex-shrink: 0;
    gap: 8px;
  }
}

.contact-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.contact-header-left {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  flex: 1;
}

.contact-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0;
}

.contact-contact-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.contact-phone-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  background: var(--bg-subtle);
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid var(--border-hairline);
  transition: var(--transition-fast);
}

.contact-phone-link:hover {
  color: var(--text-primary);
  border-color: #cbd5e1;
  background: #ffffff;
}

.contact-phone-svg {
  color: var(--text-muted);
}

.contact-whatsapp-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #16a34a;
  cursor: pointer;
  padding: 0;
  transition: var(--transition-fast);
  flex-shrink: 0;
}

.contact-whatsapp-icon-btn:hover {
  background: #dcfce7;
  transform: scale(1.08);
}

.contact-no-phone {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

.contact-header-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
  gap: 4px;
  flex-shrink: 0;
}

.contact-balance-val {
  font-size: 1.25rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.contact-badge {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  padding: 2px 7px;
  border-radius: 4px;
  line-height: 1.2;
}

.contact-badge-receivable {
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fef3c7;
}

.contact-badge-payable {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fee2e2;
}

.contact-badge-settled {
  background: #f0fdf4;
  color: #15803d;
  border: 1px solid #dcfce7;
}

/* Khata Card Action Footer */
.contact-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--border-hairline);
  margin-top: 2px;
}

.btn-outline-ledger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  background: #ffffff;
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-outline-ledger:hover {
  color: var(--text-primary);
  border-color: #94a3b8;
  background: var(--bg-hover);
}

.btn-khata-settle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: var(--transition-fast);
  white-space: nowrap;
}

.btn-khata-collect {
  background: var(--primary-color);
  color: #ffffff;
}

.btn-khata-collect:hover {
  background: var(--primary-dark);
}

.btn-khata-pay {
  background: #0f172a;
  color: #ffffff;
}

.btn-khata-pay:hover {
  background: #334155;
}

/* ==========================================================================
   REPORTS DASHBOARD
   ========================================================================== */
.filter-pills-row {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
  overflow-x: auto;
  scrollbar-width: none;
}
.filter-pills-row::-webkit-scrollbar { display: none; }

.date-filter-btn {
  padding: 7px 14px;
  background: #ffffff;
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: var(--shadow-subtle);
}
.date-filter-btn.active {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
}

.report-metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.metric-card {
  background: #ffffff;
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-card);
}

.metric-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
}

.metric-value {
  font-size: 1.35rem;
  font-weight: 800;
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.metric-sub {
  font-size: 0.70rem;
  color: var(--text-muted);
  margin-top: 3px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.text-primary-color,
.text-primary { color: var(--primary-color); }
.text-green { color: var(--green-primary); }
.text-red { color: var(--red-primary); }
.text-blue { color: var(--blue-primary); }

.production-card {
  background: #ffffff;
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: var(--shadow-card);
}

.card-header-line {
  display: flex;
  flex-direction: column;
  margin-bottom: 6px;
}

.card-tag {
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  text-transform: uppercase;
}

.card-heading {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-primary);
}

.card-body-text {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.grid-two-btn {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.btn-outline {
  padding: 9px 12px;
  background: #ffffff;
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text-primary);
  cursor: pointer;
  box-shadow: var(--shadow-subtle);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.btn-outline:active {
  background: var(--bg-subtle);
}

.desktop-two-col-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Store Profile Hero Card */
.profile-hero-card {
  background: #ffffff;
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-md);
  padding: 18px 16px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow-subtle);
}

.profile-big-avatar {
  width: 54px;
  height: 54px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 800;
  flex-shrink: 0;
}

/* Form inputs */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 12px;
}

.form-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.form-input {
  width: 100%;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  background: #ffffff;
  border: 1.5px solid var(--border-hairline);
  color: var(--text-primary);
  outline: none;
  box-shadow: var(--shadow-subtle);
}
.form-input:focus {
  border-color: var(--border-focus);
}

textarea.form-input {
  resize: vertical;
  min-height: 70px;
  line-height: 1.45;
  font-family: inherit;
  font-size: 0.95rem;
}

/* ==========================================================================
   MODAL BOTTOM SHEETS (Mobile default)
   ========================================================================== */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 100;
  align-items: flex-end;
  justify-content: center;
}

.modal-overlay.show {
  display: flex;
  animation: fadeIn 0.15s ease-out;
}

.modal-sheet {
  width: 100%;
  max-width: 520px;
  background: #ffffff;
  border-top-left-radius: var(--radius-lg);
  border-top-right-radius: var(--radius-lg);
  border: 1px solid var(--border-hairline);
  padding: 12px 20px 28px;
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: var(--shadow-modal);
  animation: sheetSlideUp 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes sheetSlideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.sheet-drag-handle {
  width: 38px;
  height: 4px;
  background: var(--border-subtle);
  border-radius: var(--radius-full);
  margin: 0 auto 14px;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-hairline);
}

.modal-title {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

.btn-close-modal {
  background: transparent;
  border: none;
  font-size: 1.35rem;
  color: var(--text-muted);
  cursor: pointer;
}

.modal-hero-amount {
  text-align: center;
  margin-bottom: 14px;
}

.hero-amount-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
}

.hero-amount-val {
  font-size: 2.2rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

/* ==========================================================================
   FIXED BOTTOM NAVIGATION (Mobile)
   ========================================================================== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 520px;
  height: 64px;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--border-hairline);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 50;
  padding: 0 4px;
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--text-muted);
  cursor: pointer;
  background: transparent;
  border: none;
  height: 100%;
  transition: var(--transition-fast);
}

.nav-item:active {
  transform: scale(0.92);
}

.nav-item.active {
  color: var(--primary-color);
}

.nav-svg {
  width: 22px;
  height: 22px;
}

.nav-label {
  font-size: 0.72rem;
  font-weight: 700;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 6px;
  pointer-events: none;
  max-width: 90%;
}

.toast {
  background: #0f172a;
  color: #ffffff;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: var(--shadow-modal);
  animation: toastPop 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* ==========================================================================
   DESKTOP / TABLET POS LAYOUT (>= 992px)
   Transforms into a full-width, 2-column POS workstation!
   ========================================================================== */
@media (min-width: 992px) {
  /* Layout Shell */
  .app-layout-shell {
    background-color: #f1f5f9;
  }

  /* Desktop Sidebar */
  .desktop-sidebar {
    display: flex;
    flex-direction: column;
    width: 260px;
    background: #ffffff;
    border-right: 1px solid var(--border-hairline);
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 24px 16px;
    box-shadow: 1px 0 3px rgba(15, 23, 42, 0.03);
    z-index: 30;
  }

  .sidebar-header {
    padding-bottom: 20px;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--border-hairline);
  }

  .sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 0 0 auto;
  }

  .sidebar-link,
  .desktop-sidebar .nav-item {
    flex: 0 0 auto !important;
    height: 40px !important;
    min-height: 40px !important;
    max-height: 40px !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 10px !important;
    padding: 0 12px !important;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 600;
    text-align: left;
    border: 1px solid transparent !important;
    background: transparent !important;
    outline: none !important;
    box-shadow: none !important;
    cursor: pointer !important;
    transition: var(--transition-fast);
  }

  .sidebar-link .nav-svg,
  .desktop-sidebar .nav-item .nav-svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
  }

  .sidebar-link:hover,
  .desktop-sidebar .nav-item:hover {
    background: var(--bg-subtle) !important;
    color: var(--text-primary) !important;
    border-color: transparent !important;
  }

  .sidebar-link.active,
  .desktop-sidebar .nav-item.active {
    background: var(--primary-soft) !important;
    color: var(--primary-dark) !important;
    border: 1px solid var(--primary-border) !important;
    font-weight: 700 !important;
  }

  .sidebar-footer {
    display: none;
  }

  .desktop-shortcut-tip {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 600;
  }

  /* Main Desktop Content */
  .main-content-wrapper {
    padding: 24px 36px 40px;
    justify-content: center;
  }

  .app-container {
    max-width: 1180px;
    width: 100%;
    margin: 0 auto;
    border: none;
    box-shadow: none;
    background: transparent;
    padding-bottom: 0;
  }

  /* Hide Mobile-Only Elements */
  .app-header {
    display: none;
  }
  .bottom-nav {
    display: none;
  }

  /* Galla Section on Desktop */
  .galla-section {
    padding: 0 0 20px;
    background: transparent;
  }

  .galla-card {
    padding: 20px 24px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
  }

  .galla-main-amount {
    font-size: 2.8rem;
  }

  .galla-pills-row {
    gap: 12px;
  }

  .galla-pill {
    padding: 12px 16px;
  }

  .pill-label {
    font-size: 0.75rem;
    gap: 5px;
  }

  .pill-label .pill-icon {
    width: 14px;
    height: 14px;
  }

  .pill-val {
    font-size: 1.25rem;
  }

  /* Tab Content */
  .tab-content {
    padding: 0;
  }

  /* HISAB POS 2-COLUMN SPLIT ON DESKTOP */
  .pos-split-layout {
    display: grid;
    grid-template-columns: 1fr 410px;
    gap: 24px;
    align-items: flex-start;
  }

  .pos-feed-col {
    order: 1; /* Left side */
  }

  .pos-keypad-col {
    order: 2; /* Right side */
    background: #ffffff;
    border: 1px solid var(--border-hairline);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-card);
    position: sticky;
    top: 24px;
  }

  .pos-keypad-col .keypad-key {
    height: 62px;
    font-size: 1.8rem;
  }

  .pos-keypad-col .amount-display-box {
    padding: 16px 20px;
    min-height: 94px;
  }

  /* Delivery Khata Grid on Desktop */
  .delivery-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 16px;
  }

  /* Contact List Single Card on Desktop */
  .contact-card-list {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 0;
  }

  /* Reports 4-Card Row on Desktop */
  .report-metrics-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
  }

  .desktop-two-col-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
  }

  /* Modals on Desktop: Elegant Center Dialogs */
  .modal-overlay {
    align-items: center;
    padding: 20px;
  }

  .modal-sheet {
    max-width: 480px;
    border-radius: var(--radius-lg);
    animation: modalPop 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  }

  @keyframes modalPop {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
  }

  .sheet-drag-handle {
    display: none; /* No drag handle on desktop */
  }
}

/* ==========================================================================
   CUSTOMER CREDIT CYCLE LEDGER STYLING
   ========================================================================== */
.ledger-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-hairline);
  margin-bottom: 12px;
}

.ledger-cust-profile {
  display: flex;
  align-items: center;
  gap: 12px;
}

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

.ledger-header-amt-box {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
}

.ledger-header-bal-val {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--amber-primary);
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
}

.ledger-header-badge {
  font-size: 0.62rem;
  font-weight: 800;
  padding: 1.5px 6px;
  border-radius: 999px;
  margin-top: 2px;
  display: inline-block;
}

.ledger-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--amber-soft);
  border: 1.5px solid var(--amber-border);
  color: var(--amber-primary);
  font-size: 1.2rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ledger-cust-details {
  display: flex;
  flex-direction: column;
}

.ledger-cust-name {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-primary);
}

.ledger-cust-contact {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.ledger-balance-card {
  background: #fffdf9;
  border: 1.5px solid var(--amber-border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  box-shadow: var(--shadow-subtle);
}

.ledger-bal-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.ledger-bal-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
}

.ledger-bal-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.ledger-bal-val {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--amber-primary);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  margin-top: 2px;
}

.ledger-quick-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.ledger-action-btn {
  padding: 10px 4px;
  background: #ffffff;
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-primary);
  cursor: pointer;
  box-shadow: var(--shadow-subtle);
  transition: var(--transition-fast);
  text-align: center;
}

.ledger-action-btn:active {
  transform: scale(0.96);
  background: var(--bg-subtle);
}

.ledger-action-btn .action-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--bg-subtle);
  color: var(--text-primary);
  flex-shrink: 0;
}

#btn-ledger-give-credit .action-icon {
  background: #fff7ed;
  color: #ea580c;
}

#btn-ledger-discount .action-icon {
  background: #f5f3ff;
  color: #7c3aed;
}

#btn-ledger-whatsapp .action-icon {
  background: #ecfdf5;
  color: #16a34a;
}

#btn-ledger-call .action-icon {
  background: #eff6ff;
  color: #2563eb;
}

.statement-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  padding-bottom: 4px;
  border-bottom: 1px dashed var(--border-hairline);
}

.statement-title {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.statement-count {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.ledger-timeline-list {
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-md);
  max-height: 320px;
  overflow-y: auto;
  gap: 0;
}

.ledger-timeline-list .empty-state {
  border: none;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  padding: 28px 16px;
}

.statement-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  background: #ffffff;
  border: none;
  border-bottom: 1px solid var(--border-hairline);
  border-radius: 0;
  transition: background var(--transition-fast);
}

.statement-row:last-child {
  border-bottom: none;
}

.statement-row:hover,
.statement-row:active {
  background: var(--bg-hover, #f8fafc);
}

.statement-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.statement-icon-badge {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 800;
  flex-shrink: 0;
}

.statement-badge-credit {
  background: var(--amber-soft);
  color: var(--amber-primary);
  border: 1px solid var(--amber-border);
}

.statement-badge-paid {
  background: var(--green-soft);
  color: var(--green-dark);
  border: 1px solid var(--green-border);
}

.statement-badge-discount {
  background: #f5f3ff;
  color: #7c3aed;
  border: 1px solid #ddd6fe;
}

.statement-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.statement-type-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.statement-time-note {
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.statement-actions-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  margin-left: auto;
}

.statement-right {
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.statement-amt {
  font-size: 1.05rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
  white-space: nowrap;
}

.statement-running-bal {
  font-size: 0.68rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-top: 2px;
  white-space: nowrap;
}

/* Print Friendly */
@media print {
  .desktop-sidebar, .app-header, .galla-section, .bottom-nav, .pos-keypad-col, .section-toolbar {
    display: none !important;
  }
  body, .app-layout-shell, .app-container {
    background: #fff !important;
    max-width: 100% !important;
    border: none !important;
    box-shadow: none !important;
  }
}

/* ==========================================================================
   CARD SHADOWS EXPLICITLY DISABLED (Flat, crisp high-contrast border design)
   ========================================================================== */
.card,
.galla-card,
.delivery-card,
.contact-card,
.del-summary-card,
.del-payment-option-card,
.report-stat-card,
.metric-card,
.production-card,
.backup-card,
.ledger-balance-card,
.ledger-summary-banner,
.tx-item,
.statement-row,
.contact-profile-card,
.contact-history-row,
.pos-keypad-col,
.galla-drawer-breakdown,
.galla-closing-checklist {
  box-shadow: none !important;
}

