/* =====================================================================
   pages/booking.css — checkout, booking success, reports, prescription
   ===================================================================== */

.demo-note {
  margin-top: var(--sp-4);
}

.req {
  color: var(--danger);
}

.field-help {
  font-size: var(--fs-xs);
  color: var(--muted);
}

.input.is-invalid,
.select.is-invalid {
  border-color: var(--danger);
  box-shadow: 0 0 0 4px rgba(225, 29, 72, 0.1);
}

.field-error:empty {
  display: none;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--sp-4);
}

.field--full {
  grid-column: 1 / -1;
}

@media (max-width: 560px) {
  .form-grid { grid-template-columns: 1fr; }
}

.input-prefix {
  display: flex;
  align-items: stretch;
}

.input-prefix span {
  display: grid;
  place-items: center;
  padding: 0 14px;
  border: 1.5px solid var(--border-strong);
  border-right: 0;
  border-radius: var(--r-md) 0 0 var(--r-md);
  background: var(--surface-2);
  font-weight: 700;
  color: var(--text-2);
}

.input-prefix .input {
  border-radius: 0 var(--r-md) var(--r-md) 0;
}

/* =====================================================================
   CHECKOUT
   ===================================================================== */
.checkout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: var(--sp-6);
  align-items: start;
}

@media (max-width: 1023px) {
  .checkout { grid-template-columns: 1fr; }
}

.checkout__aside {
  position: sticky;
  top: 90px;
}

@media (max-width: 1023px) {
  .checkout__aside { position: static; }
}

/* Stepper */
.stepper {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-bottom: var(--sp-6);
}

.stepper__line {
  position: absolute;
  top: 22px;
  left: 16.66%;
  right: 16.66%;
  height: 3px;
  border-radius: 3px;
  background: var(--border);
}

.stepper__line span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--grad-brand);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.6s var(--ease-out);
}

.stepper__item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--muted);
  text-align: center;
}

.stepper__item span {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--border);
  transition: all 0.4s var(--ease-out);
}

.stepper__item svg {
  width: 20px;
  height: 20px;
}

.stepper__item.is-active {
  color: var(--text);
}

.stepper__item.is-active span {
  border-color: transparent;
  background: var(--grad-brand);
  color: #fff;
  box-shadow: var(--sh-glow);
  transform: scale(1.08);
}

.stepper__item.is-done span {
  border-color: var(--success);
  background: var(--success);
  color: #fff;
}

/* Steps */
.step {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
  display: grid;
  gap: var(--sp-5);
}

.step__title {
  float: left;
  width: 100%;
  margin-bottom: var(--sp-2);
  padding: 0;
  font-family: var(--font-head);
  font-size: var(--fs-xl);
  font-weight: 800;
}

.step__hint {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 12px 14px;
  border-radius: var(--r-md);
  background: var(--primary-50);
  color: var(--primary-700);
  font-size: var(--fs-sm);
  font-weight: 600;
}

.step__hint svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 1px;
}

.step .detail-card > h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: var(--sp-4);
  font-size: var(--fs-base);
}

.step .detail-card > h3 svg {
  width: 20px;
  height: 20px;
  color: var(--primary);
}

.step__nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--sp-3);
  flex-wrap: wrap;
  padding-top: var(--sp-2);
}

/* Patients */
.patients {
  display: grid;
  gap: var(--sp-4);
}

.patient {
  padding: var(--sp-5);
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--sh-xs);
  overflow: hidden;
}

.patient__head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: var(--sp-4);
}

.patient__title {
  flex: 1;
}

.patient__avatar {
  width: 40px;
  height: 40px;
}

.patient__avatar svg {
  width: 20px;
  height: 20px;
}

.add-patient {
  justify-self: start;
  border-style: dashed;
}

/* Segmented control */
.segmented {
  display: inline-flex;
  padding: 4px;
  border-radius: var(--r-pill);
  background: var(--surface-2);
  border: 1px solid var(--border);
}

.segmented input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.segmented span {
  display: block;
  padding: 8px 18px;
  border-radius: var(--r-pill);
  font-weight: 700;
  font-size: var(--fs-sm);
  color: var(--text-2);
  cursor: pointer;
  transition: all var(--dur-fast);
}

.segmented input:checked + span {
  background: var(--surface);
  color: var(--primary);
  box-shadow: var(--sh-sm);
}

.segmented input:focus-visible + span {
  outline: 3px solid var(--primary-100);
}

/* Choice cards (collection type, payment) */
.choice-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: var(--sp-3);
}

.choice input,
.centre input,
.date-chip input,
.slot input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.choice__box {
  position: relative;
  display: grid;
  gap: 4px;
  height: 100%;
  padding: var(--sp-4) var(--sp-5);
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 2px solid var(--border);
  cursor: pointer;
  transition: border-color var(--dur), box-shadow var(--dur), transform var(--dur) var(--ease-out);
}

.choice__box:hover {
  transform: translateY(-2px);
}

.choice__box small {
  color: var(--muted);
}

.choice__icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 6px;
  border-radius: 14px;
  background: var(--primary-50);
  color: var(--primary);
}

.choice input:checked + .choice__box {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-100);
}

.choice input:checked + .choice__box::after {
  content: "✓";
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}

.choice input:focus-visible + .choice__box {
  outline: 3px solid var(--primary-100);
}

.choice.is-disabled .choice__box {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

/* Centres */
.centre-list {
  display: grid;
  gap: 10px;
}

.centre__box {
  display: grid;
  gap: 2px;
  padding: 14px 16px;
  border-radius: var(--r-md);
  border: 2px solid var(--border);
  cursor: pointer;
  transition: border-color var(--dur), background-color var(--dur);
}

.centre__box small {
  color: var(--muted);
}

.centre__hours {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.centre__hours svg {
  width: 13px;
  height: 13px;
}

.centre input:checked + .centre__box {
  border-color: var(--primary);
  background: var(--primary-50);
}

/* Pincode status */
.pin-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--muted);
}

.pin-status:empty {
  display: none;
}

.pin-status.is-ok {
  color: var(--success);
}

.pin-status.is-bad {
  color: var(--danger);
}

.pin-status .spinner {
  width: 14px;
  height: 14px;
  border-width: 2px;
}

/* Dates */
.date-strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-width: thin;
}

.date-chip span {
  display: grid;
  justify-items: center;
  min-width: 76px;
  padding: 10px 8px;
  border-radius: var(--r-md);
  border: 2px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  transition: all var(--dur-fast);
}

.date-chip small {
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--muted);
}

.date-chip strong {
  font-family: var(--font-head);
  font-size: 1.4rem;
  line-height: 1.2;
}

.date-chip input:checked + span {
  border-color: transparent;
  background: var(--grad-brand);
  color: #fff;
  box-shadow: var(--sh-glow);
}

.date-chip input:checked + span small {
  color: rgba(255, 255, 255, 0.85);
}

.date-chip input:focus-visible + span {
  outline: 3px solid var(--primary-100);
}

/* Slots */
.slots {
  display: grid;
  gap: var(--sp-4);
}

.slots__loading {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.slots__loading .skeleton {
  height: 48px;
}

.slot-group__title {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  font-size: var(--fs-xs);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.slot-group__title svg {
  width: 16px;
  height: 16px;
  color: var(--cta);
}

.slot-group__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px;
}

.slot span {
  display: grid;
  justify-items: center;
  gap: 2px;
  padding: 10px 8px;
  border-radius: var(--r-md);
  border: 1.5px solid var(--border);
  background: var(--surface);
  font-size: var(--fs-sm);
  font-weight: 700;
  text-align: center;
  cursor: pointer;
  transition: all var(--dur-fast);
}

.slot span:hover {
  border-color: var(--primary);
}

.slot small {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
}

.slot__few {
  color: var(--cta-600) !important;
}

.slot input:checked + span {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
  box-shadow: var(--sh-glow);
}

.slot input:checked + span small {
  color: rgba(255, 255, 255, 0.9) !important;
}

.slot input:focus-visible + span {
  outline: 3px solid var(--primary-100);
}

.slot.is-off span {
  opacity: 0.45;
  cursor: not-allowed;
  text-decoration: line-through;
  border-style: dashed;
}

/* Review */
.review {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: var(--sp-4);
}

.review__block {
  padding: var(--sp-5);
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--border);
}

.review__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--sp-3);
}

.review__head h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--fs-base);
}

.review__head h3 svg {
  width: 18px;
  height: 18px;
  color: var(--primary);
}

.review__list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.review__list li {
  display: flex;
  align-items: center;
  gap: 10px;
}

.review__list .avatar {
  width: 38px;
  height: 38px;
}

.review__list small {
  display: block;
  color: var(--muted);
}

.review__meta,
.review__when {
  margin-top: var(--sp-3);
  color: var(--text-2);
  font-size: var(--fs-sm);
}

.review__when {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 12px;
  border-radius: var(--r-sm);
  background: var(--primary-50);
  color: var(--primary-700);
  font-weight: 700;
}

.review__when svg {
  width: 18px;
  height: 18px;
}

.terms {
  font-size: var(--fs-xs);
  color: var(--muted);
}

.terms a {
  color: var(--primary);
  font-weight: 600;
}

/* Summary items */
.summary-items {
  display: grid;
  gap: 8px;
  margin: 0 0 var(--sp-4);
  padding: 0 0 var(--sp-4);
  border-bottom: 1px dashed var(--border);
  list-style: none;
}

.summary-items li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: var(--fs-sm);
}

.summary-items span {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.summary-items svg {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  color: var(--primary);
}

/* =====================================================================
   BOOKING SUCCESS
   ===================================================================== */
.success-hero {
  position: relative;
  overflow: hidden;
  padding-block: var(--sp-7) var(--sp-6);
  text-align: center;
  background: #f7f9fc;
  isolation: isolate;
}

.success-hero canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.success-check {
  width: 110px;
  height: 110px;
  margin: 0 auto var(--sp-5);
}

.success-check circle {
  fill: none;
  stroke: var(--success);
  stroke-width: 4;
  stroke-dasharray: 340;
  stroke-dashoffset: 340;
  animation: draw 0.8s var(--ease-out) 0.2s forwards;
}

.success-check path {
  fill: none;
  stroke: var(--success);
  stroke-width: 6;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 80;
  stroke-dashoffset: 80;
  animation: draw 0.5s var(--ease-out) 0.9s forwards;
}

.success-check .success-check__bg {
  fill: rgba(22, 163, 74, 0.1);
  stroke: none;
  animation: none;
  transform-origin: center;
  animation: pop 0.6s var(--ease-spring) 0.1s both;
}

@keyframes pop {
  from { transform: scale(0); }
}

.success-hero h1 {
  font-size: var(--fs-2xl);
}

.booking-id {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: var(--sp-5);
  padding: 10px 12px 10px 18px;
  border-radius: var(--r-pill);
  background: var(--surface);
  border: 1px dashed var(--primary);
  box-shadow: var(--sh-sm);
  font-family: var(--font-head);
  font-weight: 800;
  letter-spacing: 0.05em;
}

.booking-id small {
  font-family: var(--font-body);
  font-weight: 600;
  letter-spacing: 0;
  color: var(--muted);
}

/* WhatsApp confirmation call-to-action */
.wa-confirm {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 18px;
  max-width: 680px;
  margin: var(--sp-6) auto 0;
  padding: 18px 20px;
  border-radius: var(--r-lg);
  background: #effcf3;
  border: 1.5px solid rgba(37, 211, 102, 0.45);
  box-shadow: 0 16px 40px -18px rgba(37, 211, 102, 0.55);
  text-align: left;
}

.wa-confirm > div {
  flex: 1 1 260px;
}

.wa-confirm strong {
  display: block;
  font-family: var(--font-head);
}

.wa-confirm small {
  color: var(--text-2);
}

.wa-confirm__icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: #25d366;
  color: #fff;
}

.wa-confirm__icon svg {
  width: 26px;
  height: 26px;
}

.btn--wa {
  --btn-bg: #25d366;
  --btn-color: #fff;
  --btn-border: transparent;
}

.btn--wa:hover {
  box-shadow: 0 10px 30px -8px rgba(37, 211, 102, 0.7);
}

.btn--wa svg {
  width: 20px;
  height: 20px;
}

.success-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: var(--sp-5);
  align-items: start;
}

@media (max-width: 900px) {
  .success-grid { grid-template-columns: 1fr; }
}

.info-list {
  display: grid;
  gap: 14px;
  margin: 0;
}

.info-list > div {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 10px;
}

@media (max-width: 480px) {
  .info-list > div { grid-template-columns: 1fr; gap: 2px; }
}

.info-list dt {
  color: var(--muted);
  font-weight: 600;
}

.info-list dd {
  margin: 0;
  font-weight: 600;
}

/* Vertical timeline */
.timeline {
  position: relative;
  display: grid;
  gap: var(--sp-5);
  margin: 0;
  padding: 0 0 0 4px;
  list-style: none;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: 23px;
  width: 2px;
  background: linear-gradient(var(--primary), var(--accent));
  opacity: 0.35;
}

.timeline li {
  position: relative;
  display: flex;
  gap: 14px;
}

.timeline__icon {
  position: relative;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--primary-100);
  color: var(--primary);
}

.timeline__icon svg {
  width: 18px;
  height: 18px;
}

.timeline strong {
  display: block;
}

.timeline small {
  color: var(--muted);
}

/* =====================================================================
   REPORTS
   ===================================================================== */
.report-page { padding-top: var(--sp-6); }

/* One split card: brand panel on the left, the form on the right */
.report-shell {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  max-width: 1080px;
  margin: 0 auto;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--sh-lg);
  overflow: hidden;
}

@media (max-width: 900px) {
  .report-shell { grid-template-columns: 1fr; }
  /* Phones: the form comes first, the explainer panel below it */
  .report-main { order: -1; }
}

.report-aside {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
  padding: clamp(1.75rem, 1.2rem + 2vw, 2.75rem);
  /* Darker than --grad-brand so white text stays readable (contrast ≥ 5:1 everywhere) */
  background: linear-gradient(155deg, #0b3a8c 0%, #0a55c8 55%, #0b7a70 100%);
  color: #fff;
  overflow: hidden;
  isolation: isolate;
}

/* Soft rings in the corner for depth */
.report-aside::before,
.report-aside::after {
  content: "";
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.report-aside::before { width: 340px; height: 340px; right: -150px; bottom: -150px; }
.report-aside::after { width: 220px; height: 220px; right: -90px; bottom: -90px; background: rgba(255, 255, 255, 0.06); }

.report-aside__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.report-aside__eyebrow svg { width: 15px; height: 15px; }

.report-aside h2 {
  color: #fff;
  font-size: var(--fs-xl);
  line-height: 1.2;
}

.report-aside > p {
  margin-top: calc(-1 * var(--sp-3));
  color: rgba(255, 255, 255, 0.95);
  line-height: 1.6;
}

.report-steps {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.report-steps li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.report-steps li > span {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #fff;
  color: var(--primary);
  font-weight: 800;
  font-size: var(--fs-sm);
}

.report-steps strong { display: block; line-height: 1.3; }
.report-steps small { display: block; margin-top: 2px; color: rgba(255, 255, 255, 0.92); font-size: var(--fs-sm); line-height: 1.45; }

.report-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.report-trust li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.18);
  font-size: var(--fs-sm);
  font-weight: 600;
}

.report-trust svg { width: 14px; height: 14px; }

.report-help {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px 12px;
  align-items: center;
  margin-top: auto;
  padding: 14px;
  border-radius: var(--r-md);
  background: rgba(4, 22, 60, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.report-help__icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: #fff;
  color: var(--primary);
}

.report-help__icon svg { width: 20px; height: 20px; }
.report-help strong { display: block; font-size: var(--fs-base); }
.report-help small { display: block; margin-top: 2px; color: rgba(255, 255, 255, 0.95); font-size: var(--fs-sm); line-height: 1.45; }
.report-help .btn { grid-column: 1 / -1; justify-self: start; }
.report-help .btn svg { width: 16px; height: 16px; }

.report-main {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding: clamp(1.75rem, 1.2rem + 2vw, 2.75rem);
}

.report-step__head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: var(--sp-5);
  padding-bottom: var(--sp-4);
  border-bottom: 1px solid var(--border);
}

.report-step__head .card-icon { margin: 0; width: 52px; height: 52px; border-radius: 16px; flex-shrink: 0; }
.report-step__head .card-icon svg { width: 24px; height: 24px; }
.report-step__head h2 { font-size: var(--fs-lg); line-height: 1.25; }
.report-step__head p { margin: 2px 0 0; color: var(--muted); font-size: var(--fs-sm); }

/* Status + report cards inside the panel */
.report-main #stepResult .detail-card { box-shadow: none; }

.report-form {
  display: grid;
  gap: var(--sp-4);
}

.recent-booking {
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: var(--sp-4);
}

.recent-booking > span {
  flex: 1;
}

.otp-inputs {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.otp-inputs input {
  width: 52px;
  height: 60px;
  border-radius: var(--r-md);
  border: 2px solid var(--border-strong);
  background: var(--surface);
  text-align: center;
  font-family: var(--font-head);
  font-size: 1.6rem;
  font-weight: 800;
  transition: border-color var(--dur), box-shadow var(--dur), transform var(--dur) var(--ease-spring);
}

.otp-inputs input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-100);
  transform: translateY(-2px);
}

.otp-inputs input.is-filled {
  border-color: var(--primary);
}

@media (max-width: 400px) {
  .otp-inputs { gap: 6px; }
  .otp-inputs input { width: 44px; height: 54px; }
}

.otp-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-size: var(--fs-sm);
  color: var(--muted);
}

.otp-meta button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 700;
  color: var(--primary);
}

.otp-meta button:disabled {
  color: var(--muted);
  cursor: not-allowed;
}

.dev-otp {
  font-size: var(--fs-sm);
}

/* Status tracker (horizontal) */
.tracker {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: var(--sp-5) 0;
}

.tracker::before {
  content: "";
  position: absolute;
  top: 21px;
  left: 12.5%;
  right: 12.5%;
  height: 3px;
  background: var(--border);
}

.tracker__fill {
  position: absolute;
  top: 21px;
  left: 12.5%;
  height: 3px;
  background: var(--grad-brand);
  transform-origin: left;
}

.tracker__step {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 8px;
  text-align: center;
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--muted);
}

.tracker__step span {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--border);
}

.tracker__step svg {
  width: 18px;
  height: 18px;
}

.tracker__step.is-done span {
  border-color: var(--success);
  background: var(--success);
  color: #fff;
}

.tracker__step.is-current {
  color: var(--text);
}

.tracker__step.is-current span {
  border-color: transparent;
  background: var(--grad-brand);
  color: #fff;
  box-shadow: var(--sh-glow);
  animation: pulse-ring 2s infinite;
}

.report-files {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.report-files li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
}

.report-files li > div {
  flex: 1;
  min-width: 0;
}

.report-files small {
  display: block;
  color: var(--muted);
}

/* =====================================================================
   PRESCRIPTION UPLOAD
   ===================================================================== */
.rx-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: var(--sp-6);
  align-items: start;
}

@media (max-width: 900px) {
  .rx-layout { grid-template-columns: 1fr; }
}

.dropzone {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: var(--sp-6) var(--sp-5);
  border-radius: var(--r-lg);
  border: 2px dashed var(--border-strong);
  background: var(--surface-2);
  text-align: center;
  cursor: pointer;
  transition: border-color var(--dur), background-color var(--dur), transform var(--dur) var(--ease-out);
}

.dropzone:hover,
.dropzone.is-over {
  border-color: var(--primary);
  background: var(--primary-50);
}

.dropzone.is-over {
  transform: scale(1.01);
}

.dropzone input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.dropzone__icon {
  display: grid;
  place-items: center;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: var(--grad-brand);
  color: #fff;
  box-shadow: var(--sh-glow);
  animation: float 4s var(--ease-in-out) infinite;
}

.dropzone__icon svg {
  width: 30px;
  height: 30px;
}

.dropzone small {
  color: var(--muted);
}

.file-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: var(--surface);
}

.file-preview img {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  object-fit: cover;
}

.file-preview__pdf {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 10px;
  background: rgba(225, 29, 72, 0.1);
  color: var(--danger);
}

.file-preview > div {
  flex: 1;
  min-width: 0;
}

.file-preview strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-preview small {
  color: var(--muted);
}

.upload-progress {
  height: 6px;
  border-radius: 6px;
  background: var(--border);
  overflow: hidden;
}

.upload-progress span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--grad-brand);
  transition: width 0.2s linear;
}
