@font-face {
  font-family: system;
  src: local("Segoe UI");
}
* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
.catalog-dialog {
  width: 1040px;
}
.catalog-dialog td input:not([type="checkbox"]) {
  width: 115px;
}
.catalog-dialog td:first-child {
  min-width: 170px;
}
.editor-section {
  padding: 20px;
  background: #fafbf8;
  border: 1px solid var(--border);
  border-radius: 6px;
  min-width: 0;
}
.editor-section p {
  margin-top: 8px;
  font-size: 12px;
}
.option-row {
  display: grid;
  grid-template-columns: 1fr 2fr auto;
  gap: 12px;
  align-items: end;
}
.stock-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 100px auto;
  gap: 12px;
  align-items: end;
  border: 1px solid var(--border);
  padding: 14px;
  border-radius: 6px;
}
.stock-preview {
  color: var(--green);
}
@media (max-width: 620px) {
  .option-row,
  .stock-line {
    grid-template-columns: minmax(0, 1fr);
  }
  .editor-section {
    padding: 14px;
  }
}
:root {
  font-family: system, "Segoe UI", Arial, sans-serif;
  color: #24392e;
  background: #f5f6f3;
  font-size: 14px;
  --green: #28674e;
  --muted: #6c7b71;
  --border: #e0e5df;
  --surface: #fff;
  --soft: #edf3ed;
  --danger: #a63632;
}
body {
  margin: 0;
}
button,
a.button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  outline-offset: 3px;
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid #a88231;
}
button,
a.button {
  cursor: pointer;
  border: 1px solid var(--border);
  background: white;
  color: inherit;
  padding: 11px 17px;
  border-radius: 6px;
  font-weight: 600;
  min-height: 44px;
}
button:hover,
a.button:hover {
  background: var(--soft);
}
a.button {display:inline-flex;align-items:center;justify-content:center;text-decoration:none;}
button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}
.primary {
  background: var(--green);
  color: #fff;
  border-color: var(--green);
}
.primary:hover {
  background: #1c503c;
}
.danger {
  color: var(--danger);
}
.ghost {
  border: 0;
  background: transparent;
}
.small {
  padding: 6px 11px;
  min-height: 34px;
  font-size: 12px;
}
.wide {
  width: 100%;
}
input,
select,
textarea {
  border: 1px solid #cbd5cc;
  border-radius: 5px;
  background: #fff;
  color: inherit;
  padding: 11px 12px;
  min-height: 44px;
  max-width: 100%;
}
input:focus,
textarea:focus,
select:focus {
  outline: 2px solid #95b7a0;
  border-color: var(--green);
}
input[type="checkbox"] {
  min-height: 20px;
  width: 18px;
  accent-color: var(--green);
}
input[type="color"] {
  padding: 4px;
  width: 70px;
}
textarea {
  min-height: 80px;
  resize: vertical;
}
label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-weight: 600;
  font-size: 12px;
}
label.check {
  flex-direction: row;
  align-items: center;
  font-size: 14px;
  font-weight: 400;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 28px;
  font-weight: 650;
  letter-spacing: -0.8px;
}
h2 {
  font-size: 18px;
  font-weight: 650;
}
h3 {
  font-size: 15px;
}
p {
  line-height: 1.6;
}
.muted,
small {
  color: var(--muted);
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 1.8px;
  font-size: 10px;
  font-weight: 750;
  color: var(--muted);
}
.shell {
  display: grid;
  grid-template-columns: 224px 1fr;
  min-height: 100dvh;
}
.sidebar {
  background: #fff;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 28px 16px;
  position: fixed;
  width: 224px;
  height: 100dvh;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  z-index: 5;
}
.sidebar > * {
  flex-shrink: 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px 30px;
  font-size: 21px;
  font-weight: 750;
  letter-spacing: -0.7px;
}
.brand img {
  width: 34px;
  height: 34px;
}
.sidebar .eyebrow {
  padding: 18px 14px 12px;
}
.nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.nav button {
  text-align: left;
  border: 0;
  background: none;
  font-weight: 500;
  display: flex;
  gap: 13px;
  align-items: center;
  padding: 12px 14px;
  color: #68766b;
}
.nav button.active {
  background: #eaf2e9;
  color: #21583f;
  font-weight: 650;
}
.nav svg {
  width: 19px;
  height: 19px;
  flex: none;
}
.sidebar footer {
  margin-top: auto;
  padding: 20px 12px 0;
  border-top: 1px solid var(--border);
}
.avatar {
  display: inline-grid;
  place-items: center;
  width: 31px;
  height: 31px;
  background: #efe7d5;
  color: #836b37;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 700;
  margin-right: 8px;
}
.workspace {
  grid-column: 2;
  min-width: 0;
}
.topbar {
  height: 78px;
  background: rgba(255, 255, 255, 0.8);
  border-bottom: 1px solid var(--border);
  padding: 0 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.store-label {
  font-weight: 650;
  font-size: 13px;
}
.store-label small {
  display: block;
  font-weight: 400;
  margin-top: 3px;
  font-size: 11px;
}
.topright {
  display: flex;
  align-items: center;
  gap: 16px;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 4px;
  padding: 5px 8px;
  background: #eaf2e9;
  color: #2c6a48;
  white-space: nowrap;
}
.badge.warn {
  color: #886016;
  background: #fbf0d4;
}
.badge.red {
  color: #a63632;
  background: #f9e7e4;
}
.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.content {
  padding: 34px 36px;
  max-width: 1800px;
  margin: auto;
}
.pagehead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
}
.pagehead p {
  margin-top: 7px;
  color: var(--muted);
  font-size: 13px;
}
.actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.panel {
  min-width: 0;
  background: white;
  border: 1px solid var(--border);
  border-radius: 9px;
  overflow: hidden;
}
.panelhead {
  padding: 22px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.panelbody {
  padding: 24px;
}
.kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.kpi {
  padding: 23px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
}
.kpi .value {
  font-size: 27px;
  letter-spacing: -1px;
  font-weight: 650;
  margin: 13px 0 8px;
  font-variant-numeric: tabular-nums;
}
.kpi small {
  font-size: 11px;
}
.kpi:first-child {
  background: #edf3e9;
  border-color: #d9e3d4;
}
.columns {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(280px, 1fr);
  gap: 24px;
  margin-bottom: 24px;
}
.chart {
  height: 230px;
  display: flex;
  align-items: flex-end;
  gap: 12px;
  padding: 36px 24px 30px;
}
.bar-col {
  flex: 1;
  display: flex;
  height: 100%;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
}
.bar {
  width: 70%;
  max-width: 48px;
  border-radius: 4px 4px 0 0;
  background: #b7cdbb;
  min-height: 3px;
}
.bar-col:last-child .bar {
  background: var(--green);
}
.bar-col span {
  font-size: 10px;
  color: var(--muted);
}
table {
  border-collapse: collapse;
  width: 100%;
  text-align: left;
  white-space: nowrap;
}
th {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 650;
  color: var(--muted);
  padding: 14px 24px;
  background: #fafbf8;
}
td {
  padding: 16px 24px;
  border-top: 1px solid #edf0ea;
  font-size: 13px;
}
td small {
  display: block;
  margin-top: 5px;
  font-size: 11px;
}
.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.tablewrap {
  overflow: auto;
}
.item-name {
  display: flex;
  gap: 12px;
  align-items: center;
}
.swatch {
  width: 34px;
  height: 34px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 13px;
  flex: none;
  background: var(--green);
}
.empty {
  text-align: center;
  padding: 54px 20px;
  color: var(--muted);
  line-height: 1.8;
}
.empty strong {
  display: block;
  color: #324a3c;
  font-size: 17px;
  margin-bottom: 6px;
}
.toolbar {
  display: flex;
  gap: 12px;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.search {
  width: 300px;
  max-width: 100%;
  background: #fafbf8;
}
.pos {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 24px;
  align-items: start;
}
.pos > * {
  min-width: 0;
}
.categories {
  display: flex;
  gap: 8px;
  overflow: auto;
  padding: 0 0 20px;
}
.categories button {
  white-space: nowrap;
  min-height: 36px;
  font-size: 12px;
  font-weight: 500;
}
.categories button.active {
  background: var(--green);
  border-color: var(--green);
  color: white;
}
.products {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 14px;
}
.product {
  padding: 0;
  overflow: hidden;
  text-align: left;
  min-width: 0;
  background: white;
  transition: transform 0.15s;
}
.product:hover {
  transform: translateY(-2px);
}
.product-visual {
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: #eef1e8;
}
.product-visual svg {
  width: 45px;
  height: 45px;
  opacity: 0.8;
}
.product-info {
  padding: 14px;
}
.product-info strong {
  display: block;
  font-size: 13px;
  line-height: 1.4;
}
.product-info span {
  display: block;
  font-size: 12px;
  margin-top: 8px;
  color: var(--green);
}
.product-info small {
  display: block;
  font-size: 10px;
  margin-top: 5px;
}
.ticket {
  position: sticky;
  top: 20px;
}
.ticket .panelhead {
  padding: 20px;
}
.ticket-lines {
  padding: 4px 20px;
  max-height: 350px;
  overflow: auto;
}
.ticket-line {
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}
.ticket-line .row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.ticket-line small {
  display: block;
  font-size: 11px;
  margin: 4px 0 9px;
}
.quantity {
  display: flex;
  align-items: center;
  gap: 10px;
}
.quantity button {
  padding: 0;
  width: 29px;
  min-height: 29px;
  background: #f5f7f1;
}
.quantity input {
  width: 65px;
  min-height: 30px;
  padding: 4px;
  text-align: center;
}
.ticket-footer {
  padding: 20px;
  background: #fafbf8;
  border-top: 1px solid var(--border);
}
.totals {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  margin: 18px 0;
  color: #647368;
  font-size: 12px;
}
.totals .total {
  font-size: 22px;
  font-weight: 650;
  color: #24392e;
  border-top: 1px solid var(--border);
  padding-top: 16px;
}
.ticket-footer .primary {
  font-size: 16px;
  min-height: 50px;
}
.ticket-footer .actions button {
  flex: 1;
}
.link {
  color: var(--green);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.login {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: #edf2e8;
}
.login-box {
  width: 420px;
  max-width: 100%;
  padding: 40px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
}
.login-box .brand {
  padding: 0 0 32px;
}
.login-box h1 {
  font-size: 25px;
}
.login-box p {
  margin: 10px 0 24px;
  color: var(--muted);
  font-size: 13px;
}
.stack {
  display: grid;
  gap: 18px;
}
.formgrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.full {
  grid-column: 1/-1;
}
dialog {
  width: 580px;
  max-width: calc(100vw - 28px);
  max-height: 90dvh;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0;
  color: inherit;
  box-shadow: 0 24px 100px #152b3433;
}
dialog::backdrop {
  background: #17291c77;
}
.dialoghead {
  padding: 24px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
}
.dialogbody {
  padding: 28px;
}
.dialogfoot {
  padding: 18px 28px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
.dialogbody .error {
  color: var(--danger);
  font-size: 12px;
  margin-top: 12px;
}
.hint {
  background: #f5f6f0;
  border: 1px solid var(--border);
  padding: 12px 15px;
  border-radius: 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}
.receipt {
  font-family: ui-monospace, Consolas, monospace;
  line-height: 1.8;
  font-size: 12px;
}
.receipt .center {
  text-align: center;
}
.receipt h2 {
  font-size: 18px;
}
.receipt hr {
  border: 0;
  border-top: 1px dashed #bbb;
  margin: 20px 0;
}
.receipt .row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.receipt .refund-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
}
.receipt .refund-row input {
  width: 80px;
}
.settings {
  max-width: 750px;
}
.sectiongap {
  margin-top: 24px;
}
#toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  padding: 14px 20px;
  max-width: 90%;
  background: #24392e;
  color: white;
  border-radius: 7px;
  box-shadow: 0 6px 25px #0002;
  display: none;
  z-index: 30;
}
#toast.show {
  display: block;
}
.mobile-nav {
  display: none;
}
.notice {
  padding: 12px 18px;
  background: #fbf0d4;
  color: #785d25;
  font-size: 12px;
  border-bottom: 1px solid #ead9af;
}
.loading {
  padding: 80px;
  text-align: center;
}
.progress {
  height: 5px;
  max-width: 200px;
  background: #eef1e8;
  border-radius: 3px;
  margin-top: 7px;
  overflow: hidden;
}
.progress span {
  display: block;
  height: 100%;
  background: var(--green);
}
.inline-error {
  color: var(--danger);
  padding: 12px;
  font-size: 13px;
}
.tag {
  padding: 4px 9px;
  background: #f1f3ed;
  border-radius: 4px;
  color: #647368;
  font-size: 11px;
}
.date-range {
  display: flex;
  gap: 8px;
  align-items: center;
}
.date-range input {
  width: 145px;
  font-size: 12px;
}
.switcher {
  display: flex;
  background: #eef1e8;
  border-radius: 6px;
  padding: 3px;
}
.switcher button {
  border: 0;
  background: transparent;
  min-height: 34px;
  font-size: 12px;
  padding: 6px 12px;
}
.switcher button.active {
  background: white;
  box-shadow: 0 1px 3px #0001;
}
.pending {
  border: 1px solid #e5c984;
  background: #fff8e7;
  padding: 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  font-size: 12px;
}
.pending button {
  margin-top: 10px;
}
.center {
  text-align: center;
}
.text-button {
  border: 0;
  background: transparent;
  color: var(--green);
  padding: 4px 0;
  min-height: 30px;
}
.report-tabs {
  margin-bottom: 20px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.report-tabs .active {
  background: var(--green);
  color: white;
}
.statrow {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}
@media (min-width: 1600px) {
  .products {
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  }
  .product-visual {
    height: 130px;
  }
}
@media (max-width: 1150px) {
  .shell {
    grid-template-columns: 190px 1fr;
  }
  .sidebar {
    width: 190px;
    padding: 24px 10px;
  }
  .content {
    padding: 28px 22px;
  }
  .topbar {
    padding: 0 22px;
  }
  .pos {
    grid-template-columns: minmax(0, 1fr) 310px;
    gap: 16px;
  }
  .kpis {
    gap: 10px;
  }
  .kpi {
    padding: 18px;
  }
  .kpi .value {
    font-size: 22px;
  }
  .columns {
    grid-template-columns: 1fr;
  }
  .products {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  }
}
@media (max-width: 850px) {
  .shell {
    display: block;
  }
  .workspace {
    padding-bottom: 70px;
  }
  .sidebar {
    display: none;
  }
  .topbar {
    height: 65px;
    padding: 0 18px;
  }
  .content {
    padding: 24px 18px;
  }
  .mobile-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 1px solid var(--border);
    overflow: auto;
    z-index: 10;
    padding: 4px 8px max(4px, env(safe-area-inset-bottom));
  }
  .mobile-nav button {
    flex: 1;
    min-width: 70px;
    border: 0;
    background: none;
    font-size: 10px;
    padding: 8px 3px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    color: var(--muted);
  }
  .mobile-nav button svg {
    width: 20px;
    height: 20px;
  }
  .mobile-nav button.active {
    color: var(--green);
    background: #edf3e9;
  }
  .kpis {
    grid-template-columns: 1fr 1fr;
  }
  .pagehead {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .pagehead h1 {
    font-size: 25px;
  }
  .pos {
    grid-template-columns: minmax(0, 1fr) 310px;
  }
  .topright .muted {
    display: none;
  }
  .date-range {
    flex-wrap: wrap;
  }
  .ticket {
    top: 12px;
  }
  .panelhead {
    padding: 18px;
  }
  .toolbar {
    padding: 14px;
  }
  .topright {
    gap: 8px;
  }
  .hide-mobile {
    display: none;
  }
}
@media (max-width: 620px) {
  .pos {
    grid-template-columns: minmax(0, 1fr);
  }
  .ticket {
    position: static;
    margin-top: 10px;
  }
  .products {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }
  .product-visual {
    height: 75px;
  }
  .product-info {
    padding: 10px;
  }
  .product-info strong {
    font-size: 11px;
  }
  .product-info span {
    font-size: 11px;
  }
  .topbar {
    gap: 6px;
  }
  .store-label {
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .topright .small {
    font-size: 10px;
    padding: 7px;
  }
  .content {
    padding: 20px 14px;
  }
  .formgrid {
    grid-template-columns: 1fr;
  }
  .full {
    grid-column: auto;
  }
  .kpi .value {
    font-size: 23px;
  }
  .kpi {
    padding: 17px;
  }
  .panelbody {
    padding: 18px;
  }
  .dialoghead,
  .dialogbody {
    padding: 20px;
  }
  .dialogfoot {
    padding: 16px 20px;
  }
  td,
  th {
    padding: 14px 16px;
  }
  .columns {
    gap: 16px;
  }
  .search {
    width: 100%;
  }
  .chart {
    padding-left: 15px;
    padding-right: 15px;
    gap: 6px;
  }
  .pagehead {
    margin-bottom: 20px;
  }
  .panelhead h2 {
    font-size: 16px;
  }
}
@media print {
  body {
    background: white;
  }
  .shell,
  #toast {
    display: none !important;
  }
  dialog {
    display: block;
    position: static;
    max-height: none;
    border: 0;
    box-shadow: none;
    width: 80mm;
    margin: 0 auto;
  }
  dialog::backdrop {
    display: none;
  }
  .dialoghead,
  .dialogfoot,
  .no-print {
    display: none !important;
  }
  .dialogbody {
    padding: 0;
  }
  .receipt {
    color: black;
  }
}

/* Keep the ticket and catalog on the same Android work surface. */
.android-client .shell { display: block; height: 100dvh; min-height: 0; overflow: hidden; padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }
.android-client .sidebar, .android-client .mobile-nav { display: none; }
.android-client .workspace { margin: 0; padding: 0; height: 100%; display: flex; flex-direction: column; min-height: 0; }
.android-client .topbar { flex: 0 0 auto; gap: 12px; padding: 12px 18px; height: auto; min-height: 64px; flex-wrap: wrap; }
.android-client .store-label { flex: 1; }
.android-client .content { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; }
.android-client dialog { max-height: calc(100dvh - 64px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); }
@media (max-width: 620px) {
 .android-client .topbar .badge, .android-client .topbar .hide-mobile { display: none; }
 .android-client .topright { flex-wrap: wrap; }
}

.android-client .content { width: 100%; max-width: none; margin: 0; padding: 20px 24px; }
.ticket-charge { padding: 10px 14px; border-top: 1px solid var(--border); }
.android-client .client-pos .content { display: flex; flex-direction: column; overflow: auto; padding: 10px 14px; }
.android-client .client-pos .pagehead { flex-shrink: 0; margin-bottom: 8px; gap: 8px; }
.android-client .client-pos .pagehead h1 { font-size: 18px; }
.android-client .client-pos .pagehead p { display: none; }
.android-client .client-pos .pos { flex: 1; min-height: 180px; gap: 10px; align-items: stretch; }
.android-client .client-pos .pos > section { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.android-client .ticket { display: flex; flex-direction: column; position: static; margin: 0; min-height: 0; }
.android-client .ticket .panelhead, .android-client .ticket .panelbody, .android-client .ticket-footer { padding: 8px 12px; }
.android-client .ticket .panelhead { flex-shrink: 0; }
.android-client .ticket-scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior-y: contain; }
.android-client .ticket-lines { padding: 0 12px; max-height: none; overflow: visible; }
.android-client .ticket-line { padding: 8px 0; }
.android-client .ticket-charge { flex-shrink: 0; }
.android-client .ticket-toggle { display: none; }
@media (orientation: landscape) {
  .android-client .client-pos .pos { grid-template-columns: minmax(0, 1fr) clamp(215px, 34%, 360px); }
}
@media (orientation: portrait) {
  .android-client .client-pos .pos { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(110px, 1fr); }
  .android-client .ticket { grid-row: 1; max-height: 48dvh; }
  .android-client .ticket-title { display: none; }
  .android-client .ticket-toggle { display: block; text-align: left; }
  .android-client .client-pos:not(.ticket-open) .ticket-scroll,
  .android-client .client-pos:not(.ticket-open) .ticket-clear { display: none; }
  .android-client .client-pos:not(.ticket-open) .ticket { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
  .android-client .client-pos:not(.ticket-open) .ticket .panelhead,
  .android-client .client-pos:not(.ticket-open) .ticket-charge { border: 0; padding: 5px; }
  .android-client .ticket-toggle { width: 100%; }
}
.android-client #pos-search { width: 100%; flex-shrink: 0; }
.android-client .categories { flex-shrink: 0; margin: 8px 0; padding-bottom: 4px; }
.android-client .products { overflow-y: auto; overscroll-behavior: contain; min-height: 0; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); align-content: start; grid-auto-rows: max-content; padding-bottom: 12px; }
@media (max-width: 620px) {
 .android-client .content { padding: 14px; }
 .android-client .products { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
 .android-client .client-pos .pagehead p { display: none; }
}

.store-switch { display:flex;flex-direction:row;align-items:center;gap:8px;font-size:12px;font-weight:400;color:var(--muted);white-space:nowrap; }
.store-switch select {width:auto;min-width:112px;max-width:200px;min-height:34px;height:34px;padding:6px 10px;color:#24392e;font-weight:600;font-size:12px;}
.device-settings { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; }
.device-settings .stack strong, .device-settings .stack small { display: block; }
.android-client.item-list .products { grid-template-columns: 1fr; }
.android-client.item-list .product { display: flex; align-items: center; }
.android-client.item-list .product-visual { width: 72px; height: 72px; flex-shrink: 0; }
.android-client.item-list .product-info { flex: 1; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.android-client.item-list .product-info strong { flex: 1; }
.android-client.dark-theme { --ink: #ecf3ee; --muted: #b1c3b7; --border: #415149; --green: #81c5a4; color: #ecf3ee; background: #17221d; color-scheme: dark; }
.dark-theme .workspace, .dark-theme .content, .dark-theme .login { background: #17221d; }
.dark-theme .panel, .dark-theme .topbar, .dark-theme dialog, .dark-theme .login-box, .dark-theme .product, .dark-theme input, .dark-theme select, .dark-theme textarea, .dark-theme button { background-color: #23332b; color: #ecf3ee; }
.dark-theme .product-visual, .dark-theme .notice, .dark-theme .badge, .dark-theme .categories button.active { background: #344b3d; color: #d6eddf; }
.dark-theme .primary { background: #367858; color: white; }
.dark-theme .totals, .dark-theme .ticket-footer, .dark-theme .empty { color: #ecf3ee; }
.dark-theme .nav button { color: #ecf3ee; }
@media (max-width: 620px) { .device-settings { grid-template-columns: 1fr; } .store-switch select { max-width: 150px; } }

.dark-theme .hint { background: #344b3d; color: #d6eddf; }
/* Keep Android's dark system icons readable above the WebView's safe areas. */
.android-client.dark-theme::before, .android-client.dark-theme::after { content: ""; position: fixed; left: 0; right: 0; background: #f5f6f3; z-index: 1000; pointer-events: none; }
.android-client.dark-theme::before { top: 0; height: env(safe-area-inset-top); }
.android-client.dark-theme::after { bottom: 0; height: env(safe-area-inset-bottom); }
/* Android sign-in is a touch-first counter screen. */
.pos-login {background:#e9f0eb;min-height:100dvh;padding:28px;display:flex;align-items:center;justify-content:center;}
.pos-login .login-box {width:min(100%,480px);border:0;box-shadow:0 12px 48px #173c2820;border-radius:24px;padding:32px;}
.pos-login .brand {font-size:26px;margin-bottom:24px;}
.pos-login h1 {font-size:30px;line-height:1.15;}
.pos-login input,.pos-login select,.pos-login button {min-height:52px;font-size:18px;}
.pos-login input[name=pin] {text-align:center;font-size:28px;letter-spacing:10px;}
.pin-pad {display:grid;grid-template-columns:repeat(3,1fr);gap:8px;}
.pin-pad button {font-size:22px;min-height:56px;}
fieldset label {display:flex;align-items:center;gap:10px;padding:6px;}
fieldset input[type=checkbox] {width:20px;height:20px;min-height:20px;}
@media (orientation:landscape) and (max-height:700px) {
  .login.pos-login {padding:16px;align-items:center;overflow:auto;}
  .pos-login .login-box {width:min(100%,980px);padding:24px;display:grid;grid-template-columns:0.8fr 1.2fr;column-gap:32px;align-items:start;}
  .pos-login .login-box > form {grid-column:2;grid-row:1 / span 6;gap:10px;}
  .pos-login .pin-pad {grid-template-columns:repeat(6,1fr);gap:6px;}
  .pos-login .brand {margin:0 0 24px;}
  .pos-login h1 {margin:12px 0;font-size:30px;}
  .pos-login .login-box > p {margin:0;}
  .pos-login input,.pos-login select,.pos-login button {min-height:44px;}
  .pos-login .pin-pad button {font-size:20px;}
}
.account-button {flex-shrink:0;min-width:44px;min-height:44px;cursor:pointer;border:1px solid var(--border);font-weight:700;}
.account-button:focus-visible {outline:3px solid var(--primary,#28674e);outline-offset:3px;}
.account-menu p {margin:8px 0;}

.label-previews{display:flex;gap:20px;flex-wrap:wrap;padding:20px;background:#edf0ed}.label-preview{width:240px;background:white;color:black;border:1px dashed #68776e;padding:8px;display:flex;flex-direction:column;justify-content:flex-start;font:12px/1.3 monospace;overflow:hidden;white-space:pre-wrap}

@media screen {
 dialog[open]{display:flex;flex-direction:column;overflow:hidden}
 dialog .dialoghead,dialog .dialogfoot{flex-shrink:0}
 dialog #modal-form{display:flex;flex-direction:column;min-height:0;overflow:hidden}
 dialog .dialogbody{overflow-y:auto;min-height:0}
}

.receipt-editor{display:grid;grid-template-columns:minmax(0,1fr) minmax(220px,320px);gap:28px}.receipt-design-preview{background:white;color:black;border:1px solid #ccc;padding:20px;text-align:center;font:13px/1.5 monospace;white-space:pre-wrap;overflow-wrap:anywhere}.receipt-design-preview img,.receipt-logo{display:block;max-width:100%;max-height:160px;margin:0 auto 16px;object-fit:contain}.receipt-message{white-space:pre-wrap}#receipt-settings{scroll-margin-top:20px}@media(max-width:700px){.receipt-editor{grid-template-columns:1fr}}

.nav-group summary{display:flex;align-items:center;gap:12px;cursor:pointer;padding:12px 14px;font-weight:600}.nav-group summary svg{width:20px;height:20px}.nav-group>button{padding-left:46px;width:100%}.mobile-nav .nav-group{min-width:140px}

.reservation-kpis{grid-template-columns:repeat(auto-fit,minmax(180px,1fr))}.reservation-kpis .eyebrow{display:block;min-height:3em;line-height:1.6}.reservation-row{display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding:8px 0}.reservation-row>span{flex:1;min-width:180px}
.reservation-table table{white-space:normal}.reservation-table th,.reservation-table td{padding:14px 16px}.reservation-table button{white-space:nowrap}

.modifier-choices{margin:0;border:1px solid var(--border);border-radius:8px;padding:16px;min-width:0}.modifier-choices legend{font-weight:600;padding:0 6px}.modifier-choice-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(110px,150px) auto;align-items:end;gap:12px;margin-bottom:16px}.modifier-choice-row label{min-width:0}.modifier-choice-row button{min-height:44px}@media(max-width:520px){.modifier-choice-row{grid-template-columns:minmax(0,1fr) 110px}.modifier-choice-row button{grid-column:1/-1;justify-self:end}}

.inventory-tabs{display:flex;flex-wrap:wrap;margin-bottom:24px;gap:8px}.inventory-edit-line{border:1px solid var(--border);border-radius:8px;padding:12px;display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:12px;align-items:end;margin-bottom:12px}.inventory-edit-line label{min-width:0}.inventory-edit-line select{max-width:100%}.inventory-edit-line button{min-height:44px}#count-selected{max-height:280px;overflow:auto}.stock-barcode-grid{display:flex;flex-wrap:wrap;gap:12px;background:#edf0ed;padding:12px}.stock-barcode-label{box-sizing:border-box;background:white;color:black;padding:2mm;display:flex;flex-direction:column;align-items:center;justify-content:space-around;font:10px Arial;overflow:hidden;border:1px dashed #888;break-inside:avoid}.stock-barcode-label strong{max-width:100%;max-height:8mm;overflow:hidden;text-align:center}.stock-barcode-label svg{flex-shrink:0;max-width:none}.stock-barcode-label span{max-width:100%;overflow:hidden;text-overflow:clip;white-space:nowrap}@media print{dialog.stock-barcode-dialog{width:auto;max-width:none;margin:0}.stock-barcode-dialog .stock-barcode-grid{padding:0;background:white;gap:0}.stock-barcode-dialog .stock-barcode-label{border:0}.stock-barcode-dialog .dialogbody,.stock-barcode-dialog #modal-form{overflow:visible}}

.sales-kpis{grid-template-columns:repeat(auto-fit,minmax(170px,1fr))}.sales-kpis .eyebrow{display:block;min-height:3em;line-height:1.5}

.component-row{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:12px;border-bottom:1px solid #dbe2d9}.modifier-choice-row{flex-wrap:wrap}.component-row label{min-width:0}

.component-row{align-items:start}.component-row button{align-self:end}

.variant-value-row { display:flex; gap:8px; align-items:center; }
.variant-value-row input { min-width:0; flex:1; }

.promo-variant-choice { margin-left: 24px; }

.uat-banner { background:#fff0c2; color:#654600; border-bottom:2px solid #d39100; }

.android-client .client-pos .pagehead .actions { flex: 1; min-width: 0; justify-content: flex-end; }
.android-client .client-pos .pagehead #pos-search { flex: 1; min-width: 0; width: auto; min-height: 36px; }
@media (orientation: portrait) {
  .android-client .client-pos .pagehead { flex-wrap: wrap; }
  .android-client .client-pos .pagehead .actions { flex-basis: 100%; }
}

.checkout-summary {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}
.checkout-total {
  flex: 1;
  min-width: 0;
  padding: 12px 14px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--green) 10%, transparent);
  border: 1px solid var(--border);
}
.checkout-total span { display: block; font-weight: 650; }
.checkout-total strong {
  display: block;
  font-size: clamp(1.25rem, 5vw, 2rem);
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
#checkout-change-card { border-color: var(--green); color: var(--green); }
#checkout-change-card.checkout-short {
  color: inherit;
  border-color: var(--danger);
  background: color-mix(in srgb, var(--danger) 10%, transparent);
}
.checkout-fields { gap: 12px; }
#split-payment-fields {
  min-width: 0;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.checkout-payment-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(85px, 0.65fr);
  gap: 10px;
  margin-bottom: 8px;
}
.checkout-payment-row input, .checkout-payment-row select { width: 100%; }
.checkout-split-status { font-size: 0.9rem; color: var(--muted); }
.checkout-pad {
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
}
.checkout-pad-display { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.checkout-pad-keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; margin-bottom: 6px; }
.checkout-pad-keys button { min-height: 40px; padding: 5px; font-size: 1.1rem; }
@media (orientation: landscape) {
  .checkout-layout:has(.checkout-pad:not([hidden])) {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(140px, 0.46fr);
    gap: 10px;
    align-items: start;
  }
}
@media (orientation: portrait) {
  .checkout-pad { margin-top: 10px; }
}

.checkout-split-toggle { align-self: end; min-height: 44px; }

.reservation-customers details + details { border-top: 1px solid var(--border); }
.reservation-customers summary { padding: 14px 16px; cursor: pointer; }
.reservation-customers summary span { display: inline-block; margin-inline-start: 10px; font-size: 0.85rem; color: var(--muted); }
.reservation-customers td small { display: block; }

.receipt-filters { flex-wrap: wrap; align-items: end; gap: 10px; }
.receipt-filters .search { flex: 1 1 180px; min-width: 0; }

.shift-preview-scroll { overflow-x: auto; }
.shift-preview-paper { width: max-content; margin: 0 auto; padding: 1rem; background: #fff; color: #17211d; border: 1px solid #d8dfda; font: 12px/1.45 monospace; white-space: pre; }

.shift-report-actions { margin: 1rem 0; padding: 1rem 0; border-block: 1px solid #d8dfda; }
.shift-report-actions h3 { margin: 0 0 .75rem; }
.shift-report-buttons { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); gap: .65rem; }
.shift-report-buttons button { min-height: 44px; width: 100%; white-space: normal; }

/* Larger type and touch targets for daily POS work and report reading. */
@media screen {
  .android-client { font-size: 17px; line-height: 1.5; }
  .android-client input, .android-client select, .android-client textarea,
  .android-client button { font-size: 17px; }
  .android-client button, .android-client input:not([type="checkbox"]),
  .android-client select { min-height: 48px; }
  .android-client .small { font-size: 16px; }
  .android-client .product-info strong, .android-client .ticket-line strong { font-size: 18px; }
  .android-client .product-info span, .android-client .ticket-line small,
  .android-client .ticket-footer label { font-size: 16px; }
  .android-client .ticket .totals { font-size: 18px; }
  .android-client .ticket .totals .total, .android-client .ticket-charge button { font-size: 22px; }
  .android-client .quantity input { width: 80px; }
  dialog[data-report] { width: min(1040px, calc(100vw - 24px)); font-size: 18px; line-height: 1.6; }
  dialog[data-report] .hint, dialog[data-report] td, dialog[data-report] th,
  dialog[data-report] button, dialog[data-report] summary { font-size: 18px; }
  dialog[data-report] .hint { color: var(--ink, #20372e); }
  dialog[data-report] button { min-height: 48px; }
  dialog[data-report] .report-section td { padding-top: 24px; font-weight: 700; }
  dialog[data-report] .report-total td { font-size: 21px; font-weight: 700; background: var(--soft); color: #20372e; }
  .shift-preview-paper { font-size: 18px; line-height: 1.6; font-weight: 500; }
}
@media (orientation: landscape) and (min-width: 700px) {
  .android-client .client-pos .pos { grid-template-columns: minmax(0, 1fr) clamp(290px, 41%, 490px); }
}

@media screen { .dark-theme dialog[data-report] .report-total td { background: #344b3d; color: #ecf3ee; } }

@media screen {
  .readable-report .content { font-size: 18px; line-height: 1.6; }
  .readable-report td, .readable-report th, .readable-report .hint,
  .readable-report label, .readable-report input, .readable-report select,
  .readable-report .report-tabs button { font-size: 18px; }
  .readable-report .kpi small, .readable-report .kpi .eyebrow { font-size: 16px; }
}

@media screen { .android-client .quantity button { min-width: 44px; } .android-client .product-info small { font-size: 16px; } }

.avatar.account-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  min-width: 48px;
  min-height: 48px;
  padding: 0;
  border-radius: 50%;
  line-height: 1;
  text-align: center;
}
.android-client .client-pos .pos > section > .pagehead { margin-bottom: 4px; gap: 8px; }
.android-client .client-pos .pagehead .actions { flex-wrap: nowrap; gap: 6px; }
.android-client .client-pos .pagehead .actions > button {
  flex: 0 0 auto;
  white-space: nowrap;
  min-height: 44px;
  padding: 6px 10px;
}
.android-client .client-pos .pagehead #pos-search { min-height: 44px; padding: 8px 10px; }

.variant-card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr)); gap: 12px; }
.variant-card { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 6px; min-height: 110px; padding: 16px; border: 2px solid var(--border); border-radius: 8px; background: var(--surface); color: inherit; text-align: left; overflow-wrap: anywhere; }
.variant-card strong { font-size: 19px; }
.variant-card span, .variant-card small { font-size: 17px; }
.variant-card small { color: var(--muted); }
.variant-picker { padding: 0; border: 0; margin: 0; min-width: 0; }
.variant-picker legend { margin-bottom: 12px; font-size: 18px; font-weight: 650; }
.variant-choice { position: relative; display: block; cursor: pointer; }
.variant-choice .variant-card { padding-left: 44px; height: 100%; }
.android-client .variant-choice input[type="radio"] { position: absolute; left: 14px; top: 18px; width: 20px; height: 20px; min-height: 20px; margin: 0; padding: 0; accent-color: var(--green); }
.variant-choice input:checked + .variant-card { border-color: var(--green); box-shadow: inset 0 0 0 1px var(--green); }
.variant-choice input:focus-visible + .variant-card { outline: 3px solid #a88231; outline-offset: 3px; }
.dark-theme .variant-card { background: #23332b; }
