/* =============================================
   BVetter — book-appointment.css
   Page: Book appointment — vet selection + 4-step form + history.
   Depends: variables.css (must load first in HTML)

   Path from public/html/[page].html:
     <link rel="stylesheet" href="../css/variables.css"/>
     <link rel="stylesheet" href="../css/book-appointment.css"/>

   All colors use CSS custom properties from variables.css.
   To change a color: edit variables.css only — not this file.
   ============================================= */

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

body {
  font-family: 'Manrope', sans-serif;
  background: var(--bg-page);
  color: var(--text-primary);
  overflow-x: hidden;
}


/* ── PAGE SYSTEM ─────────────────────────────── */
.page {
  display: none;
}

.page.active {
  display: block;
}

/* ── HERO CARD ───────────────────────────────── */
.hero-wrap {
  padding: 24px 40px 20px;
  background: var(--bg-page);
}

.hero {
  background: var(--gradient-hero);
  padding: 36px 44px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 190px;
  position: relative;
  overflow: hidden;
  border-radius: 18px;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50px;
  right: -50px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: rgba(17, 193, 37, 0.10);
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -30px;
  left: 32%;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  pointer-events: none;
}

.hero-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  color: var(--color-green);
  letter-spacing: 1.2px;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.hero h1 {
  font-size: 30px;
  font-weight: 900;
  color: #fff;
  line-height: 1.15;
  margin-bottom: 10px;
}

.hero p {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.65;
  max-width: 420px;
}

/* ── VET SECTION ─────────────────────────────── */
.vet-wrap {
  padding: 20px 40px 40px;
}

.vet-layout {
  display: grid;
  grid-template-columns: 220px 1fr 290px;
  gap: 16px;
  align-items: start;
}

.sidebar-label {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.sidebar-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.vet-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 10px;
  cursor: pointer;
  background: #fff;
  border: 1.5px solid var(--border-default);
  margin-bottom: 8px;
  transition: all 0.2s;
}

.vet-item.active {
  background: var(--color-green-light);
  border-color: var(--color-green);
}

.vet-thumb {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  background: #c8f0c8;
  flex-shrink: 0;
}

.vet-item-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
}

.vet-item-role {
  font-size: 10px;
  color: var(--text-muted);
}

/* Profile card */
.vet-profile-card {
  background: #fff;
  border-radius: 14px;
  border: 1px solid var(--border-default);
  overflow: hidden;
}

.vet-profile-header {
  padding: 24px 24px 20px;
  display: flex;
  align-items: flex-start;
  gap: 18px;
  border-bottom: 1px solid var(--border-light);
}

.vet-profile-img {
  width: 90px;
  height: 90px;
  border-radius: 12px;
  object-fit: cover;
  background: #e8f5e8;
  flex-shrink: 0;
}

.avatar-initials {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.vet-thumb.avatar-initials {
  background: #002A58;
  font-size: 13px;
}

.vet-profile-img.avatar-initials {
  background: #002A58;
  font-size: 28px;
}

.vet-profile-name {
  font-size: 20px;
  font-weight: 900;
  color: var(--color-navy);
  margin-bottom: 4px;
}

.vet-profile-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--color-green);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.vet-profile-clinic {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.vet-profile-rating {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
}

.info-icon {
  width: 14px;
  height: 14px;
  object-fit: contain;
  flex-shrink: 0;
}

.rating-num {
  font-weight: 800;
}

.rating-count {
  color: var(--text-muted);
  font-weight: 400;
}

.vet-stats-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid var(--border-light);
}

.vet-stat {
  padding: 16px 20px;
  text-align: center;
}

.vet-stat+.vet-stat {
  border-left: 1px solid var(--border-light);
}

.vet-stat-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.vet-stat-val {
  font-size: 18px;
  font-weight: 900;
  color: var(--color-navy);
}

.vet-profile-body {
  padding: 20px 24px;
}

.section-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.section-desc {
  font-size: 12px;
  color: var(--text-body);
  line-height: 1.65;
  margin-bottom: 12px;
}

.tag-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.edu-tag {
  padding: 5px 12px;
  background: var(--bg-page);
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-body);
}

.symptoms-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 18px;
}

.symptom-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-body);
  font-weight: 500;
}

.symptom-icon {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.symptom-icon img {
  width: 16px;
  height: 16px;
  object-fit: contain;
}

.feedback-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.see-all {
  font-size: 12px;
  font-weight: 700;
  color: var(--color-green-dark);
  text-decoration: none;
}

.feedback-card {
  background: var(--bg-input);
  border-radius: 10px;
  padding: 14px;
  border: 1px solid var(--border-default);
}

.feedback-user {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.feedback-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #ddd;
  flex-shrink: 0;
}

.feedback-user-info {
  flex: 1;
}

.feedback-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
}

.feedback-pet {
  font-size: 10px;
  color: var(--text-muted);
}

.feedback-stars {
  display: flex;
  gap: 2px;
}

.star-sm {
  width: 12px;
  height: 12px;
  object-fit: contain;
}

.feedback-text {
  font-size: 11px;
  color: var(--text-body);
  line-height: 1.6;
  font-style: italic;
}

.reviews-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.reviews-modal-overlay.active {
  display: flex;
}

.reviews-modal {
  background: var(--bg-card, #fff);
  border-radius: 12px;
  width: min(480px, 92vw);
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.reviews-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 1px solid var(--border-default);
}

.reviews-modal-close {
  background: none;
  border: none;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  color: var(--text-muted);
}

.reviews-modal-list {
  padding: 14px 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Calendar */
.vet-calendar-card {
  background: #fff;
  border-radius: 14px;
  border: 1px solid var(--border-default);
  padding: 20px;
}

.cal-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 14px;
}

.cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.cal-month {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
}

.cal-nav {
  display: flex;
  gap: 6px;
}

.cal-btn {
  width: 26px;
  height: 26px;
  border: 1.5px solid var(--border-default);
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
}

.cal-btn img {
  width: 12px;
  height: 12px;
  object-fit: contain;
}

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

.cal-day-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  text-align: center;
  padding: 4px 0;
}

.cal-day {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-body);
  text-align: center;
  padding: 6px 0;
  border-radius: 6px;
  cursor: pointer;
}

.cal-day:hover {
  background: var(--bg-page);
}

.cal-day.today {
  background: var(--color-navy);
  color: #fff;
  border-radius: 6px;
}

.hours-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.hours-legend {
  display: flex;
  gap: 12px;
  margin-bottom: 10px;
}

.legend-label {
  font-size: 10px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.legend-dot.na {
  background: var(--border-default);
}

.legend-dot.av {
  background: var(--color-green);
}

.time-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
  margin-bottom: 16px;
}

.time-slot {
  padding: 8px 6px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  border: 1.5px solid var(--border-default);
  background: var(--bg-page);
  color: var(--text-muted);
}

.time-slot.available {
  background: #fff;
  border-color: var(--color-green);
  color: var(--color-green-dark);
  cursor: pointer;
}

.time-slot.available:hover {
  background: var(--color-green-pale);
}

.time-slot.selected {
  background: var(--color-green-dark);
  border-color: var(--color-green-dark);
  color: #fff;
}

.time-slot.na {
  background: var(--bg-page);
  color: #C0C0C0;
  border-color: var(--border-default);
  cursor: not-allowed;
}

.btn-book {
  width: 100%;
  padding: 13px;
  background: var(--color-navy);
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 800;
  font-family: 'Manrope', sans-serif;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.2s;
}

.btn-book:hover {
  background: var(--color-navy-mid);
}

.btn-icon {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

/* History strip */
.history-section {
  margin-top: 20px;
}

.history-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.history-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--color-navy);
}

.view-all {
  font-size: 12px;
  margin-right: 10px;
  font-weight: 700;
  color: var(--color-green-dark);
  text-decoration: none;
}

.view-all:hover {
  text-decoration: underline;
}

.history-card {
  background: #EEF6FF;
  border-radius: 12px;
  padding: 18px 22px;
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px solid #D0E8FF;
  justify-content: space-between; /* ← add this */

}

.csp-status-card {
  background: var(--color-yellow-light, #FFF8E1);
  border: 1px solid var(--color-yellow, #F2B807);
  border-radius: 12px;
  padding: 18px 22px;
  margin-bottom: 16px;
}

.csp-status-card.is-hidden {
  display: none;
}

.csp-status-title {
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 8px;
}

.csp-status-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  padding: 2px 0;
  color: var(--text-muted);
}

.csp-status-row .csp-status-val {
  font-weight: 600;
  color: var(--text-dark, #1a1a1a);
}

.history-icon {
  width: 42px;
  height: 42px;
  background: var(--color-navy);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.history-icon img {
  width: 20px;
  height: 20px;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.history-name {
  font-size: 14px;
  font-weight: 800;
  color: var(--color-navy);
}

.history-meta {
  font-size: 11px;
  color: #5a7a9a;
  font-weight: 500;
}

.btn-rate {
  font-size: 12px;
  font-weight: 700;
  color: var(--color-navy);
  background: none;
  border: 1.5px solid var(--color-navy);
  border-radius: 8px;
  padding: 7px 16px;
  cursor: pointer;
  font-family: 'Manrope', sans-serif;
  white-space: nowrap;
  transition: all 0.2s;
}

.btn-rate:hover {
  background: var(--color-navy);
  color: #fff;
}

/* ══════════════════════════════════════════════
   BOOKING STEPS PAGE
══════════════════════════════════════════════ */
.booking-page {
  padding: 32px 40px 60px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 20px;
  cursor: pointer;
  text-decoration: none;
}

.back-link:hover {
  color: var(--color-navy);
}

.back-icon {
  width: 14px;
  height: 14px;
  object-fit: contain;
}

.booking-header {
  text-align: center;
  margin-bottom: 28px;
}

.booking-title {
  font-size: 28px;
  font-weight: 900;
  color: var(--color-navy);
}

.booking-sub {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

.stepper {
  display: flex;
  align-items: flex-start;
  /* align tops so label doesn't push circles */
  justify-content: center;
  margin-bottom: 36px;
}

.step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  width: 100px;
  /* fixed width so labels don't shift layout */
}

/* The connecting line sits between step-items and must be vertically
   centred to the circle's midpoint (circle height = 42px → half = 21px).
   We use align-self + margin-bottom to push it up by the label gap.     */
.step-line {
  flex-shrink: 0;
  width: 170px;
  margin: 0 -40px;
  height: 2px;
  background: var(--border-default);
  align-self: flex-start;
  margin-top: 21px;
  /* half of circle height = vertically centred */
  transition: background 0.3s;
}

.step-line.done {
  background: var(--color-green);
}

.step-circle {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 800;
  border: 2px solid var(--border-default);
  background: #fff;
  color: var(--text-muted);
  transition: all 0.25s;
  flex-shrink: 0;
  z-index: 2;
}

.step-circle.active {
  background: var(--color-green);
  border-color: var(--color-green);
  color: #fff;
}

.step-circle.done {
  background: var(--color-green);
  border-color: var(--color-green);
  color: #fff;
}

.step-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  text-align: center;
}

.step-label.active {
  color: var(--text-primary);
  font-weight: 800;
}

/* Form card */
.form-card {
  background: #fff;
  border-radius: 16px;
  border: 1.5px solid #c0c1c4;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.06);

  padding: 28px 32px;
  max-width: 620px;
  margin: 0 auto;
}

.form-card.wide {
  max-width: 620px;
}

.form-card-title {
  font-size: 22px;
  font-weight: 900;
  color: var(--text-primary);
  margin-bottom: 20px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group.full {
  grid-column: 1 / -1;
}

.form-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-body);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.form-input {
  padding: 11px 14px;
  border: 1.5px solid var(--border-default);
  border-radius: 8px;
  font-size: 13px;
  font-family: 'Manrope', sans-serif;
  color: var(--text-primary);
  background: var(--bg-input);
  outline: none;
  width: 100%;
  transition: border-color 0.2s;
}

.form-input:focus {
  border-color: var(--color-navy);
  background: #fff;
}

.form-input::placeholder {
  color: #c0c4cc;
  font-style: italic;
}

.field-hint {
  font-size: 10px;
  color: var(--text-muted);
}

.field-row {
  display: flex;
  gap: 8px;
}

.field-row .form-input {
  flex: 1 1 auto;
  min-width: 0;
}

.field-row select.form-input {
  flex: 0 0 108px;
  cursor: pointer;
}

.field-warning.is-hidden {
  display: none;
}

.form-group.is-hidden,
.form-row-2.is-hidden,
.success-card.is-hidden {
  display: none;
}

.csp-success-block {
  text-align: left;
  margin-top: 16px;
}

.csp-success-footnote {
  margin-top: 16px;
}

.field-warning {
  display: block;
  margin-top: 6px;
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 600;
  color: var(--color-yellow);
  background: var(--color-yellow-light);
  border-radius: 6px;
}

.field-error-msg {
  font-size: 10px;
  font-weight: 600;
  color: #d92d20;
}

.form-group.has-error .form-input,
.form-group.has-error .form-select,
.form-group.has-error .form-textarea {
  border-color: #d92d20;
}

.form-group.has-error .slot-grid {
  outline: 1.5px solid #d92d20;
  outline-offset: 4px;
  border-radius: 8px;
}

.select-wrap {
  position: relative;
}

.form-select {
  width: 100%;
  padding: 11px 34px 11px 14px;
  border: 1.5px solid var(--border-default);
  border-radius: 8px;
  font-size: 13px;
  font-family: 'Manrope', sans-serif;
  color: var(--text-primary);
  background: var(--bg-input);
  outline: none;
  appearance: none;
  cursor: pointer;
  transition: border-color 0.2s;
}

.form-select:focus {
  border-color: var(--color-navy);
}

.sel-icon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  object-fit: contain;
  pointer-events: none;
}

/* Step 3 */
.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.slot-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 6px;
}

.slot-btn {
  padding: 9px 8px;
  border: 1.5px solid var(--border-default);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  font-family: 'Manrope', sans-serif;
  background: #fff;
  color: var(--text-body);
  cursor: pointer;
  text-align: center;
  transition: all 0.15s;
}

.slot-btn:hover {
  border-color: var(--color-navy);
  color: var(--color-navy);
}

.slot-btn.selected {
  background: var(--color-navy);
  border-color: var(--color-navy);
  color: #fff;
}

.slot-btn.unavailable {
  background: var(--bg-page);
  border-color: var(--border-default);
  color: #C0C0C0;
  cursor: not-allowed;
  text-decoration: line-through;
  pointer-events: none;
}

.slot-btn.unavailable:hover {
  border-color: var(--border-default);
  color: #C0C0C0;
}

.form-textarea {
  width: 100%;
  min-height: 108px;
  padding: 11px 14px;
  border: 1.5px solid var(--border-default);
  border-radius: 8px;
  font-size: 13px;
  font-family: 'Manrope', sans-serif;
  color: var(--text-primary);
  background: var(--bg-input);
  outline: none;
  resize: vertical;
  transition: border-color 0.2s;
}

.form-textarea:focus {
  border-color: var(--color-navy);
}

.form-textarea::placeholder {
  color: var(--text-faint);
}

/* Step 4 Review */
.review-intro {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 20px;
  margin-top: -10px;
}

.review-section-label {
  font-size: 10px;
  font-weight: 800;
  color: var(--color-green-dark);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.review-block {
  background: var(--bg-page);
  border-radius: 10px;
  padding: 14px 18px;
  margin-bottom: 14px;
}

.review-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 0;
}

.review-key {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

.review-val {
  font-size: 12px;
  font-weight: 800;
  color: var(--text-primary);
  text-align: right;
}

/* Step 5 Success */
.success-card {
  background: linear-gradient(145deg, #e8fce8, var(--color-green-pale));
  border-radius: 16px;
  border: 1px solid #c8eec8;
  padding: 40px 32px;
  text-align: center;
  max-width: 500px;
  margin: 0 auto;
}

.success-icon {
  width: 90px;
  height: 90px;
  background: transparent;   /* remove green circle */
  border-radius: 0;         /* no circle */
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.success-icon img {
  width: 90px;
  height: 90px;
  object-fit: contain;
}

.success-title {
  font-size: 26px;
  font-weight: 900;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.success-desc {
  font-size: 13px;
  color: var(--text-body);
  line-height: 1.65;
  margin-bottom: 24px;
}

.success-ref {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  border-radius: 8px;
  padding: 12px 16px;
  border: 1px solid var(--border-default);
}

.ref-label {
  font-size: 12px;
  color: var(--text-muted);
}

.ref-val {
  font-size: 13px;
  font-weight: 800;
  color: var(--color-navy);
}

.success-btns {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 28px;
}

/* Nav buttons (shared) */
.step-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 24px;
}

.btn-back-step {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  background: #fff;
  border: 1.5px solid #d0d2d6;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  font-family: 'Manrope', sans-serif;
  color: var(--text-body);
  cursor: pointer;
  transition: border-color 0.2s;
}

.btn-back-step:hover {
  border-color: var(--text-body);
}

.btn-next-step {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 26px;
  background: linear-gradient(135deg, var(--color-navy-mid), #001B3D);
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  font-family: 'Manrope', sans-serif;
  color: #fff;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-next-step:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 42, 88, 0.25);
}

.btn-next-step.green {
  background: var(--color-green);
}

.btn-next-step.green:hover {
  background: var(--color-green);
}

.btn-icon-sm {
  width: 14px;
  height: 14px;
  object-fit: contain;
}


/* ══════════════════════════════════════════════
   HISTORY PAGE — matches Figma exactly
══════════════════════════════════════════════ */

/* Hero: navy left panel + green right panel side by side */
.hist-hero {
  display: grid;
  grid-template-columns: 1fr 340px;
  padding: 0 !important;
  min-height: 170px;
  border-radius: 18px;
  overflow: hidden;
  align-items: stretch;
  background: var(--gradient-hero);
}

.hist-hero .hero-left {
  padding: 32px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hist-hero-art {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 20px;
}

/* Body layout: main list LEFT, green stat card RIGHT */
.hist-body {
  padding: 24px 40px 60px;
}

.hist-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 20px;
  align-items: start;
}

/* ── Past Appointments header ── */
.past-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.past-title {
  font-size: 20px;
  font-weight: 900;
  color: var(--text-primary);
}

.past-filters {
  display: flex;
  gap: 8px;
}

.filter-pill {
  padding: 6px 18px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  font-family: 'Manrope', sans-serif;
  background: #fff;
  border: 1.5px solid var(--border-default);
  color: var(--text-body);
  cursor: pointer;
  transition: all 0.2s;
}

.filter-pill.active {
  background: var(--color-navy);
  border-color: var(--color-navy);
  color: #fff;
}

/* ── Appointment list ── */
.appt-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.appt-row {
  border-radius: 12px;
  padding: 18px 24px;
  display: grid;
  grid-template-columns: 1.2fr 1.4fr 1fr auto;
  align-items: center;
  gap: 16px;
  background: #ffffff;
  border: 1px solid #E2E8F0;
  border-left: 3px solid #CBD5E1;
  transition: box-shadow 0.15s;
}

.appt-row:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.07);
}

.appt-pending   { border-left-color: #FBBF24; }
.appt-completed { border-left-color: #10B981; }
.appt-cancelled { border-left-color: #F87171; }

.appt-col-label {
  font-size: 9px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.8px;
  text-transform: uppercase;
  margin-bottom: 5px;
}

.appt-pet-name    { font-size: 15px; font-weight: 800; color: var(--text-primary); }
.appt-pet-meta    { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.appt-service-name{ font-size: 14px; font-weight: 700; color: var(--text-primary); }
.appt-doctor      { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.appt-date-val    { font-size: 14px; font-weight: 700; color: var(--text-primary); }
.appt-time-val    { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

.appt-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

/* ── Status badges ── */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 13px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
  background: currentColor;
}

.s-pending {
  background: #FFFBEB;
  color: #92400E;
  border: 1px solid #FDE68A;
}

.s-completed {
  background: #ECFDF5;
  color: #065F46;
  border: 1px solid #6EE7B7;
}

.s-cancelled {
  background: #FEF2F2;
  color: #991B1B;
  border: 1px solid #FECACA;
}

/* ── Rate & Review button — navy, matches Figma ── */
.btn-rate-review {
  padding: 9px 18px;
  background: var(--color-navy);
  border: none;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  font-family: 'Manrope', sans-serif;
  color: #fff;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
}

.btn-rate-review:hover { background: var(--color-navy-mid); }

/* ── Rated badge — star + score ── */
.rated-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  background: #fffbe6;
  border: 1px solid #e8d870;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  color: #9a6800;
}

.star-xs {
  width: 12px;
  height: 12px;
  object-fit: contain;
}

/* ── Health stat card — white with green accent ── */
.health-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 28px 24px;
  border: 1px solid #E2E8F0;
  border-top: 3px solid #10B981;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-self: start;
}

.health-label {
  font-size: 10px;
  font-weight: 700;
  color: #64748B;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.health-num {
  font-size: 56px;
  font-weight: 900;
  color: #0F172A;
  line-height: 1;
  margin: 4px 0;
  letter-spacing: -2px;
}

.health-desc {
  font-size: 15px;
  font-weight: 700;
  color: #1E293B;
}

.health-ontime {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #047857;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #F1F5F9;
}

.ontime-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: #047857;
}

/* ── Back button ── */
.hist-back-wrap { margin-top: 24px; }

/* ── SPLIT BOOKING HEADER ── */
.booking-top {
  display: flex;
  align-items: stretch;
  border-radius: 16px;
  max-width: 800px;           
  overflow: hidden;
  border: 1px solid var(--border-default);
  margin: 24px 40px 28px;
}

.booking-top-left {
  background: var(--color-navy);
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 220px;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
  gap: 20px;
}

.booking-top-left::before {
  content: '';
  position: absolute;
  bottom: -20px;
  left: -20px;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: rgba(17, 193, 37, 0.12);
  pointer-events: none;
}

.back-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.75);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  padding: 6px 14px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
  width: fit-content;
}

.back-pill:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
}

.vet-booked-preview {
  display: flex;
  align-items: center;
  gap: 10px;
}

.vet-booked-initials {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--color-green);
  border: 2px solid rgba(255, 255, 255, 0.25);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  color: #ffffff;
}

.vet-booked-name {
  font-size: 11px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.3;
}

.vet-booked-role {
  font-size: 9px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.booking-top-right {
  background: #ffffff;
  flex: 1;
  padding: 24px 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.booking-eyebrow {
  font-size: 9px;
  font-weight: 800;
  color: var(--color-green);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.booking-title-new {
  font-size: 20px;
  font-weight: 900;
  color: var(--color-navy);
  margin-bottom: 2px;
}

.booking-sub-new {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

/* Stepper inside header */
.header-stepper {
  display: flex;
  align-items: center;
}

.hstep-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}

.hstep-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  flex-shrink: 0;
  transition: all 0.25s;
  z-index: 2;
}

.hstep-dot.done   { background: var(--color-green); color: #ffffff; }
.hstep-dot.active { background: var(--color-navy); color: #ffffff; box-shadow: 0 0 0 3px rgba(0, 42, 88, 0.12); }
.hstep-dot.todo   { background: var(--bg-page); color: var(--text-faint); border: 1.5px solid var(--border-default); }

.hstep-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-faint);
  white-space: nowrap;
}

.hstep-label.active { color: var(--color-navy); font-weight: 800; }
.hstep-label.done   { color: var(--color-green-dark); }

.hstep-bar {
  flex: 1;
  height: 2px;
  background: var(--border-default);
  margin: 0 -20px;
  margin-bottom: 15px;
  transition: background 0.3s;
}

.hstep-bar.done { background: var(--color-green); }

/* Booking form wrap below the header card */
.booking-form-wrap {
  padding: 0 40px 60px;
}

/* ── BOOKING HEADER WIDTH FIX ── */
.booking-top {
  margin: 24px auto 28px;
  max-width: 860px;
  border-radius: 16px;
}

.booking-top-left {
  min-width: 200px;
  max-width: 200px;
  padding: 22px 24px;
}

.booking-top-right {
  padding: 20px 28px;
}

/* ── STEPPER SIZE + SPACING FIX ── */
.header-stepper {
  margin-top: 14px;
}
.cal-day.disabled {
  color: #999;
  background: #f3f3f3;
  cursor: not-allowed;
  pointer-events: none; /* Prevent clicks */
  opacity: 0.6;
}

.hstep-col {
  gap: 6px;
}

.hstep-dot {
  width: 34px;
  height: 34px;
  font-size: 13px;
}

.hstep-label {
  font-size: 11px;
  font-weight: 600;
}

.hstep-bar {
  margin-bottom: 20px;
}

.booking-eyebrow {
  margin-bottom: 3px;
}

.booking-title-new {
  font-size: 22px;
  margin-bottom: 3px;
}

.booking-sub-new {
  font-size: 12px;
  margin-bottom: 0;
}

/* ── FORM CARD WIDTH MATCHES HEADER ── */
.booking-form-wrap {
  padding: 0;
  max-width: 860px;
  margin: 0 auto;
  padding-bottom: 60px;
}

.form-card,
.form-card.wide {
  max-width: 100%;
  border-radius: 16px;
  margin: 0;
}

/* ── BOOKING PAGE NO SIDE PADDING ── */
.booking-page {
  padding: 0 40px 0;
}

/* =============================================
   RESPONSIVE — see public/css/variables.css for
   the shared breakpoint scale used across all pages.
   ============================================= */

/* ── Tablet: 481px – 1024px ─────────────────── */
@media (max-width: 1024px) {
  .hero-wrap { padding: 20px 24px 16px; }

  .hero { padding: 28px 28px 32px; }

  .vet-wrap { padding: 16px 24px 32px; }

  .vet-layout { grid-template-columns: 1fr; }

  .hist-hero { grid-template-columns: 1fr; min-height: auto; }

  .hist-hero-art { padding: 0 20px 20px; justify-content: flex-start; }

  .hist-body { padding: 20px 24px 40px; }

  .hist-layout { grid-template-columns: 1fr; }

  .health-card { margin-top: 4px; }

  .booking-page { padding: 0 24px 0; }

  .booking-top { flex-direction: column; max-width: 100%; margin: 20px 0 24px; }

  .booking-top-left {
    min-width: 0;
    max-width: 100%;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .booking-top-right { padding: 20px 24px; }

  .booking-form-wrap { padding: 0 24px 60px; }

  .form-card { padding: 24px; }
}

/* ── Mobile: up to 480px ─────────────────────── */
@media (max-width: 480px) {
  .hero-wrap { padding: 16px 16px 12px; }

  .hero { padding: 24px 20px 28px; min-height: 0; flex-wrap: wrap; }

  .hero h1 { font-size: 22px; }

  .vet-wrap { padding: 12px 16px 28px; }

  .vet-profile-header { flex-direction: column; padding: 20px; gap: 12px; }

  .vet-profile-img { width: 72px; height: 72px; }

  .vet-stat { padding: 12px 8px; }

  .vet-stat-val { font-size: 15px; }

  .symptoms-grid { grid-template-columns: 1fr; }

  .vet-profile-body { padding: 16px; }

  .hist-hero-art { display: none; }

  .hist-hero .hero-left { padding: 24px 20px; }

  .hist-body { padding: 16px 16px 32px; }

  .past-header { flex-direction: column; align-items: flex-start; gap: 10px; }

  .past-title { font-size: 17px; }

  /* Appointment rows reflow into stacked cards instead of a squeezed row */
  .appt-row {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 16px;
  }

  .appt-actions {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    width: 100%;
  }

  .booking-top-left {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 18px 20px;
  }

  .booking-top-right { padding: 18px 20px; }

  .hstep-dot { width: 26px; height: 26px; font-size: 10px; }

  .hstep-label {
    font-size: 9px;
    white-space: normal;
    max-width: 50px;
    text-align: center;
  }

  .hstep-bar { margin: 0 -6px; margin-bottom: 12px; }

  .booking-form-wrap { padding: 0 16px 40px; }

  .form-card { padding: 20px 18px; }

  .form-card-title { font-size: 18px; }

  .form-grid { grid-template-columns: 1fr; }

  .form-row-2 { grid-template-columns: 1fr; }

  .step-nav { flex-wrap: wrap; gap: 10px; }

  .btn-next-step, .btn-back-step { width: 100%; justify-content: center; }

  .success-card { padding: 28px 20px; }

  .success-btns { flex-direction: column; }
}

/* =============================================
   RATE & REVIEW MODAL
   ============================================= */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 999;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-overlay.open {
  display: flex !important;
}

.modal-box {
  background: #ffffff;
  border-radius: 16px;
  width: 100%;
  max-width: 740px;
  max-height: 92vh;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.rating-modal-box {
  max-width: 420px;
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--border-default);
  flex-shrink: 0;
}

.modal-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 2px;
  line-height: 1.2;
}

.modal-subtitle {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.4;
}

.modal-close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  flex-shrink: 0;
}

.close-icon-img {
  width: 16px;
  height: 16px;
  object-fit: contain;
}

.rating-body {
  padding: 28px 24px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.rating-stars {
  display: flex;
  gap: 8px;
}

.rating-star {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  transition: transform 0.15s ease;
}

.rating-star:hover {
  transform: scale(1.14);
}

.rating-star img {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.rating-hint {
  font-size: 13px;
  font-weight: 700;
  color: var(--color-navy);
  margin: 8px 0 18px;
  min-height: 18px;
}

.rating-body .form-group {
  width: 100%;
  margin-top: 4px;
}

.rating-error {
  font-size: 12px;
  color: var(--color-red);
  font-weight: 600;
  margin: 10px 0 2px;
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 20px;
  border-top: 1px solid var(--border-default);
  gap: 12px;
  flex-shrink: 0;
  background: #ffffff;
}

.btn-cancel {
  padding: 10px 22px;
  background: #ffffff;
  border: 1.5px solid var(--border-default);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  font-family: 'Manrope', sans-serif;
  color: var(--text-body);
  cursor: pointer;
  transition: border-color 0.2s;
}

.btn-cancel:hover {
  border-color: var(--text-body);
}

.btn-submit {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  background: var(--color-navy);
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  font-family: 'Manrope', sans-serif;
  color: #ffffff;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-submit:hover {
  background: var(--color-navy-mid);
}

@media (max-width: 480px) {
  .rating-star img { width: 28px; height: 28px; }
  .modal-footer { flex-direction: column-reverse; }
  .modal-footer .btn-cancel,
  .modal-footer .btn-submit { width: 100%; justify-content: center; }
}