@font-face {
  font-family: Vazirmatn;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/fonts/vazirmatn-arabic.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}
@font-face {
  font-family: Vazirmatn;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/fonts/vazirmatn-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: Vazirmatn;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/fonts/vazirmatn-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #fbf7f1;
  --fg: #3a2a28;
  --muted: #7a6860;
  --card: #fffdf9;
  --line: #eadfd4;
  --primary: #9a3d45;
  --primary-fg: #fffaf6;
  --accent: #f3e6d6;
  --font: Vazirmatn, ui-sans-serif, system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body {
  min-height: 100%;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}
body {
  margin: 0;
  font-family: var(--font);
  font-weight: 400;
  background:
    radial-gradient(ellipse 80% 50% at 100% -10%, rgba(154, 61, 69, 0.12), transparent),
    radial-gradient(ellipse 60% 40% at 0% 100%, rgba(232, 196, 140, 0.2), transparent),
    var(--bg);
  color: var(--fg);
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap {
  width: 100%;
  max-width: 960px;
  margin-inline: auto;
  padding: 24px 16px 48px;
}
.wrap-book {
  max-width: 32rem;
  padding: 10px 20px 40px;
}
button { font-family: inherit; }
.site-header, .app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 18px 0;
  flex-wrap: wrap;
  min-width: 0;
}
.app-header { border-bottom: 1px solid var(--line); background: rgba(251,247,241,.88); position: sticky; top: 0; z-index: 40; backdrop-filter: blur(8px); display: block; padding: 0; }
.app-header .header-wrap { padding: 0 16px; }
.header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding-block: 8px;
  box-sizing: border-box;
}
.header-title { min-width: 0; }
.logout-form { margin: 0; display: flex; align-items: center; }
.logout-btn {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--fg);
  border-radius: 12px;
  padding: 8px 14px;
  font: inherit;
  cursor: pointer;
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.menu-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 12px;
  padding: 0;
  margin: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
}
.menu-toggle span {
  display: block;
  width: 16px;
  height: 2px;
  background: var(--fg);
  border-radius: 2px;
  transition: transform .15s ease, opacity .15s ease;
}
.menu-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.is-open span:nth-child(2) { opacity: 0; }
.menu-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.nav { display: flex; gap: 6px; flex-wrap: wrap; padding: 0 0 12px; }
.nav a, .choice {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 8px 14px;
  font: inherit;
}
.nav a { color: var(--muted); }
.nav a:hover, .nav a.active { background: var(--accent); color: var(--fg); text-decoration: none; }
.choice {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--fg);
}
.choice.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.btn, input[type="submit"] {
  border: 0;
  background: var(--primary);
  color: var(--primary-fg);
  cursor: pointer;
  border-radius: 12px;
  padding: 10px 16px;
  font: inherit;
  font-weight: 600;
}
.btn.outline, .ghost {
  background: transparent;
  color: var(--fg);
  border: 1px solid var(--line);
}
.btn.danger { background: #fde8e8; color: #9a2d2d; }
.btn-sm {
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  width: auto;
}
.hero h1 { font-size: clamp(28px, 5vw, 44px); line-height: 1.35; margin: 12px 0; font-weight: 600; }
.muted { color: var(--muted); }
.grid { display: grid; gap: 14px; min-width: 0; }
.cards { display: grid; gap: 14px; }
@media (max-width: 720px) {
  .header-bar {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 8px;
    min-height: 56px;
  }
  .menu-toggle {
    display: inline-flex;
    justify-self: start;
    align-self: center;
    width: 40px;
    height: 40px;
  }
  .header-title {
    text-align: center;
    justify-self: center;
    align-self: center;
    max-width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 40px;
  }
  .header-title .brand {
    font-size: 16px;
    line-height: 40px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .logout-form {
    justify-self: end;
    align-self: center;
    height: 40px;
  }
  .logout-btn {
    border: 0;
    background: transparent;
    color: var(--primary);
    padding: 0 2px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    height: 40px;
    min-height: 40px;
  }
  .nav {
    display: none;
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 4px;
    padding: 0 0 12px;
  }
  .nav.is-open { display: flex; }
  .nav a {
    width: 100%;
    justify-content: flex-start;
    border-radius: 12px;
    padding: 12px 14px;
  }
  label { margin-bottom: 8px; gap: 4px; }
  .grid { gap: 8px; }
  .card { padding: 14px; }
  input, textarea, select { padding: 8px 10px; }
  .service-card { margin-top: 10px; }
  .service-fields { gap: 8px; }
  .service-fields label { margin-bottom: 0; }
  .service-create .btn,
  .service-actions .btn { width: 100%; }
}
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  min-width: 0;
}
label { display: grid; gap: 6px; font-size: 14px; margin-bottom: 12px; }
.service-fields { display: grid; gap: 10px; min-width: 0; }
.service-fields label { margin-bottom: 0; }
.service-create { display: grid; gap: 10px; }
.service-card { margin-top: 12px; }
.service-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.service-actions .btn { min-width: 8.5rem; }
@media (min-width: 800px) {
  .service-actions .btn {
    min-width: 0;
    width: auto;
    padding: 5px 11px;
    font-size: 12px;
    border-radius: 10px;
    font-weight: 600;
  }
}
.switch {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  cursor: pointer;
  font-size: 14px;
}
.switch input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.switch-ui {
  width: 44px;
  height: 26px;
  border-radius: 999px;
  background: #e4d3c6;
  position: relative;
  flex: 0 0 44px;
  transition: background .15s ease;
}
.switch-ui::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(58, 42, 40, 0.2);
  transition: transform .15s ease;
}
.switch input:checked + .switch-ui { background: var(--primary); }
.switch input:checked + .switch-ui::after { transform: translateX(18px); }
.switch input:focus-visible + .switch-ui { box-shadow: 0 0 0 3px rgba(154, 61, 69, 0.2); }
@media (min-width: 800px) {
  .cards.cols-3 { grid-template-columns: repeat(3, 1fr); }
  .two { grid-template-columns: 1fr 1fr; }
  .service-fields { grid-template-columns: 1.4fr 0.8fr 1fr; gap: 12px; align-items: end; }
  .service-create {
    grid-template-columns: 1fr auto;
    align-items: end;
    gap: 12px;
  }
}
input, textarea, select {
  font: inherit;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  background: #fff;
  width: 100%;
  max-width: 100%;
}
.flash { font-size: 14px; }
.flash.err { color: #9a2d2d; }
.flash.ok { color: var(--primary); }
.badge {
  display: inline-flex;
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 12px;
  background: var(--primary);
  color: #fff;
}
.badge.off { background: var(--accent); color: var(--fg); }

.service-list { display: grid; gap: 10px; }
.service-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 72px;
  padding: 12px 14px;
  text-align: right;
  background: #fff;
  border: 2px solid #e4d3c6;
  border-radius: 16px;
  color: var(--fg);
  cursor: pointer;
  font: inherit;
  -webkit-tap-highlight-color: transparent;
}
.service-check {
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  border-radius: 999px;
  border: 2px solid #d2bfb2;
  background: #fff;
  position: relative;
}
.service-copy { flex: 1; min-width: 0; display: grid; gap: 3px; }
.service-copy strong { font-weight: 600; font-size: 16px; }
.service-duration { font-size: 11px; line-height: 1.4; color: var(--muted); }
.service-meta { display: grid; justify-items: end; gap: 6px; flex: 0 0 auto; }
.service-price { font-weight: 600; font-size: 13px; white-space: nowrap; color: var(--fg); }
.service-picked {
  display: none;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  background: #9a3d45;
  border-radius: 999px;
  padding: 2px 8px;
}
.service-btn.active {
  background: #f8e9ea;
  border-color: #9a3d45;
  box-shadow: 0 0 0 3px rgba(154, 61, 69, 0.16);
}
.service-btn.active .service-check {
  background: #9a3d45;
  border-color: #9a3d45;
}
.service-btn.active .service-check::after {
  content: "";
  position: absolute;
  inset: 6px 5px 8px 8px;
  border: 2px solid #fff;
  border-top: 0;
  border-inline-start: 0;
  transform: rotate(45deg);
}
.service-btn.active .service-picked { display: inline-flex; }
.service-btn.active .service-copy strong { color: #9a3d45; }

.salon-head { margin: 0 0 12px; }
.salon-name {
  font-size: 20px;
  line-height: 1.4;
  margin: 0;
  font-weight: 600;
}
.salon-address {
  margin: 2px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}
.step-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  min-width: 0;
}
.step-head h2 { margin: 0; flex: 1; font-size: 18px; }
.step-count { font-size: 14px; color: var(--muted); white-space: nowrap; margin-inline-start: auto; }
.step-back {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--fg);
  border-radius: 10px;
  padding: 6px 10px;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.book-recap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: -4px 0 14px;
}
.recap-chip {
  border: 1px solid #e4d3c6;
  background: #fff;
  color: var(--fg);
  border-radius: 999px;
  padding: 6px 10px;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.book-step { display: none; }
.book-step.is-on { display: block; }
.book-step.is-on.step-in {
  animation: book-step-in 180ms ease-out;
}
@keyframes book-step-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .book-step.is-on.step-in { animation: none; }
}
.slots-title { margin: 16px 0 10px; font-size: 16px; }
#details-summary { margin: 0 0 14px; font-size: 13px; line-height: 1.7; }
.book-step .btn { width: 100%; }
.success-card { text-align: center; }
.success-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--primary);
  margin: 0 0 16px;
}
.receipt {
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
  display: grid;
  gap: 10px;
  text-align: right;
}
.receipt li {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 12px;
  font-size: 13px;
  line-height: 1.6;
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
}
.receipt li span { color: var(--muted); flex: 0 0 auto; }
.receipt li strong { font-weight: 600; text-align: left; }

.slot {
  text-align: right;
  width: 100%;
  border: 2px solid #d9c7b8;
  background: #fff;
  border-radius: 14px;
  padding: 12px;
  cursor: pointer;
  font: inherit;
  color: var(--fg);
}
.slot.active {
  border-color: #9a3d45;
  background: #f8e9ea;
  box-shadow: 0 0 0 3px rgba(154, 61, 69, 0.16);
}

.cal-wrap {
  background: #fff;
  border: 1px solid #d9c7b8;
  border-radius: 20px;
  padding: 12px;
  box-shadow: 0 8px 24px rgba(90, 50, 40, 0.06);
  min-width: 0;
}
.cal-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
  min-width: 0;
}
.cal-toolbar h2 { margin: 0; }
.month-nav { display: flex; align-items: center; justify-content: space-between; gap: 6px; flex-wrap: nowrap; min-width: 0; width: 100%; }
@media (max-width: 420px) {
  .cal-toolbar { flex-direction: column; align-items: stretch; }
  .month-nav { justify-content: space-between; }
}
.month-nav button.cal-arrow {
  width: 36px;
  height: 36px;
  padding: 0;
  font-size: 22px;
  line-height: 1;
  flex: 0 0 36px;
  border-radius: 10px;
  border: 1px solid #d9c7b8;
  background: #fff;
  color: var(--fg);
  font: inherit;
}
#when-continue { margin-top: 16px; }
input[name="customer_phone"] { letter-spacing: 0.04em; }
#month-label { font-weight: 600; text-align: center; min-width: 7rem; }
.cal {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
  text-align: center;
}
.cal-dow {
  font-size: 12px;
  font-weight: 600;
  color: #6a5348;
  padding: 6px 0 8px;
}
.cal-day {
  aspect-ratio: 1;
  min-height: 36px;
  width: 100%;
  border: 1px solid #e6d5c8;
  background: #faf6f1;
  border-radius: 10px;
  font: inherit;
  font-weight: 600;
  color: #3a2a28;
  cursor: pointer;
  padding: 0;
}
.cal-day:hover:not(:disabled) { border-color: var(--primary); background: #f6e9e6; }
.cal-day.is-today { box-shadow: inset 0 0 0 2px #c47a4a; background: #fff4e8; }
.cal-day.is-selected,
.cal-day.active {
  background: #9a3d45;
  border-color: #9a3d45;
  color: #fff;
  box-shadow: none;
}
.cal-day.is-past,
.cal-day:disabled {
  background: #f1ece6;
  color: #b5a69c;
  border-color: #eee7e0;
  cursor: not-allowed;
  font-weight: 400;
}
.cal-empty { aspect-ratio: 1; min-width: 0; }
.slots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
@media (min-width: 640px) { .slots { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.slot strong { display: block; font-size: 14px; font-weight: 600; }
.hours-row { display: grid; grid-template-columns: 5.5rem auto 1fr 1fr; gap: 8px; align-items: center; border: 1px solid var(--line); border-radius: 10px; padding: 8px; margin-bottom: 8px; }
@media (max-width: 520px) {
  .hours-row { grid-template-columns: 1fr 1fr; }
  .hours-row span:first-child { grid-column: 1 / -1; }
}
.empty { border: 1px dashed var(--line); border-radius: 18px; padding: 32px; text-align: center; }
.row-between { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: start; }
.check { display: flex; gap: 8px; align-items: center; }
.check input { width: auto; }
.staff-services-title { font-size: 14px; margin: 16px 0 8px; font-weight: 600; }
.picks { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 8px; }
.pick {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 13px;
  cursor: pointer;
}
.pick input { width: auto; margin: 0; accent-color: var(--primary); }
.pick:has(input:checked) {
  background: #f8e9ea;
  border-color: var(--primary);
  color: var(--primary);
}
.pick-hint { font-size: 12px; margin: 0 0 14px; }
.footer-space { height: 40px; }
h1, h2 { font-weight: 600; }

