@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Fraunces:opsz,wght@9..144,600;9..144,700&display=swap');

:root {
  --paper: #fbf7f0;
  --surface: #fffdf9;
  --surface-2: #f5eee4;
  --line: #e8ddd1;
  --ink: #2e2724;
  --muted: #80736a;
  --apricot: #e88b4a;
  --apricot-dark: #b85d2e;
  --plum: #704052;
  --plum-soft: #f3e5e8;
  --sage: #5f806d;
  --sage-soft: #e8f1ea;
  --yellow-soft: #fff3d9;
  --shadow: 0 18px 42px rgba(72, 46, 30, .09), 0 3px 8px rgba(72, 46, 30, .04);
  --shadow-soft: 0 8px 20px rgba(72, 46, 30, .07);
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 11px;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--paper); }
body { margin: 0; color: var(--ink); background: var(--paper); font: 500 14px/1.45 'DM Sans', ui-sans-serif, system-ui, -apple-system, sans-serif; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid rgba(232, 139, 74, .32); outline-offset: 2px; }

.app-frame { min-height: 100vh; max-width: 1600px; margin: 0 auto; padding: 0 30px 28px; }
.topbar { height: 78px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(232, 221, 209, .75); }
.brand-lockup, .topbar-actions, .brand-lockup > div:last-child, .cart-header, .catalog-heading, .modal-header, .section-title, .menu-list-toolbar, .modal-footer, .receipt-actions { display: flex; align-items: center; }
.brand-lockup { gap: 11px; }
.brand-seal { width: 38px; height: 38px; display: grid; place-items: center; color: #fffaf2; background: var(--plum); border-radius: 13px 13px 13px 5px; box-shadow: 3px 3px 0 rgba(232, 139, 74, .65); font: 700 23px 'Fraunces', serif; transform: rotate(-4deg); }
.brand-seal span { transform: rotate(4deg); }
.brand-seal.has-logo { overflow: hidden; padding: 3px; background: var(--surface); }
.brand-logo { width: 100%; height: 100%; display: block; object-fit: contain; border-radius: 9px 9px 9px 3px; transform: rotate(4deg); }
.brand-lockup h1 { margin: 1px 0 0; font: 700 21px/1 'Fraunces', Georgia, serif; letter-spacing: -.02em; }
.eyebrow { color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.topbar-actions { gap: 9px; }
.status-pill { display: inline-flex; align-items: center; gap: 7px; padding: 8px 11px; color: var(--sage); background: var(--sage-soft); border-radius: 99px; font-size: 12px; font-weight: 700; }
.status-dot { width: 7px; height: 7px; display: inline-block; border-radius: 50%; background: #71a57e; box-shadow: 0 0 0 4px rgba(113, 165, 126, .14); }
.icon-button, .text-button, .close-button { border: 0; color: var(--ink); background: transparent; }
.icon-button { display: inline-flex; align-items: center; gap: 7px; padding: 9px 10px; border-radius: 10px; font-size: 18px; transition: background .18s, color .18s; }
.icon-button:hover { color: var(--apricot-dark); background: var(--surface-2); }
.button-label { font-size: 12px; font-weight: 700; }

.workspace { display: grid; grid-template-columns: minmax(0, 1fr) 370px; gap: 26px; padding-top: 32px; align-items: start; }
.catalog-panel { min-width: 0; }
.catalog-heading { justify-content: space-between; gap: 24px; margin-bottom: 22px; }
h2 { margin: 5px 0 0; font: 700 32px/1.1 'Fraunces', Georgia, serif; letter-spacing: -.035em; }
.muted { color: var(--muted); }
.catalog-heading p { margin: 7px 0 0; color: var(--muted); }
.date-card { display: grid; gap: 4px; min-width: 150px; padding: 12px 15px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); color: var(--muted); font-size: 11px; text-align: right; }
.date-card strong { color: var(--ink); font-size: 13px; }
.stats-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 25px; }
.stat-card { display: flex; align-items: center; gap: 11px; padding: 13px 15px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); }
.stat-card strong { display: block; margin-top: 2px; font-size: 17px; }
.stat-label { display: block; color: var(--muted); font-size: 11px; }
.stat-icon { width: 35px; height: 35px; display: grid; place-items: center; border-radius: 11px; font-weight: 800; font-size: 16px; }
.stat-icon.apricot { color: var(--apricot-dark); background: #fff0df; }
.stat-icon.plum { color: var(--plum); background: var(--plum-soft); }
.stat-icon.sage { color: var(--sage); background: var(--sage-soft); }
.catalog-toolbar { display: grid; grid-template-columns: minmax(190px, 1fr) auto; gap: 14px; align-items: center; margin-bottom: 18px; }
.search-field { display: flex; align-items: center; gap: 8px; padding: 0 13px; height: 43px; color: var(--muted); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.search-field input { width: 100%; border: 0; outline: 0; color: var(--ink); background: transparent; }
.category-tabs { display: flex; gap: 7px; overflow-x: auto; padding-bottom: 2px; }
.category-tab { padding: 9px 12px; white-space: nowrap; border: 1px solid transparent; border-radius: 10px; color: var(--muted); background: transparent; font-size: 12px; font-weight: 700; }
.category-tab:hover, .category-tab.is-active { color: var(--plum); background: var(--plum-soft); border-color: #edd6dc; }
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 15px; }
.product-card { position: relative; min-width: 0; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); transition: transform .2s ease, box-shadow .2s ease, border-color .2s; }
.product-card:hover { transform: translateY(-3px); border-color: #ddcdbd; box-shadow: var(--shadow-soft); }
.product-image { height: 132px; position: relative; overflow: hidden; background: var(--surface-2); }
.product-image img { width: 100%; height: 100%; display: block; object-fit: cover; transition: transform .35s ease; }
.product-card:hover .product-image img { transform: scale(1.04); }
.category-chip { position: absolute; top: 10px; left: 10px; padding: 5px 8px; color: var(--plum); background: rgba(255, 253, 249, .9); border: 1px solid rgba(255, 255, 255, .8); border-radius: 7px; font-size: 10px; font-weight: 700; }
.product-body { padding: 13px; }
.product-body h3 { margin: 0 0 4px; font-size: 15px; letter-spacing: -.02em; }
.product-description { min-height: 37px; margin: 0 0 10px; color: var(--muted); font-size: 11px; line-height: 1.45; }
.product-bottom { display: flex; align-items: end; justify-content: space-between; gap: 8px; }
.price-label { color: var(--muted); font-size: 10px; }
.price-value { display: block; margin-top: 1px; font-size: 16px; font-weight: 800; }
.add-button { min-width: 34px; height: 32px; padding: 0 10px; border: 0; border-radius: 9px; color: #fffaf2; background: var(--apricot); font-size: 17px; font-weight: 700; box-shadow: 0 4px 10px rgba(232, 139, 74, .2); transition: background .18s, transform .18s; }
.add-button:hover { background: var(--apricot-dark); transform: translateY(-1px); }
.empty-state { display: grid; place-items: center; min-height: 250px; padding: 35px; color: var(--muted); background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius-md); text-align: center; }
.empty-state strong { display: block; margin-bottom: 4px; color: var(--ink); }

.cart-panel { position: sticky; top: 18px; min-height: 550px; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); overflow: hidden; }
.cart-header { justify-content: space-between; padding: 21px 21px 15px; }
.cart-header h2 { display: flex; align-items: center; gap: 8px; font-size: 24px; }
.cart-count-badge { min-width: 25px; height: 25px; display: inline-grid; place-items: center; padding: 0 7px; color: var(--apricot-dark); background: #fff0df; border-radius: 9px; font: 700 12px 'DM Sans', sans-serif; }
.text-button { padding: 5px 0; color: var(--apricot-dark); font-size: 12px; font-weight: 700; }
.text-button:hover { text-decoration: underline; }
.danger-text { color: #a65a53; }
.cart-scroll { flex: 1; min-height: 260px; max-height: calc(100vh - 370px); overflow-y: auto; padding: 2px 21px 15px; }
.cart-item { display: grid; grid-template-columns: 43px minmax(0, 1fr) auto; gap: 10px; padding: 14px 0; border-top: 1px solid var(--line); }
.cart-item:first-child { border-top: 0; }
.cart-thumb { width: 43px; height: 43px; overflow: hidden; border-radius: 11px; background: var(--surface-2); }
.cart-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cart-item h4 { overflow: hidden; margin: 0 0 3px; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.cart-meta { color: var(--muted); font-size: 11px; }
.cart-item-total { align-self: start; font-size: 13px; font-weight: 800; white-space: nowrap; }
.stepper { display: inline-flex; align-items: center; margin-top: 7px; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; }
.stepper button { width: 24px; height: 24px; border: 0; color: var(--plum); background: var(--surface-2); font-weight: 800; }
.stepper button:hover { background: #eadfd3; }
.stepper span { min-width: 29px; text-align: center; font-size: 11px; font-weight: 700; }
.cart-footer { padding: 18px 21px 20px; border-top: 1px solid var(--line); background: linear-gradient(180deg, rgba(255,253,249,.65), #fffaf2); }
.bill-line { display: flex; justify-content: space-between; margin: 8px 0; color: var(--muted); font-size: 13px; }
.bill-line strong { color: var(--ink); font-weight: 700; }
.total-line { margin: 14px 0 16px; color: var(--ink); font-size: 16px; }
.total-line strong { font: 700 24px 'Fraunces', Georgia, serif; }
.checkout-button { width: 100%; display: flex; justify-content: space-between; }
.primary-button, .secondary-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 15px; border-radius: 11px; font-weight: 700; transition: transform .18s, background .18s, box-shadow .18s; }
.primary-button { border: 0; color: #fffaf2; background: var(--plum); box-shadow: 0 8px 18px rgba(112, 64, 82, .18); }
.primary-button:hover { background: #5a2f40; transform: translateY(-1px); }
.primary-button:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.secondary-button { border: 1px solid var(--line); color: var(--ink); background: var(--surface); }
.secondary-button:hover { background: var(--surface-2); }
.small-button { min-height: 34px; padding: 0 11px; font-size: 12px; }
.full-width { width: 100%; }
.secure-note { margin: 12px 0 0; color: var(--muted); font-size: 10px; text-align: center; }
.mobile-switcher { display: none; }

.modal-backdrop { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: 24px; background: rgba(46, 39, 36, .46); backdrop-filter: blur(4px); }
.modal-backdrop[hidden] { display: none; }
.modal-card { width: min(560px, 100%); max-height: min(760px, calc(100vh - 48px)); overflow: auto; background: var(--surface); border: 1px solid rgba(255,255,255,.45); border-radius: 24px; box-shadow: 0 24px 80px rgba(46, 39, 36, .24); animation: modal-in .2s ease-out; }
.wide-modal-card { width: min(930px, 100%); }
.modal-header { justify-content: space-between; padding: 23px 25px 18px; }
.modal-header h2 { font-size: 25px; }
.close-button { width: 34px; height: 34px; border-radius: 10px; color: var(--muted); font-size: 26px; line-height: 1; }
.close-button:hover { color: var(--ink); background: var(--surface-2); }
@keyframes modal-in { from { opacity: 0; transform: translateY(8px) scale(.985); } to { opacity: 1; transform: translateY(0) scale(1); } }
.product-modal-card { padding-bottom: 24px; }
.product-modal-content { padding: 0 25px; }
.selector-hero { display: flex; gap: 15px; align-items: center; padding: 0 25px 20px; }
.selector-image { width: 78px; height: 78px; flex: 0 0 auto; overflow: hidden; border-radius: 17px; background: var(--surface-2); }
.selector-image img { width: 100%; height: 100%; object-fit: cover; }
.selector-hero h3 { margin: 0 0 4px; font-size: 19px; }
.selector-hero p { margin: 0; color: var(--muted); font-size: 12px; }
.selector-price { margin-left: auto; color: var(--plum); font: 700 19px 'Fraunces', Georgia, serif; white-space: nowrap; }
.selector-body { padding: 18px 25px 0; border-top: 1px solid var(--line); }
.selector-label { margin-bottom: 10px; color: var(--muted); font-size: 12px; font-weight: 700; }
.quantity-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.quantity-choice { min-height: 43px; border: 1px solid var(--line); border-radius: 11px; color: var(--ink); background: var(--surface); font-size: 12px; font-weight: 700; }
.quantity-choice:hover, .quantity-choice.is-active { color: var(--plum); border-color: #d7b5bf; background: var(--plum-soft); }
.custom-quantity { display: flex; gap: 8px; margin-top: 14px; }
.custom-quantity input { flex: 1; min-width: 0; height: 43px; padding: 0 12px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); }
.quantity-stepper { display: flex; align-items: center; justify-content: center; gap: 14px; width: fit-content; margin: 0 auto 15px; }
.quantity-stepper button { width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 12px; color: var(--plum); background: var(--surface-2); font-size: 22px; font-weight: 700; }
.quantity-stepper strong { min-width: 76px; text-align: center; font-size: 20px; }
.selector-total { display: flex; align-items: end; justify-content: space-between; margin-top: 20px; padding: 15px 0 17px; border-top: 1px solid var(--line); }
.selector-total span { color: var(--muted); font-size: 12px; }
.selector-total strong { font: 700 26px 'Fraunces', Georgia, serif; }

.checkout-layout { display: grid; grid-template-columns: .9fr 1.1fr; gap: 26px; padding: 2px 25px 27px; }
.checkout-summary { padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface-2); }
.checkout-summary .summary-heading { display: flex; justify-content: space-between; margin-bottom: 14px; font-weight: 800; }
.summary-item { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-top: 1px solid rgba(232, 221, 209, .8); color: var(--muted); font-size: 12px; }
.summary-item strong { color: var(--ink); }
.summary-total { display: flex; justify-content: space-between; margin-top: 13px; padding-top: 13px; border-top: 1px solid var(--line); font-weight: 800; }
.summary-total strong { color: var(--plum); font: 700 24px 'Fraunces', Georgia, serif; }
.payment-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 5px; margin-bottom: 16px; background: var(--surface-2); border-radius: 12px; }
.payment-tab { min-height: 38px; border: 0; border-radius: 9px; color: var(--muted); background: transparent; font-size: 12px; font-weight: 700; }
.payment-tab.is-active { color: var(--plum); background: var(--surface); box-shadow: var(--shadow-soft); }
.payment-panel { min-height: 185px; }
.payment-copy { margin: 0 0 13px; color: var(--muted); font-size: 12px; }
.field-label { display: block; margin-bottom: 6px; color: var(--muted); font-size: 11px; font-weight: 700; }
.money-input { display: flex; align-items: center; gap: 8px; height: 50px; padding: 0 14px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); }
.money-input span { color: var(--muted); font-size: 17px; }
.money-input input { width: 100%; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 20px; font-weight: 800; }
.change-card { display: flex; justify-content: space-between; margin-top: 12px; padding: 13px 14px; border-radius: 12px; color: var(--sage); background: var(--sage-soft); font-size: 12px; font-weight: 700; }
.change-card.is-due { color: #b05e44; background: #fff0df; }
.upi-select { width: 100%; height: 45px; padding: 0 12px; border: 1px solid var(--line); border-radius: 11px; color: var(--ink); background: var(--surface); }
.qr-card { display: flex; align-items: center; gap: 13px; margin-top: 13px; padding: 10px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface-2); }
.qr-card img { width: 112px; height: 112px; display: block; border-radius: 6px; background: white; }
.qr-card strong { display: block; margin: 3px 0; font-size: 13px; word-break: break-all; }
.qr-card p { margin: 0; color: var(--muted); font-size: 11px; }
.card-placeholder { display: grid; place-items: center; min-height: 155px; padding: 24px; border: 1px dashed var(--line); border-radius: 14px; color: var(--muted); text-align: center; }
.card-placeholder .card-mark { display: grid; place-items: center; width: 46px; height: 30px; margin-bottom: 8px; border-radius: 7px; color: #fff; background: var(--plum); font-size: 12px; font-weight: 800; }

.form-section { padding: 0 25px 22px; }
.logo-upload-panel { display: flex; align-items: center; gap: 15px; padding: 13px; margin-bottom: 17px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface-2); }
.logo-preview { width: 118px; height: 58px; display: grid; place-items: center; flex: 0 0 auto; overflow: hidden; border: 1px dashed #d5c5b8; border-radius: 11px; color: #fffaf2; background: var(--plum); font: 700 27px 'Fraunces', serif; }
.settings-logo { width: 100%; height: 100%; display: block; object-fit: contain; background: var(--surface); }
.logo-upload-copy { min-width: 0; }
.logo-upload-copy strong { font-size: 13px; }
.logo-upload-copy p { margin: 3px 0 8px; color: var(--muted); font-size: 11px; }
.logo-upload-actions { display: flex; align-items: center; gap: 12px; }
.upload-button { position: relative; overflow: hidden; cursor: pointer; }
.logo-dimensions { display: block; margin-top: 7px; color: var(--plum); font-size: 10px; font-weight: 700; }
.section-title { gap: 11px; margin-bottom: 16px; }
.section-title > div { flex: 1; }
.section-title strong { font-size: 14px; }
.section-title p { margin: 2px 0 0; color: var(--muted); font-size: 11px; }
.section-number { color: var(--apricot-dark); font-size: 11px; font-weight: 800; letter-spacing: .12em; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 13px; }
.form-grid label, .product-form label { display: grid; gap: 6px; color: var(--muted); font-size: 11px; font-weight: 700; }
.form-grid input, .form-grid textarea, .form-grid select, .product-form input, .product-form textarea, .product-form select { width: 100%; min-width: 0; padding: 11px 12px; resize: vertical; border: 1px solid var(--line); border-radius: 10px; outline: 0; color: var(--ink); background: var(--surface); font-size: 13px; font-weight: 500; }
.form-grid input:focus, .form-grid textarea:focus, .form-grid select:focus, .product-form input:focus, .product-form textarea:focus, .product-form select:focus { border-color: var(--apricot); }
.span-2 { grid-column: span 2; }
.modal-footer { justify-content: flex-end; gap: 9px; padding: 17px 25px 0; border-top: 1px solid var(--line); }
.upi-table { overflow: hidden; border: 1px solid var(--line); border-radius: 13px; }
.upi-row { display: grid; grid-template-columns: 1.1fr 1.5fr 34px 34px; gap: 7px; align-items: center; padding: 9px 10px; border-top: 1px solid var(--line); }
.upi-row:first-child { border-top: 0; }
.upi-row input { width: 100%; min-width: 0; padding: 8px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: var(--surface); font-size: 12px; }
.upi-row button { width: 30px; height: 30px; border: 0; border-radius: 8px; color: var(--muted); background: transparent; }
.upi-row button:hover { color: var(--plum); background: var(--surface-2); }
.upi-row .primary-radio { accent-color: var(--apricot); }

.menu-modal-card { min-height: 600px; }
.menu-layout { display: grid; grid-template-columns: .95fr 1.05fr; gap: 0; min-height: 480px; }
.menu-list-column { padding: 0 25px 22px; border-right: 1px solid var(--line); }
.menu-list-toolbar { justify-content: space-between; margin-bottom: 10px; }
.menu-row { display: flex; align-items: center; gap: 9px; padding: 10px 0; border-top: 1px solid var(--line); }
.menu-row.is-selected { padding: 10px 9px; margin: 0 -9px; border-radius: 10px; background: var(--surface-2); }
.menu-row-image { width: 35px; height: 35px; overflow: hidden; flex: 0 0 auto; border-radius: 9px; background: var(--surface-2); }
.menu-row-image img { width: 100%; height: 100%; object-fit: cover; }
.menu-row-copy { min-width: 0; flex: 1; }
.menu-row-copy strong { display: block; overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.menu-row-copy span { color: var(--muted); font-size: 10px; }
.menu-row-actions { display: flex; gap: 2px; }
.menu-row-actions button { padding: 5px; border: 0; color: var(--muted); background: transparent; font-size: 12px; }
.menu-row-actions button:hover { color: var(--apricot-dark); }
.csv-actions { display: flex; gap: 13px; padding-top: 13px; margin-top: 9px; border-top: 1px solid var(--line); }
.csv-actions .text-button { font-size: 11px; }
.product-form { padding: 0 25px 22px; }
.product-form .form-section { padding: 0 0 20px; }

.sales-list { padding: 0 25px 25px; }
.sales-row { display: grid; grid-template-columns: 90px minmax(0, 1fr) auto auto; gap: 14px; align-items: center; padding: 14px 0; border-top: 1px solid var(--line); }
.sales-row:first-child { border-top: 0; }
.sales-id { color: var(--plum); font-weight: 800; }
.sales-date { color: var(--muted); font-size: 11px; }
.sales-items { color: var(--muted); font-size: 12px; }
.sales-total { font-weight: 800; white-space: nowrap; }
.sales-view { padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; color: var(--plum); background: var(--surface); font-size: 11px; font-weight: 700; }
.sales-view:hover { background: var(--plum-soft); }

.receipt-modal-card { width: min(510px, 100%); }
.receipt-modal-card .modal-header { padding-bottom: 15px; }
.receipt-actions { gap: 10px; }
#print-receipt-area { width: 80mm; max-width: 100%; padding: 20px 14px 18px; margin: 0 auto 24px; color: #171311; background: #fff; border: 1px dashed #ded6ce; font-family: 'DM Sans', Arial, sans-serif; font-size: 11px; }
.receipt-brand { text-align: center; }
.receipt-brand .receipt-seal { width: 30px; height: 30px; display: grid; place-items: center; margin: 0 auto 7px; border-radius: 9px 9px 9px 3px; color: #fff; background: #704052; font: 700 18px 'Fraunces', Georgia, serif; }
.receipt-logo { width: 54mm; max-height: 18mm; display: block; object-fit: contain; margin: 0 auto 7px; }
.receipt-brand h3 { margin: 0; font: 700 17px 'Fraunces', Georgia, serif; }
.receipt-brand p { margin: 3px 0; color: #6f655e; font-size: 9px; white-space: pre-line; }
.receipt-rule { height: 1px; margin: 12px 0; background: #d9d0c8; }
.receipt-meta { display: flex; justify-content: space-between; gap: 10px; color: #6f655e; font-size: 9px; }
.receipt-lines { margin: 10px 0; }
.receipt-line { display: grid; grid-template-columns: 1fr auto; gap: 9px; padding: 4px 0; }
.receipt-line small { display: block; color: #6f655e; font-size: 9px; }
.receipt-line strong { font-size: 10px; }
.receipt-total-line { display: flex; justify-content: space-between; padding: 4px 0; }
.receipt-total-line.grand { margin-top: 5px; padding-top: 8px; border-top: 1px solid #171311; font-size: 13px; font-weight: 800; }
.receipt-footer { margin-top: 15px; text-align: center; color: #6f655e; font-size: 9px; }

.toast-stack { position: fixed; right: 24px; bottom: 24px; z-index: 40; display: grid; gap: 9px; max-width: min(320px, calc(100vw - 48px)); }
.toast { padding: 12px 14px; color: #fffaf2; background: var(--ink); border-radius: 11px; box-shadow: var(--shadow); font-size: 12px; animation: toast-in .22s ease-out; }
.toast.success { background: var(--sage); }
.toast.warn { background: var(--apricot-dark); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 1060px) {
  .app-frame { padding: 0 20px 24px; }
  .workspace { grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; }
  .product-grid { grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); }
  .button-label { display: none; }
}

@media (max-width: 760px) {
  .app-frame { padding: 0 13px 18px; }
  .topbar { height: 68px; }
  .brand-lockup h1 { font-size: 18px; }
  .brand-seal { width: 34px; height: 34px; font-size: 20px; }
  .topbar-actions { gap: 2px; }
  .status-pill { display: none; }
  .icon-button { padding: 8px; font-size: 17px; }
  .mobile-switcher { position: sticky; top: 0; z-index: 10; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 10px 0; background: rgba(251,247,240,.96); backdrop-filter: blur(8px); }
  .mobile-tab { min-height: 40px; border: 1px solid var(--line); border-radius: 11px; color: var(--muted); background: var(--surface); font-size: 12px; font-weight: 700; }
  .mobile-tab.is-active { color: var(--plum); border-color: #d7b5bf; background: var(--plum-soft); }
  .workspace { display: block; padding-top: 20px; }
  .catalog-heading { align-items: flex-start; margin-bottom: 18px; }
  h2 { font-size: 28px; }
  .date-card { min-width: 112px; padding: 9px; }
  .stats-row { gap: 7px; margin-bottom: 17px; }
  .stat-card { padding: 10px 8px; gap: 6px; }
  .stat-icon { width: 27px; height: 27px; font-size: 13px; }
  .stat-card strong { font-size: 13px; }
  .stat-label { font-size: 9px; }
  .catalog-toolbar { display: block; }
  .category-tabs { margin-top: 9px; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .product-image { height: 106px; }
  .product-body { padding: 10px; }
  .product-body h3 { font-size: 13px; }
  .product-description { min-height: 32px; font-size: 10px; }
  .price-value { font-size: 14px; }
  .cart-panel { position: static; min-height: calc(100vh - 155px); box-shadow: none; }
  body.mobile-cart .catalog-panel { display: none; }
  body.mobile-products .cart-panel { display: none; }
  body.mobile-products .catalog-panel { display: block; }
  .cart-scroll { max-height: none; }
  .modal-backdrop { padding: 12px; align-items: end; }
  .modal-card { max-height: calc(100vh - 24px); border-radius: 20px 20px 12px 12px; }
  .modal-header { padding: 18px 18px 14px; }
  .modal-header h2 { font-size: 23px; }
  .selector-hero, .selector-body, .form-section, .modal-footer, .checkout-layout, .sales-list, .product-form, .menu-list-column { padding-left: 18px; padding-right: 18px; }
  .checkout-layout { display: block; padding-bottom: 20px; }
  .checkout-summary { margin-bottom: 16px; }
  .menu-layout { display: block; }
  .menu-list-column { border-right: 0; border-bottom: 1px solid var(--line); }
  .product-form { padding-top: 18px; }
  .sales-row { grid-template-columns: 1fr auto; gap: 4px 10px; }
  .sales-id, .sales-items { grid-column: 1; }
  .sales-total, .sales-view { grid-column: 2; grid-row: span 2; align-self: center; }
  .sales-view { grid-row: 2; }
  .upi-row { grid-template-columns: 1fr 1fr 30px 30px; }
  .toast-stack { right: 13px; bottom: 13px; max-width: calc(100vw - 26px); }
}

@media print {
  @page { size: 80mm auto; margin: 0; }
  html, body { width: 80mm; min-width: 80mm; margin: 0; padding: 0; background: #fff; }
  body * { visibility: hidden !important; }
  #print-receipt-area, #print-receipt-area * { visibility: visible !important; }
  #print-receipt-area { position: absolute; left: 0; top: 0; width: 80mm; min-height: 0; max-width: none; padding: 5mm 4mm 4mm; margin: 0; border: 0; box-shadow: none; }
}
