:root {
  color-scheme: light;
  font-family: Arial, Helvetica, sans-serif;
  --ink: #17201f;
  --muted: #65706d;
  --line: #dbe1df;
  --paper: #fbfcfb;
  --soft: #eef5f2;
  --green: #147a55;
  --blue: #255da8;
  --amber: #a56010;
  --red: #b51d26;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
}
button, input, select {
  font: inherit;
}
button {
  border: 1px solid var(--line);
  background: white;
  border-radius: 6px;
  padding: 10px 12px;
  cursor: pointer;
}
button:hover { border-color: var(--green); }
button:disabled {
  cursor: not-allowed;
  background: #eeeeee;
  border-color: #d2d8d6;
  color: #858d8a;
}
button:disabled:hover {
  border-color: #d2d8d6;
}
button.primary {
  background: var(--green);
  border-color: var(--green);
  color: white;
  font-weight: 700;
}
button.primary:disabled {
  background: #eeeeee;
  border-color: #d2d8d6;
  color: #858d8a;
}
button.ghost { background: transparent; }
input, select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px;
  background: white;
}
input[type="number"] {
  appearance: textfield;
  -moz-appearance: textfield;
}
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
textarea {
  width: 100%;
  min-height: 94px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px;
  resize: vertical;
  font: inherit;
}
label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}
table {
  width: 100%;
  border-collapse: collapse;
}
th, td {
  border-bottom: 1px solid var(--line);
  padding: 10px 8px;
  text-align: left;
  vertical-align: middle;
}
tbody tr {
  cursor: pointer;
}
tbody tr.selected {
  background: #fff2a8;
  outline: 2px solid #d29b00;
  outline-offset: -2px;
}
tbody tr.frozen-account,
tbody tr.frozen-account.selected,
.picker-row.frozen-account,
.picker-row.frozen-account.active {
  background: #eeeeee;
  color: #5f6664;
}
tbody tr.frozen-account.selected,
.picker-row.frozen-account.active {
  outline: 2px solid #aeb6b3;
  outline-offset: -2px;
  border-color: #aeb6b3;
}
.picker-row.frozen-account span {
  color: #707876;
}
th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}
.filter-row th {
  padding: 6px;
  background: #f6faf8;
}
.filter-row input {
  min-width: 110px;
  padding: 7px;
}
.hidden { display: none !important; }
.topbar, .screen-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 28px;
  border-bottom: 1px solid var(--line);
  background: white;
}
.topbar h1, .screen-head h2 {
  margin: 0;
  letter-spacing: 0;
}
.eyebrow {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  font-weight: 700;
}
.session-user {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}
.top-actions {
  display: grid;
  gap: 10px;
  min-width: min(760px, 100%);
}
.database-panel, .rate-panel {
  display: flex;
  align-items: end;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
}
.connection-panel {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}
.connection-panel span,
.status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 10px;
  background: #f8fbfa;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
}
.status-badge.online,
.status-badge.synced {
  border-color: #b8d8c9;
  color: var(--green);
}
.status-badge.offline {
  border-color: #e2c0c2;
  color: var(--red);
}
.status-badge.syncing {
  border-color: #e4c489;
  color: var(--amber);
}
.database-panel label {
  min-width: 150px;
}
.maintenance-panel {
  display: grid;
  gap: 16px;
}
.maintenance-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 12px;
}
.transfer-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 10px 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fbfa;
}
.transfer-options.compact {
  grid-template-columns: 1fr;
  padding: 10px;
}
.transfer-options label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
}
.transfer-options input {
  width: auto;
}
.database-maintenance-modal {
  gap: 14px;
}
.database-maintenance-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 10px;
}
.database-maintenance-actions button {
  min-height: 46px;
  text-align: left;
}
.database-history-panel {
  display: grid;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}
.database-history-panel h4 {
  margin: 0;
}
.database-history-list {
  max-height: 340px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fbfa;
}
.database-history-row {
  display: grid;
  grid-template-columns: minmax(150px, 190px) minmax(130px, 170px) 1fr minmax(90px, 120px);
  gap: 10px;
  padding: 10px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.database-history-row:last-child {
  border-bottom: 0;
}
.database-history-row strong {
  color: var(--ink);
}
.database-history-row span {
  color: var(--muted);
}
.home-grid {
  min-height: calc(100vh - 86px);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  padding: 28px;
}
.module-tile {
  min-height: 320px;
  padding: 26px;
  text-align: left;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: white;
  border: 0;
  position: relative;
  overflow: hidden;
  background-position: center;
  background-size: cover;
  box-shadow: inset 0 -170px 120px rgba(0, 0, 0, 0.66);
  isolation: isolate;
}
.module-tile::before,
.pos-menu-tile::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.68));
  transition: opacity .18s ease;
}
.module-tile:hover::before,
.pos-menu-tile:hover::before {
  opacity: .82;
}
.module-tile span {
  font-size: 42px;
  font-weight: 800;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.52);
}
.module-tile small {
  font-size: 17px;
  line-height: 1.45;
  max-width: 330px;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
}
.module-tile.pos { background-image: url("assets/menu-pos.svg"); }
.module-tile.erp { background-image: url("assets/menu-erp.svg"); }
.module-tile.store {
  background-image: url("assets/menu-store.svg");
  color: #07120f;
  box-shadow: inset 0 -170px 120px rgba(255, 255, 255, 0.8);
}
.module-tile.store::before {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.82));
}
.module-tile.store span,
.module-tile.store small {
  text-shadow: 0 2px 14px rgba(255, 255, 255, 0.78);
}
.screen { min-height: 100vh; }
.pos-layout {
  display: grid;
  grid-template-columns: 320px minmax(480px, 1fr) 320px;
  gap: 16px;
  padding: 16px;
}
.panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
}
.panel h3 { margin: 0 0 12px; }
.input-row, .invoice-toolbar, .checkout, .control-band, .subnav {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.control-band #newAccount,
.control-band #editAccount,
.control-band #freezeAccount,
.control-band #deleteAccount {
  background: #ffe2bd;
  border-color: #f3b465;
  color: #5d3510;
  font-weight: 700;
}
.control-band [data-erp-transaction="sales"],
.control-band [data-erp-transaction="returnSales"],
.control-band [data-erp-transaction="purchase"],
.control-band [data-erp-transaction="returnPurchase"],
.control-band #adjustStockIn,
.control-band #adjustStockOut {
  background: #d9efff;
  border-color: #91c8ed;
  color: #174b75;
  font-weight: 700;
}
.control-band [data-erp-transaction="pay"],
.control-band [data-erp-transaction="receipt"],
.control-band [data-erp-transaction="debitNote"],
.control-band [data-erp-transaction="creditNote"] {
  background: #fff4b8;
  border-color: #e6ca55;
  color: #625111;
  font-weight: 700;
}
.control-band #deleteAccount,
.control-band [data-erp-transaction="returnSales"],
.control-band [data-erp-transaction="returnPurchase"],
.control-band #adjustStockOut {
  color: var(--red);
}
.input-row input { flex: 1; }
.search-results, .invoice-list, #itemStatement {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}
.result-row, .invoice-row, .statement-row {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px;
  background: var(--soft);
}
.openable-row {
  cursor: zoom-in;
}
.openable-row:hover {
  outline: 2px solid rgba(42, 128, 96, 0.28);
  outline-offset: -2px;
}
.statement-context-menu {
  position: fixed;
  z-index: 1000;
  display: grid;
  min-width: 238px;
  padding: 8px;
  border: 1px solid #b7c2ca;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 16px 40px rgba(17, 32, 31, 0.2);
}
.statement-context-menu.hidden {
  display: none;
}
.statement-context-menu button {
  justify-content: flex-start;
  min-height: 36px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--ink);
  text-align: left;
}
.statement-context-menu button:hover:not(:disabled) {
  background: #e6f3ee;
}
.statement-context-menu button:disabled {
  color: #9aa4ac;
  cursor: not-allowed;
}
.result-row button, .invoice-row button { margin-top: 8px; }
.tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.tabs button.active, .subnav button.active, .subnav .erp-menu.active > .erp-menu-button, .account-types button.active {
  border-color: var(--green);
  background: var(--soft);
  color: var(--green);
  font-weight: 700;
}
.item-menu {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.item-menu button {
  min-height: 74px;
  text-align: left;
}
.pos-menu-panel {
  min-height: calc(100vh - 96px);
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 16px;
  padding: 16px;
}
.pos-menu-tile {
  min-height: 210px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: left;
  position: relative;
  overflow: hidden;
  background: white;
  background-position: center;
  background-size: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: white;
  box-shadow: inset 0 -130px 100px rgba(0, 0, 0, 0.7);
  isolation: isolate;
}
.pos-menu-tile strong {
  font-size: 28px;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.58);
}
.pos-menu-tile span {
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.45;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.7);
}
.pos-menu-sales { background-image: url("assets/pos-sales.svg"); }
.pos-menu-invoices { background-image: url("assets/pos-old-invoices.svg"); }
.pos-menu-settings { background-image: url("assets/pos-settings.svg"); }
.pos-menu-logout { background-image: url("assets/pos-logout.svg"); }
.pos-section-panel {
  margin: 16px;
}
.section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.section-title-row h3 {
  margin: 0;
}
.invoice-sections, .settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 14px;
}
.settings-grid {
  grid-template-columns: repeat(2, minmax(220px, 1fr)) auto;
  align-items: end;
}
.printer-setting {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}
.printer-setting strong {
  color: var(--ink);
  font-size: 14px;
}
.printer-setting span {
  min-height: 40px;
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--soft);
  padding: 10px;
}
.wide-action {
  width: 100%;
  margin-top: 8px;
}
.status-note {
  margin: 8px 0 14px;
  color: var(--green);
  font-weight: 700;
}
.picker-dialog {
  width: min(860px, calc(100vw - 24px));
}
.picker-list {
  display: grid;
  gap: 8px;
  max-height: min(58vh, 540px);
  overflow: auto;
  padding-right: 4px;
}
.picker-row {
  display: grid;
  gap: 4px;
  width: 100%;
  text-align: left;
  background: var(--soft);
}
.picker-row.active {
  border-color: var(--green);
  background: #e6f3ee;
  color: var(--green);
}
.picker-row span {
  color: var(--muted);
  line-height: 1.35;
}
.pos-account-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.8fr);
  gap: 14px;
}
.receipt-panel {
  display: grid;
  gap: 12px;
  align-content: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
}
.account-balance {
  margin: 0;
  color: var(--green);
  font-size: 24px;
  font-weight: 800;
}
.mini-statement {
  display: grid;
  gap: 8px;
  max-height: 230px;
  overflow: auto;
}
.popup-menu {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-height: min(58vh, 520px);
  overflow: auto;
}
.invoice-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.invoice-credit-account {
  display: block;
  margin-top: 4px;
  color: var(--green);
  font-weight: 700;
}
.credit-customer-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.credit-customer-wrap span {
  color: var(--green);
  font-weight: 700;
}
.credit-account-list {
  min-height: 280px;
}
.pos-draft-switcher {
  display: grid;
  gap: 8px;
}
.pos-draft-switcher button {
  width: 100%;
  text-align: left;
  background: var(--soft);
}
.pos-draft-switcher button.active {
  border-color: var(--green);
  background: #e6f3ee;
  color: var(--green);
  font-weight: 700;
}
.switch {
  display: flex;
  grid-template-columns: none;
  align-items: center;
  gap: 8px;
}
.switch input { width: auto; }
.totals {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.totals div {
  background: var(--soft);
  border-radius: 6px;
  padding: 12px;
}
.totals span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 4px;
}
.totals strong { font-size: 22px; }
.subnav {
  padding: 6px 16px;
  border-bottom: 1px solid var(--line);
  background: white;
}
.erp-menubar {
  align-items: stretch;
  gap: 0;
  min-height: 39px;
  border-top: 1px solid #d9edf8;
  background: #f9fbfd;
  flex-wrap: wrap;
}
.erp-menubar > button,
.erp-menu-button {
  min-height: 32px;
  padding: 6px 12px;
  border: 1px solid transparent;
  border-radius: 0;
  background: transparent;
  color: #14202a;
}
.erp-menubar > button:hover,
.erp-menu:hover > .erp-menu-button,
.erp-menu-button:focus {
  border-color: #9ec3dc;
  background: #e6f2fb;
}
.erp-menu {
  position: relative;
  display: flex;
}
.erp-menu-dropdown {
  position: absolute;
  top: calc(100% - 1px);
  left: 0;
  z-index: 20;
  display: none;
  min-width: 190px;
  padding: 4px;
  border: 1px solid #9eb5c6;
  background: #fff;
  box-shadow: 0 12px 26px rgba(23, 32, 31, 0.18);
}
.erp-menu:hover .erp-menu-dropdown,
.erp-menu:focus-within .erp-menu-dropdown {
  display: grid;
}
.erp-menu-dropdown button {
  width: 100%;
  min-height: 30px;
  justify-content: flex-start;
  padding: 6px 10px;
  border: 0;
  border-radius: 0;
  background: white;
  color: #14202a;
  text-align: left;
}
.erp-menu-dropdown button:hover,
.erp-menu-dropdown button.active {
  background: #e6f2fb;
  color: #0b558b;
}
.file-import-input {
  display: none;
}
.erp-panel { padding: 16px; }
.control-band {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 16px;
}
.inline-date-filter {
  display: inline-grid;
  width: min(180px, 100%);
}
.journal-table-wrap {
  max-height: 580px;
  padding: 0;
}
.journal-by-date-table {
  min-width: 1920px;
}
.journal-by-date-table th,
.journal-by-date-table td {
  padding: 5px 7px;
  font-size: 12px;
}
.journal-by-date-table th {
  background: #b8d4ef;
  color: #0b3152;
  text-transform: none;
}
.journal-by-date-table td {
  background: #fff;
}
.journal-by-date-table td:nth-child(8),
.journal-by-date-table td:nth-child(15) {
  white-space: normal;
  min-width: 170px;
}
.journal-by-date-table td:nth-child(9),
.journal-by-date-table td:nth-child(10),
.journal-by-date-table td:nth-child(11),
.journal-by-date-table td:nth-child(12),
.journal-by-date-table td:nth-child(13),
.journal-by-date-table td:nth-child(14) {
  text-align: right;
}
.journal-lock-cell {
  text-align: center;
}
.journal-lock-cell input {
  width: 14px;
  height: 14px;
  padding: 0;
}
.journal-total-row td {
  background: #f6faf8;
  font-weight: 700;
  border-top: 2px solid var(--line);
}
.account-types {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.table-search {
  margin-bottom: 10px;
}
.two-column {
  display: grid;
  grid-template-columns: minmax(380px, 0.85fr) minmax(620px, 1.4fr);
  gap: 16px;
}
.two-column > .panel {
  min-width: 0;
  overflow-x: auto;
}
.company-panel {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
.company-logo-preview {
  width: 180px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: var(--soft);
  color: var(--muted);
  overflow: hidden;
}
.company-logo-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: white;
}
.company-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 14px;
}
.company-form button {
  align-self: end;
}
.statement-panel {
  min-width: 0;
}
.erp-subtabs {
  display: flex;
  gap: 4px;
  margin: 10px 0 0;
  border-bottom: 1px solid var(--line);
}
.erp-subtabs button {
  min-height: 34px;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  background: #eef5fb;
}
.erp-subtabs button.active {
  background: white;
  border-color: var(--line);
  border-bottom-color: white;
  color: var(--green);
}
.erp-subpane {
  padding-top: 12px;
}
.statement-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
  margin-bottom: 12px;
}
.statement-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}
.statement-actions input {
  width: min(280px, 100%);
}
.statement-print-dropdown {
  flex: 0 0 auto;
}
.statement-account {
  margin: -6px 0 0;
  color: var(--muted);
  font-size: 13px;
}
.statement-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}
.statement-summary div {
  border: 1px solid var(--line);
  background: #f8fbfc;
  border-radius: 6px;
  padding: 8px 10px;
}
.statement-summary span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}
.statement-summary strong {
  display: block;
  margin-top: 3px;
  white-space: nowrap;
}
.statement-table-wrap {
  border: 1px solid var(--line);
  border-radius: 8px;
  max-height: 470px;
  overflow: auto;
}
.statement-table {
  min-width: 1260px;
  font-size: 12px;
}
.statement-table th,
.statement-table td {
  border: 1px solid #c7d4dc;
  padding: 7px 8px;
  white-space: nowrap;
}
.statement-table th {
  position: sticky;
  top: 0;
  z-index: 3;
  background: #d7e9f6;
  color: #0f3554;
}
.statement-table th.filterable-th {
  padding: 4px 24px 4px 8px;
  position: sticky;
  vertical-align: middle;
}
.statement-table th.filterable-th.open {
  z-index: 50;
}
.column-filter-button {
  position: absolute;
  right: 3px;
  top: 3px;
  width: 17px;
  height: 17px;
  display: inline-grid;
  place-items: center;
  border: 1px solid #6d8aa0;
  border-radius: 2px;
  padding: 0;
  background: #eff7fc;
  color: #0f3554;
  font-size: 10px;
  line-height: 1;
  cursor: pointer;
}
.column-filter-button.active {
  background: #0f6ca5;
  border-color: #0f6ca5;
  color: #fff;
}
.column-filter-menu {
  position: fixed;
  width: 172px;
  max-height: 250px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  border: 1px solid #202b33;
  background: #fff;
  box-shadow: 0 10px 26px rgba(10, 31, 45, .24);
  color: #111;
  text-align: left;
  z-index: 1000;
}
.column-filter-actions {
  display: flex;
  gap: 4px;
  padding: 5px;
  border-bottom: 1px solid #d6dee5;
  background: #edf3f7;
}
.column-filter-actions button {
  flex: 1;
  border: 1px solid #9fb1bf;
  border-radius: 2px;
  padding: 3px 5px;
  background: #fff;
  color: #0f3554;
  font-size: 11px;
}
.column-filter-options {
  max-height: 210px;
  overflow: auto;
  padding: 4px 0;
}
.column-filter-options label {
  display: flex;
  align-items: center;
  gap: 5px;
  min-height: 22px;
  padding: 2px 6px;
  font-weight: 400;
  color: #111;
}
.column-filter-options label:hover {
  background: #dbeefa;
}
.column-filter-options input {
  width: 13px;
  height: 13px;
  margin: 0;
}
.column-filter-options span {
  overflow: hidden;
  text-overflow: ellipsis;
}
.column-filter-options p {
  margin: 8px;
  color: var(--muted);
  font-weight: 400;
}
.statement-table td:nth-child(13) {
  white-space: normal;
  min-width: 220px;
}
.stock-statement-table td:nth-child(11) {
  white-space: normal;
  min-width: 190px;
}
.debit-row,
.statement-table .debit-row {
  background: #fff8cf;
}
.credit-row,
.statement-table .credit-row {
  background: #dcf8df;
}
.journal-entry-row,
.statement-table .journal-entry-row {
  background: #ffffff;
}
.adjust-stock-row,
.statement-table .adjust-stock-row {
  background: #ffffff;
  box-shadow: inset 4px 0 0 #111;
}
.closed-row,
.statement-table .closed-row {
  background: #ffdede;
}
.stock-statement-head {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 10px;
  padding: 10px 12px;
  background: #eef5f2;
  border: 1px solid var(--line);
  border-radius: 6px;
}
.stock-statement-head strong {
  font-size: 16px;
}
.stock-statement-head span {
  color: var(--muted);
  font-weight: 700;
}
.stock-statement-table {
  min-width: 980px;
}
.stock-statement-summary {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
  padding: 8px;
  background: #f1f1f1;
  border-radius: 6px;
  color: var(--muted);
  font-size: 12px;
}
.stock-statement-summary span {
  min-width: 90px;
}
.negative { color: var(--red); font-weight: 700; }
.report-grid, .store-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.store-grid { padding: 16px; }
.store-settings-panel {
  margin: 16px;
}
.store-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: white;
}
.store-card .image {
  height: 150px;
  background: linear-gradient(135deg, #dbeee4, #e4e9f3);
}
.store-card div:last-child { padding: 14px; }
dialog {
  border: 0;
  border-radius: 8px;
  padding: 0;
  width: min(460px, calc(100vw - 24px));
}
dialog::backdrop { background: rgba(0, 0, 0, 0.35); }
.modal {
  display: grid;
  gap: 14px;
  padding: 18px;
}
.modal.wide { width: min(760px, calc(100vw - 24px)); }
.referred-accounts-modal {
  width: min(900px, calc(100vw - 24px));
}
.referred-accounts-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(240px, 1fr));
  gap: 12px 16px;
  max-height: min(560px, calc(100vh - 210px));
  overflow: auto;
  padding-right: 4px;
}
.referred-accounts-grid label {
  display: grid;
  gap: 6px;
}
#closeDialog {
  width: min(760px, calc(100vw - 24px));
}
.closing-sheet {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.closing-line, .closing-total {
  display: grid;
  grid-template-columns: minmax(150px, 0.9fr) minmax(220px, 1.1fr);
  gap: 12px;
  align-items: center;
}
.closing-line span {
  color: var(--muted);
  font-weight: 700;
}
.closing-line strong {
  font-weight: 700;
}
.closing-total {
  padding: 10px 0;
  border-top: 2px solid var(--line);
}
.closing-total span {
  color: var(--red);
  font-size: 18px;
  font-weight: 900;
  text-transform: uppercase;
}
.closing-total strong {
  font-size: 20px;
}
.closing-total.difference {
  border-bottom: 2px solid var(--line);
}
.closing-line.formula strong,
.closing-total.difference strong {
  font-size: 16px;
}
.closing-lists {
  display: grid;
  gap: 6px;
}
.closing-lists h4 {
  margin: 8px 0 0;
}
.closing-lists p {
  margin: 0;
}
.card-dialog {
  width: min(1120px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  overflow: auto;
  background: #f7faf9;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(17, 32, 31, 0.25);
}
.user-card-dialog {
  width: min(980px, calc(100vw - 24px));
}
.erp-invoice-dialog {
  width: min(1480px, calc(100vw - 16px));
}
.transaction-viewer-dialog {
  width: min(1120px, calc(100vw - 16px));
}
.transaction-viewer-card {
  min-width: 0;
}
.transaction-meta,
.transaction-totals {
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  gap: 8px;
  padding: 16px;
}
.transaction-meta div,
.transaction-totals div {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
  padding: 9px 10px;
}
.transaction-meta span,
.transaction-totals span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}
.transaction-meta strong,
.transaction-totals strong {
  display: block;
  margin-top: 4px;
}
.transaction-note {
  margin: 0 16px 16px;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fffdf5;
  padding: 10px;
}
.transaction-table-wrap {
  margin: 0 16px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}
.transaction-table {
  min-width: 820px;
}
.transaction-table th {
  background: #d7e9f6;
}
.data-card {
  background: #f7faf9;
  color: var(--ink);
  font-size: 14px;
}
.data-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  background: white;
  border-bottom: 1px solid var(--line);
}
.data-card header strong {
  font-size: 20px;
}
.data-card header button {
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 6px;
}
.card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 12px;
  align-content: start;
}
.account-card-grid {
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  padding: 18px;
  gap: 14px;
}
.journal-entry-dialog {
  width: 100vw;
  max-width: 100vw;
  height: 100vh;
  max-height: 100vh;
  margin: 0;
  border-radius: 0;
}
.journal-entry-card {
  min-height: 100vh;
  max-height: 100vh;
  display: flex;
  flex-direction: column;
}
.journal-entry-head {
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  gap: 12px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
  background: #eef5f7;
}
.journal-entry-table-wrap {
  flex: 1;
  overflow-x: auto;
  overflow-y: auto;
  padding: 0 18px 18px;
}
.journal-entry-table {
  min-width: 1680px;
}
.journal-entry-table input {
  width: 100%;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 6px 8px;
}
.journal-entry-table input[type="number"] {
  -moz-appearance: textfield;
}
.journal-entry-table input[type="number"]::-webkit-outer-spin-button,
.journal-entry-table input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.journal-account-picker {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 34px;
  align-items: center;
  gap: 6px;
}
.journal-entry-table input.journal-account-label {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 7px 8px;
  background: #f8fbfb;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.journal-account-search-button {
  position: relative;
  min-width: 34px;
  width: 34px;
  min-height: 34px;
  padding: 0;
}
.journal-account-search-button::before {
  content: "";
  position: absolute;
  width: 11px;
  height: 11px;
  border: 2px solid currentColor;
  border-radius: 50%;
  left: 8px;
  top: 7px;
}
.journal-account-search-button::after {
  content: "";
  position: absolute;
  width: 9px;
  height: 2px;
  background: currentColor;
  transform: rotate(45deg);
  left: 19px;
  top: 21px;
}
.journal-entry-table .journal-line-remove {
  min-width: 36px;
}
.journal-entry-card footer #addJournalEntryLine {
  min-width: 72px;
  font-size: 22px;
  font-weight: 800;
}
.journal-entry-card footer #addJournalEntryLine:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.erp-new-same-button {
  min-width: 42px;
  font-size: 22px;
  font-weight: 800;
}
.erp-close-on-save {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
}
.erp-close-on-save input {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
}
.erp-invoice-head,
.erp-line-entry {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  gap: 10px;
  padding: 14px 18px;
  background: #d8ecff;
  border-bottom: 1px solid var(--line);
}
.erp-line-entry {
  grid-template-columns: minmax(150px, 1fr) minmax(260px, 2fr) minmax(90px, 0.7fr) minmax(120px, 1fr) minmax(180px, 1.4fr) minmax(120px, 1fr) auto;
  align-items: end;
  background: #eef5f7;
}
.cash-transaction-field {
  display: none;
}
.cash-transaction-mode .cash-transaction-field {
  display: grid;
}
.cash-transaction-mode [data-invoice-only],
.cash-transaction-mode .invoice-transaction-field,
.cash-transaction-mode .item-transaction-field,
.cash-transaction-mode .amount-transaction-field,
.cash-transaction-mode .erp-line-entry,
.cash-transaction-mode .erp-invoice-table-wrap,
.cash-transaction-mode .erp-invoice-bottom,
.cash-transaction-mode #addErpInvoiceLine {
  display: none !important;
}
.erp-line-entry button {
  min-height: 38px;
}
.erp-item-picker-field {
  grid-template-columns: 1fr;
}
.erp-item-picker-field button {
  width: 100%;
}
.erp-invoice-table-wrap {
  min-height: 280px;
  overflow: auto;
  background: white;
  border-bottom: 1px solid var(--line);
}
.erp-invoice-table {
  width: 100%;
  min-width: 1120px;
  border-collapse: collapse;
}
.erp-invoice-table th,
.erp-invoice-table td {
  border: 1px solid #b9c4ca;
  padding: 6px 8px;
  text-align: left;
  white-space: nowrap;
}
.erp-invoice-table th {
  background: #cfe2f3;
  font-size: 12px;
}
.erp-line-input {
  width: 86px;
  min-height: 28px;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 3px 6px;
}
.erp-invoice-bottom {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(320px, 0.35fr);
  gap: 16px;
  padding: 14px 18px;
  background: #d8ecff;
}
.erp-invoice-bottom label {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: center;
  color: var(--ink);
  font-weight: 700;
}
.erp-invoice-bottom input {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 6px 8px;
}
.erp-invoice-totals {
  display: grid;
  border: 1px solid #aeb8bd;
  background: white;
}
.erp-invoice-totals div {
  display: grid;
  grid-template-columns: 120px 1fr;
  border-bottom: 1px solid #aeb8bd;
}
.erp-invoice-totals div:last-child {
  border-bottom: 0;
}
.erp-invoice-totals span {
  padding: 8px 10px;
  background: #ffd9d9;
  font-weight: 700;
}
.erp-invoice-totals strong {
  padding: 8px 10px;
  text-align: right;
}
.print-dropdown {
  position: relative;
}
.erp-print-menu {
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  z-index: 20;
  display: grid;
  min-width: 220px;
  padding: 8px;
  border: 1px solid #b7c2ca;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 14px 36px rgba(17, 32, 31, 0.2);
}
.erp-print-menu.hidden {
  display: none;
}
.erp-print-menu button {
  justify-content: flex-start;
  border: 0;
  border-radius: 4px;
  background: transparent;
  text-align: left;
}
.erp-print-menu button:hover {
  background: #e6f3ee;
}
.erp-print-menu.account-statement-print-menu {
  top: calc(100% + 8px);
  bottom: auto;
}
.erp-utilities-menu {
  left: 0;
  right: auto;
  bottom: calc(100% + 8px);
}
.stock-manager-query-menu {
  top: calc(100% + 8px);
  bottom: auto;
  left: 0;
  right: auto;
}
.stock-shelf-label-menu {
  top: calc(100% + 8px);
  bottom: auto;
  left: 0;
  right: auto;
}
.account-statement-print-menu button {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 38px;
  line-height: 1.2;
}
.user-card-grid {
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  padding: 18px;
}
.permission-group {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 10px 14px;
  grid-column: 1 / -1;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}
.permission-group label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  color: var(--ink);
  font-weight: 600;
}
.permission-group input {
  width: auto;
}
.field-row {
  display: grid;
  gap: 6px;
  min-width: 0;
}
.field-row label,
.barcode-grid label,
.section-row {
  min-height: auto;
  padding: 0;
  background: transparent;
  border: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}
.field-row.cyan label {
  background: transparent;
}
.field-row input,
.field-row select,
.field-row textarea,
.barcode-grid input {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  background: #fff;
  color: var(--ink);
}
.wide-field {
  grid-column: 1 / -1;
}
.checkbox-field {
  align-content: start;
}
.field-row input[type="checkbox"] {
  width: auto;
  justify-self: start;
  align-self: center;
}
.section-row {
  grid-column: 1 / -1;
  background: #e9f2ef;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 9px 12px;
  text-align: left;
  color: var(--green);
  font-weight: 700;
  margin-top: 6px;
}
.data-card footer {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: flex-end;
  padding: 14px 18px;
  background: white;
  border-top: 1px solid var(--line);
  position: sticky;
  bottom: 0;
}
.data-card footer label {
  display: flex;
  grid-template-columns: none;
  align-items: center;
  gap: 5px;
  color: #07121d;
}
.data-card footer span { flex: 1; }
.data-card footer input {
  width: auto;
}
.stock-data-card {
  min-width: 0;
}
.mini-tabs {
  display: flex;
  gap: 8px;
  padding: 14px 18px 0;
  background: #f7faf9;
}
.mini-tabs span {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--green);
  font-weight: 700;
}
.stock-card-grid {
  display: grid;
  grid-template-columns: 1fr 1.45fr 0.95fr;
  gap: 14px;
  padding: 18px;
}
.stock-card-grid > .card-grid,
.barcode-grid {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}
.stock-card-grid > .stock-card-section {
  align-content: start;
  border-width: 4px;
}
.item-identity-section {
  border-color: #050505;
}
.selling-package-section {
  border-color: #e11919;
}
.costs-section {
  border-color: #0966e8;
}
.stock-card-section .section-row {
  color: var(--green);
}
.barcode-grid {
  display: grid;
  grid-template-columns: 130px repeat(5, minmax(90px, 1fr));
  gap: 10px;
  margin: 0 18px 18px;
}
.barcode-grid .section-row {
  grid-column: auto;
  margin: 0;
  background: transparent;
  border: 0;
  padding: 0;
  color: var(--muted);
}
.additional-barcode-editor {
  display: grid;
  gap: 10px;
}
.additional-barcode-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}
.additional-barcode-table th,
.additional-barcode-table td {
  border: 1px solid var(--line);
  padding: 6px;
  text-align: left;
}
.additional-barcode-table th {
  background: #f7faf9;
  color: var(--ink);
  font-size: 12px;
  text-transform: lowercase;
}
.additional-barcode-table input {
  width: 100%;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 6px 8px;
}
.additional-barcode-table th:last-child,
.additional-barcode-table td:last-child {
  width: 42px;
  text-align: center;
}
.additional-barcode-table button {
  min-width: 30px;
  padding: 6px 8px;
}
menu {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin: 0;
  padding: 0;
}

.thermal-receipt {
  width: 80mm;
  box-sizing: border-box;
  padding: 5mm 4mm;
  background: #fff;
  color: #050505;
  font-family: "Arial Narrow", Arial, sans-serif;
  font-size: 11px;
  line-height: 1.25;
}
.thermal-header {
  display: grid;
  justify-items: center;
  gap: 8px;
  text-align: center;
}
.thermal-logo {
  width: 28mm;
  height: 28mm;
  border: 2px solid #050505;
  border-radius: 50%;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 3px;
  overflow: hidden;
}
.thermal-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.thermal-logo strong {
  max-width: 22mm;
  font-size: 16px;
  line-height: 1.05;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}
.thermal-logo span {
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 1px;
}
.thermal-type {
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}
.thermal-divider {
  height: 0;
  border-top: 1px dashed #050505;
  margin: 10px 0;
}
.thermal-divider.solid {
  border-top-style: solid;
  border-top-width: 2px;
}
.thermal-meta,
.thermal-summary {
  display: grid;
  grid-template-columns: 31mm 4mm 1fr;
  align-items: baseline;
  gap: 2mm;
  margin: 6px 0;
  font-size: 12px;
}
.thermal-meta span,
.thermal-summary span {
  font-weight: 800;
  text-transform: uppercase;
}
.thermal-meta strong,
.thermal-summary strong {
  text-align: right;
  font-weight: 500;
  overflow-wrap: anywhere;
}
.thermal-summary.strong {
  font-size: 15px;
}
.thermal-summary.strong strong,
.thermal-summary.strong span {
  font-weight: 900;
}
.thermal-lines {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}
.thermal-lines th {
  background: #050505;
  color: #fff;
  padding: 6px 4px;
  text-align: left;
  font-size: 12px;
  font-weight: 900;
}
.thermal-lines th:nth-child(1) { width: 33%; }
.thermal-lines th:nth-child(2) { width: 18%; text-align: center; }
.thermal-lines th:nth-child(3) { width: 24%; text-align: right; }
.thermal-lines th:nth-child(4) { width: 25%; text-align: right; }
.thermal-lines td {
  border-bottom: 1px dashed #555;
  padding: 8px 4px;
  vertical-align: middle;
  font-size: 12px;
}
.thermal-lines td:nth-child(2) {
  text-align: center;
}
.thermal-lines td:nth-child(3),
.thermal-lines td:nth-child(4) {
  text-align: right;
}
.thermal-item {
  font-weight: 700;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}
.thermal-note {
  margin: 8px 0;
  text-align: center;
  font-weight: 700;
}
.thermal-note-section {
  display: grid;
  gap: 4px;
  min-height: 14mm;
  margin: 9px 0;
  padding: 7px 8px;
  border-top: 1px dashed #050505;
  border-bottom: 1px dashed #050505;
}
.thermal-note-section strong {
  font-size: 11px;
  font-weight: 900;
}
.thermal-note-section span {
  min-height: 18px;
  overflow-wrap: anywhere;
}
.thermal-thanks {
  display: grid;
  justify-items: center;
  gap: 3px;
  text-align: center;
  font-size: 12px;
}
.thermal-thanks strong {
  font-size: 12px;
}
.thermal-thanks b {
  font-size: 18px;
  line-height: 1;
}
.unpaid-invoice {
  position: relative;
  box-sizing: border-box;
  width: 190mm;
  min-height: 270mm;
  padding: 14mm 12mm;
  background: #fff;
  color: #050505;
  font-family: "Arial Narrow", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.3;
  overflow: hidden;
}
.unpaid-head {
  display: grid;
  grid-template-columns: 70mm 1fr;
  align-items: center;
  gap: 18mm;
}
.unpaid-logo {
  width: 40mm;
  height: 40mm;
  border: 3px solid #050505;
  border-radius: 50%;
  display: grid;
  place-items: center;
  align-content: center;
  justify-self: center;
  gap: 4px;
  overflow: hidden;
  text-align: center;
}
.unpaid-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.unpaid-logo strong {
  max-width: 30mm;
  font-size: 21px;
  line-height: 1.05;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}
.unpaid-logo span {
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 1px;
}
.unpaid-meta,
.unpaid-totals {
  display: grid;
  gap: 7px;
}
.unpaid-meta div,
.unpaid-totals div {
  display: grid;
  grid-template-columns: 42mm 5mm 1fr;
  align-items: baseline;
  gap: 6mm;
}
.unpaid-meta span,
.unpaid-totals span {
  font-weight: 900;
  text-transform: uppercase;
}
.unpaid-meta strong {
  min-height: 18px;
  border-bottom: 1px solid transparent;
  font-weight: 500;
  overflow-wrap: anywhere;
}
.unpaid-meta div:nth-child(3) strong:empty {
  border-bottom-color: #050505;
}
.unpaid-rule {
  border-top: 2px solid #050505;
  margin: 10mm 0 8mm;
}
.unpaid-rule.light {
  border-top-width: 1px;
  margin: 6mm 0;
}
.unpaid-dash {
  border-top: 1px dashed #555;
  margin: 5mm 0;
}
.unpaid-lines {
  position: relative;
  z-index: 1;
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}
.unpaid-lines th {
  background: #050505;
  color: #fff;
  padding: 5mm 4mm;
  text-align: left;
  font-size: 16px;
  font-weight: 900;
}
.unpaid-lines th:nth-child(1) { width: 40%; }
.unpaid-lines th:nth-child(2) { width: 16%; text-align: center; }
.unpaid-lines th:nth-child(3) { width: 22%; text-align: right; }
.unpaid-lines th:nth-child(4) { width: 22%; text-align: right; }
.unpaid-lines td {
  border-bottom: 1px dashed #555;
  padding: 5mm 4mm;
  vertical-align: middle;
  font-size: 15px;
  text-transform: uppercase;
}
.unpaid-lines td:nth-child(2) {
  text-align: center;
}
.unpaid-lines td:nth-child(3),
.unpaid-lines td:nth-child(4) {
  text-align: right;
}
.unpaid-totals {
  width: 84mm;
  margin-left: 15mm;
}
.unpaid-totals div {
  grid-template-columns: 50mm 5mm 26mm;
}
.unpaid-totals strong {
  text-align: right;
  font-weight: 500;
}
.unpaid-totals .strong {
  font-size: 18px;
}
.unpaid-totals .strong span,
.unpaid-totals .strong strong {
  font-weight: 900;
}
.unpaid-totals.muted {
  font-size: 14px;
}
.unpaid-note-section,
.completed-note-section {
  display: grid;
  gap: 5px;
  min-height: 18mm;
  margin: 7mm 0;
  padding: 5mm;
  border: 1px solid #050505;
  border-radius: 4px;
}
.unpaid-note-section strong,
.completed-note-section strong {
  font-size: 15px;
  font-weight: 900;
}
.unpaid-note-section span,
.completed-note-section span {
  min-height: 20px;
  font-size: 14px;
  overflow-wrap: anywhere;
}
.unpaid-footer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 15mm;
  margin-top: 10mm;
}
.unpaid-footer .unpaid-meta div {
  grid-template-columns: 28mm 5mm 1fr;
}
.unpaid-thanks {
  display: grid;
  justify-items: center;
  gap: 4px;
  text-align: center;
  font-size: 16px;
}
.unpaid-thanks strong {
  font-size: 16px;
  font-weight: 900;
}
.unpaid-thanks b {
  font-size: 22px;
  line-height: 1;
}
.unpaid-watermark {
  position: absolute;
  left: 28mm;
  top: 94mm;
  z-index: 0;
  display: grid;
  justify-items: center;
  transform: rotate(-28deg);
  color: rgba(198, 42, 24, 0.11);
  pointer-events: none;
  text-align: center;
  text-transform: uppercase;
}
.unpaid-watermark strong {
  font-size: 72px;
  line-height: 0.95;
  letter-spacing: 3px;
}
.unpaid-watermark span {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 2px;
}
.completed-invoice {
  box-sizing: border-box;
  width: 190mm;
  min-height: 270mm;
  padding: 14mm 12mm 8mm;
  background: #fff;
  color: #050505;
  font-family: "Arial Narrow", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.3;
}
.completed-head {
  display: grid;
  grid-template-columns: 62mm 1fr;
  align-items: center;
  gap: 16mm;
}
.completed-logo {
  width: 44mm;
  height: 44mm;
  border: 3px solid #050505;
  border-radius: 50%;
  display: grid;
  place-items: center;
  align-content: center;
  justify-self: center;
  gap: 4px;
  overflow: hidden;
  text-align: center;
}
.completed-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.completed-logo strong {
  max-width: 33mm;
  font-size: 22px;
  line-height: 1.05;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}
.completed-logo span {
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 1px;
}
.completed-meta {
  display: grid;
  gap: 8px;
  border-left: 2px solid #050505;
  padding-left: 10mm;
}
.completed-meta.small {
  border-left: 0;
  padding-left: 0;
}
.completed-meta div {
  display: grid;
  grid-template-columns: 8mm 44mm 5mm 1fr;
  align-items: center;
  gap: 4mm;
}
.completed-meta.small div {
  grid-template-columns: 8mm 30mm 5mm 1fr;
}
.completed-meta i {
  font-style: normal;
  font-size: 20px;
  text-align: center;
  line-height: 1;
}
.completed-meta span {
  font-weight: 900;
  text-transform: uppercase;
}
.completed-meta strong {
  min-height: 18px;
  font-weight: 500;
  overflow-wrap: anywhere;
}
.completed-meta div:nth-child(3) strong:empty {
  border-bottom: 1px solid #050505;
}
.completed-rule {
  border-top: 2px solid #050505;
  margin: 10mm 0 8mm;
}
.completed-dash {
  border-top: 1px dashed #555;
  margin-top: 6mm;
}
.completed-lines {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}
.completed-lines th {
  background: #050505;
  color: #fff;
  padding: 5mm 4mm;
  text-align: left;
  font-size: 16px;
  font-weight: 900;
}
.completed-lines th:first-child {
  border-radius: 6px 0 0 6px;
}
.completed-lines th:last-child {
  border-radius: 0 6px 6px 0;
}
.completed-lines th:nth-child(1) { width: 40%; }
.completed-lines th:nth-child(2) { width: 16%; text-align: center; }
.completed-lines th:nth-child(3) { width: 22%; text-align: right; }
.completed-lines th:nth-child(4) { width: 22%; text-align: right; }
.completed-lines td {
  border-bottom: 1px dashed #555;
  padding: 5mm 4mm;
  vertical-align: middle;
  font-size: 15px;
  text-transform: uppercase;
}
.completed-lines td:nth-child(2) {
  text-align: center;
}
.completed-lines td:nth-child(3),
.completed-lines td:nth-child(4) {
  text-align: right;
}
.completed-total-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid #050505;
  border-radius: 6px;
  margin: 6mm 0 8mm;
}
.completed-total-card div {
  display: grid;
  grid-template-columns: 16mm 1fr;
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 6mm;
  padding: 6mm 14mm;
}
.completed-total-card div + div {
  border-left: 1px solid #050505;
}
.completed-total-card b {
  grid-row: 1 / 3;
  width: 12mm;
  height: 12mm;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #050505;
  color: #fff;
  font-size: 13px;
}
.completed-total-card span {
  font-size: 15px;
  font-weight: 800;
}
.completed-total-card strong {
  font-size: 22px;
  font-weight: 900;
}
.completed-footer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 14mm;
  margin-top: 8mm;
}
.completed-footer .completed-thanks {
  border-left: 2px solid #050505;
}
.completed-thanks {
  display: grid;
  justify-items: center;
  gap: 4px;
  text-align: center;
  font-size: 16px;
}
.completed-thanks strong {
  font-size: 16px;
  font-weight: 900;
}
.completed-thanks b {
  font-size: 22px;
  line-height: 1;
}
.cash-voucher {
  width: 210mm;
  height: 297mm;
  min-height: 0;
  padding: 7mm 9mm;
  border: 1px solid #141923;
  background: #fff;
  color: #101620;
  font-family: Arial, Helvetica, sans-serif;
  letter-spacing: 0;
  overflow: hidden;
  page-break-inside: avoid;
}
.cash-voucher-head {
  display: grid;
  justify-items: center;
  gap: 3.5mm;
  margin-bottom: 7mm;
}
.cash-voucher-head h1 {
  margin: 0;
  font-size: 8mm;
  font-weight: 900;
  letter-spacing: 0;
  text-align: center;
  text-transform: uppercase;
}
.cash-voucher-head::after {
  content: "";
  width: 136mm;
  height: 1px;
  background: #101620;
  box-shadow: 0 0 0 0 #101620;
}
.cash-voucher-title {
  margin-top: -1mm;
  padding: 2mm 6mm;
  border-radius: 2mm;
  background: transparent;
  color: #8d95a0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 4mm;
  font-weight: 900;
}
.cash-voucher-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12mm;
  margin-bottom: 8mm;
}
.cash-voucher-line,
.cash-voucher-wide-line,
.cash-voucher-note-line,
.cash-voucher-footer-line {
  display: grid;
  align-items: center;
  gap: 4mm;
  font-size: 3.4mm;
  font-weight: 800;
}
.cash-voucher-line {
  grid-template-columns: auto 1fr;
}
.cash-voucher-line span,
.cash-voucher-wide-line span,
.cash-voucher-note-line span,
.cash-voucher-footer-line span {
  min-height: 8mm;
  padding-top: 1mm;
  border-bottom: 1px solid #101620;
  font-weight: 500;
}
.cash-voucher-fields {
  display: grid;
  gap: 6mm;
  margin: 0 2mm 7mm;
}
.cash-voucher-wide-line {
  grid-template-columns: 24mm 4mm 1fr;
}
.cash-voucher-amount-row {
  display: grid;
  grid-template-columns: 1fr 36mm;
  gap: 7mm;
  align-items: center;
}
.cash-voucher-currency {
  display: grid;
  place-items: center;
  min-height: 13mm;
  border: 1px solid #101620;
  font-size: 3.2mm;
  font-weight: 800;
  text-transform: uppercase;
}
.cash-voucher-note-line {
  grid-template-columns: 24mm 4mm 1fr;
}
.cash-voucher-note-line span {
  min-height: 24mm;
  background: repeating-linear-gradient(to bottom, transparent 0, transparent 7.8mm, #101620 8mm, #101620 8.25mm);
  border-bottom: 0;
  line-height: 8mm;
}
.cash-voucher-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 4mm;
  margin: 7mm 0 6mm;
}
.cash-voucher-divider::before,
.cash-voucher-divider::after {
  content: "";
  height: 1px;
  background: #101620;
}
.cash-voucher-divider span {
  width: 5mm;
  height: 5mm;
  border-radius: 50%;
  border: 2px solid #101620;
}
.cash-voucher-signatures {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12mm;
  min-height: 67mm;
  margin-bottom: 5mm;
}
.cash-voucher-signatures > div {
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 5mm;
}
.cash-voucher-signatures > div + div {
  border-left: 1px solid #101620;
  padding-left: 12mm;
}
.cash-voucher-signatures h2 {
  margin: 0;
  font-size: 3.5mm;
  font-weight: 900;
}
.cash-voucher-stamp {
  width: 48mm;
  height: 28mm;
  border: 1px dashed #101620;
  border-radius: 5mm;
}
.cash-voucher-sign-space {
  height: 34mm;
}
.cash-voucher-sign-line {
  width: 60mm;
  border-bottom: 1px solid #101620;
}
.cash-voucher-signatures p {
  margin: -3mm 0 0;
  font-size: 3mm;
  font-weight: 500;
}
.cash-voucher-footer {
  display: grid;
  gap: 2.8mm;
  margin: 0 -9mm -7mm;
  padding: 7mm 12mm 6mm;
  border-top: 1px solid #101620;
}
.cash-voucher-footer-line {
  grid-template-columns: 38mm 1fr;
  font-size: 3.4mm;
}
.account-report {
  box-sizing: border-box;
  width: 190mm;
  min-height: 270mm;
  padding: 12mm;
  background: #fff;
  color: #050505;
  font-family: "Arial Narrow", Arial, sans-serif;
  font-size: 12px;
  line-height: 1.25;
}
.account-report-head {
  display: grid;
  grid-template-columns: 34mm 1fr 34mm;
  gap: 8mm;
  align-items: center;
  padding-bottom: 8mm;
  border-bottom: 2px solid #050505;
}
.account-report-logo {
  width: 28mm;
  height: 28mm;
  border: 2px solid #050505;
  border-radius: 50%;
  display: grid;
  place-items: center;
  align-content: center;
  overflow: hidden;
  text-align: center;
}
.account-report-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.account-report-logo strong {
  max-width: 22mm;
  font-size: 15px;
  line-height: 1.05;
  overflow-wrap: anywhere;
  text-transform: uppercase;
}
.account-report-logo span {
  font-size: 7px;
  font-weight: 900;
}
.account-report-head h1 {
  margin: 0 0 3mm;
  font-size: 24px;
  text-transform: uppercase;
}
.account-report-head p {
  margin: 1mm 0;
  overflow-wrap: anywhere;
}
.account-report-head aside {
  display: grid;
  gap: 1mm;
  border-left: 1px solid #050505;
  padding-left: 5mm;
}
.account-report-head aside span {
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}
.account-report-summary {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2mm;
  margin: 7mm 0;
}
.account-report-summary.range-summary {
  grid-template-columns: repeat(3, 1fr);
}
.account-report-summary div {
  border: 1px solid #050505;
  padding: 3mm;
}
.account-report-summary span {
  display: block;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}
.account-report-summary strong {
  display: block;
  margin-top: 1mm;
  overflow-wrap: anywhere;
}
.account-report-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  margin-top: 7mm;
}
.account-report-table th {
  background: #050505;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  text-align: left;
  text-transform: uppercase;
}
.account-report-table th,
.account-report-table td {
  border: 1px solid #050505;
  padding: 2mm;
  vertical-align: top;
  overflow-wrap: anywhere;
}
.account-report-table.compact th:nth-child(1),
.account-report-table.compact td:nth-child(1) {
  width: 8mm;
  text-align: center;
}
.account-report-table.compact th:nth-child(2) { width: 22mm; }
.account-report-table.compact th:nth-child(4) { width: 18mm; }
.account-report-table.compact th:nth-child(7),
.account-report-table.compact td:nth-child(7) {
  width: 30mm;
  text-align: right;
}
.account-report-range-total {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2mm;
  margin-top: 6mm;
}
.account-report-range-total div {
  border: 1px solid #050505;
  padding: 3mm;
}
.account-report-range-total span {
  display: block;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}
.account-report-range-total strong {
  display: block;
  margin-top: 1mm;
  overflow-wrap: anywhere;
}
.item-statement-report {
  display: flex;
  flex-direction: column;
  gap: 7mm;
}
.item-statement-head {
  display: grid;
  grid-template-columns: 34mm 1fr 48mm;
  gap: 8mm;
  align-items: center;
  padding-bottom: 8mm;
  border-bottom: 2px solid #050505;
}
.item-statement-head h1 {
  margin: 0 0 3mm;
  font-size: 22px;
  text-align: center;
}
.item-statement-head p {
  margin: 0;
  text-align: center;
}
.item-statement-head aside {
  display: grid;
  grid-template-columns: 20mm 1fr;
  gap: 1mm 2mm;
  font-size: 10px;
}
.item-statement-head aside span {
  font-weight: 900;
}
.item-statement-old-balance,
.item-statement-current {
  text-align: center;
}
.item-statement-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}
.item-statement-table td {
  border: 1px solid #050505;
  padding: 1.2mm 1.8mm;
  vertical-align: middle;
  overflow-wrap: anywhere;
}
.item-statement-table td:nth-child(1) { width: 58%; }
.item-statement-table td:nth-child(2) { width: 16%; }
.item-statement-table td:nth-child(3) { width: 16%; }
.item-statement-table td:nth-child(4) { width: 18%; }
.item-statement-transaction-row td,
.item-statement-summary td {
  background: #e5e5e5;
  font-weight: 900;
}
.item-statement-transaction-row td:not(:first-child),
.item-statement-summary td:not(:first-child),
.item-statement-item-row td:not(:first-child) {
  text-align: center;
}
.item-statement-item-head td {
  font-weight: 900;
  text-align: center;
}
.item-statement-footer {
  display: flex;
  justify-content: space-between;
  gap: 12mm;
  margin-top: auto;
  padding: 0 16mm 8mm;
}

@media print {
  @page barcodeLabelPage {
    size: 40mm 23mm;
    margin: 0;
  }
  @page shelfLabelPage {
    size: 56mm 36mm;
    margin: 0;
  }
  @page thermalPage {
    size: 80mm auto;
    margin: 0;
  }
  @page invoicePage {
    size: A4 portrait;
    margin: 0;
  }
  @page journalLandscapePage {
    size: A4 landscape;
    margin: 8mm;
  }
  body * { visibility: hidden; }
  .printable, .printable * { visibility: visible; }
  .printable {
    position: absolute;
    left: 0;
    top: 0;
    margin: 0;
    padding: 0;
    font-size: 11px;
  }
  .thermal-printable {
    page: thermalPage;
    width: 80mm;
  }
  .invoice-printable {
    page: invoicePage;
    width: 210mm;
  }
  .voucher-printable {
    page: invoicePage;
    width: 210mm;
    height: 297mm;
    overflow: hidden;
  }
  .account-report-printable {
    page: invoicePage;
    width: 210mm;
  }
  .journal-printable {
    page: journalLandscapePage;
    width: 281mm;
    font-family: Arial, Helvetica, sans-serif;
    color: #000;
  }
  .journal-printable table {
    width: 100%;
    border-collapse: collapse;
    font-size: 8px;
  }
  .journal-printable th,
  .journal-printable td {
    border: 1px solid #000;
    padding: 2mm 1.5mm;
    color: #000;
  }
  .journal-printable th {
    background: #e8e8e8;
  }
  .barcode-label-printable {
    page: barcodeLabelPage;
    width: 40mm;
    height: 23mm;
    overflow: hidden;
  }
  .shelf-label-printable {
    page: shelfLabelPage;
    width: 56mm;
    overflow: visible;
    color: #000;
    background: #fff;
  }
  .shelf-label-page {
    width: 56mm;
    height: 36mm;
    break-after: page;
    page-break-after: always;
    overflow: hidden;
  }
  .shelf-label-page:last-child {
    break-after: auto;
    page-break-after: auto;
  }
  .printable h2 { display: none; }
  .barcode-label {
    width: 40mm;
    height: 23mm;
    box-sizing: border-box;
    padding: 1.5mm 2mm 1mm;
    display: grid;
    grid-template-rows: 13mm 3.4mm 4mm;
    align-items: center;
    justify-items: center;
    color: #000;
    background: #fff;
    font-family: Arial, Helvetica, sans-serif;
  }
  .barcode-label-code {
    display: block;
    width: 36mm;
    height: 13mm;
    fill: #000;
  }
  .barcode-label-number {
    max-width: 36mm;
    overflow: hidden;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 8px;
    font-weight: 700;
    line-height: 1;
  }
  .barcode-label-name {
    max-width: 36mm;
    overflow: hidden;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 7px;
    font-weight: 700;
    line-height: 1;
  }
  .shelf-label {
    box-sizing: border-box;
    padding: 1.2mm 1.6mm;
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    align-items: center;
    justify-items: center;
    gap: 0.8mm;
    color: #000;
    background: #fff;
    font-family: Arial, Helvetica, sans-serif;
    text-align: center;
    overflow: hidden;
  }
  .shelf-label-name,
  .shelf-label-price {
    max-width: 100%;
    line-height: 1;
    font-weight: 900;
    overflow-wrap: anywhere;
    word-break: break-word;
  }
  .shelf-label-name {
    font-size: var(--shelf-name-size, 5mm);
  }
  .shelf-label-price {
    font-size: var(--shelf-price-size, 4mm);
    white-space: nowrap;
  }
  .thermal-receipt {
    width: 80mm;
    min-height: 100%;
    box-shadow: none;
  }
  .unpaid-invoice {
    width: 210mm;
    min-height: 297mm;
  }
  .completed-invoice {
    width: 210mm;
    min-height: 297mm;
  }
  .cash-voucher {
    width: 210mm;
    height: 297mm;
    min-height: 0;
  }
  .account-report {
    width: 210mm;
    min-height: 297mm;
  }
}

@media (max-width: 1050px) {
  .home-grid, .pos-layout, .pos-menu-panel, .pos-account-layout, .company-panel, .company-form, .referred-accounts-grid, .two-column, .report-grid, .store-grid, .invoice-sections, .settings-grid {
    grid-template-columns: 1fr;
  }
  .account-card-grid, .stock-card-grid {
    grid-template-columns: 1fr;
  }
  .barcode-grid {
    grid-template-columns: 1fr;
  }
  .module-tile { min-height: 220px; }
  .topbar, .screen-head { align-items: stretch; flex-direction: column; }
  .database-panel, .rate-panel { justify-content: stretch; }
  .rate-panel { min-width: 0; width: 100%; }
}
