/* 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; background: none; border: 0; color: inherit; cursor: pointer; font-family: inherit; }
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: #14244f; color: #fff; padding: 10px 18px; border-radius: 999px; font-weight: 700; font-size: .9rem;   /* own colours: never follows the shop's text colour */
  box-shadow: 0 8px 24px rgba(0,0,0,.25); 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; }
/* Call · WhatsApp · Directions: round icons; the word slides open when the mouse is on it (or keyboard focus) */
.hero-actions .pill { gap: 0; padding: 0; width: auto; height: 42px; min-width: 42px; justify-content: center; padding-inline: 11px; transition: background .2s, padding .25s, gap .25s; }
.hero-actions .pill .ic { width: 19px; height: 19px; vertical-align: 0; }
.hero-actions .pill .pl { max-width: 0; overflow: hidden; white-space: nowrap; opacity: 0; transition: max-width .3s ease, opacity .2s; }
.hero-actions .pill:hover, .hero-actions .pill:focus-visible { gap: 7px; padding-inline: 12px 15px; }
.hero-actions .pill:hover .pl, .hero-actions .pill:focus-visible .pl { max-width: 140px; opacity: 1; }
@media (prefers-reduced-motion: reduce) { .hero-actions .pill, .hero-actions .pill .pl { transition: none; } }
.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: 26px; margin-bottom: 12px; }
.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: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 12px; }
.team > div { display: grid; justify-items: center; align-content: start; gap: 3px; text-align: center; padding: 16px 8px 14px; border-radius: 16px;
  background: var(--paper); border: 1px solid var(--line); font-size: .9rem; min-width: 0; }
.team .avatar { margin-bottom: 8px; box-shadow: 0 0 0 3px var(--paper), 0 0 0 5px color-mix(in srgb, var(--c, var(--shop)) 45%, transparent); }
.team b { line-height: 1.25; overflow-wrap: anywhere; }
.team small { color: var(--muted); font-size: .74rem; line-height: 1.35; }
/* Find us: address, Maps and phone in one tidy card */
.find-us { display: grid; gap: 10px; padding: 16px; border-radius: 16px; background: var(--paper); border: 1px solid var(--line); }
.find-us .fu-addr { margin: 0; line-height: 1.5; }
.find-us .fu-addr small { color: var(--muted); font-size: .88rem; }
.find-us .fu-row { display: flex; align-items: center; gap: 10px; padding-top: 10px; border-top: 1px solid var(--line); font-weight: 700; text-decoration: none; color: var(--ink); }
.find-us .fu-row .ic { color: var(--shop); }
.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; }
/* Hours & booking: Booking rules runs down the right side, Chair mood sits right under Opening hours (no gap) */
@media (min-width: 821px) {
  .hours-grid > .rules-panel { grid-column: 2; grid-row: 1 / span 2; }
  .hours-grid > .mood-admin { grid-column: 1; grid-row: 2; }
}
.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; }
/* demo shop banner (customer page, barber portal, admin) */
.demo-banner { margin: 0; padding: 9px 16px; text-align: center; font-size: .86rem; line-height: 1.4; background: #fff4d6; color: #5a4300; border-bottom: 1px solid #f0d58a; }
.admin-main .demo-banner { border-radius: 12px; border: 1px solid #f0d58a; margin: 0 0 14px; }
.fx-demo.inline { position: static; display: inline-block; vertical-align: middle; font-size: .62rem; margin-inline-start: 6px; }
/* QR window (any link) */
.modal-card.qr-modal { text-align: center; }
.qr-big { display: block; width: min(300px, 80vw); aspect-ratio: 1; margin: 10px auto; border-radius: 12px; border: 1px solid var(--line); background: #fff; }
.qr-big.wait { display: grid; place-items: center; }
.qr-url { display: block; word-break: break-all; font-size: .8rem; margin: 6px 0 12px; }
.modal-card.qr-modal .btn-row { justify-content: center; }
.modal-card.qr-modal .btn-row > * { flex: 0 1 auto; }
/* Google review card (customer) */
.review-card { display: grid; gap: 6px; justify-items: center; text-align: center; padding: 18px 16px; margin: 14px 0; border-radius: 16px; border: 1px solid var(--line); background: var(--paper); }
.review-card b { font-size: 1.05rem; }
.review-card p { margin: 0 0 6px; color: var(--muted); font-size: .9rem; }
.rv-stars { color: #e3a008; font-size: 1.4rem; letter-spacing: 3px; text-shadow: 0 1px 0 rgba(0,0,0,.08); }
.review-preview { max-width: 380px; }
.review-qr-btn { margin: 8px 0 4px; }
.review-line { text-align: center; margin: 16px 0 4px; font-size: .9rem; color: var(--muted); }
.review-line a { font-weight: 800; color: var(--shop); }
.rv-stars.sm { font-size: .95rem; letter-spacing: 1px; }
/* phone alerts box (barber portal + admin dashboard) */
.alerts-box { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 14px; padding: 12px 14px; margin: 0 0 14px; border-radius: 14px; border: 1px dashed var(--line); background: var(--paper); }
.alerts-box.on { border-style: solid; border-color: #2f7d5b55; background: color-mix(in srgb, #2f7d5b 7%, var(--paper)); }
.alerts-box > div { flex: 1 1 220px; min-width: 0; }
.alerts-box p { margin: 2px 0 0; font-size: .85rem; color: var(--muted); }
.sound-row { display: flex; align-items: center; gap: 10px; flex: 1 1 100%; }
/* the box with the mistake (sign up / sign in) */
.form input.bad { border-color: #c8102e !important; box-shadow: 0 0 0 3px rgba(200,16,46,.18); }
/* help center (customers + barbers) */
.help-faq { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; margin: 0 0 10px; background: var(--paper); }
.help-faq summary { cursor: pointer; font-weight: 800; list-style: none; display: flex; justify-content: space-between; gap: 10px; }
.help-faq summary::after { content: "+"; color: var(--shop); font-size: 1.2rem; line-height: 1; }
.help-faq[open] summary::after { content: "–"; }
.help-faq summary::-webkit-details-marker { display: none; }
.help-faq p { margin: 10px 0 0; color: var(--muted); line-height: 1.55; }
.help-contact { display: grid; gap: 6px; margin-top: 16px; padding: 14px; border-radius: 14px; background: color-mix(in srgb, var(--shop) 8%, var(--paper)); border: 1px solid var(--line); }
.help-contact small { color: var(--muted); font-weight: 700; }
.help-contact > b { font-size: 1.25rem; }
.help-contact .btn-row { margin-top: 4px; }
.help-card { display: flex; align-items: center; gap: 14px; width: 100%; margin-top: 18px; padding: 16px; border-radius: 16px; border: 1px solid var(--line);
  background: var(--paper); color: var(--ink); text-align: start; font: inherit; cursor: pointer; grid-column: 1 / -1; }
.help-card > .ic { width: 26px; height: 26px; color: var(--shop); flex: none; }
.help-card span { flex: 1; display: grid; gap: 2px; }
.help-card small { color: var(--muted); }
.help-card i { font-style: normal; font-size: 1.5rem; color: var(--muted); }
.faq-ed { padding: 12px 0; border-top: 1px dashed var(--line); }
.help-btn { width: 34px; height: 34px; }
/* booking confirm (barber ✓ Accept · customer waiting / confirmed) */
.confirm-box { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; margin: 16px 0; padding: 14px 16px; border-radius: 16px; border: 1px solid var(--line); font-size: 1.3rem; }
.confirm-box span { flex: 1 1 200px; display: grid; gap: 2px; font-size: 1rem; }
.confirm-box small { color: var(--muted); font-size: .86rem; }
.confirm-box.wait { background: color-mix(in srgb, #e3a008 10%, var(--paper)); border-color: color-mix(in srgb, #e3a008 45%, var(--line)); }
.confirm-box.ok { background: color-mix(in srgb, #2f7d5b 12%, var(--paper)); border-color: color-mix(in srgb, #2f7d5b 45%, var(--line)); }
.confirm-box .ok-line { flex: 1 1 100%; color: #2f7d5b; font-weight: 700; }
.tag.wait-tag { background: #fff4d6; color: #7a5600; font-weight: 800; }
.sbtn.accept-btn { font-weight: 800; background: #2f7d5b; border-color: #2f7d5b; color: #fff; }
/* ⭐ memberships: plan cards, the member's punch card, members list */
.mem-hero { text-align: center; margin: 6px 0 14px; }
.mem-hero h2 { margin-bottom: 6px; }
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; margin: 12px 0 18px; }
.plan-card { --tier: #b87333; position: relative; display: flex; flex-direction: column; gap: 6px; padding: 22px 18px 18px; border-radius: 18px; color: #2a2016;
  background: linear-gradient(160deg, #fbf3e4, #f1e3c9); box-shadow: 0 14px 30px rgba(20,36,79,.14), inset 0 0 0 2px color-mix(in srgb, var(--tier) 55%, transparent); }
.plan-card.tier-gold { --tier: #c9a227; background: linear-gradient(160deg, #fff8e1, #f3dc9b); transform: translateY(-4px); box-shadow: 0 20px 40px rgba(201,162,39,.32), inset 0 0 0 2px var(--tier); }
.plan-card.tier-vip { --tier: #d4af37; color: #f6ead0; background: radial-gradient(circle at 20% 0%, #3a3122, #121212 70%); box-shadow: 0 20px 44px rgba(0,0,0,.4), inset 0 0 0 2px var(--tier); }
.plan-tier { align-self: flex-start; padding: 2px 10px; border-radius: 99px; background: var(--tier); color: #fff; font-size: .7rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.plan-card.tier-vip .plan-tier { color: #121212; }
.plan-ribbon { position: absolute; top: -11px; inset-inline-end: 14px; padding: 3px 12px; border-radius: 99px; background: #c8102e; color: #fff; font-size: .72rem; font-weight: 800; box-shadow: 0 6px 14px rgba(200,16,46,.3); }
.plan-card h3 { margin: 4px 0 0; font-family: "DM Serif Display", "Cairo", serif; font-weight: 400; font-size: 1.6rem; }
.plan-price { margin: 0; display: flex; align-items: baseline; gap: 6px; }
.plan-price b { font-family: "DM Serif Display", "Cairo", serif; font-weight: 400; font-size: 2.2rem; color: var(--tier); }
.plan-card.tier-basic .plan-price b { color: #8b4a1f; }
.plan-price small { opacity: .7; font-weight: 700; }
.plan-save { margin: 0; padding: 6px 10px; border-radius: 10px; background: color-mix(in srgb, #2f7d5b 14%, transparent); color: #24674a; font-weight: 800; font-size: .86rem; }
.plan-card.tier-vip .plan-save { background: rgba(212,175,55,.16); color: #f1d77a; }
.plan-card ul { list-style: none; margin: 6px 0 10px; padding: 0; display: grid; gap: 6px; font-size: .92rem; }
.plan-card .cta { margin-top: auto; }
.plan-card.tier-vip .cta { background: var(--tier); color: #121212; }
.mem-steps { margin: 14px 0; padding: 14px 16px; border-radius: 14px; border: 1px dashed var(--line); background: var(--paper); }
.mem-steps ol { margin: 8px 0; padding-inline-start: 22px; display: grid; gap: 4px; }
.mem-steps .link { display: block; margin-top: 8px; }
.mem-card { --shop: #8b4a1f; }
.mem-card.tier-gold { --shop: #a8811a; background: repeating-linear-gradient(0deg, transparent 0 23px, rgba(42,32,22,.05) 23px 24px), linear-gradient(160deg, #fff6d8, #efd58a); }
.mem-card.tier-vip { --shop: #d4af37; color: #f6ead0; background: repeating-linear-gradient(0deg, transparent 0 23px, rgba(255,255,255,.03) 23px 24px), radial-gradient(circle at 20% 0%, #3a3122, #121212 70%); }
.mem-card.tier-vip .ly-head { border-bottom-color: rgba(212,175,55,.4); }
.mem-card.tier-vip .ly-head small, .mem-card.tier-vip .ly-slot { color: rgba(246,234,208,.6); border-color: rgba(212,175,55,.45); }
.mem-card .ly-slot.carry { border-style: solid; border-color: #2f7d5b; }
.mem-state { margin-inline-start: auto; padding: 2px 10px; border-radius: 99px; font-size: .72rem; font-weight: 800; background: #e7e2d6; color: #5b4a33; white-space: nowrap; }
.mem-state.st-active { background: #2f7d5b; color: #fff; }
.mem-state.st-requested, .mem-state.st-grace { background: #fff4d6; color: #7a5600; }
.mem-state.st-frozen { background: #dceaf7; color: #1d4f7a; }
.mem-state.st-expired, .mem-state.st-cancelled { background: #f3d9dc; color: #8a1c2b; }
.mem-inf { margin: 10px 0 2px; text-align: center; font-family: "DM Serif Display", serif; font-size: 3rem; line-height: 1; color: var(--shop); }
.mem-inf small { display: block; font-family: inherit; font-size: .78rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.mem-line { margin: 10px 0 2px; text-align: center; font-weight: 700; font-size: .9rem; }
.mem-carry { margin: 0; text-align: center; font-size: .72rem; font-weight: 800; color: #2f7d5b; }
.mem-saved { margin: 10px 0 0; padding-top: 10px; border-top: 2px dashed rgba(42,32,22,.2); display: flex; align-items: baseline; justify-content: center; gap: 8px; }
.mem-saved b { font-family: "DM Serif Display", serif; font-weight: 400; font-size: 1.9rem; color: var(--shop); }
.mem-saved small { font-weight: 800; letter-spacing: .14em; text-transform: uppercase; font-size: .7rem; }
.mem-total { text-align: center; font-weight: 800; color: #2f7d5b; }
.mem-open { display: block; width: 100%; padding: 0; border: 0; background: none; text-align: inherit; cursor: pointer; font: inherit; color: inherit; }
.mem-badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 99px; background: #a8811a; color: #fff; font-size: .74rem; font-weight: 800; }
.price.mem-inc { color: #2f7d5b; }
.mem-tag { display: inline-block; padding: 1px 8px; border-radius: 6px; font-size: .72rem; font-weight: 800; background: #b87333; color: #fff; vertical-align: middle; }
.mem-tag.tier-gold { background: #c9a227; color: #2a2016; }
.mem-tag.tier-vip { background: #121212; color: #d4af37; }
.days .day.member-day { border: 1px solid #c9a227; box-shadow: inset 0 0 0 1px #c9a227; }
.days .day.member-day small:first-child::before { content: "⭐ "; }
.mem-list { display: grid; gap: 10px; }
.mem-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; padding: 12px 14px; border-radius: 14px; background: var(--paper); border: 1px solid var(--line); border-inline-start: 4px solid #b87333; }
.mem-row.tier-gold { border-inline-start-color: #c9a227; }
.mem-row.tier-vip { border-inline-start-color: #121212; }
.mem-who { flex: 1 1 220px; display: grid; gap: 2px; min-width: 0; }
.mem-who small { color: var(--muted); }
.mem-who .client-name { justify-self: start; text-align: start; padding: 0; }
.mem-acts { display: flex; flex-wrap: wrap; gap: 6px; }
.mem-client { margin: 10px 0; }
.mem-filter { flex-wrap: wrap; }
.mem-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.mem-pick label { cursor: pointer; }
.mem-pick input { position: absolute; opacity: 0; pointer-events: none; }
.mem-pick span { display: inline-block; padding: 8px 14px; border-radius: 99px; border: 1px solid var(--line); background: var(--paper); font-weight: 800; }
.mem-pick input:checked + span { background: var(--shop); color: var(--on-shop, #fff); border-color: var(--shop); }
.mem-pick input:focus-visible + span { outline: 2px solid var(--shop); outline-offset: 2px; }
.mem-bsel { width: auto; min-width: 150px; }
.mem-money { margin-top: 16px; }
.mem-log summary { cursor: pointer; display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: baseline; }
.mem-log-row { display: grid; grid-template-columns: 120px 1fr auto; gap: 4px 12px; margin: 0; padding: 8px 0; border-top: 1px solid var(--line); font-size: .9rem; }
.mem-log-row small { color: var(--muted); }
@media (max-width: 600px) { .mem-log-row { grid-template-columns: 1fr; } }
.mem-can { margin-bottom: 4px; }
.mem-tpl { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.mem-plan-edit { align-items: start; padding: 16px 0; border-top: 1px solid var(--line); }
/* customers list: chips you can swipe, a list that scrolls in its own area, swipe a customer for quick buttons */
.cl-wrap { border: 1px solid var(--line); border-radius: 16px; background: var(--paper); overflow: hidden; }
.cl-head { position: sticky; top: 0; z-index: 2; padding: 12px 12px 6px; background: var(--paper); border-bottom: 1px solid var(--line); }
.cl-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cl-tools .search { flex: 1 1 180px; min-width: 0; }
.cl-sort { width: auto; flex: 0 0 auto; }
@media (max-width: 520px) { .cl-tools .search { flex-basis: 100%; } .cl-sort { flex: 1 1 auto; } }
.cl-chips { display: flex; gap: 6px; overflow-x: auto; padding: 10px 2px 4px; scroll-snap-type: x proximity; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.cl-chips::-webkit-scrollbar { display: none; }
.cl-chip { flex: 0 0 auto; scroll-snap-align: start; display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 99px; border: 1px solid var(--line); background: transparent; color: inherit; font-weight: 700; font-size: .85rem; white-space: nowrap; cursor: pointer; }
.cl-chip i { font-style: normal; font-size: .72rem; font-weight: 800; padding: 1px 7px; border-radius: 99px; background: color-mix(in srgb, currentColor 12%, transparent); }
.cl-chip.on { background: var(--shop); border-color: var(--shop); color: var(--on-shop, #fff); }
.cl-chip:focus-visible, .cl-more:focus-visible, .cl-a:focus-visible { outline: 2px solid var(--shop); outline-offset: 2px; }
.cl-count { margin: 4px 2px 0; }
.cl-tip { opacity: .8; }
@media (hover: hover) and (pointer: fine) { .cl-tip { display: none; } }
.cl-scroll { max-height: min(62vh, 640px); min-height: 160px; overflow-y: auto; overscroll-behavior: contain; padding: 8px; display: grid; gap: 6px; align-content: start;
  scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--shop) 60%, transparent) transparent; }
.cl-scroll::-webkit-scrollbar { width: 6px; }
.cl-scroll::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--shop) 60%, transparent); border-radius: 99px; }
.cl-scroll::-webkit-scrollbar-track { background: transparent; }
.cl-item { position: relative; border-radius: 12px; overflow: hidden; }
.cl-item[hidden] { display: none; }
.cl-actions { position: absolute; inset-block: 0; inset-inline-end: 0; display: flex; align-items: stretch; visibility: hidden; }
.cl-item.open .cl-actions, .cl-item.drag .cl-actions { visibility: visible; }
.cl-a { display: grid; place-items: center; align-content: center; gap: 2px; min-width: 58px; padding: 0 8px; border: 0; color: #fff; font-size: .7rem; font-weight: 800; text-decoration: none; cursor: pointer; }
.cl-a .ic { width: 20px; height: 20px; }
.cl-a.call { background: #1d3a8a; } .cl-a.wa { background: #1f9d55; } .cl-a.book { background: #c8102e; } .cl-a.mem { background: #a8811a; }
.cl-card { position: relative; z-index: 1; display: flex; align-items: center; background: var(--paper); border-radius: 12px; transition: transform .22s ease; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.cl-item.drag .cl-card { transition: none; }
.cl-card .client-row { flex: 1; min-width: 0; border-start-end-radius: 0; border-end-end-radius: 0; border-inline-end: 0; }
.cl-more { align-self: stretch; width: 38px; flex: 0 0 38px; border: 1px solid var(--line); border-inline-start: 0; border-start-end-radius: 12px; border-end-end-radius: 12px; background: var(--paper); color: var(--muted); font-size: 1.2rem; font-weight: 800; cursor: pointer; }
.cl-more:hover, .cl-item.open .cl-more { color: var(--shop); }
@media (prefers-reduced-motion: reduce) { .cl-card { transition: none; } }
/* QR poster (Admin → Links) */
.qr-box { display: flex; flex-wrap: wrap; gap: 18px; align-items: flex-start; }
.qr-img { width: 210px; aspect-ratio: 3 / 4; border-radius: 12px; border: 1px solid var(--line); background: #fff; box-shadow: 0 10px 26px rgba(0,0,0,.12); }
.qr-img.wait { display: grid; place-items: center; }
.qr-side { flex: 1 1 220px; display: grid; gap: 10px; min-width: 0; }
.qr-side code { word-break: break-all; font-size: .82rem; }
.qr-side .btn-row { margin-top: 0; }
.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) {
  /* small phones: keep the shop name (up to 2 lines) like on a big screen */
  .shop-bar .bar-title { gap: 7px; }
  .shop-bar .bar-title > span:last-child { white-space: normal; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-height: 1.12; font-size: .84rem; overflow-wrap: anywhere; }
  .seg button { font-size: .8rem; padding: 9px 2px; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .hero-actions .pill { 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; }

/* ---------- Loading (data comes from Supabase) ---------- */
.loading { min-height: 70vh; display: grid; place-items: center; }
.spin { width: 38px; height: 38px; border-radius: 50%; border: 4px solid rgba(20,36,79,.14); border-top-color: #c8102e; animation: spin .8s linear infinite; }
body[data-view="barber"] .spin { border-color: rgba(255,255,255,.14); border-top-color: #c8102e; }
@keyframes spin { to { transform: rotate(360deg); } }
.is-busy { opacity: .65; cursor: progress; }
.login-status { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; font-weight: 700; }
.login-status.on { color: #2f7d5b; } .login-status.off { color: var(--muted, #6b7280); }
.login-make { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; align-items: end; margin-top: 8px; }
@media (max-width: 560px) { .login-make { grid-template-columns: 1fr; } }
.danger-zone { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line, #e3e1dc); }
.btn.danger, .btn.ghost.danger { color: #c8102e; border-color: rgba(200,16,46,.35); }
.btn-col { display: grid; gap: 4px; justify-items: end; }

/* ---------- Chair mood ---------- */
.mood-box { border: 1px solid var(--line, #e3e1dc); border-radius: 16px; padding: 14px; background: linear-gradient(135deg, rgba(200,16,46,.05), rgba(29,58,138,.05)); display: grid; gap: 6px; }
.mood-box h3 { margin: 0; font-size: 1rem; }
.mood-box summary { cursor: pointer; font-weight: 800; }
.mood-box.mine { margin: 14px 0; }
.mood-box.mine .btn { justify-self: start; }
.mood-q { margin: 6px 0 2px; font-size: .78rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--muted, #5f6679); }
.mood-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.mood-chip { position: relative; cursor: pointer; }
.mood-chip input { position: absolute; opacity: 0; pointer-events: none; }
.mood-chip > span { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 99px; border: 1.5px solid var(--line, #e3e1dc); background: var(--paper, #fff); font-size: .86rem; font-weight: 700; transition: transform .15s, background .15s, border-color .15s; }
.mood-chip > span i { font-style: normal; font-size: 1.05rem; }
.mood-chip:hover > span { transform: translateY(-1px); }
.mood-chip input:checked + span, .mood-chip.on > span { background: var(--shop, #c8102e); border-color: var(--shop, #c8102e); color: var(--on-shop, #fff); box-shadow: 0 6px 14px rgba(0,0,0,.12); }
.mood-chip input:focus-visible + span { outline: 2px solid var(--shop, #c8102e); outline-offset: 2px; }
/* on the barber's cards the mood is small and colourful, quiet = calm blue, chatty = warm */
.mood-badges { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 2px; }
.mood-badges .mood-chip > span { padding: 3px 9px; font-size: .74rem; box-shadow: none; }
.mood-badges .m-quiet > span { background: #1d3a8a; border-color: #1d3a8a; color: #fff; }
.mood-badges .m-chatty > span { background: #d4622a; border-color: #d4622a; color: #fff; }
.mood-badges .m-some > span { background: #2f7d5b; border-color: #2f7d5b; color: #fff; }
.mood-badges .m-hurry > span { background: #c8102e; border-color: #c8102e; color: #fff; }
.mood-badges .mood-chip:not(.m-quiet):not(.m-chatty):not(.m-some):not(.m-hurry) > span { background: rgba(139,90,43,.12); border-color: rgba(139,90,43,.3); color: inherit; }
.mood-line { display: grid; gap: 4px; margin: 10px 0; }

/* ---------- Forgot password (like Food Portals) ---------- */
.modal-card.forgot { max-width: 440px; }
.modal-card.forgot .wide { width: 100%; justify-content: center; margin-top: 10px; }
.no-email { border-top: 1px dashed var(--line, #e3e1dc); margin-top: 12px; padding-top: 10px; }
.no-email summary { cursor: pointer; font-weight: 700; color: var(--muted, #5f6679); }
.no-email p { margin: 8px 0; }
.code-in { font-size: 1.6rem !important; letter-spacing: .5em; text-align: center; font-weight: 800; }
.email-box { display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; align-items: end; margin-top: 14px; }
.email-box small { grid-column: 1 / -1; }
.login-card .link.center, .auth .link { display: block; margin: 10px auto 0; }
.mood-admin .mood-chips { margin: 4px 0 8px; }
.mood-preview { display: grid; gap: 6px; margin-top: 8px; }

/* ---------- Loyalty card: vintage barbershop punch card ---------- */
.ly-card { position: relative; color: #2a2016; padding: 18px 18px 14px 30px; border-radius: 10px; margin: 14px 0;
  background: repeating-linear-gradient(0deg, transparent 0 23px, rgba(42,32,22,.05) 23px 24px), linear-gradient(160deg, #fbf3e4, #f1e3c9);
  box-shadow: 0 14px 30px rgba(20,36,79,.18), inset 0 0 0 1px rgba(139,90,43,.25);
  -webkit-mask: radial-gradient(circle 8px at 100% 50%, transparent 98%, #000) right / 51% 100% no-repeat, linear-gradient(#000, #000) left / 50% 100% no-repeat;
          mask: radial-gradient(circle 8px at 100% 50%, transparent 98%, #000) right / 51% 100% no-repeat, linear-gradient(#000, #000) left / 50% 100% no-repeat; }
html[dir="rtl"] .ly-card { padding: 18px 30px 14px 18px; }
.ly-card::before { content: ""; position: absolute; inset-block: 0; inset-inline-start: 0; width: 14px; border-start-start-radius: 10px; border-end-start-radius: 10px;
  background: repeating-linear-gradient(-45deg, #c8102e 0 7px, #fff 7px 12px, #1d3a8a 12px 19px, #fff 19px 24px); }
.ly-head { display: flex; align-items: center; gap: 10px; padding-bottom: 10px; border-bottom: 2px dashed rgba(42,32,22,.25); }
.ly-head b { display: block; font-family: "DM Serif Display", "Cairo", serif; font-weight: 400; font-size: 1.15rem; line-height: 1.1; }
.ly-head small { font-size: .68rem; font-weight: 800; letter-spacing: .2em; text-transform: uppercase; color: #8b5a2b; }
.ly-count { margin-inline-start: auto; font-weight: 800; color: #8b5a2b; }
.ly-count b { font-family: "DM Serif Display", serif; font-size: 1.8rem; color: var(--shop, #c8102e); }
.ly-grid { display: grid; grid-template-columns: repeat(var(--n), 1fr); gap: 10px; padding: 14px 0 8px; }
.ly-slot { position: relative; aspect-ratio: 1; border-radius: 50%; border: 2px dashed rgba(42,32,22,.3); display: grid; place-items: center; color: rgba(42,32,22,.35); font-size: .8rem; }
.ly-slot.gift { border: 2px solid #8b5a2b; background: rgba(139,90,43,.08); }
.ly-slot small { position: absolute; bottom: -15px; left: 50%; transform: translateX(-50%); white-space: nowrap; font-size: .58rem; font-weight: 800; color: #8b5a2b; }
.ly-ink { display: grid; place-items: center; width: 82%; height: 82%; border-radius: 50%; border: 2.5px solid var(--shop, #c8102e); color: var(--shop, #c8102e);
  transform: rotate(var(--tilt)); opacity: .9; mix-blend-mode: multiply; animation: lystamp .35s ease-out both; }
.ly-ink svg { width: 58%; height: 58%; }
.ly-gift { font-style: normal; font-size: 1.1rem; }
@keyframes lystamp { from { transform: rotate(var(--tilt)) scale(1.6); opacity: 0; } }
.ly-now { margin: 14px 0 4px; padding: 8px 12px; border-radius: 8px; background: var(--shop, #c8102e); color: #fff; font-weight: 800; text-align: center; }
.ly-next { margin: 14px 0 4px; font-weight: 800; text-align: center; }
.ly-foot { margin: 6px 0 0; font-size: .7rem; color: rgba(42,32,22,.6); text-align: center; }
.ly-card.small { padding-block: 12px 10px; margin: 8px 0; }
.ly-card.small .ly-grid { gap: 6px; }
.ly-badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 99px; background: #8b5a2b; color: #fff; font-size: .74rem; font-weight: 800; }
@media (prefers-reduced-motion: reduce) { .ly-ink { animation: none; } }
.loyalty-admin { margin-bottom: 18px; }
.ly-edit { align-items: start; }
.ly-rule { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 6px 0; font-weight: 700; }
.ly-rule input { width: 70px; }

/* ---------- A barber's own link and look ---------- */
.with-barber { display: flex; align-items: center; gap: 14px; padding: 12px 14px; margin: 4px 0 14px; border-radius: 16px; color: var(--ink);
  background: color-mix(in srgb, var(--c, var(--shop)) 10%, var(--paper, #fff)); border: 2px solid var(--c, var(--shop)); }
.with-barber > div > small { display: block; font-size: .7rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--c, var(--shop)); }
.with-barber > div > b { display: block; font-size: 1.2rem; }
.with-barber > div > span { display: block; color: var(--muted, #5f6679); font-size: .88rem; }   /* only the text, never the round picture */
.with-barber .link { margin-inline-start: auto; white-space: nowrap; }
.login-me { display: grid; justify-items: center; gap: 6px; margin-bottom: 8px; text-align: center; }
.login-me p { margin: 4px 0 0; font-weight: 800; font-size: 1.15rem; }
.my-link { display: grid; gap: 4px; padding: 12px 14px; margin: 8px 0; border-radius: 14px; border: 1px dashed var(--line, #e3e1dc); }
.my-link code { overflow-wrap: anywhere; font-size: .8rem; }
.my-look .photo-edit { display: flex; align-items: center; gap: 14px; margin-bottom: 8px; }


/* ---------- Owner sidebar like Food Portals: add a client right here, Help & support ---------- */
.side-add { display: grid; gap: 6px; margin: 8px 2px 4px; }
.side-add input { width: 100%; padding: 9px 12px; border-radius: 10px; border: 1px solid #2c4174; background: #0f1c42; color: #fff; font: inherit; font-size: .88rem; }
.side-add input::placeholder { color: #7f89a6; }
.side-add-btn { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 9px; border-radius: 10px; border: 0; background: var(--red, #c8102e); color: #fff; font: inherit; font-weight: 800; font-size: .88rem; cursor: pointer; }
.side-add-btn:hover { filter: brightness(1.08); }
.side-add-btn .ic { width: 16px; height: 16px; }
.admin.mini .side-add { display: none; }
.side-help { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 8px; border-radius: 999px; border: 1px solid #2c4174; background: none; color: #e8e9ee; font: inherit; font-weight: 700; font-size: .85rem; cursor: pointer; }
.side-help:hover, .side-out:hover { background: #16244d; }
.admin.mini .side-help span { display: none; }
.wc-add { grid-template-columns: 1fr auto; max-width: 520px; margin-top: 14px; }
.wc-add input { background: var(--paper, #fff); color: var(--ink, #14244f); border-color: var(--line, #e3e1dc); }
.web-clients { display: grid; gap: 8px; }
.fd-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin: 4px 0 12px; }
.fd-count { font-size: .92rem; color: var(--muted); }
.fd-count b { font-size: 1.3rem; color: var(--ink); }
.wc-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--line, #e3e1dc); background: var(--paper, #fff); }
.wc-row.off { opacity: .6; }
.wc-name { display: grid; min-width: 0; flex: 1 1 160px; }
.wc-name b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wc-name small { color: var(--muted, #5f6679); font-family: ui-monospace, Consolas, monospace; font-size: .74rem; }
.cl-st { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; border: 1.5px solid currentColor; border-radius: 999px; padding: 3px 10px; }
.cl-st i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.cl-st.live { color: #2f7d5b; }
.cl-st.onboarding { color: #8b5a2b; }
.cl-st.demo { color: #1d3a8a; }
.tbl-wrap { overflow-x: auto; }
.users-tbl td { vertical-align: middle; }
.users-tbl tr.off td { opacity: .55; }
.row-acts { display: flex; gap: 6px; justify-content: flex-end; }
.help-list { padding-inline-start: 20px; display: grid; gap: 8px; }
.wc-row select { width: auto; flex: 0 0 auto; min-width: 140px; }
.wc-row .switch.mini { flex: none; }

/* ---------- Small phones (and the phones on the website): the top bar never piles up ---------- */
.shop-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr)); }
.shop-tile, .shop-tile * { min-width: 0; }
.shop-tile p.small { overflow-wrap: anywhere; }
.bar-title { flex: 0 1 auto; }
.bar-end { flex: 0 0 auto; }
@media (max-width: 420px) {
  .bar { padding: 8px 10px; gap: 6px; }
  .bar-end { gap: 6px; }
  .shop-bar .chip-btn { padding: 5px 9px; gap: 4px; font-size: .78rem; }
  .bar .lang { padding: 4px 9px; font-size: .78rem; }
  .shop-bar .logo.sm { width: 30px; height: 30px; font-size: .75rem; }
  .brandmark span { font-size: .92rem; }
  .finder { padding: 22px 12px 40px; }
  .finder h1 { font-size: 1.7rem; }
}
@media (max-width: 300px) {
  .shop-bar .chip-btn .cb-txt { display: none; }
  .shop-bar .chip-btn { padding: 6px 8px; }
  .brandmark span { display: none; }
  .back { padding: 0 2px; }
}

/* barber sign-in page in the shop's own theme */
body[data-view="barber-themed"] .login-card { background: var(--paper); color: var(--ink); }
body[data-view="barber-themed"] .login-card .cta { background: var(--shop); color: var(--on-shop, #fff); }
.login-me .logo.lg { width: 76px; height: 76px; }

/* ---------- Choose your barbershop ---------- */
.fx-hero { position: relative; overflow: hidden; color: #fff; padding: 46px 16px 64px; text-align: center;
  background: radial-gradient(70% 90% at 80% 10%, rgba(200,16,46,.35), transparent 60%), radial-gradient(60% 80% at 10% 100%, rgba(29,58,138,.55), transparent 60%), #0b1530; }
.fx-hero::before, .fx-hero::after { content: ""; position: absolute; top: 0; bottom: 0; width: 14px; background: repeating-linear-gradient(-45deg, #c8102e 0 10px, #fff 10px 18px, #1d3a8a 18px 28px, #fff 28px 36px); opacity: .85; }
.fx-hero::before { inset-inline-start: 0; } .fx-hero::after { inset-inline-end: 0; }
.fx-hero-in { max-width: 720px; margin: 0 auto; display: grid; gap: 10px; justify-items: center; }
.fx-kicker { margin: 0; display: inline-block; padding: 4px 12px; border: 2px solid #ff8fa1; color: #ff8fa1; border-radius: 6px; transform: rotate(-2deg);
  font-weight: 800; font-size: .74rem; letter-spacing: .18em; text-transform: uppercase; }
.fx-hero h1 { font-family: "DM Serif Display", "Cairo", serif; font-weight: 400; font-size: clamp(2.1rem, 7vw, 3.6rem); line-height: 1.05; margin: 4px 0 0; }
.fx-hero p { margin: 0; color: #cfd5e6; max-width: 520px; }
.fx-search { position: relative; width: min(100%, 520px); margin-top: 10px; }
.fx-search .ic { position: absolute; inset-inline-start: 16px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; color: #5f6679; }
.fx-search input { width: 100%; padding: 15px 18px; padding-inline-start: 46px; border-radius: 999px; border: 0; font: inherit; font-size: 1rem; color: #14244f; background: #fff;
  box-shadow: 0 14px 34px rgba(0,0,0,.35); outline: none; }
.fx-search input:focus { box-shadow: 0 0 0 4px rgba(200,16,46,.45), 0 14px 34px rgba(0,0,0,.35); }
.fx-filters { display: flex; align-items: center; gap: 12px; margin-top: 4px; }
.fx-chip { display: inline-flex; align-items: center; gap: 7px; padding: 7px 14px; border-radius: 999px; border: 1.5px solid rgba(255,255,255,.4); background: none; color: #fff; font: inherit; font-weight: 800; font-size: .85rem; cursor: pointer; }
.fx-chip i { width: 8px; height: 8px; border-radius: 50%; background: #5fd197; }
.fx-chip.on { background: #fff; color: #14244f; border-color: #fff; }
.fx-count { color: #b9c1d6; font-size: .85rem; font-weight: 700; }
.finder { max-width: 1100px; margin: -34px auto 0; padding: 0 16px 50px; position: relative; }
.fx-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
.fx-card { display: flex; flex-direction: column; border-radius: 22px; overflow: hidden; text-decoration: none; color: var(--ink, #14244f); background: var(--paper, #fff);
  border: 1px solid var(--line, #e3e1dc); box-shadow: 0 18px 40px rgba(20,36,79,.12); transition: transform .2s, box-shadow .2s; }
.fx-card[hidden] { display: none; }
.fx-card:hover { transform: translateY(-5px); box-shadow: 0 26px 50px rgba(20,36,79,.2); }
.fx-cover { position: relative; height: 104px; background: radial-gradient(90% 120% at 100% 0%, rgba(255,255,255,.22), transparent 60%), var(--c); }
.fx-cover::after { content: ""; position: absolute; inset-inline: 0; bottom: 0; height: 6px; background: repeating-linear-gradient(-45deg, #c8102e 0 8px, #fff 8px 14px, #1d3a8a 14px 22px, #fff 22px 28px); }
.fx-badge { position: absolute; top: 12px; inset-inline-end: 12px; display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px;
  background: rgba(0,0,0,.35); color: #fff; font-size: .74rem; font-weight: 800; backdrop-filter: blur(4px); }
.fx-badge i { width: 7px; height: 7px; border-radius: 50%; background: #c9cfe0; }
.fx-badge.on i { background: #5fd197; box-shadow: 0 0 0 3px rgba(95,209,151,.3); }
.fx-demo { position: absolute; top: 12px; inset-inline-start: 12px; padding: 3px 9px; border-radius: 6px; background: rgba(255,255,255,.9); color: #1d3a8a; font-size: .66rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.fx-logo { position: absolute; bottom: -34px; inset-inline-start: 18px; z-index: 1; }
.fx-logo .logo.lg { width: 70px; height: 70px; border-radius: 18px; border: 4px solid var(--paper, #fff); box-shadow: 0 8px 18px rgba(0,0,0,.18); background: var(--c); color: #fff; font-size: 1.3rem; }
.fx-body { display: flex; flex-direction: column; gap: 8px; padding: 44px 18px 18px; flex: 1; }
.fx-body h2 { margin: 0; font-family: "DM Serif Display", "Cairo", serif; font-weight: 400; font-size: 1.45rem; line-height: 1.15; }
.fx-tag { margin: 0; color: var(--muted, #5f6679); font-size: .92rem; }
.fx-meta { margin: 0; display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--muted, #5f6679); font-size: .85rem; font-weight: 600; }
.fx-meta span { display: inline-flex; align-items: center; gap: 5px; }
.fx-meta .ic { width: 15px; height: 15px; color: var(--c); }
.fx-team { display: flex; align-items: center; margin-top: 2px; }
.fx-team .avatar { margin-inline-end: -8px; box-shadow: 0 0 0 2px var(--paper, #fff); }
.fx-team small { margin-inline-start: 16px; color: var(--muted, #5f6679); font-weight: 700; }
.fx-cta { margin-top: auto; display: flex; justify-content: center; align-items: center; gap: 8px; padding: 12px; border-radius: 14px; background: var(--c); color: #fff; font-weight: 800; }
.fx-cta b { transition: transform .2s; }
.fx-card:hover .fx-cta b { transform: translateX(4px); }
html[dir="rtl"] .fx-cta b { transform: scaleX(-1); }
html[dir="rtl"] .fx-card:hover .fx-cta b { transform: scaleX(-1) translateX(4px); }
.fx-none { text-align: center; margin-top: 20px; }
body[data-view="shops"] { background: var(--cream, #f7f5f2); }
@media (max-width: 420px) {
  .fx-hero { padding: 30px 14px 54px; }
  .fx-hero::before, .fx-hero::after { width: 8px; }
  .fx-search input { padding: 12px 14px; padding-inline-start: 42px; font-size: .95rem; }
}
.fx-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 340px)); justify-content: center; }

/* ---------- Chair mood editor (Admin) ---------- */
.mood-group { display: grid; gap: 6px; margin: 10px 0; }
.mood-row { display: grid; grid-template-columns: 58px 1fr 1fr auto; gap: 6px; align-items: center; }
.mood-row input { min-width: 0; }
.mood-row .mood-ic { text-align: center; font-size: 1.15rem; }
@media (max-width: 560px) { .mood-row { grid-template-columns: 52px 1fr auto; } .mood-row input[dir="rtl"] { grid-column: 2; } }

/* "A new version is ready" (shown only when there are unsaved changes; otherwise the page just refreshes) */
.new-version { position: fixed; z-index: 90; left: 50%; bottom: 18px; transform: translateX(-50%); display: flex; align-items: center; gap: 12px;
  padding: 10px 12px 10px 16px; border-radius: 999px; background: #14244f; color: #fff; font-weight: 700; box-shadow: 0 12px 30px rgba(0,0,0,.3); }
.new-version .ic { width: 18px; height: 18px; }

/* =========================================================================
   Calmer shop page (customer) — more room, bigger text, nothing squeezed.
   Shop owners' feedback 2026-10-22: "crowded, hard on the eye; Food Portals feels calmer".
   ========================================================================= */
body[data-view="customer"] { --fs-c: calc(var(--fs, 15px) + 1px); }
body[data-view="customer"] main.cust { padding: 26px 20px 48px; font-size: var(--fs-c); }

/* the top: one calm block with space between each line */
body[data-view="customer"] .shop-hero { padding: 34px 20px 30px; }
body[data-view="customer"] .shop-hero::after { width: 90px; opacity: .07; }
body[data-view="customer"] .hero-in { gap: 18px; align-items: center; }
body[data-view="customer"] .shop-hero h1 { line-height: 1.05; margin: 0 0 6px; letter-spacing: .01em; }
body[data-view="customer"] .tagline { margin: 0 0 12px; font-size: 1rem; line-height: 1.45; opacity: .85; }
body[data-view="customer"] .meta { gap: 8px 14px; font-size: .9rem; }
body[data-view="customer"] .hero-actions { margin-top: 22px; gap: 12px; }
body[data-view="customer"] .hero-actions .pill { height: 44px; min-width: 44px; }

/* tabs: their own line under the top (no more overlapping), easy to tap */
body[data-view="customer"] .shop-hero + .seg { margin-top: 18px; width: calc(100% - 40px); padding: 5px; border-radius: 16px; box-shadow: none; border: 1px solid var(--line); }
body[data-view="customer"] .seg button { padding: 12px 6px; font-size: .92rem; border-radius: 12px; }

/* steps + welcome: lighter, with air around them */
body[data-view="customer"] .steps { margin: 4px 0 6px; }
body[data-view="customer"] .steps button { font-size: .74rem; gap: 6px; }
body[data-view="customer"] .welcome { margin: 22px 0 4px; font-size: .98rem; font-weight: 500; line-height: 1.5; }
body[data-view="customer"] main.cust h2 { font-size: 1.25rem; margin: 26px 0 14px; }

/* the lists (services, barbers, times): fewer borders, more room inside each row */
body[data-view="customer"] .list { gap: 12px; }
body[data-view="customer"] .row-card { padding: 18px 18px; gap: 16px; box-shadow: none; border: 1px solid var(--line); }
body[data-view="customer"] .row-card.sel { border: 2px solid var(--shop); padding: 17px; }
body[data-view="customer"] .rc-main { gap: 4px; }
body[data-view="customer"] .rc-main b { font-size: 1.04rem; line-height: 1.3; }
body[data-view="customer"] .rc-main small, body[data-view="customer"] .rc-side small { font-size: .84rem; line-height: 1.45; }
body[data-view="customer"] .rc-side { gap: 6px; }
body[data-view="customer"] .rc-side .price { font-size: 1.05rem; }
body[data-view="customer"] .svc-ic { width: 48px; height: 48px; border-radius: 14px; }
body[data-view="customer"] .tag.hot { font-size: .68rem; padding: 2px 8px; vertical-align: 2px; }

/* phones: logo above the name gives the name the whole width */
@media (max-width: 420px) {
  body[data-view="customer"] .shop-hero { padding: 28px 18px 26px; }
  body[data-view="customer"] .hero-in { gap: 14px; }
  body[data-view="customer"] main.cust { padding: 22px 16px 44px; }
  body[data-view="customer"] .shop-hero + .seg { width: calc(100% - 32px); }
  body[data-view="customer"] .seg button { font-size: .84rem; gap: 5px; padding: 11px 4px; }
  body[data-view="customer"] .row-card { padding: 16px; gap: 14px; }
  body[data-view="customer"] .row-card.sel { padding: 15px; }
}

/* ⭐ Members makes 4 tabs on the customer page (5 in the barber portal): on a phone the icon sits above the word so all fit */
@media (max-width: 520px) {
  body[data-view="customer"] .seg:has(> button:nth-child(4)) button,
  body[data-view^="barber"] .seg:has(> button:nth-child(5)) button { flex-direction: column; gap: 3px; font-size: .74rem; padding: 8px 2px; min-width: 0; }
  body[data-view^="barber"] .seg:has(> button:nth-child(5)) button span { white-space: normal; line-height: 1.1; text-align: center; overflow-wrap: anywhere; }
}

/* 🤖 helper robot (js/bot.js), like Food Portals: a button in the logo's colours (navy, barber-pole ring, brown), the chat in the shop's colours; robot messages = .bai */
.bot { --botLift: 0px; --bot-navy: #14244f; --bot-red: #c8102e; position: fixed; inset-inline-end: 16px; bottom: calc(16px + var(--botLift) + env(safe-area-inset-bottom, 0px)); z-index: 80;
  display: flex; flex-direction: column; align-items: flex-end; gap: 10px; pointer-events: none; font-size: 15px; transition: bottom .2s; }
.bot[hidden] { display: none; }
.bot > * { pointer-events: auto; }
.botbtn { position: relative; width: 58px; height: 58px; border-radius: 50%; border: 0; cursor: pointer; padding: 9px; color: #fff;
  border: 4px solid transparent; background: radial-gradient(circle at 30% 25%, #2c4174, var(--bot-navy) 62%, #0b1530) padding-box,
  repeating-linear-gradient(-45deg, #c8102e 0 5px, #fff 5px 9px, #1d3a8a 9px 14px, #fff 14px 18px) border-box;   /* the logo's barber-pole arch */
  box-shadow: 0 10px 26px rgba(0,0,0,.3); animation: botfloat 3.2s ease-in-out infinite; transition: transform .2s; }
.botbtn:hover { transform: scale(1.07); }
.botbtn:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.botbtn svg, .botava svg { width: 100%; height: 100%; display: block; }
.bot svg .bhead { fill: #fff; } .bot svg .bear { fill: #8b5a2b; } .bot svg .bant { fill: var(--bot-red); }
.bot svg .bface { fill: #14244f; }
.bot svg .beyes circle { fill: var(--bot-red); transform-box: fill-box; transform-origin: center; animation: botblink 4.5s infinite; }
.bot svg .bsmile { fill: none; stroke: #14244f; stroke-width: 2.6; stroke-linecap: round; }
.botping { position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--bot-red); opacity: 0; animation: botping 2.6s ease-out 1.2s 3; pointer-events: none; }
.bot.open .botbtn { animation: none; }
@keyframes botfloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes botblink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }
@keyframes botping { 0% { transform: scale(1); opacity: .7; } 100% { transform: scale(1.6); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .botbtn, .botping, .bot svg .beyes circle { animation: none; } }
.bottip { background: var(--paper); color: var(--ink); border: 1.5px solid var(--bot-red); font-weight: 700; font-size: .9rem; padding: .55rem .9rem;
  border-radius: 14px 14px 4px 14px; box-shadow: 0 8px 20px rgba(0,0,0,.25); cursor: pointer; order: -1; animation: botin .3s ease-out; }
.bottip[hidden] { display: none; }
[dir=rtl] .bottip { border-radius: 14px 14px 14px 4px; }
.botpanel { order: -2; width: min(380px, calc(100vw - 24px)); height: min(560px, calc(100dvh - 110px - var(--botLift))); display: flex; flex-direction: column;
  background: var(--paper); color: var(--ink); border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 20px 50px rgba(0,0,0,.3); overflow: hidden; animation: botin .22s ease-out; }
.botpanel[hidden] { display: none; }
@keyframes botin { from { opacity: 0; transform: translateY(10px) scale(.97); } to { opacity: 1; transform: none; } }
.bothead { display: flex; align-items: center; gap: 10px; padding: 12px 12px 12px 14px; background: var(--shop); color: var(--on-shop, #fff); }
.botava { width: 40px; height: 40px; flex: none; border-radius: 50%; background: var(--bot-navy); border: 2px solid #fff; padding: 4px; color: #fff; }
.bothead div { flex: 1; min-width: 0; }
.bothead b { display: block; font-weight: 800; font-size: 1rem; }
.bothead small { display: block; font-size: .78rem; opacity: .85; }
.botx { flex: none; width: 34px; height: 34px; border-radius: 50%; border: 0; background: color-mix(in srgb, var(--on-shop, #fff) 14%, transparent); color: var(--on-shop, #fff); font: inherit; font-size: 1rem; cursor: pointer; }
.botx:hover { background: color-mix(in srgb, var(--on-shop, #fff) 24%, transparent); }
.botlog { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; overscroll-behavior: contain; background: var(--cream); }
.bmsg { max-width: 86%; padding: .6rem .85rem; border-radius: 16px; font-size: .93rem; line-height: 1.45; overflow-wrap: anywhere; }
.bmsg p { margin: 0 0 .35rem; } .bmsg p:last-child { margin: 0; }
.bmsg ol, .bmsg ul { margin: .2rem 0; padding-inline-start: 1.2rem; } .bmsg li { margin: .15rem 0; }
.bmsg code { font-size: .85em; }
.bmsg.bai { align-self: flex-start; background: var(--paper); color: var(--ink); border: 1px solid var(--line); border-end-start-radius: 4px; }
.bmsg.me { align-self: flex-end; background: var(--shop); color: var(--on-shop, #fff); border-end-end-radius: 4px; white-space: pre-wrap; }
.bmsg.berr { border-color: color-mix(in srgb, var(--red) 40%, var(--line)); color: var(--muted); }
.btyping { display: flex; gap: 4px; padding: .8rem .9rem; }
.btyping span { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: bdot 1s infinite; }
.btyping span:nth-child(2) { animation-delay: .15s; } .btyping span:nth-child(3) { animation-delay: .3s; }
@keyframes bdot { 0%, 60%, 100% { opacity: .3; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-4px); } }
.botchips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 12px 8px; background: var(--cream); }
.botchips:empty { display: none; }
.botchip { border: 1.5px solid var(--shop); background: var(--paper); color: var(--ink); border-radius: 999px; padding: .35rem .75rem; font: inherit; font-weight: 600; font-size: .82rem; cursor: pointer; }
.botchip:hover { background: var(--shop); color: var(--on-shop, #fff); }
.botform { display: flex; gap: 8px; align-items: flex-end; padding: 10px 12px; border-top: 1px solid var(--line); background: var(--paper); margin: 0; }
.botform textarea { flex: 1; resize: none; border: 1.5px solid var(--line); border-radius: 14px; padding: .6rem .8rem; font: inherit; font-size: 16px; background: var(--cream); color: var(--ink);
  max-height: 110px; min-height: 42px; overflow-y: hidden; scrollbar-width: thin; }
.botform textarea:focus { outline: none; border-color: var(--shop); }
.botsend { flex: none; width: 42px; height: 42px; border-radius: 50%; border: 0; background: var(--shop); color: var(--on-shop, #fff); cursor: pointer; padding: 10px; }
.botsend:disabled { opacity: .5; cursor: default; }
[dir=rtl] .botsend svg { transform: scaleX(-1); }
.botnote { display: block; padding: 0 12px 10px; background: var(--paper); color: var(--muted); font-size: .7rem; line-height: 1.35; }
@media (max-width: 520px) {
  .bot { inset-inline-end: 12px; }
  .botbtn { width: 52px; height: 52px; padding: 8px; }
  .bot.open { left: 0; right: 0; bottom: 0; align-items: stretch; gap: 0; }
  .bot.open .botbtn, .bot.open .bottip { display: none; }
  .bot.open .botpanel { width: 100%; height: min(88dvh, 640px); border-radius: 20px 20px 0 0; border-bottom: 0; padding-bottom: env(safe-area-inset-bottom, 0px); }
}
@media print { .bot { display: none !important; } }

/* customer: the account pop-up (name button, top right), ✨ chair mood button, History button (2026-10-29) */
.acct-btn { gap: 6px; }
.cb-ava { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; display: block; }
.acct-modal .profile.acct { margin: 6px 0 14px; }
.acct-modal .email-box { margin: 0 0 14px; }
.acct-actions { justify-content: space-between; }
.acct-actions .danger { color: var(--red); }
.mood-open { width: 100%; justify-content: flex-start; gap: 8px; margin: 4px 0 14px; }
.mood-open .mood-icons { margin-inline-start: auto; letter-spacing: 2px; }
.hist-btn { display: flex; align-items: center; gap: 10px; width: 100%; margin: 22px 0 10px; padding: 14px 16px; border-radius: var(--radius); cursor: pointer;
  border: 1px solid var(--line); background: var(--paper); color: var(--ink); font: inherit; font-size: 1.05rem; text-align: start; }
.hist-btn b { flex: 1; }
.hist-btn i { font-style: normal; color: var(--muted); }
.hist-btn.on { border-color: var(--shop); }

/* 🔁 Change time pop-up (barber + admin) and the customer's "New time" line (2026-11-02) */
#modal { grid-template-columns: minmax(0, 1fr); }   /* a long row inside a pop-up scrolls instead of widening it */
.modal-card.move-modal { min-width: 0; justify-self: center; max-height: calc(100dvh - 32px); overflow-y: auto; }   /* the day row scrolls inside, never makes the pop-up wider than the phone */
.move-modal .mv-days { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; max-width: 100%; min-width: 0; }
.move-modal .mv-slots { grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); }
.move-modal .mv-days .day { flex: none; min-width: 56px; }
.move-modal .mv-days .day:disabled { opacity: .35; cursor: default; }
.move-modal .mv-slots { max-height: 220px; overflow-y: auto; margin-bottom: 14px; }
.move-modal .mv-barber { display: block; margin: 8px 0; }
.move-modal h3 { margin: 14px 0 8px; font-size: .95rem; }
.moved-line { display: block; color: var(--shop); }
