:root {
  color-scheme: light;
  --bg: #f6f6f6;
  --panel: #ffffff;
  --text: #222225;
  --muted: #74747c;
  --line: #e4e4e8;
  --accent: #26806d;
  --accent-strong: #1f6859;
  --accent-soft: #e8f5f2;
  --selected: #fff4f0;
  --selected-line: #e6967c;
  --danger: #a13e4c;
  --shadow: 0 14px 34px rgba(34, 34, 37, 0.08);
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #17191c;
    --panel: #22252a;
    --text: #f4f4f5;
    --muted: #a9adb5;
    --line: #383c44;
    --accent: #58c2a6;
    --accent-strong: #7bd9c0;
    --accent-soft: #17372f;
    --selected: #372822;
    --selected-line: #d49a7e;
    --danger: #ff9aac;
    --shadow: none;
  }
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f6f6f6;
  --panel: #ffffff;
  --text: #222225;
  --muted: #74747c;
  --line: #e4e4e8;
  --accent: #26806d;
  --accent-strong: #1f6859;
  --accent-soft: #e8f5f2;
  --selected: #fff4f0;
  --selected-line: #e6967c;
  --danger: #a13e4c;
  --shadow: 0 14px 34px rgba(34, 34, 37, 0.08);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #17191c;
  --panel: #22252a;
  --text: #f4f4f5;
  --muted: #a9adb5;
  --line: #383c44;
  --accent: #58c2a6;
  --accent-strong: #7bd9c0;
  --accent-soft: #17372f;
  --selected: #372822;
  --selected-line: #d49a7e;
  --danger: #ff9aac;
  --shadow: none;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
textarea {
  font: inherit;
}

.calendar-settings {
  gap: 10px;
}

.toggle-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  cursor: pointer;
}

.toggle-row input {
  width: 20px;
  height: 20px;
  accent-color: var(--accent);
}

.integration-error {
  color: var(--danger);
  overflow-wrap: anywhere;
}

button:disabled {
  opacity: 0.65;
  cursor: wait;
}

.app-shell {
  width: min(100%, 560px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 18px 14px 28px;
}

.salon-header {
  margin: 0 0 12px;
  padding: 22px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.salon-label {
  margin: 0 0 7px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
}

.salon-header h1 {
  margin-bottom: 8px;
  font-size: 28px;
  line-height: 1.1;
}

.salon-meta {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.35;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  margin-bottom: 18px;
  padding: 8px 2px 4px;
}

.page-heading {
  flex: 1 1 auto;
  min-width: 0;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 28px;
  line-height: 1.05;
}

h2 {
  margin-bottom: 14px;
  font-size: 21px;
  line-height: 1.2;
}

.step-badge {
  flex: 0 0 auto;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 13px;
  background: rgba(255, 255, 255, 0.72);
}

.step {
  display: block;
  min-height: calc(100vh - 92px);
}

.back-button {
  flex: 0 0 auto;
  display: grid;
  min-width: 74px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.message {
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(161, 62, 76, 0.3);
  border-radius: 8px;
  background: #fff3f5;
  color: var(--danger);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.choice-list,
.choice-grid {
  display: grid;
  gap: 10px;
}

.menu-list {
  display: grid;
  gap: 12px;
}

.menu-list .choice-button {
  min-height: 64px;
}

.menu-list .menu-primary {
  min-height: 74px;
  border-color: rgba(38, 128, 109, 0.35);
  background: var(--accent-soft);
}

.menu-list .admin-entry {
  border-color: rgba(38, 128, 109, 0.45);
  background: var(--panel);
}

.menu-header {
  margin-bottom: 18px;
  padding: 2px 4px 0;
}

.menu-status {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.theme-switcher {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-top: 14px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.theme-button {
  min-height: 36px;
  padding: 0 8px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
}

.theme-button.is-active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-weight: 700;
}

.choice-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.choice-button,
.primary-button,
.secondary-button {
  min-height: 48px;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
}

.choice-button {
  width: 100%;
  padding: 15px;
  border-color: var(--line);
  background: var(--panel);
  color: var(--text);
  text-align: left;
}

.choice-button strong {
  display: block;
  margin-bottom: 3px;
  font-size: 16px;
}

.choice-button span {
  color: var(--muted);
  font-size: 14px;
}

.summary {
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  line-height: 1.55;
}

.info-content {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}

.info-content p,
.empty {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.info-card {
  display: grid;
  gap: 4px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.info-card strong {
  font-size: 16px;
}

.info-card span {
  color: var(--muted);
  font-size: 14px;
}

.info-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.stat-card {
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.stat-card strong {
  color: var(--muted);
  font-size: 14px;
}

.stat-card span {
  color: var(--text);
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
}

.work-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.work-image {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  object-fit: cover;
  background: var(--line);
}

.image-row {
  display: grid;
  grid-template-columns: 72px 1fr 1fr;
  gap: 8px;
  align-items: center;
}

.image-row .work-image {
  width: 72px;
  height: 72px;
}

.field {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 14px;
}

.field input,
.field textarea {
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  font-size: 16px;
}

.field textarea {
  min-height: 92px;
  resize: vertical;
}

.field input[type="checkbox"] {
  width: 22px;
  min-height: 22px;
  padding: 0;
}

.primary-button {
  width: 100%;
  padding: 0 16px;
  background: var(--accent);
  color: #ffffff;
  font-weight: 700;
}

.primary-button:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.primary-link {
  display: grid;
  margin-bottom: 10px;
  min-height: 48px;
  place-items: center;
  border-radius: 8px;
  background: var(--accent);
  color: #ffffff;
  font-weight: 700;
  text-decoration: none;
}

.secondary-button {
  padding: 0 16px;
  border-color: var(--line);
  background: var(--panel);
  color: var(--text);
}

.full-button {
  width: 100%;
  margin-top: 10px;
}

.booking-step {
  padding-bottom: 76px;
}

.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  padding: 0 4px;
}

.section-heading h2 {
  margin: 0;
}

.section-heading span {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 13px;
}

.service-list {
  display: grid;
  gap: 9px;
}

.service-card {
  display: grid;
  width: 100%;
  min-height: 72px;
  gap: 5px;
  padding: 14px 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.service-card strong {
  font-size: 16px;
  line-height: 1.25;
}

.service-card span {
  color: var(--muted);
  font-size: 14px;
}

.service-card.is-selected {
  border-color: var(--selected-line);
  background: var(--selected);
  box-shadow: inset 3px 0 0 var(--selected-line);
}

.booking-action {
  position: fixed;
  right: max(12px, calc((100vw - 560px) / 2 + 12px));
  bottom: 0;
  left: max(12px, calc((100vw - 560px) / 2 + 12px));
  padding: 12px 0 16px;
  background: linear-gradient(to top, var(--bg) 72%, rgba(246, 246, 246, 0));
}

.success p {
  color: var(--muted);
  line-height: 1.5;
}

@media (hover: hover) {
  .choice-button:hover,
  .secondary-button:hover,
  .back-button:hover,
  .theme-button:hover,
  .service-card:hover {
    border-color: var(--accent);
  }

  .primary-button:hover {
    background: var(--accent-strong);
  }

  .primary-link:hover {
    background: var(--accent-strong);
  }
}
