:root {
  --studio: #0e0e0e;
  --app: #fff;
  --ink: #111;
  --muted: #6f6f6f;
  --line: #ececec;
  --fill: #f6f6f6;
  --ok: #1f7a4d;
  --danger: #b42318;
  --busy: #a3a3a3;
  --radius: 12px;
  --font: "Inter", system-ui, -apple-system, sans-serif;
}

.theme-kadin {
  --studio: #141210;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  background: var(--studio);
  color: var(--ink);
  line-height: 1.45;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }

.app {
  width: min(420px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  background: var(--app);
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 8;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  padding: 14px 20px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.brand strong {
  display: block;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 240px;
}
.brand span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 1px;
}
.nav-links {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
}
.nav-links a:hover { color: var(--ink); }

.sheet { padding: 20px 20px 32px; flex: 1; }
.sheet h1 {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin: 16px 0 8px;
}
.lead, .hint, .hours-line { color: var(--muted); font-size: 14px; }
.hours-line { margin: 0 0 18px; }
.lead { margin-bottom: 18px; }
.hint { margin: 0 0 10px; font-size: 13px; }

.steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.steps li {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
}
.steps b {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--fill);
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}
.steps .on, .steps .done { color: var(--ink); }
.steps .on b, .steps .done b { background: var(--ink); color: #fff; }

.list { display: grid; gap: 8px; }
.row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 68px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  cursor: pointer;
}
.row input { position: absolute; opacity: 0; pointer-events: none; }
.row:has(input:checked) {
  border-color: var(--ink);
  background: var(--fill);
}
.tick {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  border: 1.5px solid #d4d4d4;
  border-radius: 5px;
  background: #fff;
}
.row:has(input:checked) .tick {
  background: var(--ink);
  border-color: var(--ink);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path fill='none' stroke='white' stroke-width='2.2' d='M3 8.2 6.4 11.5 13 4.5'/></svg>");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 12px;
}
.row-body { flex: 1; min-width: 0; }
.row-body b { display: block; font-size: 15px; font-weight: 600; }
.row-body small, .muted { color: var(--muted); font-size: 13px; }
.price { font-weight: 600; white-space: nowrap; font-size: 14px; }
.row.staff { min-height: 76px; }
.avatar {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--fill);
  display: grid;
  place-items: center;
  font-weight: 600;
  font-size: 14px;
  overflow: hidden;
}

.dates {
  display: flex;
  gap: 8px;
  overflow: auto;
  padding: 2px 0 14px;
  margin: 0 -20px;
  padding-left: 20px;
  padding-right: 20px;
}
.date-chip {
  flex: 0 0 56px;
  text-align: center;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 12px;
  padding: 8px 4px;
}
.date-chip em { display: block; font-style: normal; font-size: 11px; color: var(--muted); }
.date-chip b { font-size: 17px; font-weight: 600; }
.date-chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.date-chip.on em { color: rgba(255,255,255,.7); }
.date-chip.off { opacity: .35; pointer-events: none; }

.slot-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.slot {
  display: grid;
  place-items: center;
  gap: 1px;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
  width: 100%;
  padding: 6px 2px;
  appearance: none;
}
button.slot:hover { border-color: var(--ink); }
.slot.busy, .slot.closed, .slot.past {
  cursor: not-allowed;
  background: var(--fill);
  color: var(--busy);
}
.slot.short { opacity: .35; cursor: default; }
.slot small {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.form-grid { display: grid; gap: 12px; margin-top: 4px; }
.form-grid label { display: grid; gap: 6px; font-size: 13px; color: var(--muted); font-weight: 500; }
input, textarea, select {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
  padding: 12px 14px;
  outline: none;
  font-size: 15px;
}
input:focus, textarea:focus, select:focus { border-color: var(--ink); }

.summary {
  background: var(--fill);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: grid;
  gap: 4px;
  margin-bottom: 16px;
  font-size: 14px;
}
.summary div:first-child { font-weight: 600; }

.actions {
  display: flex;
  gap: 8px;
  margin-top: 20px;
}
.btn, .btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 16px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  flex: 1;
}
.btn-primary {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}
.btn-primary:disabled { opacity: .35; cursor: not-allowed; }

.success { text-align: center; padding: 12px 4px; }
.success h2 { font-size: 22px; font-weight: 600; margin: 8px 0; letter-spacing: -0.03em; }
.code {
  display: inline-block;
  margin: 12px 0 14px;
  padding: 10px 16px;
  border-radius: 10px;
  letter-spacing: .18em;
  font-size: 20px;
  font-weight: 600;
  background: var(--ink);
  color: #fff;
}
.flash {
  margin: 12px 20px 0;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 14px;
}
.flash.ok { background: #e8f6ee; color: var(--ok); }
.flash.bad { background: #fdecec; color: var(--danger); }
.empty { text-align: center; color: var(--muted); padding: 28px 8px; }

.map-card {
  margin: 0 20px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
}
.map-card iframe {
  display: block;
  width: 100%;
  height: 160px;
  border: 0;
}
.map-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
}
.map-bar b { display: block; font-size: 13px; }
.map-bar span { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.map-cta {
  flex: 0 0 auto;
  padding: 8px 12px;
  border: 1px solid var(--ink);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.footer {
  color: var(--muted);
  font-size: 12px;
  padding: 0 20px 28px;
}
.lookup .lead { margin-bottom: 16px; }
.appt-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  margin-top: 12px;
  display: grid;
  gap: 6px;
}
.appt-card h3 { font-size: 18px; font-weight: 600; letter-spacing: -0.02em; }
.badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--fill);
}
.badge.ok { background: #e8f6ee; color: var(--ok); }
.badge.bad { background: #fdecec; color: var(--danger); }

@media (min-width: 760px) {
  body { padding: 32px 0; }
  .app {
    min-height: calc(100vh - 64px);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 24px 80px rgba(0,0,0,.35);
  }
}
