@font-face {
  font-family: 'Manrope';
  src: url('manrope-latin.woff2') format('woff2');
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
}

:root {
  --font-sans: 'Manrope', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  
  /* FnB Culinary Warmth: Warm Vanilla Cream, Bakery Parchment & Rich Espresso */
  --bg-app: #faf6f0;
  --bg-surface: #ffffff;
  --bg-subtle: #fffdfa;
  --bg-muted: #f5ede2;
  
  --text-primary: #231815;      /* Deep roasted espresso */
  --text-secondary: #4a3b35;    /* Rich cocoa */
  --text-muted: #85726a;        /* Warm roasted taupe */
  --text-subtle: #a8968e;
  
  /* FnB Signature Palettes: Bistro Red, Honey Gold, Herb Green & Espresso */
  --fnb-red: #c23326;
  --fnb-red-hover: #a82418;
  --fnb-red-soft: #fff1ef;
  --fnb-red-border: #fecdc9;
  
  --fnb-yellow: #d97706;
  --fnb-yellow-hover: #b45309;
  --fnb-yellow-soft: #fef8eb;
  --fnb-yellow-border: #fed7aa;
  
  --fnb-green: #15803d;
  --fnb-green-soft: #f0fdf4;
  --fnb-green-border: #bbf7d0;
  
  --fnb-espresso: #231815;
  --fnb-espresso-hover: #362520;
  
  --border-light: #f6efe6;
  --border-default: #e9dfd3;
  --border-strong: #d5c6b6;
  
  --shadow-sm: 0 1px 3px 0 rgba(77, 43, 30, 0.05);
  --shadow-md: 0 4px 8px -1px rgba(77, 43, 30, 0.07), 0 2px 4px -2px rgba(77, 43, 30, 0.05);
  --shadow-card: 0 20px 45px -15px rgba(60, 32, 22, 0.09), 0 0 1px 1px rgba(60, 32, 22, 0.05);
  --shadow-floating: 0 12px 36px -4px rgba(60, 32, 22, 0.14), 0 0 0 1px rgba(60, 32, 22, 0.06);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
}

*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  background-color: var(--bg-app);
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button, input {
  font-family: inherit;
  font-size: inherit;
}

button, a, input {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  cursor: pointer;
  border: 0;
  background: none;
  color: inherit;
}

button:disabled {
  cursor: wait;
  opacity: 0.6;
}

a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid var(--fnb-red);
  outline-offset: 3px;
}

svg {
  flex-shrink: 0;
  vertical-align: middle;
}

h1, h2, h3, h4, p, dl, dd {
  margin: 0;
}

[hidden] {
  display: none !important;
}

/* Header & Navigation */
.site-header {
  background: rgba(255, 253, 250, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-default);
  position: sticky;
  top: 0;
  z-index: 40;
}

.header-inner {
  max-width: 1040px;
  margin: 0 auto;
  height: 68px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 24px;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.brand-link:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}

.brand-logo {
  height: 38px;
  width: auto;
  object-fit: contain;
  display: block;
}

.header-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.3px;
  color: var(--text-primary);
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  padding: 8px 14px;
  border-radius: 999px;
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px rgba(60, 32, 22, 0.04);
}

.header-label:hover {
  background: #ffffff;
  border-color: var(--fnb-yellow);
  box-shadow: var(--shadow-sm);
  color: var(--fnb-red);
}

.header-label svg {
  width: 14px;
  height: 14px;
  color: var(--fnb-red);
}

/* Page Container */
.page-shell {
  max-width: 1040px;
  margin: 0 auto;
  padding: 32px 24px 80px;
}

/* Demo Banner */
.demo-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--fnb-yellow-soft);
  border: 1px solid var(--fnb-yellow-border);
  color: #92400e;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.demo-banner svg {
  width: 16px;
  height: 16px;
  color: var(--fnb-yellow);
}

/* Buttons */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: var(--radius-md);
  min-height: 46px;
  padding: 11px 22px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid transparent;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

.button svg {
  width: 16px;
  height: 16px;
}

.button.primary {
  background-color: var(--fnb-espresso);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(35, 24, 21, 0.2);
}

.button.primary:hover {
  background-color: var(--fnb-red);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(194, 51, 38, 0.25);
}

.button.secondary {
  background-color: #ffffff;
  color: var(--text-primary);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}

.button.secondary:hover {
  background-color: var(--bg-subtle);
  border-color: var(--fnb-yellow);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  color: var(--fnb-red);
}

/* Receipt Paper / Card */
.receipt-layout {
  display: flex;
  justify-content: center;
  width: 100%;
}

.receipt-paper {
  position: relative;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  padding: 36px 36px 32px;
  width: 100%;
  max-width: 660px;
  min-width: 0;
  overflow: hidden;
  transition: box-shadow 0.2s ease;
}

/* Appetizing multi-color culinary header line (Red + Golden Amber) */
.paper-topline {
  position: absolute;
  height: 5px;
  background: linear-gradient(90deg, var(--fnb-red) 0%, var(--fnb-yellow) 50%, var(--fnb-red) 100%);
  top: -1px;
  left: -1px;
  right: -1px;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

/* Brand badge inside card */
.receipt-top-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-light);
}

.receipt-card-logo {
  height: 36px;
  width: auto;
  object-fit: contain;
}

.receipt-status-badge {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.2px;
  color: var(--fnb-red);
  background: var(--fnb-red-soft);
  border: 1px solid var(--fnb-red-border);
  padding: 5px 11px;
  border-radius: 999px;
  text-transform: uppercase;
}

/* Receipt Head */
.receipt-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.eyebrow {
  display: block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--fnb-yellow-hover);
  margin-bottom: 4px;
}

.receipt-head h2 {
  font-size: 23px;
  font-weight: 800;
  letter-spacing: -0.6px;
  color: var(--text-primary);
}

.print-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-subtle);
  border: 1px solid var(--border-default);
  padding: 7px 13px;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
}

.print-button:hover {
  background: #ffffff;
  border-color: var(--fnb-yellow);
  color: var(--fnb-red);
}

.print-button svg {
  width: 14px;
  height: 14px;
}

/* Outlet info block */
.outlet-block {
  display: flex;
  gap: 14px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  margin-bottom: 22px;
}

.outlet-icon {
  width: 40px;
  height: 40px;
  background: #fffaf5;
  border: 1px solid var(--fnb-yellow-border);
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: var(--fnb-red);
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(77, 43, 30, 0.04);
}

.outlet-icon svg {
  width: 19px;
  height: 19px;
}

.outlet-block h3 {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.outlet-block p {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Meta Grid */
.receipt-meta {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 0 0 26px;
}

.receipt-meta > div {
  background: #ffffff;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.receipt-meta dt {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.receipt-meta dd {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
  word-break: break-word;
}

.mono {
  font-family: var(--font-mono);
  font-size: 11px !important;
  letter-spacing: 0.2px;
}

.meta-time {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Items Section */
.items-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.items-heading h3 {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.items-count {
  font-size: 11px;
  font-weight: 700;
  color: var(--fnb-yellow-hover);
  background: var(--fnb-yellow-soft);
  border: 1px solid var(--fnb-yellow-border);
  padding: 3px 10px;
  border-radius: 999px;
}

.items-table table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.items-table th {
  background: var(--bg-muted);
  color: var(--text-secondary);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 10px 12px;
  text-align: left;
}

.items-table th:first-child {
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  width: 55%;
}

.quantity-col {
  width: 15%;
  text-align: center !important;
}

.items-table th:last-child {
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  width: 30%;
  text-align: right;
}

.right {
  text-align: right !important;
}

.items-table td {
  padding: 14px 10px;
  border-bottom: 1px solid var(--border-light);
  vertical-align: top;
}

.items-table td:first-child {
  padding-left: 2px;
}

.items-table td:last-child {
  padding-right: 2px;
}

.items-table strong {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.5;
  overflow-wrap: break-word;
}

.item-note {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 3px;
  overflow-wrap: break-word;
}

/* Warm appetising food discount badge */
.item-discount {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  color: var(--fnb-red);
  background: var(--fnb-red-soft);
  border: 1px solid var(--fnb-red-border);
  padding: 2px 7px;
  border-radius: 4px;
  margin-top: 4px;
}

/* Golden honey pastry pill */
.qty-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 24px;
  padding: 0 6px;
  background: var(--fnb-yellow-soft);
  color: var(--fnb-yellow-hover);
  border: 1px solid var(--fnb-yellow-border);
  font-size: 11px;
  font-weight: 800;
  border-radius: 6px;
  font-variant-numeric: tabular-nums;
}

.item-total {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* Order Discounts */
.discount-note {
  background: #fff7ed;
  border: 1px solid var(--fnb-yellow-border);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin-top: 16px;
  font-size: 12px;
  color: #9a3412;
}

.discount-note strong {
  display: block;
  font-weight: 800;
  margin-bottom: 4px;
}

.discount-note span {
  display: block;
  margin-top: 2px;
}

.discount-note small {
  display: block;
  color: #c2410c;
  font-size: 10px;
  margin-top: 6px;
}

/* Totals Breakdown */
.totals {
  padding-top: 20px;
}

.total-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 10px;
  font-size: 13px;
  color: var(--text-muted);
}

.total-line span:last-child {
  color: var(--text-primary);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.total-line.discount-line, .total-line.discount-line span:last-child {
  color: var(--fnb-red);
  font-weight: 700;
}

/* Grand Total (Deep Roasted Espresso with Golden Honey Border & Accents) */
.grand-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: linear-gradient(135deg, #2b1c18 0%, #1d1310 100%);
  color: #ffffff;
  margin: 18px 0 0;
  padding: 18px 22px;
  border-radius: var(--radius-md);
  border-left: 5px solid var(--fnb-yellow);
  box-shadow: 0 6px 18px rgba(35, 24, 21, 0.2);
}

.grand-total span {
  font-size: 13px;
  font-weight: 700;
  color: #fde68a;
  display: block;
  letter-spacing: 0.2px;
}

.grand-total small {
  font-size: 10px;
  color: #d1b8af;
  display: block;
  margin-top: 3px;
}

.grand-total strong {
  font-size: 26px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.8px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.reconciliation-note {
  font-size: 11px;
  color: #92400e;
  background: var(--fnb-yellow-soft);
  border: 1px solid var(--fnb-yellow-border);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  margin-top: 12px;
  line-height: 1.5;
}

/* Payment Section */
.payment-section {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px dashed var(--border-default);
}

.payment-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.payment-title svg {
  width: 16px;
  height: 16px;
  color: var(--fnb-red);
}

.payment-title h3 {
  font-size: 12px;
  font-weight: 800;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.payment-line {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 13px;
  margin: 8px 0;
  color: var(--text-secondary);
}

.payment-line strong {
  font-weight: 700;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

.payment-line.muted {
  font-size: 12px;
  color: var(--text-muted);
}

/* Ticket Cutout / Tail */
.receipt-ticket-tail {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 28px -36px 20px;
  height: 24px;
}

.ticket-cutout {
  position: absolute;
  width: 20px;
  height: 20px;
  background: var(--bg-app);
  border-radius: 50%;
  top: 2px;
}

.ticket-cutout.left {
  left: -10px;
  box-shadow: inset -1px 0 0 var(--border-default);
}

.ticket-cutout.right {
  right: -10px;
  box-shadow: inset 1px 0 0 var(--border-default);
}

.ticket-dash {
  width: 100%;
  height: 1px;
  border-bottom: 1px dashed var(--border-default);
}

.receipt-end-note {
  text-align: center;
  padding-top: 6px;
}

.receipt-end-note p {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
}

.receipt-end-note small {
  display: block;
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Mobile Actions (Sticky Bottom on small screens) */
.mobile-actions {
  display: none;
}

/* Help & Footer */
.landing-help {
  max-width: 660px;
  margin: 32px auto 0;
  padding: 24px 20px;
  background: #ffffff;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
}

.landing-help p {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.landing-help a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--fnb-red);
  font-size: 13px;
  font-weight: 700;
  transition: color 0.15s ease;
}

.landing-help a:hover {
  color: var(--fnb-red-hover);
  text-decoration: underline;
}

.landing-help a svg {
  width: 14px;
  height: 14px;
}

.landing-footer {
  background: var(--fnb-espresso);
  color: #c9b9b3;
  text-align: center;
  padding: 24px 20px 22px;
  margin-top: 24px;
  border-top: 2px solid var(--fnb-yellow);
}

.landing-footer .footer-inner {
  max-width: 480px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.landing-footer .footer-logo-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  padding: 4px 10px;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.landing-footer a.footer-brand:hover .footer-logo-wrap {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(217, 119, 6, 0.35);
}

.landing-footer .footer-logo {
  height: 24px;
  width: auto;
  display: block;
}

.landing-footer p {
  font-size: 13px;
  color: #f7ebe6;
  line-height: 1.4;
  margin: 2px 0 0;
}

.landing-footer p em {
  font-style: normal;
  color: #fca5a5;
  font-weight: 600;
}

.landing-footer small {
  font-size: 11px;
  color: #9c8a84;
}

/* Modal Dialog */
dialog {
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  padding: 32px;
  max-width: 440px;
  width: calc(100% - 32px);
  color: var(--text-primary);
  background: #ffffff;
  box-shadow: 0 25px 50px -12px rgba(35, 24, 21, 0.28);
  position: fixed;
  inset: 0;
  margin: auto;
}

dialog::backdrop {
  background: rgba(35, 24, 21, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.close-dialog {
  position: absolute;
  right: 18px;
  top: 18px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--text-muted);
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  transition: all 0.15s ease;
}

.close-dialog:hover {
  background: var(--bg-muted);
  color: var(--text-primary);
}

.close-dialog svg {
  width: 14px;
  height: 14px;
}

.dialog-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--fnb-red-soft);
  color: var(--fnb-red);
  display: grid;
  place-items: center;
  margin-bottom: 16px;
  border: 1px solid var(--fnb-red-border);
}

.dialog-icon svg {
  width: 22px;
  height: 22px;
}

dialog h2 {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.dialog-intro {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 22px;
}

label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}

input[type=email] {
  width: 100%;
  border: 1px solid var(--border-strong);
  background: #ffffff;
  border-radius: var(--radius-md);
  padding: 12px 14px;
  color: var(--text-primary);
  font-size: 14px;
  transition: all 0.15s ease;
}

input[type=email]:focus {
  border-color: var(--fnb-red);
  box-shadow: 0 0 0 3px rgba(194, 51, 38, 0.1);
}

.field-hint {
  font-size: 11px;
  color: var(--text-muted);
  margin: 6px 0 18px;
}

form .button {
  width: 100%;
}

.dialog-actions {
  display: flex;
  gap: 10px;
}

.dialog-actions .button {
  flex: 1;
}

#email-destination {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  background: var(--bg-subtle);
  border: 1px solid var(--border-default);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  margin: 8px 0 12px;
  word-break: break-all;
}

#email-result {
  font-size: 13px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  margin-top: 16px;
  background: var(--fnb-green-soft);
  color: #14532d;
  border: 1px solid var(--fnb-green-border);
  font-weight: 600;
}

#email-result.error {
  background: var(--fnb-red-soft);
  color: #991b1b;
  border-color: var(--fnb-red-border);
}

.email-unavailable {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: var(--bg-subtle);
  border: 1px solid var(--border-default);
  padding: 14px;
  border-radius: var(--radius-md);
  margin-bottom: 18px;
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.email-unavailable svg {
  width: 18px;
  height: 18px;
  color: var(--fnb-yellow);
  margin-top: 2px;
}

/* ==========================================================
   RESPONSIVE DESIGN (Mobile First & Modern Breakpoints)
   ========================================================== */

@media (max-width: 720px) {
  .header-inner {
    height: 60px;
    padding: 0 16px;
  }
  
  .brand-logo {
    height: 32px;
  }
  
  .header-label {
    font-size: 11px;
    padding: 6px 12px;
  }
  
  .page-shell {
    padding: 20px 14px 96px; /* Ensure floating bar doesn't overlap */
  }
  
  .receipt-paper {
    padding: 24px 18px 22px;
    border-radius: var(--radius-lg);
  }
  
  .paper-topline {
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  }
  
  .receipt-card-logo {
    height: 30px;
  }
  
  .receipt-meta {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  
  .receipt-meta > div {
    padding: 8px 10px;
  }
  
  .receipt-ticket-tail {
    margin: 22px 0 16px;
  }
  
  .ticket-cutout {
    display: none;
  }
  
  .items-table th:first-child {
    width: 52%;
  }
  
  .quantity-col {
    width: 16%;
  }
  
  .items-table th:last-child {
    width: 32%;
  }
  
  .grand-total {
    padding: 16px 16px;
  }
  
  .grand-total strong {
    font-size: 22px;
  }
  
  .mobile-actions {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    gap: 10px;
    background: rgba(255, 253, 250, 0.94);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 12px 16px max(14px, env(safe-area-inset-bottom));
    border-top: 1px solid var(--border-default);
    box-shadow: 0 -8px 24px rgba(60, 32, 22, 0.1);
    z-index: 50;
  }
  
  .mobile-actions .button {
    flex: 1;
    min-height: 48px;
    font-size: 13px;
  }
  
  .landing-footer {
    padding: 20px 16px 88px; /* Compact mobile space with room for floating action bar */
    margin-top: 20px;
  }
  
  .landing-footer p {
    font-size: 12px;
  }
  
  .landing-footer small {
    font-size: 10px;
  }
}

@media (max-width: 480px) {
  .receipt-head h2 {
    font-size: 19px;
  }
  
  .items-table td {
    padding: 12px 6px;
  }
  
  .items-table strong {
    font-size: 12px;
  }
  
  .item-total {
    font-size: 12px;
  }
  
  .grand-total strong {
    font-size: 20px;
  }
}

@media (max-width: 350px) {
  .header-inner {
    padding: 0 12px;
  }
  
  .brand-logo {
    height: 28px;
  }
  
  .receipt-paper {
    padding: 20px 12px 18px;
  }
  
  .grand-total {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
}

/* Print Styles */
@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
  }
  
  .site-header,
  .landing-hero,
  .print-button,
  .mobile-actions,
  .landing-help,
  .landing-footer,
  dialog {
    display: none !important;
  }
  
  .page-shell,
  .invoice-detail-section {
    padding: 0 !important;
    margin: 0 !important;
    max-width: none !important;
  }
  
  .receipt-paper {
    box-shadow: none !important;
    border: 0 !important;
    padding: 0 !important;
    max-width: 100% !important;
  }
  
  .paper-topline {
    display: none !important;
  }
  
  .receipt-ticket-tail {
    display: none !important;
  }
  
  .grand-total {
    background: #f1f5f9 !important;
    color: #000000 !important;
    border: 1px solid #000000 !important;
  }
  
  .grand-total span,
  .grand-total small,
  .grand-total strong {
    color: #000000 !important;
  }
  
  * {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}



/* Office has no table card: center the available metadata cards. */
.receipt-meta.receipt-meta-office {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}
.receipt-meta-office > div {
  flex: 0 1 calc((100% - 24px) / 3);
  min-width: 0;
  text-align: center;
}
@media (max-width: 600px) {
  .receipt-meta-office > div { flex-basis: calc((100% - 8px) / 2); }
}
