@import url("https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Manrope:wght@400;500;600;700;800&display=swap");

:root {
  --ink: #17201b;
  --muted: #6d756f;
  --line: #dfe2dc;
  --cream: #f5f2e9;
  --paper: #fffdf8;
  --forest: #173c2d;
  --forest-2: #245640;
  --lime: #cddd78;
  --tomato: #e55835;
  --gold: #f0b44d;
  --danger: #bd3d2b;
  --shadow: 0 18px 50px rgba(23, 60, 45, .12);
  --radius: 18px;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--cream); }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 22% -10%, rgba(205, 221, 120, .18), transparent 30%),
    var(--cream);
  font-family: "Manrope", "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
.hidden { display: none !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.eyebrow {
  margin: 0 0 7px; color: #7a827c; font-size: 10px; line-height: 1;
  font-weight: 800; letter-spacing: .16em; text-transform: uppercase;
}

.app-shell { min-height: 100vh; }
.demo-banner {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  padding: 9px 22px; color: #3c2d05; background: #f7d978;
  border-bottom: 1px solid rgba(60,45,5,.16); font-size: 12px; text-align: center;
}
.demo-banner strong { text-transform: uppercase; letter-spacing: .08em; font-size: 10px; }
.topbar {
  height: 76px; padding: 0 26px; display: grid; grid-template-columns: 1fr auto 1fr;
  align-items: center; gap: 24px; color: white; background: var(--forest);
  border-bottom: 1px solid rgba(255,255,255,.1); position: sticky; top: 0; z-index: 30;
}
.brand { color: inherit; display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-logo {
  width: 62px; height: 46px; padding: 2px; flex: 0 0 auto; object-fit: cover;
  object-position: 50% 50%; background: white; border: 1px solid rgba(255,255,255,.16); border-radius: 10px;
}
.brand-logo.large { width: 116px; height: 78px; margin-bottom: 22px; display: block; object-position: 50% 50%; }
.brand-mark {
  width: 40px; height: 40px; display: grid; place-items: center; flex: 0 0 auto;
  color: var(--forest); background: var(--lime); border-radius: 11px 11px 11px 3px;
  font-family: Georgia, serif; font-size: 25px; font-style: italic; font-weight: 800;
  box-shadow: inset 0 -3px 0 rgba(23,60,45,.12);
}
.brand-mark.large { width: 54px; height: 54px; margin-bottom: 22px; font-size: 32px; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 15px; letter-spacing: .08em; }
.brand small { margin-top: 3px; color: rgba(255,255,255,.58); font-size: 9px; letter-spacing: .17em; }
.topbar-center {
  display: flex; align-items: center; gap: 10px; min-width: 160px; justify-content: center;
  padding: 9px 16px; border: 1px solid rgba(255,255,255,.12); border-radius: 50px;
  background: rgba(255,255,255,.055);
}
.topbar-center span:not(.status-dot) { display: flex; gap: 7px; align-items: center; }
.topbar-center strong { font-size: 12px; }
.topbar-center small { color: rgba(255,255,255,.6); font: 10px "DM Mono", monospace; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #b9dc6b; box-shadow: 0 0 0 4px rgba(185,220,107,.12); }
.topbar-actions { display: flex; justify-content: flex-end; gap: 9px; }
.icon-button, .button, .text-button, .modal-close {
  border: 0; cursor: pointer; transition: transform .15s ease, background .15s ease, opacity .15s ease;
}
.icon-button:hover, .button:hover { transform: translateY(-1px); }
.icon-button {
  width: 40px; height: 40px; border: 1px solid rgba(255,255,255,.13); color: white;
  background: rgba(255,255,255,.06); border-radius: 11px; font-size: 21px;
}
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 40px; padding: 0 16px; border-radius: 11px; font-weight: 800; font-size: 12px;
  text-decoration: none;
}
.button-dark { color: var(--forest); background: var(--lime); }
.button-primary { color: white; background: var(--forest); }
.button-ghost { color: var(--ink); background: #eef0eb; border: 1px solid var(--line); }
.button.full { width: 100%; min-height: 48px; justify-content: space-between; padding: 0 19px; }
.text-button { padding: 3px; color: var(--forest-2); background: transparent; font-size: 11px; font-weight: 800; }
.danger-text { color: var(--danger); }

.pos-layout {
  min-height: calc(100vh - 76px); display: grid; grid-template-columns: 116px minmax(500px, 1fr) 370px;
}
.category-rail {
  padding: 29px 12px 18px; display: flex; flex-direction: column;
  background: #ede9de; border-right: 1px solid #ddd8cc;
}
.category-rail > .eyebrow { text-align: center; }
.category-rail nav { display: grid; gap: 7px; margin-top: 13px; }
.category-button {
  min-height: 70px; padding: 9px 6px; border: 1px solid transparent; border-radius: 14px;
  color: #5e665f; background: transparent; cursor: pointer; display: flex;
  flex-direction: column; justify-content: center; align-items: center; gap: 6px;
  font-size: 9px; font-weight: 800; transition: .15s ease;
}
.category-button span { font-size: 23px; line-height: 1; }
.category-button:hover { background: rgba(255,255,255,.55); }
.category-button.active { color: white; background: var(--forest); box-shadow: 0 8px 20px rgba(23,60,45,.2); }
.rail-note {
  margin-top: auto; padding: 13px 5px; text-align: center; border-top: 1px solid #d7d1c5;
}
.rail-note span, .rail-note small { display: block; color: #858a83; font-size: 8px; text-transform: uppercase; letter-spacing: .1em; }
.rail-note strong { display: block; margin: 3px 0; font: 20px "DM Mono", monospace; }

.catalog { min-width: 0; padding: 31px 30px 60px; background-color: var(--cream); }
.catalog-head { display: flex; align-items: end; justify-content: space-between; gap: 25px; }
.catalog h1 { margin: 0; color: var(--forest); font-size: clamp(27px, 3vw, 42px); line-height: 1; letter-spacing: -.045em; }
.search {
  height: 43px; min-width: 230px; display: flex; align-items: center; gap: 9px;
  padding: 0 12px; color: #7c837e; background: var(--paper); border: 1px solid var(--line); border-radius: 12px;
}
.search:focus-within { outline: 3px solid rgba(205,221,120,.38); border-color: #a6b657; }
.search input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 12px; }
kbd { padding: 2px 5px; color: #858b86; background: #edece7; border: 1px solid #deddd7; border-radius: 5px; font: 9px "DM Mono", monospace; box-shadow: 0 1px 0 white; }
.catalog-toolbar { height: 57px; display: flex; align-items: center; justify-content: space-between; }
.catalog-toolbar p { color: var(--muted); font-size: 10px; }
.view-switch { padding: 3px; background: #e6e3da; border-radius: 9px; display: flex; }
.view-switch button { width: 30px; height: 27px; border: 0; border-radius: 7px; color: #737a74; background: transparent; cursor: pointer; }
.view-switch button.active { color: var(--forest); background: white; box-shadow: 0 2px 7px rgba(25,45,34,.09); }
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 13px; }
.product-card {
  min-height: 157px; padding: 17px; position: relative; overflow: hidden; text-align: left;
  display: flex; flex-direction: column; align-items: stretch; border: 1px solid #e1ded4;
  border-radius: 17px; background: var(--paper); cursor: pointer;
  box-shadow: 0 2px 0 rgba(23,60,45,.02); transition: transform .13s ease, box-shadow .13s ease, border-color .13s ease;
}
.product-card::after {
  content: ""; width: 62px; height: 62px; position: absolute; right: -25px; top: -25px;
  border-radius: 50%; background: var(--accent, #d8e0bd); opacity: .45;
}
.product-card:hover { transform: translateY(-3px); border-color: #cfd4c3; box-shadow: 0 12px 25px rgba(23,60,45,.1); }
.product-card:active { transform: scale(.98); }
.product-card .product-icon {
  width: 38px; height: 38px; display: grid; place-items: center; margin-bottom: 17px;
  border-radius: 12px; background: color-mix(in srgb, var(--accent, #d8e0bd) 47%, white);
  font-size: 20px;
}
.product-card small { color: #8a908a; font-size: 8px; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; }
.product-card h2 { min-height: 34px; margin: 4px 0 12px; font-size: 13px; line-height: 1.3; }
.product-price { margin-top: auto; display: flex; justify-content: space-between; align-items: center; }
.product-price strong { color: var(--forest); font: 600 15px "DM Mono", monospace; }
.product-price span { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 50%; color: white; background: var(--forest); }
.product-grid.list { grid-template-columns: 1fr; gap: 7px; }
.product-grid.list .product-card { min-height: 67px; display: grid; grid-template-columns: 42px 1fr auto; align-items: center; column-gap: 12px; }
.product-grid.list .product-icon { margin: 0; grid-row: 1 / 3; }
.product-grid.list h2 { min-height: 0; margin: 1px 0; }
.product-grid.list .product-price { grid-column: 3; grid-row: 1 / 3; gap: 20px; }
.empty-state { min-height: 330px; display: grid; place-items: center; align-content: center; color: var(--muted); text-align: center; }
.empty-state > span { font-size: 32px; }
.empty-state h2 { margin: 12px 0 2px; font-size: 17px; }
.empty-state p { font-size: 12px; }

.cart-panel {
  min-width: 0; height: calc(100vh - 76px); position: sticky; top: 76px; padding: 29px 24px 20px;
  display: flex; flex-direction: column; background: var(--paper); border-left: 1px solid var(--line);
  box-shadow: -15px 0 35px rgba(23,60,45,.045); z-index: 10;
}
.cart-head { display: flex; justify-content: space-between; align-items: start; }
.cart-head h2 { margin: 0; color: var(--forest); font-size: 19px; letter-spacing: -.03em; }
.cart-head h2 span { color: #8d938e; font: 10px "DM Mono", monospace; }
.order-type { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin: 20px 0 12px; padding: 4px; background: #eeece5; border-radius: 11px; }
.order-type button { min-height: 31px; border: 0; border-radius: 8px; color: #777e78; background: transparent; cursor: pointer; font-size: 9px; font-weight: 800; }
.order-type button.active { color: var(--forest); background: white; box-shadow: 0 2px 8px rgba(23,60,45,.1); }
.cart-items { min-height: 140px; overflow-y: auto; padding: 5px 3px 6px 0; scrollbar-width: thin; }
.cart-empty { min-height: 180px; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #a0a49f; }
.cart-empty > span { width: 40px; height: 40px; display: grid; place-items: center; margin-bottom: 11px; border: 1px dashed #b9bdb7; border-radius: 50%; font-size: 22px; }
.cart-empty strong { color: #6f7670; font-size: 12px; }
.cart-empty small { margin-top: 4px; font-size: 10px; }
.cart-item { padding: 12px 0; display: grid; grid-template-columns: 1fr auto; gap: 8px; border-bottom: 1px solid #e9e7e0; }
.cart-item h3 { margin: 0; font-size: 11px; line-height: 1.35; }
.cart-item small { color: #89908a; font: 9px "DM Mono", monospace; }
.cart-item-total { color: var(--forest); font: 600 11px "DM Mono", monospace; }
.quantity { margin-top: 8px; display: inline-flex; align-items: center; gap: 9px; }
.quantity button { width: 23px; height: 23px; padding: 0; border: 1px solid #dfe2dc; border-radius: 7px; background: #f5f4ef; cursor: pointer; }
.quantity b { min-width: 13px; text-align: center; font: 10px "DM Mono", monospace; }
.customer-summary { margin: 8px 0; padding: 10px 12px; border-radius: 10px; background: #eef3e5; border-left: 3px solid var(--lime); }
.customer-summary span, .customer-summary small, .customer-summary strong { display: block; }
.customer-summary span { color: #71806f; font-size: 8px; text-transform: uppercase; letter-spacing: .1em; }
.customer-summary strong { margin: 3px 0; font-size: 11px; }
.customer-summary small { color: #687069; font-size: 9px; }
.cart-totals { margin-top: auto; padding: 14px 0 11px; border-top: 1px dashed #cfd2cc; }
.cart-totals > div { display: flex; justify-content: space-between; margin: 7px 0; color: #767d77; font-size: 10px; }
.cart-totals .grand-total { margin-top: 13px; color: var(--ink); align-items: baseline; }
.grand-total span { font-weight: 800; font-size: 12px; }
.grand-total strong { color: var(--forest); font: 700 24px "DM Mono", monospace; letter-spacing: -.05em; }
.checkout-button {
  width: 100%; min-height: 62px; padding: 0 17px; display: grid; grid-template-columns: 1fr auto 20px; align-items: center; gap: 12px;
  border: 0; border-radius: 14px 14px 14px 4px; color: white; background: var(--tomato); cursor: pointer; text-align: left;
  box-shadow: 0 10px 22px rgba(229,88,53,.22);
}
.checkout-button:disabled { cursor: not-allowed; opacity: .35; box-shadow: none; }
.checkout-button small, .checkout-button strong { display: block; }
.checkout-button small { font-size: 7px; letter-spacing: .13em; opacity: .73; }
.checkout-button strong { margin-top: 3px; font-size: 11px; }
.checkout-button b { font: 600 14px "DM Mono", monospace; }
.keyboard-hint { margin: 9px 0 0; text-align: center; color: #999e99; font-size: 8px; }
.mobile-cart-button { display: none; }

.modal {
  width: min(560px, calc(100vw - 30px)); padding: 0; overflow: hidden; color: var(--ink);
  background: var(--paper); border: 0; border-radius: 20px; box-shadow: 0 30px 90px rgba(8,24,17,.3);
}
.modal::backdrop { background: rgba(14,34,26,.66); backdrop-filter: blur(5px); }
.modal > form, .receipt { padding: 27px; }
.modal-head { display: flex; justify-content: space-between; align-items: start; margin-bottom: 22px; }
.modal-head h2 { margin: 0; color: var(--forest); font-size: 24px; letter-spacing: -.04em; }
.modal-close { width: 34px; height: 34px; border-radius: 50%; background: #efeee8; font-size: 22px; }
.payment-total { margin-bottom: 18px; padding: 19px; display: flex; justify-content: space-between; align-items: center; color: white; background: var(--forest); border-radius: 15px; }
.payment-total span { font-size: 11px; }
.payment-total strong { font: 700 26px "DM Mono", monospace; }
.payment-methods { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.payment-methods label {
  min-height: 105px; padding: 14px; position: relative; display: flex; flex-direction: column; align-items: center;
  justify-content: center; text-align: center; border: 1px solid var(--line); border-radius: 13px; cursor: pointer;
}
.payment-methods label.selected { border-color: var(--forest); background: #f0f4e8; box-shadow: inset 0 0 0 1px var(--forest); }
.payment-methods input { position: absolute; opacity: 0; pointer-events: none; }
.payment-methods .payment-icon { margin-bottom: 8px; color: var(--forest); font: 19px "DM Mono", monospace; }
.payment-methods strong, .payment-methods small { display: block; }
.payment-methods strong { font-size: 11px; }
.payment-methods small { margin-top: 2px; color: var(--muted); font-size: 8px; }
.payment-methods i { display: none; position: absolute; right: 8px; top: 8px; width: 16px; height: 16px; border-radius: 50%; color: white; background: var(--forest); font-size: 9px; font-style: normal; }
.payment-methods label.selected i { display: grid; place-items: center; }
.customer-fields { margin-top: 18px; padding-top: 17px; border-top: 1px solid var(--line); }
.cash-fields {
  margin-top: 14px; padding: 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
  align-items: end; background: #f0f3eb; border-radius: 12px;
}
.cash-fields label { display: grid; gap: 5px; color: #687069; font-size: 9px; font-weight: 800; text-transform: uppercase; }
.cash-fields > div { min-height: 39px; display: flex; flex-direction: column; justify-content: center; align-items: end; }
.cash-fields > div span { color: #727a73; font-size: 8px; text-transform: uppercase; }
.cash-fields > div strong { margin-top: 2px; color: var(--forest); font: 700 17px "DM Mono", monospace; }
.money-input { position: relative; }
.money-input input { width: 100%; padding-right: 28px; }
.money-input b { position: absolute; right: 11px; top: 50%; transform: translateY(-50%); color: #7f867f; font-size: 11px; }
.customer-fields label, .product-modal label, .login-card label {
  display: grid; gap: 6px; margin-bottom: 12px; color: #626963; font-size: 9px; font-weight: 800;
  letter-spacing: .04em; text-transform: uppercase;
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.compact-row { grid-template-columns: .55fr 1.45fr; }
input, select, textarea, .select-control {
  min-width: 0; padding: 10px 12px; color: var(--ink); background: white; border: 1px solid #d8dcd5;
  border-radius: 10px; outline: 0; font-size: 12px; text-transform: none;
}
input:focus, select:focus, textarea:focus { border-color: #91a13f; box-shadow: 0 0 0 3px rgba(205,221,120,.3); }
textarea { resize: vertical; }
.modal-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 20px; }
.receipt { color: #171b18; font-family: "DM Mono", monospace; }
.receipt-header { text-align: center; }
.receipt-header .brand-mark { margin: 0 auto 10px; }
.receipt-header h2 { margin: 0; font-family: "Manrope", sans-serif; letter-spacing: .05em; }
.receipt-header p { margin: 5px 0 17px; color: #606560; font-size: 9px; }
.receipt-line { display: flex; justify-content: space-between; gap: 12px; margin: 6px 0; font-size: 10px; }
.receipt-rule { margin: 14px 0; border-top: 1px dashed #8f948f; }
.receipt-total { font-size: 16px; font-weight: 700; }
.receipt-meta { margin-top: 17px; padding: 12px; background: #f0f0eb; font-size: 8px; line-height: 1.6; overflow-wrap: anywhere; }
.receipt-warning { margin-top: 11px; color: var(--danger); font: 9px "Manrope", sans-serif; text-align: center; }
.receipt-actions { padding: 0 27px 27px; }

.toast-region { position: fixed; right: 22px; bottom: 22px; display: grid; gap: 8px; z-index: 100; }
.toast { width: min(340px, calc(100vw - 32px)); padding: 13px 15px; color: white; background: var(--forest); border-radius: 11px; box-shadow: var(--shadow); font-size: 11px; animation: toast-in .2s ease; }
.toast.error { background: var(--danger); }
@keyframes toast-in { from { transform: translateY(8px); opacity: 0; } }

.admin-overlay { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; background: rgba(10,29,21,.75); backdrop-filter: blur(8px); }
.login-card {
  width: min(410px, calc(100vw - 28px)); padding: 35px; position: relative; background: var(--paper);
  border-radius: 22px; box-shadow: 0 30px 100px rgba(0,0,0,.35);
}
.login-card h2 { margin: 0 0 8px; color: var(--forest); font-size: 29px; letter-spacing: -.04em; }
.login-card > p:not(.eyebrow) { margin: 0 0 25px; color: var(--muted); font-size: 11px; line-height: 1.6; }
.login-card input { min-height: 44px; }
.login-close { position: absolute; right: 18px; top: 18px; }
.login-note { display: block; margin-top: 15px; color: #858b86; text-align: center; font-size: 8px; }
.form-error { padding: 10px; color: var(--danger); background: #f9e7e2; border-radius: 8px; font-size: 10px; }
.admin-shell { width: 100%; height: 100%; display: grid; grid-template-columns: 205px 1fr; background: var(--cream); }
.admin-sidebar { padding: 25px 15px 17px; display: flex; flex-direction: column; color: white; background: var(--forest); }
.admin-brand { margin: 0 9px 40px; }
.admin-brand .brand-logo { width: 50px; height: 38px; }
.admin-sidebar nav { display: grid; gap: 5px; }
.admin-sidebar nav button {
  min-height: 43px; padding: 0 12px; display: flex; align-items: center; gap: 11px; text-align: left;
  color: rgba(255,255,255,.62); background: transparent; border: 0; border-radius: 10px; cursor: pointer; font-size: 10px; font-weight: 700;
}
.admin-sidebar nav button span { width: 20px; font-size: 17px; text-align: center; }
.admin-sidebar nav button.active { color: var(--forest); background: var(--lime); }
.admin-user { margin-top: auto; padding: 13px 8px 0; display: grid; grid-template-columns: 34px 1fr 23px; align-items: center; gap: 9px; border-top: 1px solid rgba(255,255,255,.1); }
.admin-user > span { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; color: var(--forest); background: #eef3e6; font-size: 9px; font-weight: 800; }
.admin-user strong, .admin-user small { display: block; }
.admin-user strong { font-size: 9px; }
.admin-user small { margin-top: 2px; color: rgba(255,255,255,.47); font-size: 7px; letter-spacing: .12em; }
.admin-user button { color: rgba(255,255,255,.6); background: transparent; border: 0; cursor: pointer; }
.admin-main { min-width: 0; height: 100vh; overflow-y: auto; }
.admin-head { height: 84px; padding: 0 32px; display: flex; align-items: center; justify-content: space-between; background: var(--paper); border-bottom: 1px solid var(--line); }
.admin-head h1 { margin: 0; color: var(--forest); font-size: 24px; letter-spacing: -.04em; }
.admin-head-actions { display: flex; align-items: center; gap: 12px; }
.integrity-badge { padding: 7px 10px; display: flex; align-items: center; gap: 7px; color: var(--forest); background: #edf3e3; border-radius: 50px; font-size: 8px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.integrity-badge i { width: 6px; height: 6px; border-radius: 50%; background: #6b943f; }
.integrity-badge.bad { color: var(--danger); background: #fae5e0; }
.integrity-badge.bad i { background: var(--danger); }
.admin-content { padding: 28px 32px 50px; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 17px; }
.stat-card { min-height: 118px; padding: 18px; position: relative; overflow: hidden; background: var(--paper); border: 1px solid var(--line); border-radius: 15px; }
.stat-card::after { content: ""; position: absolute; width: 60px; height: 60px; right: -23px; top: -23px; border-radius: 50%; background: var(--tone, var(--lime)); opacity: .25; }
.stat-card span { color: var(--muted); font-size: 8px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.stat-card strong { display: block; margin: 13px 0 4px; color: var(--forest); font: 700 24px "DM Mono", monospace; letter-spacing: -.04em; }
.stat-card small { color: #8a908a; font-size: 8px; }
.admin-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 17px; }
.admin-card, .data-card { padding: 20px; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; }
.card-head { display: flex; justify-content: space-between; align-items: start; margin-bottom: 15px; }
.card-head h2 { margin: 0; color: var(--forest); font-size: 17px; letter-spacing: -.03em; }
table { width: 100%; border-collapse: collapse; }
th { padding: 10px 9px; color: #8a908a; border-bottom: 1px solid var(--line); text-align: left; font-size: 7px; letter-spacing: .11em; text-transform: uppercase; }
td { padding: 12px 9px; border-bottom: 1px solid #e8e7e1; font-size: 9px; vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
td strong, td small { display: block; }
td small { margin-top: 3px; color: #878d88; font-size: 8px; }
.amount { font: 600 10px "DM Mono", monospace; }
.status-pill { display: inline-flex; padding: 5px 8px; border-radius: 50px; color: #2f653a; background: #e5f0df; font-size: 7px; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; }
.status-pill.reversal, .status-pill.inactive { color: #9d3d2d; background: #fae4df; }
.row-action { padding: 5px; border: 0; color: var(--forest); background: transparent; cursor: pointer; font-weight: 800; font-size: 9px; }
.compliance-list { display: grid; gap: 8px; }
.compliance-item { padding: 11px; display: grid; grid-template-columns: 25px 1fr; gap: 9px; align-items: center; border-radius: 11px; background: #f1f3ed; }
.compliance-item > span { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 50%; color: white; background: #568043; font-size: 10px; }
.compliance-item.warn > span { background: var(--tomato); }
.compliance-item strong, .compliance-item small { display: block; }
.compliance-item strong { font-size: 9px; }
.compliance-item small { margin-top: 2px; color: #7c837d; font-size: 7px; line-height: 1.4; }
.section-toolbar { min-height: 54px; display: flex; justify-content: space-between; align-items: start; gap: 12px; }
.section-toolbar .search { width: 280px; background: white; }
.data-card { padding: 7px 17px; overflow-x: auto; }
.data-card table { min-width: 700px; }
.section-copy { max-width: 600px; margin: 0 0 15px; color: var(--muted); font-size: 10px; line-height: 1.6; }
.timeline { position: relative; padding-left: 20px; }
.timeline::before { content: ""; position: absolute; left: 5px; top: 9px; bottom: 9px; width: 1px; background: #cfd4cc; }
.audit-event { position: relative; margin-bottom: 10px; padding: 13px 16px; display: grid; grid-template-columns: 140px 1fr 180px; gap: 15px; align-items: center; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; }
.audit-event::before { content: ""; position: absolute; left: -19px; width: 9px; height: 9px; border: 3px solid var(--cream); border-radius: 50%; background: var(--forest); }
.audit-event time { color: #737a74; font: 8px "DM Mono", monospace; }
.audit-event strong, .audit-event small { display: block; }
.audit-event strong { font-size: 9px; }
.audit-event small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.hash { overflow: hidden; text-overflow: ellipsis; color: #7d847e; font: 7px "DM Mono", monospace; }
.export-hero { padding: 30px; display: flex; justify-content: space-between; align-items: center; color: white; background: var(--forest); border-radius: 17px; }
.export-hero h2 { margin: 0; max-width: 560px; font-size: 25px; letter-spacing: -.04em; }
.export-hero p:not(.eyebrow) { max-width: 600px; margin: 8px 0 0; color: rgba(255,255,255,.65); font-size: 10px; line-height: 1.6; }
.export-seal { width: 72px; height: 72px; display: grid; place-items: center; align-content: center; border: 1px solid rgba(255,255,255,.25); border-radius: 50%; color: var(--lime); font: 600 17px "DM Mono", monospace; text-align: center; }
.export-seal small { color: white; font-size: 7px; letter-spacing: .1em; }
.export-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 15px 0; }
.export-grid .admin-card { display: flex; flex-direction: column; align-items: flex-start; }
.export-icon { padding: 7px 9px; color: var(--forest); background: #e9efde; border-radius: 7px; font: 700 8px "DM Mono", monospace; }
.export-grid h3 { margin: 16px 0 5px; font-size: 13px; }
.export-grid p { flex: 1; margin: 0 0 16px; color: var(--muted); font-size: 9px; line-height: 1.6; }
.warning-card { background: #fff7f0; border-color: #ebcbbb; }
.warning-card strong { color: var(--danger); font-size: 9px; }
.retention-card { display: grid; grid-template-columns: 1fr 1.5fr; gap: 25px; }
.retention-card h3 { margin: 0; color: var(--forest); font-size: 15px; }
.retention-card ul { margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 9px; list-style: none; }
.retention-card li { display: flex; gap: 7px; align-items: center; font-size: 8px; }
.retention-card li span { color: var(--forest); font-weight: 800; }
.toggle-field { min-height: 44px; grid-template-columns: auto 34px 1fr !important; align-items: center; align-content: center; }
.toggle-field input { position: absolute; opacity: 0; }
.toggle-field span { width: 34px; height: 19px; position: relative; border-radius: 30px; background: #c9cec8; }
.toggle-field span::after { content: ""; width: 15px; height: 15px; position: absolute; top: 2px; left: 2px; border-radius: 50%; background: white; transition: .15s; }
.toggle-field input:checked + span { background: var(--forest); }
.toggle-field input:checked + span::after { transform: translateX(15px); }

@media (max-width: 1180px) {
  .pos-layout { grid-template-columns: 95px minmax(430px, 1fr) 330px; }
  .catalog { padding-inline: 20px; }
  .product-grid { grid-template-columns: repeat(auto-fill, minmax(155px, 1fr)); }
  .cart-panel { padding-inline: 18px; }
  .admin-grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .topbar { grid-template-columns: 1fr auto; }
  .topbar-center { display: none; }
  .pos-layout { grid-template-columns: 88px 1fr; }
  .cart-panel { width: min(390px, 100vw); position: fixed; top: 76px; right: 0; transform: translateX(102%); transition: transform .2s ease; box-shadow: -20px 0 50px rgba(23,60,45,.2); }
  .cart-panel.open { transform: translateX(0); }
  .mobile-cart-button {
    min-width: 260px; height: 48px; padding: 0 18px; position: fixed; left: 50%; bottom: 14px; z-index: 22;
    display: flex; justify-content: space-between; align-items: center; transform: translateX(-50%);
    border: 0; border-radius: 14px; color: white; background: var(--tomato); box-shadow: 0 10px 35px rgba(74,35,21,.3); font-size: 11px;
  }
  .mobile-cart-button b { display: inline-grid; place-items: center; width: 21px; height: 21px; margin-right: 5px; border-radius: 50%; color: var(--tomato); background: white; }
  .admin-shell { grid-template-columns: 72px 1fr; }
  .admin-sidebar { padding-inline: 9px; }
  .admin-brand span:last-child, .admin-sidebar nav button:not(.active)::after, .admin-sidebar nav button { font-size: 0; }
  .admin-brand { margin-inline: 6px; }
  .admin-sidebar nav button { justify-content: center; padding: 0; }
  .admin-sidebar nav button span { font-size: 18px; }
  .admin-user { grid-template-columns: 1fr; justify-items: center; }
  .admin-user div { display: none; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .export-grid { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .topbar { height: 66px; padding: 0 14px; }
  .brand strong { font-size: 12px; }
  .brand small { font-size: 7px; }
  .button-dark { width: 42px; padding: 0; font-size: 0; }
  .button-dark span { font-size: 17px; }
  .pos-layout { grid-template-columns: 1fr; min-height: calc(100vh - 66px); }
  .category-rail { padding: 10px 12px; position: sticky; top: 66px; z-index: 15; display: block; overflow-x: auto; border-right: 0; border-bottom: 1px solid #ddd8cc; }
  .category-rail > .eyebrow, .rail-note { display: none; }
  .category-rail nav { display: flex; margin: 0; }
  .category-button { min-width: 72px; min-height: 56px; flex-direction: row; padding: 7px 10px; }
  .category-button span { font-size: 18px; }
  .catalog { padding: 24px 13px 75px; }
  .catalog-head { align-items: stretch; flex-direction: column; gap: 16px; }
  .catalog-head .search { min-width: 0; width: 100%; }
  .product-grid { grid-template-columns: 1fr 1fr; gap: 9px; }
  .product-card { min-height: 148px; padding: 14px; }
  .cart-panel { top: 66px; height: calc(100vh - 66px); }
  .field-row, .compact-row { grid-template-columns: 1fr; gap: 0; }
  .payment-methods { grid-template-columns: 1fr; }
  .payment-methods label { min-height: 62px; flex-direction: row; justify-content: start; gap: 11px; text-align: left; }
  .payment-methods .payment-icon { margin: 0; }
  .admin-shell { display: block; }
  .admin-sidebar { height: 62px; padding: 8px 10px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 4; flex-direction: row; }
  .admin-brand, .admin-user { display: none; }
  .admin-sidebar nav { width: 100%; display: flex; justify-content: space-around; }
  .admin-sidebar nav button { width: 45px; }
  .admin-main { height: calc(100vh - 62px); }
  .admin-head { height: 70px; padding: 0 16px; }
  .admin-head h1 { font-size: 19px; }
  .integrity-badge { display: none; }
  .admin-content { padding: 17px 12px 80px; }
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .stat-card { min-height: 102px; padding: 14px; }
  .audit-event { grid-template-columns: 1fr; gap: 5px; }
  .export-hero { padding: 22px; }
  .export-seal { display: none; }
  .retention-card, .retention-card ul { grid-template-columns: 1fr; }
  .section-toolbar { align-items: stretch; flex-direction: column; margin-bottom: 12px; }
  .section-toolbar .search { width: 100%; }
}
@media print {
  body * { visibility: hidden; }
  #receiptDialog, #receiptDialog * { visibility: visible; }
  #receiptDialog { width: 78mm; position: absolute; inset: 0; border: 0; }
  .receipt-actions { display: none; }
}
