:root {
  --bg: #f5f6f3;
  --surface: #ffffff;
  --surface-2: #edf2ef;
  --text: #151716;
  --muted: #66706b;
  --line: #dce2df;
  --accent: #1f7a5a;
  --accent-2: #0f5d7a;
  --danger: #b44735;
  --shadow: 0 14px 34px rgba(21, 23, 22, 0.08);
}

* {
  box-sizing: border-box;
}

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

button,
input,
select,
textarea {
  font: inherit;
}

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

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

h1 {
  margin-bottom: 0;
  font-size: 28px;
  line-height: 1.1;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: 18px;
  letter-spacing: 0;
}

.tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.tab {
  min-height: 40px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 700;
}

.tab.active {
  background: var(--text);
  color: #fff;
}

.notice {
  margin: 12px 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent-2);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
}

.notice.error {
  border-left-color: var(--danger);
}

.panel {
  display: none;
  margin-top: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.panel.active {
  display: block;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 16px;
}

.section-head span {
  color: var(--muted);
  font-size: 13px;
}

.booking-form,
.review-form {
  display: grid;
  gap: 16px;
}

label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  outline: none;
  padding: 10px 12px;
}

textarea {
  min-height: 112px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(31, 122, 90, 0.14);
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

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

.choice-card {
  min-height: 82px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

.choice-card strong {
  display: block;
  margin-bottom: 6px;
  line-height: 1.2;
}

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

.choice-card.active {
  border-color: var(--accent);
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--accent);
}

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

.slot {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
  font-weight: 700;
}

.slot.active {
  border-color: var(--accent-2);
  background: #e5f1f5;
  color: #08384a;
}

.empty-state {
  padding: 14px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
}

.summary-box,
.booking-card,
.review-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  white-space: pre-wrap;
}

.booking-card {
  display: grid;
  gap: 12px;
}

.reviews-list {
  display: grid;
  gap: 10px;
  margin-bottom: 10px;
}

.review-card {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  white-space: normal;
}

.review-card p {
  margin-bottom: 0;
  line-height: 1.45;
}

.review-meta {
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.review-avatar {
  width: 36px;
  height: 36px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--accent);
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 800;
}

.review-avatar img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.review-controls {
  display: grid;
  grid-template-columns: 88px 1fr 88px;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.review-controls span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.compact {
  min-height: 38px;
}

.about-gallery {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}

.about-gallery img {
  width: 100%;
  height: clamp(280px, 58vh, 560px);
  display: block;
  border-radius: 8px;
  object-fit: cover;
}

.about-gallery img[data-photo-index="0"] {
  object-position: 45% 50%;
}

.about-gallery img[data-photo-index="1"] {
  object-position: 50% 35%;
}

.about-controls {
  display: grid;
  grid-template-columns: 88px 1fr 88px;
  align-items: center;
  gap: 8px;
}

.about-controls span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.text-content {
  white-space: pre-wrap;
  line-height: 1.5;
}

.actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.primary,
.secondary,
.danger {
  min-height: 46px;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 800;
}

.primary {
  background: var(--accent);
  color: #fff;
}

.secondary {
  background: var(--text);
  color: #fff;
}

.danger {
  background: var(--danger);
  color: #fff;
}

.admin-nav {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

.admin-nav .active {
  background: var(--accent);
}

.admin-content,
.admin-section,
.admin-list {
  display: grid;
  gap: 12px;
}

.admin-section h3 {
  margin: 4px 0 0;
  font-size: 15px;
}

.admin-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.admin-card p {
  margin: 0;
  line-height: 1.45;
}

.admin-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.admin-card-head strong,
.admin-card-head span {
  display: block;
}

.admin-card-head span,
.admin-card > span,
.admin-card-head em {
  color: var(--muted);
  font-size: 13px;
}

.admin-card-head em {
  font-style: normal;
  font-weight: 800;
}

.admin-actions,
.admin-payment {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.admin-payment {
  grid-template-columns: minmax(0, 1fr) 76px minmax(0, 1fr) minmax(0, 1fr);
}

.admin-counters {
  display: grid;
  gap: 8px;
}

.admin-counter {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border-radius: 8px;
  background: #fff;
}

.admin-counter strong {
  min-width: 0;
}

.admin-counter span,
.admin-counter small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.admin-counter small {
  grid-column: 1 / -1;
}

.admin-chip-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.admin-slot.blocked {
  border-color: var(--danger);
  background: #f8e7e2;
  color: #7a2518;
}

.admin-slot.busy {
  border-color: var(--accent-2);
  background: #e5f1f5;
}

.admin-weekdays {
  display: grid;
  gap: 14px;
}

.admin-weekday strong {
  display: block;
  font-size: 13px;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.hidden {
  display: none !important;
}

@media (max-width: 620px) {
  .app-shell {
    padding: 12px 10px 22px;
  }

  h1 {
    font-size: 24px;
  }

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

  .panel {
    padding: 14px;
  }

  .split,
  .choice-grid,
  .actions {
    grid-template-columns: 1fr;
  }

  .about-gallery img {
    height: clamp(300px, 62vh, 520px);
  }

  .review-controls,
  .about-controls {
    grid-template-columns: 76px 1fr 76px;
  }

  .admin-nav,
  .admin-actions,
  .admin-payment {
    grid-template-columns: 1fr 1fr;
  }

  .admin-payment select {
    grid-column: 1 / -1;
  }

  .admin-counter {
    grid-template-columns: 1fr;
  }

  .admin-chip-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
