.till-mode { --till-blue: #145a8d; background: #f1f2f3; }
.till-mode .workspace { background: #f1f2f3; }
.till-mode main { padding: 6px 8px 12px; }
.till-mode .page-heading { display: none; }
.till-mode :is(button,input,select,textarea,.panel) { border-radius: 2px; box-shadow: none; }
.till-workspace { max-width: none; }
.till-mode .till-shift { display: flex; flex-wrap: wrap; align-items: start; gap: 4px 16px; padding: 4px 8px; margin-bottom: 4px; background: white; border: 1px solid var(--line); }
.till-shift > details { min-width: 0; max-width: 100%; }
.till-shift > details > summary { font-size: 12px; color: var(--till-blue); cursor: pointer; min-height: 24px; }
.till-shift > .panel { padding: 0; border: 0; margin: 0; }
.till-shift > button { border: 0; padding: 0; min-height: 24px; color: var(--till-blue); }
.till-shift-body { max-width: 560px; padding-block: 8px; }
.till-shift-body form { display: flex; gap: 8px; flex-wrap: wrap; align-items: end; margin-top: 8px; }
.till-shift-body form > div { min-width: 0; }
.till-shift-body input { max-width: 100%; }
.till-shift .cart-bottom { padding: 8px 0; max-width: min(680px, calc(100vw - 48px)); overflow: auto; }
.till-mode .workbench.till-columns { display: grid; grid-template-columns: minmax(0,1fr) 160px; gap: 4px; }
.till-mode .pos-basket-column { gap: 4px; }
.till-mode .till-header { display: flex; flex-wrap: wrap; align-items: start; background: white; border: 1px solid var(--line); }
.till-mode .pos-customer { flex: 1 1 420px; padding: 4px 8px; border: 0; background: transparent; margin: 0; }
.till-mode .pos-customer summary { color: var(--ink); font-weight: 400; min-height: 26px; }
.till-mode .pos-customer summary strong { margin-left: 8px; overflow-wrap: anywhere; }
.till-mode .pos-customer form { padding: 4px 0; }
.till-mode .pos-customer h3 { display: none; }
.till-mode .pos-customer #receipt-discount { border-top: 1px solid var(--line); margin-top: 8px; }
.till-mode .till-doctors { border: 0; color: var(--till-blue); text-align: left; }
.till-mode .scan-panel { display: grid; grid-template-columns: minmax(0,1fr) minmax(220px,32%); gap: 4px; background: white; border: 1px solid var(--line); }
.till-mode .scan-form { display: flex; flex-wrap: wrap; align-items: end; gap: 4px; padding: 4px 8px; }
.till-mode .scan-form > div { flex: 0 1 80px; min-width: 0; }
.till-mode .scan-form > div:nth-child(2) { flex-basis: 100px; }
.till-mode .scan-form > .pos-entry-search { flex: 1 1 220px; }
.till-mode .scan-form label { font-size: 12px; }
.till-mode .scan-form :is(input,select,button) { min-height: 34px; padding: 3px 6px; font-size: 15px; }
.till-mode .scan-form button { padding-inline: 12px; }
.till-mode .sale-total { grid-column: 2; grid-row: 1 / 4; align-items: end; padding: 4px 8px; background: #f4f4f4; border: 1px solid #aab5bd; color: var(--ink); }
.till-mode .sale-total strong { font-size: 36px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.till-mode .till-context { grid-column: 1; display: flex; flex-wrap: wrap; gap: 4px 16px; padding: 0 8px 4px; color: var(--muted); font-size: 12px; }
.till-mode .till-context details { min-width: 0; }
.till-mode .till-context summary { color: var(--till-blue); cursor: pointer; }
.till-mode .till-context p { margin: 4px 0; }
.till-mode .stock-note { padding: 4px 0; flex-wrap: wrap; }
.till-mode #pos-catalogue > summary { color: var(--till-blue); padding: 2px 0; font-size: 12px; cursor: pointer; }
.till-mode #pos-catalogue > .table-wrap { max-height: 240px; overflow: auto; background: white; }
.till-mode #pos-catalogue th { position: sticky; top: 0; }
.till-mode #article-rows tr[data-active="true"] > td { background: #e2effa; box-shadow: inset 0 1px #145a8d, inset 0 -1px #145a8d; }
.till-mode .till-quantity-steps { display: flex; gap: 4px; margin-top: 4px; }
.till-mode .till-quantity-steps button { flex: 1; min-width: 24px; }
.till-mode .till-fill-tender { width: 100%; font-size: 11px; margin-top: 4px; }
.till-mode .basket { border: 1px solid #aab5bd; background: #f4f4f4; margin: 0; }
.till-mode .basket .panel-head { background: #f1f2f3; padding: 2px 6px; }
.till-mode .basket .panel-head h2, .till-mode .basket .panel-head .tag { font-size: 12px; }
.till-mode .basket-table { min-height: max(420px,calc(100dvh - 260px)); max-height: none; background: #f4f4f4; border: 0; }
.till-mode .basket-table table { min-width: 1300px; font-size: 13px; white-space: normal; }
.till-mode .basket-table :is(th,td) { padding: 3px 6px; border: 1px solid #d5dce0; vertical-align: middle; background: white; }
.till-mode .basket-table th { font-size: 12px; font-weight: 400; }
.till-mode .basket-table th:nth-child(6) { width: 170px; }
.till-mode .basket-table th:nth-child(8) { width: 140px; }
.till-mode .basket-table th:nth-child(11) { width: 80px; }
.till-mode .basket-table .pos-unit-price { white-space: normal; }
.till-mode .basket-table .pos-unit-price > input { width: 100%; min-width: 76px; text-align: right; font-variant-numeric: tabular-nums; }
.till-mode .pos-price-actions { display: flex; flex-wrap: wrap; gap: 2px; margin-top: 2px; }
.till-mode .pos-price-actions button { min-height: 24px; font-size: 11px; }
.till-mode .basket-table :is(input,select,button) { min-height: 28px; padding: 2px 4px; font-size: 13px; background: white; color: var(--ink); }
.till-mode .basket-table details { margin-top: 2px; }
.till-mode .basket-table summary { color: var(--till-blue); font-size: 11px; cursor: pointer; }
.till-mode .basket-table p { margin-block: 2px; }
.till-mode .basket-table .batch-proof { font-size: 11px; }
.till-mode .basket-table .pos-line-selector { min-height: 18px; accent-color: var(--till-blue); }
.till-mode .basket-table tr[data-selected="true"] > td { background: var(--till-blue); color: white; }
.till-mode .basket-table tr[data-selected="true"] :is(small,summary,.footnote,.batch-proof,.warning) { color: white; }
.till-mode .basket-table tr[data-selected="true"] :is(.tag,.warning) { background: #145a8d; border-color: white; }
.till-mode .basket-table tr[data-selected="true"] :focus-visible { outline-color: #ffdd73; outline-offset: 1px; }
.till-mode .cart-empty { min-height: 180px; display: grid; place-content: center; }
.till-mode .pos-checkout { position: sticky; top: 54px; align-self: start; background: transparent; border: 0; }
.till-mode .till-actions { display: grid; gap: 4px; }
.till-mode .till-actions > button, .till-mode .till-actions > details > summary { display: flex; align-items: center; justify-content: start; gap: 8px; width: 100%; min-height: 54px; padding: 6px; text-align: left; font-size: 12px; border: 1px solid var(--line); background: white; overflow-wrap: anywhere; }
.till-mode .till-receipts > :not(summary) { margin: 4px; }
.till-mode .till-actions kbd { color: var(--till-blue); font-family: inherit; font-size: 12px; font-weight: 700; flex-shrink: 0; }
.till-mode .payment-panel { position: relative; }
.till-mode #pos-payment-panel > summary { color: white; background: var(--green); margin: 0; cursor: pointer; font-weight: 700; }
.till-mode #pos-payment-panel > summary kbd { color: white; }
.till-mode .till-payment-body { background: white; border: 1px solid #aab5bd; padding: 12px; }
.till-mode .till-payment-body .grand { font-size: 22px; }
.till-mode .till-payment-body .footnote { margin-block: 8px; }
.till-mode .till-payment-body .invoice-note { margin-block: 8px; }
.till-mode .shortcuts { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 4px; color: var(--muted); font-size: 11px; }
@media (min-width: 1001px) {
  .till-mode .pos-checkout{z-index:2}
  .till-mode .payment-panel[open] > .till-payment-body { position: absolute; z-index: 8; right: calc(100% + 4px); top: 0; width: 360px; max-height: 75dvh; overflow: auto; box-shadow: 0 8px 24px #0f3b5733; }
}
@media (max-width: 1000px) {
  .till-mode .workbench.till-columns { grid-template-columns: minmax(0,1fr); }
  .till-mode .pos-checkout { position: static; }
  .till-mode .till-actions { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .till-mode .payment-panel { grid-column: 1 / -1; }
}
@media (max-width: 680px) {
  .till-mode .rail-brand { display: none; }
  .till-mode #pos-catalogue table { min-width: 0; table-layout: fixed; }
  .till-mode #pos-catalogue :is(th,td) { padding: 4px; }
  .till-mode #pos-catalogue th:first-child { width: 40%; }
  .till-mode #pos-catalogue th:nth-child(2) { width: 18%; }
  .till-mode #pos-catalogue th:nth-child(3) { width: 27%; }
  .till-mode #pos-catalogue th:last-child { width: 15%; }
  .till-mode #pos-catalogue td:first-child { overflow-wrap: anywhere; }
  .till-mode #pos-catalogue td .add { width: 44px; padding: 2px; }
  .till-mode .scan-panel { grid-template-columns: minmax(0,1fr); }
  .till-mode .sale-total { grid-column: 1; grid-row: auto; }
  .till-mode .pos-entry-search { flex-basis: 100%; }
  .till-mode .basket-table { min-height: 380px; }
  .till-mode .scan-form :is(input,select,button), .till-mode .basket-table :is(input,select,button) { min-height: 44px; }
  .till-mode .till-actions { grid-template-columns: minmax(0,1fr); }
  .till-mode .till-shift summary { min-height: 32px; }
}
@media print {
  .till-mode .till-workspace { display: none; }
}
