:root {
  --ink: #16181d;
  --ink-soft: #4a4f5a;
  --paper: #faf9f6;
  --card: #ffffff;
  --line: #e6e3dc;
  --brand: #1f4d3f;
  --brand-dark: #143329;
  --accent: #d97a3f;
  --accent-soft: #f5ddc8;
  --danger: #b3432b;
  --ok: #1f4d3f;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(22, 24, 29, 0.06), 0 8px 24px -12px rgba(22, 24, 29, 0.18);
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: 'Segoe UI', ui-sans-serif, -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--brand);
}

h1,
h2,
h3 {
  font-family: Georgia, 'Times New Roman', serif;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 0.4em;
  color: var(--ink);
}

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

/* --- top bar --- */
.topbar {
  border-bottom: 1px solid var(--line);
  background: var(--card);
}
.topbar .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: Georgia, serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--brand-dark);
  text-decoration: none;
}
.brand .mark {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--brand);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 15px;
}
.topbar nav {
  display: flex;
  gap: 12px;
  align-items: center;
}

/* --- buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 10px 18px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.05s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:active {
  transform: translateY(1px);
}
.btn-primary {
  background: var(--brand);
  color: #fff;
}
.btn-primary:hover {
  background: var(--brand-dark);
}
.btn-accent {
  background: var(--accent);
  color: #fff;
}
.btn-accent:hover {
  filter: brightness(0.94);
}
.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}
.btn-ghost:hover {
  background: #f1efe9;
}
.btn-danger {
  background: transparent;
  color: var(--danger);
  border-color: #e3c8bf;
}
.btn-danger:hover {
  background: #fbeee9;
}
.btn-sm {
  padding: 6px 12px;
  font-size: 0.85rem;
}
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.btn-block {
  width: 100%;
}

/* --- cards / forms --- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
}
.field {
  margin-bottom: 16px;
}
.field label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-soft);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 0.98rem;
  font-family: inherit;
  background: #fff;
  color: var(--ink);
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(31, 77, 63, 0.12);
}
.field-row {
  display: flex;
  gap: 12px;
}
.field-row > .field {
  flex: 1;
}

.auth-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.auth-shell .card {
  width: 100%;
  max-width: 420px;
}
.auth-shell .card h2 {
  margin-bottom: 4px;
}
.auth-sub {
  color: var(--ink-soft);
  font-size: 0.92rem;
  margin-bottom: 22px;
}
.auth-foot {
  margin-top: 18px;
  font-size: 0.9rem;
  color: var(--ink-soft);
  text-align: center;
}

.alert {
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.9rem;
  margin-bottom: 16px;
}
.alert-error {
  background: #fbeee9;
  color: var(--danger);
  border: 1px solid #e3c8bf;
}
.alert-ok {
  background: #eaf1ee;
  color: var(--ok);
  border: 1px solid #cfe0d8;
}

/* --- landing --- */
.hero {
  padding: 96px 0 64px;
  text-align: center;
}
.hero h1 {
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  max-width: 760px;
  margin: 0 auto 18px;
}
.hero p {
  max-width: 560px;
  margin: 0 auto 32px;
  color: var(--ink-soft);
  font-size: 1.1rem;
}
.hero-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
}
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  padding: 20px 0 96px;
}
.feature {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}
.feature .icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  margin-bottom: 14px;
}
.feature h3 {
  font-size: 1.05rem;
  font-family: inherit;
}
.feature p {
  color: var(--ink-soft);
  font-size: 0.92rem;
  margin: 0;
}

@media (max-width: 720px) {
  .features {
    grid-template-columns: 1fr;
  }
  .field-row {
    flex-direction: column;
    gap: 0;
  }
}

/* --- dashboard --- */
.dash-shell {
  min-height: 100vh;
}
.dash-body {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 0;
}
.sidebar {
  border-right: 1px solid var(--line);
  padding: 24px 16px;
  min-height: calc(100vh - 65px);
}
.sidebar button {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink-soft);
  cursor: pointer;
  margin-bottom: 2px;
}
.sidebar button:hover {
  background: #f1efe9;
}
.sidebar button.active {
  background: var(--brand);
  color: #fff;
}
.main {
  padding: 32px;
}
.main-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}
.slug-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #f1efe9;
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 0.85rem;
  color: var(--ink-soft);
}
.slug-pill code {
  color: var(--brand-dark);
  font-weight: 600;
}
.slug-pill button {
  border: none;
  background: none;
  cursor: pointer;
  color: var(--brand);
  font-weight: 600;
  font-size: 0.82rem;
}

.day-group {
  margin-bottom: 28px;
}
.day-label {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--brand-dark);
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
}
.appt-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  margin-bottom: 8px;
}
.appt-time {
  min-width: 96px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--brand-dark);
}
.appt-info {
  flex: 1;
  min-width: 0;
}
.appt-info .name {
  font-weight: 600;
}
.appt-info .meta {
  font-size: 0.85rem;
  color: var(--ink-soft);
}
.appt-status {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 3px 9px;
  border-radius: 999px;
}
.appt-status.confirmed {
  background: #eaf1ee;
  color: var(--ok);
}
.appt-status.cancelled {
  background: #f2f0eb;
  color: var(--ink-soft);
  text-decoration: line-through;
}
.empty-state {
  text-align: center;
  padding: 64px 24px;
  color: var(--ink-soft);
}

.table {
  width: 100%;
  border-collapse: collapse;
}
.table th,
.table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  font-size: 0.92rem;
}
.table th {
  color: var(--ink-soft);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(22, 24, 29, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 50;
}
.modal {
  background: var(--card);
  border-radius: var(--radius);
  padding: 28px;
  width: 100%;
  max-width: 460px;
  max-height: 90vh;
  overflow-y: auto;
}
.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.modal-head button {
  background: none;
  border: none;
  font-size: 1.3rem;
  cursor: pointer;
  color: var(--ink-soft);
  line-height: 1;
}
.hidden {
  display: none !important;
}

.day-toggle-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.day-toggle-row:last-child {
  border-bottom: none;
}
.day-toggle-row .day-name {
  width: 100px;
  font-weight: 600;
  font-size: 0.9rem;
}
.day-toggle-row input[type='time'] {
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
}
.day-toggle-row label.check {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--ink-soft);
  width: 70px;
}

@media (max-width: 800px) {
  .dash-body {
    grid-template-columns: 1fr;
  }
  .sidebar {
    display: flex;
    overflow-x: auto;
    min-height: auto;
    border-right: none;
    border-bottom: 1px solid var(--line);
  }
  .sidebar button {
    white-space: nowrap;
  }
}

/* --- booking page --- */
.book-shell {
  max-width: 640px;
  margin: 0 auto;
  padding: 48px 24px 96px;
}
.book-head {
  text-align: center;
  margin-bottom: 32px;
}
.steps {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
}
.step-dot {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: var(--line);
}
.step-dot.done {
  background: var(--brand);
}
.service-option {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 10px;
  cursor: pointer;
  background: var(--card);
}
.service-option:hover {
  border-color: var(--brand);
}
.service-option.selected {
  border-color: var(--brand);
  background: #eaf1ee;
}
.service-option .price {
  color: var(--ink-soft);
  font-size: 0.9rem;
}
.slot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 8px;
  margin-top: 12px;
}
.slot-btn {
  padding: 10px 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
}
.slot-btn:hover {
  border-color: var(--brand);
}
.slot-btn.selected {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}
.confirmation {
  text-align: center;
  padding: 48px 24px;
}
.confirmation .icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #eaf1ee;
  color: var(--ok);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin: 0 auto 16px;
}
