/* Guest, venue, and admin components. Token files and app.css load first. */
@layer components {

  /* Surface A: guest checkout, payment, and order receipt. */

  /* ── Consumer app shell (bone page + centred mobile column) ─────── */
  .app {
    display: flex; flex-direction: column; min-height: 100dvh;
    max-width: 440px; margin-inline: auto;
    background: var(--bg-consumer); position: relative;
  }

  /* ── App header (54px, transparent on bone) ─────────────────────── */
  .app-header {
    display: flex; align-items: center; gap: var(--space-3);
    height: 54px; flex-shrink: 0; padding-inline: 18px; background: transparent;
  }
  .app-header__back {
    display: inline-flex; align-items: center; gap: var(--space-1);
    border: 0; background: none; padding: 0; cursor: pointer; text-decoration: none;
    color: var(--text); font-weight: var(--weight-bold); font-size: 14px;
  }
  .app-header__back svg { width: 20px; height: 20px; }
  .app-header__title {
    font-size: var(--text-h3); font-weight: var(--weight-extrabold);
    letter-spacing: var(--tracking-tight); color: var(--text);
  }
  .app-header__spacer { flex: 1; }

  /* Compact language toggle — the design omits it; the app needs RU/KK,
     kept small and unobtrusive in the header right. */
  .lang-toggle { display: inline-flex; border: 1px solid var(--border-str); border-radius: var(--radius-pill); overflow: hidden; }
  .lang-toggle__opt {
    padding: 3px 9px; font-size: var(--text-caption);
    font-weight: var(--weight-semibold); text-decoration: none; color: var(--text-mute);
    display: inline-flex; align-items: center;
  }
  .lang-toggle__opt.is-active { background: var(--ink); color: #fff; }

  /* ── Scroll content ────────────────────────────── */
  .app-main { display: flex; flex-direction: column; flex: 1; padding: 6px 16px 24px; }
  .app-main--flush { padding: 0; }   /* screens whose first child is full-bleed media */

  /* ── Buttons ────────────────────────────────────────────────────── */
  .btn {
    display: inline-flex; align-items: center; justify-content: center;
    border: 0; cursor: pointer; text-decoration: none;
    font-family: inherit; font-weight: var(--weight-bold);
    transition: transform 160ms var(--ease-out), opacity 160ms var(--ease-out);
  }
  .btn:active:not(:disabled) { transform: scale(0.96); }
  .btn--block { display: flex; width: 100%; }
  .btn--primary {
    height: var(--btn-h-consumer); border-radius: var(--radius-consumer-lg);
    background: var(--accent-consumer); color: #fff; font-size: 16px;
    box-shadow: var(--accent-consumer-shadow);
  }
  .btn--primary:disabled, .btn:disabled {
    background: var(--btn-disabled-bg); color: var(--text-faint);
    box-shadow: none; cursor: not-allowed;
  }
  .btn--dark {
    height: var(--btn-h-consumer-dark); border-radius: var(--radius-lg);
    background: var(--ink); color: #fff; font-size: 15px;
  }
  .btn--ghost {
    height: var(--btn-h-consumer-sm); border-radius: var(--radius-lg);
    background: var(--surface); border: 1px solid var(--border);
    color: var(--text); font-size: 14px;
  }
  .btn--ghost:active { opacity: 0.8; }

  .btn--cart {
    height: var(--btn-h-consumer); border-radius: var(--radius-consumer-lg);
    background: var(--accent-consumer); color: #fff;
    justify-content: space-between; padding-inline: 20px;
    box-shadow: var(--accent-consumer-shadow);
  }
  /* mono like every other money value — the sum updates live per qty tap,
     and fixed-width digits keep the CTA from jittering. */
  .btn--cart__count { font-family: var(--font-mono); font-size: 13px; font-weight: var(--weight-semibold); opacity: 0.92; }
  .btn--cart__go { font-size: 16px; font-weight: var(--weight-extrabold); }

  /* Sticky bottom action bar — gradient fade over the bone page. */
  .sticky-cta {
    position: sticky; bottom: 0; z-index: 4;
    margin-top: auto; padding: 14px 22px 16px;
    background: linear-gradient(to top, var(--bg-consumer) 78%, transparent);
  }
  /* The bar takes no room while every action in it is hidden (empty cart). */
  .sticky-cta:not(:has(> :not([hidden]))) { display: none; }
  /* The cart button rises in once, when the first item is added. */
  .sticky-cta__cart {
    transition: opacity 200ms var(--ease-out), transform 200ms var(--ease-out);
    @starting-style { opacity: 0; transform: translateY(8px); }
  }

  /* ── Promo-code field ──────────────────────────────────────── */
  .field { display: block; }
  .field--cart { margin: var(--space-4) var(--space-4) 0; }
  .field__label {
    display: block; margin-bottom: 7px;
    font-size: 11px; font-weight: var(--weight-bold);
    letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-mute);
  }
  .field__input {
    width: 100%; height: var(--input-h-consumer); padding-inline: var(--space-4);
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-consumer-lg);
    font: inherit; font-size: 16px; font-weight: var(--weight-semibold);
    color: var(--text); outline: none;
    transition: border-color 150ms ease, box-shadow 150ms ease;
  }
  .field__input:focus { border-color: var(--accent-consumer); box-shadow: 0 0 0 3px var(--accent-consumer-soft); }

  .field__input--code { scroll-margin-block: 180px; font-family: var(--font-mono); font-weight: var(--weight-medium); text-transform: uppercase; letter-spacing: var(--tracking-label); }

  /* ── Survey card ──────────────────────────────────────── */
  .survey { background: var(--yellow-soft); border: 1px solid var(--warn); border-radius: var(--radius-lg); padding: var(--space-4); margin-block: var(--space-4); }
  .survey__q { font-weight: var(--weight-bold); }

  .survey__opts { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-2); }
  .survey__opt { min-height: 44px; border: 1px solid var(--border-str); border-radius: var(--radius-pill); background: var(--surface); font-weight: var(--weight-semibold); transition: transform 120ms var(--ease-out), background-color 120ms ease; }
  .survey__opt:active { transform: scale(0.96); background: var(--surface-2); }
  .survey__skip { display: inline-block; margin-top: var(--space-3); color: var(--text-mute); font-size: var(--text-caption); }

  /* ── Empty state and inline messages ─────────────────── */

  .empty { text-align: center; color: var(--text-mute); padding-block: var(--space-12); }
  .msg--error { background: var(--danger-bg); color: var(--danger); border-radius: var(--radius-md); padding: var(--space-3); }
  .msg--warn { background: var(--warn-bg); color: var(--warn); border-radius: var(--radius-md); padding: var(--space-3); }

  /* ── Guest menu, cart, and order status ────────────────────────── */

  /* order-builder form fills the screen so the sticky bar pins to the bottom */
  .order-builder { display: flex; flex-direction: column; flex: 1; }
  .order-builder > :is(.msg--error, .msg--warn) { margin: 0 var(--space-4) var(--space-3); }

  /* menu header: venue name + campaign line */
  .menu-head { padding: 0 var(--space-4) var(--space-4); }
  .menu-head__venue {
    margin: 0; font-size: var(--text-h2); line-height: var(--leading-heading);
    font-weight: var(--weight-extrabold); letter-spacing: var(--tracking-tight); color: var(--text);
  }
  .menu-head__promo {
    display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1) var(--space-2);
    margin: var(--space-2) 0 0; font-size: 13px; font-weight: var(--weight-semibold); color: var(--text-mute);
  }
  .menu-head__pct {
    padding: 2px var(--space-2); border-radius: var(--radius-pill);
    background: var(--accent-consumer-soft); color: var(--accent-consumer);
    font-weight: var(--weight-extrabold); white-space: nowrap;
  }

  /* Banner strip: native swipe with snap points; the next slide peeks past
     the edge so the strip reads as scrollable. */
  .promo-rail {
    display: flex; gap: var(--space-3); overflow-x: auto; overscroll-behavior-x: contain;
    padding-inline: var(--space-4); scroll-padding-inline: var(--space-4);
    scroll-snap-type: x mandatory; scrollbar-width: none;
  }
  .promo-rail::-webkit-scrollbar { display: none; }
  .promo-rail__slide {
    flex: 0 0 82%; min-width: 0; max-width: 320px; height: auto; aspect-ratio: 560 / 296;
    border-radius: var(--radius-consumer-lg); scroll-snap-align: start;
    outline: 1px solid oklch(0 0 0 / 0.1); outline-offset: -1px;
  }

  /* Slide dots, shown by menu.js; the active one is a wider ink pill. */
  .promo-dots { display: flex; justify-content: center; padding-top: var(--space-2); }
  .promo-dots__dot {
    display: flex; align-items: center;
    height: 24px; padding: 0 9px; border: 0; background: none; touch-action: manipulation;
  }
  .promo-dots__dot::before {
    content: ""; width: 6px; height: 6px; border-radius: var(--radius-pill); background: var(--text-faint);
  }
  .promo-dots__dot[aria-current]::before { width: 22px; background: var(--ink); }

  /* Category bar: sticks to the viewport top while the menu scrolls; menu.js
     sets data-stuck so the edge shows only while items pass under it. */
  .cat-nav {
    position: sticky; top: 0; z-index: 3;
    display: flex; gap: var(--space-2); overflow-x: auto; scrollbar-width: none;
    margin-top: var(--space-4); padding: var(--space-2) var(--space-4);
    background: var(--bg-consumer);
    transition: box-shadow 150ms ease;
  }
  .cat-nav::-webkit-scrollbar { display: none; }
  .cat-nav[data-stuck] { box-shadow: 0 1px 0 var(--border), 0 6px 12px -8px rgba(29, 29, 27, 0.18); }
  .cat-nav__link {
    position: relative; flex-shrink: 0; display: inline-flex; align-items: center;
    min-height: 36px; padding-inline: 14px; border-radius: var(--radius-pill);
    background: var(--surface); color: var(--text-mute); text-decoration: none; white-space: nowrap;
    font-size: 14px; font-weight: var(--weight-semibold);
    transition: background-color 150ms ease, color 150ms ease;
  }
  .cat-nav__link::before { content: ""; position: absolute; inset: -4px 0; }
  .cat-nav__link[aria-current] { background: var(--ink); color: #fff; }

  /* menu list + item cards */
  .menu-list { padding: var(--space-2) var(--space-4) 0; display: flex; flex-direction: column; gap: var(--space-8); }
  /* clears the sticky category bar when a category is jumped to */
  .menu-group { scroll-margin-top: 68px; }
  .menu-group__title {
    margin: 0 0 var(--space-3); font-size: var(--text-h3); line-height: var(--leading-heading);
    font-weight: var(--weight-extrabold); letter-spacing: -0.015em; color: var(--text);
  }
  .review-title { margin: var(--space-4); }
  .menu-group__items { display: flex; flex-direction: column; gap: 10px; }
  .menu-item {
    display: flex; align-items: center; gap: 12px;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-consumer-lg); padding: 13px 14px;
    transition: border-color 150ms ease;
  }
  .menu-item.is-picked { border-color: var(--border-str); }
  .menu-item__info { flex: 1; min-width: 0; }
  .menu-item__name { font-size: 14.5px; font-weight: var(--weight-bold); color: var(--text); }
  .menu-item__desc { margin-top: 2px; font-size: 12px; font-weight: var(--weight-medium); line-height: 1.4; color: var(--text-faint); }
  .menu-item__price { margin-top: 7px; font-family: var(--font-mono); font-size: 13.5px; font-weight: var(--weight-semibold); color: var(--text); }

  /* Until an item is added its stepper shows only "+". The hidden parts keep
     their space, so "+" never moves under a repeat tap and the name never
     rewraps. */
  .menu-item .qty { transition: background-color 150ms ease; }
  .menu-item .qty > :not(.qty__btn--plus) { transition: opacity 150ms var(--ease-out), visibility 150ms; }
  .menu-item:not(.is-picked) .qty { background: transparent; }
  .menu-item:not(.is-picked) .qty > :not(.qty__btn--plus) { visibility: hidden; opacity: 0; }

  /* qty stepper (bone tray, white/orange square buttons) */
  .qty { display: flex; align-items: center; gap: 3px; flex-shrink: 0; background: var(--surface-2); border-radius: var(--radius-stepper); padding: 3px; }
  .qty__btn { width: 30px; height: 30px; border: 0; border-radius: var(--radius-stepper-btn); background: var(--surface); cursor: pointer; line-height: 1; font-size: 19px; font-weight: var(--weight-bold); color: var(--text); transition: transform 100ms var(--ease-out); }
  .qty__btn--plus { background: var(--accent-consumer); color: #fff; }
  .qty__btn:active { transform: scale(0.96); }
  .qty__val { min-width: 22px; text-align: center; font-family: var(--font-mono); font-size: 14px; font-weight: var(--weight-semibold); color: var(--text); }
  .qty--sm .qty__btn { width: 28px; height: 28px; font-size: 18px; }
  .qty--sm .qty__val { min-width: 20px; font-size: 13.5px; }

  /* review view: cart item cards */
  .review { padding: 0 16px; display: flex; flex-direction: column; gap: 10px; }
  .review-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-consumer-lg); padding: 13px 14px; }
  .review-item__row { display: flex; align-items: center; gap: 10px; }
  .review-item__info { flex: 1; min-width: 0; }
  .review-item__name { font-size: 14.5px; font-weight: var(--weight-bold); color: var(--text); }
  .review-item__unit { margin-top: 2px; font-family: var(--font-mono); font-size: 12px; font-weight: var(--weight-medium); color: var(--text-faint); }
  .review-item__remove { border: 0; background: none; cursor: pointer; padding: 4px; flex-shrink: 0; color: var(--text-faint); display: inline-flex; transition: transform 100ms var(--ease-out); }
  .review-item__remove svg { width: 19px; height: 19px; }
  .review-item__remove:active { transform: scale(0.96); }
  .review-item__line { text-align: end; margin-top: 6px; font-family: var(--font-mono); font-size: 14px; font-weight: var(--weight-semibold); color: var(--text); }

  /* Datastar view swap (menu ↔ review): the containers un-hide from
     display:none, so @starting-style drives a fade-rise on the incoming
     view; exit is instant by design (asymmetric enter/exit). Browsers
     without @starting-style just swap instantly — the prior behavior. */
  .menu-list, .review, .cart-empty {
    transition: opacity 200ms var(--ease-out), transform 200ms var(--ease-out);
    @starting-style { opacity: 0; transform: translateY(8px); }
  }

  /* empty cart (review view, all items removed) */
  .cart-empty { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 70px 30px; gap: 16px; }
  .cart-empty__icon { width: 60px; height: 60px; border-radius: var(--radius-consumer-lg); background: var(--surface-sunken); color: var(--text-faint); display: flex; align-items: center; justify-content: center; }
  .cart-empty__title { font-size: 16px; font-weight: var(--weight-bold); color: var(--text); }

  /* money totals card (review + order screens) */
  .totals { margin: 16px 16px 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-consumer-lg); padding: 16px; }
  .totals--flush { margin-inline: 0; }
  .totals__row { display: flex; justify-content: space-between; align-items: center; }
  .totals__row + .totals__row { margin-top: 10px; }
  .totals__label { font-size: 13.5px; font-weight: var(--weight-semibold); color: var(--text-mute); }
  .totals__val { font-family: var(--font-mono); font-size: 15px; font-weight: var(--weight-semibold); color: var(--text); }
  .totals__val--discount { color: var(--accent-consumer); }
  .totals__rule { height: 1px; background: var(--border-faint); margin: 13px 0; }
  .totals__pay-label { font-size: 15px; font-weight: var(--weight-bold); color: var(--text); }
  .totals__pay-val { font-family: var(--font-mono); font-size: 22px; font-weight: var(--weight-semibold); color: var(--text); }

  /* ── Order-status screen ── */
  .oscreen { padding: 8px 22px 28px; }
  .qr-hint { margin: 6px 0 0; text-align: center; font-size: 14px; font-weight: var(--weight-semibold); color: var(--text-mute); }
  .qr { margin: 18px auto 0; width: 220px; height: 220px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-consumer-qr); display: flex; align-items: center; justify-content: center; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06); }
  .qr img, .qr svg { width: 180px; height: 180px; }
  .qr-code { margin-top: 16px; text-align: center; font-family: var(--font-mono); font-size: 20px; font-weight: var(--weight-semibold); letter-spacing: 0.12em; color: var(--text); }

  /* Centered payment and order status */
  .ostate { display: flex; flex-direction: column; align-items: center; text-align: center; }
  .ostate--top { margin-top: 10px; }
  .ostate--mid { margin-top: 30px; }
  .ostate__icon { display: flex; align-items: center; justify-content: center; border-radius: 50%; width: 56px; height: 56px; }
  .ostate__icon--lg { width: 58px; height: 58px; }
  .ostate__icon--ok { background: var(--ok-bg); color: var(--ok); }
  .ostate__icon--neutral { background: var(--surface-2); color: var(--text-mute); }
  .ostate__title { margin: 12px 0 0; font-size: 19px; font-weight: var(--weight-extrabold); letter-spacing: -0.02em; color: var(--text); }
  .ostate__title--lg { font-size: 21px; }
  .ostate__title--danger { color: var(--danger); }
  .ostate__text { margin-top: 6px; font-size: 13.5px; font-weight: var(--weight-medium); line-height: 1.45; color: var(--text-mute); }
  .ostate__venue { margin-top: 3px; font-size: 13px; font-weight: var(--weight-semibold); color: var(--text-mute); }

  /* spinner (payment/confirming) */
  .spinner-wrap { display: flex; flex: 1; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 40px; }
  /* 0.8s, not 1s — a faster spinner reads as a faster app. */
  .spinner { width: 42px; height: 42px; border: 3px solid var(--border); border-top-color: var(--text); border-radius: 50%; animation: hhspin 0.8s linear infinite; }
  .spinner-label { margin: 20px 0 0; font-size: 16px; font-weight: var(--weight-bold); color: var(--text); }

  @keyframes hhspin { to { transform: rotate(360deg); } }

  /* paid receipt card */
  .receipt { margin-top: 18px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-consumer-lg); padding: 16px; display: flex; flex-direction: column; gap: 10px; }
  .receipt__row { display: flex; justify-content: space-between; align-items: center; font-size: 13.5px; }
  .receipt__label { color: var(--text-mute); font-weight: var(--weight-semibold); }
  .receipt__val { font-family: var(--font-mono); font-weight: var(--weight-semibold); color: var(--text); }
  .receipt__val--discount { color: var(--accent-consumer); }
  .receipt__rule { height: 1px; background: var(--border-faint); }
  .receipt__pay-label { color: var(--text); font-weight: var(--weight-bold); font-size: 15px; }
  .receipt__pay-val { font-family: var(--font-mono); font-weight: var(--weight-semibold); color: var(--text); font-size: 20px; }
  .receipt__meta { margin-top: 2px; font-family: var(--font-mono); font-size: 12px; font-weight: var(--weight-semibold); color: var(--text-faint); }

  /* order composition ("Состав заказа") */
  .oitems { margin-top: 10px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-consumer-lg); padding: 6px 16px; }
  .oitems__title { margin: 14px 0 4px; font-size: 11px; font-weight: var(--weight-bold); letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-faint); }
  .oitem { display: flex; align-items: center; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--border-faint); }
  .oitem:last-child { border-bottom: 0; }
  .oitem__name { flex: 1; font-size: 14px; font-weight: var(--weight-bold); color: var(--text); }
  .oitem__qty { font-family: var(--font-mono); font-size: 12.5px; color: var(--text-faint); }
  .oitem__sum { font-family: var(--font-mono); font-size: 13.5px; font-weight: var(--weight-semibold); color: var(--text); min-width: 64px; text-align: right; }

  /* ── Mock payment provider ─────────────────────────────── */
  .pay { display: flex; flex-direction: column; min-height: 100dvh; max-width: 440px; margin-inline: auto; background: var(--surface); }
  .pay__head { display: flex; align-items: center; gap: 10px; padding: 18px 22px 14px; border-bottom: 1px solid var(--border); }
  .pay__icon { width: 30px; height: 30px; border-radius: var(--radius-sm); background: var(--surface-2); color: var(--text-mute); display: flex; align-items: center; justify-content: center; }
  .pay__name { margin: 0; font-size: 14px; font-weight: var(--weight-bold); color: var(--text); }
  .pay__sub { font-size: 11px; font-weight: var(--weight-medium); color: var(--text-faint); }
  .pay__body { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 28px 24px; }
  .pay__caption { text-align: center; font-size: 12.5px; font-weight: var(--weight-semibold); color: var(--text-faint); }
  .pay__amount { margin-top: 8px; text-align: center; font-family: var(--font-mono); font-size: 40px; font-weight: var(--weight-semibold); letter-spacing: -0.01em; color: var(--text); }
  .pay__actions { margin-top: 34px; display: flex; flex-direction: column; gap: 12px; }
  .pay__btn { display: flex; align-items: center; justify-content: center; height: 52px; border-radius: 12px; border: 0; font-family: inherit; font-size: 15px; font-weight: var(--weight-bold); cursor: pointer; transition: transform 160ms var(--ease-out); }
  .pay__btn:active { transform: scale(0.96); }
  .pay__btn--primary { background: var(--ink); color: #fff; }
  .pay__btn--secondary { height: 48px; background: var(--surface); border: 1px solid var(--border); color: var(--text-mute); font-size: 14px; }

  /* Surface B: venue cabinet with its own .vb-* components. */

  /* ── Shell: centred mobile column on the bone page ─────────────────── */
  .vb { display: flex; flex-direction: column; min-height: 100dvh; max-width: 440px; margin-inline: auto; background: var(--bg); }
  .vb__main { flex: 1; padding: 18px 16px 24px; }

  /* ── Header (54px, hairline bottom border) ─────────────────────────── */
  .vb-header { display: flex; align-items: center; gap: 10px; height: 54px; flex-shrink: 0; padding-inline: 18px; border-bottom: 1px solid var(--border); background: var(--bg); }
  .vb-header__back { display: inline-flex; align-items: center; gap: 4px; border: 0; background: none; padding: 0; cursor: pointer; text-decoration: none; color: var(--text); font-weight: var(--weight-bold); font-size: 14px; }
  .vb-header__back svg { width: 20px; height: 20px; }
  .vb-header__back:active { opacity: 0.6; }
  .vb-header__title { margin: 0; font-size: 17px; font-weight: var(--weight-extrabold); letter-spacing: var(--tracking-tight); color: var(--text); }
  .vb-header__spacer { flex: 1; }
  .vb-header__right { display: flex; align-items: center; gap: 10px; }
  .vb-header__logout { display: inline-flex; border: 0; background: none; padding: 0; cursor: pointer; color: var(--text-faint); }
  .vb-header__logout svg { width: 21px; height: 21px; }
  .vb-header__logout:active { opacity: 0.6; }

  /* ── Bottom tab bar (66px, today/campaigns) ────────────────────────── */
  .vb-tabbar { position: sticky; bottom: 0; z-index: 5; height: 66px; flex-shrink: 0; display: flex; background: var(--surface); border-top: 1px solid var(--border); }
  .vb-tabbar__tab { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-decoration: none; color: var(--text-faint); font-size: 10.5px; font-weight: var(--weight-bold); }
  .vb-tabbar__tab svg { width: 23px; height: 23px; }
  .vb-tabbar__tab.is-active { color: var(--text); }
  .vb-tabbar__tab:active { opacity: 0.55; }

  /* ── Buttons ───────────────────────────────────────────────────────── */
  .vb-btn { width: 100%; display: flex; align-items: center; justify-content: center; border: 0; cursor: pointer; text-decoration: none; font-family: inherit; font-weight: var(--weight-bold); height: 52px; border-radius: var(--radius-lg); font-size: 15px; transition: transform 160ms var(--ease-out), opacity 160ms var(--ease-out); }
  .vb-btn:active:not(:disabled) { transform: scale(0.96); }
  .vb-btn--primary { background: var(--yellow); color: var(--text); }
  .vb-btn--primary:disabled { background: var(--btn-disabled-bg); color: var(--text-faint); cursor: not-allowed; }
  .vb-btn--dark { background: var(--ink); color: #fff; }

  .vb-btn--h48 { height: 48px; }

  .vb-btn--r12 { border-radius: var(--radius-vb-ctl); }

  /* ── Login ─────────────────────────────────────────────────────────── */
  .vb-login { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 24px 26px; }
  .vb-login__logo { width: 50px; height: 50px; border-radius: 15px; background: var(--ink); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: var(--weight-extrabold); font-size: 24px; margin: 0 auto 20px; }
  .vb-login__title { text-align: center; margin: 0 0 4px; font-size: 22px; font-weight: var(--weight-extrabold); letter-spacing: -0.02em; color: var(--text); }
  .vb-login__sub { text-align: center; margin: 0 0 26px; font-size: 13px; color: var(--text-mute); font-weight: var(--weight-medium); }
  .vb-login__form { display: flex; flex-direction: column; gap: 14px; }
  .vb-login__submit { margin-top: 22px; }

  /* ── Login fields ────────────────────────────── */
  .vb-field { display: block; }
  .vb-field__label { display: block; font-size: 11px; font-weight: var(--weight-bold); letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-mute); margin-bottom: 6px; }
  .vb-field__input { width: 100%; height: 46px; padding: 0 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-vb-ctl); font: inherit; font-size: 14px; font-weight: var(--weight-semibold); color: var(--text); outline: none; transition: border-color 150ms ease, box-shadow 150ms ease; }
  .vb-field__input:focus { border-color: var(--border-str); box-shadow: 0 0 0 3px rgba(29, 29, 27, 0.07); }

  /* ── Low-balance banner (amber) ────────────────────────────────────── */
  .vb-lowbal { background: var(--warn-bg); border: 1px solid var(--info-note-bd); border-radius: var(--radius-vb-ctl); padding: 12px 14px; font-size: 12.5px; color: var(--info-note-fg); font-weight: var(--weight-semibold); line-height: 1.4; margin-bottom: 14px; }

  /* ── Balance tile (dark, yellow number) ────────────────────────────── */
  .vb-balance { position: relative; overflow: hidden; display: block; background: var(--ink); border-radius: var(--radius-vb-tile); padding: 18px; text-decoration: none; transition: transform 180ms var(--ease-out); }
  .vb-balance:active { transform: scale(0.985); }
  .vb-balance > * { position: relative; z-index: 1; }
  .vb-balance::after { content: ""; position: absolute; z-index: 0; right: -18px; top: -18px; width: 90px; height: 90px; border-radius: 50%; background: var(--vb-balance-glow); }
  .vb-balance__cap { font-size: 12px; font-weight: var(--weight-bold); letter-spacing: 0.05em; text-transform: uppercase; color: var(--vb-on-dark-mute); }
  .vb-balance__num { font-family: var(--font-mono); font-size: 30px; font-weight: var(--weight-semibold); color: var(--yellow); margin-top: 8px; line-height: 1; }
  .vb-balance__link { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--vb-on-dark-strong); font-weight: var(--weight-semibold); margin-top: 12px; }
  .vb-balance__link svg { width: 14px; height: 14px; }

  /* ── Section eyebrow ───────────────────────────────────────────────── */
  .vb-eyebrow { font-size: 12px; font-weight: var(--weight-bold); letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-faint); margin: 18px 0 10px; }

  /* ── Today stat cards + drawn-today line ───────────────────────────── */
  .vb-stats { display: flex; gap: 10px; }
  .vb-stat { flex: 1; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 14px 12px; text-align: center; }
  .vb-stat__num { font-family: var(--font-mono); font-size: 24px; font-weight: var(--weight-semibold); color: var(--text); line-height: 1; }
  .vb-stat__cap { font-size: 11px; color: var(--text-mute); font-weight: var(--weight-semibold); margin-top: 7px; }
  .vb-drawn { font-size: 12px; color: var(--text-mute); font-weight: var(--weight-semibold); margin-top: 10px; }
  .vb-drawn b { font-family: var(--font-mono); color: var(--text); font-weight: var(--weight-semibold); }

  /* ── Order rows (today list) ───────────────────────────────────────── */
  .vb-orders { display: flex; flex-direction: column; gap: 10px; }
  .vb-order { display: block; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 13px 14px; text-decoration: none; transition: transform 180ms var(--ease-out); }
  .vb-order:active { transform: scale(0.985); }
  .vb-order__head { display: flex; align-items: center; gap: 8px; }
  .vb-order__name { font-size: 14px; font-weight: var(--weight-bold); color: var(--text); }
  .vb-order__time { font-size: 12px; color: var(--text-faint); font-weight: var(--weight-semibold); font-family: var(--font-mono); }
  .vb-order__grow { flex: 1; }
  .vb-order__money { font-family: var(--font-mono); font-size: 13px; color: var(--text-mute); font-weight: var(--weight-medium); margin-top: 8px; }
  .vb-order__money b { color: var(--text); font-weight: var(--weight-semibold); }
  .vb-empty { text-align: center; color: var(--text-mute); font-weight: var(--weight-semibold); padding-block: 40px; }

  /* ── Scan hint ─────────────────────────────────────────────────────── */
  .vb-scanhint { margin-top: 18px; display: flex; align-items: center; gap: 11px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 14px 16px; }
  .vb-scanhint__icon { width: 38px; height: 38px; border-radius: 11px; background: var(--surface); display: flex; align-items: center; justify-content: center; color: var(--text-mute); flex-shrink: 0; border: 1px solid var(--border); }
  .vb-scanhint__icon svg { width: 20px; height: 20px; }
  .vb-scanhint__text { flex: 1; font-size: 12.5px; color: var(--text-mute); font-weight: var(--weight-semibold); line-height: 1.4; }

  /* ── Status pill (order rows + campaign cards) ─────────────────────── */
  .vb-pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; font-size: 11px; font-weight: var(--weight-semibold); border-radius: var(--radius-sm); }
  .vb-pill__dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
  .vb-pill--ok { color: var(--ok); background: var(--ok-bg); }
  .vb-pill--warn { color: var(--warn); background: var(--warn-bg); }
  .vb-pill--neutral { color: var(--text-mute); background: var(--surface-2); }

  /* ── Campaign cards (read-only) ────────────────────────────────────── */
  .vb-camps { display: flex; flex-direction: column; gap: 12px; }
  .vb-camp { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 16px; }
  .vb-camp__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
  .vb-camp__name { font-size: 15px; font-weight: var(--weight-bold); color: var(--text); }
  .vb-camp__meta { font-size: 12.5px; color: var(--text-mute); font-weight: var(--weight-medium); margin-top: 9px; }
  .vb-camp__orders { font-size: 12px; color: var(--text-faint); font-weight: var(--weight-semibold); margin-top: 8px; }
  .vb-camp__orders b { font-family: var(--font-mono); color: var(--text); font-weight: var(--weight-semibold); }

  /* ── Order items ───────────────── */
  .vb-items { margin-top: 10px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 6px 16px; }
  .vb-item { display: flex; align-items: center; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--border-faint); }
  .vb-item:last-child { border-bottom: 0; }
  .vb-item__name { flex: 1; font-size: 14px; font-weight: var(--weight-bold); color: var(--text); }
  .vb-item__qty { font-family: var(--font-mono); font-size: 12.5px; color: var(--text-faint); }
  .vb-item__sum { font-family: var(--font-mono); font-size: 13.5px; font-weight: var(--weight-semibold); color: var(--text); min-width: 60px; text-align: right; }

  /* ── Unknown-order result ───────────────────────────────────── */
  .vb-result { display: flex; flex-direction: column; align-items: center; text-align: center; }
  .vb-result__icon { width: 54px; height: 54px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }

  .vb-result__icon--neutral { background: var(--surface-2); color: var(--text-mute); }
  .vb-result__title { font-size: 19px; font-weight: var(--weight-extrabold); color: var(--text); margin-top: 10px; letter-spacing: -0.02em; }

  /* ── Order receipt ──────────────────────────────────── */
  .vb-receipt { margin-top: 18px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 16px; display: flex; flex-direction: column; gap: 10px; }
  .vb-receipt__row { display: flex; justify-content: space-between; align-items: center; font-size: 13.5px; }
  .vb-receipt__label { color: var(--text-mute); font-weight: var(--weight-semibold); }
  .vb-receipt__val { font-family: var(--font-mono); font-weight: var(--weight-semibold); color: var(--text); }
  .vb-receipt__val--discount { color: var(--accent-consumer); }
  .vb-receipt__rule { height: 1px; background: var(--border-faint); }
  .vb-receipt__row--pay .vb-receipt__label { color: var(--text); font-weight: var(--weight-bold); font-size: 15px; }
  .vb-receipt__row--pay .vb-receipt__val { font-size: 20px; }

  /* ── Order payment status ─────────────────────────── */
  .vb-status { margin-top: 16px; display: flex; align-items: center; gap: 9px; border-radius: var(--radius-vb-ctl); padding: 13px 14px; }
  .vb-status--warn { background: var(--warn-bg); border: 1px solid var(--info-note-bd); }
  .vb-status--ok { background: var(--ok-bg); border: 1px solid var(--ok-bd); }
  .vb-status--neutral { background: var(--surface-2); border: 1px solid var(--border); }
  .vb-status__icon { flex-shrink: 0; display: inline-flex; }
  .vb-status__icon svg { width: 20px; height: 20px; }
  .vb-status--warn .vb-status__icon { color: var(--warn); }
  .vb-status--ok .vb-status__icon { color: var(--ok); }
  .vb-status--neutral .vb-status__icon { color: var(--text-mute); }
  .vb-status__title { font-size: 13.5px; font-weight: var(--weight-bold); }
  .vb-status--warn .vb-status__title { color: var(--info-note-fg); }
  .vb-status--ok .vb-status__title { color: var(--ok); }
  .vb-status--neutral .vb-status__title { color: var(--danger); }
  .vb-status__sub { font-size: 11.5px; font-weight: var(--weight-semibold); margin-top: 1px; }
  .vb-status--warn .vb-status__sub { color: var(--warn); }
  .vb-status--ok .vb-status__sub { color: var(--ok); }
  .vb-status--neutral .vb-status__sub { color: var(--text-mute); }
  .vb-spinner { width: 18px; height: 18px; border: 2px solid var(--warn); border-top-color: transparent; border-radius: 50%; animation: hhspin 0.8s linear infinite; flex-shrink: 0; }

  /* ── Order view: code + served banner ──────────────────────────────── */
  .vb-ordercode { text-align: center; margin-bottom: 14px; }
  .vb-ordercode__cap { font-size: 12px; font-weight: var(--weight-bold); letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-mute); }
  .vb-ordercode__num { font-family: var(--font-mono); font-size: 26px; font-weight: var(--weight-semibold); letter-spacing: 0.08em; color: var(--text); margin-top: 6px; }
  .vb-served { margin-top: 16px; border-radius: var(--radius-vb-ctl); padding: 14px 16px; background: var(--danger-bg); border: 1px solid var(--danger); }
  .vb-served__title { font-size: 17px; font-weight: var(--weight-extrabold); color: var(--text); }
  .vb-served__sub { font-size: 12.5px; font-weight: var(--weight-semibold); color: var(--text); margin-top: 3px; }

  /* ── Dashboard: menu-QR card + order code in rows ──────────────────── */
  .vb-menuqr { margin-top: 12px; display: flex; align-items: center; gap: 11px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 13px 14px; text-decoration: none; color: var(--text); transition: transform 180ms var(--ease-out); }
  .vb-menuqr:active { transform: scale(0.985); }
  .vb-menuqr > svg { width: 16px; height: 16px; color: var(--text-faint); flex-shrink: 0; }
  .vb-menuqr__icon { width: 38px; height: 38px; border-radius: 11px; background: var(--yellow); color: var(--ink); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
  .vb-menuqr__icon svg { width: 20px; height: 20px; }
  .vb-menuqr__text { flex: 1; }
  .vb-menuqr__title { font-size: 14px; font-weight: var(--weight-bold); }
  .vb-menuqr__sub { font-size: 12px; color: var(--text-mute); font-weight: var(--weight-semibold); margin-top: 2px; }
  .vb-order__code { font-family: var(--font-mono); letter-spacing: 0.04em; }

  /* ── Menu QR page ──────────────────────────────────────────────────── */
  .vb-qr { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; margin-top: 8px; }
  .vb-qr__img { width: min(280px, 100%); height: auto; aspect-ratio: 1; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-vb-tile); padding: 12px; image-rendering: pixelated; }
  .vb-qr__link { font-family: var(--font-mono); font-size: 13px; color: var(--text-mute); word-break: break-all; }
  .vb-qr__hint { font-size: 12.5px; color: var(--text-mute); font-weight: var(--weight-semibold); line-height: 1.4; max-width: 320px; }

  /* ── Balance: service owed to the venue ────────────────────────────── */
  .vb-service { margin-top: 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 14px 16px; }
  .vb-service__cap { margin: 0; font-size: 12px; font-weight: var(--weight-bold); letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-mute); }
  .vb-service__num { font-family: var(--font-mono); font-size: 22px; font-weight: var(--weight-semibold); color: var(--text); margin-top: 6px; }
  .vb-service__sub { font-size: 12px; color: var(--text-mute); font-weight: var(--weight-semibold); margin-top: 6px; line-height: 1.4; }

  /* ── B6 balance: headline + ledger ─────────────────────────────────── */
  .vb-balnum { font-family: var(--font-mono); font-size: 38px; font-weight: var(--weight-semibold); color: var(--text); line-height: 1; }
  .vb-balcap { font-size: 13px; color: var(--text-mute); font-weight: var(--weight-semibold); margin-top: 6px; }
  .vb-balmeta { font-size: 12px; color: var(--text-faint); font-weight: var(--weight-semibold); margin-top: 8px; }
  .vb-balmeta b { font-family: var(--font-mono); color: var(--text); font-weight: var(--weight-semibold); }
  .vb-ledger { display: flex; flex-direction: column; gap: 10px; }
  .vb-ledrow { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 13px 14px; }
  .vb-ledrow__head { display: flex; align-items: center; justify-content: space-between; }
  .vb-ledrow__type { font-size: 13px; font-weight: var(--weight-bold); color: var(--text); }
  .vb-ledrow__amount { font-family: var(--font-mono); font-size: 14px; font-weight: var(--weight-semibold); }
  .vb-ledrow__amount--in { color: var(--ok); }
  .vb-ledrow__amount--out { color: var(--danger); }
  .vb-ledrow__sub { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 5px; }
  .vb-ledrow__basis { font-size: 12px; color: var(--text-mute); font-weight: var(--weight-medium); }
  .vb-ledrow__after { font-size: 11.5px; color: var(--text-faint); font-weight: var(--weight-semibold); font-family: var(--font-mono); white-space: nowrap; }

  /* ══ Surface C: super-admin desktop app shell ══ */

  /* shell: 244px fixed sidebar + main column */
  .adm-shell { display: flex; height: 100vh; background: var(--bg); overflow: hidden; }
  .adm-sidebar {
    width: var(--density-sidebar-w); flex-shrink: 0;
    background: var(--surface-2); border-right: 1px solid var(--border);
    display: flex; flex-direction: column;
  }
  .adm-brand { display: flex; align-items: center; gap: 9px; padding: 18px 18px 14px; border-bottom: 1px solid var(--border); }
  .adm-brand__mark {
    width: 28px; height: 28px; border-radius: var(--radius-sm);
    background: var(--ink); color: var(--surface);
    display: flex; align-items: center; justify-content: center;
    font-weight: var(--weight-extrabold); font-size: 14px;
  }
  .adm-brand__name { font-size: var(--text-body); font-weight: var(--weight-extrabold); color: var(--text); letter-spacing: var(--tracking-tight); line-height: 1; }
  .adm-brand__sub { font-size: var(--text-label); color: var(--text-faint); font-weight: var(--weight-semibold); margin-top: 2px; }

  .adm-nav { padding: 10px; flex: 1; display: flex; flex-direction: column; gap: 2px; }
  .adm-nav__item {
    display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 12px;
    border-radius: 9px; border-left: 3px solid transparent;
    color: var(--text); font-size: var(--text-body); font-weight: var(--weight-semibold);
    text-decoration: none; cursor: pointer;
    transition: background-color 120ms ease;
  }
  .adm-nav__item.is-active { border-left-color: var(--purple); background: var(--purple-soft); color: var(--purple-ink); font-weight: var(--weight-bold); }
  .adm-nav__item svg { width: 17px; height: 17px; flex-shrink: 0; }

  .adm-nav__foot { padding: 12px 10px; border-top: 1px solid var(--border); }
  .adm-nav__logout {
    display: flex; align-items: center; gap: 10px; width: 100%; height: 36px; padding: 0 12px;
    border: 0; border-radius: 9px; background: none; cursor: pointer;
    color: var(--text-mute); font-family: inherit; font-size: 13px; font-weight: var(--weight-semibold);
    transition: background-color 120ms ease;
  }
  .adm-nav__logout svg { width: 16px; height: 16px; }

  .adm-main { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
  .adm-topbar {
    height: var(--density-topbar-h); flex-shrink: 0;
    background: var(--surface); border-bottom: 1px solid var(--border);
    display: flex; align-items: center; padding: 0 28px;
  }
  .adm-topbar__title { margin: 0; font-size: 18px; font-weight: var(--weight-extrabold); letter-spacing: var(--tracking-tight); color: var(--text); }
  .adm-topbar__right { margin-left: auto; display: flex; align-items: center; gap: 14px; }
  .adm-avatar {
    width: 32px; height: 32px; border-radius: 50%; background: var(--yellow);
    display: flex; align-items: center; justify-content: center;
    font-weight: var(--weight-extrabold); font-size: 12px; color: var(--ink);
  }
  .adm-content { flex: 1; overflow-y: auto; padding: 26px 28px 48px; }

  /* eyebrow / section spacing */
  .adm-eyebrow { font-size: 11px; font-weight: var(--weight-bold); text-transform: uppercase; letter-spacing: var(--tracking-label); color: var(--text-faint); margin-bottom: 12px; }
  .adm-section { margin-top: 24px; }
  .adm-section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
  .adm-total-cards { display: flex; gap: 12px; }
  .adm-survey-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 12px; margin-bottom: 12px; padding: 16px 20px; }
  .adm-survey-head .adm-card__num { flex-shrink: 0; white-space: nowrap; }
  /* C3 header row: general KPI cards (wider) beside the order funnel (slightly thinner) */
  .adm-split-hd { display: grid; grid-template-columns: 1.5fr 1fr; gap: 18px; align-items: start; }

  /* desktop table */
  .adm-table-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow-x: auto; }
  .adm-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: var(--text-body-sm); }
  .adm-table th {
    height: var(--density-header-h); background: var(--surface-2);
    border-bottom: 1px solid var(--border);
    text-transform: uppercase; font-size: 10px; font-weight: var(--weight-bold);
    letter-spacing: 0.05em; color: var(--text-mute);
    text-align: left; padding: 0 14px; white-space: nowrap;
  }
  .adm-table td { height: 46px; border-bottom: 1px solid var(--border-faint); padding: 0 14px; color: var(--text); }
  .adm-table tr:last-child td { border-bottom: 0; }
  .adm-table th.th--num, .adm-table td.td--num { text-align: right; font-family: var(--font-mono); }
  /* class selector — the views emit <tr class="tr--link"> */
  .adm-table .tr--link { cursor: pointer; }
  .adm-table .tr--link td { transition: background-color 100ms ease; }
  .adm-cell-strong { font-weight: var(--weight-semibold); color: var(--text); }
  .adm-cell-mute { color: var(--text-mute); }
  .adm-cell--low { color: var(--warn); }

  /* Margin and conversion cells, plus numeric spans. */
  .adm-cell--accent { color: var(--purple-ink); }
  .adm-cell--neg { color: var(--danger); }
  .adm-mono { font-family: var(--font-mono); }

  /* stat cards */
  .adm-cards { display: grid; gap: 12px; }
  .adm-cards--3 { grid-template-columns: repeat(3, 1fr); }

  .adm-cards--5 { grid-template-columns: repeat(5, 1fr); }
  .adm-cards--6 { grid-template-columns: repeat(6, 1fr); }
  .adm-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 16px; }
  .adm-card--pad18 { padding: 18px; }          /* funnel / demand / survey panels (design 18px) */
  /* compact tile — C11 ledger 6-strip (r12 / pad13 / num16 / cap10.5) */
  .adm-card--sm { padding: 13px; border-radius: var(--radius-tile); }
  .adm-card--sm .adm-card__num { font-size: 16px; }
  .adm-card--sm .adm-card__cap { font-size: var(--text-label); margin-top: 5px; }
  .adm-card__num { font-family: var(--font-mono); font-size: 24px; font-weight: var(--weight-semibold); color: var(--text); line-height: 1; }
  /* stat-number size by grid context: KPI 26 (C3 strip), stat 22 (C9 totals / C17 venue) */
  .adm-cards--kpi .adm-card__num { font-size: 26px; }
  .adm-cards--stat .adm-card__num { font-size: 22px; }
  .adm-card__num--accent { color: var(--purple-ink); }
  .adm-card__num--warn { color: var(--warn); }
  .adm-card__num--neg { color: var(--danger); }  /* negative margin tile (C9 totals / C11 ledger) */
  .adm-card__num--xl { font-size: 30px; }       /* C3 survey new-demand headline */
  .adm-card__cap { font-size: var(--text-caption); color: var(--text-mute); font-weight: var(--weight-semibold); margin-top: 8px; }

  /* Order funnel totals */

  .adm-funnel__side { display: flex; gap: 24px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border-faint); color: var(--text-mute); font-size: var(--text-body-sm); }

  /* survey (4 answers) */
  .adm-survey { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
  .adm-survey__num { font-family: var(--font-mono); font-size: 24px; font-weight: var(--weight-semibold); }
  .adm-survey__num--yes { color: var(--danger); }
  .adm-survey__num--pyes { color: var(--warn); }
  .adm-survey__num--pno { color: var(--survey-olive); }
  .adm-survey__num--no { color: var(--ok); }
  .adm-survey__cap { font-size: var(--text-caption); color: var(--text-mute); margin: 6px 0; }
  .adm-survey__track { height: 6px; background: var(--surface-2); border-radius: var(--radius-pill); overflow: hidden; }
  .adm-survey__fill { height: 100%; border-radius: var(--radius-pill); }
  .adm-survey__fill--yes { background: var(--danger); }
  .adm-survey__fill--pyes { background: var(--warn); }
  .adm-survey__fill--pno { background: var(--survey-olive); }
  .adm-survey__fill--no { background: var(--ok); }

  /* status pills (admin variants) */
  .adm-pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; font-size: 11px; font-weight: var(--weight-semibold); border-radius: var(--radius-sm); }
  .adm-pill__dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
  .adm-pill--paid, .adm-pill--active { color: var(--ok); background: var(--ok-bg); }
  .adm-pill--pending { color: var(--warn); background: var(--warn-bg); }
  .adm-pill--neutral { color: var(--text-mute); background: var(--surface-2); }
  .adm-pill--low { padding: 1px 7px; font-size: 10px; border-radius: 7px; color: var(--warn); background: var(--warn-bg); }

  /* timeline (C14) */
  .adm-timeline { display: flex; flex-direction: column; }
  .adm-timeline__item { display: flex; gap: 12px; }
  .adm-timeline__rail { display: flex; flex-direction: column; align-items: center; }
  .adm-timeline__dot { width: 11px; height: 11px; border-radius: 50%; background: var(--border-str); }
  .adm-timeline__dot--done { background: var(--ok); }
  .adm-timeline__line { width: 2px; flex: 1; background: var(--border-str); }
  .adm-timeline__body { padding-bottom: 18px; }
  .adm-timeline__label { font-size: 13px; font-weight: var(--weight-bold); color: var(--text); }
  .adm-timeline__time { font-family: var(--font-mono); font-size: var(--text-caption); color: var(--text-faint); margin-top: 2px; }

  /* form (admin desktop) */
  .adm-form-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; display: flex; flex-direction: column; gap: 18px; }
  .adm-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
  .adm-form-grid--wide { grid-template-columns: 2fr 1fr; }
  .adm-field { display: flex; flex-direction: column; }
  .adm-field__label { text-transform: uppercase; font-size: var(--text-label); font-weight: var(--weight-bold); letter-spacing: 0.06em; color: var(--text-mute); margin-bottom: 7px; }
  .adm-field__input, .adm-field__select {
    height: 38px; padding: 0 12px; border: 1px solid var(--border); border-radius: var(--radius-md);
    background: var(--surface); color: var(--text); font-family: inherit; font-size: var(--text-body); font-weight: var(--weight-semibold);
    transition: border-color 150ms ease, box-shadow 150ms ease;
  }
  .adm-field__input--mono { font-family: var(--font-mono); }
  .adm-field__select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%235e5e58' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 34px; }
  .adm-field__input:focus, .adm-field__select:focus { outline: 2px solid var(--purple-ink); outline-offset: 2px; border-color: var(--purple-ink); box-shadow: 0 0 0 3px var(--purple-soft); }
  .adm-form-actions { display: flex; gap: 10px; margin-top: 18px; }
  .adm-note { font-size: var(--text-caption); color: var(--text-faint); }
  .adm-note--warn { color: var(--warn); } /* Empty-menu warning */
  .adm-info-note { font-size: 12px; color: var(--info-note-fg); background: var(--warn-bg); border: 1px solid var(--info-note-bd); border-radius: var(--radius-md); padding: 10px 14px; }

  /* buttons */
  .adm-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: var(--btn-h-lg); padding: 0 18px; border: 1px solid transparent; border-radius: var(--radius-pill); font-family: inherit; font-size: 13px; font-weight: var(--weight-bold); text-decoration: none; cursor: pointer; transition: transform 120ms var(--ease-out), background-color 120ms ease; }
  .adm-btn:active { transform: scale(0.96); }
  .adm-btn--primary { background: var(--ink); color: var(--surface); }
  .adm-btn--brand { background: var(--yellow); color: var(--ink); }
  .adm-btn--ghost { background: var(--surface); border-color: var(--border); color: var(--text); }
  .adm-btn--danger { background: var(--surface); border-color: var(--border); color: var(--danger); }
  .adm-btn--md { height: var(--btn-h-adm-cta); padding: 0 16px; }                                 /* list-header CTAs (design 36px) */
  .adm-btn--sm { height: var(--btn-h-adm-inline); padding: 0 14px; font-size: var(--text-mono); } /* inline table CTAs (Открыть меню / + Позиция, 30px) */
  .adm-btn--block { width: 100%; }

  /* toggle (C18 "Показывать в меню") — 42×24, size explicitly */
  .adm-toggle { position: relative; display: inline-block; width: 42px; height: 24px; flex-shrink: 0; }
  .adm-toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
  .adm-toggle__track { position: absolute; inset: 0; border-radius: var(--radius-pill); background: var(--border-str); transition: background-color 160ms ease; }
  .adm-toggle__knob { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--surface); transition: transform 200ms var(--ease-out); }
  .adm-toggle input:checked + .adm-toggle__track { background: var(--ink); }
  .adm-toggle input:checked + .adm-toggle__track .adm-toggle__knob { transform: translateX(18px); }

  /* breadcrumb / toolbar / search / empty */
  .adm-crumb { font-size: 13px; color: var(--text-mute); margin-bottom: 14px; }
  .adm-crumb__link { color: var(--purple-ink); text-decoration: none; cursor: pointer; }
  .adm-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
  .adm-toolbar__controls { display: flex; align-items: center; gap: 10px; }
  .adm-count { font-size: var(--text-body-sm); color: var(--text-faint); }
  .adm-search { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border: 1px solid var(--border); border-radius: var(--radius-pill); background: var(--surface); transition: border-color 150ms ease, box-shadow 150ms ease; }
  .adm-search:focus-within { outline: 2px solid var(--purple-ink); outline-offset: 2px; border-color: var(--purple-ink); box-shadow: 0 0 0 3px var(--purple-soft); }
  .adm-search__icon { display: inline-flex; align-items: center; justify-content: center; border: 0; padding: 0; background: none; cursor: pointer; color: var(--text-faint); transition: color 150ms ease; }
  .adm-search__icon:hover { color: var(--text-mute); }
  .adm-search input { border: 0; outline: none; background: none; font-family: inherit; font-size: 13px; color: var(--text); min-width: 220px; }
  .adm-select { height: 36px; padding: 0 34px 0 14px; border: 1px solid var(--border); border-radius: var(--radius-pill); background: var(--surface); font-family: inherit; font-size: 13px; color: var(--text); cursor: pointer; appearance: none; background-image: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%235e5e58' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; transition: border-color 150ms ease, box-shadow 150ms ease; }
  .adm-select:focus { outline: 2px solid var(--purple-ink); outline-offset: 2px; border-color: var(--purple-ink); box-shadow: 0 0 0 3px var(--purple-soft); }
  .adm-empty { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 60px 24px; display: flex; flex-direction: column; align-items: center; text-align: center; }
  .adm-empty__icon { width: 54px; height: 54px; border-radius: var(--radius-lg); background: var(--surface-2); color: var(--empty-icon); display: flex; align-items: center; justify-content: center; margin-bottom: 16px; }
  .adm-empty__title { font-size: 15.5px; font-weight: var(--weight-extrabold); color: var(--text); }
  .adm-empty__body { font-size: 13px; color: var(--text-faint); max-width: 340px; margin-top: 8px; line-height: var(--leading-body); }

  /* menu editor (C8) */
  .adm-menu-cat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); margin-bottom: 16px; overflow: hidden; }
  .adm-menu-cat__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--surface-3); border-bottom: 1px solid var(--border-faint); padding: 14px 16px; }
  .adm-menu-cat__title { font-size: 14.5px; font-weight: var(--weight-extrabold); color: var(--text); }
  .adm-menu-cat__actions { display: flex; align-items: center; gap: 8px; }
  .adm-menu-cat__body { padding: 4px 16px 12px; }
  .adm-menu-cat__empty { padding: 24px; text-align: center; color: var(--text-faint); font-size: 13px; }
  .adm-icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); color: var(--text-mute); cursor: pointer; transition: transform 120ms var(--ease-out), background-color 120ms ease; }
  .adm-icon-btn:active { transform: scale(0.96); }
  .adm-icon-btn--danger { color: var(--danger); }
  .adm-icon-btn--sm { width: 28px; height: 28px; }   /* item-row edit/delete (design 28px vs 30px category head) */
  .adm-menu-item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border-faint); }
  .adm-menu-item:last-child { border-bottom: 0; }
  /* name grows to absorb slack so the price + action buttons form a fixed
     right-hand cluster — aligned column across rows regardless of name length. */
  .adm-menu-item__name { flex: 1; min-width: 0; font-size: 14px; font-weight: var(--weight-bold); color: var(--text); }
  .adm-menu-item__desc { font-size: var(--text-body-sm); font-weight: var(--weight-medium); color: var(--text-faint); }
  .adm-menu-item__price { font-family: var(--font-mono); font-size: 13.5px; font-weight: var(--weight-semibold); color: var(--text); white-space: nowrap; font-variant-numeric: tabular-nums; }

  /* order-detail composite (C14) + KV info cards (C14/C17) */
  .adm-detail-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 20px; align-items: start; }
  .adm-order-items { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
  .adm-order-items__head { display: flex; align-items: center; justify-content: space-between; padding: 16px; border-bottom: 1px solid var(--border-faint); }
  .adm-order-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--border-faint); }

  .adm-order-totals { background: var(--surface-3); border-top: 1px solid var(--border); padding: 16px; display: flex; flex-direction: column; gap: 8px; }
  .adm-order-totals__row { display: flex; align-items: center; justify-content: space-between; font-size: 13px; color: var(--text-mute); }
  .adm-order-totals__row .num { font-family: var(--font-mono); color: var(--text); }
  .adm-order-totals__pay { display: flex; align-items: center; justify-content: space-between; font-size: 15px; font-weight: var(--weight-extrabold); color: var(--text); }
  .adm-order-totals__pay .num { font-family: var(--font-mono); font-size: 20px; }
  .adm-side-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 18px; }
  .adm-kv { display: flex; flex-direction: column; gap: 4px; padding: 10px 0; border-bottom: 1px solid var(--border-faint); }
  .adm-kv:last-child { border-bottom: 0; }
  .adm-kv__label { text-transform: uppercase; font-size: var(--text-label); letter-spacing: 0.05em; color: var(--text-faint); }
  .adm-kv__value { font-size: 14px; font-weight: var(--weight-bold); color: var(--text); }
  .adm-kv__value--link { color: var(--purple-ink); text-decoration: none; cursor: pointer; }

  /* Venue and order detail */

  /* Venue profile header */
  .adm-profile-head {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px 22px;
    margin-bottom: 18px;
  }
  .adm-profile-head__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: var(--radius-lg);
    background: var(--surface-2);
    color: var(--text-mute);
    flex: none;
  }
  .adm-profile-head__id { flex: 1 1 auto; min-width: 0; }
  .adm-profile-head__namerow { display: flex; align-items: center; gap: 10px; }
  .adm-profile-head__name {
    font-size: 18px;
    font-weight: var(--weight-extrabold);
    letter-spacing: var(--tracking-tight);
    color: var(--text);
  }
  .adm-profile-head__meta { margin-top: 4px; font-size: var(--text-body-sm); color: var(--text-mute); }
  .adm-profile-head__actions { display: flex; gap: 10px; flex: none; }
  .adm-inline-form { display: inline-flex; }

  /* Order-detail right column + KV info card (C14) */
  .adm-detail-side { display: flex; flex-direction: column; gap: 14px; }
  .adm-side-card--kv { display: flex; flex-direction: column; }

  /* Venue overview two-column grid (C17: Реквизиты | Кампании) */
  .adm-venue-grid {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 18px;
    align-items: start;
    margin-top: 18px;  /* separate from the stat-cards row above (prototype rhythm) */
  }
  .adm-venue-camps { display: flex; flex-direction: column; gap: 12px; }

  /* Mono cell (email) */
  .adm-cell-mono { font-family: var(--font-mono); }

  /* Order-items sub-elements (C14) */
  .adm-order-items__title { font-size: 14.5px; font-weight: var(--weight-extrabold); color: var(--text); }
  .adm-order-items__body { display: flex; flex-direction: column; }
  .adm-order-item__name { font-weight: var(--weight-semibold); color: var(--text); }
  .adm-order-item__qty { color: var(--text-mute); font-weight: var(--weight-medium); }
  .adm-order-item__price { font-family: var(--font-mono); color: var(--text); }

  /* Order-totals sub-elements (C14) */
  .adm-order-totals__val { font-family: var(--font-mono); color: var(--text); }
  .adm-order-totals__val--minus { color: var(--danger); }
  .adm-order-totals__rule { height: 1px; background: var(--border); margin: 6px 0; }
  .adm-order-totals__paynum { font-family: var(--font-mono); font-size: 20px; font-weight: var(--weight-extrabold); color: var(--text); }

  /* KV sub-elements (C14/C17) */
  .adm-kv__sub { margin-top: 3px; font-size: 12px; color: var(--text-faint); }
  .adm-kv__rule { height: 1px; background: var(--border-faint); margin: 12px 0; }

  /* ══ Surface C — design-match additions (login, chips, range rows, links) ══ */

  /* login screen (standalone centered card — NOT the sidebar shell) */
  .adm-login { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--bg); padding: var(--space-4); }
  .adm-login__card { width: 380px; max-width: 100%; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 34px 32px; box-shadow: var(--shadow-pop); }
  .adm-login__mark { width: 46px; height: 46px; border-radius: 13px; background: var(--ink); color: var(--surface); display: flex; align-items: center; justify-content: center; font-weight: var(--weight-extrabold); font-size: 22px; margin: 0 auto 18px; }
  .adm-login__title { text-align: center; margin: 0 0 4px; font-size: 21px; font-weight: var(--weight-extrabold); letter-spacing: var(--tracking-tight); color: var(--text); }
  .adm-login__sub { text-align: center; margin: 0 0 24px; font-size: var(--text-body); color: var(--text-mute); font-weight: var(--weight-medium); }
  .adm-login__fields { display: flex; flex-direction: column; gap: 14px; }
  .adm-login__err { margin-bottom: 16px; }

  /* weekday chip toggles (C5 campaign form) — real checkboxes, styled boxes */
  .adm-days { display: flex; gap: 7px; }
  .adm-day { flex: 1; position: relative; cursor: pointer; }
  .adm-day input { position: absolute; opacity: 0; width: 0; height: 0; }
  .adm-day__box { display: flex; align-items: center; justify-content: center; height: 38px; border-radius: 9px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text-faint); font-size: var(--text-body-sm); font-weight: var(--weight-semibold); transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease; }
  .adm-day input:checked + .adm-day__box { background: var(--ink); border-color: var(--ink); color: var(--surface); font-weight: var(--weight-bold); }
  .adm-day input:focus-visible + .adm-day__box { outline: 2px solid var(--purple-ink); outline-offset: 2px; }

  /* paired range row (time / date) + form divider (C5 campaign, venue form) */
  .adm-range { display: flex; align-items: center; gap: 8px; }
  .adm-range > .adm-field__input { flex: 1; min-width: 0; }
  .adm-range__sep { color: var(--text-faint); }
  .adm-form-rule { height: 1px; background: var(--border-faint); }

  /* small inline purple action links (C4 lifecycle, C6 Меню·Кредиты) */
  .adm-link-sm { color: var(--purple-ink); font-size: var(--text-mono); font-weight: var(--weight-bold); text-decoration: none; cursor: pointer; background: none; border: 0; padding: 0; font-family: inherit; }
  .adm-link-sep { color: var(--border-str); margin: 0 8px; }

  /* ══ Motion & interaction polish (all surfaces) ═════════════════════ */

  /* Hover states, mouse-only — tap-hover on touch screens leaves them stuck. */
  @media (hover: hover) and (pointer: fine) {
    .adm-nav__item:hover { background: var(--surface); }
    .adm-nav__item.is-active:hover { background: var(--purple-soft); }
    .adm-nav__logout:hover { background: var(--surface); }
    .adm-table .tr--link:hover td { background: var(--surface-2); }
    .adm-btn--ghost:hover, .adm-btn--danger:hover, .adm-icon-btn:hover { background: var(--surface-2); }
    .adm-link-sm:hover, .adm-crumb__link:hover, .adm-kv__value--link:hover { text-decoration: underline; }
  }

  /* Keyboard focus — per-surface accent rings (inputs handle :focus above). */
  :is(.btn, .qty__btn, .survey__opt, .review-item__remove,
      .lang-toggle__opt, .app-header__back, .cat-nav__link, .promo-dots__dot,
      .menu-head__venue, .menu-group__title):focus-visible {
    outline: 2px solid var(--accent-consumer); outline-offset: 2px;
  }
  /* Headings that receive moved focus keep no ring after a tap or click
     (menu.js sets data-input); keyboard users still get the one above. */
  [data-input="pointer"] [tabindex="-1"]:focus { outline: none; }

  /* Repeat taps on the cart controls must not trigger double-tap zoom. */
  :is(.btn, .qty__btn, .review-item__remove, .cat-nav__link) { touch-action: manipulation; }
  :is(.vb-btn, .vb-tabbar__tab, .vb-header__back, .vb-header__logout,
      .vb-order, .vb-balance, .vb-menuqr, .vb-qr__link, .pay__btn):focus-visible {
    outline: 2px solid var(--ink); outline-offset: 2px;
  }
  :is(.adm-btn, .adm-icon-btn, .adm-nav__item, .adm-nav__logout, .adm-link-sm,
      .adm-crumb__link, .adm-kv__value--link):focus-visible {
    outline: 2px solid var(--purple-ink); outline-offset: 2px;
  }
  .adm-toggle input:focus-visible + .adm-toggle__track { outline: 2px solid var(--purple-ink); outline-offset: 2px; }

  /* Touch hit areas — the visible control keeps its design size; a
     transparent pseudo-element extends the tap target toward 40×40.
     Extensions are sized so neighbouring targets never overlap (qty − and +
     stay ≥10px apart at full extension; header icons stop at the toggle). */
  .qty__btn, .review-item__remove, .app-header__back, .vb-header__back, .vb-header__logout { position: relative; }
  .qty__btn::before { content: ""; position: absolute; inset: -5px; }
  .qty--sm .qty__btn::before { inset: -6px; }
  .review-item__remove::before { content: ""; position: absolute; inset: -6px; }
  .app-header__back::before, .vb-header__back::before { content: ""; position: absolute; inset: -10px -8px; }
  .vb-header__logout::before { content: ""; position: absolute; inset: -8px; }

  /* Text wrapping — balanced headings, orphan-free body copy (progressive
     enhancement; unsupported browsers keep default greedy wrapping). */
  :is(.cart-empty__title, .ostate__title, .spinner-label, .survey__q,
      .vb-login__title, .vb-result__title, .adm-login__title, .adm-empty__title) { text-wrap: balance; }
  :is(.ostate__text, .qr-hint, .menu-item__desc, .vb-login__sub,
      .vb-lowbal, .vb-scanhint__text, .adm-empty__body, .adm-note, .adm-info-note) { text-wrap: pretty; }

  /* Narrow admin screens keep navigation above the content; wide tables
     scroll within their own frame. */
  @media (max-width: 900px) {
    .adm-shell { display: block; height: auto; min-height: 100dvh; overflow: visible; }
    .adm-sidebar { width: auto; border-right: 0; border-bottom: 1px solid var(--border); }
    .adm-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .adm-main { min-width: 0; overflow: visible; }
    .adm-topbar { min-height: var(--density-topbar-h); height: auto; padding: 14px 16px; gap: 12px; flex-wrap: wrap; }
    .adm-topbar__title { overflow-wrap: anywhere; }
    .adm-content { overflow: visible; min-width: 0; padding: 20px 16px 40px; }
    .adm-split-hd, .adm-detail-grid, .adm-form-grid { grid-template-columns: minmax(0, 1fr); }
    .adm-cards { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
    .adm-card { min-width: 0; }
    .adm-field { min-width: 0; }
    .adm-section-head, .adm-total-cards { flex-direction: column; align-items: stretch; }
    .adm-toolbar, .adm-toolbar__controls, .adm-funnel__side { flex-wrap: wrap; }
    .adm-toolbar__controls { width: 100%; }
    .adm-search { max-width: 100%; }
    .adm-search input { min-width: 0; width: 100%; }
    .adm-survey { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  }

  /* Reduced motion: keep opacity/color feedback, drop movement. The
     spinners stay — a static loading indicator reads as a hang. */
  @media (prefers-reduced-motion: reduce) {
    .menu-list, .review, .cart-empty, .sticky-cta__cart { transition-property: opacity; }

    :is(.btn, .qty__btn, .survey__opt, .review-item__remove, .pay__btn,
        .vb-btn, .vb-order, .vb-balance, .vb-menuqr, .adm-btn, .adm-icon-btn):active { transform: none; }
  }
}

@layer components {
  .adjustment { display: grid; gap: var(--space-4); margin-block: var(--space-6); }
  .adjustment h1 { font-size: var(--text-h3); }
  .adjustment h2 { font-size: var(--text-body-lg); }
  .adjustment form { display: grid; gap: var(--space-3); }
  .adjustment-item { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-2); padding: var(--space-3); border: 1px solid var(--border); border-radius: var(--radius-md); }
  .adjustment-item legend { max-width: 100%; overflow-wrap: anywhere; padding-inline: var(--space-2); font-weight: var(--weight-semibold); }
  .adjustment input:not([type="hidden"]):not([type="checkbox"]), .adjustment textarea, .adjustment select { width: 100%; min-width: 0; padding: var(--space-3); border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); font: inherit; }
  .adjustment textarea { min-height: var(--space-12); resize: vertical; }
  .adjustment dl { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-3); padding: var(--space-4); background: var(--surface-2); border-radius: var(--radius-md); }
  .adjustment dd { font-family: var(--font-mono); text-align: end; }
  .adjustment details { padding: var(--space-3); border: 1px solid var(--border); border-radius: var(--radius-sm); }
  .adjustment details p { margin-block-start: var(--space-2); overflow-wrap: anywhere; }
  .adjustment summary { cursor: pointer; font-weight: var(--weight-semibold); }
  .adjustment-actions { display: flex; flex-wrap: wrap; gap: var(--space-3); }
  .adjustment-actions a { padding-inline: var(--space-4); }
}
