:root {
  --prun: #8E2C5A;
  --prun-dark: #5c1a3a;
  --prun-soft: #f6e9ef;
  --gold: #C9A46A;
  --gold-soft: #f7efe1;
  --bg: #F8F5F3;
  --card: #ffffff;
  --text: #241a1f;
  --muted: #76666e;
  --line: #ece4e8;
  --danger: #c62828;
  --radius: 20px;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
[hidden] { display: none !important; }
button { font: inherit; cursor: pointer; }

/* ------------------------------------------------ hero */
.hero {
  background: linear-gradient(140deg, var(--prun) 0%, var(--prun-dark) 100%);
  color: #fff;
  padding: 40px 20px 72px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: '';
  position: absolute; inset: auto -20% -60% -20%; height: 120%;
  background: radial-gradient(closest-side, rgba(201,164,106,.25), transparent);
  pointer-events: none;
}
.hero-inner { position: relative; z-index: 1; max-width: 560px; margin: 0 auto; }
.monogram {
  width: 72px; height: 72px; margin: 0 auto 14px;
  border-radius: 22px;
  display: grid; place-items: center;
  font-family: 'Playfair Display', serif; font-size: 30px; font-weight: 700;
  color: var(--gold);
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(201,164,106,.6);
}
.hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(26px, 6vw, 36px);
  margin: 0 0 8px;
  letter-spacing: -.3px;
}
.hero-meta { display: flex; flex-wrap: wrap; gap: 8px 16px; justify-content: center; font-size: 14px; }
.hero-meta a { color: rgba(255,255,255,.88); text-decoration: none; }
.hero-meta a:hover { color: #fff; text-decoration: underline; }

/* ------------------------------------------------ layout */
.container {
  width: 100%; max-width: 560px;
  margin: -44px auto 0;
  padding: 0 16px 32px;
  position: relative; z-index: 2;
  flex: 1;
}
.card {
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: 0 10px 30px rgba(92,26,58,.08);
  padding: 20px;
  margin-bottom: 16px;
  animation: rise .35s ease both;
}
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.step-head { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.step-head h2 { font-size: 18px; margin: 0; flex: 1; }
.badge {
  width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--prun); color: #fff; font-weight: 700; font-size: 14px;
}
.link { background: none; border: 0; color: var(--prun); font-weight: 600; font-size: 14px; padding: 4px; }
.muted { color: var(--muted); }

/* ------------------------------------------------ services */
.services { display: grid; gap: 10px; }
.service {
  display: flex; align-items: center; gap: 14px;
  width: 100%; text-align: left;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1.5px solid var(--line);
  background: #fff;
  transition: border-color .15s, background .15s, transform .1s;
}
.service:hover { border-color: var(--prun); background: var(--prun-soft); }
.service:active { transform: scale(.99); }
.service .dot { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.service .info { flex: 1; min-width: 0; }
.service .name { font-weight: 600; }
.service .dur { color: var(--muted); font-size: 14px; }
.service .price { font-weight: 700; color: var(--prun); white-space: nowrap; }
.chosen {
  display: flex; justify-content: space-between; gap: 10px;
  background: var(--gold-soft);
  border-radius: 14px; padding: 12px 14px; margin-bottom: 16px;
  font-size: 15px;
}
.chosen b { font-weight: 600; }

/* ------------------------------------------------ calendar */
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.cal-title { font-size: 20px; font-weight: 800; letter-spacing: -.3px; text-transform: capitalize; }
.cal-nav { display: flex; gap: 4px; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 50%;
  border: 0; background: transparent;
  color: var(--prun); font-size: 26px; line-height: 1;
}
.icon-btn:hover:not(:disabled) { background: var(--prun-soft); }
.icon-btn:disabled { color: #d9cdd3; cursor: default; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; }
.cal-weekdays span { font-size: 12px; font-weight: 700; color: var(--muted); padding: 4px 0 8px; }
.cal-weekdays .we { color: var(--prun); opacity: .75; }
.day {
  height: 44px; margin: 2px auto; width: 44px; max-width: 100%;
  border-radius: 50%; border: 0; background: transparent;
  font-size: 15px; font-weight: 600; color: var(--text);
  position: relative;
}
.day.available::after {
  content: ''; position: absolute; left: 50%; bottom: 5px;
  width: 5px; height: 5px; border-radius: 50%; background: var(--gold);
  transform: translateX(-50%);
}
.day.available:hover { background: var(--prun-soft); }
.day:disabled { color: #cfc4c9; font-weight: 400; cursor: default; }
.day.today { box-shadow: inset 0 0 0 1.5px rgba(142,44,90,.45); }
.day.selected { background: var(--prun); color: #fff; }
.day.selected::after { background: #fff; }

/* ------------------------------------------------ slots */
.slots-wrap { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 16px; }
.slots-wrap h3 { font-size: 15px; margin: 0 0 12px; }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.slot {
  padding: 12px 0; border-radius: 14px;
  border: 1.5px solid var(--line); background: #fff;
  font-weight: 600; font-size: 15px; color: var(--text);
  transition: all .12s;
}
.slot:hover { border-color: var(--prun); color: var(--prun); }
.slot.selected { background: var(--prun); border-color: var(--prun); color: #fff; }
.empty { color: var(--muted); font-size: 15px; padding: 8px 0; }

/* ------------------------------------------------ form */
.summary {
  background: var(--prun-soft); border-radius: 14px; padding: 14px 16px; margin-bottom: 16px;
  line-height: 1.55;
}
.summary .when { color: var(--prun); font-weight: 700; }
.summary.big { font-size: 16px; text-align: left; }
form { display: grid; gap: 14px; }
label { display: grid; gap: 6px; font-size: 14px; font-weight: 600; }
input, textarea {
  font: inherit; font-weight: 400; font-size: 16px;
  padding: 14px 16px; border-radius: 14px;
  border: 1.5px solid var(--line); background: #fbf9f8; color: var(--text);
  outline: none; transition: border-color .15s, box-shadow .15s;
}
input:focus, textarea:focus { border-color: var(--prun); box-shadow: 0 0 0 4px rgba(142,44,90,.12); background: #fff; }
textarea { resize: vertical; }
.btn {
  width: 100%; padding: 16px; border: 0; border-radius: 16px;
  background: linear-gradient(135deg, var(--prun), var(--prun-dark));
  color: #fff; font-weight: 700; font-size: 16px;
  box-shadow: 0 8px 20px rgba(142,44,90,.25);
  transition: transform .1s, opacity .15s;
}
.btn:active { transform: scale(.99); }
.btn:disabled { opacity: .6; cursor: default; }
.btn.ghost { background: transparent; color: var(--prun); box-shadow: none; border: 1.5px solid var(--line); }
.error { color: var(--danger); background: #fdecec; border-radius: 12px; padding: 10px 12px; margin: 0; font-size: 14px; }
.fine { font-size: 12px; color: var(--muted); margin: 0; text-align: center; }

/* ------------------------------------------------ done */
.done { text-align: center; }
.check {
  width: 72px; height: 72px; margin: 6px auto 12px; border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--gold), #b38a4c);
  color: #fff; font-size: 34px; font-weight: 700;
  animation: pop .45s cubic-bezier(.2,1.6,.4,1) both;
}
@keyframes pop { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }
.done h2 { font-family: 'Playfair Display', serif; font-size: 26px; margin: 0 0 14px; }
.actions { display: grid; gap: 10px; margin-top: 16px; }

/* ------------------------------------------------ misc */
.loading { display: grid; place-items: center; padding: 40px 0; }
.spinner {
  width: 30px; height: 30px; border-radius: 50%;
  border: 3px solid var(--prun-soft); border-top-color: var(--prun);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.footer { text-align: center; font-size: 12px; color: var(--muted); padding: 20px 16px 28px; }

@media (min-width: 640px) {
  .card { padding: 26px; }
  .hero { padding-top: 56px; }
}

.powered { display: inline-flex; flex-direction: column; align-items: center; gap: 6px; color: var(--muted); text-decoration: none; margin-bottom: 6px; }
.powered img { height: 40px; width: auto; opacity: .9; }
.powered:hover img { opacity: 1; }

/* ------------------------------------------------ landing */
.landing h2 { font-family: 'Playfair Display', serif; font-size: 24px; margin: 0 0 14px; text-align: center; }
.landing .features { list-style: none; padding: 0; margin: 0 0 20px; display: grid; gap: 10px; }
.landing .features li { background: var(--prun-soft); border-radius: 14px; padding: 12px 14px; font-weight: 500; }
.landing .btn { display: block; text-align: center; text-decoration: none; margin-bottom: 12px; }

/* ---------------- programarile clientului / anulare */
.bookings { display: grid; gap: 10px; }
.booking-item {
  border: 1.5px solid var(--line); border-radius: 16px; padding: 14px 16px;
  display: grid; gap: 4px; background: #fff;
}
.booking-item .bi-when { font-weight: 700; color: var(--prun); }
.booking-item .bi-service { font-weight: 600; }
.booking-item.is-cancelled { opacity: .65; }
.booking-item.is-cancelled .bi-when { text-decoration: line-through; color: var(--muted); }
.bi-status { font-size: 13px; font-weight: 600; }
.bi-status.cancelled { color: var(--danger); }
.bi-status.ok { color: #2e7d32; }
.bi-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.btn.small { width: auto; padding: 10px 16px; font-size: 14px; min-height: 0; }
.btn.danger { background: var(--danger); box-shadow: none; }
.btn.ghost.danger { background: transparent; color: var(--danger); border-color: #f3c7c7; }
.manage-link {
  text-align: left; background: var(--gold-soft); border-radius: 16px; padding: 14px 16px; margin: 16px 0 6px;
}
.manage-link .ml-title { font-weight: 700; margin-bottom: 4px; }
.manage-link p { margin: 0 0 10px; font-size: 14px; }
.ml-url {
  font-size: 13px; word-break: break-all; background: #fff; border-radius: 10px; padding: 8px 10px;
  border: 1px solid var(--line); margin-bottom: 10px; user-select: all;
}
.ml-actions { display: flex; flex-wrap: wrap; gap: 8px; }
a.btn { text-decoration: none; text-align: center; display: inline-block; }
a.btn:not(.small) { display: block; }
.directions { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); text-align: left; }
.dir-addr { font-weight: 600; margin-bottom: 10px; }
.staff-avatar {
  width: 40px; height: 40px; border-radius: 50%; flex: none; display: grid; place-items: center;
  color: #fff; font-weight: 700; font-size: 15px;
}
.staff-avatar.any { background: linear-gradient(135deg, #15A37F, #6EDBB8); font-size: 18px; }
/* serviciul ales + persoana: pe ecrane inguste trec pe randul urmator */
.chosen { flex-wrap: wrap; gap: 4px 12px; }
.chosen .muted { flex-basis: 100%; }
