/* Barber Portals — look of the app
   Identity: cream paper, ink navy, barber-pole red + blue, brass details.
   --shop is each shop's own colour (set in Admin → Look & brand). */

:root {
  --cream: #f7f5f2;
  --paper: #ffffff;
  --ink: #14244f;
  --ink-2: #24345e;
  --muted: #5f6679;
  --line: #e3e1dc;
  --red: #c8102e;
  --blue: #1d3a8a;
  --brass: #8b5a2b;
  --green: #2f7d5b;
  --shop: #c8102e;
  --solid: var(--ink);       /* dark blocks (ticket time, summary bar…) */
  --on-solid: var(--paper);
  --radius: 14px;
  --shadow: 0 1px 2px rgba(20, 36, 79, .06), 0 6px 20px rgba(20, 36, 79, .06);
  --pole: repeating-linear-gradient(-45deg, var(--red) 0 9px, #fff 9px 16px, var(--blue) 16px 25px, #fff 25px 32px);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font: var(--fs, 15px)/1.5 var(--font-body, "Manrope"), "Cairo", system-ui, sans-serif;
}
html[lang="ar"] body { font-family: var(--font-body-ar, "Cairo"), "Cairo", system-ui, sans-serif; }
body.no-scroll { overflow: hidden; }
h1, h2, h3 { line-height: 1.2; margin: 0; }
h1 { font-family: var(--font-head, "DM Serif Display"), "Cairo", serif; font-weight: 400; letter-spacing: .2px; }
html[lang="ar"] h1 { font-family: var(--font-head-ar, "Cairo"), "Cairo", serif; font-weight: 800; }
h2 { font-size: 1.05rem; font-weight: 800; margin: 26px 0 12px; }
h3 { font-size: .95rem; font-weight: 800; margin: 0 0 12px; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--shop) 45%, transparent); outline-offset: 2px; }
code { font-family: ui-monospace, Consolas, monospace; font-size: .85em; background: rgba(20,36,79,.06); padding: 1px 6px; border-radius: 6px; }

.ic { width: 1.1em; height: 1.1em; flex: none; vertical-align: -0.2em; }
h2 > .ic, h3 > .ic { color: var(--shop); margin-inline-end: 4px; }
.muted { color: var(--muted); }
.small { font-size: .82rem; }
.center { text-align: center; }
.empty { color: var(--muted); padding: 18px; text-align: center; background: rgba(255,255,255,.5); border: 1px dashed var(--line); border-radius: var(--radius); }
.hint { font-size: .85rem; color: var(--muted); background: rgba(139,90,43,.1); border-radius: 10px; padding: 10px 12px; margin: 10px 0; }
.hint.warn { background: rgba(29,58,138,.08); color: var(--ink-2); }

/* ---------- Top bars ---------- */
.bar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 16px;
  background: color-mix(in srgb, var(--cream) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.bar::after { content: ""; position: absolute; inset-inline: 0; bottom: -4px; height: 3px; background: var(--pole); opacity: .9; }
.bar.dark { background: var(--b-bar, #0d1838); color: #eef0f5; border-color: var(--b-line, #22345f); }
.bar-end { display: flex; align-items: center; gap: 8px; }
.bar-title { display: flex; align-items: center; gap: 10px; min-width: 0; font-weight: 800; }
.bar-title > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-title small { display: block; font-weight: 500; opacity: .7; font-size: .78rem; }
.brandmark { display: flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 800; letter-spacing: .2px; }
.brandmark .pole { width: 34px; height: 34px; }
.foot .pole { width: 22px; height: 22px; }
.back { text-decoration: none; font-size: 1.8rem; line-height: 1; padding: 0 6px; }
html[dir="rtl"] .back, html[dir="rtl"] .day-nav .icon-btn { transform: scaleX(-1); }
.lang, .chip-btn {
  display: inline-flex; align-items: center; gap: 5px;
  border: 1px solid currentColor; background: none; border-radius: 999px; padding: 5px 12px;
  font-size: .85rem; font-weight: 700; opacity: .85; white-space: nowrap;
}
.lang:hover, .chip-btn:hover { opacity: 1; }

/* ---------- Logos and avatars ---------- */
.logo {
  display: inline-grid; place-items: center; flex: none;
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--shop); color: var(--on-shop, #fff); font-weight: 800; font-size: 1.2rem; overflow: hidden;
}
.logo img { width: 100%; height: 100%; object-fit: cover; background: #fff; }
.logo.sm { width: 30px; height: 30px; border-radius: 8px; font-size: .95rem; }
.logo.lg { width: var(--logo, 76px); height: var(--logo, 76px); border-radius: calc(var(--logo, 76px) * .26); font-size: calc(var(--logo, 76px) * .4); box-shadow: 0 0 0 4px var(--paper), var(--shadow); }
.avatar {
  display: inline-grid; place-items: center; flex: none;
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--c, var(--ink)); color: #fff; font-weight: 800; font-size: .9rem;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.25);
}
.avatar.xs { width: 22px; height: 22px; font-size: .62rem; vertical-align: middle; }
.avatar.lg { width: 56px; height: 56px; font-size: 1.15rem; }
.avatar.xl { width: 84px; height: 84px; font-size: 1.6rem; }
.avatar.sm { width: 30px; height: 30px; font-size: .7rem; }
.photo-links { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 4px; font-size: .82rem; }
.photo-links .link { cursor: pointer; font-size: .82rem; }
.avatar.photo { background: var(--paper); overflow: hidden; box-shadow: 0 0 0 2px var(--c); }
.avatar.photo img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.photo-edit { display: flex; align-items: center; gap: 16px; }
.photo-edit > div { display: grid; gap: 6px; }
.photo-edit .btn-row { margin: 0; }
.avatar.any { background: var(--pole); color: #fff; font-size: 1.2rem; }
.avatar.any .ic { background: var(--ink); border-radius: 50%; padding: 5px; width: 28px; height: 28px; }

/* ---------- Buttons ---------- */
.cta {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; border: 0; border-radius: 12px; padding: 14px 18px;
  background: var(--shop); color: var(--on-shop, #fff); font-weight: 800; font-size: 1rem;
  box-shadow: 0 6px 16px color-mix(in srgb, var(--shop) 30%, transparent);
  transition: transform .1s, filter .15s;
}
.cta:hover { filter: brightness(1.07); }
.cta:active { transform: scale(.98); }
.cta.sm { display: inline-flex; width: auto; padding: 9px 16px; font-size: .9rem; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 11px 16px; border-radius: 12px; border: 1px solid var(--solid); background: var(--solid); color: var(--on-solid);
  font-weight: 700; text-decoration: none; font-size: .92rem;
}
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--ink); }
.btn.sm { padding: 7px 12px; font-size: .85rem; }
.btn.danger, .link.danger { color: var(--red); }
.btn.file { cursor: pointer; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.btn-row .btn { flex: 1 1 140px; }
.link { background: none; border: 0; padding: 0; color: var(--shop); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.pill {
  display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 999px;
  background: rgba(255,255,255,.16); color: #fff; text-decoration: none; font-weight: 700; font-size: .88rem;
  border: 1px solid rgba(255,255,255,.3);
}
.pill:hover { background: rgba(255,255,255,.26); }
.icon-btn {
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--paper);
  font-size: 1.3rem; line-height: 1; display: inline-grid; place-items: center;
}
.icon-btn.sm { width: 30px; height: 30px; font-size: .9rem; }
.icon-btn.danger:hover { border-color: var(--red); }
.icon-btn:disabled { opacity: .35; }
.sbtn {
  display: inline-flex; align-items: center; gap: 5px; padding: 6px 11px; border-radius: 9px;
  border: 1px solid var(--line); background: var(--paper); font-weight: 700; font-size: .82rem; text-decoration: none;
}
.sbtn.go { background: var(--solid); border-color: var(--solid); color: var(--on-solid); }
.sbtn.quiet { background: transparent; }
.sbtn:disabled { opacity: .4; }

/* ---------- Segmented tabs ---------- */
.seg {
  display: flex; gap: 4px; padding: 4px; margin: 0 auto; max-width: 720px;
  background: rgba(20,36,79,.06); border-radius: 14px;
}
.seg button { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; border: 0; background: none; padding: 10px 6px; border-radius: 11px; font-weight: 700; font-size: .9rem; color: var(--muted); white-space: nowrap; }
.seg button.on { background: var(--paper); color: var(--ink); box-shadow: var(--shadow); }
.seg.mini { margin: 0 0 14px; max-width: none; }
.seg.mini button { padding: 8px 6px; }
.seg.range { display: inline-flex; }
.seg.range button { padding: 7px 14px; }

/* ---------- Forms ---------- */
.form { display: grid; gap: 12px; }
label { display: grid; gap: 5px; font-weight: 700; font-size: .85rem; }
input, select, textarea {
  width: 100%; min-width: 0; padding: 11px 12px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--paper); font-weight: 500; font-size: .95rem;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--shop); box-shadow: 0 0 0 3px color-mix(in srgb, var(--shop) 18%, transparent); }
input[type="color"] { padding: 3px; height: 44px; }
textarea { resize: vertical; }
.two, .three { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; align-items: end; }
.three { grid-template-columns: 1fr 1fr 1fr; }
.form-err { color: var(--red); font-weight: 700; margin: 0; font-size: .9rem; }

/* ---------- Tags and statuses ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: .75rem; font-weight: 800; background: rgba(20,36,79,.08); color: var(--muted); }
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge.on { background: #e3f3ea; color: var(--green); }
.tag { display: inline-block; padding: 1px 8px; border-radius: 6px; font-size: .72rem; font-weight: 800; background: var(--brass); color: #fff; vertical-align: middle; }
.tag.soft { background: rgba(20,36,79,.08); color: var(--muted); }
.tag.new { background: #e8eefc; color: var(--blue); }
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; font-size: .74rem; font-weight: 800; white-space: nowrap; }
.st-booked { background: #e8eefc; color: var(--blue); }
.st-arrived { background: #fff2d6; color: #8a5a00; }
.st-in-chair { background: #fde6ea; color: var(--red); }
.st-done { background: #e3f3ea; color: var(--green); }
.st-no-show, .st-cancelled { background: #eceef2; color: var(--muted); }

/* ---------- Toast + pop-up ---------- */
#toast {
  position: fixed; inset-inline: 0; bottom: 22px; margin: 0 auto; width: max-content; max-width: calc(100% - 32px);
  background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 999px; font-weight: 700; font-size: .9rem;
  z-index: 100; opacity: 0; transform: translateY(14px); transition: .25s; pointer-events: none;
}
#toast.show { opacity: 1; transform: none; }
#modal {
  position: fixed; inset: 0; z-index: 90; background: rgba(8,17,39,.55); backdrop-filter: blur(3px);
  display: grid; place-items: center; padding: 16px; overflow-y: auto; animation: fade .15s;
}
.modal-card {
  position: relative; width: 100%; max-width: 460px; background: var(--paper); border-radius: 20px; padding: 24px;
  box-shadow: 0 20px 60px rgba(0,0,0,.25); animation: pop .2s;
}
.modal-card.wide { max-width: 680px; }
.modal-card h2 { margin-top: 0; }
.modal-card h3 { margin-top: 20px; }
.x { position: absolute; top: 10px; inset-inline-end: 12px; border: 0; background: none; font-size: 1.6rem; line-height: 1; color: var(--muted); }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { transform: translateY(10px) scale(.98); opacity: 0; } }

/* ---------- Shop finder ---------- */
.finder { max-width: 960px; margin: 0 auto; padding: 36px 16px 60px; }
.finder h1 { font-size: clamp(2rem, 5vw, 2.8rem); }
.finder > .muted { margin: 6px 0 24px; }
.shop-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); }
.shop-tile {
  position: relative; display: grid; gap: 6px; padding: 20px; text-decoration: none; overflow: hidden;
  background: var(--paper); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); transition: transform .15s;
}
.shop-tile::before { content: ""; position: absolute; inset-inline: 0; top: 0; height: 6px; background: var(--shop); }
.shop-tile:hover { transform: translateY(-3px); }
.shop-tile .logo { background: var(--shop); }
.shop-tile h2 { margin: 8px 0 0; font-size: 1.2rem; }
.shop-tile p { margin: 0; }
.tile-top { display: flex; justify-content: space-between; align-items: center; }
.tile-cta { margin-top: 8px; font-weight: 800; color: var(--shop); }
.portal-links { margin-top: 36px; text-align: center; color: var(--muted); }

/* ---------- Customer: shop header ---------- */
.shop-bar .logo { background: var(--shop); }
.shop-hero {
  position: relative; color: #fff; padding: 28px 16px 22px; overflow: hidden;
  background: linear-gradient(135deg, color-mix(in srgb, var(--shop) 92%, #000), color-mix(in srgb, var(--shop) 70%, #000));
}
.shop-hero::after { content: ""; position: absolute; inset-inline-end: -40px; top: -20px; width: 120px; height: 140%; background: var(--pole); opacity: .14; transform: rotate(12deg); }
.hero-in, .hero-actions { position: relative; z-index: 1; max-width: 720px; margin: 0 auto; }
.hero-in { display: flex; gap: 16px; align-items: center; }
.shop-hero .logo.lg { background: var(--paper); color: var(--shop); box-shadow: 0 0 0 4px rgba(255,255,255,.25); }
.shop-hero h1 { font-size: calc(clamp(1.6rem, 5vw, 2.3rem) * var(--h1, 1)); }
.tagline { margin: 4px 0 8px; opacity: .9; }
.meta { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0; font-size: .88rem; }
.shop-hero .badge { background: rgba(255,255,255,.18); color: #fff; }
.shop-hero .badge.on { background: #e3f3ea; color: var(--green); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.shop-hero + .seg { margin-top: -18px; position: relative; z-index: 2; background: var(--paper); box-shadow: var(--shadow); width: calc(100% - 32px); }
.shop-hero + .seg button.on { background: var(--shop); color: var(--on-shop, #fff); }

main.cust { max-width: 720px; margin: 0 auto; padding: 18px 16px 40px; }
.welcome { margin: 18px 0 0; font-weight: 600; color: var(--muted); text-align: center; }

/* steps 1-2-3-4 */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 6px; }
.steps button { display: flex; flex-direction: column; align-items: center; gap: 4px; border: 0; background: none; padding: 6px 0; color: var(--muted); font-size: .76rem; font-weight: 700; position: relative; }
.steps button::after { content: ""; position: absolute; top: 19px; inset-inline-start: calc(50% + 18px); width: calc(100% - 30px); height: 2px; background: var(--line); }
.steps button:last-child::after { display: none; }
.steps b { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--paper); border: 2px solid var(--line); font-size: .8rem; }
.steps .on { color: var(--ink); }
.steps .on b { background: var(--shop); border-color: var(--shop); color: var(--on-shop, #fff); box-shadow: 0 0 0 4px color-mix(in srgb, var(--shop) 18%, transparent); }
.steps .past { color: var(--ink); }
.steps .past b { background: var(--solid); border-color: var(--solid); color: var(--on-solid); }
.steps .past::after { background: var(--solid); }

.list { display: grid; gap: 10px; }
.row-card {
  display: flex; align-items: center; gap: 14px; width: 100%; text-align: start;
  padding: 14px 16px; border-radius: var(--radius); border: 2px solid transparent; background: var(--paper);
  box-shadow: var(--shadow); transition: border-color .15s, transform .1s;
}
.row-card:hover:not(:disabled) { border-color: color-mix(in srgb, var(--shop) 40%, transparent); }
.row-card:active:not(:disabled) { transform: scale(.99); }
.row-card.sel { border-color: var(--shop); }
.row-card:disabled { opacity: .5; }
.svc-ic { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; flex: none; font-size: 1.2rem;
  background: color-mix(in srgb, var(--shop) 10%, #fff); color: var(--shop); }
.svc-ic.photo { width: 58px; height: 58px; padding: 0; overflow: hidden; background: var(--line); }
.svc-ic.photo img { width: 100%; height: 100%; object-fit: cover; }
.svc-ic.big { width: 84px; height: 84px; font-size: 1.8rem; }
.row-card.sel .svc-ic.photo { box-shadow: 0 0 0 3px var(--shop); }
.row-card.sel .svc-ic { background: var(--shop); color: var(--on-shop, #fff); }
.tag.hot { background: var(--brass); color: #fff; margin-inline-start: 4px; }
.rc-main { flex: 1; display: grid; gap: 2px; min-width: 0; }
.rc-main small, .rc-side small { color: var(--muted); font-size: .82rem; }
.rc-side { display: grid; justify-items: end; gap: 2px; text-align: end; }
.price { color: var(--price, var(--shop)); font-weight: 800; }
.next { font-size: .88rem; color: var(--green); }

.days { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 10px; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.day {
  flex: 0 0 64px; scroll-snap-align: start; display: grid; justify-items: center; gap: 0; padding: 10px 4px;
  border-radius: var(--radius); border: 2px solid transparent; background: var(--paper); box-shadow: var(--shadow);
}
.day b { font-size: 1.35rem; line-height: 1.2; }
.day small { font-size: .72rem; color: var(--muted); font-weight: 700; }
.day.sel { background: var(--solid); color: var(--on-solid); }
.day.sel small { color: rgba(255,255,255,.7); }
.day:disabled { opacity: .4; box-shadow: none; background: transparent; border: 1px dashed var(--line); }
.slot-h { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 16px 0 8px; }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 8px; }
.slot { padding: 11px 4px; border-radius: calc(var(--radius) * .8); border: 1px solid var(--line); background: var(--paper); font-weight: 800; font-variant-numeric: tabular-nums; }
.slot:hover { border-color: var(--shop); color: var(--shop); }
.slot.sel { background: var(--shop); border-color: var(--shop); color: var(--on-shop, #fff); }

.sumbar {
  position: sticky; bottom: 12px; margin-top: 22px; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 12px 16px; border-radius: 14px; background: var(--solid); color: var(--on-solid); font-size: .88rem; box-shadow: 0 10px 30px rgba(0,0,0,.2);
}
.sumbar .link { color: var(--on-solid); white-space: nowrap; }

.ticket {
  display: grid; grid-template-columns: auto 1fr; border-radius: var(--radius); overflow: hidden; background: var(--paper); box-shadow: var(--shadow); margin-bottom: 18px;
}
.t-time {
  display: grid; align-content: center; justify-items: center; gap: 2px; padding: 18px; min-width: 120px; text-align: center;
  background: var(--solid); color: var(--on-solid); position: relative;
}
.t-time::after { content: ""; position: absolute; inset-block: 0; inset-inline-end: -1px; width: 6px; background: var(--pole); }
.t-time b { font-size: 2rem; font-variant-numeric: tabular-nums; line-height: 1; }
.t-time span { font-size: .8rem; opacity: .8; }
.t-rows { padding: 12px 18px; display: grid; }
.t-rows p { display: flex; justify-content: space-between; gap: 10px; margin: 0; padding: 7px 0; border-bottom: 1px dashed var(--line); font-size: .92rem; }
.t-rows p:last-child { border: 0; }
.t-rows span { color: var(--muted); }
.t-rows b { text-align: end; }
.who { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-radius: calc(var(--radius) * .8); background: var(--paper); border: 1px solid var(--line); }
.who span { flex: 1; }

.success { text-align: center; margin: 22px 0 18px; }
.success h2 { font-size: 1.6rem; margin: 10px 0 4px; font-family: var(--font-head, "DM Serif Display"), "Cairo", serif; font-weight: 400; }
.ok-mark { width: 70px; height: 70px; margin: 0 auto; border-radius: 50%; display: grid; place-items: center; font-size: 2rem; color: #fff; background: var(--green); box-shadow: 0 0 0 8px #e3f3ea; animation: pop .35s; }

/* queue */
.q-stats, .stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 18px; }
.stats { grid-template-columns: repeat(4, 1fr); }
.q-stats > div, .stats > div { background: var(--paper); border-radius: var(--radius); padding: 12px 14px; box-shadow: var(--shadow); }
.q-stats small, .stats small { display: block; color: var(--muted); font-size: .76rem; font-weight: 700; }
.q-stats b, .stats b { font-size: 1.35rem; font-variant-numeric: tabular-nums; }
.stats.small b { font-size: 1.05rem; }
.my-turn { margin-top: 16px; text-align: center; padding: 20px; border-radius: var(--radius); background: var(--solid); color: var(--on-solid); position: relative; overflow: hidden; }
.my-turn::before { content: ""; position: absolute; inset-inline: 0; top: 0; height: 5px; background: var(--pole); }
.my-turn small { opacity: .7; font-weight: 700; }
.big-num { display: block; font-size: 4rem; line-height: 1.1; font-family: var(--font-head, "DM Serif Display"), serif; font-weight: 400; }
.my-turn .btn.ghost { color: var(--on-solid); border-color: color-mix(in srgb, var(--on-solid) 35%, transparent); }
.my-turn.go { background: var(--green); }
.line { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.line li { display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: var(--paper); border-radius: var(--radius); }
.line li small { margin-inline-start: auto; color: var(--muted); }
.line li.me { outline: 2px solid var(--shop); }
.line .n { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--cream); font-weight: 800; font-size: .85rem; flex: none; }
.line.big li > div { flex: 1; display: grid; }
.line.big li small { margin: 0; }

/* my bookings */
.auth { max-width: 420px; margin: 20px auto 0; }
.auth h2 { margin-top: 0; font-size: 1.4rem; }
.profile { display: flex; align-items: center; gap: 14px; padding: 16px; background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); margin-top: 6px; }
.profile div { flex: 1; display: grid; }
.profile small { color: var(--muted); }
.bk-card { display: flex; align-items: center; gap: 14px; padding: 12px 14px; background: var(--paper); border-radius: var(--radius); margin-bottom: 8px; border: 1px solid var(--line); }
.bk-card.up { border-inline-start: 4px solid var(--shop); }
.bk-date { display: grid; justify-items: center; width: 46px; flex: none; }
.bk-date b { font-size: 1.4rem; line-height: 1; }
.bk-date small { color: var(--muted); font-weight: 700; font-size: .72rem; }
.bk-main { flex: 1; display: grid; gap: 3px; justify-items: start; min-width: 0; }
.bk-main small { color: var(--muted); }
.bk-side { display: grid; justify-items: end; gap: 4px; }

.about {
  max-width: 720px; margin: 0 auto 10px; padding: 22px 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 24px;
  border-top: 1px solid var(--line);
}
.about p { margin: 0 0 8px; }
.about h3 { margin-top: 14px; }
.about h3:first-child { margin-top: 0; }
.hours { width: 100%; border-collapse: collapse; font-size: .9rem; }
.hours td { padding: 5px 0; border-bottom: 1px solid var(--line); }
.hours td:last-child { text-align: end; font-variant-numeric: tabular-nums; }
.hours tr.today { font-weight: 800; color: var(--shop); }
.team { display: flex; flex-wrap: wrap; gap: 14px; }
.team > div { display: grid; justify-items: center; text-align: center; width: 84px; font-size: .85rem; }
.team small { color: var(--muted); font-size: .72rem; }
.foot { display: flex; justify-content: center; align-items: center; gap: 8px; padding: 22px 16px 34px; color: var(--muted); font-size: .82rem; }

/* ---------- Barber portal (dark workstation) ---------- */
/* --b-… colours come from the barber's own colour (barber.js); these are the fallbacks */
body[data-view="barber"] {
  --paper: var(--b-paper, #16244d); --cream: var(--b-bg, #0b1530); --line: var(--b-line, #263a6b); --ink: #eef0f5; --ink-2: #c7cbd6; --muted: #9097a8;
  background: var(--b-bg, #0b1530); color: #eef0f5;
}
body[data-view="barber"] .seg { background: var(--b-seg, #081127); max-width: 900px; margin: 12px auto 0; width: calc(100% - 32px); }
body[data-view="barber"] .seg button.on { background: var(--shop); color: #fff; }
body[data-view="barber"] .sbtn.go, body[data-view="barber"] .btn { background: var(--shop); border-color: var(--shop); color: #fff; }
body[data-view="barber"] .btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
body[data-view="barber"] .empty { background: rgba(255,255,255,.03); }
body[data-view="barber"] .hint { background: rgba(139,90,43,.14); color: var(--ink-2); }
body[data-view="barber"] .st-booked { background: rgba(110,140,230,.18); color: #a9bdf5; }
body[data-view="barber"] .st-arrived { background: rgba(240,180,60,.16); color: #f2c66d; }
body[data-view="barber"] .st-in-chair { background: rgba(232,64,92,.18); color: #ff8fa1; }
body[data-view="barber"] .st-done { background: rgba(70,180,120,.16); color: #7fd6a5; }
body[data-view="barber"] .st-no-show, body[data-view="barber"] .st-cancelled { background: rgba(255,255,255,.06); color: var(--muted); }
body[data-view="barber"] .tag.new { background: rgba(110,140,230,.2); color: #a9bdf5; }
body[data-view="barber"] .tag.soft { background: rgba(255,255,255,.08); }
body[data-view="barber"] .modal-card { background: var(--b-paper, #16244d); }
body[data-view="barber"] code { background: rgba(255,255,255,.08); }
.bar.dark .avatar { box-shadow: 0 0 0 2px var(--brass); }
/* barber portal with the shop's theme (Admin → Theme → barber portal switch) */
body[data-view="barber-themed"] .seg { max-width: 900px; margin: 12px auto 0; width: calc(100% - 32px); }
body[data-view="barber-themed"] .seg button.on { background: var(--shop); color: var(--on-shop, #fff); }
body[data-view="barber-themed"] .sbtn.go { background: var(--shop); border-color: var(--shop); color: var(--on-shop, #fff); }
body[data-view="barber-themed"] .stats > div, body[data-view="barber-themed"] .bk-row { border-radius: var(--radius); }
main.bp { max-width: 900px; margin: 0 auto; padding: 8px 16px 50px; }
.day-nav { display: flex; align-items: center; gap: 12px; margin-top: 18px; }
.day-nav > div { flex: 1; display: grid; text-align: center; }
.day-nav small { color: var(--muted); }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 16px 0 10px; }
.toolbar select { width: auto; flex: 1 1 160px; }
.search { flex: 1 1 240px; }
.timeline { display: grid; gap: 8px; }
.gap { display: flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 10px; border: 1px dashed var(--line); color: var(--muted); font-size: .85rem; font-weight: 700; }
.bk-row { display: flex; gap: 14px; padding: 14px; background: var(--paper); border-radius: 14px; border-inline-start: 4px solid var(--blue); box-shadow: var(--shadow); }
.bk-row.row-arrived { border-color: #e0a526; }
.bk-row.row-in-chair { border-color: var(--red); }
.bk-row.row-done { border-color: var(--green); opacity: .8; }
.bk-row.row-no-show, .bk-row.row-cancelled { border-color: var(--line); opacity: .55; }
body .bk-row { background: var(--paper); color: inherit; }
.bk-time { display: grid; align-content: start; justify-items: center; min-width: 54px; }
.bk-time b { font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.bk-time small { color: var(--muted); font-size: .75rem; }
.bk-body { flex: 1; min-width: 0; display: grid; gap: 4px; }
.bk-top { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.client-name { border: 0; background: none; padding: 0; font-weight: 800; font-size: 1.02rem; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 4px; }
.bk-svc, .bk-pref, .bk-note { margin: 0; font-size: .88rem; }
.bk-pref { color: var(--brass); font-weight: 600; }
.bk-note { color: var(--muted); font-style: italic; }
.bk-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.under-card { text-align: end; margin: -4px 4px 4px; font-size: .85rem; }

.client-list { display: grid; gap: 6px; }
.client-row { display: flex; align-items: center; gap: 12px; width: 100%; text-align: start; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--paper); }
.client-row:hover { border-color: var(--shop); }
.cr-main { flex: 1; display: grid; min-width: 0; }
.cr-main small, .cr-side small { color: var(--muted); font-size: .8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cr-side { display: grid; justify-items: end; text-align: end; }
.client-head { display: flex; gap: 14px; align-items: center; }
.client-head h2 { margin: 0; }
.client-head p { margin: 4px 0 0; }
.client-head + .stats { margin: 16px 0; }
.history { display: grid; gap: 4px; max-height: 280px; overflow-y: auto; }
.history > div { display: grid; grid-template-columns: 130px 1fr auto; gap: 10px; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: .85rem; }
.history span:first-child { color: var(--muted); font-variant-numeric: tabular-nums; }

.week { display: grid; gap: 8px; }
.week-day { display: grid; grid-template-columns: 1.2fr 1fr 1.4fr auto; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--paper); text-align: start; }
.week-day > span:first-child { display: grid; }
.week-day small, .wd-mid, .wd-n { color: var(--muted); font-size: .82rem; }
.wd-bar { height: 8px; border-radius: 99px; background: rgba(127,127,127,.18); overflow: hidden; }
.wd-bar i { display: block; height: 100%; background: var(--shop); border-radius: 99px; }
.week-day.off { opacity: .5; }

.login { min-height: calc(100vh - 60px); display: grid; place-items: center; padding: 24px 16px; }
.login-card { width: 100%; max-width: 400px; display: grid; gap: 14px; padding: 28px; border-radius: 22px; background: var(--paper); box-shadow: var(--shadow); position: relative; overflow: hidden; }
.login-card::before { content: ""; position: absolute; inset-inline: 0; top: 0; height: 6px; background: var(--pole); }
.login-card h1 { font-size: 1.9rem; }
.login-card p { margin: 0; }
.login-icon { display: grid; place-items: center; width: 60px; height: 60px; border-radius: 18px; background: var(--shop); color: #fff; font-size: 1.8rem; box-shadow: 0 8px 20px color-mix(in srgb, var(--shop) 30%, transparent); }

/* ---------- Admin ---------- */
body[data-view="admin"] { background: var(--cream); color: var(--ink); }
.admin { display: grid; grid-template-columns: 268px 1fr; min-height: 100vh; transition: grid-template-columns .2s; }
.admin.mini { grid-template-columns: 78px 1fr; }
/* sidebar: like the Food Portals admin (clients on top, platform under) */
.side {
  position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; gap: 6px;
  padding: 16px 12px; background: #0f1c42; color: #e8e9ee; border-inline-end: 4px solid transparent; border-image: var(--pole) 1;
  scrollbar-width: thin;
}
.side-top { display: flex; align-items: center; gap: 10px; padding: 4px 4px 10px; }
.side-logo { display: grid; place-items: center; flex: none; }
.side-logo .pole { width: 40px; height: 40px; }
.side-who { flex: 1; display: grid; min-width: 0; }
.side-who b { font-size: 1rem; }
.side-who small { color: #9aa3bb; font-size: .76rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-mini { width: 32px; height: 32px; flex: none; border-radius: 10px; border: 1px solid #2c4174; background: #16244d; color: #e8e9ee; font-size: 1.2rem; line-height: 1; }
.side-mini:hover { background: #1b2b58; }
.admin.mini .side-mini { transform: scaleX(-1); }
html[dir="rtl"] .side-mini { transform: scaleX(-1); }
html[dir="rtl"] .admin.mini .side-mini { transform: none; }
.side-h { margin: 12px 8px 4px; font-size: .7rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: #7f89a6; }
html[lang="ar"] .side-h { letter-spacing: 0; font-size: .8rem; }
.side-list { display: grid; gap: 3px; }
.side-item {
  position: relative; display: flex; align-items: center; gap: 11px; width: 100%; padding: 9px 10px; border-radius: 12px;
  border: 1px solid transparent; background: none; color: #d6dae6; text-align: start;
}
.side-item > span:last-of-type { display: grid; min-width: 0; }
.side-item b { font-size: .92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-item small { font-family: ui-monospace, Consolas, monospace; font-size: .72rem; color: #8790aa; }
.side-item:hover { background: #16244d; color: #fff; }
.side-item.on { background: #1b2b58; border-color: #2c4174; color: #fff; box-shadow: inset 3px 0 0 var(--shop); }
html[dir="rtl"] .side-item.on { box-shadow: inset -3px 0 0 var(--shop); }
.side-item .logo.sm { width: 34px; height: 34px; border-radius: 10px; }
.side-ic { display: grid; place-items: center; width: 34px; height: 34px; flex: none; border-radius: 10px; background: #16244d; color: #c9cfe0; font-size: 1.05rem; }
.side-item.add { color: #9aa3bb; }
.side-item.add .side-ic { border: 1px dashed #3a4c7e; background: none; }
.side-badge { margin-inline-start: auto; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 99px; background: var(--red); color: #fff; font-style: normal; font-size: .75rem; font-weight: 800; display: grid; place-items: center; }
.side-foot { margin-top: auto; display: grid; gap: 8px; padding-top: 14px; }
.side-foot .lang { color: #fff; width: 100%; justify-content: center; padding: 8px; border-color: #2c4174; }
.side-out { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 8px; border-radius: 999px; border: 1px solid #2c4174; background: none; color: #ff8fa1; font-weight: 700; font-size: .85rem; }
.side-out:hover { background: #16244d; }
/* small sidebar: only logos and icons */
.admin.mini .side-who, .admin.mini .side-h, .admin.mini .side-item > span:last-of-type, .admin.mini .side-out span, .admin.mini .side-badge { display: none; }
.admin.mini .side-top { flex-direction: column; }
.admin.mini .side-item { justify-content: center; padding: 8px 0; }
.admin.mini .side-list { margin-top: 10px; }
.admin.mini .side-foot .lang { padding: 6px 0; font-size: .75rem; }
/* middle: shop header + feature tabs on top */
.admin-main { padding: 24px 28px 60px; min-width: 0; }
.a-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.a-head h1 { font-size: 2rem; }
.a-kicker { display: flex; align-items: center; gap: 6px; margin: 0 0 4px; font-size: .74rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
html[lang="ar"] .a-kicker { letter-spacing: 0; font-size: .82rem; }
.a-links { display: flex; flex-wrap: wrap; gap: 8px; }
.dirty-bar {
  position: sticky; bottom: 16px; z-index: 25; display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  max-width: 720px; margin: 24px auto 0; padding: 10px 12px 10px 18px; border-radius: 16px;
  background: #0f1c42; color: #fff; box-shadow: 0 14px 40px rgba(0,0,0,.3); animation: pop .2s;
}
.dirty-bar[hidden] { display: none; }
body[data-view="admin"] #toast { bottom: 96px; }
.dirty-bar > span { flex: 1; display: flex; align-items: center; gap: 8px; font-weight: 700; }
.dirty-bar .btn.ghost { color: #fff; border-color: rgba(255,255,255,.3); background: none; }
.cta:disabled { opacity: .45; box-shadow: none; filter: none; cursor: default; }
.a-tabs { display: flex; gap: 2px; overflow-x: auto; border-bottom: 1px solid var(--line); margin-bottom: 20px; scrollbar-width: none; }
.a-tabs::-webkit-scrollbar { display: none; }
.a-tabs button {
  flex: none; display: inline-flex; align-items: center; gap: 7px; padding: 10px 14px; border: 0; background: none;
  color: var(--muted); font-weight: 700; font-size: .92rem; border-bottom: 3px solid transparent; margin-bottom: -1px; white-space: nowrap;
}
.a-tabs button:hover { color: var(--ink); }
.a-tabs button.on { color: var(--ink); border-bottom-color: var(--shop); }
.a-tabs .ic { opacity: .8; }
.panel { background: var(--paper); border-radius: 16px; padding: 18px; box-shadow: var(--shadow); margin-bottom: 16px; }
.panel.form h3 { margin: 10px 0 0; }
.panel.form h3:first-child { margin-top: 0; }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin: 16px 0; }
.kpis > div { background: var(--paper); border-radius: 14px; padding: 14px 16px; box-shadow: var(--shadow); border-top: 3px solid var(--shop); }
.kpis small { display: block; color: var(--muted); font-weight: 700; font-size: .78rem; }
.kpis b { font-size: 1.5rem; font-variant-numeric: tabular-nums; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.grid2 .panel { margin: 0; }
.tbl { width: 100%; border-collapse: collapse; font-size: .9rem; }
.tbl th { text-align: start; color: var(--muted); font-size: .76rem; font-weight: 800; padding: 6px 4px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 8px 4px; border-bottom: 1px solid var(--line); }
.tbl tr.off td { opacity: .5; }
.hours-edit input { padding: 7px 8px; }
.check { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--shop); }
.checks { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.bars { display: flex; align-items: flex-end; gap: 6px; height: 150px; padding-top: 10px; }
.bars > div { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; }
.bars i { display: block; width: 100%; max-width: 26px; background: var(--shop); border-radius: 6px 6px 2px 2px; min-height: 3px; }
.bars small { color: var(--muted); font-size: .7rem; }
.hbar { display: grid; grid-template-columns: 1fr 2fr auto; gap: 10px; align-items: center; margin-bottom: 8px; font-size: .88rem; }
.hbar i { display: block; height: 10px; border-radius: 99px; background: var(--brass); }
.mini-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: .9rem; }
.mini-row > span:nth-child(2) { flex: 1; }
.with-preview { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.with-preview .panel { display: grid; gap: 12px; }
.preview { position: sticky; top: 20px; }
.phone { width: 320px; height: 640px; margin: 8px auto 0; border-radius: 40px; padding: 10px; background: #0d1838; box-shadow: 0 20px 50px rgba(0,0,0,.25); }
.phone iframe { width: 100%; height: 100%; border: 0; border-radius: 30px; background: var(--cream); }
.logo-edit { display: flex; gap: 16px; align-items: center; }
.logo-edit > div { flex: 1; display: grid; gap: 8px; }
.logo-edit .btn-row { margin: 0; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.sw { width: 36px; height: 36px; border-radius: 50%; border: 3px solid var(--paper); box-shadow: 0 0 0 1px var(--line); }
.sw.on { box-shadow: 0 0 0 2px var(--ink); }
.sw.custom { display: grid; place-items: center; position: relative; overflow: hidden; background: conic-gradient(red, orange, yellow, lime, cyan, blue, magenta, red); color: #fff; font-weight: 800; cursor: pointer; }
.sw.custom input { position: absolute; inset: 0; opacity: 0; cursor: pointer; height: 100%; }
.presets { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.preset { display: grid; gap: 8px; padding: 12px; border-radius: 14px; border: 1px solid var(--line); text-align: start; font-weight: 700; font-size: .95rem; transition: transform .1s; }
.preset:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.preset i { display: flex; gap: 4px; }
.preset b { width: 20px; height: 20px; border-radius: 50%; box-shadow: 0 0 0 1px rgba(0,0,0,.12); }
.color-field { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); cursor: pointer; }
.color-field input { width: 40px; height: 40px; padding: 0; border: 0; border-radius: 10px; flex: none; cursor: pointer; background: none; }
.color-field span { display: grid; }
.color-field small { color: var(--muted); font-weight: 500; font-family: ui-monospace, Consolas, monospace; }
.hero-opts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.hero-opt { display: grid; gap: 6px; padding: 8px; border: 2px solid var(--line); border-radius: 14px; background: var(--paper); font-weight: 700; font-size: .85rem; }
.hero-opt i { height: 46px; border-radius: 9px; }
.hero-opt.h-color i { background: var(--shop); }
.hero-opt.h-dark i { background: #14244f; }
.hero-opt.h-light i { background: #fff; border: 1px solid var(--line); box-shadow: inset 0 -10px 0 var(--shop); }
.hero-opt.on { border-color: var(--shop); }
.font-sample { display: grid; gap: 2px; padding: 14px 16px; border-radius: 12px; background: var(--cream); }
.font-sample b { font-size: 1.5rem; font-weight: 400; }
.range { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 10px; }
.range output { font-weight: 800; color: var(--shop); font-variant-numeric: tabular-nums; }
.range input { grid-column: 1 / -1; padding: 0; accent-color: var(--shop); border: 0; background: none; box-shadow: none; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; }
.pair-l { grid-column: 1 / -1; font-weight: 700; font-size: .85rem; }
.in-lang { display: flex; align-items: center; gap: 6px; }
.pair.textarea .in-lang { align-items: flex-start; }
.in-lang i { flex: none; width: 26px; padding: 3px 0; text-align: center; font-style: normal; font-size: .7rem; font-weight: 800; color: var(--muted); background: rgba(20,36,79,.07); border-radius: 6px; }
.pair.textarea .in-lang i { margin-top: 10px; }
.switch { display: flex; align-items: center; gap: 12px; cursor: pointer; font-weight: 500; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.knob { flex: none; position: relative; width: 44px; height: 26px; border-radius: 99px; background: #c9ccd4; transition: .2s; }
.knob::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch input:checked + .knob { background: var(--green); }
.switch input:checked + .knob::after { inset-inline-start: 21px; }
.switch input:focus-visible + .knob { outline: 3px solid color-mix(in srgb, var(--shop) 45%, transparent); }
.switch > span:last-child { display: grid; }
.switch small { color: var(--muted); font-size: .8rem; }
.edit-list { display: grid; gap: 14px; margin: 14px 0; }
.edit-card { display: grid; gap: 12px; padding: 16px; background: var(--paper); border-radius: 16px; box-shadow: var(--shadow); }
.edit-card.off { opacity: .65; }
.edit-card.compact { display: flex; align-items: center; gap: 12px; padding: 12px 14px; }
.edit-card.compact .rc-main small { color: var(--muted); font-size: .82rem; }
.edit-card.open { outline: 2px solid var(--shop); }
.switch.mini { flex: none; }
.ec-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ec-tools { display: flex; gap: 6px; }
.ec-who { display: flex; align-items: center; gap: 12px; }
.ec-who > span:last-child { display: grid; }
.ec-who small { color: var(--muted); }
.meet-list { display: grid; gap: 10px; margin: 0 0 22px; }
.meet-card { display: flex; gap: 16px; padding: 14px 16px; background: var(--paper); border-radius: 14px; box-shadow: var(--shadow); border-inline-start: 4px solid var(--blue); }
.meet-card.st-m-confirmed { border-color: var(--green); }
.meet-card.st-m-done, .meet-card.st-m-cancelled { opacity: .6; border-color: var(--line); }
.meet-when { display: grid; align-content: start; min-width: 92px; }
.meet-when span { color: var(--shop); font-weight: 800; }
.meet-main { flex: 1; display: grid; gap: 4px; min-width: 0; }
.meet-main small { color: var(--muted); }
.meet-main select { width: auto; padding: 5px 8px; font-size: .85rem; }
.link-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.link-row > div { display: grid; gap: 4px; min-width: 0; }
.link-row small { color: var(--muted); }
.link-row code { word-break: break-all; }
.link-row > span { display: flex; gap: 6px; }

/* ---------- Phones and small screens ---------- */
@media (max-width: 980px) {
  .with-preview { grid-template-columns: 1fr; }
  .preview { position: static; }
}
@media (max-width: 820px) {
  .admin, .admin.mini { grid-template-columns: 1fr; align-content: start; }
  .side { position: relative; height: auto; z-index: 30; padding: 10px 12px; gap: 6px; border-inline-end: 0; border-bottom: 4px solid transparent; flex-direction: row; flex-wrap: wrap; align-items: center; overflow: visible; }
  .side-top { padding: 0; flex: 1; }
  .side-mini, .side-h { display: none; }
  .side-list { display: flex; gap: 6px; overflow-x: auto; width: 100%; order: 3; scrollbar-width: none; }
  .side-item { width: auto; flex: none; padding: 6px 10px; }
  .side-item small { display: none; }
  .side-foot { margin: 0; padding: 0; display: flex; gap: 6px; }
  .side-foot .lang { width: auto; padding: 5px 10px; }
  .side-out span { display: none; }
  .side-out { padding: 6px 9px; }
  .admin-main { padding: 16px 16px 50px; }
  .grid2 { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .two, .three, .pair { grid-template-columns: 1fr; }
  .about { grid-template-columns: 1fr; }
  .ticket { grid-template-columns: 1fr; }
  .t-time { padding: 14px; }
  .t-time::after { inset-inline: 0; inset-block: auto -1px; width: auto; height: 6px; bottom: 0; }
  .steps span { font-size: .68rem; }
  .week-day { grid-template-columns: 1fr auto; }
  .wd-bar { grid-column: 1 / -1; }
  .history > div { grid-template-columns: 1fr auto; }
  .history > div > span:nth-child(2) { grid-column: 1 / -1; grid-row: 2; }
  .hero-in { gap: 12px; }
  .shop-hero .logo.lg { width: calc(var(--logo, 76px) * .8); height: calc(var(--logo, 76px) * .8); font-size: calc(var(--logo, 76px) * .32); }
  .bar .lang, .bar .chip-btn { padding: 4px 10px; }
  .phone { width: 100%; max-width: 320px; }
}
@media (max-width: 400px) {
  .shop-bar .bar-title > span:last-child { display: none; }
  .seg button { font-size: .8rem; padding: 9px 2px; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .hero-actions .pill { padding: 7px 11px; font-size: .82rem; }
}

/* ---------- Shop theme: top of the page (Admin → Theme) ---------- */
body[data-hero="dark"] .shop-hero { background: var(--solid); color: var(--on-solid); }
body[data-hero="dark"] .shop-hero .pill { color: var(--on-solid); background: color-mix(in srgb, var(--on-solid) 12%, transparent); border-color: color-mix(in srgb, var(--on-solid) 30%, transparent); }
body[data-hero="dark"] .shop-hero .badge:not(.on) { background: color-mix(in srgb, var(--on-solid) 15%, transparent); color: var(--on-solid); }
body[data-hero="light"] .shop-hero { background: var(--paper); color: var(--ink); border-bottom: 1px solid var(--line); }
body[data-hero="light"] .shop-hero::after { opacity: .5; width: 70px; }
body[data-hero="light"] .shop-hero .logo.lg { background: var(--shop); color: var(--on-shop, #fff); box-shadow: var(--shadow); }
body[data-hero="light"] .shop-hero .pill { color: var(--ink); background: var(--cream); border-color: var(--line); }
body[data-hero="light"] .shop-hero .badge:not(.on) { background: var(--cream); color: var(--muted); }
body[data-hero="light"] .shop-hero h1 { color: var(--shop); }
/* dark themes (Midnight, Black & gold) */
body.theme-dark .bar:not(.dark) { background: color-mix(in srgb, var(--cream) 92%, transparent); }
body.theme-dark .empty { background: color-mix(in srgb, var(--paper) 50%, transparent); }
body.theme-dark .seg { background: color-mix(in srgb, var(--ink) 8%, transparent); }
body.theme-dark .row-card, body.theme-dark .day, body.theme-dark .q-stats > div { box-shadow: none; border-color: var(--line); }
body.theme-dark .svc-ic { background: color-mix(in srgb, var(--shop) 18%, var(--paper)); }
body.theme-dark .hint { color: var(--muted); }
body.theme-dark .badge.on { background: rgba(70,180,120,.18); color: #7fd6a5; }
body.theme-dark .st-booked { background: rgba(110,140,230,.2); color: #a9bdf5; }
body.theme-dark .st-done { background: rgba(70,180,120,.18); color: #7fd6a5; }
body.theme-dark .tag.new { background: rgba(110,140,230,.2); color: #a9bdf5; }
