@font-face { font-family: Inter; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/inter-400.ttf") format("truetype"); }
@font-face { font-family: Inter; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/inter-600.ttf") format("truetype"); }
@font-face { font-family: Inter; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/inter-700.ttf") format("truetype"); }
@font-face { font-family: Inter; font-style: normal; font-weight: 800; font-display: swap; src: url("fonts/inter-800.ttf") format("truetype"); }
@font-face { font-family: Poppins; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/poppins-600.ttf") format("truetype"); }
@font-face { font-family: Poppins; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/poppins-700.ttf") format("truetype"); }

:root {
  color-scheme: light dark;
  --text: #1e293b;
  --blue: #c2410c;
  --muted: var(--text-muted);
  --line: var(--border-color);
  --surface: var(--bg-surface);
  --table-heading: var(--bg-surface-subtle);
  --total-background: #172a3a;
  --total-text: #fff;
  --total-label: #d4e3ef;
  --status-border: #cfe7de;
  --status-background: #effaf5;
  --status-text: #236b50;
  --notice-background: #fff7e8;
  --notice-border: #f7dfb4;
  --shadow: #19314d0c;
}

html.dark {
    --text: #f1f5f9;
    --blue: #fb923c;
    --total-background: #172a3a;
    --total-label: #c1d4e4;
    --status-border: #3d755d;
    --status-background: #203f33;
    --status-text: #a6e8c7;
    --notice-background: #3a3020;
    --notice-border: #80693d;
    --shadow: #0003;
}
html.dark .brand-wordmark { background: #f8fafc; padding: 6px; border-radius: 6px; }
/* Match the slate-950 body override in website/base.html. */
html.dark body { background: #020617; }

* { box-sizing: border-box; }
body {
  margin: 0;
  color: var(--text);
  font: 15px/1.6 var(--font-sans);
  background: var(--bg-page);
  min-height: 100vh;
}
.receipt-shell { max-width: 860px; margin: auto; padding: 35px 22px; }
.brand { display: flex; align-items: center; gap: 12px; margin: 0 10px 24px; }
.brand-symbol { width: 45px; height: 45px; object-fit: contain; }
.brand-wordmark { width: 150px; height: auto; }
.brand-label { margin-left: auto; font-size: 12px; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; }
.receipt-card { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 34px; box-shadow: 0 16px 60px var(--shadow); overflow: hidden; }
.receipt-heading { display: flex; gap: 18px; align-items: flex-start; justify-content: space-between; }
h1 { font-size: clamp(23px, 5vw, 32px); line-height: 1.2; margin: 5px 0 8px; overflow-wrap: anywhere; }
h2 { font-size: 16px; margin: 26px 0 13px; }
h1, h2 { font-family: var(--font-heading); }
.eyebrow { font-size: 10px; font-weight: 750; letter-spacing: .16em; color: var(--blue); margin: 0; }
.muted { color: var(--muted); margin: 0; }
.status { border: 1px solid var(--status-border); background: var(--status-background); color: var(--status-text); border-radius: 20px; padding: 5px 11px; font-size: 11px; white-space: nowrap; }
.purchase-total { display: flex; justify-content: space-between; align-items: center; gap: 15px; background: var(--total-background); color: var(--total-text); padding: 22px; border-radius: 14px; margin: 25px 0; }
.purchase-total span { font-size: 13px; color: var(--total-label); }
.purchase-total strong { font-size: clamp(23px, 5vw, 32px); font-variant-numeric: tabular-nums; white-space: nowrap; }
dl { margin: 0; }
.details { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; font-size: 13px; }
.details > div { min-width: 0; overflow-wrap: anywhere; }
.details dt { color: var(--muted); font-size: 11px; }
.details dd { margin: 2px 0 0; }
.receipt-reference { grid-column: 1/-1; }
.receipt-reference dd { font-size: 11px; overflow-wrap: anywhere; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { text-align: right; font-size: 10px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); background: var(--table-heading); padding: 12px; }
td { padding: 15px 12px; text-align: right; border-top: 1px solid var(--line); font-variant-numeric: tabular-nums; vertical-align: top; }
th:first-child, td:first-child { text-align: left; min-width: 180px; }
td:not(:first-child) { white-space: nowrap; }
td strong { font-weight: 600; overflow-wrap: anywhere; }
small { display: block; color: var(--muted); font-size: 10px; margin-top: 5px; }
.table-note { font-size: 11px; color: var(--muted); }
.totals { max-width: 390px; margin: 26px 0 0 auto; font-size: 13px; }
.totals div { display: flex; justify-content: space-between; gap: 18px; padding: 7px 0; }
.totals dt, .totals dd { min-width: 0; overflow-wrap: anywhere; }
.totals dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.total-row { font-size: 16px; font-weight: 750; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 9px 0; padding: 13px 0 !important; }
.notice { font-size: 12px; background: var(--notice-background); border: 1px solid var(--notice-border); padding: 12px; border-radius: 8px; }
.receipt-footer { margin-top: 30px; text-align: center; border-top: 1px dashed var(--line); padding-top: 16px; }
.receipt-footer p { font-size: 13px; font-weight: 600; }
.privacy-note, .platform-footer { font-size: 11px; text-align: center; color: var(--muted); margin: 20px 10px; }
.platform-footer { display: flex; justify-content: center; align-items: center; gap: 8px; }
.platform-footer img { object-fit: contain; flex-shrink: 0; }
.empty-state { text-align: center; padding: 55px 30px; }
.empty-state p { color: var(--muted); max-width: 410px; margin: 18px auto 0; }
.shop-identity { display: flex; align-items: center; gap: 18px; min-width: 0; }
.shop-identity > div { min-width: 0; }
.shop-logo { width: 80px; height: 80px; object-fit: contain; flex-shrink: 0; border-radius: 12px; background: #fff; padding: 6px; }
.shop-details { margin-top: 18px; font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.shop-details p { margin: 2px 0; }
.shop-address { white-space: pre-line; }
.shop-details dl { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 18px; margin-top: 12px; }
.shop-details dl > div { min-width: 0; }
.shop-details dt { font-weight: 600; }
.shop-details dd { margin: 0; }

@media (max-width: 600px) {
  .receipt-shell { padding: 20px 12px; }
  .receipt-card { padding: 20px 16px; border-radius: 15px; }
  .brand { gap: 8px; margin: 0 5px 20px; }
  .brand-symbol { width: 34px; height: 34px; }
  .brand-wordmark { width: 124px; }
  .brand-label { font-size: 9px; }
  .receipt-heading { flex-direction: column; gap: 12px; }
  .shop-identity { flex-direction: column; align-items: flex-start; gap: 12px; }
  .shop-details dl { grid-template-columns: 1fr; }
  .purchase-total { padding: 16px; flex-direction: column; align-items: flex-start; gap: 4px; }
  .details { gap: 15px; }
  th, td { padding: 10px 8px; }
  .totals { max-width: none; }
}
