/*
 * TripBooking base.css: the only shared stylesheet. Plan: web/DESIGN.md. Contract: web/README.md.
 *
 * Sections
 *   1. Fonts           5. Layout primitives     9. Chips, badges, tabs, stepper
 *   2. Tokens          6. Buttons               10. Tables
 *   3. Reset           7. Forms                 11. Slip (the reservation slip)
 *   4. Type            8. Panels, kv, skeleton  12. Dialog, toast
 *                                               13. Admin shell and platform variant
 *                                               14. Motion, print
 *
 * Rules for other files: never redefine a token in section 2; add new shared components only in a clearly
 * marked section at the END of this file after asking the owner; page-only styles go in /css/<area>.css.
 */

/* ------------------------------------------------------------------ 1. Fonts */
/* Variable fonts, self-hosted (OFL licences next to them). latin covers text, latin-ext covers the rupee sign. */
@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/fonts/bricolage-latin-ext.woff2") format("woff2");
  font-weight: 200 800; font-style: normal; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/fonts/bricolage-latin.woff2") format("woff2");
  font-weight: 200 800; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Public Sans";
  src: url("/fonts/publicsans-latin-ext.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Public Sans";
  src: url("/fonts/publicsans-latin.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Fallbacks sized to the web fonts (approximate values) so text does not jump when the font arrives. */
@font-face {
  font-family: "Public Sans Fallback";
  src: local("Arial"), local("Helvetica Neue"), local("Helvetica");
  size-adjust: 104%; ascent-override: 92%; descent-override: 21%; line-gap-override: 0%;
}
@font-face {
  font-family: "Bricolage Fallback";
  src: local("Arial Narrow"), local("Arial"), local("Helvetica Neue");
  size-adjust: 97%; ascent-override: 96%; descent-override: 24%; line-gap-override: 0%;
}

/* ------------------------------------------------------------------ 2. Tokens */
:root {
  /* Neutral base (never overridden by a company) */
  --paper: #FFFFFF;
  --wash: #F4F5F7;
  --line: #D9DCE1;        /* dividers and decorative borders */
  --line-strong: #858B9B; /* borders of controls: 3:1 against paper (WCAG 1.4.11) */
  --ink: #262B3A;
  --ink-soft: #5B6275;

  /* Company tokens: set by applyTheme() from /api/tenant/config; these are the defaults */
  --brand: #0F6B6B;
  --brand-ink: #FFFFFF;     /* text on --brand: black or white by contrast */
  --brand-strong: #0F6B6B;  /* brand as text/link colour on paper, always >= 4.5:1 */
  --accent: #E39A2D;        /* fills, the slip's tear line */
  --accent-strong: #9F6C1F; /* accent as text on paper (prices), >= 4.5:1 */
  --royal: color-mix(in srgb, var(--brand) 30%, #0B0D16); /* deep brand-tinted surface; always dark, so white text on it holds for any brand */

  /* Status (fixed, independent of company colours) */
  --awaiting: #8A5A00;  --awaiting-bg: #FFF1D6;
  --confirmed: #1B6B3A; --confirmed-bg: #DDF3E4;
  --rejected: #9B2C2C;  --rejected-bg: #FBE1E1;

  /* Type */
  --font-display: "Bricolage Grotesque", "Bricolage Fallback", "Arial Narrow", Arial, sans-serif;
  --font-text: "Public Sans", "Public Sans Fallback", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-code: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --fs-0: 0.8rem; --fs-1: 1rem; --fs-2: 1.25rem; --fs-3: 1.563rem; --fs-4: 1.953rem; --fs-5: 2.441rem; --fs-6: 3.052rem;

  /* Space, radius, sizes */
  --s1: 0.25rem; --s2: 0.5rem; --s3: 0.75rem; --s4: 1rem; --s5: 1.5rem; --s6: 2rem; --s7: 3rem; --s8: 4.5rem;
  --gutter: 1rem;
  --radius: 6px; --radius-lg: 12px;
  --touch: 2.75rem;      /* 44px minimum target */
  --measure: 68ch;
  --max: 72rem;
  --ring: 2px solid var(--ink);
}
/* Platform (super-admin) area: fixed indigo, never themed by a company. Set data-area="platform" on <html>. */
[data-area="platform"] {
  --brand: #3B3F9E; --brand-ink: #FFFFFF; --brand-strong: #3B3F9E;
}

/* ------------------------------------------------------------------ 3. Reset */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh; background: var(--paper); color: var(--ink);
  font: 400 var(--fs-1)/1.55 var(--font-text);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-wrap: break-word;
}
img, svg, video, canvas { display: block; max-width: 100%; height: auto; }
input, button, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { padding: 0; }
table { border-collapse: collapse; }
ul[role="list"], ol[role="list"] { list-style: none; padding: 0; margin: 0; }
p, h1, h2, h3, h4, dl, dd, figure, blockquote { margin: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: var(--ring); outline-offset: 2px; }
::selection { background: color-mix(in srgb, var(--brand) 25%, white); }
a { color: var(--brand-strong); text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 2px; }
hr { border: 0; border-top: 1px solid var(--line); margin: var(--s5) 0; }

.sr-only { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: var(--s4); top: -4rem; z-index: 100; background: var(--ink); color: var(--paper); padding: var(--s3) var(--s4); border-radius: var(--radius); }
.skip-link:focus { top: var(--s2); }

/* ------------------------------------------------------------------ 4. Type */
h1, h2, h3, h4, .display {
  font-family: var(--font-display); font-optical-sizing: auto; line-height: 1.15; letter-spacing: -0.01em; text-wrap: balance;
}
h1 { font-size: var(--fs-4); font-weight: 700; }
h2 { font-size: var(--fs-3); font-weight: 650; }
h3 { font-size: var(--fs-2); font-weight: 650; }
h4 { font-size: var(--fs-1); font-weight: 700; font-family: var(--font-text); letter-spacing: 0; }
@media (min-width: 48rem) { h1 { font-size: var(--fs-5); } h2 { font-size: var(--fs-4); } }
@media (min-width: 64rem) { h1 { font-size: var(--fs-6); } }
p, li, dd { max-width: var(--measure); }
.small { font-size: 0.875rem; }
.text-soft { color: var(--ink-soft); }
.num { font-variant-numeric: tabular-nums; }
.code { font-family: var(--font-code); font-size: 0.95em; letter-spacing: 0.02em; overflow-wrap: anywhere; }
.price { font-family: var(--font-display); font-weight: 700; color: var(--accent-strong); font-variant-numeric: lining-nums tabular-nums; }
.measure { max-width: var(--measure); }
.text-center { text-align: center; }

/* ------------------------------------------------------------------ 5. Layout primitives */
.container { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
@media (min-width: 48rem) { :root { --gutter: 1.5rem; } }
@media (min-width: 64rem) { :root { --gutter: 2rem; } }
.stack > * + * { margin-top: var(--stack, var(--s4)); }
.stack--s { --stack: var(--s2); } .stack--l { --stack: var(--s6); }
.cluster { display: flex; flex-wrap: wrap; align-items: center; gap: var(--gap, var(--s3)); }
.cluster--between { justify-content: space-between; }
.cluster--end { justify-content: flex-end; }
.grid { display: grid; gap: var(--gap, var(--s5)); grid-template-columns: repeat(auto-fill, minmax(min(100%, var(--min, 16rem)), 1fr)); }
.section { padding-block: var(--s6); }
@media (min-width: 48rem) { .section { padding-block: var(--s7); } }
.photo { aspect-ratio: var(--ratio, 4 / 3); width: 100%; object-fit: cover; background: var(--wash); }

/* ------------------------------------------------------------------ 6. Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  min-height: var(--touch); padding: 0.5rem 1.25rem; border: 1.5px solid transparent; border-radius: var(--radius);
  font-weight: 600; line-height: 1.2; text-decoration: none; text-align: center; position: relative;
  background: var(--paper); color: var(--ink); transition: background-color 0.12s, border-color 0.12s;
}
.btn--primary { background: var(--brand); color: var(--brand-ink); }
.btn--primary:hover { background: color-mix(in srgb, var(--brand) 86%, black); }
.btn--secondary { border-color: var(--line-strong); background: var(--paper); color: var(--ink); }
.btn--secondary:hover { border-color: var(--ink); background: var(--wash); }
.btn--danger { background: var(--rejected); color: #fff; }
.btn--danger:hover { background: color-mix(in srgb, var(--rejected) 86%, black); }
.btn--quiet { background: transparent; color: var(--brand-strong); padding-inline: var(--s3); }
.btn--quiet:hover { background: var(--wash); }
.btn--block { width: 100%; }
.btn:disabled, .btn[aria-disabled="true"] {
  background: var(--wash); border-color: var(--line); color: var(--ink-soft); cursor: not-allowed;
}
.btn.is-loading { cursor: progress; }
.btn.is-loading::after {
  content: ""; width: 1em; height: 1em; border-radius: 50%; flex: none;
  border: 2px solid currentColor; border-right-color: transparent; animation: spin 0.8s linear infinite;
}
.btn--primary.is-loading:disabled { background: var(--brand); color: var(--brand-ink); opacity: 0.85; border-color: transparent; }
.btn--danger.is-loading:disabled { background: var(--rejected); color: #fff; opacity: 0.85; border-color: transparent; }
.copy-btn { min-height: var(--touch); min-width: var(--touch); padding-inline: var(--s3); }

/* Sticky action area for mobile steps (Continue, Book from X) */
.action-bar {
  position: sticky; bottom: 0; z-index: 20; background: var(--paper); border-top: 1px solid var(--line);
  padding: var(--s3) var(--gutter) calc(var(--s3) + env(safe-area-inset-bottom)); display: flex; gap: var(--s3); align-items: center;
}
.action-bar > .btn { flex: 1; }
@media (min-width: 48rem) { .action-bar--mobile { position: static; border: 0; padding: 0; } .action-bar--mobile > .btn { flex: none; } }

/* ------------------------------------------------------------------ 7. Forms */
.field { display: grid; gap: var(--s2); align-content: start; }
.field__label { font-weight: 600; }
.field__opt { font-weight: 400; color: var(--ink-soft); }
.field__hint { color: var(--ink-soft); font-size: 0.875rem; }
.field__error { color: var(--rejected); font-size: 0.875rem; font-weight: 600; }
.input {
  width: 100%; min-height: var(--touch); padding: 0.5rem 0.75rem; background: var(--paper);
  border: 1.5px solid var(--line-strong); border-radius: var(--radius); color: var(--ink);
}
select.input { appearance: none; padding-right: 2.25rem; background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%); background-position: calc(100% - 1.15rem) 55%, calc(100% - 0.8rem) 55%; background-size: 0.35rem 0.35rem; background-repeat: no-repeat; }
textarea.input { min-height: 6rem; resize: vertical; }
.input:hover { border-color: var(--ink); }
.input:focus-visible { outline: var(--ring); outline-offset: 2px; border-color: var(--ink); }
.input[aria-invalid="true"] { border-color: var(--rejected); border-width: 2px; }
.input:disabled, .input[readonly] { background: var(--wash); color: var(--ink-soft); }
.input::placeholder { color: var(--ink-soft); opacity: 1; }
/* Currency / phone / UTR friendly inputs */
.input-group { display: flex; align-items: stretch; }
.input-group > .input { border-radius: 0 var(--radius) var(--radius) 0; min-width: 0; }
.input-group__prefix { display: inline-flex; align-items: center; padding-inline: var(--s3); background: var(--wash); border: 1.5px solid var(--line-strong); border-right: 0; border-radius: var(--radius) 0 0 var(--radius); font-weight: 600; color: var(--ink-soft); }
.input--money, .input--tel { font-variant-numeric: tabular-nums; }
.input--code { font-family: var(--font-code); letter-spacing: 0.06em; text-transform: uppercase; } /* UTR, booking reference, OTP */
.input--code::placeholder { text-transform: none; letter-spacing: 0; font-family: var(--font-text); }
/* Checkbox and radio: native control, big hit area, label is part of the target */
.check { display: flex; align-items: flex-start; gap: var(--s3); min-height: var(--touch); padding-block: 0.6rem; cursor: pointer; }
.check input { flex: none; width: 1.4rem; height: 1.4rem; margin: 0.1rem 0 0; accent-color: var(--brand); }
.check__text { max-width: var(--measure); }
/* File drop zone: a label around a visually hidden file input */
.dropzone {
  display: grid; justify-items: center; gap: var(--s2); padding: var(--s5) var(--s4); text-align: center; cursor: pointer;
  border: 2px dashed var(--line-strong); border-radius: var(--radius-lg); background: var(--wash); min-height: 9rem; align-content: center;
}
.dropzone:hover, .dropzone.is-dragover { border-color: var(--brand-strong); background: color-mix(in srgb, var(--brand) 8%, white); }
.dropzone:focus-within { outline: var(--ring); outline-offset: 2px; }
.dropzone input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.dropzone__title { font-weight: 600; }
.dropzone__file { font-weight: 600; color: var(--confirmed); overflow-wrap: anywhere; }
.dropzone.has-file { border-style: solid; border-color: var(--confirmed); }
.dropzone.has-error { border-color: var(--rejected); }
.card-fieldset { border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--s4); }
.card-fieldset__legend { font-family: var(--font-display); font-weight: 650; font-size: var(--fs-2); padding-inline: var(--s2); margin-inline: calc(var(--s2) * -1); }
.form-grid { display: grid; gap: var(--s4); }
@media (min-width: 40rem) { .form-grid--2 { grid-template-columns: 1fr 1fr; } }
.form-error { border-left: 4px solid var(--rejected); background: var(--rejected-bg); color: var(--rejected); padding: var(--s3) var(--s4); font-weight: 600; border-radius: 0 var(--radius) var(--radius) 0; }

/* ------------------------------------------------------------------ 8. Panels, key-value, skeleton */
.panel { border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--s5); display: grid; gap: var(--s3); justify-items: start; }
.panel__title { font-size: var(--fs-2); }
.panel--empty { text-align: center; justify-items: center; background: var(--wash); border-style: dashed; padding-block: var(--s7); }
.panel--empty p { margin-inline: auto; }
.panel--error { border-color: var(--rejected); border-left-width: 4px; background: var(--paper); }
.panel--error .panel__title { color: var(--rejected); }
.kv { display: grid; gap: var(--s3) var(--s5); margin: 0; }
.kv > div { display: grid; gap: 0.1rem; }
.kv dt { color: var(--ink-soft); font-size: 0.875rem; }
.kv dd { font-weight: 500; overflow-wrap: anywhere; }
@media (min-width: 30rem) { .kv--row > div { grid-template-columns: minmax(8rem, 12rem) 1fr; align-items: baseline; gap: var(--s4); } }
.skeleton { height: 1.1rem; border-radius: 4px; background: linear-gradient(90deg, var(--wash) 25%, #E9EBEF 50%, var(--wash) 75%); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
.skeleton + .skeleton { margin-top: var(--s3); }
.skeleton:nth-child(odd) { width: 100%; } .skeleton:nth-child(even) { width: 72%; }
[aria-busy="true"] > .skeleton:first-child { height: 8rem; border-radius: var(--radius-lg); }

/* ------------------------------------------------------------------ 9. Chips, badges, tabs, stepper */
.chip {
  display: inline-flex; align-items: center; min-height: var(--touch); padding: 0 var(--s4); border-radius: 999px;
  border: 1.5px solid var(--line-strong); background: var(--paper); color: var(--ink); font-weight: 500; text-decoration: none;
}
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed="true"], .chip.is-active { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.badge { display: inline-block; padding: 0.15rem 0.6rem; border-radius: 4px; font-size: 0.875rem; font-weight: 600; line-height: 1.4; white-space: nowrap; }
.badge--awaiting { color: var(--awaiting); background: var(--awaiting-bg); }
.badge--confirmed { color: var(--confirmed); background: var(--confirmed-bg); }
.badge--rejected { color: var(--rejected); background: var(--rejected-bg); }
.tabs { display: flex; gap: var(--s1); overflow-x: auto; border-bottom: 1px solid var(--line); scrollbar-width: thin; }
.tabs > a, .tabs > button { flex: none; display: inline-flex; align-items: center; min-height: var(--touch); padding: 0 var(--s4); border: 0; background: none; color: var(--ink-soft); font-weight: 600; text-decoration: none; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.tabs > :hover { color: var(--ink); }
.tabs > [aria-selected="true"], .tabs > [aria-current] { color: var(--ink); border-bottom-color: var(--brand); }
/* Booking progress line: an ordered list, because it is a real sequence. aria-current="step" on the active li */
.stepper { list-style: none; padding: 0; margin: 0; display: flex; gap: 0; counter-reset: step; }
.stepper > li { flex: 1; position: relative; padding-top: 1.75rem; font-size: 0.875rem; color: var(--ink-soft); min-width: 0; counter-increment: step; }
.stepper > li::before { content: counter(step); position: absolute; top: 0; left: 0; width: 1.5rem; height: 1.5rem; border-radius: 50%; display: grid; place-items: center; font-size: 0.8rem; font-weight: 700; background: var(--paper); border: 2px solid var(--line-strong); color: var(--ink-soft); z-index: 1; }
.stepper > li::after { content: ""; position: absolute; top: 0.7rem; left: 1.5rem; right: 0; height: 2px; background: var(--line); }
.stepper > li:last-child::after { display: none; }
.stepper > li.is-done::before { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); content: "\2713"; }
.stepper > li.is-done::after { background: var(--brand); }
.stepper > li[aria-current="step"] { color: var(--ink); font-weight: 700; }
.stepper > li[aria-current="step"]::before { border-color: var(--brand); color: var(--brand-strong); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 22%, white); }
.stepper__label { display: block; padding-right: var(--s2); }
@media (max-width: 39.99rem) { .stepper > li:not([aria-current="step"]) .stepper__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); } .stepper > li[aria-current="step"] { flex: 3; } }

/* ------------------------------------------------------------------ 10. Tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-lg); -webkit-overflow-scrolling: touch; }
.table { width: 100%; font-size: 0.95rem; }
.table caption { text-align: left; padding: var(--s3) var(--s4); font-weight: 600; }
.table th, .table td { text-align: left; padding: var(--s3) var(--s4); vertical-align: top; border-bottom: 1px solid var(--line); }
.table thead th { background: var(--wash); font-weight: 600; white-space: nowrap; position: sticky; top: 0; }
.table tbody tr:nth-child(even) { background: color-mix(in srgb, var(--wash) 55%, white); }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--wash); }
.table .num, .table td.num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table a { font-weight: 600; }
/* Stacked rows on phones: add .table--stack and data-label="Column" on every td */
@media (max-width: 39.99rem) {
  .table--stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .table--stack, .table--stack tbody, .table--stack tr, .table--stack td { display: block; width: 100%; }
  .table--stack tr { padding: var(--s3) var(--s4); border-bottom: 1px solid var(--line); }
  .table--stack tbody tr:last-child { border-bottom: 0; }
  .table--stack td { display: grid; grid-template-columns: 7.5rem 1fr; gap: var(--s3); border: 0; padding: 0.2rem 0; text-align: left !important; white-space: normal; }
  .table--stack td > .badge { justify-self: start; }
  .table--stack td::before { content: attr(data-label); color: var(--ink-soft); font-size: 0.875rem; }
}

/* ------------------------------------------------------------------ 11. Slip */
/*
 * The reservation slip: the one memorable element. Markup:
 *   <article class="slip">
 *     <div class="slip__main"> .slip__head, .slip__amount, .slip__rows, .slip__pay </div>
 *     <div class="slip__stub"> upload form or confirmation text </div>
 *   </article>
 * Notches are cut with CSS masks; the outline follows them via drop-shadow filters. The slip slides down
 * from its top edge once on load (.slip--static or prefers-reduced-motion turns that off).
 */
.slip { --notch: 0.7rem; container: slip / inline-size; position: relative; max-width: 40rem; margin-inline: auto; filter: drop-shadow(0 0 0.5px var(--ink-soft)) drop-shadow(0 1px 0 var(--line)); animation: print-in 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.slip--static { animation: none; }
.slip__main, .slip__stub { background: var(--wash); padding: var(--s5); }
.slip__main {
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  -webkit-mask: radial-gradient(circle var(--notch) at 0 100%, #0000 98%, #000) 0 0 / 51% 100% no-repeat, radial-gradient(circle var(--notch) at 100% 100%, #0000 98%, #000) 100% 0 / 51% 100% no-repeat;
          mask: radial-gradient(circle var(--notch) at 0 100%, #0000 98%, #000) 0 0 / 51% 100% no-repeat, radial-gradient(circle var(--notch) at 100% 100%, #0000 98%, #000) 100% 0 / 51% 100% no-repeat;
}
.slip__stub {
  position: relative; border-radius: 0 0 var(--radius-lg) var(--radius-lg); padding-top: var(--s6);
  -webkit-mask: radial-gradient(circle var(--notch) at 0 0, #0000 98%, #000) 0 0 / 51% 100% no-repeat, radial-gradient(circle var(--notch) at 100% 0, #0000 98%, #000) 100% 0 / 51% 100% no-repeat;
          mask: radial-gradient(circle var(--notch) at 0 0, #0000 98%, #000) 0 0 / 51% 100% no-repeat, radial-gradient(circle var(--notch) at 100% 0, #0000 98%, #000) 100% 0 / 51% 100% no-repeat;
}
.slip__stub::before { content: ""; position: absolute; top: 0; left: calc(var(--notch) + 0.5rem); right: calc(var(--notch) + 0.5rem); border-top: 2.5px dashed var(--accent); } /* the tear line */
.slip__head { display: flex; align-items: center; gap: var(--s3); padding-bottom: var(--s4); border-bottom: 1px solid var(--line); }
.slip__logo { width: 2.5rem; height: 2.5rem; border-radius: 50%; object-fit: cover; background: var(--paper); flex: none; }
.slip__company { font-family: var(--font-display); font-weight: 700; font-size: var(--fs-2); line-height: 1.1; }
.slip__kind { color: var(--ink-soft); font-size: 0.875rem; }
.slip__amount { text-align: center; padding-block: var(--s5) var(--s4); }
.slip__label { color: var(--ink-soft); font-weight: 600; }
.slip__figure { font-family: var(--font-display); font-weight: 800; font-size: clamp(3rem, 16vw, 5rem); line-height: 1; letter-spacing: -0.03em; color: var(--accent-strong); font-variant-numeric: lining-nums tabular-nums; font-optical-sizing: auto; margin-block: var(--s2); }
.slip__note { color: var(--ink-soft); font-size: 0.95rem; margin-inline: auto; }
.slip__rows { display: grid; gap: var(--s3); margin: 0; padding-top: var(--s4); border-top: 1px solid var(--line); }
.slip__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s2) var(--s3); min-width: 0; }
.slip__row dt { color: var(--ink-soft); font-size: 0.875rem; }
.slip__row dd { display: flex; align-items: center; gap: var(--s2); font-weight: 600; min-width: 0; }
.slip__row .code { font-size: 1.05rem; font-weight: 600; }
.slip__pay { display: grid; justify-items: center; gap: var(--s3); padding-top: var(--s5); }
.slip__qr { width: min(13rem, 60vw); aspect-ratio: 1; background: #fff; padding: var(--s2); border-radius: var(--radius); object-fit: contain; border: 1px solid var(--line); }
.slip__stub-title { font-family: var(--font-display); font-weight: 650; font-size: var(--fs-2); margin-bottom: var(--s2); }
.slip__stub .field, .slip__stub .form-grid { margin-top: var(--s4); }
.slip__stub .input, .slip__stub .dropzone { background: var(--paper); }
.slip__figure--code { font-size: clamp(1.7rem, 8.2vw, 2.75rem); letter-spacing: 0; white-space: nowrap; }
/* wide slips (from the slip's own width, not the viewport): more padding, amount left and reference beside it */
@container slip (min-width: 34rem) {
  .slip__main, .slip__stub { padding: var(--s6); }
  .slip__top { display: grid; grid-template-columns: 1fr auto; gap: var(--s5); align-items: end; }
  .slip__top .slip__amount { text-align: left; padding-block: var(--s5) 0; }
  .slip__top .slip__rows { border: 0; padding: 0 0 var(--s2); min-width: 14rem; }
}
@keyframes print-in { from { clip-path: inset(0 0 100% 0); transform: translateY(-0.6rem); } to { clip-path: inset(-2px -2px -2px -2px); transform: none; } }

/* ------------------------------------------------------------------ 12. Dialog, toast */
.dialog { border: 0; border-radius: var(--radius-lg); padding: var(--s5); width: min(32rem, calc(100vw - 2rem)); color: var(--ink); background: var(--paper); box-shadow: 0 0 0 1px var(--line), 0 24px 60px rgba(38, 43, 58, 0.35); }
.dialog[open] { animation: fade-up 0.16s ease-out; }
.dialog::backdrop { background: rgba(38, 43, 58, 0.55); }
.dialog__title { font-size: var(--fs-2); margin-bottom: var(--s3); }
.dialog__body { color: var(--ink); margin-bottom: var(--s5); }
.dialog__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--s3); }
.dialog__actions .btn { flex: 1 1 auto; }
@media (min-width: 30rem) { .dialog__actions .btn { flex: none; } }
.toasts { position: fixed; z-index: 200; left: 0; right: 0; bottom: calc(var(--s4) + env(safe-area-inset-bottom)); display: grid; justify-items: center; gap: var(--s2); padding-inline: var(--gutter); pointer-events: none; }
.toast { pointer-events: auto; background: var(--ink); color: var(--paper); padding: var(--s3) var(--s4); border-radius: var(--radius); max-width: 28rem; font-weight: 500; box-shadow: 0 6px 24px rgba(38, 43, 58, 0.3); animation: fade-up 0.18s ease-out; }
.toast--success { border-left: 5px solid #5BC585; }
.toast--error { background: var(--rejected); }

/* ------------------------------------------------------------------ 13. Admin shell and platform variant */
/*
 * <div class="shell"><div class="shell__frame">
 *   <nav class="shell__nav" aria-label="Main"> .shell__brand, .shell__links (a[aria-current="page"]), .shell__foot </nav>
 *   <main class="shell__main" id="main"> ... </main>
 * </div></div>
 * Desktop: left navigation. Narrow: the links become a scrolling tab row on top. The switch follows the width of
 * .shell itself (container query), so it also works inside the gallery frames.
 * Platform area: put data-area="platform" on <html> (or a wrapper) and add .shell__marker in the brand block.
 */
.shell { container-type: inline-size; background: var(--paper); }
.shell__frame { display: grid; grid-template-columns: minmax(0, 1fr); min-height: 100vh; align-content: start; }
.shell__nav { background: var(--paper); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; }
.shell__brand { display: flex; align-items: center; gap: var(--s3); padding: var(--s3) var(--gutter); min-height: var(--touch); }
.shell__name { font-family: var(--font-display); font-weight: 700; font-size: var(--fs-2); line-height: 1.1; overflow-wrap: anywhere; }
.shell__logo { width: 2rem; height: 2rem; border-radius: 6px; object-fit: cover; flex: none; background: var(--wash); }
.shell__marker { margin-left: auto; background: var(--brand); color: var(--brand-ink); font-weight: 700; font-size: 0.875rem; padding: 0.15rem 0.6rem; border-radius: 4px; }
.shell__links { display: flex; overflow-x: auto; padding-inline: calc(var(--gutter) - var(--s3)); gap: var(--s1); scrollbar-width: thin; }
.shell__links a { flex: none; display: inline-flex; align-items: center; min-height: var(--touch); padding: 0 var(--s3); color: var(--ink-soft); font-weight: 600; text-decoration: none; border-bottom: 3px solid transparent; }
.shell__links a:hover { color: var(--ink); }
.shell__links a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--brand); }
.shell__foot { display: none; }
.shell__main { padding: var(--s5) var(--gutter) var(--s7); min-width: 0; }
.shell__title { margin-bottom: var(--s5); }
[data-area="platform"] .shell__nav { border-top: 4px solid var(--brand); }
@container (min-width: 56rem) {
  .shell__frame { grid-template-columns: 15rem minmax(0, 1fr); }
  .shell__nav { position: sticky; top: 0; align-self: start; height: 100vh; max-height: 100%; border-bottom: 0; border-right: 1px solid var(--line); display: flex; flex-direction: column; background: var(--wash); }
  .shell__brand { padding: var(--s5) var(--s4) var(--s4); align-items: flex-start; flex-wrap: wrap; }
  .shell__links { flex-direction: column; overflow: visible; padding: 0 var(--s3); gap: 2px; }
  .shell__links a { border-bottom: 0; border-left: 3px solid transparent; padding: 0 var(--s3); border-radius: 0 var(--radius) var(--radius) 0; }
  .shell__links a:hover { background: color-mix(in srgb, var(--ink) 6%, transparent); }
  .shell__links a[aria-current="page"] { border-left-color: var(--brand); background: var(--paper); }
  .shell__foot { display: block; margin-top: auto; padding: var(--s4); }
  .shell__main { padding: var(--s6) var(--s6) var(--s7); }
  [data-area="platform"] .shell__nav { border-top: 0; border-left: 0; box-shadow: inset 0 4px 0 var(--brand); }
}
/* Booking detail: proof left, details and actions right */
.split { display: grid; gap: var(--s5); }
@media (min-width: 60rem) { .split { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: start; } .split__side { position: sticky; top: var(--s4); } }
.proof { background: var(--wash); border-radius: var(--radius-lg); overflow: auto; max-height: 70vh; display: grid; place-items: center; padding: var(--s3); }
.proof img { max-width: 100%; cursor: zoom-in; }
.proof img.is-zoomed { max-width: none; cursor: zoom-out; }

/* ------------------------------------------------------------------ 14. Motion, print */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { to { background-position: -200% 0; } }
@keyframes fade-up { from { opacity: 0; transform: translateY(0.5rem); } to { opacity: 1; transform: none; } }
/* ------------------------------------------------------------------ Site state (suspended or unknown company) */
.site-state-page { background: var(--royal); }
.site-state { min-height: 100vh; display: grid; place-items: center; padding: var(--s5); background: radial-gradient(120% 90% at 80% 0%, color-mix(in srgb, var(--brand) 60%, #fff) 0%, var(--royal) 65%); }
.site-state__card { position: relative; width: min(100%, 34rem); display: grid; justify-items: center; gap: var(--s4); padding: var(--s7) var(--s6); text-align: center; color: #fff; border: 1px solid color-mix(in srgb, var(--accent) 65%, transparent); border-radius: var(--radius-lg); background: rgba(8, 10, 18, 0.55); box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.7); animation: fade-up 0.5s ease both; }
.site-state__card::before { content: ""; position: absolute; inset: 0.5rem; border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); border-radius: calc(var(--radius-lg) - 4px); pointer-events: none; }
.site-state__orn { width: 9rem; color: var(--accent); font-size: 0.9rem; line-height: 1; background: linear-gradient(var(--accent), var(--accent)) left center / 3.5rem 2px no-repeat, linear-gradient(var(--accent), var(--accent)) right center / 3.5rem 2px no-repeat; }
.site-state h1 { font-size: clamp(1.8rem, 6vw, 2.6rem); font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; color: #fff; }
.site-state p { max-width: 30ch; margin: 0; font-size: var(--fs-1); color: rgba(255, 255, 255, 0.85); }
.site-state__btn { margin-top: var(--s2); background: #fff; color: var(--ink); border-color: #fff; font-weight: 700; padding-inline: var(--s6); }
.site-state__btn:hover { background: var(--wash); border-color: var(--accent); }
.site-state__btn:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .btn.is-loading::after { border-right-color: currentColor; border-style: dotted; }
}
@media print {
  :root { --paper: #fff; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .shell__nav, .toasts, .action-bar, .btn, .tabs, .skip-link, dialog { display: none !important; }
  .shell__frame { display: block; }
  .slip { filter: none; animation: none; break-inside: avoid; }
  .slip__main, .slip__stub { -webkit-print-color-adjust: exact; print-color-adjust: exact; border: 1px solid #999; }
  a { color: inherit; text-decoration: none; }
  .table-wrap { overflow: visible; border: 0; }
}

/* ------------------------------------------------------------------ Phone input (js/lib/phone.js) */
.phone__row { display: grid; grid-template-columns: 5.5rem minmax(0, 1fr); gap: var(--s2); }
.phone__code { padding-inline: 0.4rem 1.25rem; font-size: 0.9rem; text-overflow: clip; white-space: nowrap; background-position: calc(100% - 0.8rem) 55%, calc(100% - 0.45rem) 55%; background-size: 0.3rem 0.3rem; }
