/* ── Page layout ─────────────────────────────────────────────────────────── */
.page {
  min-height: 100vh;
  background: linear-gradient(160deg, var(--sage-50) 0%, #f0f7e8 50%, var(--white) 100%);
  display: flex;
  flex-direction: column;
  font-family: var(--font-body);
}

/* ── Header ──────────────────────────────────────────────────────────────── */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 32px;
  background: rgba(255,255,255,0.8);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--sage-100);
  position: sticky;
  top: 0;
  z-index: 50;
}
.logo { display: flex; align-items: center; gap: 8px; text-decoration: none; }
.logoLeaf { font-size: 1.25rem; }
.logoText { font-family: var(--font-display); font-size: 1.125rem; font-weight: 700; color: var(--sage-500); }

/* ── Hero Search ─────────────────────────────────────────────────────────── */
.hero {
  text-align: center;
  padding: 64px 24px 48px;
  max-width: 640px;
  margin: 0 auto;
  width: 100%;
}
.heroBadge {
  display: inline-block;
  background: var(--sage-100);
  color: var(--sage-500);
  font-size: 0.8125rem;
  font-weight: 700;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  margin-bottom: 16px;
  letter-spacing: 0.04em;
}
.heroTitle {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  color: var(--sage-500);
  margin-bottom: 12px;
  line-height: 1.2;
}
.heroSub { color: var(--sage-400); font-size: 1rem; margin-bottom: 32px; }

/* Search form */
.searchForm { width: 100%; }
.searchWrap {
  display: flex;
  align-items: center;
  background: var(--white);
  border: 2px solid var(--sage-200);
  border-radius: var(--radius-xl);
  padding: 6px 6px 6px 16px;
  box-shadow: 0 4px 24px rgba(113,131,85,0.12);
  gap: 8px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.searchWrap:focus-within {
  border-color: var(--sage-400);
  box-shadow: 0 4px 32px rgba(113,131,85,0.2);
}
.searchIcon { color: var(--sage-300); flex-shrink: 0; }
.searchInput {
  flex: 1;
  border: none;
  outline: none;
  font-size: 1rem;
  font-family: var(--font-body);
  font-weight: 600;
  color: var(--text-dark);
  background: transparent;
  letter-spacing: 0.04em;
  min-width: 0;
}
.searchInput::placeholder { font-weight: 400; color: var(--sage-300); letter-spacing: 0; }
.searchBtn {
  background: var(--sage-500);
  color: white;
  border: none;
  border-radius: var(--radius-lg);
  padding: 10px 24px;
  font-size: 0.9375rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}
.searchBtn:hover:not(:disabled) { background: var(--sage-400); }
.searchBtn:active { transform: scale(0.97); }
.searchBtn:disabled { opacity: 0.5; cursor: not-allowed; }

.errorBox {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #dc2626;
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-size: 0.875rem;
  margin-top: 12px;
  text-align: left;
}
.hint { color: var(--sage-300); font-size: 0.8125rem; margin-top: 12px; }

/* Spinner */
.spinnerSm {
  display: inline-block;
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Result section ──────────────────────────────────────────────────────── */
.result {
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
  padding: 0 24px 64px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Toast */
.toast {
  position: fixed;
  top: 76px;
  right: 24px;
  z-index: 999;
  background: var(--sage-500);
  color: white;
  padding: 12px 20px;
  border-radius: var(--radius-lg);
  font-size: 0.875rem;
  font-weight: 600;
  box-shadow: 0 8px 32px rgba(113,131,85,0.35);
  animation: slideInRight 0.3s ease, fadeOut 0.5s 3.5s forwards;
}
@keyframes slideInRight { from { transform: translateX(110%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes fadeOut { to { opacity: 0; transform: translateX(20px); } }

/* Status card */
.statusCard {
  background: var(--white);
  border: 2px solid var(--sage-300);
  border-radius: var(--radius-xl);
  padding: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.06);
  flex-wrap: wrap;
}
.statusCard[data-status="PENDING"]     { border-color: var(--sage-300); }
.statusCard[data-status="CONFIRMED"]   { border-color: var(--sage-400); }
.statusCard[data-status="ASSIGNED"]    { border-color: var(--sage-400); }
.statusCard[data-status="ON_THE_WAY"]  { border-color: #f59e0b; }
.statusCard[data-status="IN_PROGRESS"] { border-color: var(--sage-500); }
.statusCard[data-status="COMPLETED"]   { border-color: #22c55e; }
.statusCard[data-status="CANCELLED"]   { border-color: #dc2626; }
.statusLeft { display: flex; align-items: center; gap: 16px; flex: 1; }
.statusEmoji { font-size: 2.5rem; flex-shrink: 0; }
.statusLabel { font-family: var(--font-display); font-size: 1.25rem; font-weight: 800; color: var(--text-dark); margin-bottom: 4px; }
.statusDesc { font-size: 0.875rem; color: var(--sage-400); max-width: 360px; }
.statusRight { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex-shrink: 0; }
.bookingCode { font-family: monospace; font-size: 0.875rem; font-weight: 700; color: var(--sage-400); background: var(--sage-50); padding: 4px 10px; border-radius: var(--radius-md); }
.lastUpdatedText { font-size: 0.75rem; color: var(--sage-300); display: flex; align-items: center; gap: 6px; }
.liveChip { display: flex; align-items: center; gap: 4px; background: var(--sage-50); border: 1px solid var(--sage-200); border-radius: var(--radius-full); padding: 2px 8px; }
.liveDot { width: 6px; height: 6px; border-radius: 50%; background: #22c55e; animation: pulse 2s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.3; } }
.refreshBtn { background: none; border: 1px solid var(--sage-100); border-radius: var(--radius-md); padding: 6px; cursor: pointer; color: var(--sage-300); display: flex; transition: all 0.2s; }
.refreshBtn:hover { background: var(--sage-50); color: var(--sage-500); }

/* Timeline */
.timelineCard {
  background: var(--white);
  border: 1px solid var(--sage-100);
  border-radius: var(--radius-xl);
  padding: 28px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}
.sectionTitle { font-family: var(--font-display); font-size: 1.0625rem; font-weight: 700; color: var(--text-dark); margin-bottom: 24px; }

.timeline { display: flex; flex-direction: column; }
.step { display: flex; gap: 16px; }
.stepLeft { display: flex; flex-direction: column; align-items: center; flex-shrink: 0; }
.stepDot { width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.stepLine { width: 2px; flex: 1; min-height: 24px; background: var(--sage-100); margin: 4px 0; }
.stepLineDone { background: var(--sage-400); }

.stepDone .stepDot { color: var(--sage-500); }
.stepActive .stepDot { color: var(--sage-500); }
.stepFuture .stepDot { color: var(--sage-200); }

.activePulse {
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--sage-500);
  box-shadow: 0 0 0 4px var(--sage-100);
  animation: activePulse 1.5s infinite;
}
@keyframes activePulse { 0%,100% { box-shadow: 0 0 0 4px var(--sage-100); } 50% { box-shadow: 0 0 0 8px var(--sage-50); } }

.stepContent { padding-bottom: 24px; flex: 1; }
.stepTitle {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 2px;
}
.stepFuture .stepTitle { color: var(--sage-300); }
.stepDesc { font-size: 0.8125rem; color: var(--sage-400); margin-top: 4px; }
.stepTime { font-size: 0.75rem; color: var(--sage-300); margin-top: 4px; }

/* Cancelled */
.cancelledCard {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: var(--radius-xl);
  padding: 40px;
  text-align: center;
}
.cancelledIcon { font-size: 3rem; margin-bottom: 12px; }
.cancelledTitle { font-family: var(--font-display); font-size: 1.25rem; font-weight: 700; color: #dc2626; margin-bottom: 8px; }
.cancelledSub { color: #9ca3af; font-size: 0.875rem; margin-bottom: 20px; }

/* Info grid */
.infoGrid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 20px; align-items: start; }

/* Info card */
.infoCard, .payCard, .reviewCard {
  background: var(--white);
  border: 1px solid var(--sage-100);
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}
.cardTitle {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Service */
.serviceBlock { margin-bottom: 16px; display: flex; flex-direction: column; gap: 10px; }
.serviceRow { display: flex; align-items: center; gap: 12px; background: var(--sage-50); border-radius: var(--radius-md); padding: 10px 12px; }
.serviceEmoji { font-size: 1.5rem; flex-shrink: 0; }

.serviceName { font-size: 0.9375rem; font-weight: 600; color: var(--text-dark); }
.serviceMeta { font-size: 0.8rem; color: var(--sage-400); display: flex; align-items: center; gap: 4px; margin-top: 2px; }

/* Detail rows */
.divider { height: 1px; background: var(--sage-100); margin: 16px 0; }
.detailRow { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 14px; }
.detailIcon { color: var(--sage-400); margin-top: 2px; flex-shrink: 0; }
.detailLabel { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--sage-300); margin-bottom: 2px; font-weight: 600; }
.detailValue { font-size: 0.9rem; color: var(--text-dark); font-weight: 500; }
.detailSub { font-size: 0.8rem; color: var(--sage-400); }
.notesBox { background: var(--sage-50); border-radius: var(--radius-md); padding: 12px; margin-top: 8px; }
.notesText { font-size: 0.875rem; color: var(--sage-400); margin-top: 4px; font-style: italic; }

/* Payment card */
.payAmount { font-family: var(--font-display); font-size: 2rem; font-weight: 800; color: var(--sage-500); margin-bottom: 10px; }
.payStatus { margin-bottom: 8px; }
.payMeta { font-size: 0.8rem; color: var(--sage-400); margin-bottom: 4px; }
.payExpiry { font-size: 0.8rem; color: #f59e0b; font-weight: 600; margin-bottom: 12px; background: #fffbeb; border: 1px solid #fde68a; border-radius: var(--radius-md); padding: 6px 10px; }

/* QR */
.qrBox { margin: 12px 0; }
.qrToggle {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--sage-50);
  border: 1px solid var(--sage-200);
  color: var(--sage-500);
  font-size: 0.875rem;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  cursor: pointer;
  width: 100%;
  justify-content: center;
  transition: background 0.2s;
}
.qrToggle:hover { background: var(--sage-100); }
.chevronDown { transition: transform 0.2s; }
.chevronUp { transform: rotate(90deg); transition: transform 0.2s; }
.qrPanel { margin-top: 12px; display: flex; justify-content: center; }
.qrImage { max-width: 180px; border-radius: var(--radius-md); border: 2px solid var(--sage-100); }
.qrPlaceholder { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 20px; background: var(--sage-50); border-radius: var(--radius-lg); border: 2px dashed var(--sage-200); }
.qrGrid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 3px; width: 80px; }
.qrCell { width: 14px; height: 14px; border-radius: 2px; background: var(--sage-100); }
.qrDark { background: var(--sage-500); }
.qrLabel { font-weight: 700; font-size: 0.875rem; color: var(--sage-500); }
.qrSub { font-size: 0.75rem; color: var(--sage-400); text-align: center; }

/* Pay rows */
.payRows { display: flex; flex-direction: column; gap: 8px; }
.payRow { display: flex; justify-content: space-between; font-size: 0.875rem; color: var(--sage-400); }
.payRowDiscount { color: var(--success); font-weight: 600; }
.payRowBold { font-weight: 700; color: var(--text-dark); border-top: 1px solid var(--sage-100); padding-top: 8px; margin-top: 4px; font-size: 0.9375rem; }

/* WhatsApp */
.waBox { margin-top: 16px; }
.waBtn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #25D366;
  color: white;
  border-radius: var(--radius-lg);
  padding: 10px;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s;
  width: 100%;
}
.waBtn:hover { background: #1ebe5d; }

/* Review card */
.reviewCard {
  text-align: center;
  background: linear-gradient(135deg, var(--sage-50), var(--white));
  border: 1px solid var(--sage-200);
}
.stars { font-size: 1.75rem; margin-bottom: 8px; }
.starFilled { color: var(--sage-500); }
.starEmpty { color: var(--sage-200); }
.reviewText { font-size: 0.9375rem; color: var(--sage-400); font-style: italic; margin-bottom: 12px; }
.reviewPrompt { color: var(--sage-400); font-size: 0.9rem; margin-bottom: 16px; }

/* Empty state */
.emptySection {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  text-align: center;
}
.emptyIllustration { font-size: 4rem; margin-bottom: 16px; animation: float 3s ease-in-out infinite; }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.emptyTitle { font-family: var(--font-display); font-size: 1.25rem; font-weight: 700; color: var(--sage-500); margin-bottom: 8px; }
.emptySub { color: var(--sage-300); font-size: 0.9rem; margin-bottom: 32px; }

.featureList { display: flex; flex-direction: column; gap: 12px; max-width: 320px; }
.featureItem { display: flex; align-items: center; gap: 12px; background: var(--white); border: 1px solid var(--sage-100); border-radius: var(--radius-lg); padding: 12px 16px; font-size: 0.875rem; color: var(--sage-400); }
.featureIcon { font-size: 1.25rem; flex-shrink: 0; }

/* Footer */
.footer { padding: 24px; text-align: center; color: var(--sage-300); font-size: 0.8rem; border-top: 1px solid var(--sage-100); margin-top: auto; }
.footerLink { color: var(--sage-400); text-decoration: none; }
.footerLink:hover { color: var(--sage-500); }

/* Responsive */
@media (max-width: 768px) {
  .header { padding: 12px 16px; }
  .hero { padding: 40px 16px 32px; }
  .result { padding: 0 16px 40px; }
  .infoGrid { grid-template-columns: 1fr; }
  .statusCard { flex-direction: column; align-items: flex-start; }
  .statusRight { align-items: flex-start; width: 100%; }
  .timelineCard { padding: 20px 16px; }
  .payAmount { font-size: 1.625rem; }
  .infoCard, .payCard, .reviewCard { padding: 16px; }
  .toast { top: auto; bottom: 20px; right: 12px; left: 12px; max-width: 100%; }
  .searchBtn { padding: 10px 16px; font-size: 0.875rem; }
}

@media (max-width: 480px) {
  .hero { padding: 28px 12px 24px; }
  .heroTitle { font-size: 1.625rem; }
  .result { padding: 0 12px 32px; }
  .statusCard { padding: 16px; }
  .statusEmoji { font-size: 2rem; }
  .statusLabel { font-size: 1.0625rem; }
  .timelineCard { padding: 16px 12px; }
  .payAmount { font-size: 1.375rem; }
  .cancelledCard { padding: 24px 16px; }
  .searchWrap { border-radius: var(--radius-lg); padding: 4px 4px 4px 12px; }
  .searchBtn { padding: 8px 12px; }
  .featureList { max-width: 100%; }
}

@media (max-width: 375px) {
  .hero { padding: 20px 12px 20px; }
  .statusCard { gap: 12px; }
  .infoCard, .payCard, .reviewCard { padding: 12px; }
  .sectionTitle { font-size: 0.9375rem; }
}

