:root {
  --rmts-ink: #0f172a;
  --rmts-muted: #5b6b7a;
  --rmts-slate: #111827;
  --rmts-surface: #ffffff;
  --rmts-surface-2: #f8fafc;
  --rmts-line: #e2e8f0;
  --rmts-accent: #0ea5a4;
  --rmts-accent-2: #0f766e;
  --rmts-warm: #f97316;
  --rmts-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
  --rmts-radius: 18px;
  --rmts-radius-sm: 12px;
}

* {
  scroll-behavior: smooth;
}

body {
  font-family: "Manrope", "Segoe UI", sans-serif;
  color: var(--rmts-ink);
  background:
    radial-gradient(1200px 600px at 12% -10%, rgba(14, 165, 164, 0.18), transparent),
    radial-gradient(900px 500px at 90% 10%, rgba(249, 115, 22, 0.12), transparent),
    var(--rmts-surface-2);
  min-height: 100vh;
}

/* Somee hosting badge (injected by host) */
a[href*="somee.com"] {
  position: fixed !important;
  right: 0.75rem !important;
  bottom: 0.75rem !important;
  z-index: 1600 !important;
  background: rgba(255, 255, 255, 0.92) !important;
  padding: 0.35rem 0.55rem !important;
  border-radius: 10px !important;
  font-size: 0.8rem !important;
  color: #2563eb !important;
  text-decoration: underline !important;
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.12) !important;
  max-width: 40vw !important;
  word-break: break-word !important;
}

/* If Somee injects a wrapper that blocks taps, neutralize it */
[id*="somee"], [class*="somee"] {
  pointer-events: none !important;
}
[id*="somee"] a, [class*="somee"] a, a[href*="somee.com"] {
  pointer-events: auto !important;
}

@media (max-width: 768px) {
  a[href*="somee.com"] {
    top: 0.5rem !important;
    right: 0.5rem !important;
    bottom: auto !important;
    font-size: 0.68rem !important;
    padding: 0.25rem 0.45rem !important;
    max-width: 55vw !important;
  }
}

h1, h2, h3, h4, h5 {
  font-family: "Space Grotesk", "Manrope", sans-serif;
  letter-spacing: -0.02em;
}

.main-content {
  padding-top: 100px;
}

.mobile-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  border-top: 1px solid rgba(226, 232, 240, 0.8);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  padding: 0.45rem 0.6rem 0.5rem;
  z-index: 5000;
  box-shadow: 0 -12px 24px rgba(15, 23, 42, 0.12);
}

.mobile-bottom-nav .nav-item {
  border: none;
  background: transparent;
  text-decoration: none;
  color: var(--rmts-muted);
  font-weight: 600;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  font-size: 0.72rem;
  padding: 0.35rem 0.2rem;
  border-radius: 14px;
  transition: all 0.2s ease;
}

.mobile-bottom-nav .nav-item i {
  font-size: 1.2rem;
}

.mobile-bottom-nav .nav-item.active,
.mobile-bottom-nav .nav-item:hover {
  background: rgba(14, 165, 164, 0.16);
  color: var(--rmts-accent-2);
}

.mobile-bottom-nav .more-btn {
  cursor: pointer;
}

.mobile-more-canvas {
  border-top-left-radius: 24px;
  border-top-right-radius: 24px;
  box-shadow: 0 -20px 40px rgba(15, 23, 42, 0.18);
  max-height: 75vh !important;
  height: 75vh !important;
  min-height: 360px;
}

.mobile-more-canvas .offcanvas-body {
  overflow-y: auto;
  padding-bottom: 5.5rem;
  padding-top: 0.5rem;
}

.offcanvas-bottom.mobile-more-canvas {
  height: 95vh !important;
  max-height: 95vh !important;
}

@media (max-width: 991px) {
  .modal.show .modal-dialog {
    margin-bottom: 90px;
  }

  .modal {
    padding-bottom: 90px;
  }
}

.navbar {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.7);
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.08);
}

.navbar-brand {
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}

.navbar-brand img {
  width: 34px;
  height: 34px;
}

.navbar .nav-link {
  font-weight: 600;
  color: var(--rmts-muted);
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  transition: all 0.2s ease;
}

.navbar .nav-link:hover,
.navbar .nav-item.active .nav-link {
  color: var(--rmts-slate);
  background: rgba(14, 165, 164, 0.12);
}

.navbar .dropdown-menu {
  border-radius: 14px;
  box-shadow: var(--rmts-shadow);
  border: 1px solid rgba(226, 232, 240, 0.8);
}

.btn {
  border-radius: 999px;
  font-weight: 600;
  padding: 0.65rem 1.1rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--rmts-accent), var(--rmts-accent-2));
  border: none;
}

.btn-outline-primary {
  border-color: rgba(14, 165, 164, 0.6);
  color: var(--rmts-accent-2);
}

.btn-outline-primary:hover {
  background: rgba(14, 165, 164, 0.12);
}

.card,
.accordion-item,
.modal-content {
  border-radius: var(--rmts-radius);
  border: 1px solid rgba(226, 232, 240, 0.7);
  box-shadow: var(--rmts-shadow);
}

.card {
  background: rgba(255, 255, 255, 0.92);
}

.alert {
  border-radius: 14px;
}

.badge {
  border-radius: 999px;
  padding: 0.4rem 0.75rem;
  font-weight: 600;
}

.form-control,
.form-select,
.select2-container--default .select2-selection--single {
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  padding: 0.65rem 0.9rem;
  box-shadow: none;
}

.form-control:focus,
.form-select:focus,
.select2-container--default .select2-selection--single:focus {
  border-color: rgba(14, 165, 164, 0.6);
  box-shadow: 0 0 0 0.2rem rgba(14, 165, 164, 0.15);
}

.table {
  border-radius: 16px;
  overflow: hidden;
}

.table thead th {
  background: rgba(15, 118, 110, 0.1);
  color: var(--rmts-slate);
  font-weight: 700;
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.section-header .eyebrow {
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  color: var(--rmts-muted);
}

.glass-panel {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 24px;
  border: 1px solid rgba(226, 232, 240, 0.8);
  padding: 1.5rem;
  box-shadow: var(--rmts-shadow);
}

.limit-banner {
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.2), rgba(14, 165, 164, 0.18));
  border: 1px solid rgba(249, 115, 22, 0.4);
  color: #7c2d12;
  border-radius: 16px;
  padding: 1rem 1.25rem;
  font-weight: 600;
}

.page-title {
  font-size: clamp(1.6rem, 2vw + 1rem, 2.4rem);
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.section-subtitle {
  color: var(--rmts-muted);
  font-size: 0.95rem;
}

.welcome-banner {
  background: linear-gradient(135deg, rgba(14, 165, 164, 0.18), rgba(15, 118, 110, 0.12));
  border-radius: 28px;
  margin: 1.5rem auto 2rem;
  padding: 3rem 1.5rem;
  box-shadow: var(--rmts-shadow);
}

.hero-section {
  background: rgba(255, 255, 255, 0.7);
  border-radius: 24px;
  box-shadow: var(--rmts-shadow);
}

.location-card {
  border-radius: 20px;
  border: 1px solid rgba(226, 232, 240, 0.8);
}

.route-card-item {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.route-card-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 40px rgba(15, 23, 42, 0.14);
}

.skeleton {
  position: relative;
  overflow: hidden;
  background: linear-gradient(90deg, rgba(226, 232, 240, 0.6) 25%, rgba(241, 245, 249, 0.9) 50%, rgba(226, 232, 240, 0.6) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s ease infinite;
  border-radius: 12px;
}

.skeleton-line {
  height: 12px;
  margin-bottom: 10px;
}

.skeleton-card {
  height: 160px;
  border-radius: 18px;
}

.skeleton-table {
  height: 280px;
  border-radius: 18px;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.notification-item {
  padding: 1rem 1rem;
  border-radius: 14px;
  margin-bottom: 0.75rem;
  border: 1px solid rgba(226, 232, 240, 0.8);
}

.notification-item.unread {
  background: rgba(14, 165, 164, 0.08);
  border-color: rgba(14, 165, 164, 0.35);
}

.notification-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #0ea5a4;
  display: inline-block;
  margin-top: 6px;
}

.map-panel {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 20px;
  padding: 1.25rem;
  border: 1px solid rgba(226, 232, 240, 0.8);
  box-shadow: var(--rmts-shadow);
}

.map-card {
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: var(--rmts-shadow);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  background: rgba(14, 165, 164, 0.12);
  color: var(--rmts-accent-2);
  font-weight: 600;
}

.bus-group-section {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 18px;
  box-shadow: var(--rmts-shadow);
}

.modal-header.primary {
  background: linear-gradient(135deg, rgba(14, 165, 164, 0.9), rgba(15, 118, 110, 0.9));
  color: #fff;
}

.footer {
  background: transparent;
  color: var(--rmts-muted);
  padding: 2rem 0;
}

.global-loader {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.25);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.global-loader .loader-card {
  background: var(--rmts-surface);
  border-radius: 20px;
  padding: 1.5rem 2rem;
  display: flex;
  gap: 1rem;
  align-items: center;
  box-shadow: var(--rmts-shadow);
}

.global-loader .spinner-border {
  width: 2.4rem;
  height: 2.4rem;
}

.loading-inline {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

@media (max-width: 991px) {
  .main-content {
    padding-top: 24px;
  }

  body {
    padding-bottom: 76px;
  }

  .navbar .nav-link {
    border-radius: 12px;
  }
}

@media (max-width: 576px) {
  .card,
  .accordion-item,
  .modal-content {
    border-radius: 16px;
  }
}
