/* ── Design tokens ──────────────────────────────────────────────────────────── */
:root {
  --primary:      #2b7a78;
  --primary-dark: #1d5c5a;
  --primary-light:#5fa8a6;
  --accent:       #17453f;
  --bg:           #f2f9f8;
  --bg-card:      #ffffff;
  --text:         #1c3232;
  --text-muted:   #5c8080;
  --border:       #c0dfde;
  --success:      #2d7a5c;
  --error:        #c0392b;
  --radius:       12px;
  --shadow:       0 4px 24px rgba(23, 69, 63, .10);
  --transition:   .22s ease;
}

/* ── Reset ──────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
}

/* ── Site banner ─────────────────────────────────────────────────────────────── */
#site-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(90deg, #1c3232 0%, #2b7a78 100%);
  color: #fff;
  font-size: .88rem;
  font-weight: 500;
  padding: 10px 48px 10px 20px;
  text-align: center;
  position: relative;
  line-height: 1.5;
}
.banner-close {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: rgba(255,255,255,.7);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 4px 6px;
  line-height: 1;
  border-radius: 4px;
  transition: color .15s;
}
.banner-close:hover { color: #fff; }

/* ── Header ─────────────────────────────────────────────────────────────────── */
header {
  background: linear-gradient(135deg, var(--accent) 0%, var(--primary) 100%);
  color: #fff;
  text-align: center;
  padding: 10px 20px 8px;
}

.header-logo-wrap {
  display: inline-block;
  margin-bottom: 8px;
}

.header-logo {
  height: 64px;
  width: auto;
  display: block;
  border-radius: 8px;
}

header p {
  opacity: .80;
  font-size: .82rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  margin-top: 2px;
  color: #fff;
}

/* ── Progress bar ───────────────────────────────────────────────────────────── */
.progress-bar {
  display: flex;
  justify-content: center;
  gap: 0;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding: 0 20px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.step-indicator {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  font-size: .82rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  border-bottom: 3px solid transparent;
  transition: var(--transition);
}
.step-indicator .num {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: .78rem;
  transition: var(--transition);
}
.step-indicator.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}
.step-indicator.active .num {
  background: var(--primary);
  color: #fff;
}
.step-indicator.done { color: var(--success); }
.step-indicator.done .num { background: var(--success); color: #fff; }

/* ── Main container ─────────────────────────────────────────────────────────── */
.container {
  max-width: 1060px;
  margin: 0 auto;
  padding: 28px 20px 60px;
}

/* ── Step panels ─────────────────────────────────────────────────────────────── */
.step-panel { display: none; animation: fadeIn .3s ease; }
.step-panel.active { display: block; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.step-title {
  font-family: 'Jost', sans-serif;
  font-size: 1.4rem;
  font-weight: 400;
  color: #1A1A1A;
  margin-bottom: 24px;
  padding: 0;
  text-align: left;
}
.step-title::before {
  display: none;
}

/* ── Step layout (text left, content right) ─────────────────────────────────── */
.step-layout {
  display: flex;
  gap: 40px;
  align-items: flex-start;
}
.step-layout .cal-hero-text {
  flex: 0 0 200px;
  padding-top: 30px;
}
.step-right {
  flex: 1;
  min-width: 0;
}
@media (max-width: 700px) {
  .step-layout { flex-direction: column; gap: 20px; align-items: stretch; }
  .step-layout .cal-hero-text { flex: none; text-align: center; padding-top: 0; }
  .step-right { width: 100%; }
  .floating-card { margin-left: 0; margin-right: 0; }
}

/* ── Floating card shared style ─────────────────────────────────────────────── */
.floating-card {
  background: #fff;
  border-radius: 20px;
  padding: 28px 24px;
  box-shadow:
    0 20px 60px rgba(0, 0, 0, .12),
    0 8px 24px rgba(0, 0, 0, .08),
    0 2px 6px rgba(0, 0, 0, .04);
  position: relative;
  margin-bottom: 24px;
}
.floating-card::after {
  content: '';
  position: absolute;
  bottom: -14px;
  left: 6%;
  right: 6%;
  height: 14px;
  background: radial-gradient(ellipse at center, rgba(0,0,0,.08) 0%, transparent 70%);
  filter: blur(8px);
}

/* ── Category accordion ──────────────────────────────────────────────────────── */
.category-list { display: flex; flex-direction: column; gap: 8px; }

.category-item {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color var(--transition);
}
.category-item.has-selection { border-color: var(--primary); }

.category-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  cursor: pointer;
  user-select: none;
  transition: background var(--transition);
}
.category-header:hover { background: #f0fafa; }
.category-header.open { background: #e8f6f5; }

.cat-left { display: flex; align-items: center; gap: 12px; }
.cat-icon { font-size: 1.3rem; }
.cat-name {
  font-weight: 700;
  font-size: .95rem;
  color: var(--accent);
}
.cat-count {
  font-size: .78rem;
  color: var(--text-muted);
  margin-left: 6px;
}
.cat-selected-badge {
  font-size: .75rem;
  background: var(--primary);
  color: #fff;
  padding: 2px 8px;
  border-radius: 12px;
  font-weight: 600;
  display: none;
}
.category-item.has-selection .cat-selected-badge { display: inline-block; }

.cat-chevron {
  color: var(--text-muted);
  font-size: .85rem;
  transition: transform var(--transition);
}
.category-header.open .cat-chevron { transform: rotate(180deg); }

/* ── Service rows inside accordion ──────────────────────────────────────────── */
.service-rows {
  display: none;
  border-top: 1px solid var(--border);
}
.service-rows.open { display: block; }

.service-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 18px;
  cursor: pointer;
  border-bottom: 1px solid #f0fafa;
  transition: background var(--transition);
  gap: 12px;
}
.service-row:last-child { border-bottom: none; }
.service-row:hover { background: #f6fdfb; }
.service-row.selected { background: #e6f5f4; }

.srow-name {
  font-size: .9rem;
  color: var(--text);
  font-weight: 500;
  flex: 1;
  min-width: 0;
}
.service-row.selected .srow-name { color: var(--primary); font-weight: 700; }

.srow-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.badge {
  font-size: .76rem;
  padding: 2px 9px;
  border-radius: 20px;
  font-weight: 600;
  white-space: nowrap;
}
.badge-price    { background: #e0f2f1; color: #1d5c5a; }
.badge-duration { background: #e8f4fd; color: #2563a8; }

.srow-check {
  width: 20px; height: 20px;
  border-radius: 50%;
  border: 2px solid var(--border);
  flex-shrink: 0;
  transition: var(--transition);
  display: flex; align-items: center; justify-content: center;
  font-size: .7rem; color: transparent;
}
.service-row.selected .srow-check {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* ── Date + slot picker ─────────────────────────────────────────────────────── */
/* ── Calendar two-column layout ─────────────────────────────────────────────── */
.cal-layout {
  display: flex;
  gap: 40px;
  align-items: flex-start;
  margin-bottom: 28px;
}

.cal-hero-text {
  flex: 0 0 280px;
  padding-top: 30px;
}

.cal-right {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.cal-hero-label {
  font-family: 'Jost', sans-serif;
  font-size: .82rem;
  font-weight: 400;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #2D8B7A;
  margin-bottom: 12px;
}
.cal-hero-title {
  font-family: 'Jost', sans-serif;
  font-size: 3rem;
  font-weight: 300;
  line-height: 1.1;
  color: #1A1A1A;
  margin: 0 0 16px;
}
.cal-hero-title em {
  font-style: italic;
  font-weight: 400;
  color: #2D8B7A;
}
.cal-hero-sub {
  font-family: 'Jost', sans-serif;
  font-size: 1.05rem;
  font-weight: 300;
  color: #7A7A7A;
  line-height: 1.6;
}

@media (max-width: 700px) {
  .cal-layout {
    flex-direction: column;
    gap: 24px;
    align-items: stretch;
  }
  .cal-layout .cal-hero-text { flex: none; text-align: center; padding-top: 0; }
  .cal-hero-title { font-size: 2.2rem; }
  .cal-right { width: 100%; }
}

/* ── Floating calendar card ────────────────────────────────────────────────── */
.cal-card {
  background: #fff;
  border-radius: 20px;
  padding: 28px 24px;
  box-shadow:
    0 20px 60px rgba(0, 0, 0, .12),
    0 8px 24px rgba(0, 0, 0, .08),
    0 2px 6px rgba(0, 0, 0, .04);
  position: relative;
}
.cal-card::after {
  content: '';
  position: absolute;
  bottom: -14px;
  left: 6%;
  right: 6%;
  height: 14px;
  background: radial-gradient(ellipse at center, rgba(0,0,0,.08) 0%, transparent 70%);
  filter: blur(8px);
}
@media (max-width: 700px) {
  .cal-card { width: 100%; }
}

.cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.cal-month-label {
  font-family: 'Jost', sans-serif;
  font-size: 1.2rem;
  font-weight: 600;
  color: #1A1A1A;
}
.cal-nav-group {
  display: flex;
  gap: 6px;
}
.cal-nav {
  width: 32px; height: 32px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  background: #fff;
  color: #4A4A4A;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
}
.cal-nav:hover { border-color: #2D8B7A; color: #2D8B7A; background: #F0F9F7; }
.cal-nav:disabled { opacity: .3; cursor: default; }

.cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-family: 'Jost', sans-serif;
  font-size: .72rem;
  font-weight: 600;
  color: #999;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid #f0f0f0;
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.cal-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-family: 'Jost', sans-serif;
  font-size: .88rem;
  font-weight: 500;
  cursor: pointer;
  transition: all .18s ease;
  border: none;
  color: #1A1A1A;
  background: #f5f5f3;
}
.cal-day:hover:not(.cal-day--disabled):not(.cal-day--empty) {
  background: #E6F4F1;
  color: #1E6558;
  transform: scale(1.08);
}
.cal-day--today {
  background: #E6F4F1;
  font-weight: 700;
  color: #2D8B7A;
}
.cal-day--selected {
  background: #2D8B7A !important;
  color: #fff !important;
  box-shadow: 0 4px 14px rgba(45,139,122,.4);
  transform: scale(1.08);
}
.cal-day--disabled {
  color: #ccc;
  cursor: default;
  background: transparent;
}
.cal-day--blocked {
  color: #d5d5d5;
  cursor: default;
  background: #fafafa;
  text-decoration: line-through;
}
.cal-day--empty {
  cursor: default;
  background: transparent;
}

/* ── Slots card (separate from calendar) ───────────────────────────────────── */
.cal-slots-card {
  background: #fff;
  border-radius: 20px;
  padding: 28px 24px;
  box-shadow:
    0 20px 60px rgba(0, 0, 0, .12),
    0 8px 24px rgba(0, 0, 0, .08),
    0 2px 6px rgba(0, 0, 0, .04);
  position: relative;
}
.cal-slots-card::after {
  content: '';
  position: absolute;
  bottom: -14px;
  left: 6%;
  right: 6%;
  height: 14px;
  background: radial-gradient(ellipse at center, rgba(0,0,0,.08) 0%, transparent 70%);
  filter: blur(8px);
}

.cal-date-label {
  font-family: 'Jost', sans-serif;
  font-size: .95rem;
  font-weight: 600;
  color: #1A1A1A;
  margin: 0 0 16px;
}
.cal-slots-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.slot-btn {
  padding: 10px 18px;
  border: 1.5px solid #e8e8e8;
  border-radius: 10px;
  background: #fff;
  color: #1A1A1A;
  font-family: 'Jost', sans-serif;
  font-size: .88rem;
  font-weight: 500;
  cursor: pointer;
  transition: all .18s ease;
  white-space: nowrap;
  min-width: 68px;
  text-align: center;
}
.slot-btn:hover {
  border-color: #2D8B7A;
  color: #1E6558;
  background: #F0F9F7;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(45,139,122,.15);
}
.slot-btn.selected {
  background: #2D8B7A;
  border-color: #2D8B7A;
  color: #fff;
  box-shadow: 0 4px 16px rgba(45,139,122,.35);
  transform: translateY(-2px);
}

.slots-placeholder {
  color: var(--text-muted);
  font-size: .88rem;
  font-style: italic;
}

/* ── Contact form ───────────────────────────────────────────────────────────── */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
@media(max-width: 560px) { .form-grid { grid-template-columns: 1fr; } }

.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group.full-width { grid-column: 1 / -1; }
.form-group label {
  font-family: 'Jost', sans-serif;
  font-size: .75rem;
  font-weight: 600;
  color: #999;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.form-group label .req { color: #2D8B7A; }

.form-group input,
.form-group textarea {
  padding: 14px 16px;
  border: 1.5px solid #e8e8e8;
  border-radius: 12px;
  font-size: .95rem;
  font-family: 'Jost', sans-serif;
  color: #1A1A1A;
  background: #f9f9f7;
  outline: none;
  transition: all .18s ease;
}
.form-group input:focus,
.form-group textarea:focus {
  border-color: #2D8B7A;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(45,139,122,.12);
}
.form-group input::placeholder,
.form-group textarea::placeholder {
  color: #bbb;
  font-weight: 300;
}
.form-group textarea { resize: vertical; min-height: 90px; }

/* ── Navigation buttons ─────────────────────────────────────────────────────── */
.nav-buttons {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 28px;
  gap: 12px;
}

.btn {
  padding: 14px 32px;
  border-radius: 12px;
  font-family: 'Jost', sans-serif;
  font-size: .95rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all .18s ease;
  letter-spacing: .02em;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn-primary { background: #2D8B7A; color: #fff; }
.btn-primary:hover:not(:disabled) {
  background: #1E6558;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(45,139,122,.35);
}
.btn-primary:disabled { opacity: .5; cursor: not-allowed; }
.btn-outline {
  background: transparent;
  color: #2D8B7A;
  border: 1.5px solid #2D8B7A;
}
.btn-outline:hover { background: #F0F9F7; transform: translateY(-2px); }

/* ── Summary card ───────────────────────────────────────────────────────────── */
.summary-card {
  background: #fff;
  border: none;
  border-radius: 16px;
  padding: 22px 24px;
  margin-bottom: 16px;
  box-shadow:
    0 8px 28px rgba(0, 0, 0, .08),
    0 2px 8px rgba(0, 0, 0, .04);
}
.summary-card h3 {
  font-family: 'Jost', sans-serif;
  font-size: .82rem;
  color: #1A1A1A;
  margin-bottom: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.summary-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid #f0f0f0;
  font-family: 'Jost', sans-serif;
  font-size: .9rem;
}
.summary-row:last-child { border-bottom: none; }
.summary-row .label { color: #999; font-weight: 400; }
.summary-row .value { font-weight: 600; text-align: right; color: #1A1A1A; }

/* ── TWINT payment box ──────────────────────────────────────────────────────── */
.twint-payment-box {
  background: linear-gradient(135deg, #e6f5f4 0%, #f2faf9 100%);
  border: 1.5px solid var(--primary-light);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
}

/* ── Success screen ─────────────────────────────────────────────────────────── */
.success-box {
  text-align: center;
  padding: 48px 24px;
  background: #fff;
  border-radius: 20px;
  box-shadow:
    0 20px 60px rgba(0, 0, 0, .12),
    0 8px 24px rgba(0, 0, 0, .08);
  max-width: 520px;
  margin: 0 auto;
}
.success-icon {
  width: 72px; height: 72px;
  background: linear-gradient(135deg, #2D8B7A, #1E6558);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem;
  color: #fff;
  margin: 0 auto 20px;
  box-shadow: 0 8px 24px rgba(45,139,122,.3);
}
.success-box h2 { font-family: 'Jost', sans-serif; font-size: 1.6rem; font-weight: 400; color: #1A1A1A; margin-bottom: 8px; }
.success-box p  { font-family: 'Jost', sans-serif; color: #7A7A7A; margin-bottom: 6px; }
.appointment-ref {
  display: inline-block;
  background: #e0f2f1;
  color: var(--accent);
  font-weight: 700;
  font-size: 1rem;
  padding: 6px 18px;
  border-radius: 20px;
  margin: 12px 0 24px;
}

/* ── Error / loading states ─────────────────────────────────────────────────── */
.error-msg {
  background: #fce8e8;
  color: var(--error);
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 16px;
  font-size: .9rem;
  display: none;
}
.loading-spinner {
  display: inline-block;
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Admin styles ───────────────────────────────────────────────────────────── */
.admin-header {
  background: linear-gradient(135deg, var(--accent), var(--primary));
  color: #fff;
  padding: 28px 32px;
}
.admin-header h1 { font-size: 1.5rem; }

.admin-container { max-width: 1100px; margin: 0 auto; padding: 28px 20px 60px; }

.stats-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.stat-card {
  flex: 1; min-width: 140px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  text-align: center;
}
.stat-card .count { font-size: 2rem; font-weight: 800; color: var(--primary); }
.stat-card .label { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); }

.filter-bar {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  flex-wrap: wrap;
  margin-bottom: 20px;
  background: var(--bg-card);
  padding: 16px 20px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.filter-bar label { font-size: .82rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; }
.filter-bar input[type="date"] { width: auto; }

.table-wrap { overflow-x: auto; border-radius: var(--radius); box-shadow: var(--shadow); }

table { width: 100%; border-collapse: collapse; background: var(--bg-card); }
th {
  background: #e6f5f4;
  color: var(--accent);
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: 12px 16px;
  text-align: left;
  font-weight: 700;
}
td { padding: 13px 16px; font-size: .9rem; border-bottom: 1px solid var(--border); }
tr:last-child td { border-bottom: none; }
tr:hover td { background: #f3fafa; }

.status-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: .76rem;
  font-weight: 700;
  text-transform: uppercase;
}
.status-confirmed  { background: #e0f2f1; color: var(--accent); }
.status-pending    { background: #fff3e0; color: #9a5e00; }
.status-cancelled  { background: #fce8e8; color: #c0392b; }

/* ── Responsive ─────────────────────────────────────────────────────────────── */
@media(max-width: 480px) {
  .progress-bar { padding: 0; }
  .step-indicator { padding: 12px 10px; font-size: .74rem; gap: 5px; }
  .nav-buttons { flex-direction: column-reverse; }
  .btn { width: 100%; justify-content: center; }
}
