/* ==========================================================================
   Bongabong View — design system foundation
   Tokens · reset · type · buttons · forms · status · motion primitives
   ========================================================================== */

:root {
  /* Palette */
  --evergreen: #102B27;
  --evergreen-2: #17392F;
  --evergreen-3: #22493F;
  --ink: #171C1B;
  --ink-2: #3A4240;
  --ink-3: #5F6764;
  --bone: #F8F4EC;
  --bone-2: #FBF9F4;
  --paper: #FFFFFF;
  --stone: #E5DDCE;
  --stone-2: #D6CBB8;
  --stone-3: #B9AD98;
  --brass: #C4A16B;
  --brass-2: #D8BC8E;
  --brass-ink: #7C5E2E;        /* brass that passes 4.5:1 on bone */
  --sage: #7A9485;
  --sage-2: #A9BDB1;

  /* Status (muted, legible, never neon) */
  --st-free: #3F7A5C;      --st-free-bg: #E3EFE6;
  --st-occupied: #9C4A35;  --st-occupied-bg: #F6E5DE;
  --st-overdue: #8A2F22;   --st-overdue-bg: #F3DAD3;
  --st-held: #9A6A16;      --st-held-bg: #F7EBCF;
  --st-arriving: #3E5F80;  --st-arriving-bg: #E1E9F2;
  --st-disabled: #6D6F6A;  --st-disabled-bg: #E9E7E1;
  --st-review: #8C3D69;    --st-review-bg: #F4E2EC;

  /* Type */
  --font-display: "Cormorant Garamond", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --font-sans: "Manrope", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --fs-xs: .75rem;
  --fs-sm: .875rem;
  --fs-base: 1rem;
  --fs-md: 1.125rem;
  --fs-lg: clamp(1.25rem, 1.1rem + .5vw, 1.5rem);
  --fs-xl: clamp(1.6rem, 1.3rem + 1.2vw, 2.25rem);
  --fs-2xl: clamp(2.1rem, 1.5rem + 2.4vw, 3.4rem);
  --fs-3xl: clamp(2.6rem, 1.6rem + 4vw, 5rem);
  --fs-display: clamp(3rem, 1.4rem + 6.4vw, 7.4rem);

  /* Space & shape */
  --gutter: clamp(1rem, .6rem + 2vw, 2.5rem);
  --section: clamp(4.5rem, 3rem + 6vw, 9rem);
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
  --arch: 999px 999px var(--radius-sm) var(--radius-sm);
  --max: 1320px;
  --max-text: 64ch;

  /* Depth — warm, low, physical */
  --shadow-1: 0 1px 2px rgba(23, 28, 27, .06), 0 1px 1px rgba(23, 28, 27, .04);
  --shadow-2: 0 10px 30px -12px rgba(16, 43, 39, .22), 0 2px 6px rgba(16, 43, 39, .06);
  --shadow-3: 0 30px 70px -28px rgba(16, 43, 39, .45), 0 8px 20px -10px rgba(16, 43, 39, .18);

  /* Motion — natural curves, compositor-only properties */
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --ease-in-out: cubic-bezier(.65, 0, .35, 1);
  --ease-soft: cubic-bezier(.32, .72, 0, 1);
  --ease-spring: cubic-bezier(.34, 1.36, .64, 1);
  --d-press: 140ms;
  --d-hover: 240ms;
  --d-card: 320ms;
  --d-drawer: 380ms;
  --d-section: 560ms;
  --d-hero: 1000ms;
}

@supports (transition-timing-function: linear(0, 1)) {
  :root {
    /* Critically-damped-ish spring sampled into linear() */
    --ease-spring: linear(0, .009, .035 2.1%, .141 4.4%, .723 12.9%, .938 16.7%, 1.017 19.5%, 1.051 22.5%, 1.057 25.4%, 1.042 30.1%, 1.012 37.4%, .997 46.1%, 1.0004 62%, 1);
  }
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html:focus-within { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: 1.6;
  color: var(--ink);
  background: var(--bone);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "cv11";
}
img, picture, svg, video { display: block; max-width: 100%; }
img { height: auto; }
input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .2em; }
h1, h2, h3, h4 { margin: 0; font-weight: 500; line-height: 1.08; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
dl, dd { margin: 0; }
ul[role="list"], ol[role="list"] { list-style: none; margin: 0; padding: 0; }
table { border-collapse: collapse; width: 100%; }
[hidden] { display: none !important; }
::selection { background: var(--brass-2); color: var(--ink); }

:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 3px;
  border-radius: 4px;
}
.on-dark :focus-visible, .ops-rail :focus-visible { outline-color: var(--brass-2); }

.skip-link {
  position: fixed; left: 1rem; top: -4rem; z-index: 999;
  padding: .7rem 1rem; border-radius: var(--radius-sm);
  background: var(--ink); color: var(--bone); text-decoration: none; font-weight: 600;
  transition: top var(--d-hover) var(--ease-out);
}
.skip-link:focus { top: 1rem; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Typography ---------- */
.display, .h1, .h2, .h3, .serif { font-family: var(--font-display); font-weight: 500; letter-spacing: -.01em; }
.display { font-size: var(--fs-display); line-height: .94; letter-spacing: -.025em; }
.h1 { font-size: var(--fs-3xl); line-height: 1; letter-spacing: -.02em; }
.h2 { font-size: var(--fs-2xl); line-height: 1.04; }
.h3 { font-size: var(--fs-xl); line-height: 1.12; }
.display em, .h1 em, .h2 em, .h3 em { font-style: italic; font-weight: 400; color: inherit; }
.eyebrow {
  display: inline-flex; align-items: center; gap: .65rem;
  font-family: var(--font-sans); font-size: var(--fs-xs); font-weight: 700;
  letter-spacing: .22em; text-transform: uppercase; color: var(--brass-ink);
}
.eyebrow::before { content: ""; width: 1.75rem; height: 1px; background: currentColor; opacity: .7; }
.eyebrow--plain::before { display: none; }
.on-dark .eyebrow { color: var(--brass-2); }
.lede { font-size: var(--fs-md); line-height: 1.7; color: var(--ink-2); max-width: var(--max-text); }
.on-dark .lede { color: rgba(248, 244, 236, .78); }
.muted { color: var(--ink-3); }
.on-dark .muted { color: rgba(248, 244, 236, .62); }
.small { font-size: var(--fs-sm); }
.tiny { font-size: var(--fs-xs); }
.num { font-variant-numeric: tabular-nums lining-nums; }
.price { font-family: var(--font-display); font-weight: 600; font-variant-numeric: lining-nums; letter-spacing: -.01em; }

.on-dark { color: var(--bone); }

/* ---------- Layout ---------- */
.container { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }
.container--narrow { width: min(100% - 2 * var(--gutter), 920px); margin-inline: auto; }
.stack > * + * { margin-top: var(--stack, 1rem); }
.cluster { display: flex; flex-wrap: wrap; align-items: center; gap: var(--cluster, .75rem); }
.split { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.rule { height: 1px; border: 0; background: currentColor; opacity: .14; margin: 0; }

/* ---------- Buttons ---------- */
.btn {
  --btn-bg: var(--evergreen); --btn-fg: var(--bone); --btn-border: transparent;
  position: relative; isolation: isolate;
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  min-height: 3rem; padding: .8rem 1.4rem;
  border: 1px solid var(--btn-border); border-radius: 999px;
  background: var(--btn-bg); color: var(--btn-fg);
  font-size: var(--fs-sm); font-weight: 700; letter-spacing: .04em; line-height: 1.1;
  text-decoration: none; white-space: nowrap; overflow: hidden;
  transition: transform var(--d-press) var(--ease-out), box-shadow var(--d-hover) var(--ease-out),
              background-color var(--d-hover) var(--ease-out), color var(--d-hover) var(--ease-out), border-color var(--d-hover) var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}
.btn::after {
  /* Light sweep from the pointer side, composited */
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit;
  background: radial-gradient(120px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, .22), transparent 70%);
  opacity: 0; transition: opacity var(--d-hover) var(--ease-out);
}
.btn:hover::after { opacity: 1; }
.btn:hover { box-shadow: var(--shadow-2); }
.btn:active { transform: scale(.97); transition-duration: 90ms; }
.btn .icon { width: 1.1rem; height: 1.1rem; transition: transform var(--d-hover) var(--ease-out); }
.btn:hover .icon--nudge { transform: translateX(3px); }
.btn--brass { --btn-bg: var(--brass); --btn-fg: var(--ink); }
.btn--brass:hover { --btn-bg: var(--brass-2); }
.btn--light { --btn-bg: var(--bone); --btn-fg: var(--evergreen); }
.btn--ghost { --btn-bg: transparent; --btn-fg: currentColor; --btn-border: currentColor; }
.btn--ghost:hover { --btn-bg: rgba(16, 43, 39, .06); box-shadow: none; }
.on-dark .btn--ghost:hover { --btn-bg: rgba(248, 244, 236, .08); }
.btn--quiet { --btn-bg: transparent; --btn-fg: var(--ink-2); padding-inline: .9rem; }
.btn--quiet:hover { --btn-bg: rgba(16, 43, 39, .06); box-shadow: none; }
.btn--danger { --btn-bg: transparent; --btn-fg: var(--st-occupied); --btn-border: rgba(156, 74, 53, .4); }
.btn--danger:hover { --btn-bg: var(--st-occupied-bg); box-shadow: none; }
.btn--sm { min-height: 2.35rem; padding: .5rem 1rem; font-size: var(--fs-xs); }
.btn--lg { min-height: 3.5rem; padding: 1rem 1.9rem; font-size: var(--fs-base); }
.btn--block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; pointer-events: none; }
.btn.is-busy { pointer-events: none; }
.btn.is-busy .btn-label { opacity: .35; }
.btn.is-busy::before {
  content: ""; position: absolute; width: 1.1rem; height: 1.1rem; border-radius: 50%;
  border: 2px solid currentColor; border-right-color: transparent; animation: spin .8s linear infinite;
}

.link {
  position: relative; display: inline-flex; align-items: center; gap: .4rem;
  font-weight: 700; font-size: var(--fs-sm); letter-spacing: .03em; text-decoration: none; color: inherit;
}
.link::after {
  content: ""; position: absolute; left: 0; right: 1.4rem; bottom: -.2rem; height: 1px; background: currentColor;
  transform-origin: right; transform: scaleX(.35); opacity: .6;
  transition: transform var(--d-hover) var(--ease-out), opacity var(--d-hover) var(--ease-out);
}
.link:hover::after { transform-origin: left; transform: scaleX(1); opacity: 1; }
.link .icon { width: 1rem; height: 1rem; transition: transform var(--d-hover) var(--ease-out); }
.link:hover .icon { transform: translate(2px, -2px); }

.icon { width: 1.25rem; height: 1.25rem; flex: none; }
.icon-btn {
  display: inline-grid; place-items: center; width: 2.6rem; height: 2.6rem; border-radius: 50%;
  border: 1px solid transparent; background: transparent; color: inherit;
  transition: background-color var(--d-hover) var(--ease-out), transform var(--d-press) var(--ease-out);
}
.icon-btn:hover { background: rgba(16, 43, 39, .07); }
.icon-btn:active { transform: scale(.92); }
.on-dark .icon-btn:hover { background: rgba(248, 244, 236, .1); }

/* ---------- Forms ---------- */
.field { display: grid; gap: .4rem; min-width: 0; align-content: start; }
.field > label, .field-label {
  font-size: var(--fs-xs); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2);
}
.on-dark .field > label { color: rgba(248, 244, 236, .72); }
.input, .select, .textarea {
  width: 100%; min-height: 3rem; padding: .75rem .95rem;
  border: 1px solid var(--stone-2); border-radius: var(--radius-sm);
  background: var(--paper); color: var(--ink);
  transition: border-color var(--d-hover) var(--ease-out), box-shadow var(--d-hover) var(--ease-out), background-color var(--d-hover);
}
.textarea { min-height: 6rem; resize: vertical; line-height: 1.5; }
.select { appearance: none; padding-right: 2.5rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23171C1B' stroke-width='1.6' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .85rem center; background-size: 1rem;
}
.input:hover, .select:hover, .textarea:hover { border-color: var(--stone-3); }
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: var(--evergreen); box-shadow: 0 0 0 4px rgba(196, 161, 107, .28);
}
.input[aria-invalid="true"], .select[aria-invalid="true"], .textarea[aria-invalid="true"] { border-color: var(--st-occupied); background: #FFFBFA; }
.field-error { font-size: var(--fs-sm); color: var(--st-occupied); font-weight: 600; }
.field-hint { font-size: var(--fs-sm); color: var(--ink-3); }
.input-prefix { position: relative; }
.input-prefix > span { position: absolute; left: .95rem; top: 50%; transform: translateY(-50%); color: var(--ink-3); font-weight: 600; pointer-events: none; }
.input-prefix > .input { padding-left: 2rem; }

.choice-group { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: .6rem; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.choice span {
  display: flex; align-items: center; gap: .65rem; min-height: 3.2rem; padding: .75rem 1rem;
  border: 1px solid var(--stone-2); border-radius: var(--radius-sm); background: var(--paper);
  font-weight: 600; transition: border-color var(--d-hover) var(--ease-out), background-color var(--d-hover), box-shadow var(--d-hover);
}
.choice input:checked + span { border-color: var(--evergreen); background: #F1F5F2; box-shadow: inset 0 0 0 1px var(--evergreen); }
.choice input:focus-visible + span { box-shadow: 0 0 0 4px rgba(196, 161, 107, .35); }

/* ---------- Alerts / flash ---------- */
.alert {
  display: flex; gap: .8rem; align-items: flex-start; padding: .95rem 1.1rem;
  border-radius: var(--radius-sm); border: 1px solid; font-size: var(--fs-sm); line-height: 1.5;
}
.alert .icon { margin-top: .05rem; }
.alert--error { background: var(--st-occupied-bg); border-color: rgba(156, 74, 53, .25); color: #6E2F20; }
.alert--success { background: var(--st-free-bg); border-color: rgba(63, 122, 92, .25); color: #224B37; }
.alert--info { background: #EEF1EC; border-color: rgba(16, 43, 39, .12); color: var(--ink-2); }
.alert--warn { background: var(--st-held-bg); border-color: rgba(154, 106, 22, .25); color: #5E400A; }

/* ---------- Status pills ---------- */
.pill {
  --pill-fg: var(--ink-2); --pill-bg: var(--stone);
  display: inline-flex; align-items: center; gap: .45rem; padding: .28rem .7rem .28rem .6rem;
  border-radius: 999px; background: var(--pill-bg); color: var(--pill-fg);
  font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap;
}
.pill::before { content: ""; width: .45rem; height: .45rem; border-radius: 50%; background: currentColor; }
.pill--free, .pill--checked_out, .pill--paid { --pill-fg: var(--st-free); --pill-bg: var(--st-free-bg); }
.pill--occupied, .pill--checked_in { --pill-fg: var(--st-occupied); --pill-bg: var(--st-occupied-bg); }
.pill--overdue { --pill-fg: var(--st-overdue); --pill-bg: var(--st-overdue-bg); }
.pill--held, .pill--pending { --pill-fg: var(--st-held); --pill-bg: var(--st-held-bg); }
.pill--arriving, .pill--reserved { --pill-fg: var(--st-arriving); --pill-bg: var(--st-arriving-bg); }
.pill--disabled, .pill--cancelled, .pill--expired, .pill--failed { --pill-fg: var(--st-disabled); --pill-bg: var(--st-disabled-bg); }
.pill--no_show, .pill--needs_review { --pill-fg: var(--st-review); --pill-bg: var(--st-review-bg); }
.pill--archived { --pill-fg: var(--ink-3); --pill-bg: transparent; border: 1px dashed var(--stone-3); }
.pill--live::before { animation: pulse-dot 2.4s var(--ease-in-out) infinite; }

/* ---------- Pictures ---------- */
.media { position: relative; overflow: hidden; background: var(--stone); }
.media picture { display: block; width: 100%; height: 100%; }
.media img { width: 100%; height: 100%; object-fit: cover; }
.photo-missing {
  position: relative; display: grid; place-items: center; height: 100%; min-height: 12rem; padding: 1.5rem;
  background:
    repeating-linear-gradient(135deg, rgba(16, 43, 39, .045) 0 1px, transparent 1px 14px),
    linear-gradient(160deg, var(--stone) 0%, var(--bone) 100%);
  color: var(--ink-3); text-align: center;
}
.photo-missing span { font-family: var(--font-display); font-style: italic; font-size: var(--fs-lg); color: var(--ink-2); }
.photo-missing small { display: block; margin-top: .3rem; font-size: var(--fs-xs); letter-spacing: .14em; text-transform: uppercase; }

/* ---------- Motion primitives ---------- */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse-dot { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes rise-in { from { opacity: 0; transform: translate3d(0, 18px, 0); } to { opacity: 1; transform: none; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes shimmer { from { background-position: -200% 0; } to { background-position: 200% 0; } }

/* Reveal: content is visible by default; only hidden once JS confirms motion is welcome. */
.motion-ok [data-reveal] {
  opacity: 0; transform: translate3d(0, 22px, 0);
  transition: opacity var(--d-section) var(--ease-out), transform var(--d-section) var(--ease-out);
  transition-delay: calc(var(--i, 0) * 70ms);
}
.motion-ok [data-reveal="fade"] { transform: none; }
.motion-ok [data-reveal="left"] { transform: translate3d(-24px, 0, 0); }
.motion-ok [data-reveal].is-in { opacity: 1; transform: none; }

/* Masked image reveal: a curtain lifts while the photo settles from 1.06 → 1 scale */
/* The clip sits on the children so the observed element itself keeps a visible box. */
.motion-ok [data-reveal="mask"] { opacity: 1; transform: none; }
.motion-ok [data-reveal="mask"] > * { clip-path: inset(100% 0 0 0); transition: clip-path 1000ms var(--ease-soft); transition-delay: calc(var(--i, 0) * 90ms); }
.motion-ok [data-reveal="mask"] img { transform: scale(1.06); transition: transform 1400ms var(--ease-out); }
.motion-ok [data-reveal="mask"].is-in > * { clip-path: inset(0 0 0 0); }
.motion-ok [data-reveal="mask"].is-in img { transform: scale(1); }

/* Split-line headline reveal */
.line { display: block; overflow: hidden; padding-bottom: .22em; margin-bottom: -.22em; }
.line > span { display: inline-block; }
.motion-ok [data-split] .line > span { transform: translate3d(0, calc(100% + .4em), 0); transition: transform 900ms var(--ease-out); transition-delay: calc(var(--l, 0) * 90ms + var(--split-delay, 0ms)); }
.motion-ok [data-split].is-in .line > span { transform: none; }

.skeleton {
  border-radius: var(--radius-sm);
  background: linear-gradient(90deg, rgba(16, 43, 39, .06) 25%, rgba(16, 43, 39, .11) 50%, rgba(16, 43, 39, .06) 75%);
  background-size: 200% 100%; animation: shimmer 1.4s linear infinite;
}

/* Cross-document page transitions (progressive: Chromium 126+) */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: 220ms var(--ease-in-out) both vt-out; }
::view-transition-new(root) { animation: 380ms var(--ease-out) both vt-in; }
@keyframes vt-out { to { opacity: 0; transform: translateY(-6px); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(10px); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 1ms !important; animation-iteration-count: 1 !important;
    transition-duration: 1ms !important; transition-delay: 0ms !important; scroll-behavior: auto !important;
  }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}

.demo-banner {
  position: fixed; z-index: 500; left: 50%; bottom: .5rem; transform: translateX(-50%);
  margin: 0; padding: .3rem .8rem; border-radius: 999px; pointer-events: none;
  background: #5E400A; color: #FFF6E0; font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap;
  max-width: calc(100vw - 1rem); overflow: hidden; text-overflow: ellipsis;
  box-shadow: var(--shadow-2); opacity: .92;
}

/* ---------- Toasts ---------- */
.toast-region { position: fixed; z-index: 400; right: max(1rem, env(safe-area-inset-right)); bottom: max(1rem, env(safe-area-inset-bottom)); display: grid; gap: .6rem; width: min(26rem, calc(100vw - 2rem)); }
.toast {
  display: flex; gap: .75rem; align-items: flex-start; padding: .95rem 1rem; border-radius: var(--radius);
  background: var(--ink); color: var(--bone); box-shadow: var(--shadow-3); font-size: var(--fs-sm);
  animation: toast-in 420ms var(--ease-spring) both;
}
.toast.is-leaving { animation: toast-out 260ms var(--ease-in-out) both; }
.toast--success .icon { color: #9FD3B4; }
.toast--error .icon { color: #F2A48F; }
.toast p { flex: 1; }
.toast button { background: none; border: 0; color: inherit; opacity: .6; padding: 0; }
@keyframes toast-in { from { opacity: 0; transform: translate3d(0, 16px, 0) scale(.98); } }
@keyframes toast-out { to { opacity: 0; transform: translate3d(0, 8px, 0) scale(.98); } }

/* ==========================================================================
   Shared components (guest + operations)
   ========================================================================== */
.block { display: block; }
.form-grid { display: grid; gap: 1.1rem; }
.form-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.input--sm { min-height: 2.4rem; padding: .45rem .8rem; font-size: var(--fs-sm); }
.check { display: flex; gap: .75rem; align-items: flex-start; font-size: var(--fs-sm); cursor: pointer; }
.check input { width: 1.2rem; height: 1.2rem; margin-top: .15rem; accent-color: var(--evergreen); flex: none; }
.search-field { position: relative; display: block; }
.search-field > .icon { position: absolute; left: .75rem; top: 50%; transform: translateY(-50%); width: 1rem; height: 1rem; color: var(--ink-3); pointer-events: none; }
.search-field > .input { padding-left: 2.25rem; }
.pager { display: flex; align-items: center; justify-content: center; gap: 1rem; padding: 1.5rem 0; flex-wrap: wrap; }

.tabs { display: flex; gap: .25rem; padding: .3rem; border-radius: 999px; background: var(--stone); width: max-content; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.tabs__tab { display: inline-flex; align-items: center; gap: .5rem; padding: .55rem 1rem; border-radius: 999px; font-size: var(--fs-sm); font-weight: 700; text-decoration: none; white-space: nowrap; color: var(--ink-2); transition: background-color var(--d-hover) var(--ease-out), color var(--d-hover); }
.tabs__tab:hover { color: var(--ink); }
.tabs__tab[aria-current="page"] { background: var(--paper); color: var(--evergreen); box-shadow: var(--shadow-1); }
.tabs__count { min-width: 1.4rem; padding: .05rem .4rem; border-radius: 999px; background: rgba(16, 43, 39, .08); font-size: .7rem; text-align: center; }

.segmented { display: inline-flex; padding: .2rem; border-radius: 999px; background: var(--stone); gap: .15rem; flex-wrap: nowrap; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.segmented label, .segmented button { position: relative; }
.segmented input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.segmented span, .segmented button {
  display: inline-flex; align-items: center; gap: .35rem; padding: .4rem .8rem; border-radius: 999px; border: 0; background: transparent;
  font-size: .78rem; font-weight: 700; white-space: nowrap; color: var(--ink-2); transition: background-color var(--d-hover) var(--ease-out), color var(--d-hover), box-shadow var(--d-hover);
}
.segmented input:checked + span, .segmented button[aria-pressed="true"] { background: var(--paper); color: var(--evergreen); box-shadow: var(--shadow-1); }
.segmented input:focus-visible + span { outline: 2px solid var(--brass); outline-offset: 1px; }
.segmented--icons button { padding: .45rem .6rem; }
.segmented--icons .icon { width: 1.05rem; height: 1.05rem; }

.table-wrap { overflow-x: auto; border-radius: var(--radius-sm); }
.table { font-size: var(--fs-sm); }
.table th, .table td { padding: .8rem .9rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--stone); }
.table thead th { position: sticky; top: 0; z-index: 1; background: var(--bone-2); font-size: .68rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); white-space: nowrap; }
.table tbody tr { transition: background-color var(--d-hover); }
.table tbody tr:hover { background: rgba(196, 161, 107, .07); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table tr.is-archived td { color: var(--ink-3); }
.table--compact th, .table--compact td { padding: .5rem .6rem; }
.table__check { width: 2.5rem; }
.table__check input { width: 1.05rem; height: 1.05rem; accent-color: var(--evergreen); }
.name-cell { display: inline-flex; align-items: center; gap: .6rem; }

.avatar { display: inline-grid; place-items: center; width: 2.2rem; height: 2.2rem; flex: none; border-radius: 50%; background: var(--evergreen); color: var(--bone); font-size: .72rem; font-weight: 800; letter-spacing: .04em; }
.avatar--brass { background: var(--brass); color: var(--ink); }

/* Tooltip for chart marks (keyboard + pointer) */
[data-tip] { position: relative; }
[data-tip]::after {
  content: attr(data-tip); position: absolute; left: 50%; bottom: calc(100% + .5rem); z-index: 5; transform: translate(-50%, 4px);
  padding: .35rem .6rem; border-radius: 6px; background: var(--ink); color: var(--bone); font-size: .72rem; font-weight: 600; white-space: nowrap;
  display: none; pointer-events: none; animation: tip-in 160ms var(--ease-out) both;
}
[data-tip]:hover::after, [data-tip]:focus-visible::after { display: block; }
@keyframes tip-in { from { opacity: 0; transform: translate(-50%, 4px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* Confirmation dialog */
.confirm { border: 0; padding: 0; border-radius: var(--radius-lg); max-width: min(28rem, calc(100vw - 2rem)); box-shadow: var(--shadow-3); background: var(--paper); color: var(--ink); }
.confirm[open] { animation: dialog-in 320ms var(--ease-spring); }
.confirm::backdrop { background: rgba(11, 32, 29, .45); animation: fade-in 240ms var(--ease-out); }
.confirm__inner { display: grid; gap: 1.5rem; padding: 1.6rem; }
.confirm__msg { font-size: var(--fs-md); line-height: 1.5; }
.confirm__actions { display: flex; justify-content: flex-end; gap: .5rem; flex-wrap: wrap; }
@keyframes dialog-in { from { opacity: 0; transform: translateY(12px) scale(.98); } }

/* Receipt document (screen) */
.receipt { display: grid; gap: 1.5rem; padding: clamp(1.25rem, 4vw, 2.75rem); border-radius: var(--radius-lg); background: var(--paper); box-shadow: var(--shadow-2); border: 1px solid rgba(16, 43, 39, .06); }
.receipt__head { display: flex; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; padding-bottom: 1.25rem; border-bottom: 1px solid var(--stone); }
.receipt__brand { display: flex; gap: .9rem; align-items: center; }
.receipt__brand img { border-radius: 50%; }
.receipt__hotel { font-size: 1.5rem; line-height: 1.1; }
.receipt__meta { text-align: right; }
.receipt__ref { font-family: var(--font-display); font-size: 1.6rem; font-weight: 600; letter-spacing: .02em; }
.receipt__status { display: flex; gap: .5rem; flex-wrap: wrap; }
.receipt__cols { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.receipt__cols section { display: grid; gap: .2rem; align-content: start; font-size: var(--fs-sm); }
.receipt__label { display: block; margin-bottom: .25rem; font-family: var(--font-sans); font-size: .66rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--brass-ink); }
.receipt__strong { font-weight: 700; font-size: var(--fs-base); }
.receipt__dates { display: grid; grid-template-columns: repeat(2, 1fr); gap: .8rem 1.5rem; padding: 1rem 1.25rem; border-radius: var(--radius-sm); background: var(--bone-2); border: 1px solid var(--stone); }
.receipt__dates dt { font-size: var(--fs-xs); color: var(--ink-3); font-weight: 600; }
.receipt__dates dd { font-weight: 700; font-size: var(--fs-sm); }
.receipt__lines th, .receipt__lines td { padding: .6rem 0; border-bottom: 1px solid var(--stone); text-align: left; font-size: var(--fs-sm); }
.receipt__lines thead th { font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.receipt__lines .num { text-align: right; font-variant-numeric: tabular-nums; }
.receipt__lines tfoot th, .receipt__lines tfoot td { border-bottom: 0; padding-top: 1rem; font-size: var(--fs-base); }
.receipt__total { font-family: var(--font-display); font-size: 1.9rem !important; font-weight: 600; color: var(--evergreen); }
.receipt__payment { display: grid; gap: .35rem; font-size: var(--fs-sm); }
.receipt__thanks { font-size: 1.3rem; font-style: italic; color: var(--ink-2); text-align: center; padding-top: .5rem; }

.timeline { display: grid; gap: .9rem; list-style: none; margin: 0; padding: 0 0 0 1rem; border-left: 1px solid var(--stone-2); }
.timeline li { position: relative; display: grid; gap: .1rem; font-size: var(--fs-sm); }
.timeline__dot { position: absolute; left: calc(-1rem - 5px); top: .35rem; width: 9px; height: 9px; border-radius: 50%; background: var(--paper); border: 2px solid var(--brass); }

@media (max-width: 640px) {
  .form-grid--2, .receipt__cols, .receipt__dates { grid-template-columns: 1fr; }
  .receipt__meta { text-align: left; }
}

fieldset.field { border: 0; padding: 0; margin: 0; min-width: 0; }
