body {
  background: radial-gradient(circle at 15% 0%, #e6efff 0, #f4f7fb 40%);
}

.h5-app {
  position: relative;
  width: 100%;
  max-width: 480px;
  min-height: 100vh;
  margin: 0 auto;
  background: #f7f9fc;
  box-shadow: 0 0 60px rgba(16, 24, 40, 0.08);
  overflow: hidden;
  padding-bottom: calc(78px + env(safe-area-inset-bottom));
}

.h5-header {
  position: relative;
  padding: 26px 20px 0;
  color: #fff;
  background-color: #123a63;
  background-image:
    linear-gradient(180deg, rgba(8, 20, 38, 0.62) 0%, rgba(8, 20, 38, 0.34) 46%, rgba(8, 20, 38, 0.82) 100%),
    url('/assets/h5-banner.png');
  background-size: cover;
  background-position: center 35%;
  background-repeat: no-repeat;
  border-radius: 0 0 30px 30px;
  overflow: hidden;
}

.h5-header::before {
  content: '';
  position: absolute;
  width: 240px;
  height: 240px;
  top: -130px;
  right: -90px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.09);
}

.h5-header::after {
  content: '';
  position: absolute;
  width: 140px;
  height: 140px;
  bottom: -100px;
  left: -50px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.07);
}

.h5-header__top {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.brand-line {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  letter-spacing: 1px;
  color: rgba(255, 255, 255, 0.82);
}

.brand-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #7dd3fc;
  box-shadow: 0 0 0 4px rgba(125, 211, 252, 0.18);
}

.h5-header h1 {
  margin: 8px 0 0;
  font-size: 30px;
  line-height: 1.15;
  letter-spacing: 1px;
}

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  font-size: 11px;
  color: #fff;
  backdrop-filter: blur(6px);
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #a7f3d0;
  box-shadow: 0 0 0 3px rgba(167, 243, 208, 0.22);
}

.live-dot--pending {
  background: #fde68a;
  box-shadow: 0 0 0 3px rgba(253, 230, 138, 0.22);
}

.live-dot--error {
  background: #fca5a5;
  box-shadow: 0 0 0 3px rgba(252, 165, 165, 0.22);
}

.h5-header__desc {
  position: relative;
  z-index: 1;
  margin: 10px 0 14px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.82);
}

.date-row {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 12px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.18);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.94);
}

.date-row span + span {
  padding-left: 10px;
  border-left: 1px solid rgba(255, 255, 255, 0.3);
}

.h5-tabs {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 8px;
  margin-top: 22px;
}

.h5-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 0;
  padding: 13px 8px;
  border-radius: 16px 16px 0 0;
  background: rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.85);
  font-size: 14px;
  font-weight: 600;
  transition: background 0.18s ease, color 0.18s ease;
}

.h5-tab.active {
  background: #f7f9fc;
  color: var(--primary);
}

.tab-count {
  min-width: 20px;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  font-size: 11px;
  text-align: center;
}

.h5-tab.active .tab-count {
  background: #dbeafe;
  color: #1d4ed8;
}

.h5-main {
  padding: 20px 16px 0;
}

.h5-panel {
  display: none;
  animation: slideUp 0.24s ease;
}

.h5-panel.active {
  display: block;
}

.section-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 14px;
}

.section-title-row h2 {
  margin: 0;
  font-size: 18px;
  letter-spacing: 0.2px;
}

.section-title-row p {
  margin: 5px 0 0;
  font-size: 12px;
  color: var(--muted);
}

.refresh-btn {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: #fff;
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.refresh-btn svg,
.close-btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.shuttle-list,
.reservation-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.skeleton-card {
  height: 190px;
  border-radius: var(--radius-lg);
  background: linear-gradient(100deg, #fff 20%, #eef2f8 40%, #fff 60%);
  background-size: 200% 100%;
  box-shadow: var(--shadow-sm);
  animation: skeleton 1.4s infinite linear;
}

@keyframes skeleton {
  to { background-position-x: -200%; }
}

.shuttle-card {
  position: relative;
  padding: 16px;
  border: 1px solid rgba(228, 233, 242, 0.9);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.shuttle-card:active {
  transform: scale(0.99);
}

.shuttle-card.is-disabled {
  background: #fafbfd;
}

.shuttle-card--route-only {
  padding: 22px 20px;
  cursor: pointer;
}

.shuttle-card__body {
  display: flex;
  align-items: center;
  gap: 14px;
}

.shuttle-card__body .route {
  flex: 1;
  min-width: 0;
}

.shuttle-card--route-only .route {
  margin: 0;
}

.shuttle-card--route-only .route__places strong {
  font-size: 17px;
}

.shuttle-card--route-only.is-disabled {
  opacity: 0.55;
}

.card-top,
.mine-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.shuttle-code,
.mine-code {
  display: inline-flex;
  align-items: center;
  padding: 4px 9px;
  border-radius: 7px;
  background: var(--primary-soft);
  color: #175cd3;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.route {
  display: flex;
  align-items: stretch;
  gap: 12px;
  margin: 16px 0 14px;
}

.route__points {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 5px 0;
}

.route__points span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 2px solid var(--primary);
  background: #fff;
  flex-shrink: 0;
}

.route__points span:last-child {
  border-color: #0e9aa7;
  background: #0e9aa7;
}

.route__points i {
  flex: 1;
  width: 2px;
  margin: 3px 0;
  background: linear-gradient(#93b4f7, #99e4e8);
}

.route__places {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
}

.route-place {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.route-label {
  font-size: 10px;
  line-height: 1;
  color: var(--muted-light);
}

.route__places strong {
  font-size: 16px;
  font-weight: 650;
  line-height: 1.2;
}

.shuttle-card--route-only .route__points {
  padding-top: 18px;
}

.time-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #f8fafc;
}

.time-row__label {
  font-size: 12px;
  color: var(--muted);
}

.time-row strong {
  font-size: 14px;
}

.time-row__slots {
  margin-left: auto;
  padding: 2px 7px;
  border-radius: 6px;
  background: #eef2f7;
  font-size: 11px;
  color: #475467;
}

.seat-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0 12px;
  font-size: 12px;
  color: var(--muted);
}

.seat-bar {
  flex: 1;
  height: 6px;
  border-radius: 999px;
  background: #eef2f7;
  overflow: hidden;
}

.seat-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2563eb, #0e9aa7);
}

.seat-row strong {
  color: var(--text);
  font-size: 13px;
}

.card-note {
  margin: 0 0 13px;
  font-size: 12px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-action {
  width: 100%;
  border: 0;
  border-radius: 12px;
  padding: 11px;
  background: var(--primary);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
}

.card-action--inline {
  width: auto;
  flex-shrink: 0;
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 13px;
}

.card-action:disabled {
  background: #e4e9f2;
  color: #98a2b3;
}

.card-action--available {
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
}

.card-action--unavailable {
  border: 1px solid #e4e7ec;
  background: #f2f4f7;
  color: #667085;
  opacity: 1;
}

.shine-text {
  display: inline-block;
  background-image: linear-gradient(
    90deg,
    #175cd3 0%,
    #60a5fa 30%,
    #0e9aa7 50%,
    #60a5fa 70%,
    #175cd3 100%
  );
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shineText 2.6s linear infinite;
}

.card-action--unavailable .shine-text {
  background-image: linear-gradient(
    90deg,
    #667085 0%,
    #b0b7c3 30%,
    #98a2b3 50%,
    #b0b7c3 70%,
    #667085 100%
  );
  animation-duration: 3.4s;
}

@keyframes shineText {
  from { background-position: 220% 0; }
  to { background-position: -220% 0; }
}

.search-card {
  margin-bottom: 20px;
  padding: 16px;
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.search-row {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.search-row input {
  min-width: 0;
  flex: 1;
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 10px 12px;
  outline: none;
}

.search-row input:focus {
  border-color: #93b4f7;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.search-row .primary-btn {
  padding: 10px 18px;
}

.search-hint {
  margin: 9px 0 0;
  font-size: 11px;
  color: var(--muted-light);
}

.mine-card {
  padding: 16px;
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.mine-card h3 {
  margin: 14px 0 10px;
  font-size: 16px;
}

.mine-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

.mine-meta strong {
  color: var(--text);
  font-weight: 600;
}

.mine-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
  font-size: 11px;
  color: var(--muted-light);
}

.cancel-link {
  border: 0;
  background: transparent;
  color: var(--danger);
  font-size: 12px;
  font-weight: 600;
}

.empty-state {
  padding: 42px 20px;
  border: 1px dashed #d7deea;
  border-radius: var(--radius-lg);
  background: #fff;
  text-align: center;
}

.empty-state__icon {
  width: 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 24px;
  font-weight: 700;
}

.empty-state h3 {
  margin: 14px 0 6px;
  font-size: 15px;
}

.empty-state p {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

.h5-footer {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 20;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px calc(14px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  font-size: 11px;
  color: var(--muted-light);
}

.h5-footer a {
  color: var(--primary);
  font-weight: 600;
}

.sheet {
  width: 100%;
  max-width: 480px;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  padding: 8px 20px 20px;
  border-radius: 24px 24px 0 0;
  background: #fff;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.24s ease;
  overflow-y: auto;
}

.sheet__handle {
  width: 38px;
  height: 4px;
  margin: 0 auto 14px;
  border-radius: 999px;
  background: #d0d5dd;
}

.sheet__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.sheet__eyebrow {
  margin: 0 0 4px;
  font-size: 10px;
  letter-spacing: 1.4px;
  color: var(--primary);
  font-weight: 700;
}

.sheet__header h2,
.dialog h2 {
  margin: 0;
  font-size: 20px;
}

.close-btn {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 10px;
  background: #f2f4f7;
  color: #475467;
}

.booking-summary {
  margin: 16px 0;
  padding: 14px;
  border-radius: 14px;
  background: linear-gradient(135deg, #eff6ff, #ecfeff);
}

.booking-summary strong {
  display: block;
  margin-bottom: 6px;
  font-size: 16px;
}

.booking-summary p {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

.field-group {
  margin-bottom: 16px;
}

.slot-picker {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}

.schedule-day {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fbfcfe;
}

.schedule-day__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 9px;
}

.schedule-day__head strong {
  font-size: 13px;
  color: #344054;
}

.schedule-day__head span {
  font-size: 11px;
  color: var(--muted-light);
}

.schedule-day__times {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.schedule-time {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  min-width: 66px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease;
}

.schedule-time input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.schedule-time strong {
  font-size: 14px;
  font-weight: 700;
}

.schedule-time small {
  font-size: 10px;
  color: var(--muted);
}

.schedule-time.selected {
  border-color: var(--primary);
  background: var(--primary-soft);
  box-shadow: inset 0 0 0 1px var(--primary);
}

.schedule-time.selected small {
  color: #175cd3;
}

.schedule-time.is-past,
.schedule-time.is-full {
  cursor: not-allowed;
  border-color: #d0d5dd;
  background: #e4e7ec;
  color: #475467;
  box-shadow: none;
}

.schedule-time.is-past small,
.schedule-time.is-full small {
  color: #667085;
}

.schedule-time.is-past:hover,
.schedule-time.is-full:hover {
  border-color: #d0d5dd;
  background: #e4e7ec;
}

.schedule-empty {
  padding: 7px 0;
  font-size: 11px;
  color: var(--muted-light);
}

.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}

.field--compact {
  max-width: 140px;
  margin-bottom: 14px;
}

.sheet__footer {
  margin-top: 18px;
}

.remaining-hint {
  margin-bottom: 10px;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}

.dialog {
  width: 100%;
  max-width: 360px;
  padding: 24px;
  border-radius: 20px;
  background: #fff;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.2s ease;
}

.dialog__icon {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  border-radius: 12px;
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 22px;
  font-weight: 700;
}

.dialog > p {
  margin: 8px 0 18px;
  font-size: 13px;
  color: var(--muted);
}

.dialog__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 20px;
}

@media (max-width: 520px) {
  .overlay {
    align-items: flex-end;
    padding: 0;
  }

  .sheet {
    border-radius: 24px 24px 0 0;
  }

  .dialog {
    margin: 0 16px 24px;
  }
}
