/* Shared POS theme: Devsio spectrum in the bars, white working surfaces. */
:root, body.pos-app {
  --ui-soft:#fff; --bg-body:#fff; --bg-surface:#fff;
  --bg-surface-elevated:#fff; --bg-subtle:#fff;
  --color-background:#fff; --color-card:#fff; --color-muted:#fff;
  --brand-bar:linear-gradient(110deg,#007bb5 0%,#1352fc 36%,#7100c7 70%,#cc007e 100%);
  --text-primary:#17213a; --text-secondary:#58657b;
}
html, body.pos-app, body.pos-app .app-layout,
body.pos-app .main-content, body.pos-app .content-area,
body.pos-app .section, body.pos-app [id^="section-"],
body.pos-app .sidebar, body.pos-app .ds-card,
body.pos-app .card, body.pos-app .modal-content,
body.pos-app table, body.pos-app tbody, body.pos-app tr,
body.pos-app input, body.pos-app select, body.pos-app textarea {
  background-color:#fff !important;
}
body.pos-app .ds-topbar {
  background:var(--brand-bar) !important;
  color:#fff !important; border:0 !important;
}
body.pos-app .ds-topbar::before { display:none !important; }
body.pos-app .ds-topbar .ds-icon-btn,
body.pos-app .ds-topbar .ds-search-trigger,
body.pos-app .ds-topbar .ds-breadcrumb,
body.pos-app .ds-topbar .ds-breadcrumb .current,
body.pos-app .ds-topbar #adminRoleBadgeBtn {
  color:#fff !important; background:transparent !important;
  border-color:rgba(255,255,255,.4) !important;
}
body.pos-app .ds-topbar .ds-search-trigger { background:rgba(255,255,255,.13) !important; }
body.pos-app .ds-topbar kbd { background:rgba(255,255,255,.18) !important; color:#fff !important; }
body.pos-app .ds-brand img { background:#fff; padding:4px 10px; border-radius:7px; }
body.pos-app .busy-section-header, body.pos-app .busy-header,
body.pos-app .jv-topbar {
  background:var(--brand-bar) !important; color:#fff !important;
}
body.pos-app .busy-section-header *, body.pos-app .busy-header *,
body.pos-app .jv-topbar h1, body.pos-app .jv-topbar h2 { color:#fff !important; }
body.pos-app .sidebar-link.active {
  background:#fff !important; color:#7100c7 !important;
  border-left:3px solid #cc007e !important;
}
#themeToggleBtn { display:none !important; }
#demo-clock { background:linear-gradient(110deg,#1352fc,#7100c7,#cc007e) !important; }

/* All module title bars use the shared brand; working surfaces remain white. */
body.pos-app :is(.busy-window-header,.busy-side-toggle-header,.dark-header-theme,.jv-topbar,.drawer-header) {
  background:var(--brand-bar) !important; color:#fff !important;
}
body.pos-app :is(.busy-window-header,.dark-header-theme,.jv-topbar) :is(h1,h2,h3,p,span,.busy-window-title,.busy-window-subtitle) {
  color:#fff !important;
}
body.pos-app :is(.main-wrapper,.main-container,.main-content,.content-wrapper,.content-section,.tab-content,.panel,.panel-body,.panel-header,.form-panel,.busy-form-panel,.busy-window-body,.busy-right-sidebar,.busy-bottom-toolbar,.modal,.modal-body,.modal-footer,.ph-card,.filter-bar,.ds-toolbar,.ds-card,.card,.owner-centre,.oc-card),
body.pos-app :is(thead,tbody,tr,td,th) { background-color:#fff !important; }
body.pos-app dialog { margin:auto !important; position:fixed !important; inset:0 !important; }
body.pos-app dialog::backdrop { background:rgba(18,28,48,.38); }
body.pos-app dialog table th { text-align:left;padding:10px 8px;border-bottom:1px solid #ddd; }
body.pos-app dialog table td { padding:10px 8px;border-bottom:1px solid #eee; }
body.pos-app .doc-open-link { color:#1352fc !important; text-decoration:underline; }

body.commands-app, body.customer-app, body.security-page { background:#fff !important; color:#17213a; }
body.commands-app :is(header,.header,.topbar), body.customer-app :is(header,.topbar), body.security-page h1 {
  background:linear-gradient(110deg,#007bb5,#1352fc,#7100c7,#cc007e);color:white;
}

body.pos-app #section-invoices .table-container,
body.pos-app #section-quotations .table-container { overflow:auto !important; }
body.pos-app #invoicesTableBody td:last-child,
body.pos-app #quotationsTableBody td:last-child { position:sticky;right:0;background:#fff!important;z-index:2;box-shadow:-3px 0 8px #17213a10; }
body.pos-app .document-row { cursor:pointer; }
body.pos-app #invoicesTableBody .ds-btn,
body.pos-app #quotationsTableBody .ds-btn { padding:6px 8px;min-height:32px; }
body.pos-app .dark-header-theme { background:var(--brand-bar) !important; }

body.pos-app .busy-voucher-banner { background:var(--brand-bar) !important; color:#fff !important;border-bottom-color:#7100c7!important; }
body.pos-app .busy-voucher-banner :is(span,h1,h2,h3,p) { color:#fff !important; }

body.pos-app #section-pos #busyVoucherBanner, body.pos-app #section-pos .busy-window-header .busy-voucher-banner { background:var(--brand-bar)!important;color:#fff!important; }
body.pos-app #section-pos #busyVoucherBanner :is(span,div,p,h1,h2,h3) { color:#fff!important; }
body.pos-app #section-pos :is(table,thead,tbody,tr,td,th) { background-color:#fff!important; }

body.pos-app .busy-voucher-banner img { background:#fff;padding:5px 9px;border-radius:7px; }
body.pos-app #section-pos #busyVoucherBanner .busy-series-title { background:rgba(255,255,255,.18)!important;color:#fff!important;border-color:rgba(255,255,255,.35)!important; }

/* Document viewer: rule the item and journal grids so each product line reads
   as its own row on screen and in a screenshot, matching the printed copy. */
#documentEditor table { width: 100%; border-collapse: collapse; margin: 14px 0; }
#documentEditor th,
#documentEditor td { border: 1px solid #94a3b8; padding: 8px 10px; text-align: left; }
#documentEditor thead th,
#documentEditor table th { background: #f1f5f9 !important; font-weight: 700; }
#documentEditor td:nth-child(n+2),
#documentEditor th:nth-child(n+2) { text-align: right; }
#documentEditor td input,
#documentEditor td select { max-width: 100%; }
