/* Shared presentation layer. The POS templates keep their existing markup and handlers. */
@font-face {
  font-family: 'Plus Jakarta Sans';
  src: url('/static/fonts/plus-jakarta-sans-variable.ttf') format('truetype');
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  src: url('/static/fonts/plus-jakarta-sans-italic-variable.ttf') format('truetype');
  font-style: italic;
  font-weight: 200 800;
  font-display: swap;
}

:root {
  --brand-cyan: #00c8fc;
  --brand-electric: #006efc;
  --brand-royal: #1352fc;
  --brand-violet: #4014fc;
  --brand-purple: #9001d2;
  --brand-magenta: #e501f3;
  --brand-pink: #fc02d2;
  --brand-hot-pink: #fc01a0;
  --ui-ink: #17213a;
  --ui-muted: #58657b;
  --ui-line: #dfe6f0;
  --ui-soft: #f5f8fd;
  --ui-white: #fff;
  --ui-focus: 0 0 0 3px rgba(0, 110, 252, .19);
  --ui-shadow: 0 4px 20px rgba(22, 46, 91, .07);
  --ui-radius: 12px;
  --font-display: 'Plus Jakarta Sans';
  --font-body: 'Plus Jakarta Sans';
  --ds-font-sans: 'Plus Jakarta Sans';
}

body.pos-app,
body.commands-app,
body.customer-app,
body.redirect-app,
body.pos-app *,
body.commands-app *,
body.customer-app *,
body.redirect-app *,
body.pos-app *::before,
body.pos-app *::after {
  font-family: 'Plus Jakarta Sans' !important;
}

body.pos-app {
  --bg-body: var(--ui-soft);
  --bg-surface: var(--ui-white);
  --bg-surface-elevated: var(--ui-white);
  --bg-subtle: #f7f9fd;
  --border-color: var(--ui-line);
  --border-hover: #bccbe4;
  --primary: var(--brand-electric);
  --primary-hover: var(--brand-royal);
  --primary-light: #eaf3ff;
  --primary-bg: #eaf3ff;
  --text-primary: var(--ui-ink);
  --text-secondary: var(--ui-muted);
  --color-primary: var(--brand-electric);
  --color-secondary: var(--brand-royal);
  --color-accent: var(--brand-violet);
  --color-ring: var(--brand-electric);
  --color-background: var(--ui-soft);
  --color-card: var(--ui-white);
  --color-border: var(--ui-line);
  --color-foreground: var(--ui-ink);
  --color-muted-foreground: var(--ui-muted);
  color: var(--ui-ink);
  font-size: 14px;
  line-height: 1.5;
}

body.pos-app .ds-topbar {
  background: #fff !important;
  color: var(--ui-ink) !important;
  border-bottom: 1px solid var(--ui-line) !important;
  box-shadow: 0 2px 12px rgba(24, 48, 92, .045) !important;
}
body.pos-app .ds-topbar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--brand-cyan), var(--brand-electric) 36%, var(--brand-violet) 68%, var(--brand-hot-pink));
  pointer-events: none;
}
body.pos-app .ds-topbar { position: relative; }
body.pos-app .ds-topbar-left { flex: 0 1 auto; max-width: 36%; overflow: hidden; }
body.pos-app .ds-topbar-left .ds-brand { flex: 0 0 auto; }
body.pos-app .ds-breadcrumb { min-width: 0; overflow: hidden; }
body.pos-app .ds-breadcrumb .current { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.pos-app .ds-topbar-center { min-width: 0; }
body.pos-app .ds-topbar-right { flex: 0 0 auto; min-width: 0; }
body.pos-app .ds-search-trigger { min-width: 0; height: 42px; }
body.pos-app .ds-search-trigger span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.pos-app .ds-search-trigger kbd { flex: 0 0 auto; white-space: nowrap; }
body.pos-app .app-layout { background: var(--ui-soft); gap: 0; padding: 0; }
body.pos-app .sidebar {
  background: #fff !important;
  border-right: 1px solid var(--ui-line) !important;
  box-shadow: none !important;
  padding: 14px 10px;
  overscroll-behavior: contain;
  scrollbar-width: auto;
  scrollbar-color: #bdcae4 #f1f5fb;
  height: calc(100% - 34px) !important;
  max-height: calc(100% - 34px) !important;
}
body.pos-app .sidebar::-webkit-scrollbar { width: 10px; }
body.pos-app .sidebar::-webkit-scrollbar-track { background: #f1f5fb; }
body.pos-app .sidebar::-webkit-scrollbar-thumb { background: #bdcae4; border-radius: 10px; }
body.pos-app .sidebar > .nav-group:last-child {
  margin-top: 6px;
  padding: 5px 3px 2px;
  background: #fff;
  border-top: 1px solid var(--ui-line);
}
body.pos-app .sidebar > .nav-group:last-child .nav-group-header { color: #173fba !important; }
body.pos-app .sidebar.collapsed {
  width: 56px !important;
  min-width: 56px !important;
  max-width: 56px !important;
  flex: 0 0 56px !important;
  padding: 12px 5px !important;
  overflow-x: hidden !important;
  scrollbar-width: thin;
}
body.pos-app .sidebar.collapsed .sidebar-link {
  width: 100%;
  min-width: 0;
  height: 40px;
  justify-content: center;
  padding: 0 !important;
  box-sizing: border-box;
}
body.pos-app .sidebar.collapsed .sidebar-link .link-icon { width: 18px; height: 18px; }
body.pos-app .nav-group-header { color: #64738e !important; }
body.pos-app .nav-group-header:hover { color: var(--brand-royal) !important; }
body.pos-app .sidebar-link {
  color: #354461 !important;
  border-radius: 9px !important;
  min-height: 38px;
  font-weight: 600;
  transition: color .15s, background .15s, box-shadow .15s;
}
body.pos-app .sidebar-link .link-icon { color: #7584a0 !important; }
body.pos-app .sidebar-link:hover {
  color: var(--brand-royal) !important;
  background: #edf4ff !important;
}
body.pos-app .sidebar-link:hover .link-icon { color: var(--brand-royal) !important; }
body.pos-app .sidebar-link.active {
  background: #eaf1ff !important;
  color: #123db8 !important;
  border-color: #c9dafd !important;
  box-shadow: inset 3px 0 0 var(--brand-royal);
}
body.pos-app .sidebar-link.active .link-icon { color: var(--brand-royal) !important; }
body.pos-app .sidebar .badge-pill { background: #edf4ff; color: #123db8; border-color: #c9dafd; }
body.pos-app .section-view.active { padding: 16px 18px 24px; min-width: 0; }
body.pos-app .section-view.active > .ds-page-scroll {
  flex: 0 0 auto;
  overflow: visible !important;
  min-width: 0;
}
body.pos-app .section-view.active { overscroll-behavior-y: contain; scrollbar-gutter: stable; }
body.pos-app .main-content { min-width: 0; }
body.pos-app .section-shortcut-help {
  margin: 8px 12px; padding: 10px 12px; border: 1px solid var(--ui-line);
  border-radius: 10px; background: var(--color-card, #fff); color: var(--color-foreground, #17213a);
  flex-shrink: 0;
}
body.pos-app .section-shortcut-help summary { cursor: pointer; font-size: 12px; font-weight: 700; }
body.pos-app .section-shortcut-help > div { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 10px; }
body.pos-app .section-key-button {
  display: inline-flex; align-items: center; gap: 7px; padding: 7px 10px;
  border: 1px solid var(--ui-line); border-radius: 8px;
  background: var(--color-card, #fff); color: var(--color-foreground, #17213a); cursor: pointer;
}
body.pos-app .section-key-button kbd, body.pos-app #shortcutHelpContent kbd {
  padding: 2px 5px; border-radius: 4px; background: #17213a; color: #fff;
}
body.pos-app .shortcut-help-table { width: 100%; border-collapse: collapse; }
body.pos-app .shortcut-help-table td, body.pos-app .shortcut-help-table th {
  padding: 9px; border-bottom: 1px solid var(--ui-line); text-align: left;
}
body.pos-app #shortcutHelpContent details { padding: 10px 0; }
/* One compact inline strip, matching the journal shortcut pills. */
body.pos-app .section-shortcut-strip {
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px;
  padding: 10px 0; margin: 6px 0 12px; min-width: 0;
  background: transparent; border: 0; flex-shrink: 0;
}
body.pos-app .shortcut-strip-label {
  padding: 0 8px; color: var(--color-muted-foreground, #64748b);
  font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
}
body.pos-app .section-shortcut-strip .section-key-button {
  border-radius: 999px; padding: 4px 10px; font-size: 11px; font-weight: 700;
  border: 1px solid #e9e5ff; background: #f5f3ff; color: #475569; gap: 6px;
}
body.pos-app .section-shortcut-strip .section-key-button kbd {
  padding: 1px 5px; border-radius: 4px; background: #4014fc; color: white; font-size: 10px;
}
[data-theme="dark"] body.pos-app .section-shortcut-strip .section-key-button {
  background: #25233e; border-color: #46415e; color: #e2e8f0;
}
/* The body is the only vertical scroll container; wheel input no longer gets
   trapped in an unbounded body while the parent card owns the scrollbar. */
body.pos-app #shortcutHelpModal .modal-card {
  display: flex; flex-direction: column; height: min(820px, calc(100dvh - 80px));
  max-height: calc(100dvh - 80px) !important; overflow: hidden !important;
}
body.pos-app #shortcutHelpModal .modal-header,
body.pos-app #shortcutHelpModal .modal-footer { flex: 0 0 auto; }
body.pos-app #shortcutHelpContent {
  flex: 1 1 auto; min-height: 0; overflow-y: auto !important; overflow-x: hidden !important;
  overscroll-behavior: contain; scrollbar-gutter: stable; touch-action: pan-y;
}
body.pos-app #shortcutHelpContent h4 { margin: 18px 0 10px; }
body.pos-app .shortcut-help-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
body.pos-app .shortcut-help-card {
  display: flex; align-items: center; gap: 10px; min-width: 0;
  padding: 12px; border: 1px solid var(--ui-line); border-radius: 9px;
  background: var(--color-card, #fff); color: var(--color-foreground, #17213a); font-size: 12px;
}
body.pos-app .shortcut-help-card kbd { flex-shrink: 0; }
body.pos-app .shortcut-help-card span { overflow-wrap: anywhere; }
body.pos-app .shortcut-section-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; align-items: start; }
body.pos-app #shortcutHelpContent .shortcut-section-grid details { padding: 12px; border: 1px solid var(--ui-line); border-radius: 9px; }
body.pos-app .shortcut-section-grid summary { cursor: pointer; font-size: 13px; font-weight: 700; }
body.pos-app .shortcut-section-grid .shortcut-help-grid { grid-template-columns: 1fr; margin-top: 10px; }
@media (max-width: 640px) {
  body.pos-app .shortcut-help-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body.pos-app .shortcut-section-grid { grid-template-columns: 1fr; }
  body.pos-app #shortcutHelpContent { padding: 12px; }
}
@media (max-width: 420px) {
  body.pos-app .shortcut-help-grid { grid-template-columns: 1fr; }
}

body.pos-app :is(.ds-card, .panel-card, .modal-card, .busy-transaction-workspace) {
  border-radius: var(--ui-radius) !important;
  border-color: var(--ui-line) !important;
  box-shadow: var(--ui-shadow) !important;
}
body.pos-app .busy-transaction-workspace[data-voucher-mode] { border-top: 3px solid var(--brand-royal) !important; }
body.pos-app .busy-right-sidebar {
  background: #f7faff !important;
  border-color: #dce7fa !important;
  border-radius: var(--ui-radius) !important;
  box-shadow: none !important;
}
/* Keep the POS rail in its own column instead of letting the item table push it off-screen. */
body.pos-app #section-pos .busy-transaction-workspace {
  grid-template-columns: minmax(0, 1fr) 240px !important;
  align-items: start !important;
  min-width: 0;
}
body.pos-app #section-pos .busy-main-window { min-width: 0 !important; width: 100% !important; }
body.pos-app #section-pos .busy-grid-container { min-width: 0 !important; overflow-x: auto !important; }
body.pos-app .busy-right-sidebar {
  position: sticky;
  top: 12px;
  max-height: calc(100dvh - 130px);
  overflow-y: auto !important;
  overflow-x: hidden;
  scrollbar-gutter: stable;
}
body.pos-app .busy-right-sidebar > * { flex-shrink: 0; }
body.pos-app .busy-side-btn { white-space: normal; min-height: 36px; text-align: left; }
body.pos-app .busy-side-btn > span:first-child { min-width: 54px; white-space: nowrap; }
body.pos-app.busy-sidebar-collapsed .busy-section-grid,
body.pos-app.busy-sidebar-collapsed #section-pos .busy-transaction-workspace { grid-template-columns: minmax(0, 1fr) 88px !important; }
body.pos-app.busy-sidebar-collapsed .busy-right-sidebar { width: 88px !important; min-width: 88px !important; }
body.pos-app.busy-sidebar-collapsed .busy-side-btn { padding: 8px 2px !important; }
@media (max-width: 760px) {
  body.pos-app #section-pos .busy-transaction-workspace,
  body.pos-app.busy-sidebar-collapsed #section-pos .busy-transaction-workspace { grid-template-columns: minmax(0, 1fr) !important; }
  body.pos-app #section-pos .busy-right-sidebar {
    position: static;
    order: -1;
    width: 100% !important;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: 240px;
  }
  body.pos-app #section-pos .busy-right-sidebar .busy-side-toggle-header,
  body.pos-app #section-pos .busy-right-sidebar .busy-side-divider { grid-column: 1 / -1; }
  body.pos-app #section-pos .busy-side-btn > span:nth-child(2) { display: inline !important; }
}
body.pos-app :is(.busy-voucher-banner, .ledger-summary-banner) {
  background: linear-gradient(105deg, var(--brand-electric), var(--brand-royal) 58%, var(--brand-violet)) !important;
  color: #fff !important;
}
body.pos-app .busy-voucher-banner div:has(> img[src*="pos-logo.png"]) { display: none !important; }

body.pos-app :is(.btn, .ds-btn, .busy-action-btn, .ds-ai-entry) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  border-radius: 9px !important;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
  white-space: nowrap;
  overflow-wrap: normal;
  transition: background-color .15s, border-color .15s, box-shadow .15s, transform .12s, filter .15s;
}
body.pos-app :is(.btn-sm, .ds-btn-sm, .busy-action-btn.compact) { min-height: 36px; }
body.pos-app :is(.btn-primary, .ds-btn-primary, .busy-action-btn.primary, .ds-ai-entry) {
  background: var(--brand-royal) !important;
  border-color: var(--brand-royal) !important;
  color: #fff !important;
  box-shadow: 0 3px 9px rgba(19, 82, 252, .16) !important;
}
body.pos-app :is(.btn-primary, .ds-btn-primary, .busy-action-btn.primary, .ds-ai-entry) :is(svg, i) {
  color: #fff !important;
  stroke: currentColor;
}
body.pos-app :is(.btn-primary, .ds-btn-primary, .busy-action-btn.primary, .ds-ai-entry):hover {
  background: var(--brand-violet) !important;
  border-color: var(--brand-violet) !important;
}
body.pos-app :is(.btn-secondary, .ds-btn-secondary) {
  background: #fff !important;
  border-color: #cbd8ed !important;
  color: #123db8 !important;
}
body.pos-app :is(.btn-secondary, .ds-btn-secondary):hover { background: #edf4ff !important; }
body.pos-app :is(.btn-danger, .ds-btn-danger):hover { filter: brightness(.91); }
body.pos-app :is(button, a, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--brand-electric) !important;
  outline-offset: 2px;
  box-shadow: var(--ui-focus) !important;
}
body.pos-app :is(button, input, select, textarea):disabled {
  opacity: .55;
  cursor: not-allowed;
  box-shadow: none !important;
}
body.pos-app :is(.busy-input, .ds-input, .filter-select, .form-control, .form-group input, .form-group select, .form-group textarea) {
  border-radius: 9px !important;
  border-color: #cbd6e7 !important;
  background-color: #fff !important;
  color: var(--ui-ink) !important;
  min-height: 44px;
  font-size: 14px;
}
body.pos-app :is(.busy-input, .ds-input, .filter-select, .form-control, .form-group input, .form-group select, .form-group textarea):focus {
  border-color: var(--brand-electric) !important;
  box-shadow: var(--ui-focus) !important;
}
body.pos-app :is(.ds-icon-btn, .action-icon-btn) {
  min-width: 40px;
  min-height: 40px;
  border-radius: 9px !important;
}
body.pos-app :is(.ds-icon-btn, .action-icon-btn):hover { background: #edf4ff !important; color: var(--brand-royal) !important; }
body.pos-app :is(.modal-header, .drawer-header) .icon-btn {
  min-width: 36px !important;
  width: 36px !important;
  min-height: 36px !important;
  height: 36px !important;
  padding: 0 !important;
  background: #fff !important;
  border: 1px solid #cbd8ed !important;
  border-radius: 9px !important;
  color: #173fba !important;
  font-size: 17px !important;
  box-shadow: 0 2px 6px rgba(15, 38, 91, .12) !important;
}
body.pos-app :is(.modal-header, .drawer-header) .icon-btn:hover {
  background: #edf4ff !important;
  border-color: var(--brand-electric) !important;
  color: var(--brand-violet) !important;
}
body.pos-app .gemini-drawer { max-width: 100vw; }
body.pos-app .gemini-drawer .drawer-header > div:first-child { min-width: 0; }
body.pos-app .gemini-drawer .drawer-header .icon-btn { flex: 0 0 36px; }
body.pos-app .gemini-drawer #geminiDrawerInput { min-width: 0; }

body.pos-app :is(.data-table, .ds-table, .busy-table) { font-variant-numeric: tabular-nums; }
body.pos-app :is(.data-table, .ds-table, .busy-table) th {
  background: #f5f8fe !important;
  color: #425272 !important;
  border-color: var(--ui-line) !important;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .015em;
  white-space: nowrap;
}
body.pos-app :is(.data-table, .ds-table, .busy-table) td { border-color: #e8edf5 !important; }
body.pos-app :is(.data-table, .ds-table, .busy-table) tbody tr:hover { background: #f4f8ff !important; }
body.pos-app :is(.data-table, .ds-table, .busy-table) td:last-child { white-space: nowrap; }
body.pos-app :is(.total, [class*="amount"], [class*="balance"], [class*="price"]) { font-variant-numeric: tabular-nums; }
body.pos-app :is(.badge-pill, .status-badge) { border-radius: 999px !important; white-space: nowrap; }
body.pos-app :is(.modal-card, .ds-command-palette, .ds-profile-dropdown) { max-width: calc(100vw - 32px); }
body.pos-app .modal-card { max-height: calc(100dvh - 32px); }
body.pos-app .modal-body { overflow-y: auto; }
body.pos-app #section-pos .busy-grid-container {
  overflow-x: auto !important;
  overflow-y: auto !important;
  overscroll-behavior-x: contain;
  scrollbar-gutter: stable;
}
body.pos-app #section-pos #busyItemTable { min-width: 860px; }
body.pos-app .modal-header { border-bottom-color: var(--ui-line) !important; }
body.pos-app .modal-footer { border-top-color: var(--ui-line) !important; }
body.pos-app #section-dashboard .table-responsive { overflow-x: auto !important; overflow-y: hidden !important; }
body.pos-app #section-aginganalysis #agingTableBody tr td:nth-child(8),
body.pos-app #section-aginganalysis table th:nth-child(8) { min-width: 122px; }
body.pos-app #section-aginganalysis #agingTableBody tr td:nth-child(8) span { display: inline-flex; white-space: nowrap; align-items: center; }
body.pos-app .section-view div:has(> table.data-table),
body.pos-app .section-view div:has(> table.ds-table) {
  max-width: 100%;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  -webkit-overflow-scrolling: touch;
}
body.pos-app .ds-profile-dropdown { border-radius: 12px !important; box-shadow: 0 16px 40px rgba(22, 46, 91, .18) !important; }
body.pos-app .ds-profile-dropdown a:hover { background: #edf4ff !important; color: var(--brand-royal) !important; }

body.pos-app #section-whatsappmarketing .busy-window-header { padding: 12px 16px !important; }
body.pos-app #section-whatsappmarketing .busy-series-title {
  display: inline-flex;
  max-width: 100%;
  padding: 8px 12px;
  border-radius: 9px !important;
  background: linear-gradient(100deg, var(--brand-electric), var(--brand-royal) 60%, var(--brand-violet)) !important;
  color: #fff !important;
  font-size: 12px;
  line-height: 1.35;
  white-space: normal;
}
body.pos-app #section-whatsappmarketing .busy-window-header > div:last-child {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 16px;
  color: var(--ui-muted) !important;
  line-height: 1.45;
}
body.pos-app #section-whatsappmarketing .busy-window-header > div:last-child > span:last-child { text-align: right; }
body.pos-app #section-whatsappmarketing .pos-grid > * { min-width: 0; }
body.pos-app #section-whatsappmarketing .panel-header .panel-title { color: var(--ui-ink) !important; }
body.pos-app #section-whatsappmarketing .wa-recipients-header {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 8px;
}
body.pos-app #section-whatsappmarketing .wa-recipients-title {
  display: block;
  min-width: 0;
  font-size: 14px;
  line-height: 1.4;
  overflow-wrap: normal;
}
body.pos-app #section-whatsappmarketing .wa-recipient-count { white-space: nowrap; }
body.pos-app #section-whatsappmarketing .wa-recipients-header .busy-header-btn {
  justify-self: end;
  min-height: 36px;
  white-space: nowrap;
  border-radius: 8px !important;
}
body.pos-app #section-whatsappmarketing .wa-recipient-row {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  min-width: 0;
}
body.pos-app #section-whatsappmarketing .wa-recipient-details { min-width: 0; overflow-wrap: anywhere; }
body.pos-app #section-whatsappmarketing .wa-recipient-actions { flex-wrap: wrap; justify-content: flex-end; min-width: 0; }
body.pos-app #section-whatsappmarketing .wa-recipient-actions .btn { min-height: 36px; }
body.pos-app #section-godowns #godownsListContainer .panel-header,
body.pos-app #section-devsio .panel-header {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr);
  justify-items: start;
  align-items: start;
  gap: 6px;
}
body.pos-app #section-godowns #godownsListContainer .panel-title,
body.pos-app #section-devsio .panel-header .panel-title { min-width: 0; line-height: 1.4; }

body.pos-app .business-health-audit-modal {
  display: flex;
  flex-direction: column;
  width: min(760px, calc(100vw - 32px));
  max-width: calc(100vw - 32px);
  max-height: calc(100dvh - 32px);
  overflow: hidden;
}
body.pos-app #businessHealthAuditModal { z-index: 1100; }
body.pos-app .audit-dialog-heading { min-width: 0; }
body.pos-app .audit-dialog-heading h3 { margin: 0; color: var(--ui-ink) !important; }
body.pos-app .audit-dialog-heading p { margin: 4px 0 0; color: var(--ui-muted); font-size: 12px; }
body.pos-app .business-health-audit-modal .modal-header,
body.pos-app .business-health-audit-modal .modal-footer { flex: 0 0 auto; }
body.pos-app .business-health-audit-modal .modal-body {
  display: grid;
  align-content: start;
  gap: 16px;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}
body.pos-app .audit-score-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
  border-radius: 12px;
  background: linear-gradient(105deg, var(--brand-electric), var(--brand-royal) 60%, var(--brand-violet));
  color: #fff;
}
body.pos-app .audit-score-card > div { display: grid; gap: 2px; }
body.pos-app .audit-score-card strong { font-size: 32px; line-height: 1.1; }
body.pos-app .audit-score-card p { max-width: 290px; margin: 0; color: #fff; font-size: 12px; line-height: 1.5; }
body.pos-app .audit-eyebrow { font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
body.pos-app .audit-section {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--ui-line);
  border-radius: 12px;
  background: var(--ui-white);
}
body.pos-app .audit-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--ui-line);
}
body.pos-app .audit-section-head h4 { margin: 0; color: var(--ui-ink); font-size: 15px; line-height: 1.35; }
body.pos-app .audit-section-head > span { color: var(--ui-muted); font-size: 12px; font-weight: 700; }
body.pos-app .audit-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
body.pos-app .audit-stat { display: grid; gap: 3px; min-width: 0; padding: 12px; border: 1px solid var(--ui-line); border-radius: 10px; background: var(--ui-soft); }
body.pos-app .audit-stat span { color: var(--ui-muted); font-size: 11px; font-weight: 700; }
body.pos-app .audit-stat strong { color: var(--ui-ink); font-size: 16px; line-height: 1.25; overflow-wrap: anywhere; }
body.pos-app .audit-recommendations { display: grid; gap: 9px; }
body.pos-app .audit-recommendations h4 { margin: 0 0 2px; color: var(--ui-ink); font-size: 14px; }
body.pos-app .audit-recommendation { display: grid; gap: 8px; min-width: 0; padding: 13px 14px; border: 1px solid var(--ui-line); border-radius: 10px; background: var(--ui-soft); }
body.pos-app .audit-recommendation-head { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 6px 10px; min-width: 0; }
body.pos-app .audit-recommendation strong { color: var(--ui-ink); font-size: 13px; }
body.pos-app .audit-recommendation p { margin: 0; color: var(--ui-muted); font-size: 12px; line-height: 1.5; }
body.pos-app .audit-priority { flex: 0 0 auto; border-radius: 999px; padding: 3px 8px; font-size: 10px; font-weight: 800; text-transform: capitalize; }
body.pos-app .audit-priority.critical { background: #fee2e2; color: #991b1b; }
body.pos-app .audit-priority.high { background: #fef3c7; color: #92400e; }
body.pos-app .audit-priority.medium { background: #e8f1ff; color: #1643a7; }
body.pos-app .audit-priority.low { background: #dcfce7; color: #166534; }
body.pos-app :is(.audit-loading, .audit-error, .audit-empty) { padding: 18px; border-radius: 10px; background: var(--ui-soft); color: var(--ui-ink); font-size: 13px; }
body.pos-app .audit-error { border: 1px solid #f0a6aa; color: #aa2430; }
body.pos-app:has(#businessHealthAuditModal.active) #toastContainer { z-index: 90 !important; }

body.customer-app { background: var(--ui-soft); color: var(--ui-ink); }
body.customer-app header { background: linear-gradient(100deg, var(--brand-electric), var(--brand-royal) 65%, var(--brand-violet)); }
body.customer-app .side, body.customer-app table { border-radius: var(--ui-radius); box-shadow: var(--ui-shadow); }
body.customer-app .total { color: var(--brand-royal); font-variant-numeric: tabular-nums; }
body.commands-app {
  --primary: var(--brand-royal);
  --primary-light: var(--brand-cyan);
  --font-display: 'Plus Jakarta Sans';
  --font-body: 'Plus Jakarta Sans';
  --radius-sm: 8px;
}
body.commands-app :is(button, input, select, textarea):focus-visible { outline: 2px solid var(--brand-cyan); outline-offset: 2px; }
body.commands-app .input-box input { min-width: 0; }

[data-theme="dark"] body.pos-app {
  --ui-ink: #edf3ff;
  --ui-muted: #a7b5cf;
  --ui-line: #33435e;
  --ui-soft: #0d1628;
  --ui-white: #172238;
  --bg-subtle: #1b2941;
  --primary-light: #a8c7ff;
  --primary-bg: #1a315c;
  --color-muted: #202e48;
  --color-muted-foreground: #a7b5cf;
  --color-card-foreground: #edf3ff;
  --text-muted: #a7b5cf;
  --ui-shadow: 0 4px 20px rgba(0, 0, 0, .22);
  background: var(--ui-soft);
}
[data-theme="dark"] body.pos-app .ds-topbar,
[data-theme="dark"] body.pos-app .sidebar { background: var(--ui-white) !important; color: var(--ui-ink) !important; border-color: var(--ui-line) !important; }
[data-theme="dark"] body.pos-app .sidebar > .nav-group:last-child { background: var(--ui-white); border-color: var(--ui-line); }
[data-theme="dark"] body.pos-app .nav-group-header { color: #a8b8d4 !important; }
[data-theme="dark"] body.pos-app .sidebar-link { color: #d6e1f6 !important; }
[data-theme="dark"] body.pos-app .sidebar-link .link-icon { color: #a7b9d9 !important; }
[data-theme="dark"] body.pos-app .sidebar-link:hover,
[data-theme="dark"] body.pos-app .sidebar-link.active { background: #233b69 !important; color: #fff !important; border-color: #3a5a91 !important; }
[data-theme="dark"] body.pos-app .sidebar-link:hover .link-icon,
[data-theme="dark"] body.pos-app .sidebar-link.active .link-icon { color: #a8ceff !important; }
[data-theme="dark"] body.pos-app :is(.ds-card, .panel-card, .modal-card, .busy-transaction-workspace) { background: var(--ui-white) !important; }
[data-theme="dark"] body.pos-app .busy-right-sidebar { background: #1b2941 !important; border-color: var(--ui-line) !important; }
[data-theme="dark"] body.pos-app :is(.busy-input, .ds-input, .filter-select, .form-control, .form-group input, .form-group select, .form-group textarea) {
  background: #111c30 !important;
  border-color: #425473 !important;
  color: #edf3ff !important;
}
[data-theme="dark"] body.pos-app :is(.data-table, .ds-table, .busy-table) th { background: #223351 !important; color: #c1d3f2 !important; border-color: #354a69 !important; }
[data-theme="dark"] body.pos-app :is(.data-table, .ds-table, .busy-table) td { border-color: #30405b !important; }
[data-theme="dark"] body.pos-app :is(.data-table, .ds-table, .busy-table) tbody tr:hover { background: #223351 !important; }
[data-theme="dark"] body.pos-app :is(.btn-secondary, .ds-btn-secondary) { background: #192b4a !important; color: #c6dcff !important; border-color: #425b83 !important; }
[data-theme="dark"] body.pos-app :is(.btn-secondary, .ds-btn-secondary):hover { background: #244273 !important; }
[data-theme="dark"] body.pos-app .ds-profile-dropdown { background: #172238 !important; color: #edf3ff !important; }
[data-theme="dark"] body.pos-app .ds-profile-dropdown a:hover { background: #223351 !important; color: #fff !important; }
body.pos-app #dsProfileMenu .ds-signout-action,
body.pos-app #dsProfileMenu .ds-signout-action svg { color: #b91c1c !important; }
body.pos-app #dsProfileMenu .ds-signout-action:hover { background: #fef2f2 !important; }
[data-theme="dark"] body.pos-app #dsProfileMenu .ds-signout-action,
[data-theme="dark"] body.pos-app #dsProfileMenu .ds-signout-action svg { color: #fca5a5 !important; }
[data-theme="dark"] body.pos-app #dsProfileMenu .ds-signout-action:hover { background: #3b202c !important; }
[data-theme="dark"] body.pos-app .ds-search-trigger { background: #21314e !important; border-color: #405576 !important; color: #dce9ff !important; }
[data-theme="dark"] body.pos-app .ds-search-trigger kbd { background: #14233b !important; color: #c7d6ee !important; }
[data-theme="dark"] body.pos-app #section-pos :is(.busy-window-header, .busy-grid-container, .busy-sundry-box, .busy-settlement-box, .busy-bottom-toolbar) {
  background: #172238 !important;
  color: #edf3ff !important;
  border-color: #33435e !important;
}
[data-theme="dark"] body.pos-app #section-pos :is(.busy-window-header, .busy-settlement-box) :is(.busy-field-group label, .busy-grand-total-label, .busy-settlement-title, .busy-sundry-title),
[data-theme="dark"] body.pos-app #section-pos .busy-voucher-mode-title,
[data-theme="dark"] body.pos-app #section-pos #busyVoucherModeTitle,
[data-theme="dark"] body.pos-app #section-pos #busyChangeDueText,
[data-theme="dark"] body.pos-app #section-pos .busy-settlement-box label { color: #edf3ff !important; }
[data-theme="dark"] body.pos-app #section-pos :is(.busy-input, .busy-cell-input, .busy-input[readonly]) {
  background: #111c30 !important;
  color: #edf3ff !important;
  border-color: #425473 !important;
}
[data-theme="dark"] body.pos-app #section-pos :is(.busy-table td, .busy-table tr:nth-child(odd), .busy-table tr:nth-child(even), .busy-grid-footer-row, .busy-grid-footer-row td) { background: #172238 !important; color: #edf3ff !important; }
[data-theme="dark"] body.pos-app #section-pos :is(.busy-table th, .busy-table thead) { background: #243653 !important; color: #dce9ff !important; }
[data-theme="dark"] body.pos-app :is(#section-profitloss, #section-balancesheet, #section-stockstatus) [style*="background: #FDFDFD"]:not(.busy-voucher-banner),
[data-theme="dark"] body.pos-app #section-ledgerstatement [style*="background: #ffffff"],
[data-theme="dark"] body.pos-app #section-ledgerstatement .ledger-modern-card,
[data-theme="dark"] body.pos-app #section-devsio .panel-card {
  background: #172238 !important;
  color: #edf3ff !important;
  border-color: #33435e !important;
}
[data-theme="dark"] body.pos-app #section-ledgerstatement :is(h2, label, .ledger-modern-card),
[data-theme="dark"] body.pos-app #section-devsio .panel-card p,
[data-theme="dark"] body.pos-app #section-devsio .panel-card [style*="color: #475569"] { color: #dce9ff !important; }
[data-theme="dark"] body.pos-app #section-ledgerstatement .ledger-input-modern { background: #111c30 !important; color: #edf3ff !important; border-color: #425473 !important; }
[data-theme="dark"] body.pos-app #section-ledgerstatement .ledger-modern-card .ds-btn[style*="background: #ffffff"],
[data-theme="dark"] body.pos-app #section-ledgerstatement .ledger-modern-card .ds-btn[style*="background: #f8fafc"] { background: #21314e !important; color: #dce9ff !important; border-color: #425473 !important; }
[data-theme="dark"] body.pos-app #section-devsio .panel-card > div[style*="background: #f8fafc"] { background: #21314e !important; color: #dce9ff !important; }
[data-theme="dark"] body.pos-app #section-devsio .panel-header { background: #21314e !important; border-color: #33435e !important; }
[data-theme="dark"] body.pos-app #section-devsio .panel-header .panel-title { color: #edf3ff !important; }
[data-theme="dark"] body.pos-app #section-whatsappmarketing .form-group label { color: #c8d9fb !important; }
[data-theme="dark"] body.pos-app .audit-priority.critical { background: #562a37; color: #ffb8c0; }
[data-theme="dark"] body.pos-app .audit-priority.high { background: #514020; color: #ffdc83; }
[data-theme="dark"] body.pos-app .audit-priority.medium { background: #263b68; color: #c3d9ff; }
[data-theme="dark"] body.pos-app .audit-priority.low { background: #1a4c42; color: #b5f0d4; }
[data-theme="dark"] body.pos-app .audit-error { color: #ffb8c0; border-color: #7d4550; }
[data-theme="dark"] body.pos-app .gemini-drawer .gemini-card { background: #172238 !important; color: #edf3ff !important; border-color: #33435e !important; }
[data-theme="dark"] body.pos-app .gemini-drawer .gemini-card > div:first-child { color: #edf3ff !important; }
[data-theme="dark"] body.pos-app .gemini-drawer #geminiDrawerChatLogs { background: #101b2f !important; color: #edf3ff !important; border-color: #33435e !important; }
[data-theme="dark"] body.pos-app .gemini-drawer #geminiDrawerChatLogs > div { background: #21314e !important; color: #dce9ff !important; }
[data-theme="dark"] body.pos-app .ds-avatar { color: #fff !important; }
[data-theme="dark"] body.pos-app #section-pos #busyVoucherModeSub,
[data-theme="dark"] body.pos-app #section-pos .busy-settlement-title > span { color: #b7c9e5 !important; }
[data-theme="dark"] body.pos-app #section-pos .pos-held-carts-strip { background: #172238 !important; border-color: #33435e !important; color: #dce9ff !important; }
[data-theme="dark"] body.pos-app input[type="date"] { color-scheme: dark; }

@media (max-width: 1500px) {
  body.pos-app #section-ledgerstatement .ledger-modern-card > div[style*="grid-template-columns"] { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
  body.pos-app #section-ledgerstatement #pleInfoBanner { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
  body.pos-app #section-ledgerstatement #pleInfoBanner > * { min-width: 0; }
}

@media (max-width: 1100px) {
  body.pos-app .sidebar:not(.collapsed) { width: 200px !important; min-width: 200px !important; max-width: 200px !important; flex: 0 0 200px !important; }
  body.pos-app .ds-topbar-right :is(.ds-ai-entry, #adminRoleBadgeBtn) span { display: none; }
  body.pos-app .ds-topbar-right :is(.ds-ai-entry, #adminRoleBadgeBtn) { min-width: 40px; width: 40px; min-height: 40px; padding: 0 !important; justify-content: center; }
  body.pos-app .busy-section-grid { grid-template-columns: minmax(0, 1fr) 190px !important; }
  body.pos-app .busy-transaction-workspace { grid-template-columns: minmax(0, 1fr) 190px !important; }
  body.pos-app .section-view.active { padding: 14px; }
  body.pos-app #section-pos .busy-bottom-toolbar,
  body.pos-app #section-pos .busy-bottom-toolbar > div { flex-wrap: wrap !important; min-width: 0; max-width: 100%; }
  body.pos-app #section-pos .busy-bottom-toolbar .busy-action-btn { flex: 1 1 auto; min-width: 0; }
  body.pos-app #section-ledgerstatement .ledger-modern-card > div[style*="grid-template-columns"] { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  body.pos-app #section-ledgerstatement #pleInfoBanner { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  body.pos-app #section-dashboard .ds-page-scroll > div:has(#salesTrendsChart) { grid-template-columns: minmax(0, 1fr) !important; }
}
@media (max-width: 1350px) {
  body.pos-app .ds-breadcrumb { display: none; }
}
@media (max-width: 900px) {
  body.pos-app #section-whatsappmarketing .busy-window-header > div:last-child { grid-template-columns: minmax(0, 1fr); }
  body.pos-app #section-whatsappmarketing .busy-window-header > div:last-child > span:last-child { text-align: left; }
  body.pos-app .ds-topbar-right :is(.ds-ai-entry, #adminRoleBadgeBtn) span { display: none; }
  body.pos-app .ds-topbar-right :is(.ds-ai-entry, #adminRoleBadgeBtn) { min-width: 40px; width: 40px; min-height: 40px; padding: 0 !important; justify-content: center; }
  body.pos-app .app-layout { position: relative; }
  body.pos-app .sidebar:not(.collapsed) { width: 58px !important; min-width: 58px !important; max-width: 58px !important; flex: 0 0 58px !important; padding: 12px 6px; }
  body.pos-app .sidebar:not(.collapsed) .nav-group-header { display: none !important; }
  body.pos-app .sidebar:not(.collapsed) .nav-group-items { display: flex !important; }
  body.pos-app .sidebar:not(.collapsed) .sidebar-link { justify-content: center; padding: 9px 0; }
  body.pos-app .sidebar:not(.collapsed) .sidebar-link span:not(.link-icon) { display: none !important; }
  body.pos-app .sidebar.collapsed {
    width: min(290px, calc(100vw - 72px)) !important;
    min-width: min(290px, calc(100vw - 72px)) !important;
    max-width: min(290px, calc(100vw - 72px)) !important;
    flex: none !important;
    position: absolute;
    z-index: 100;
    top: 0;
    left: 0;
    height: calc(100% - 34px) !important;
    padding: 14px 10px !important;
    box-shadow: 12px 0 28px rgba(21, 45, 88, .18) !important;
  }
  body.pos-app .sidebar.collapsed .nav-group-header { display: flex !important; }
  body.pos-app .sidebar.collapsed .nav-group-header span,
  body.pos-app .sidebar.collapsed .nav-group-header .nav-group-chevron { display: inline-block !important; }
  body.pos-app .sidebar.collapsed .sidebar-link { justify-content: flex-start; padding: 8px 10px !important; }
  body.pos-app .sidebar.collapsed .sidebar-link span:not(.link-icon) { display: inline-block !important; }
  body.pos-app .sidebar.collapsed .nav-group.collapsed .nav-group-items { display: none !important; }
  body.pos-app .busy-section-grid,
  body.pos-app.busy-sidebar-collapsed .busy-section-grid,
  body.pos-app .busy-transaction-workspace,
  body.pos-app.busy-sidebar-collapsed .busy-transaction-workspace { grid-template-columns: minmax(0, 1fr) !important; }
  body.pos-app .busy-right-sidebar { max-width: 100%; }
  body.pos-app .section-view .table-responsive { overflow-x: auto !important; overflow-y: hidden !important; }
  body.pos-app #section-dashboard .ds-page-scroll > div:nth-child(3) { grid-template-columns: minmax(0, 1fr) !important; }
  body.pos-app #section-dashboard .ds-card { min-width: 0; }
  body.pos-app #section-dashboard #salesTrendsChart { max-width: 100% !important; }
  body.pos-app #dashPeriodFilter { flex-wrap: wrap; }
  body.pos-app #section-pos .busy-lower-split { grid-template-columns: minmax(0, 1fr) !important; }
  body.pos-app #section-pos .busy-lower-split > * { min-width: 0; }
  body.pos-app #section-profitloss [style*="grid-template-columns: 1fr 1fr"],
  body.pos-app #section-balancesheet #bsPrintContainer { grid-template-columns: minmax(0, 1fr) !important; }
  body.pos-app #section-ledgerstatement #pleInfoBanner { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  body.pos-app #section-ledgerstatement .ledger-modern-card > div[style*="grid-template-columns"] { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  body.pos-app #section-ledgerstatement .ledger-modern-card { min-width: 0; }
  body.pos-app #section-stockstatus #busyStockSearchInput { min-width: 0; }
  body.pos-app #section-stockstatus #busyStockSearchInput + * { min-width: 0; }
}
@media (max-width: 600px) {
  body.pos-app .audit-score-card { display: grid; padding: 16px; }
  body.pos-app .audit-stats { grid-template-columns: minmax(0, 1fr); }
  body.pos-app .audit-recommendation { display: grid; }
  body.pos-app #section-whatsappmarketing .wa-recipient-row { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  body.pos-app #section-whatsappmarketing .wa-recipient-actions { justify-content: flex-start; }
  body.pos-app .ds-topbar { min-height: 104px; height: auto; padding: 5px 10px 7px; gap: 2px 6px; flex-wrap: wrap; }
  body.pos-app .ds-topbar-left { flex: 1 0 100%; gap: 7px; }
  body.pos-app .ds-topbar-left .ds-brand img { height: 30px !important; max-width: 144px !important; }
  body.pos-app .ds-breadcrumb { display: none; }
  body.pos-app .ds-topbar-center { flex: 0 0 40px; justify-content: flex-start; }
  body.pos-app .ds-search-trigger { width: 38px; height: 38px; min-width: 38px; padding: 0; justify-content: center; }
  body.pos-app .ds-search-trigger span, body.pos-app .ds-search-trigger kbd { display: none; }
  body.pos-app .ds-topbar-right { gap: 2px; margin-left: auto; }
  body.pos-app .ds-topbar-right :is(.ds-icon-btn, .ds-ai-entry, #adminRoleBadgeBtn) { min-width: 36px; width: 36px; min-height: 36px; height: 36px; padding: 0 !important; justify-content: center; }
  body.pos-app .ds-topbar-right :is(.ds-ai-entry, #adminRoleBadgeBtn) span { display: none; }
  body.pos-app .ds-topbar-right .ds-profile-menu-wrap .ds-icon-btn { width: 36px !important; height: 36px !important; }
  body.pos-app #toastContainer { left: 66px; right: 8px; bottom: 42px; z-index: 90; pointer-events: none; }
  body.pos-app #toastContainer .toast-msg { max-width: 100%; overflow-wrap: break-word; border-radius: 9px; }
  body.pos-app .app-layout { height: calc(100dvh - 104px); min-height: calc(100dvh - 104px); max-height: calc(100dvh - 104px); }
  body.pos-app .section-view.active { padding: 10px 8px 20px; }
  body.pos-app .section-view .busy-section-grid > div:first-child { min-width: 0; }
  body.pos-app #section-ledgerstatement .busy-section-grid > div:first-child > div:first-child > div:first-child { flex-wrap: wrap; min-width: 0; }
  body.pos-app #section-ledgerstatement .busy-section-grid > div:first-child > div:first-child > div:last-child { flex-wrap: wrap; min-width: 0; }
  body.pos-app #section-ledgerstatement .ledger-modern-card > div[style*="grid-template-columns"] { grid-template-columns: minmax(0, 1fr) !important; }
  body.pos-app #section-ledgerstatement #pleInfoBanner { grid-template-columns: minmax(0, 1fr) !important; }
  body.pos-app #section-ledgerstatement .ledger-modern-card > div[style*="display: flex"] { min-width: 0; flex-wrap: wrap; }
  body.pos-app #section-ledgerstatement .ledger-input-modern { min-width: 0; max-width: 100%; }
  body.pos-app #section-profitloss .ds-card,
  body.pos-app #section-balancesheet .ds-card { min-width: 0; max-width: 100%; }
  body.pos-app #section-balancesheet #bsPrintContainer .ds-card > div:first-child { flex-wrap: wrap; gap: 8px; }
  body.pos-app #section-stockstatus .busy-main-window,
  body.pos-app #section-stockstatus .busy-section-grid > div:first-child > div[style*="justify-content: space-between"] { min-width: 0; }
  body.pos-app #section-stockstatus .busy-section-grid > div:first-child > div[style*="justify-content: space-between"] > div:first-child { flex-wrap: wrap; min-width: 0 !important; width: 100%; }
  body.pos-app #section-stockstatus :is(#busyStockCatFilter, #busyStockLevelFilter) { width: 100% !important; min-width: 0 !important; }
  body.pos-app #section-stockstatus .search-input-wrapper { min-width: 0; width: 100%; max-width: 100% !important; flex: 1 1 100% !important; }
  body.pos-app #section-pos .busy-lower-split { padding: 8px !important; }
  body.pos-app #section-pos .busy-bottom-toolbar,
  body.pos-app #section-pos .busy-bottom-toolbar > div { flex-wrap: wrap !important; min-width: 0; max-width: 100%; }
  body.pos-app #section-pos .busy-bottom-toolbar .busy-action-btn { flex: 1 1 auto; min-width: 0; }
  body.pos-app #section-pos .busy-settlement-box > div[style*="grid-template-columns"] { grid-template-columns: minmax(0, 1fr) !important; }
  body.pos-app #section-pos .busy-settlement-box > div[style*="grid-template-columns"] > div { min-width: 0; }
  body.pos-app #section-pos #busyChangeDueText { flex-wrap: wrap; gap: 4px; }
  body.pos-app #section-pos .busy-primary-cta { white-space: normal; overflow-wrap: anywhere; }
  body.pos-app #section-add-product .form-group,
  body.pos-app #section-add-client .form-group,
  body.pos-app #section-receipts .form-group { min-width: 0; max-width: 100%; }
  body.pos-app #section-add-product .ds-card,
  body.pos-app #section-add-client .ds-card { min-width: 0 !important; max-width: 100%; flex: 1 1 100% !important; overflow-wrap: anywhere; }
  body.pos-app #section-add-product .ds-card > div,
  body.pos-app #section-add-client .ds-card > div { min-width: 0; flex-wrap: wrap; }
  body.pos-app #section-expenseslist .exp-date-range { flex-wrap: wrap; min-width: 0; }
  body.pos-app #section-expenseslist .exp-date-range input[type="date"] { min-width: 0; max-width: 100%; }
  body.pos-app #section-devsio .busy-section-grid > div:first-child > div:last-child > div:last-child { flex-wrap: wrap; min-width: 0; width: 100%; }
  body.pos-app #section-devsio .busy-section-grid > div:first-child > div:last-child { min-width: 0; }
  body.pos-app #section-devsio .busy-section-grid > div:first-child > div:last-child > div:last-child { display: grid !important; grid-template-columns: minmax(0, 1fr) !important; }
  body.pos-app #section-devsio .busy-section-grid > div:first-child > div[style*="background: linear-gradient"] > div:last-child { display: flex !important; flex-direction: column; align-items: stretch !important; width: 100%; min-width: 0; }
  body.pos-app #section-devsio .busy-section-grid > div:first-child > div[style*="background: linear-gradient"] > div:last-child > * { width: 100%; min-width: 0; }
  body.pos-app #section-devsio [style*="background: linear-gradient"] > div:last-child { display: flex !important; flex-direction: column !important; align-items: stretch !important; gap: 8px; width: 100%; min-width: 0; }
  body.pos-app #section-devsio [style*="background: linear-gradient"] > div:last-child > * { width: 100%; min-width: 0; }
  body.pos-app #section-devsio .busy-section-grid > div:first-child > div:last-child :is(a, button) { max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
  body.pos-app #section-returns .btn-danger { max-width: 100%; min-width: 0; white-space: normal; }
  body.pos-app #section-deliverychallans .busy-voucher-banner > div:last-child { flex-wrap: wrap; }
  body.pos-app #section-deliverychallans .busy-voucher-banner .btn { min-width: 0; max-width: 100%; white-space: normal; }
  body.pos-app .section-view .busy-voucher-banner {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    justify-items: start;
    gap: 10px !important;
    padding: 14px !important;
    min-width: 0;
  }
  body.pos-app .section-view .busy-voucher-banner > * { max-width: 100%; min-width: 0; }
  body.pos-app .section-view .busy-voucher-banner > div:first-child { flex-wrap: wrap; }
  body.pos-app .section-view .busy-voucher-banner > div:nth-child(2) { align-items: flex-start !important; text-align: left !important; }
  body.pos-app .section-view .busy-voucher-banner > div:nth-child(2) > div { flex-wrap: wrap; justify-content: flex-start !important; }
  body.pos-app .section-view .filter-bar { flex-wrap: wrap !important; }
  body.pos-app .section-view .filter-bar > * { flex: 1 1 100% !important; min-width: 0 !important; }
  body.pos-app .section-view input[style*="min-width"] { min-width: 0 !important; max-width: 100%; }
  body.pos-app .ledger-summary-banner { grid-template-columns: minmax(0, 1fr) !important; }
  body.pos-app .ledger-summary-banner .ledger-stat-box { min-width: 0; }
  body.pos-app .ledger-stat-value { white-space: nowrap; font-variant-numeric: tabular-nums; }
  body.pos-app #section-ledgerstatement .ledger-modern-card > div:first-child { grid-template-columns: minmax(0, 1fr) !important; }
  body.pos-app #section-ledgerstatement .ledger-modern-card > div:last-child { flex-wrap: wrap !important; }
  body.pos-app #section-products .ds-card:has(#productBrandFilter) > div[style*="grid-template-columns"] { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  body.pos-app #section-products .ds-card:has(#productBrandFilter) > div[style*="grid-template-columns"] > div:nth-child(5),
  body.pos-app #section-products .ds-card:has(#productBrandFilter) > div[style*="grid-template-columns"] > button { grid-column: 1 / -1; }
  body.pos-app #section-products #productMinPrice,
  body.pos-app #section-products #productMaxPrice { flex: 1 1 0; width: 0 !important; min-width: 0; }
  body.pos-app .acc-landing-portal-grid { grid-template-columns: minmax(0, 1fr) !important; }
  body.pos-app .acc-portal-card { padding: 18px !important; min-width: 0; }
  body.pos-app #section-devsio .devsio-pill-badge { position: static !important; transform: none !important; white-space: normal !important; max-width: 100%; }
  body.pos-app #section-devsio .busy-window-header { display: flex; flex-direction: column; gap: 10px; }
  body.pos-app #section-devsio .busy-window-header > div { flex-wrap: wrap !important; }
  body.pos-app #section-devsio .busy-header-badges { flex-wrap: wrap; max-width: 100%; }
  body.pos-app #section-devsio [style*="display: grid"] { grid-template-columns: minmax(0, 1fr) !important; }
  body.pos-app #section-devsio a { overflow-wrap: anywhere; }
  body.pos-app #section-dashboard .ds-page-scroll > div:first-child > div:last-child {
    width: 100%;
    flex-wrap: wrap;
  }
  body.pos-app #section-dashboard .ds-page-scroll > div:first-child > div:last-child .ds-btn { flex: 1 1 auto; }
  body.pos-app #section-pos .busy-grid-container::before {
    content: 'Swipe sideways to view all bill columns';
    display: block;
    padding: 4px 8px 8px;
    color: var(--ui-muted);
    font-size: 11px;
    font-weight: 600;
  }
  body.pos-app .modal-card { width: calc(100vw - 16px) !important; max-width: calc(100vw - 16px); }
  body.pos-app .modal-footer { flex-wrap: wrap; }
  body.pos-app .modal-footer :is(.btn, .ds-btn) { flex: 1 1 auto; }
  body.customer-app main { grid-template-columns: minmax(0, 1fr); padding: 14px; }
  body.customer-app header { padding: 14px; gap: 12px; }
  body.customer-app header h1 { font-size: 1.2rem; }
  body.commands-app .input-box { flex-wrap: wrap; }
  body.commands-app .input-box input { flex: 1 1 100%; width: 100%; }
  body.commands-app .input-box .btn { flex: 1 1 calc(50% - 6px); justify-content: center; min-width: 0; }
  body.commands-app .header h1 { font-size: clamp(1.7rem, 8vw, 2.2rem); }
}

/* Shared shortcut rails: fixed badge column and consistently aligned labels. */
body.pos-app .busy-right-sidebar .busy-side-btn {
  display: grid !important;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}
body.pos-app .busy-right-sidebar .busy-side-btn > span:nth-child(2) {
  min-width: 0;
  text-align: left;
  line-height: 1.35;
}
body.pos-app.busy-sidebar-collapsed .busy-right-sidebar .busy-side-btn {
  grid-template-columns: 54px;
  justify-content: center;
}
@media (max-width: 760px) {
  body.pos-app.busy-sidebar-collapsed #section-pos .busy-right-sidebar .busy-side-btn {
    grid-template-columns: 54px minmax(0, 1fr);
  }
}

body.pos-app .section-shortcut-strip .shortcut-field-hint {
  cursor: default; background: transparent; border-color: transparent; box-shadow: none;
}
body.pos-app .section-shortcut-strip .shortcut-field-hint:hover { color: #334155; }
[data-theme="dark"] body.pos-app .section-shortcut-strip .shortcut-field-hint,
[data-theme="dark"] body.pos-app .section-shortcut-strip .shortcut-field-hint:hover {
  background: transparent; border-color: transparent; color: #e2e8f0;
}

/* Keep section shortcuts on one row without widening the page. */
body.pos-app .section-shortcut-strip {
  flex-wrap: nowrap;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
}
body.pos-app .section-shortcut-strip > * {
  flex: 0 0 auto;
  white-space: nowrap;
}

body.pos-app #section-pos .section-shortcut-strip { gap: 4px; }
body.pos-app #section-pos .shortcut-strip-label { padding: 0 4px 0 0; }
body.pos-app #section-pos .section-shortcut-strip .section-key-button {
  padding: 4px 6px;
  gap: 4px;
}

/* Distribute the sales shortcuts across the available row. */
body.pos-app #section-pos .section-shortcut-strip {
  width: 100%;
  box-sizing: border-box;
  justify-content: space-between;
}
