/* ==========================================================================
   صالون حمزة الجابي — دفتر الدور
   Espresso + brass + paper. The queue is a real notebook page.
   ========================================================================== */

:root {
  --bg: #0f0d0b;
  --bg-2: #171310;
  --bg-3: #211b16;
  --edge: rgba(241, 215, 155, 0.10);
  --edge-2: rgba(241, 215, 155, 0.18);
  --text: #f3ead8;
  --text-2: rgba(243, 234, 216, 0.66);
  --text-3: rgba(243, 234, 216, 0.42);

  --brass: #c9a25a;
  --brass-hi: #f1d79b;
  --brass-lo: #8a6a33;
  --leather: #4a2c1d;
  --leather-2: #2c1911;

  --paper: #f5eedd;
  --paper-2: #ece2cb;
  --paper-shadow: #cdbd9a;
  --rule: rgba(64, 98, 150, 0.22);
  --margin: #cf5448;
  --ink: #1b2a4a;
  --ink-2: rgba(27, 42, 74, 0.55);
  --ink-red: #b2352b;
  --hi: rgba(255, 209, 64, 0.62);

  --ok: #4fa86b;
  --warn: #e0a640;
  --bad: #d65a4b;

  --row: 46px;
  --radius: 18px;
  --radius-lg: 26px;

  --ui: "Readex Pro", system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;
  --hand: "Aref Ruqaa", "Readex Pro", serif;

  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-in-out: cubic-bezier(.65, 0, .35, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);

  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);

  --grain: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 .55 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

@supports (transition-timing-function: linear(0, 1)) {
  :root {
    --spring: linear(0, 0.009, 0.035 2.1%, 0.141, 0.281 6.7%, 0.723 12.9%, 0.938 16.7%, 1.017, 1.077, 1.121, 1.149 24.3%, 1.159, 1.163, 1.161, 1.154 29.9%, 1.129 32.8%, 1.051 39.6%, 1.017 43.1%, 0.991, 0.977 51%, 0.974 53.8%, 0.975 57.1%, 0.997 69.8%, 1.003 76.9%, 1.004 83.8%, 1);
    --spring-soft: linear(0, 0.006, 0.025 2.8%, 0.101 6.1%, 0.539 18.9%, 0.721 25.3%, 0.849 31.5%, 0.937 38.1%, 0.968 41.8%, 0.991 45.7%, 1.006 50.1%, 1.015 55%, 1.017 63.9%, 1.001);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
html { -webkit-text-size-adjust: 100%; color-scheme: dark; }
body {
  font-family: var(--ui);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
  min-height: 100dvh;
}
body::before { /* warm vignette + grain over the whole app */
  content: "";
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(120% 70% at 50% -10%, rgba(201, 162, 90, 0.16), transparent 60%),
    radial-gradient(80% 60% at 100% 110%, rgba(207, 84, 72, 0.08), transparent 60%);
}
body::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 100;
  background-image: var(--grain); opacity: .06; mix-blend-mode: overlay;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; touch-action: manipulation; user-select: none; -webkit-user-select: none; }
input { -webkit-appearance: none; appearance: none; }
:focus-visible { outline: 2px solid var(--brass-hi); outline-offset: 3px; border-radius: 10px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; }
.num { font-variant-numeric: tabular-nums; }

#app { position: relative; z-index: 1; min-height: 100dvh; }

/* ---------- Splash: barber pole ---------- */
.splash {
  position: fixed; inset: 0; display: grid; place-content: center; justify-items: center; gap: 10px;
  background: var(--bg); z-index: 50;
  transition: opacity .5s var(--ease-out), transform .6s var(--ease-out);
}
.splash.out { opacity: 0; transform: scale(1.04); pointer-events: none; }
.pole {
  width: 34px; height: 120px; border-radius: 17px; overflow: hidden; position: relative; margin-bottom: 18px;
  box-shadow: 0 0 0 3px var(--brass-lo), 0 0 0 5px var(--bg), 0 0 0 6px var(--brass), 0 20px 50px rgba(207, 84, 72, .35);
}
.pole span {
  position: absolute; inset: -60px 0 0 0;
  background: repeating-linear-gradient(-35deg, #f5eedd 0 12px, #cf5448 12px 24px, #f5eedd 24px 36px, #2d4c8c 36px 48px);
  animation: pole 1.1s linear infinite;
}
.pole::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,0,0,.35), transparent 40%, rgba(255,255,255,.35) 60%, rgba(0,0,0,.3)); }
@keyframes pole { to { transform: translateY(60px); } }
.splash-title { font-family: var(--hand); font-size: 44px; line-height: 1; color: var(--brass-hi); }
.splash-sub { color: var(--text-3); letter-spacing: .3em; font-size: 13px; }

/* ---------- Generic UI ---------- */
.screen { max-width: 560px; margin: 0 auto; padding: calc(14px + var(--safe-t)) 16px calc(120px + var(--safe-b)); position: relative; }
.screen.wide { max-width: 1120px; }
.enter-up { animation: enterUp .7s var(--ease-out) both; }
@keyframes enterUp { from { opacity: 0; transform: translateY(18px); } }

.btn {
  --b: var(--brass);
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 54px; padding: 0 22px; border-radius: 16px; font-weight: 600; font-size: 17px;
  transition: transform .35s var(--spring), box-shadow .3s var(--ease-out), background .3s, opacity .3s;
  will-change: transform;
}
.btn:active { transform: scale(.96); transition-duration: .08s; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn-brass {
  color: #2a1c0c;
  background: linear-gradient(180deg, var(--brass-hi), var(--brass) 55%, #b48a45);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.6), inset 0 -2px 0 rgba(0,0,0,.18), 0 10px 26px -8px rgba(201,162,90,.6);
}
.btn-ghost { background: rgba(243,234,216,.06); color: var(--text); box-shadow: inset 0 0 0 1px var(--edge-2); }
.btn-ghost:hover { background: rgba(243,234,216,.09); }
.btn-danger { background: rgba(214,90,75,.14); color: #ffb3a8; box-shadow: inset 0 0 0 1px rgba(214,90,75,.35); }
.btn-block { width: 100%; }
.btn-sm { min-height: 40px; padding: 0 14px; font-size: 14px; border-radius: 12px; }
.icon-btn {
  width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; color: var(--text-2);
  background: rgba(243,234,216,.05); box-shadow: inset 0 0 0 1px var(--edge);
  transition: transform .35s var(--spring), color .2s, background .2s;
}
.icon-btn:active { transform: scale(.9); }
.icon-btn:hover { color: var(--text); }
.icon { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-sm { width: 18px; height: 18px; }

.ripple { position: absolute; border-radius: 50%; pointer-events: none; background: currentColor; opacity: .25; transform: scale(0); animation: ripple .6s var(--ease-out) forwards; }
@keyframes ripple { to { transform: scale(1); opacity: 0; } }
.btn, .icon-btn, .row, .chip, .tab { overflow: hidden; }

.field { display: grid; gap: 8px; }
.field label { font-size: 13px; color: var(--text-2); padding-inline: 4px; }
.input {
  height: 56px; width: 100%; padding: 0 18px; border-radius: 16px; border: 0; font-size: 17px;
  background: rgba(15,13,11,.55); color: var(--text);
  box-shadow: inset 0 0 0 1px var(--edge-2), inset 0 2px 6px rgba(0,0,0,.35);
  transition: box-shadow .25s var(--ease-out), background .25s;
}
.input::placeholder { color: var(--text-3); }
.input:focus { outline: none; box-shadow: inset 0 0 0 2px var(--brass), 0 0 0 5px rgba(201,162,90,.14); background: rgba(15,13,11,.75); }
.field.err .input, .pin.err .pin-box { box-shadow: inset 0 0 0 2px var(--bad); }
.shake { animation: shake .45s cubic-bezier(.36,.07,.19,.97); }
@keyframes shake { 15%, 85% { transform: translateX(-2px); } 30%, 70% { transform: translateX(5px); } 45%, 55% { transform: translateX(-7px); } }

.pin { display: flex; gap: 10px; direction: ltr; justify-content: center; position: relative; }
.pin-box {
  width: 60px; height: 66px; border-radius: 16px; display: grid; place-items: center; font-size: 28px; font-weight: 600;
  background: rgba(15,13,11,.55); box-shadow: inset 0 0 0 1px var(--edge-2), inset 0 2px 6px rgba(0,0,0,.35);
  transition: box-shadow .2s, transform .35s var(--spring);
}
.pin-box.focus { box-shadow: inset 0 0 0 2px var(--brass), 0 0 0 5px rgba(201,162,90,.14); }
.pin-box.filled { transform: scale(1.0); animation: pop .35s var(--spring); }
.pin-box.filled::after { content: ""; width: 14px; height: 14px; border-radius: 50%; background: var(--brass-hi); box-shadow: 0 0 12px rgba(241,215,155,.6); }
.pin-box.focus::before { content: ""; width: 2px; height: 26px; background: var(--brass-hi); animation: caret 1s steps(1) infinite; }
.pin-box.filled.focus::before { display: none; }
@keyframes caret { 50% { opacity: 0; } }
@keyframes pop { 0% { transform: scale(.85); } }
.pin input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; font-size: 16px; caret-color: transparent; }

.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: 999px; font-size: 14px;
  background: rgba(243,234,216,.05); color: var(--text-2); box-shadow: inset 0 0 0 1px var(--edge);
  transition: background .25s, color .25s, transform .3s var(--spring), box-shadow .25s; white-space: nowrap; position: relative;
}
.chip:active { transform: scale(.94); }
.chip[aria-pressed="true"] { background: var(--brass); color: #2a1c0c; box-shadow: none; font-weight: 600; }
.chip .count { font-size: 12px; opacity: .8; }

.badge { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 999px; font-size: 12.5px; font-weight: 500; }
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge.ok { color: #8fe0a8; background: rgba(79,168,107,.14); }
.badge.wait { color: #f4c873; background: rgba(224,166,64,.14); }
.badge.bad { color: #ff9d90; background: rgba(214,90,75,.14); }

.card {
  background: linear-gradient(180deg, rgba(243,234,216,.055), rgba(243,234,216,.025));
  border-radius: var(--radius-lg); box-shadow: inset 0 0 0 1px var(--edge), 0 20px 50px -30px rgba(0,0,0,.8);
  position: relative;
}

/* ---------- Top bar ---------- */
.topbar { display: flex; align-items: center; gap: 12px; padding: 6px 2px 16px; }
.brand { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
.brand-mark {
  width: 46px; height: 46px; border-radius: 14px; flex: none; display: grid; place-items: center;
  background: radial-gradient(circle at 30% 25%, #6a4029, var(--leather-2)); color: var(--brass-hi);
  box-shadow: inset 0 0 0 1px rgba(241,215,155,.25), 0 8px 20px -8px rgba(0,0,0,.8);
}
.brand-mark .icon { width: 24px; height: 24px; }
.brand-name { font-family: var(--hand); font-size: 25px; line-height: 1.05; color: var(--brass-hi); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-sub { font-size: 12.5px; color: var(--text-3); display: flex; align-items: center; gap: 8px; }
.live { display: inline-flex; align-items: center; gap: 6px; }
.live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 rgba(79,168,107,.6); animation: livePulse 2s infinite; }
.live.closed::before { background: var(--bad); animation: none; }
.live.offline::before { background: var(--text-3); animation: none; }
@keyframes livePulse { 70% { box-shadow: 0 0 0 8px rgba(79,168,107,0); } 100% { box-shadow: 0 0 0 0 rgba(79,168,107,0); } }

/* ---------- AUTH: leather cover ---------- */
.auth { min-height: 100dvh; display: grid; align-content: center; padding: calc(24px + var(--safe-t)) 18px calc(24px + var(--safe-b)); max-width: 460px; margin: 0 auto; perspective: 1600px; }
.cover {
  position: relative; border-radius: 10px 26px 26px 10px; padding: 34px 26px 28px; overflow: hidden;
  background:
    radial-gradient(120% 90% at 20% 0%, rgba(255,255,255,.08), transparent 50%),
    radial-gradient(100% 80% at 100% 100%, rgba(0,0,0,.45), transparent 60%),
    linear-gradient(160deg, #5c3523, var(--leather) 40%, var(--leather-2));
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.06), inset -14px 0 18px -10px rgba(0,0,0,.55),
    0 40px 80px -30px rgba(0,0,0,.9), 0 2px 0 #1a0f09, 0 4px 0 #e9dfc6, 0 6px 0 #d8caa9, 0 8px 0 #1a0f09;
  transform-origin: right center; transform-style: preserve-3d;
  animation: coverIn 1s var(--ease-out) both;
}
@keyframes coverIn { from { opacity: 0; transform: rotateY(-25deg) translateY(30px) scale(.96); } }
.cover::before { content: ""; position: absolute; inset: 0; background-image: var(--grain); opacity: .5; mix-blend-mode: multiply; pointer-events: none; }
.cover::after { /* stitched border */
  content: ""; position: absolute; inset: 12px; border-radius: 4px 18px 18px 4px; pointer-events: none;
  border: 1.5px dashed rgba(241,215,155,.32);
}
.cover-spine { position: absolute; top: 0; bottom: 0; right: 0; width: 22px; background: linear-gradient(90deg, rgba(0,0,0,.35), rgba(255,255,255,.06) 60%, rgba(0,0,0,.25)); }
.cover-head { text-align: center; position: relative; z-index: 1; margin-bottom: 26px; }
.foil {
  font-family: var(--hand); font-weight: 700; font-size: clamp(40px, 12vw, 54px); line-height: 1.1;
  background: linear-gradient(100deg, #a07b3c 0%, #f8e5b0 22%, #c9a25a 40%, #fff2c8 52%, #b48a45 70%, #f1d79b 100%);
  background-size: 250% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 1px 0 rgba(0,0,0,.6)) drop-shadow(0 -1px 0 rgba(255,255,255,.08));
  animation: foil 6s ease-in-out infinite;
}
@keyframes foil { 50% { background-position: 100% 0; } }
.cover-kicker { font-size: 12px; letter-spacing: .35em; color: rgba(241,215,155,.6); margin-bottom: 6px; }
.cover-sub { color: rgba(243,234,216,.7); font-size: 14.5px; margin-top: 8px; }
.ornament { display: flex; align-items: center; justify-content: center; gap: 10px; color: rgba(241,215,155,.55); margin: 14px 0 0; }
.ornament::before, .ornament::after { content: ""; height: 1px; width: 56px; background: linear-gradient(90deg, transparent, currentColor, transparent); }

.seg { position: relative; display: grid; grid-template-columns: 1fr 1fr; padding: 5px; border-radius: 16px; background: rgba(0,0,0,.35); box-shadow: inset 0 0 0 1px rgba(241,215,155,.12); margin-bottom: 20px; z-index: 1; }
.seg button { position: relative; z-index: 1; height: 44px; border-radius: 12px; font-weight: 500; color: var(--text-2); transition: color .3s; }
.seg button[aria-selected="true"] { color: #2a1c0c; font-weight: 600; }
.seg .seg-ind { position: absolute; top: 5px; bottom: 5px; right: 5px; width: calc(50% - 5px); border-radius: 12px; background: linear-gradient(180deg, var(--brass-hi), var(--brass)); box-shadow: 0 6px 16px -6px rgba(201,162,90,.7); transition: transform .5s var(--spring); }
.seg[data-i="1"] .seg-ind { transform: translateX(-100%); }

.auth-form { position: relative; z-index: 1; display: grid; gap: 16px; }
.auth-form .collapse { display: grid; grid-template-rows: 1fr; transition: grid-template-rows .45s var(--ease-out), opacity .35s; }
.auth-form .collapse > div { overflow: hidden; }
.auth-form .collapse.hide { grid-template-rows: 0fr; opacity: 0; }
.auth-note { text-align: center; color: rgba(243,234,216,.55); font-size: 13px; margin-top: 4px; }
.auth-note b { color: var(--brass-hi); font-weight: 600; }
.cover.open { animation: coverOpen .9s var(--ease-in-out) forwards; }
@keyframes coverOpen { to { transform: rotateY(-100deg); opacity: 0; } }

/* ---------- LOCK SCREEN ---------- */
.lock-wrap { position: relative; margin-top: 8px; }
.locked-book { position: relative; border-radius: 8px 22px 22px 8px; overflow: hidden; filter: saturate(.85); }
.locked-book .page { pointer-events: none; }
.locked-book .page .row-name { filter: blur(5px); }
.strap {
  position: absolute; top: 0; bottom: 0; left: 50%; width: 64px; transform: translateX(-50%);
  background: linear-gradient(90deg, #2c1911, #5c3523 30%, #4a2c1d 70%, #2c1911);
  box-shadow: 0 0 0 1px rgba(0,0,0,.4), 6px 0 18px rgba(0,0,0,.35), -6px 0 18px rgba(0,0,0,.35);
  transform-origin: top center; z-index: 2;
}
.strap::before { content: ""; position: absolute; inset: 0 8px; border-inline: 1.5px dashed rgba(241,215,155,.3); }
.padlock { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 3; width: 96px; filter: drop-shadow(0 14px 22px rgba(0,0,0,.6)); }
.padlock .shackle { transform-origin: 70% 100%; transition: transform .6s var(--spring); }
.lock-wrap.unlocking .padlock .shackle { transform: translateY(-14px) rotate(-28deg); }
.lock-wrap.unlocking .padlock { animation: lockAway 1.1s .45s var(--ease-in-out) forwards; }
.lock-wrap.unlocking .strap { animation: strapFall 1s .55s var(--ease-in-out) forwards; }
.lock-wrap.unlocking .locked-book .row-name { transition: filter .8s 1s; filter: none; }
@keyframes lockAway { to { transform: translate(-50%, 160%) rotate(30deg); opacity: 0; } }
@keyframes strapFall { to { transform: translateX(-50%) translateY(110%) rotate(-6deg); } }
.lock-card { margin-top: -54px; position: relative; z-index: 4; padding: 26px 20px 22px; text-align: center; background: linear-gradient(180deg, rgba(33,27,22,.96), rgba(23,19,16,.98)); backdrop-filter: blur(10px); }
.lock-title { font-size: 22px; font-weight: 700; margin: 0 0 6px; }
.lock-text { color: var(--text-2); margin: 0 auto 18px; max-width: 34ch; font-size: 15px; }
.price-tag {
  display: inline-flex; align-items: baseline; gap: 6px; padding: 6px 16px 6px 18px; margin-bottom: 18px;
  font-family: var(--hand); font-size: 40px; color: #2a1c0c; line-height: 1.1;
  background: linear-gradient(180deg, var(--brass-hi), var(--brass)); border-radius: 10px 10px 10px 10px;
  clip-path: polygon(14px 0, 100% 0, 100% 100%, 14px 100%, 0 50%);
  padding-inline-start: 30px; transform: rotate(-3deg);
  box-shadow: 0 10px 30px -10px rgba(201,162,90,.7);
}
.price-tag small { font-family: var(--ui); font-size: 14px; font-weight: 600; }
.code-label { font-size: 13px; color: var(--text-3); margin-bottom: 10px; }
.code { display: flex; justify-content: center; gap: 8px; direction: ltr; margin-bottom: 22px; }
.code span {
  width: 54px; height: 64px; display: grid; place-items: center; border-radius: 12px; font-size: 32px; font-weight: 700;
  color: var(--ink); background: var(--paper); box-shadow: inset 0 -3px 0 var(--paper-shadow), 0 8px 18px -8px rgba(0,0,0,.7);
  animation: codeIn .6s var(--spring) both;
}
.code span:nth-child(2) { animation-delay: .06s; } .code span:nth-child(3) { animation-delay: .12s; } .code span:nth-child(4) { animation-delay: .18s; }
@keyframes codeIn { from { transform: translateY(16px) rotateX(70deg); opacity: 0; } }
.steps { display: grid; gap: 10px; text-align: start; margin-bottom: 18px; }
.step { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: rgba(243,234,216,.04); box-shadow: inset 0 0 0 1px var(--edge); font-size: 14.5px; }
.step i { font-style: normal; width: 30px; height: 30px; border-radius: 50%; flex: none; display: grid; place-items: center; font-weight: 700; font-size: 14px; color: var(--brass-hi); box-shadow: inset 0 0 0 1.5px rgba(201,162,90,.5); }
.waiting-dots { display: inline-flex; gap: 4px; margin-inline-start: 6px; }
.waiting-dots b { width: 5px; height: 5px; border-radius: 50%; background: var(--brass); animation: dot 1.2s infinite; }
.waiting-dots b:nth-child(2) { animation-delay: .15s; } .waiting-dots b:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 0%, 60%, 100% { opacity: .25; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }

/* ---------- NOW SERVING ---------- */
.now {
  padding: 18px 20px 20px; overflow: hidden; display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; align-items: center;
  background: radial-gradient(130% 120% at 100% 0%, rgba(201,162,90,.2), transparent 55%), linear-gradient(180deg, #221b15, #18130f);
}
.now::after { /* brass hairline on top */
  content: ""; position: absolute; top: 0; left: 18%; right: 18%; height: 1px; background: linear-gradient(90deg, transparent, var(--brass-hi), transparent); opacity: .7;
}
.now-label { grid-column: 1 / -1; font-size: 13px; color: var(--text-3); display: flex; align-items: center; gap: 8px; }
.now-label .chair { color: var(--brass); }
.flip { display: flex; gap: 5px; direction: ltr; perspective: 400px; }
.flip-d {
  position: relative; width: 52px; height: 72px; border-radius: 10px; display: grid; place-items: center;
  font-size: 46px; font-weight: 700; color: var(--paper); line-height: 1;
  background: linear-gradient(180deg, #2c241d 0 50%, #241d17 50% 100%);
  box-shadow: inset 0 0 0 1px rgba(241,215,155,.12), 0 10px 20px -10px #000;
  overflow: hidden; transform-style: preserve-3d;
}
.flip-d::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: rgba(0,0,0,.6); box-shadow: 0 1px 0 rgba(255,255,255,.05); }
.flip-d span { display: block; backface-visibility: hidden; }
.flip-d .in { animation: flipIn .55s var(--spring) both; }
.flip-d .out { position: absolute; animation: flipOut .35s var(--ease-in-out) forwards; }
@keyframes flipIn { from { transform: rotateX(-95deg) translateY(-10px); opacity: 0; } }
@keyframes flipOut { to { transform: rotateX(95deg) translateY(10px); opacity: 0; } }
.flip.empty .flip-d { color: var(--text-3); }
.now-who { min-width: 0; }
.now-name { font-family: var(--hand); font-size: 32px; line-height: 1.2; color: var(--paper); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.now-meta { font-size: 13px; color: var(--text-2); display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.now-meta .timer { color: var(--brass-hi); }
.scissor-run { display: inline-block; color: var(--brass); animation: snip .9s ease-in-out infinite; transform-origin: center; }
@keyframes snip { 50% { transform: rotate(-14deg) scale(1.05); } }

/* ---------- TAKE TURN / TICKET ---------- */
.zone { margin: 16px 0; }
.hold {
  position: relative; width: 100%; height: 78px; border-radius: 22px; overflow: hidden; isolation: isolate;
  color: #2a1c0c; font-weight: 700; font-size: 18px; display: flex; align-items: center; justify-content: center; gap: 12px;
  background: linear-gradient(180deg, var(--brass-hi), var(--brass) 55%, #b48a45);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.6), inset 0 -3px 0 rgba(0,0,0,.18), 0 16px 34px -12px rgba(201,162,90,.75);
  transition: transform .4s var(--spring), box-shadow .3s;
}
.hold .fill { position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, #fff3cf, #e8c47c); transform-origin: right; transform: scaleX(0); }
.hold.holding { transform: scale(.975); }
.hold .hint { display: block; font-size: 12px; font-weight: 500; opacity: .7; }
.hold .label { text-align: center; line-height: 1.25; }
.hold .icon { width: 28px; height: 28px; stroke-width: 2; }
.hold.done { animation: holdDone .5s var(--spring); }
@keyframes holdDone { 40% { transform: scale(1.04); } }
.hold.danger { background: rgba(214,90,75,.14); color: #ffb3a8; box-shadow: inset 0 0 0 1px rgba(214,90,75,.35); height: 52px; font-size: 15px; font-weight: 500; border-radius: 16px; }
.hold.danger .fill { background: rgba(214,90,75,.35); }

.closed-note { padding: 22px; text-align: center; color: var(--text-2); }
.closed-note .big { font-family: var(--hand); font-size: 30px; color: var(--paper); }

.slot { position: relative; height: 14px; margin: 0 22px; border-radius: 0 0 8px 8px; background: #0a0807; box-shadow: inset 0 3px 6px #000, 0 1px 0 rgba(241,215,155,.12); z-index: 2; }
.ticket-wrap { overflow: hidden; margin: -8px 10px 0; padding: 0 0 24px; }
.ticket {
  --hole: 13px;
  position: relative; color: var(--ink); padding: 22px 22px 18px;
  background: linear-gradient(180deg, var(--paper), var(--paper-2));
  -webkit-mask: radial-gradient(circle var(--hole) at 0 62%, transparent 98%, #000) , radial-gradient(circle var(--hole) at 100% 62%, transparent 98%, #000);
  -webkit-mask-composite: source-in; mask-composite: intersect;
  mask: radial-gradient(circle var(--hole) at 0 62%, transparent 98%, #000) , radial-gradient(circle var(--hole) at 100% 62%, transparent 98%, #000);
  mask-composite: intersect;
  border-radius: 6px 6px 16px 16px;
  filter: drop-shadow(0 18px 24px rgba(0,0,0,.45));
}
.ticket.print { animation: print 1.1s var(--ease-out) both; }
@keyframes print { 0% { transform: translateY(-105%); } 70% { transform: translateY(2%); } 100% { transform: translateY(0); } }
.ticket::before { content: ""; position: absolute; inset: 0; background-image: var(--grain); opacity: .25; mix-blend-mode: multiply; pointer-events: none; border-radius: inherit; }
.ticket-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.ticket-k { font-size: 12.5px; color: var(--ink-2); font-weight: 500; }
.ticket-no { font-family: var(--hand); font-size: 76px; line-height: .95; color: var(--ink-red); direction: ltr; }
.ticket-no small { font-family: var(--ui); font-size: 22px; color: var(--ink-2); margin-inline-end: 4px; }
.ticket-ahead { text-align: start; }
.ticket-ahead .n { font-size: 40px; font-weight: 700; line-height: 1; }
.ticket-ahead .t { font-size: 13px; color: var(--ink-2); }
.perf { margin: 18px -22px 14px; border-top: 2px dashed rgba(27,42,74,.25); }
.track { position: relative; height: 44px; display: flex; align-items: center; gap: 8px; direction: rtl; padding-inline: 4px; }
.track .seat { flex: none; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--ink); color: var(--paper); }
.track .seat .icon { width: 20px; height: 20px; }
.track .line { position: absolute; inset-inline: 30px 10px; top: 50%; height: 2px; background: repeating-linear-gradient(90deg, rgba(27,42,74,.25) 0 6px, transparent 6px 12px); z-index: 0; }
.track .people { position: relative; display: flex; gap: 8px; z-index: 1; flex-wrap: nowrap; overflow: hidden; }
.track .p { width: 14px; height: 14px; border-radius: 50%; background: rgba(27,42,74,.35); flex: none; transition: transform .5s var(--spring); }
.track .p.me { width: 28px; height: 28px; background: var(--ink-red); box-shadow: 0 0 0 4px rgba(178,53,43,.18); display: grid; place-items: center; color: #fff; font-size: 11px; font-weight: 700; animation: meBob 2.4s ease-in-out infinite; }
.track .p.more { width: auto; height: 20px; padding: 0 7px; border-radius: 10px; font-size: 11px; color: var(--ink-2); background: rgba(27,42,74,.1); display: grid; place-items: center; }
@keyframes meBob { 50% { transform: translateY(-3px); } }
.ticket-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 12px; font-size: 13.5px; color: var(--ink-2); }
.ticket-foot b { color: var(--ink); font-size: 15px; }
.ticket.serving { background: linear-gradient(180deg, #fff6d8, #f3dfa6); }
.ticket.serving .ticket-no { animation: throb 1.4s ease-in-out infinite; }
@keyframes throb { 50% { transform: scale(1.06); } }
.ticket-actions { display: flex; gap: 10px; margin-top: 12px; }
.ticket-actions > * { flex: 1; }

.notif-prompt { display: flex; gap: 14px; align-items: center; padding: 14px 16px; margin: 0 0 16px; }
.notif-prompt .bell { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; flex: none; background: rgba(201,162,90,.15); color: var(--brass-hi); }
.notif-prompt .bell .icon { animation: ring 2.6s ease-in-out infinite; transform-origin: 50% 10%; }
@keyframes ring { 0%, 70%, 100% { transform: rotate(0); } 75% { transform: rotate(16deg); } 80% { transform: rotate(-14deg); } 85% { transform: rotate(10deg); } 90% { transform: rotate(-6deg); } }
.notif-prompt .txt { flex: 1; font-size: 14px; color: var(--text-2); }
.notif-prompt .txt b { display: block; color: var(--text); font-size: 15px; }

/* ---------- THE BOOK ---------- */
.book { position: relative; margin-top: 8px; }
.binding { display: flex; justify-content: space-around; padding: 0 22px; height: 26px; position: relative; z-index: 2; margin-bottom: -13px; }
.binding i { width: 10px; height: 26px; border-radius: 6px; background: linear-gradient(90deg, #6d6d6d, #e8e8e8 45%, #8a8a8a); box-shadow: 0 2px 3px rgba(0,0,0,.5); }
.page {
  position: relative; color: var(--ink); border-radius: 6px 6px 14px 14px; overflow: hidden;
  padding: 30px 0 calc(var(--row) * .5);
  background:
    linear-gradient(90deg, transparent calc(100% - 62px), var(--margin) calc(100% - 62px), var(--margin) calc(100% - 60.5px), transparent calc(100% - 60.5px), transparent calc(100% - 57px), rgba(207,84,72,.5) calc(100% - 57px), rgba(207,84,72,.5) calc(100% - 56px), transparent calc(100% - 56px)),
    repeating-linear-gradient(180deg, transparent 0 calc(var(--row) - 1px), var(--rule) calc(var(--row) - 1px) var(--row)),
    linear-gradient(180deg, var(--paper), var(--paper-2));
  background-position: 0 0, 0 calc(30px + var(--row) - 0px), 0 0;
  box-shadow: 0 1px 0 #ddd0b2, 0 3px 0 var(--paper-2), 0 4px 0 #cbbb98, 0 6px 0 var(--paper-2), 0 7px 0 #bfae88, 0 30px 60px -20px rgba(0,0,0,.85);
}
.page::before { content: ""; position: absolute; inset: 0; background-image: var(--grain); opacity: .22; mix-blend-mode: multiply; pointer-events: none; }
.page::after { /* binding holes */
  content: ""; position: absolute; top: 4px; left: 22px; right: 22px; height: 10px; pointer-events: none;
  background: radial-gradient(circle 5px at 5px 5px, #c4b590 0 4px, transparent 5px) 0 0 / calc((100% - 10px) / 9) 10px repeat-x;
  opacity: .7;
}
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; height: var(--row); padding: 0 76px 0 18px; position: relative; }
.page-title { font-family: var(--hand); font-size: 26px; line-height: var(--row); color: var(--ink); white-space: nowrap; }
.page-date { font-family: var(--hand); font-size: 18px; color: var(--ink-2); line-height: var(--row); white-space: nowrap; }
.tally { display: flex; align-items: center; gap: 10px; height: var(--row); padding: 0 76px 0 18px; font-size: 14px; color: var(--ink-2); }
.tally svg { height: 26px; overflow: visible; }
.tally path { stroke: var(--ink); stroke-width: 2.2; stroke-linecap: round; fill: none; }
.rows { position: relative; }
.row {
  position: relative; display: flex; align-items: center; height: var(--row); width: 100%; text-align: start; color: inherit;
  padding: 0 0 0 16px; transition: opacity .5s var(--ease-out);
}
button.row { cursor: pointer; }
button.row:active .row-name { transform: translateX(-3px); }
.row-no { width: 60px; flex: none; text-align: center; font-family: var(--hand); font-size: 22px; color: var(--ink-red); position: relative; direction: ltr; }
.row-name { flex: 1; min-width: 0; padding-inline-start: 16px; font-family: var(--hand); font-size: 25px; line-height: var(--row); position: relative; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: transform .3s var(--spring), filter .4s; }
.row-tag { flex: none; font-size: 12px; font-weight: 500; padding: 3px 10px; border-radius: 999px; margin-inline-start: 8px; }
.row-tag.walk { color: var(--ink-2); box-shadow: inset 0 0 0 1px rgba(27,42,74,.22); }
.row-tag.me { color: #fff; background: var(--ink-red); }
.row-tag.now { color: #6b4b00; background: rgba(255,209,64,.55); }
.row-eta { flex: none; font-size: 12.5px; color: var(--ink-2); min-width: 54px; text-align: end; }
.row-mark { flex: none; width: 30px; height: 30px; display: grid; place-items: center; margin-inline-start: 4px; }
.row-mark svg { width: 26px; height: 26px; overflow: visible; }
.row-mark path { fill: none; stroke: var(--ok); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.row-mark.x path { stroke: var(--ink-red); }

/* states */
.row.serving::before { /* highlighter swipe */
  content: ""; position: absolute; inset: 7px 64px 7px 8px; background: var(--hi); border-radius: 3px 10px 4px 12px / 8px 4px 10px 3px;
  transform-origin: right; transform: skewX(-4deg); mix-blend-mode: multiply;
  animation: highlight .7s var(--ease-out) both;
}
@keyframes highlight { from { transform: scaleX(0) skewX(-4deg); } }
.row.serving .row-name { font-weight: 700; }
.strike { position: absolute; inset-inline: 10px 0; top: 50%; height: 12px; margin-top: -4px; width: calc(100% - 10px); overflow: visible; pointer-events: none; }
.strike path { fill: none; stroke: var(--ink); stroke-width: 2.2; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 0; vector-effect: non-scaling-stroke; }
.row.done .strike path, .row.skipped .strike path, .row.cancelled .strike path { animation: strike .55s var(--ease-in-out) both; }
.row.static .strike path { animation: none; }
@keyframes strike { from { stroke-dashoffset: 1; } }
.row.done, .row.skipped, .row.cancelled { opacity: .5; }
.row.skipped .strike path, .row.cancelled .strike path { stroke: var(--ink-red); }
.row.mine .row-no::after { /* hand-drawn circle */
  content: ""; position: absolute; left: 50%; top: 50%; width: 44px; height: 34px; transform: translate(-50%, -50%) rotate(-8deg);
  border: 2px solid var(--ink-red); border-radius: 50% 45% 55% 48% / 52% 58% 42% 48%; opacity: .85;
}
.row.ink-in .row-name, .row.ink-in .row-no, .row.ink-in .row-tag { animation: inkIn .9s var(--ease-out) both; }
.row.ink-in .row-no { animation-duration: .5s; }
@keyframes inkIn { from { clip-path: inset(0 0 0 100%); } to { clip-path: inset(0 0 0 0); } }
.row.leaving { animation: rowOut .45s var(--ease-in-out) forwards; pointer-events: none; }
@keyframes rowOut { to { opacity: 0; height: 0; transform: translateX(-20px); } }

.page-empty { height: calc(var(--row) * 3); display: grid; place-items: center; font-family: var(--hand); font-size: 24px; color: var(--ink-2); text-align: center; line-height: var(--row); padding: 0 70px 0 16px; }
.page-foot { height: var(--row); display: flex; align-items: center; justify-content: flex-end; padding: 0 76px 0 18px; font-family: var(--hand); font-size: 18px; color: var(--ink-2); }
.blank-lines { height: calc(var(--row) * 2); }

/* ---------- BARBER deck ---------- */
.deck { display: grid; gap: 14px; }
.deck-actions { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.next-btn { height: 74px; font-size: 21px; border-radius: 20px; }
.next-btn .icon { width: 28px; height: 28px; stroke-width: 2; }
.next-btn.snip .icon { animation: snipOnce .4s var(--ease-in-out); }
@keyframes snipOnce { 30% { transform: rotate(-30deg) scale(1.1); } 60% { transform: rotate(10deg); } }
.deck-actions .btn-ghost { height: 74px; border-radius: 20px; padding: 0 18px; flex-direction: column; gap: 2px; font-size: 13px; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.stat { padding: 12px 12px 10px; border-radius: 16px; background: rgba(243,234,216,.04); box-shadow: inset 0 0 0 1px var(--edge); }
.stat .v { font-size: 24px; font-weight: 700; line-height: 1.1; }
.stat .k { font-size: 12px; color: var(--text-3); }
.stat.hl .v { color: var(--brass-hi); }
.barber-grid { display: grid; gap: 18px; }
@media (min-width: 900px) {
  .barber-grid { grid-template-columns: 380px 1fr; align-items: start; }
  .barber-grid > .side { position: sticky; top: 16px; }
  .tabbar { display: none !important; }
  .barber-grid .panel { display: block !important; }
  .screen.wide { padding-bottom: 60px; }
}

.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; font-size: 14px; color: var(--text-2); }
.switch .track-s { width: 52px; height: 30px; border-radius: 999px; background: rgba(214,90,75,.35); position: relative; transition: background .3s; box-shadow: inset 0 0 0 1px rgba(255,255,255,.06); }
.switch .track-s::after { content: ""; position: absolute; top: 3px; right: 3px; width: 24px; height: 24px; border-radius: 50%; background: #f5eedd; box-shadow: 0 2px 6px rgba(0,0,0,.4); transition: transform .45s var(--spring); }
.switch[aria-checked="true"] .track-s { background: var(--ok); }
.switch[aria-checked="true"] .track-s::after { transform: translateX(-22px); }

.fab {
  position: fixed; left: 18px; bottom: calc(90px + var(--safe-b)); z-index: 20; width: 64px; height: 64px; border-radius: 22px;
  display: grid; place-items: center; color: #2a1c0c;
  background: linear-gradient(180deg, var(--brass-hi), var(--brass)); box-shadow: 0 16px 30px -10px rgba(201,162,90,.8), inset 0 1px 0 rgba(255,255,255,.6);
  transition: transform .4s var(--spring); animation: fabIn .7s .3s var(--spring) both;
}
.fab:active { transform: scale(.88) rotate(-8deg); }
.fab .icon { width: 28px; height: 28px; stroke-width: 2.2; }
@keyframes fabIn { from { transform: scale(0) rotate(-90deg); } }
@media (min-width: 900px) { .fab { bottom: 28px; left: 28px; } }

.tabbar {
  position: fixed; left: 50%; bottom: calc(12px + var(--safe-b)); transform: translateX(-50%); z-index: 19;
  display: flex; gap: 4px; padding: 6px; border-radius: 22px; width: min(420px, calc(100% - 120px)); margin-inline-start: 0;
  background: rgba(23,19,16,.82); backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px) saturate(1.4);
  box-shadow: inset 0 0 0 1px var(--edge-2), 0 20px 40px -12px rgba(0,0,0,.8);
}
.tabbar { left: auto; right: 16px; transform: none; }
.tab { flex: 1; height: 54px; border-radius: 16px; display: grid; place-items: center; gap: 0; font-size: 11.5px; color: var(--text-3); position: relative; transition: color .3s; }
.tab .icon { width: 22px; height: 22px; }
.tab[aria-selected="true"] { color: var(--brass-hi); }
.tab[aria-selected="true"]::before { content: ""; position: absolute; inset: 0; border-radius: inherit; background: rgba(201,162,90,.12); animation: pop .4s var(--spring); }
.tab .dot { position: absolute; top: 8px; left: calc(50% - 16px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--bad); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; }

/* ---------- Customers list (barber) ---------- */
.search { position: relative; margin-bottom: 12px; }
.search .icon { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); color: var(--text-3); }
.search .input { padding-inline-start: 48px; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 12px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.ulist { display: grid; gap: 10px; }
.ucard { display: grid; grid-template-columns: auto 1fr auto; gap: 4px 12px; align-items: center; padding: 14px; border-radius: 18px; background: rgba(243,234,216,.04); box-shadow: inset 0 0 0 1px var(--edge); position: relative; overflow: hidden; animation: enterUp .5s var(--ease-out) both; }
.avatar { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-family: var(--hand); font-size: 22px; color: var(--ink); background: var(--paper); box-shadow: inset 0 -3px 0 var(--paper-shadow); grid-row: span 2; }
.ucard .nm { font-weight: 600; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ucard .sub { font-size: 12.5px; color: var(--text-3); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.ucard .act { grid-row: span 2; display: flex; gap: 6px; }
.ucard .code-chip { font-weight: 700; color: var(--brass-hi); letter-spacing: .08em; }
.stamp {
  position: absolute; left: 50%; top: 50%; z-index: 3; pointer-events: none;
  font-family: var(--hand); font-weight: 700; font-size: 34px; color: #3aa35d; padding: 0 16px; border: 3px solid currentColor; border-radius: 10px;
  transform: translate(-50%, -50%) rotate(-12deg); mix-blend-mode: screen; text-shadow: 0 0 1px currentColor;
  animation: stamp .55s cubic-bezier(.2, 1.6, .4, 1) both;
  background: rgba(58,163,93,.08);
}
@keyframes stamp { 0% { transform: translate(-50%, -50%) rotate(-12deg) scale(2.6); opacity: 0; } 55% { opacity: 1; } 100% { transform: translate(-50%, -50%) rotate(-12deg) scale(1); } }
.ucard.stamped { animation: thud .4s .25s ease-out; }
@keyframes thud { 30% { transform: scale(.97) translateY(2px); } }
.list-empty { text-align: center; color: var(--text-3); padding: 40px 10px; }
.list-empty .big { font-family: var(--hand); font-size: 28px; color: var(--text-2); }

/* ---------- Settings ---------- */
.set-list { display: grid; gap: 10px; }
.set-row { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 18px; background: rgba(243,234,216,.04); box-shadow: inset 0 0 0 1px var(--edge); }
.set-row .t { flex: 1; }
.set-row .t b { display: block; font-weight: 500; }
.set-row .t span { font-size: 12.5px; color: var(--text-3); }
.stepper { display: flex; align-items: center; gap: 4px; direction: ltr; }
.stepper button { width: 40px; height: 40px; border-radius: 12px; background: rgba(243,234,216,.07); font-size: 20px; transition: transform .3s var(--spring); }
.stepper button:active { transform: scale(.85); }
.stepper output { min-width: 46px; text-align: center; font-weight: 700; font-size: 18px; }
.section-title { font-size: 13px; color: var(--text-3); margin: 22px 6px 10px; letter-spacing: .04em; }

/* ---------- Sheet / modal ---------- */
.backdrop { position: fixed; inset: 0; z-index: 60; background: rgba(5,4,3,.6); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); animation: fade .35s var(--ease-out) both; }
.backdrop.out { animation: fade .3s var(--ease-out) reverse forwards; }
@keyframes fade { from { opacity: 0; } }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 61; margin: 0 auto; max-width: 560px;
  padding: 10px 18px calc(22px + var(--safe-b)); border-radius: 28px 28px 0 0;
  background: linear-gradient(180deg, #241d17, #19140f); box-shadow: inset 0 1px 0 rgba(241,215,155,.15), 0 -20px 60px rgba(0,0,0,.6);
  animation: sheetIn .6s var(--spring-soft, var(--ease-out)) both; touch-action: none;
}
@media (min-width: 900px) { .sheet { bottom: 50%; transform: translateY(50%); border-radius: 28px; max-width: 480px; animation: modalIn .5s var(--spring) both; } }
@keyframes sheetIn { from { transform: translateY(100%); } }
@keyframes modalIn { from { transform: translateY(56%) scale(.94); opacity: 0; } }
.sheet.out { transition: transform .3s var(--ease-in-out); transform: translateY(105%) !important; }
.grab { width: 42px; height: 5px; border-radius: 3px; background: rgba(243,234,216,.22); margin: 0 auto 14px; }
.sheet h3 { margin: 0 0 4px; font-size: 20px; }
.sheet .sub { color: var(--text-3); font-size: 13.5px; margin: 0 0 16px; }
.sheet-hand { font-family: var(--hand); font-size: 34px; color: var(--brass-hi); line-height: 1.2; }
.actions-list { display: grid; gap: 8px; }
.act-row { display: flex; align-items: center; gap: 14px; height: 58px; padding: 0 16px; border-radius: 16px; background: rgba(243,234,216,.05); font-size: 16px; font-weight: 500; text-align: start; transition: transform .3s var(--spring), background .2s; position: relative; overflow: hidden; }
.act-row:active { transform: scale(.97); }
.act-row .icon { color: var(--brass); }
.act-row.danger { color: #ffb3a8; } .act-row.danger .icon { color: var(--bad); }
.act-row.ok .icon { color: var(--ok); }
.act-row[disabled] { opacity: .35; pointer-events: none; }
.act-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.form-grid { display: grid; gap: 14px; }

/* ---------- Toasts ---------- */
#toasts { position: fixed; top: calc(10px + var(--safe-t)); left: 0; right: 0; z-index: 90; display: grid; justify-items: center; gap: 8px; pointer-events: none; padding: 0 12px; }
.toast {
  pointer-events: auto; display: flex; align-items: center; gap: 12px; max-width: 460px; width: max-content; min-height: 52px; padding: 10px 18px 10px 14px; border-radius: 18px;
  background: rgba(36,29,23,.94); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); color: var(--text);
  box-shadow: inset 0 0 0 1px var(--edge-2), 0 18px 40px -12px rgba(0,0,0,.8); font-size: 14.5px;
  animation: toastIn .55s var(--spring) both;
}
.toast.out { animation: toastOut .35s var(--ease-in-out) forwards; }
.toast .ti { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; flex: none; background: rgba(201,162,90,.16); color: var(--brass-hi); }
.toast.ok .ti { background: rgba(79,168,107,.18); color: #8fe0a8; }
.toast.err .ti { background: rgba(214,90,75,.18); color: #ff9d90; }
.toast .ti .icon { width: 18px; height: 18px; }
@keyframes toastIn { from { transform: translateY(-140%) scale(.9); opacity: 0; } }
@keyframes toastOut { to { transform: translateY(-140%) scale(.9); opacity: 0; } }

/* ---------- YOUR TURN overlay ---------- */
.turn-overlay { position: fixed; inset: 0; z-index: 80; display: grid; place-content: center; justify-items: center; text-align: center; padding: 30px; background: radial-gradient(circle at 50% 45%, rgba(201,162,90,.35), rgba(15,13,11,.96) 60%); animation: fade .4s both; }
.turn-overlay .rings { position: relative; width: 190px; height: 190px; display: grid; place-items: center; margin-bottom: 26px; }
.turn-overlay .rings i { position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--brass-hi); animation: rings 2s var(--ease-out) infinite; }
.turn-overlay .rings i:nth-child(2) { animation-delay: .5s; } .turn-overlay .rings i:nth-child(3) { animation-delay: 1s; }
@keyframes rings { from { transform: scale(.55); opacity: 1; } to { transform: scale(1.5); opacity: 0; } }
.turn-overlay .core { width: 140px; height: 140px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(180deg, var(--brass-hi), var(--brass)); color: #2a1c0c; font-family: var(--hand); font-size: 64px; box-shadow: 0 20px 60px rgba(201,162,90,.6); animation: pop .7s var(--spring) both; }
.turn-overlay h2 { font-family: var(--hand); font-size: 52px; margin: 0; color: var(--paper); line-height: 1.2; animation: enterUp .6s .15s var(--ease-out) both; }
.turn-overlay p { color: var(--text-2); margin: 8px 0 26px; animation: enterUp .6s .25s var(--ease-out) both; }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 81; overflow: hidden; }
.confetti i { position: absolute; top: -20px; width: 8px; height: 14px; border-radius: 2px; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); } }

/* ---------- Menu (customer) ---------- */
.me-head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.me-head .avatar { width: 56px; height: 56px; font-size: 28px; grid-row: auto; }
.sub-meter { height: 8px; border-radius: 4px; background: rgba(243,234,216,.08); overflow: hidden; margin: 8px 0 4px; }
.sub-meter i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--brass), var(--brass-hi)); transform-origin: right; animation: meter 1s .2s var(--ease-out) both; }
@keyframes meter { from { transform: scaleX(0); } }

.offline-bar { position: fixed; left: 50%; transform: translateX(-50%); top: calc(8px + var(--safe-t)); z-index: 70; padding: 6px 14px; border-radius: 999px; font-size: 13px; background: rgba(214,90,75,.9); color: #fff; animation: toastIn .5s var(--spring) both; }

.skeleton { border-radius: var(--radius-lg); background: linear-gradient(90deg, rgba(243,234,216,.04), rgba(243,234,216,.08), rgba(243,234,216,.04)); background-size: 200% 100%; animation: shimmer 1.4s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

@media (max-width: 380px) {
  :root { --row: 42px; }
  .flip-d { width: 44px; height: 62px; font-size: 38px; }
  .now-name { font-size: 26px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .row-name { font-size: 22px; }
  .ticket-no { font-size: 62px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ---------- details ---------- */
.icon-btn { position: relative; overflow: hidden; }
a.act-row { color: inherit; text-decoration: none; }
button.stat { color: inherit; font: inherit; cursor: pointer; transition: transform .3s var(--spring); }
button.stat:active { transform: scale(.95); }
.padlock .shackle { transform-box: fill-box; transform-origin: 100% 100%; }
.row.ink-in .row-name, .row.ink-in .row-no, .row.ink-in .row-tag, .row.ink-in .row-eta { animation-delay: var(--d, 0ms); }
.row.ink-in .row-eta { animation: inkIn .9s var(--ease-out) both; animation-delay: var(--d, 0ms); }
.row-mark path { stroke-dasharray: 1; animation: strike .45s .35s var(--ease-out) both; }
.row.static .row-mark path { animation: none; }
.panel[hidden] { display: none !important; }
.switch:active .track-s::after { width: 30px; }
.switch[aria-checked="true"]:active .track-s::after { transform: translateX(-16px); }
.now-name, .row-name, .ticket-no, .sheet-hand { text-wrap: balance; }
.tab .dot[hidden] { display: none; }
.badge { white-space: nowrap; }
.page-empty { height: auto; min-height: calc(var(--row) * 2); display: block; padding-top: var(--row); line-height: var(--row); }
.turn-overlay { background: radial-gradient(circle at 50% 40%, rgba(201,162,90,.32), rgba(15,13,11,.97) 55%); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.next-btn span { white-space: nowrap; }
