/* ============================================================
   Welland Smiles — booking page + admin dashboard
   Built on the tokens in style.css
   ============================================================ */

.booking-page { background: #f6f9fc; }

/* ---------- header ---------- */
.booking-header { border-bottom: 1px solid var(--line); }
.booking-header .nav-bar { padding: 12px 22px; }
.booking-phone {
  color: var(--navy);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}
.booking-phone:hover { color: var(--blue); }

/* ---------- page head ---------- */
.booking-main { padding: 48px 0 72px; }
.booking-head { max-width: 660px; margin-bottom: 34px; }
.booking-head h1 {
  margin-bottom: 12px;
  color: var(--navy);
  font-size: clamp(1.9rem, 3.4vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -.02em;
}
.booking-head p { margin: 0; color: var(--slate); font-size: 15.5px; }

/* ---------- stepper ---------- */
.stepper {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 0 0 26px;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
.step {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 0;
  color: #8a9aa8;
  font-size: 13px;
  font-weight: 600;
}
.step::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  border-radius: 3px;
  background: #e2eaf1;
}
.step-dot {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  border: 1px solid #d7e2ec;
  border-radius: 50%;
  background: #fff;
  color: #8a9aa8;
  font-size: 12px;
  font-weight: 800;
}
.step.is-active { color: var(--navy); }
.step.is-active .step-dot { background: var(--blue); border-color: var(--blue); color: #fff; }
.step.is-active::after { background: var(--blue); }
.step.is-done { color: var(--navy); }
.step.is-done .step-dot { background: var(--navy); border-color: var(--navy); color: #fff; }
.step.is-done::after { background: var(--navy); }

/* ---------- layout ---------- */
.booking-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(280px, .75fr);
  gap: 26px;
  align-items: start;
}
.booking-panel {
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow-sm);
  min-height: 380px;
}
.booking-error {
  margin-bottom: 20px;
  padding: 13px 16px;
  border: 1px solid #f3c7c3;
  border-radius: 12px;
  background: #fdf1f0;
  color: #b23c33;
  font-size: 14px;
  font-weight: 600;
}
.booking-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 320px;
  color: var(--slate);
  font-size: 14px;
}
.spinner {
  width: 30px;
  height: 30px;
  border: 3px solid #dbe8f3;
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- panels ---------- */
.panel-head { margin-bottom: 22px; }
.panel-head h2 { margin-bottom: 6px; color: var(--navy); font-size: 21px; font-weight: 800; }
.panel-head p { margin: 0; color: var(--slate); font-size: 14px; }
.link-back {
  margin-top: 12px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--blue);
  font-size: 13.5px;
  font-weight: 700;
}
.link-back:hover { color: var(--blue-hover); text-decoration: underline; }

/* ---------- service choices ---------- */
.choice-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.choice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  text-align: left;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.choice:hover {
  transform: translateY(-2px);
  border-color: rgba(49, 140, 221, .45);
  box-shadow: 0 12px 26px rgba(12, 61, 93, .08);
}
.choice.is-selected { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(49, 140, 221, .14); }
.choice-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 10px;
  background: var(--blue-soft);
  color: var(--blue-hover);
  font-size: 13px;
  font-weight: 800;
}
.choice-text { display: flex; flex-direction: column; gap: 3px; }
.choice-name { color: var(--navy); font-size: 14px; font-weight: 700; line-height: 1.35; }
.choice-meta { color: var(--slate-light); font-size: 12px; }

/* ---------- providers ---------- */
.provider-list { display: flex; flex-direction: column; gap: 12px; }
.provider-card {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  text-align: left;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.provider-card:hover {
  transform: translateY(-2px);
  border-color: rgba(49, 140, 221, .45);
  box-shadow: 0 12px 26px rgba(12, 61, 93, .08);
}
.provider-avatar {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  border-radius: 50%;
  background: var(--blue-soft);
  color: var(--navy);
  font-size: 15px;
  font-weight: 800;
}
.provider-info { flex: 1 1 auto; }
.provider-info strong { display: block; color: var(--navy); font-size: 15px; }
.provider-info span { color: var(--slate); font-size: 13px; }
.provider-arrow { color: var(--blue); font-size: 18px; }

/* ---------- date strip ---------- */
.date-strip {
  display: flex;
  gap: 8px;
  padding: 4px 2px 14px;
  overflow-x: auto;
  scrollbar-width: thin;
}
.date-btn {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  width: 72px;
  padding: 11px 6px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
  color: var(--navy);
  transition: border-color .2s ease, background-color .2s ease, transform .2s ease;
}
.date-btn:hover:not(:disabled) { transform: translateY(-2px); border-color: rgba(49, 140, 221, .5); }
.date-btn .dow { color: var(--slate-light); font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.date-btn .dom { font-size: 18px; font-weight: 800; line-height: 1.2; }
.date-btn .mon { color: var(--slate-light); font-size: 10.5px; font-weight: 600; }
.date-btn .free { color: #2f9e7a; font-size: 10px; font-weight: 700; }
.date-btn.is-selected { border-color: var(--blue); background: var(--blue); color: #fff; }
.date-btn.is-selected .dow,
.date-btn.is-selected .mon,
.date-btn.is-selected .free { color: rgba(255, 255, 255, .82); }
.date-btn:disabled { opacity: .45; cursor: not-allowed; background: #f4f7fa; }

/* ---------- slots ---------- */
.slot-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 14px 0 12px;
}
.slot-head h3 { color: var(--navy); font-size: 15px; font-weight: 800; }
.slot-hint { color: var(--slate-light); font-size: 12.5px; }
.slot-area { min-height: 90px; }
.slot-group { margin-bottom: 16px; }
.slot-group h4 {
  margin-bottom: 8px;
  color: var(--slate-light);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.slot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 8px;
}
.slot {
  padding: 11px 8px;
  border: 1px solid #d9e5ef;
  border-radius: 10px;
  background: #fff;
  color: var(--navy);
  font-size: 13px;
  font-weight: 700;
  transition: border-color .2s ease, background-color .2s ease, color .2s ease;
}
.slot:hover { border-color: var(--blue); background: var(--blue-soft); }
.slot.is-selected { border-color: var(--blue); background: var(--blue); color: #fff; }
.slot-empty {
  padding: 26px;
  border: 1px dashed #cfdde8;
  border-radius: 14px;
  background: #f9fbfd;
  color: var(--slate);
  font-size: 14px;
  text-align: center;
}
.slot-empty a { color: var(--blue); font-weight: 700; }

/* ---------- form / review ---------- */
.booking-form .field { margin-bottom: 14px; }
.review {
  margin-bottom: 22px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--blue-soft-2);
}
.review h3 {
  margin-bottom: 10px;
  color: var(--navy);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.review-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 4px 0;
  color: var(--slate);
  font-size: 13.5px;
}
.review-row strong { color: var(--navy); text-align: right; font-weight: 700; }

/* ---------- confirmation ---------- */
.confirm-panel { text-align: center; padding: 12px 0 5px; }
.confirm-check {
  display: inline-grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin-bottom: 16px;
  border-radius: 50%;
  background: #e7f7ef;
  color: #1f9d63;
  font-size: 30px;
}
.confirm-panel h2 { margin-bottom: 8px; color: var(--navy); font-size: 24px; font-weight: 800; }
.confirm-lead { margin-bottom: 22px; color: var(--slate); font-size: 14.5px; }
.ref-box {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 26px;
  margin-bottom: 22px;
  border: 1px dashed #bcd6ea;
  border-radius: 14px;
  background: #f4faff;
}
.ref-box span { color: var(--slate-light); font-size: 10.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.ref-box strong { color: var(--navy); font-size: 20px; letter-spacing: .06em; }
.confirm-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  margin: 0 0 24px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--line);
  text-align: left;
}
.confirm-details > div { padding: 14px 16px; background: #fff; }
.confirm-details dt { color: var(--slate-light); font-size: 10.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.confirm-details dd { margin: 3px 0 0; color: var(--navy); font-size: 14px; font-weight: 700; }
.confirm-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.confirm-actions .btn { padding: 13px 20px; font-size: 13.5px; }
.confirm-note { margin: 18px 0 0; color: var(--slate-light); font-size: 12.5px; }
.confirm-note a { color: var(--blue); font-weight: 700; }

.btn-outline-navy {
  background: transparent;
  border-color: #c9d9e6;
  color: var(--navy);
}
.btn-outline-navy:hover { background: #eef6fc; border-color: var(--blue); color: var(--navy); }

/* ---------- summary ---------- */
.booking-summary {
  position: sticky;
  top: 24px;
  padding: 26px;
  border-radius: var(--radius-lg);
  background: var(--navy);
  color: #cfe4f3;
  box-shadow: var(--shadow-md);
}
.booking-summary h2 {
  margin-bottom: 16px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.summary-empty p { margin: 0; color: #a9c6da; font-size: 13.5px; line-height: 1.7; }
.summary-body { display: flex; flex-direction: column; gap: 10px; }
.summary-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 9px;
  border-bottom: 1px solid rgba(255, 255, 255, .1);
  font-size: 13px;
}
.summary-row span { color: #9fc0d6; }
.summary-row strong { color: #fff; text-align: right; font-weight: 700; }
.summary-foot { margin-top: 18px; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, .12); }
.summary-place { margin: 0 0 10px; color: #a9c6da; font-size: 12.5px; line-height: 1.7; }
.summary-place strong { color: #fff; }
.summary-help { margin: 0; color: #a9c6da; font-size: 12.5px; }
.summary-help a { color: #fff; font-weight: 700; }

/* ---------- footer ---------- */
.booking-footer { padding: 22px 0; border-top: 1px solid var(--line); background: #fff; }
.booking-footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.booking-footer p { margin: 0; color: var(--slate-light); font-size: 12.5px; }
.booking-footer a { color: var(--slate); text-decoration: none; }
.booking-footer a:hover { color: var(--blue); text-decoration: underline; }

/* ============================================================
   ADMIN DASHBOARD
   ============================================================ */
.admin-page { background: #f4f8fb; }
.admin-main { padding: 40px 0 70px; }
.admin-head { margin-bottom: 26px; }
.admin-head h1 { margin-bottom: 6px; color: var(--navy); font-size: 28px; font-weight: 800; }
.admin-head p { margin: 0; color: var(--slate); font-size: 14px; }

.admin-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 22px;
}
.stat-card {
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}
.stat-card span { display: block; color: var(--slate-light); font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.stat-card strong { color: var(--navy); font-size: 26px; font-weight: 800; line-height: 1.3; }

.admin-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
  padding: 18px;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}
.admin-toolbar .field { margin: 0; min-width: 150px; }
.admin-toolbar .field input,
.admin-toolbar .field select { margin-top: 4px; }
.admin-toolbar .btn { padding: 11px 18px; font-size: 13px; }

.admin-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}
.admin-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.admin-table th,
.admin-table td { padding: 13px 16px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.admin-table th {
  color: var(--slate-light);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  background: #fafcfe;
}
.admin-table tbody tr:last-child td { border-bottom: 0; }
.admin-table td strong { color: var(--navy); }
.admin-table small { display: block; color: var(--slate-light); font-size: 12px; }
.admin-empty { padding: 40px; text-align: center; color: var(--slate); font-size: 14px; }

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 700;
}
.badge-confirmed { background: #e8f4fd; color: #14679e; }
.badge-cancelled { background: #fdecea; color: #b23c33; }
.badge-completed { background: #e7f7ef; color: #1f9d63; }
.badge-no-show { background: #fff4e5; color: #a66a12; }

.row-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.mini-btn {
  padding: 5px 10px;
  border: 1px solid #d7e2ec;
  border-radius: 8px;
  background: #fff;
  color: var(--navy);
  font-size: 11.5px;
  font-weight: 700;
}
.mini-btn:hover { border-color: var(--blue); color: var(--blue); }
.mini-btn.danger:hover { border-color: #d9534f; color: #d9534f; }

.admin-block {
  margin-top: 22px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}
.admin-block h2 { margin-bottom: 12px; color: var(--navy); font-size: 16px; font-weight: 800; }
.admin-block form { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.admin-block .field { margin: 0; min-width: 160px; }
.admin-block .btn { padding: 11px 18px; font-size: 13px; }

@media screen and (max-width: 980px) {
  .booking-shell { grid-template-columns: 1fr; }
  .booking-summary { position: static; order: -1; }
  .admin-stats { grid-template-columns: 1fr 1fr; }
}

@media screen and (max-width: 640px) {
  .booking-main { padding: 28px 0 52px; }
  .booking-panel { padding: 20px; }
  .choice-grid { grid-template-columns: 1fr; }
  .stepper { grid-template-columns: repeat(4, auto); gap: 4px; }
  .step-label { display: none; }
  .step-dot { width: 28px; height: 28px; flex: 0 0 28px; }
  .date-btn { width: 64px; }
  .confirm-details { grid-template-columns: 1fr; }
  .slot-grid { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); }
  .booking-phone { display: none; }
  .admin-stats { grid-template-columns: 1fr 1fr; }
}
