/* ==========================================================================
   Barber booking — design system (booking page + admin panel). RTL first.
   ========================================================================== */

:root {
  --bg: #0b0b0d;
  --bg-2: #0f0f12;
  --card: #141418;
  --card-2: #1a1a1f;
  --card-3: #222228;
  --line: rgba(255, 255, 255, .07);
  --line-2: rgba(255, 255, 255, .12);
  --text: #f3f0ea;
  --text-2: #aaa59c;
  --text-3: #77736b;
  --ok: #34d399;
  --ok-soft: rgba(52, 211, 153, .13);
  --bad: #f87171;
  --bad-soft: rgba(248, 113, 113, .13);
  --bad-line: rgba(248, 113, 113, .32);
  --warn: #fbbf24;
  --warn-soft: rgba(251, 191, 36, .13);
  --info: #60a5fa;
  --info-soft: rgba(96, 165, 250, .13);
  --tg: #2aabee;
  --wa: #25d366;
  --accent: rgb(212 162 76);
  --accent-rgb: 212 162 76;
  --accent-ink: #16110a;
  --accent-soft: rgb(var(--accent-rgb) / .12);
  --accent-line: rgb(var(--accent-rgb) / .34);
  --accent-text: var(--accent);
  --glass: rgb(18 18 22 / .82);
  --r-xl: 26px;
  --r-lg: 22px;
  --r: 16px;
  --r-sm: 12px;
  --shadow: 0 1px 0 rgba(255, 255, 255, .035) inset, 0 24px 48px -28px rgba(0, 0, 0, .75);
  --shadow-pop: 0 24px 60px -20px rgba(0, 0, 0, .8);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --font: "IBM Plex Sans Arabic", system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;
  color-scheme: dark;
}

/* Light, formal theme (default): white surfaces, navy text, one accent colour. */
[data-theme="light"] {
  --bg: #f4f6f9;
  --bg-2: #eef1f6;
  --card: #ffffff;
  --card-2: #f7f9fc;
  --card-3: #edf1f7;
  --line: rgba(15, 30, 55, .08);
  --line-2: rgba(15, 30, 55, .15);
  --text: #0f1c2e;
  --text-2: #4a586c;
  --text-3: #8592a5;
  --ok: #047857;
  --ok-soft: rgba(4, 120, 87, .09);
  --bad: #c0262d;
  --bad-soft: rgba(192, 38, 45, .07);
  --bad-line: rgba(192, 38, 45, .24);
  --warn: #a35a06;
  --warn-soft: rgba(217, 119, 6, .1);
  --info: #1d4ed8;
  --info-soft: rgba(29, 78, 216, .07);
  --glass: rgb(255 255 255 / .9);
  --shadow: 0 1px 2px rgba(15, 30, 55, .05), 0 12px 32px -20px rgba(15, 30, 55, .25);
  --shadow-pop: 0 28px 64px -24px rgba(15, 30, 55, .38);
  color-scheme: light;
}
[data-theme="light"] .bg-glow {
  background:
    radial-gradient(60% 46% at 50% 0%, rgb(var(--accent-rgb) / .1), transparent 72%),
    linear-gradient(180deg, rgb(var(--accent-rgb) / .045), transparent 45%);
}
[data-theme="light"] .logo { background: #fff; border-color: rgb(var(--accent-rgb) / .22); box-shadow: 0 0 0 7px rgb(var(--accent-rgb) / .05), 0 18px 40px -20px rgb(var(--accent-rgb) / .55); }
[data-theme="light"] .sheet { background: rgba(15, 28, 46, .34); }
[data-theme="light"] .toast { background: #0f1c2e; color: #fff; border-color: transparent; }
[data-theme="light"] .btn-ghost { background: var(--card); }
[data-theme="light"] .day, [data-theme="light"] .slot, [data-theme="light"] .chip, [data-theme="light"] .wk, [data-theme="light"] .wd-tab { background: var(--card); }
[data-theme="light"] .tile, [data-theme="light"] .card { border-color: rgba(15, 30, 55, .07); }
[data-theme="light"] .adm-nav .nav-brand .t-logo, [data-theme="light"] .adm-top .t-logo { background: #fff; }
@media (min-width: 960px) { [data-theme="light"] .adm-nav { background: #fff; } }

/* ---------------------------------------------------------------- base */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
body {
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent-text); }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
::selection { background: rgb(var(--accent-rgb) / .35); }
.muted { color: var(--text-2); }
.faint { color: var(--text-3); }
.small { font-size: 13px; }
.center { text-align: center; }
.ltr { direction: ltr; unicode-bidi: isolate; }
.nowrap { white-space: nowrap; }
.ico { width: 20px; height: 20px; flex: 0 0 auto; }
.ico-sm { width: 16px; height: 16px; flex: 0 0 auto; }
.ico-lg { width: 26px; height: 26px; flex: 0 0 auto; }

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 50px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 14px;
  font-weight: 700;
  font-size: 15px;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  user-select: none;
  -webkit-user-select: none;
  transition: transform .14s var(--ease), filter .2s, background-color .2s, border-color .2s, opacity .2s, box-shadow .2s;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 14px 30px -14px rgb(var(--accent-rgb) / .85); }
.btn-primary:hover:not(:disabled) { filter: brightness(1.07); }
.btn-ghost { background: var(--card-2); color: var(--text); border-color: var(--line-2); }
.btn-ghost:hover:not(:disabled) { background: var(--card-3); }
.btn-soft { background: var(--accent-soft); color: var(--accent-text); border-color: var(--accent-line); }
.btn-danger { background: var(--bad-soft); color: var(--bad); border-color: rgb(248 113 113 / .3); }
.btn-tg { background: var(--tg); color: #fff; box-shadow: 0 14px 30px -16px rgba(42, 171, 238, .9); }
.btn-wa { background: var(--wa); color: #062b12; }
.btn-block { width: 100%; }
.btn-sm { height: 38px; padding: 0 14px; border-radius: 11px; font-size: 13.5px; gap: 6px; }
.btn-xs { height: 32px; padding: 0 11px; border-radius: 10px; font-size: 12.5px; gap: 5px; }
.btn .ico { width: 18px; height: 18px; }
.btn-sm .ico, .btn-xs .ico { width: 16px; height: 16px; }
.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--card-2);
  color: var(--text-2);
  text-decoration: none;
  transition: background-color .2s, color .2s, transform .14s;
}
.icon-btn:hover { color: var(--text); background: var(--card-3); }
.icon-btn:active { transform: scale(.94); }
.icon-btn .ico { width: 19px; height: 19px; }
.link-btn { background: none; border: 0; padding: 6px 4px; color: var(--accent-text); font-weight: 600; font-size: 14px; }
.spin { width: 18px; height: 18px; border: 2.5px solid currentColor; border-inline-end-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------------------------------------------------------- cards & surfaces */
.card {
  position: relative;
  margin-top: 14px;
  padding: 20px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
}
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-h h2, .card-h h3 { font-size: 17px; font-weight: 700; line-height: 1.35; }
.card-h .sub { font-size: 13px; color: var(--text-3); }
.divider { height: 1px; background: var(--line); margin: 16px 0; border: 0; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  background: var(--card-3);
  color: var(--text-2);
}
.badge .ico-sm { width: 13px; height: 13px; }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.bad { background: var(--bad-soft); color: var(--bad); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.info { background: var(--info-soft); color: var(--info); }
.badge.gold { background: var(--accent-soft); color: var(--accent-text); }
.badge.tg { background: rgba(42, 171, 238, .14); color: var(--tg); }

.banner {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: var(--r);
  border: 1px solid var(--line);
  background: var(--card);
  animation: rise .45s var(--ease) both;
}
.banner .b-ico { font-size: 24px; line-height: 1; flex: 0 0 auto; }
.banner .b-body { flex: 1; min-width: 0; }
.banner b { display: block; font-size: 15px; }
.banner p { color: var(--text-2); font-size: 13.5px; margin-top: 1px; }
.banner.ok { background: var(--ok-soft); border-color: rgb(52 211 153 / .28); }
.banner.warn { background: var(--warn-soft); border-color: rgb(251 191 36 / .28); }
.banner.bad { background: var(--bad-soft); border-color: rgb(248 113 113 / .28); }
.banner.info { background: var(--info-soft); border-color: rgb(96 165 250 / .28); }

.empty {
  padding: 26px 16px;
  text-align: center;
  color: var(--text-2);
  background: var(--card-2);
  border: 1px dashed var(--line-2);
  border-radius: var(--r);
}
.empty .em-ico { display: block; font-size: 30px; line-height: 1; margin-bottom: 10px; }
.empty b { display: block; color: var(--text); font-size: 15px; margin-bottom: 2px; }
.empty .btn { margin-top: 14px; }

/* ---------------------------------------------------------------- forms */
.form { display: grid; gap: 14px; }
.field label, .label { display: block; margin-bottom: 7px; font-size: 13px; font-weight: 600; color: var(--text-2); }
.input, .field input:not([type="checkbox"]):not([type="radio"]):not([type="color"]), .field select, .field textarea {
  width: 100%;
  height: 52px;
  padding: 0 15px;
  font-size: 16px;
  color: var(--text);
  background: var(--card-2);
  border: 1px solid var(--line-2);
  border-radius: 14px;
  outline: none;
  transition: border-color .2s, box-shadow .2s, background-color .2s;
  -webkit-appearance: none;
  appearance: none;
}
.field select {
  padding-inline-end: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: 18px;
  background-position: left 14px center;
}
.field textarea { height: auto; min-height: 120px; padding: 13px 15px; resize: vertical; line-height: 1.6; }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgb(var(--accent-rgb) / .16);
  background: var(--card);
}
.field input::placeholder, .field textarea::placeholder { color: var(--text-3); }
.field input[dir="ltr"] { text-align: right; }
.field input[dir="ltr"]::placeholder { text-align: right; }
.field.is-bad input, .field.is-bad select { border-color: var(--bad); box-shadow: 0 0 0 4px var(--bad-soft); }
.field .err { margin-top: 6px; font-size: 12.5px; color: var(--bad); }
.field .hint { margin-top: 6px; font-size: 12.5px; color: var(--text-3); }
.row-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.row-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.field, .field input, .field select, .field textarea { min-width: 0; }
.field input[type="time"], .field input[type="date"] { text-align: right; padding-inline: 12px; }
.field input::-webkit-date-and-time-value { text-align: right; }
.note { font-size: 12.5px; color: var(--text-3); display: flex; gap: 6px; align-items: center; }
.hp { position: absolute !important; inset-inline-start: -9999px !important; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

.seg {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: var(--card-2);
  border: 1px solid var(--line);
  border-radius: 14px;
}
.seg button {
  flex: 1;
  height: 40px;
  padding: 0 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--text-2);
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  transition: background-color .2s, color .2s;
}
.seg button[aria-pressed="true"] { background: var(--card-3); color: var(--text); box-shadow: 0 1px 0 var(--line-2) inset, 0 4px 12px -6px rgba(0, 0, 0, .5); }

.switch { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 0; cursor: pointer; }
.switch + .switch { border-top: 1px solid var(--line); }
.switch .s-text b { display: block; font-size: 14.5px; font-weight: 600; }
.switch .s-text span { display: block; font-size: 12.5px; color: var(--text-3); }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch .knob { position: relative; width: 48px; height: 28px; flex: 0 0 auto; border-radius: 999px; background: var(--card-3); border: 1px solid var(--line-2); transition: background-color .2s; }
.switch .knob::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .35); transition: transform .25s var(--ease); }
.switch input:checked + .knob { background: var(--accent); border-color: transparent; }
.switch input:checked + .knob::after { transform: translateX(-20px); }
[dir="ltr"] .switch input:checked + .knob::after { transform: translateX(20px); }
.switch input:focus-visible + .knob { outline: 2px solid var(--accent); outline-offset: 2px; }

.check-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.check-chip { position: relative; }
.check-chip input { position: absolute; opacity: 0; pointer-events: none; }
.check-chip span {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid var(--line-2);
  background: var(--card-2);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-2);
  cursor: pointer;
  transition: all .2s;
}
.check-chip input:checked + span { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent-text); }
.check-chip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------------------------------------------------------------- toast / sheet */
.toast {
  position: fixed;
  top: max(14px, env(safe-area-inset-top));
  left: 50%;
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 10px;
  width: max-content;
  max-width: calc(100% - 32px);
  padding: 12px 16px;
  border-radius: 14px;
  background: var(--card-3);
  border: 1px solid var(--line-2);
  color: var(--text);
  font-weight: 600;
  font-size: 14.5px;
  box-shadow: var(--shadow-pop);
  transform: translate(-50%, calc(-100% - 30px));
  transition: transform .4s var(--ease);
  pointer-events: none;
}
.toast.show { transform: translate(-50%, 0); }
.toast.ok::before, .toast.bad::before { content: ""; width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; background: var(--ok); box-shadow: 0 0 0 4px var(--ok-soft); }
.toast.bad::before { background: var(--bad); box-shadow: 0 0 0 4px var(--bad-soft); }

.sheet {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  align-items: end;
  justify-items: center;
  background: rgba(0, 0, 0, .58);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
  animation: fade .25s ease both;
}
.sheet.closing { animation: fade-out .2s ease both; }
.sheet-card {
  width: 100%;
  max-width: 560px;
  max-height: 92vh;
  max-height: 92dvh;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 10px 20px calc(20px + env(safe-area-inset-bottom));
  background: var(--card);
  border: 1px solid var(--line-2);
  border-bottom: 0;
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  box-shadow: var(--shadow-pop);
  animation: sheet-up .42s var(--ease) both;
}
.sheet.closing .sheet-card { animation: sheet-down .22s ease both; }
.sheet-grab { width: 40px; height: 5px; margin: 0 auto 14px; border-radius: 99px; background: var(--line-2); }
.sheet-title { font-size: 19px; font-weight: 700; margin-bottom: 4px; }
.sheet-sub { color: var(--text-2); font-size: 14px; margin-bottom: 16px; }
.sheet-actions { display: grid; gap: 10px; margin-top: 18px; }
.sheet-actions.two { grid-template-columns: 1fr 1fr; }
@media (min-width: 640px) {
  .sheet { align-items: center; padding: 24px; }
  .sheet-card { border-radius: var(--r-xl); border-bottom: 1px solid var(--line-2); padding-top: 22px; }
  .sheet-grab { display: none; }
}
@keyframes fade { from { opacity: 0; } }
@keyframes fade-out { to { opacity: 0; } }
@keyframes sheet-up { from { transform: translateY(46px); opacity: 0; } }
@keyframes sheet-down { to { transform: translateY(40px); opacity: 0; } }
@keyframes rise { from { transform: translateY(10px); opacity: 0; } }
@keyframes pop { 0% { transform: scale(.6); opacity: 0; } 60% { transform: scale(1.08); } 100% { transform: none; opacity: 1; } }

.check-anim { width: 76px; height: 76px; margin: 8px auto 14px; display: grid; place-items: center; border-radius: 50%; background: var(--ok-soft); color: var(--ok); box-shadow: 0 0 0 10px rgb(52 211 153 / .06); animation: pop .5s var(--ease) both; }
.check-anim svg { width: 40px; height: 40px; }
.check-anim path { stroke-dasharray: 30; stroke-dashoffset: 30; animation: draw .45s .25s ease forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* ==========================================================================
   Booking page
   ========================================================================== */
.bg-glow {
  position: fixed;
  inset: 0 0 auto;
  height: 75vh;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(55% 45% at 50% 0%, rgb(var(--accent-rgb) / .17), transparent 70%),
    radial-gradient(40% 30% at 85% 10%, rgb(var(--accent-rgb) / .06), transparent 70%);
}
.wrap { position: relative; z-index: 1; max-width: 560px; margin: 0 auto; padding: 8px 16px 150px; }

.hero { padding: 34px 6px 8px; text-align: center; animation: rise .5s var(--ease) both; }
.logo {
  position: relative;
  width: 88px;
  height: 88px;
  margin: 0 auto 16px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--accent);
  background: radial-gradient(circle at 30% 25%, var(--card-3), var(--card) 70%);
  border: 1px solid var(--accent-line);
  box-shadow: 0 0 0 7px rgb(var(--accent-rgb) / .06), 0 22px 44px -18px rgb(var(--accent-rgb) / .55);
  overflow: hidden;
}
.logo svg { width: 40px; height: 40px; }
.logo img { width: 100%; height: 100%; object-fit: cover; }
.hero h1 { font-size: 27px; font-weight: 700; line-height: 1.3; letter-spacing: -.01em; }
.hero p { margin-top: 4px; color: var(--text-2); font-size: 15px; }
.hero-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 16px; }
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 13px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--line);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
  text-decoration: none;
  white-space: nowrap;
}
a.pill:hover { border-color: var(--line-2); color: var(--text); }
.pill .ico-sm { color: var(--accent); }
.dot { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; background: var(--ok); box-shadow: 0 0 0 4px var(--ok-soft); }
.dot.off { background: var(--bad); box-shadow: 0 0 0 4px var(--bad-soft); }
.dot.idle { background: var(--text-3); box-shadow: 0 0 0 4px var(--line); }

.stripe { height: 4px; margin: 22px auto 0; width: 64px; border-radius: 4px; opacity: .55; background: repeating-linear-gradient(-45deg, var(--accent) 0 6px, transparent 6px 12px); }

.tg-card { display: flex; align-items: center; gap: 14px; padding: 16px; background: linear-gradient(135deg, rgba(42, 171, 238, .14), rgba(42, 171, 238, .03) 70%), var(--card); border-color: rgba(42, 171, 238, .24); animation: rise .5s .05s var(--ease) both; }
.tg-ico { width: 46px; height: 46px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 14px; background: var(--tg); color: #fff; box-shadow: 0 10px 22px -10px rgba(42, 171, 238, .9); }
.tg-ico svg { width: 24px; height: 24px; }
.tg-card .tg-text { flex: 1; min-width: 0; }
.tg-card b { display: block; font-size: 14.5px; line-height: 1.45; }
.tg-card p { color: var(--text-2); font-size: 12.5px; line-height: 1.5; margin-top: 2px; }

.book { animation: rise .5s .1s var(--ease) both; }
.step { padding-top: 4px; }
.step + .step { margin-top: 20px; padding-top: 20px; border-top: 1px dashed var(--line-2); }
.step-h { display: flex; align-items: center; gap: 10px; margin-bottom: 13px; font-size: 15px; font-weight: 700; }
.step-n { width: 26px; height: 26px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 9px; font-size: 13px; background: var(--accent-soft); color: var(--accent-text); border: 1px solid var(--accent-line); }
.step.done .step-n { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.step-hint { margin-inline-start: auto; font-size: 12.5px; font-weight: 500; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 55%; }

.days {
  display: flex;
  gap: 8px;
  margin: 0 -20px;
  padding: 4px 20px 12px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scroll-padding-inline: 20px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.days::-webkit-scrollbar { display: none; }
.day {
  position: relative;
  flex: 0 0 auto;
  width: 70px;
  padding: 10px 4px 9px;
  text-align: center;
  color: var(--text);
  background: var(--card-2);
  border: 1px solid var(--line);
  border-radius: 17px;
  scroll-snap-align: start;
  transition: transform .14s var(--ease), background-color .2s, border-color .2s, box-shadow .25s;
}
.day:hover { border-color: var(--line-2); }
.day:active { transform: scale(.95); }
.day-w { display: block; font-size: 12px; font-weight: 500; color: var(--text-2); white-space: nowrap; }
.day-n { display: block; margin: 1px 0; font-size: 23px; font-weight: 700; line-height: 1.2; font-variant-numeric: tabular-nums; }
.day-m { display: block; font-size: 11px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.day.is-off .day-n, .day.is-full .day-n { color: var(--text-3); }
.day.is-off .day-m { color: var(--bad); font-weight: 600; }
.day.is-full .day-m { color: var(--text-3); }
.day.is-today::after { content: ""; position: absolute; top: 7px; inset-inline-end: 7px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.day[aria-selected="true"] { background: var(--accent); border-color: transparent; color: var(--accent-ink); box-shadow: 0 12px 26px -12px rgb(var(--accent-rgb) / .8); }
.day[aria-selected="true"] .day-w, .day[aria-selected="true"] .day-m, .day[aria-selected="true"] .day-n { color: inherit; }
.day[aria-selected="true"] .day-w, .day[aria-selected="true"] .day-m { opacity: .78; }
.day[aria-selected="true"]::after { background: var(--accent-ink); }

.slot-group + .slot-group { margin-top: 16px; }
.slot-gh { display: flex; align-items: center; gap: 8px; margin-bottom: 9px; font-size: 13px; font-weight: 600; color: var(--text-2); }
.slot-gh .ico-sm { color: var(--accent); }
.slot-gh .cnt { margin-inline-start: auto; font-size: 12px; font-weight: 500; color: var(--text-3); }
.slots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
@media (max-width: 359px) { .slots { grid-template-columns: repeat(3, 1fr); } }
.slot {
  height: 48px;
  border-radius: 13px;
  border: 1px solid var(--line);
  background: var(--card-2);
  color: var(--text);
  font-weight: 700;
  font-size: 15.5px;
  font-variant-numeric: tabular-nums;
  direction: ltr;
  transition: transform .12s var(--ease), background-color .2s, border-color .2s, color .2s, box-shadow .25s;
  animation: rise .35s var(--ease) both;
}
.slot:hover:not(:disabled) { border-color: var(--accent-line); }
.slot:active:not(:disabled) { transform: scale(.94); }
.slot[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: transparent; box-shadow: 0 10px 22px -12px rgb(var(--accent-rgb) / .9); }
.slot:disabled { cursor: not-allowed; background: transparent; border-style: dashed; color: var(--text-3); text-decoration: line-through; text-decoration-color: var(--text-3); opacity: .7; }
/* Booked: red, labelled «محجوز», never selectable */
.slot.is-taken { display: grid; place-content: center; gap: 1px; line-height: 1.1; background: var(--bad-soft); border: 1px solid var(--bad-line); color: var(--bad); text-decoration: none; opacity: 1; }
.slot.is-taken span { font-size: 14px; text-decoration: line-through; text-decoration-color: var(--bad-line); }
.slot.is-taken small { font-size: 10.5px; font-weight: 700; letter-spacing: 0; }
/* Holidays / fully booked days: different colour and disabled */
.day:disabled { cursor: not-allowed; }
.day:disabled:active { transform: none; }
.day.is-off { background: var(--bad-soft); border-color: var(--bad-line); }
.day.is-off .day-w, .day.is-off .day-n { color: var(--bad); opacity: .7; }
.day.is-off .day-m { color: var(--bad); font-weight: 700; }
.day.is-full { background: var(--card-2); border-style: dashed; border-color: var(--line-2); }
.day.is-full .day-w, .day.is-full .day-n { color: var(--text-3); }
.day.is-full .day-m { color: var(--text-3); font-weight: 600; }

.profile { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 15px; background: var(--card-2); border: 1px solid var(--line); }
.avatar { width: 42px; height: 42px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 13px; background: var(--accent-soft); color: var(--accent-text); font-weight: 700; font-size: 17px; }
.profile .p-body { min-width: 0; flex: 1; }
.profile .p-name { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.profile .p-phone { font-size: 13px; color: var(--text-2); }

.cta {
  position: fixed;
  inset: auto 0 0;
  z-index: 40;
  padding: 0 12px calc(12px + env(safe-area-inset-bottom));
  pointer-events: none;
  transform: translateY(calc(100% + 20px));
  transition: transform .45s var(--ease);
}
.cta.show { transform: none; }
.cta-in {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 560px;
  margin: 0 auto;
  padding: 10px;
  border-radius: 22px;
  background: var(--glass);
  -webkit-backdrop-filter: blur(18px) saturate(1.5);
  backdrop-filter: blur(18px) saturate(1.5);
  border: 1px solid var(--line-2);
  box-shadow: var(--shadow-pop);
}
.cta-sum { flex: 1; min-width: 0; padding-inline-start: 8px; line-height: 1.35; }
.cta-sum b { display: block; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cta-sum span { font-size: 13px; color: var(--accent-text); font-weight: 600; }
.cta .btn { flex: 0 0 auto; height: 50px; padding: 0 18px; }

.ticket { display: grid; grid-template-columns: 1fr 1fr; margin: 18px 0 4px; border-radius: 17px; overflow: hidden; background: var(--card-2); border: 1px solid var(--line); }
.ticket > div { padding: 13px 15px; min-width: 0; }
.ticket > div + div { border-inline-start: 1px dashed var(--line-2); }
.ticket span { display: block; font-size: 12px; color: var(--text-3); }
.ticket b { display: block; font-size: 15px; line-height: 1.45; }
.tg-hint { display: flex; gap: 12px; align-items: center; margin-top: 16px; padding: 13px 14px; border-radius: 15px; background: rgba(42, 171, 238, .1); border: 1px solid rgba(42, 171, 238, .22); }
.tg-hint .ico { color: var(--tg); }
.tg-hint b { display: block; font-size: 14px; }
.tg-hint p { font-size: 12.5px; color: var(--text-2); }

.bk-item { display: flex; align-items: center; gap: 12px; padding: 12px 0; }
.bk-item + .bk-item { border-top: 1px solid var(--line); }
.bk-date { width: 54px; height: 58px; flex: 0 0 auto; display: grid; place-content: center; text-align: center; line-height: 1.15; border-radius: 15px; background: var(--card-2); border: 1px solid var(--line); }
.bk-date b { font-size: 21px; }
.bk-date span { font-size: 11px; color: var(--text-3); }
.bk-item.is-active .bk-date { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent-text); }
.bk-main { flex: 1; min-width: 0; }
.bk-main b { display: block; font-size: 14.5px; }
.bk-main .bk-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 3px; font-size: 13px; color: var(--text-2); }
.bk-actions { display: flex; flex-direction: column; gap: 6px; align-items: stretch; }

.info-row { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; }
.info-row + .info-row { border-top: 1px solid var(--line); }
.info-ico { width: 38px; height: 38px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 12px; background: var(--card-2); border: 1px solid var(--line); color: var(--accent); }
.info-ico .ico { width: 18px; height: 18px; }
.info-row .i-body { flex: 1; min-width: 0; }
.info-row .i-label { font-size: 12.5px; color: var(--text-3); }
.info-row .i-val { font-weight: 600; }
.hours { display: grid; gap: 3px; margin-top: 2px; font-size: 14px; }
.hours div { display: flex; justify-content: space-between; gap: 12px; }
.hours span:last-child { color: var(--text-2); white-space: nowrap; }
.contact-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.foot { padding: 30px 0 6px; text-align: center; font-size: 12.5px; color: var(--text-3); }

/* ==========================================================================
   Admin panel
   ========================================================================== */
.adm { min-height: 100vh; min-height: 100dvh; }
.adm-nav {
  position: fixed;
  inset: auto 0 0;
  z-index: 50;
  display: flex;
  justify-content: space-around;
  gap: 2px;
  padding: 7px 6px calc(7px + env(safe-area-inset-bottom));
  background: var(--glass);
  -webkit-backdrop-filter: blur(18px) saturate(1.5);
  backdrop-filter: blur(18px) saturate(1.5);
  border-top: 1px solid var(--line);
}
.adm-nav .nav-brand, .adm-nav .nav-foot { display: none; }
.adm-nav a {
  position: relative;
  flex: 1;
  display: grid;
  justify-items: center;
  gap: 3px;
  padding: 6px 2px 4px;
  border-radius: 13px;
  color: var(--text-3);
  text-decoration: none;
  font-size: 11px;
  font-weight: 600;
  transition: color .2s, background-color .2s;
}
.adm-nav a .ico { width: 23px; height: 23px; }
.adm-nav a.on { color: var(--accent-text); }
.adm-nav a.on::before { content: ""; position: absolute; top: -8px; width: 24px; height: 3px; border-radius: 0 0 3px 3px; background: var(--accent); }
.adm-nav .d-only { display: none; }
.adm-nav .count { position: absolute; top: 2px; inset-inline-start: calc(50% + 6px); min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; display: grid; place-items: center; font-size: 10px; background: var(--accent); color: var(--accent-ink); }

.adm-top {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px;
  background: var(--glass);
  -webkit-backdrop-filter: blur(18px) saturate(1.5);
  backdrop-filter: blur(18px) saturate(1.5);
  border-bottom: 1px solid var(--line);
}
.adm-top .t-logo { width: 36px; height: 36px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 11px; overflow: hidden; color: var(--accent); background: var(--card-2); border: 1px solid var(--accent-line); }
.adm-top .t-logo img { width: 100%; height: 100%; object-fit: cover; }
.adm-top .t-logo .ico { width: 19px; height: 19px; }
.adm-top .t-title { flex: 1; min-width: 0; line-height: 1.3; }
.adm-top .t-title b { display: block; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adm-top .t-title span { display: block; font-size: 12px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adm-main { width: 100%; max-width: 1040px; margin: 0 auto; padding: 16px 16px 120px; animation: rise .35s var(--ease) both; }

.page-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 6px 0 4px; }
.page-h h1 { font-size: 23px; font-weight: 700; line-height: 1.3; }
.page-h .sub { color: var(--text-2); font-size: 14px; }

.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 16px; }
.tile { padding: 15px 16px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); }
.tile .t-label { display: flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.tile .t-label .ico-sm { color: var(--accent); }
.tile .t-val { margin-top: 6px; font-size: 28px; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.tile .t-val small { font-size: 13px; font-weight: 500; color: var(--text-3); }

.next-card { display: flex; align-items: center; gap: 14px; background: linear-gradient(135deg, rgb(var(--accent-rgb) / .16), rgb(var(--accent-rgb) / .03) 65%), var(--card); border-color: var(--accent-line); }
.next-time { width: 68px; height: 68px; flex: 0 0 auto; display: grid; place-content: center; text-align: center; border-radius: 18px; background: var(--accent); color: var(--accent-ink); line-height: 1.1; }
.next-time b { font-size: 20px; direction: ltr; }
.next-time span { font-size: 11.5px; font-weight: 600; opacity: .8; }
.next-body { flex: 1; min-width: 0; }
.next-body .n-label { font-size: 12.5px; color: var(--accent-text); font-weight: 700; }
.next-body .n-name { font-size: 17px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.next-body .n-sub { font-size: 13px; color: var(--text-2); }
.next-acts { display: flex; gap: 8px; }

.alert-card { display: flex; align-items: center; gap: 12px; margin-top: 12px; padding: 14px; border-radius: 17px; border: 1px solid var(--line); background: var(--card); }
.alert-card .a-ico { width: 42px; height: 42px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 13px; font-size: 20px; background: var(--card-2); }
.alert-card.warn .a-ico { background: var(--warn-soft); }
.alert-card.tg .a-ico { background: rgba(42, 171, 238, .15); color: var(--tg); }
.alert-card .a-body { flex: 1; min-width: 0; }
.alert-card b { display: block; font-size: 14.5px; }
.alert-card p { font-size: 12.5px; color: var(--text-2); }

.list { margin-top: 4px; }
.lrow { display: flex; align-items: center; gap: 12px; padding: 11px 0; min-height: 62px; }
.lrow + .lrow { border-top: 1px solid var(--line); }
.lrow.tap { cursor: pointer; border-radius: 12px; margin: 0 -8px; padding-inline: 8px; transition: background-color .15s; }
.lrow.tap + .lrow.tap { border-top-color: transparent; box-shadow: 0 -1px 0 var(--line); }
.lrow.tap:hover { background: var(--card-2); }
.l-time { width: 62px; flex: 0 0 auto; font-weight: 700; font-size: 15px; font-variant-numeric: tabular-nums; line-height: 1.2; }
.l-time small { display: block; font-size: 11px; font-weight: 600; color: var(--text-3); }
.l-main { flex: 1; min-width: 0; }
.l-main b { display: block; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.l-main .l-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 2px; font-size: 13px; color: var(--text-2); }
.l-free { color: var(--text-3); font-size: 14px; display: flex; align-items: center; gap: 8px; }
.l-free::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); opacity: .7; }
.lrow.is-past .l-time, .lrow.is-past .l-free { opacity: .45; }
.lrow.is-cancelled .l-main b { text-decoration: line-through; color: var(--text-3); }
.l-end { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.l-avatar { width: 40px; height: 40px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 12px; background: var(--card-2); border: 1px solid var(--line); font-weight: 700; color: var(--accent-text); }

.daybar { display: flex; align-items: center; gap: 8px; margin-top: 14px; }
.daybar .d-label { position: relative; flex: 1; min-width: 0; height: 46px; display: flex; align-items: center; justify-content: center; gap: 8px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); font-weight: 700; overflow: hidden; }
.daybar .d-label input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; }
.daybar .d-label .ico { color: var(--accent); }
.daybar .icon-btn { width: 46px; height: 46px; }

.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-top: 10px; }
.wk {
  position: relative;
  padding: 8px 2px 7px;
  text-align: center;
  border-radius: 13px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--text);
  line-height: 1.2;
  transition: background-color .2s, border-color .2s;
}
.wk .wk-d { display: block; font-size: 11px; color: var(--text-3); }
.wk .wk-n { display: block; font-size: 17px; font-weight: 700; margin: 2px 0; }
.wk .wk-c { display: block; font-size: 11px; font-weight: 700; color: var(--accent-text); min-height: 13px; }
.wk.off .wk-c { color: var(--bad); }
.wk[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }

.searchbar { position: relative; margin-top: 12px; }
.searchbar .ico { position: absolute; top: 50%; inset-inline-start: 14px; transform: translateY(-50%); color: var(--text-3); pointer-events: none; }
.searchbar input { width: 100%; height: 46px; padding: 0 44px 0 14px; padding-inline-start: 44px; padding-inline-end: 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); color: var(--text); font-size: 15px; outline: none; transition: border-color .2s, box-shadow .2s; }
.searchbar input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgb(var(--accent-rgb) / .14); }

.chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 8px; }
.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
  height: 42px;
  padding: 0 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border-radius: 12px;
  border: 1px solid var(--line-2);
  background: var(--card-2);
  color: var(--text);
  font-weight: 700;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  transition: background-color .2s, border-color .2s, color .2s, transform .12s;
}
.chip:active { transform: scale(.95); }
.chip .x { width: 18px; height: 18px; display: grid; place-items: center; border-radius: 6px; color: var(--text-3); }
.chip:hover .x { color: var(--bad); background: var(--bad-soft); }
.chip.is-free { background: var(--ok-soft); border-color: rgb(52 211 153 / .3); color: var(--ok); }
.chip.is-off { background: transparent; border-style: dashed; color: var(--text-3); text-decoration: line-through; }
.chip.is-booked { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent-text); }
.chip.is-past, .chip.is-closed { opacity: .45; cursor: default; }
.chip.is-extra { box-shadow: 0 0 0 2px var(--info-soft); }
.chips-legend { display: flex; flex-wrap: wrap; gap: 12px; margin: 10px 0 14px; font-size: 12.5px; color: var(--text-3); }
.chips-legend span { display: inline-flex; align-items: center; gap: 6px; }
.chips-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

.wd-tabs { display: flex; gap: 6px; margin: 0 -16px; padding: 2px 16px 10px; overflow-x: auto; scrollbar-width: none; }
.wd-tabs::-webkit-scrollbar { display: none; }
.wd-tab { flex: 0 0 auto; display: grid; justify-items: center; gap: 1px; min-width: 70px; padding: 8px 10px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); color: var(--text-2); font-weight: 600; font-size: 13.5px; line-height: 1.3; }
.wd-tab small { font-size: 11px; font-weight: 600; color: var(--text-3); }
.wd-tab[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.wd-tab[aria-pressed="true"] small { color: inherit; opacity: .75; }
.wd-tab.off small { color: var(--bad); }

.code-box { margin: 18px 0 6px; padding: 18px; text-align: center; border-radius: 18px; background: var(--card-2); border: 1px dashed var(--accent-line); }
.code-box .code { font-size: 38px; font-weight: 700; letter-spacing: .28em; direction: ltr; font-variant-numeric: tabular-nums; color: var(--accent-text); padding-inline-start: .28em; }
.code-box .exp { font-size: 12.5px; color: var(--text-3); margin-top: 4px; }
.steps-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; counter-reset: s; margin-top: 4px; padding: 0; }
.steps-list li { list-style: none; display: flex; gap: 10px; min-width: 0; font-size: 14px; color: var(--text-2); }
.steps-list li > span { flex: 1; min-width: 0; }
.steps-list li::before { counter-increment: s; content: counter(s); width: 24px; height: 24px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 8px; font-size: 12px; font-weight: 700; background: var(--accent-soft); color: var(--accent-text); }
.steps-list b { color: var(--text); }
.copy-line { display: flex; align-items: center; gap: 8px; margin-top: 8px; padding: 6px 6px 6px 12px; border-radius: 12px; background: var(--card-2); border: 1px solid var(--line); }
.copy-line code { flex: 1; min-width: 0; overflow-x: auto; white-space: nowrap; direction: ltr; text-align: left; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; color: var(--text-2); scrollbar-width: none; }

.swatches { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.swatch { width: 38px; height: 38px; border-radius: 12px; border: 2px solid transparent; box-shadow: 0 0 0 1px var(--line-2) inset; }
.swatch[aria-pressed="true"] { border-color: var(--text); }
.swatch-input { width: 38px; height: 38px; padding: 0; border: 0; border-radius: 12px; overflow: hidden; background: none; cursor: pointer; }
.logo-edit { display: flex; align-items: center; gap: 14px; }
.logo-edit .logo { width: 72px; height: 72px; margin: 0; }
.save-bar { position: sticky; bottom: calc(76px + env(safe-area-inset-bottom)); z-index: 20; margin-top: 16px; padding: 10px; border-radius: 18px; background: var(--glass); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border: 1px solid var(--line-2); box-shadow: var(--shadow-pop); display: flex; gap: 10px; align-items: center; }
.save-bar span { flex: 1; font-size: 13px; color: var(--text-2); padding-inline-start: 6px; }

.adm-body { min-width: 0; }
.bell { position: relative; }
.bell .bell-count { position: absolute; top: -5px; inset-inline-end: -5px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px; display: grid; place-items: center; font-size: 11px; font-weight: 700; background: var(--bad); color: #fff; box-shadow: 0 0 0 2px var(--card); }
.bell.ring .ico { animation: ring 1s ease 2; transform-origin: 50% 10%; }
@keyframes ring { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(14deg); } 40% { transform: rotate(-12deg); } 60% { transform: rotate(8deg); } 80% { transform: rotate(-5deg); } }
.ev { display: flex; gap: 12px; align-items: center; padding: 12px 0; }
.ev + .ev { border-top: 1px solid var(--line); }
.ev .ev-ico { width: 40px; height: 40px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 12px; font-size: 18px; background: var(--ok-soft); }
.ev.cancel .ev-ico { background: var(--bad-soft); }
.ev.unread b::after { content: ""; display: inline-block; width: 7px; height: 7px; margin-inline-start: 6px; border-radius: 50%; background: var(--accent); vertical-align: middle; }
.ev .ev-body { flex: 1; min-width: 0; }
.ev .ev-body span { display: block; font-size: 13px; color: var(--text-2); }
.ev time { font-size: 12px; color: var(--text-3); white-space: nowrap; }
.kv { margin-top: 4px; padding: 2px 14px; border-radius: 16px; background: var(--card-2); border: 1px solid var(--line); }
.kv > div { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 0; font-size: 14px; }
.kv > div + div { border-top: 1px solid var(--line); }
.kv span { flex: 0 0 auto; font-size: 13px; color: var(--text-3); }
.kv b { font-weight: 600; text-align: end; min-width: 0; overflow-wrap: anywhere; }
.lrow .tg-ico { width: 44px; height: 44px; border-radius: 13px; }
details summary { list-style: none; padding: 6px 0; }
details summary::-webkit-details-marker { display: none; }
details summary::before { content: "◂ "; }
details[open] summary::before { content: "▾ "; }

.fab {
  position: fixed;
  bottom: calc(84px + env(safe-area-inset-bottom));
  inset-inline-end: 18px;
  z-index: 45;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 19px;
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 16px 34px -12px rgb(var(--accent-rgb) / .9);
  transition: transform .16s var(--ease);
}
.fab:active { transform: scale(.92); }
.fab .ico { width: 26px; height: 26px; }

.menu-list a, .menu-list button { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 4px; border: 0; background: none; color: var(--text); font-weight: 600; font-size: 15px; text-decoration: none; text-align: start; }
.menu-list > * + * { border-top: 1px solid var(--line); }
.menu-list .m-ico { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; background: var(--card-2); border: 1px solid var(--line); color: var(--accent); }
.menu-list .m-text { flex: 1; }
.menu-list .m-text small { display: block; font-size: 12.5px; color: var(--text-3); font-weight: 500; }
.menu-list .chev { color: var(--text-3); }

.auth { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1fr); min-height: 100vh; min-height: 100dvh; place-items: center; padding: 24px 16px; }
.auth-card { width: 100%; max-width: 420px; animation: rise .5s var(--ease) both; }
.auth-card .card { padding: 24px 20px; }
.auth-head { text-align: center; margin-bottom: 6px; }
.auth-head h1 { font-size: 22px; font-weight: 700; }
.auth-head p { color: var(--text-2); font-size: 14px; }
.setup-sec { margin-top: 22px; }
.setup-sec > .label { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text); margin-bottom: 12px; }

.skeleton { position: relative; overflow: hidden; background: var(--card-2); border-radius: 12px; }
.skeleton::after { content: ""; position: absolute; inset: 0; transform: translateX(100%); background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .05), transparent); animation: shimmer 1.2s infinite; }
@keyframes shimmer { to { transform: translateX(-100%); } }

@media (min-width: 640px) {
  .stats { grid-template-columns: repeat(4, 1fr); }
  .adm-main { padding: 22px 24px 120px; }
}

@media (min-width: 960px) {
  .adm { display: grid; grid-template-columns: 250px minmax(0, 1fr); }
  .adm-nav {
    position: sticky;
    top: 0;
    inset: auto;
    height: 100vh;
    height: 100dvh;
    flex-direction: column;
    justify-content: flex-start;
    gap: 3px;
    padding: 18px 14px;
    border-top: 0;
    border-inline-end: 1px solid var(--line);
    background: var(--bg-2);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  .adm-nav .nav-brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; font-weight: 700; }
  .adm-nav .nav-brand .t-logo { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; overflow: hidden; color: var(--accent); background: var(--card-2); border: 1px solid var(--accent-line); }
  .adm-nav .nav-brand .t-logo img { width: 100%; height: 100%; object-fit: cover; }
  .adm-nav .nav-brand .t-logo .ico { width: 20px; height: 20px; }
  .adm-nav .nav-brand span { font-size: 15px; line-height: 1.3; }
  .adm-nav .nav-foot { display: block; margin-top: auto; }
  .adm-nav a { flex: 0 0 auto; display: flex; align-items: center; gap: 12px; padding: 11px 12px; font-size: 14.5px; color: var(--text-2); }
  .adm-nav a .ico { width: 20px; height: 20px; }
  .adm-nav a:hover { background: var(--card); color: var(--text); }
  .adm-nav a.on { background: var(--accent-soft); color: var(--accent-text); }
  .adm-nav a.on::before { display: none; }
  .adm-nav .d-only { display: flex; }
  .adm-nav .m-only { display: none; }
  .adm-nav .count { position: static; margin-inline-start: auto; }
  .adm-top .t-logo { display: none; }
  .adm-main { padding: 26px 32px 60px; }
  .fab { bottom: 28px; inset-inline-end: 28px; }
  .save-bar { bottom: 16px; }
  .grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; align-items: start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-delay: 0ms !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
