:root {
  --background: 210 40% 98%;
  --foreground: 222 47% 11%;
  --primary: 221 83% 53%;
  --secondary: 158 64% 40%;
  --muted: 215 20% 92%;
  --destructive: 0 78% 56%;
  --border: 214 20% 84%;
  --card: 0 0% 100%;
  --shadow-sm: 0 10px 25px hsla(221, 83%, 53%, 0.08);
  --shadow-md: 0 18px 40px hsla(222, 47%, 11%, 0.12);
  --shadow-lg: 0 24px 70px hsla(221, 83%, 53%, 0.18);
  --transition-fast: 160ms ease;
  --transition-smooth: 320ms ease;
  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 28px;
}

.dark {
  --background: 222 47% 8%;
  --foreground: 210 40% 96%;
  --primary: 213 94% 68%;
  --secondary: 158 62% 48%;
  --muted: 223 18% 18%;
  --destructive: 0 82% 62%;
  --border: 222 17% 26%;
  --card: 224 30% 12%;
  --shadow-sm: 0 10px 25px hsla(0, 0%, 0%, 0.18);
  --shadow-md: 0 18px 40px hsla(0, 0%, 0%, 0.28);
  --shadow-lg: 0 28px 80px hsla(0, 0%, 0%, 0.4);
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  scroll-behavior: smooth;
}

body {
  transition: background var(--transition-smooth), color var(--transition-smooth);
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

.page-shell {
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, hsla(221, 83%, 53%, 0.14), transparent 30%),
    radial-gradient(circle at top right, hsla(158, 64%, 40%, 0.10), transparent 28%),
    hsl(var(--background));
}

.navbar-custom {
  background: hsla(0, 0%, 100%, 0.74);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid hsl(var(--border));
}

.dark .navbar-custom {
  background: hsla(224, 30%, 12%, 0.82);
}

.brand-badge {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: linear-gradient(135deg, hsl(var(--primary)), hsl(var(--secondary)));
  color: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  box-shadow: var(--shadow-sm);
}

.nav-link-custom {
  color: hsl(var(--foreground));
  padding: 0.65rem 1rem;
  border-radius: 999px;
  transition: background var(--transition-fast), color var(--transition-fast), transform var(--transition-fast);
}

.nav-link-custom:hover,
.nav-link-custom.active {
  background: hsla(221, 83%, 53%, 0.12);
  color: hsl(var(--primary));
  transform: translateY(-1px);
}

.hero-card,
.info-card,
.booking-card,
.feature-card,
.summary-card,
.search-card,
.route-card,
.ticket-card,
.empty-card,
.loading-card {
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.hero-card {
  overflow: hidden;
}

.gradient-panel {
  background: linear-gradient(135deg, hsla(221, 83%, 53%, 0.96), hsla(158, 64%, 40%, 0.92));
  color: white;
}

.section-title {
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.1;
}

.section-subtitle {
  color: hsla(222, 47%, 11%, 0.72);
}

.dark .section-subtitle {
  color: hsla(210, 40%, 96%, 0.72);
}

.token-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  background: hsla(221, 83%, 53%, 0.12);
  color: hsl(var(--primary));
  font-size: 0.9rem;
  font-weight: 600;
}

.cta-primary,
.cta-outline,
.cta-danger {
  border: none;
  border-radius: 999px;
  padding: 0.8rem 1.15rem;
  font-weight: 700;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast), color var(--transition-fast);
}

.cta-primary {
  background: hsl(var(--primary));
  color: white;
  box-shadow: var(--shadow-sm);
}

.cta-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.cta-outline {
  background: transparent;
  color: hsl(var(--foreground));
  border: 1px solid hsl(var(--border));
}

.cta-outline:hover {
  background: hsl(var(--muted));
}

.cta-danger {
  background: hsl(var(--destructive));
  color: white;
}

.soft-grid {
  display: grid;
  gap: 1rem;
}

.metric-box {
  padding: 1rem;
  border-radius: var(--radius-md);
  background: hsla(0, 0%, 100%, 0.14);
  border: 1px solid hsla(0, 0%, 100%, 0.18);
}

.metric-value {
  font-size: 1.5rem;
  font-weight: 800;
}

.metric-label {
  font-size: 0.9rem;
  opacity: 0.82;
}

.form-control,
.form-select {
  border-radius: 14px;
  border: 1px solid hsl(var(--border));
  padding: 0.8rem 0.95rem;
  background: hsl(var(--card));
  color: hsl(var(--foreground));
}

.form-control:focus,
.form-select:focus {
  border-color: hsl(var(--primary));
  box-shadow: 0 0 0 0.25rem hsla(221, 83%, 53%, 0.15);
}

.route-card,
.ticket-card {
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
}

.route-card:hover,
.ticket-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: hsla(221, 83%, 53%, 0.35);
}

.route-time {
  font-size: 1.3rem;
  font-weight: 800;
}

.route-line {
  height: 2px;
  flex: 1;
  background: linear-gradient(90deg, hsla(221, 83%, 53%, 0.3), hsla(158, 64%, 40%, 0.65));
  border-radius: 999px;
}

.price-tag {
  color: hsl(var(--secondary));
  font-weight: 800;
  font-size: 1.3rem;
}

.status-pill {
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
}

.status-available {
  background: hsla(158, 64%, 40%, 0.12);
  color: hsl(var(--secondary));
}

.status-limited {
  background: hsla(35, 92%, 52%, 0.16);
  color: hsl(35 92% 40%);
}

.status-full {
  background: hsla(0, 78%, 56%, 0.12);
  color: hsl(var(--destructive));
}

.icon-circle {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  background: hsla(221, 83%, 53%, 0.12);
  color: hsl(var(--primary));
}

.footer-custom {
  border-top: 1px solid hsl(var(--border));
  background: hsla(0, 0%, 100%, 0.55);
}

.dark .footer-custom {
  background: hsla(224, 30%, 12%, 0.7);
}

.toast-note {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 1080;
  max-width: 340px;
  background: hsl(var(--card));
  color: hsl(var(--foreground));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 0.95rem 1rem;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity var(--transition-fast), transform var(--transition-fast);
}

.toast-note.show {
  opacity: 1;
  transform: translateY(0);
}

.skeleton {
  position: relative;
  overflow: hidden;
  background: hsl(var(--muted));
}

.skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, hsla(0, 0%, 100%, 0.5), transparent);
  animation: shimmer 1.35s infinite;
}

@keyframes shimmer {
  100% {
    transform: translateX(100%);
  }
}

.hero-illustration {
  min-height: 280px;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 18% 25%, hsla(0, 0%, 100%, 0.28), transparent 14%),
    radial-gradient(circle at 80% 20%, hsla(0, 0%, 100%, 0.18), transparent 12%),
    linear-gradient(135deg, hsla(0, 0%, 100%, 0.18), hsla(0, 0%, 100%, 0.06));
  position: relative;
  overflow: hidden;
}

.bus-shape {
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: 18%;
  height: 110px;
  border-radius: 28px 28px 22px 22px;
  background: white;
  box-shadow: var(--shadow-lg);
}

.bus-window-row {
  position: absolute;
  left: 12%;
  right: 18%;
  top: 18px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}

.bus-window {
  height: 22px;
  border-radius: 8px;
  background: hsla(221, 83%, 53%, 0.18);
}

.bus-wheel,
.bus-wheel::after {
  position: absolute;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: hsl(var(--foreground));
  bottom: -14px;
}

.bus-wheel {
  left: 18%;
}

.bus-wheel::after {
  content: "";
  left: 240px;
}

.tiny-label {
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: hsla(222, 47%, 11%, 0.56);
}

.dark .tiny-label {
  color: hsla(210, 40%, 96%, 0.56);
}

@media (min-width: 768px) {
  .hero-illustration {
    min-height: 360px;
  }
}
