/* ── UniRoutes Main Stylesheet ─────────────────────────────────────────────
   Uses CSS custom properties + utility classes (no Tailwind CDN dependency)
   All colors use dark-mode-first design.
   ────────────────────────────────────────────────────────────────────────── */

/* ── Google Font import fallback (fonts.googleapis.com loads separately) ── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ── CSS Reset & Base ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-tap-highlight-color: transparent; }
body { font-family: 'Inter', system-ui, -apple-system, sans-serif; line-height: 1.6; }
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; }
a { text-decoration: none; color: inherit; }

/* ── Tailwind-compat utility shim ──────────────────────────────────────── */
.font-inter { font-family: 'Inter', system-ui, sans-serif; }
.antialiased { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

/* ── Color Tokens ──────────────────────────────────────────────────────── */
:root {
  --emerald-400: #34d399;
  --emerald-500: #10b981;
  --cyan-400: #22d3ee;
  --cyan-500: #06b6d4;
  --blue-400: #60a5fa;
  --gray-950: #030712;
  --gray-900: #111827;
  --gray-800: #1f2937;
  --gray-700: #374151;
  --gray-600: #4b5563;
  --gray-500: #6b7280;
  --gray-400: #9ca3af;
  --gray-300: #d1d5db;
  --red-400: #f87171;
  --yellow-400: #facc15;
  --purple-400: #c084fc;
}

/* ── Background colors ─────────────────────────────────────────────────── */
.bg-gray-950 { background-color: var(--gray-950); }
.bg-gray-900 { background-color: var(--gray-900); }
.bg-gray-800 { background-color: var(--gray-800); }
.bg-gray-700 { background-color: var(--gray-700); }

/* ── Text colors ───────────────────────────────────────────────────────── */
.text-white   { color: #fff; }
.text-gray-100 { color: #f3f4f6; }
.text-gray-200 { color: #e5e7eb; }
.text-gray-300 { color: #d1d5db; }
.text-gray-400 { color: #9ca3af; }
.text-gray-500 { color: #6b7280; }
.text-gray-600 { color: #4b5563; }
.text-emerald-400 { color: var(--emerald-400); }
.text-emerald-300 { color: #6ee7b7; }
.text-cyan-400 { color: var(--cyan-400); }
.text-blue-400 { color: var(--blue-400); }
.text-red-400 { color: var(--red-400); }
.text-red-300 { color: #fca5a5; }
.text-yellow-400 { color: var(--yellow-400); }
.text-yellow-500 { color: #eab308; }
.text-purple-400 { color: var(--purple-400); }
.text-orange-400 { color: #fb923c; }

/* ── Typography ────────────────────────────────────────────────────────── */
.font-bold { font-weight: 700; }
.font-extrabold { font-weight: 800; }
.font-semibold { font-weight: 600; }
.font-medium { font-weight: 500; }
.font-normal { font-weight: 400; }
.font-mono { font-family: 'Menlo', 'Monaco', monospace; }
.text-xs   { font-size: 0.75rem;  line-height: 1rem; }
.text-sm   { font-size: 0.875rem; line-height: 1.25rem; }
.text-base { font-size: 1rem;     line-height: 1.5rem; }
.text-lg   { font-size: 1.125rem; line-height: 1.75rem; }
.text-xl   { font-size: 1.25rem;  line-height: 1.75rem; }
.text-2xl  { font-size: 1.5rem;   line-height: 2rem; }
.text-3xl  { font-size: 1.875rem; line-height: 2.25rem; }
.text-4xl  { font-size: 2.25rem;  line-height: 2.5rem; }
.text-5xl  { font-size: 3rem;     line-height: 1; }
.text-6xl  { font-size: 3.75rem;  line-height: 1; }
.text-7xl  { font-size: 4.5rem;   line-height: 1; }
.tracking-tight  { letter-spacing: -0.025em; }
.tracking-wider  { letter-spacing: 0.05em; }
.leading-tight   { line-height: 1.25; }
.leading-relaxed { line-height: 1.625; }
.uppercase { text-transform: uppercase; }
.capitalize { text-transform: capitalize; }
.truncate  { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.text-left   { text-align: left; }
.text-center { text-align: center; }
.text-right  { text-align: right; }

/* ── Layout Utilities ──────────────────────────────────────────────────── */
.flex  { display: flex; }
.inline-flex { display: inline-flex; }
.grid  { display: grid; }
.block { display: block; }
.hidden { display: none !important; }
.relative { position: relative; }
.absolute { position: absolute; }
.fixed    { position: fixed; }
.sticky   { position: sticky; }
.inset-0  { top: 0; right: 0; bottom: 0; left: 0; }
.inset-x-0 { left: 0; right: 0; }
.inset-y-0 { top: 0; bottom: 0; }
.top-0    { top: 0; }
.bottom-0 { bottom: 0; }
.left-0   { left: 0; }
.right-0  { right: 0; }
.z-10  { z-index: 10; }
.z-20  { z-index: 20; }
.z-30  { z-index: 30; }
.z-40  { z-index: 40; }
.z-50  { z-index: 50; }
.overflow-hidden  { overflow: hidden; }
.overflow-y-auto  { overflow-y: auto; }
.overflow-x-auto  { overflow-x: auto; }
.min-h-screen { min-height: 100vh; }
.h-screen { height: 100vh; }
.h-full   { height: 100%; }
.w-full   { width: 100%; }
.flex-1   { flex: 1 1 0%; }
.flex-shrink-0 { flex-shrink: 0; }
.flex-col  { flex-direction: column; }
.flex-row  { flex-direction: row; }
.flex-wrap { flex-wrap: wrap; }
.items-center  { align-items: center; }
.items-start   { align-items: flex-start; }
.justify-center  { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end     { justify-content: flex-end; }
.gap-1   { gap: 0.25rem; }
.gap-1\.5 { gap: 0.375rem; }
.gap-2   { gap: 0.5rem; }
.gap-2\.5 { gap: 0.625rem; }
.gap-3   { gap: 0.75rem; }
.gap-4   { gap: 1rem; }
.gap-5   { gap: 1.25rem; }
.gap-6   { gap: 1.5rem; }
.gap-8   { gap: 2rem; }
.gap-10  { gap: 2.5rem; }
.space-y-1   > * + * { margin-top: 0.25rem; }
.space-y-1\.5 > * + * { margin-top: 0.375rem; }
.space-y-2   > * + * { margin-top: 0.5rem; }
.space-y-3   > * + * { margin-top: 0.75rem; }
.space-y-4   > * + * { margin-top: 1rem; }
.space-y-5   > * + * { margin-top: 1.25rem; }
.space-y-6   > * + * { margin-top: 1.5rem; }
.col-span-2  { grid-column: span 2; }

/* ── Sizing helpers ────────────────────────────────────────────────────── */
.w-1\.5 { width: 0.375rem; }  .h-1\.5 { height: 0.375rem; }
.w-2    { width: 0.5rem; }    .h-2    { height: 0.5rem; }
.w-3    { width: 0.75rem; }   .h-3    { height: 0.75rem; }
.w-4    { width: 1rem; }      .h-4    { height: 1rem; }
.w-5    { width: 1.25rem; }   .h-5    { height: 1.25rem; }
.w-6    { width: 1.5rem; }    .h-6    { height: 1.5rem; }
.w-7    { width: 1.75rem; }   .h-7    { height: 1.75rem; }
.w-8    { width: 2rem; }      .h-8    { height: 2rem; }
.w-9    { width: 2.25rem; }   .h-9    { height: 2.25rem; }
.w-10   { width: 2.5rem; }    .h-10   { height: 2.5rem; }
.w-14   { width: 3.5rem; }    .h-14   { height: 3.5rem; }
.w-16   { width: 4rem; }      .h-16   { height: 4rem; }
.w-20   { width: 5rem; }      .h-20   { height: 5rem; }
.w-24   { width: 6rem; }
.w-48   { width: 12rem; }
.w-64   { width: 16rem; }
.w-72   { width: 18rem; }
.w-80   { width: 20rem; }
.w-96   { width: 24rem; }
.max-w-md  { max-width: 28rem; }
.max-w-lg  { max-width: 32rem; }
.max-w-xl  { max-width: 36rem; }
.max-w-2xl { max-width: 42rem; }
.max-w-4xl { max-width: 56rem; }
.max-w-5xl { max-width: 64rem; }
.max-w-7xl { max-width: 80rem; }
.max-h-40  { max-height: 10rem; }
.max-h-64  { max-height: 16rem; }
.min-h-64  { min-height: 16rem; }
.min-w-0   { min-width: 0; }
.min-w-48  { min-width: 12rem; }

/* ── Spacing ───────────────────────────────────────────────────────────── */
.p-2    { padding: 0.5rem; }
.p-3    { padding: 0.75rem; }
.p-3\.5 { padding: 0.875rem; }
.p-4    { padding: 1rem; }
.p-5    { padding: 1.25rem; }
.p-6    { padding: 1.5rem; }
.p-8    { padding: 2rem; }
.p-12   { padding: 3rem; }
.px-2   { padding-left: 0.5rem; padding-right: 0.5rem; }
.px-3   { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-4   { padding-left: 1rem; padding-right: 1rem; }
.px-5   { padding-left: 1.25rem; padding-right: 1.25rem; }
.px-6   { padding-left: 1.5rem; padding-right: 1.5rem; }
.px-8   { padding-left: 2rem; padding-right: 2rem; }
.px-10  { padding-left: 2.5rem; padding-right: 2.5rem; }
.py-1   { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.py-1\.5 { padding-top: 0.375rem; padding-bottom: 0.375rem; }
.py-2   { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-2\.5 { padding-top: 0.625rem; padding-bottom: 0.625rem; }
.py-3   { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-3\.5 { padding-top: 0.875rem; padding-bottom: 0.875rem; }
.py-4   { padding-top: 1rem; padding-bottom: 1rem; }
.py-8   { padding-top: 2rem; padding-bottom: 2rem; }
.py-10  { padding-top: 2.5rem; padding-bottom: 2.5rem; }
.py-12  { padding-top: 3rem; padding-bottom: 3rem; }
.py-16  { padding-top: 4rem; padding-bottom: 4rem; }
.py-24  { padding-top: 6rem; padding-bottom: 6rem; }
.pb-1   { padding-bottom: 0.25rem; }
.pb-2   { padding-bottom: 0.5rem; }
.pb-3   { padding-bottom: 0.75rem; }
.pb-4   { padding-bottom: 1rem; }
.pt-1   { padding-top: 0.25rem; }
.pt-2   { padding-top: 0.5rem; }
.pt-3   { padding-top: 0.75rem; }
.pt-10  { padding-top: 2.5rem; }
.pl-3   { padding-left: 0.75rem; }
.pl-4   { padding-left: 1rem; }
.pl-12  { padding-left: 3rem; }
.pr-4   { padding-right: 1rem; }
.pr-12  { padding-right: 3rem; }
.mx-auto { margin-left: auto; margin-right: auto; }
.mb-1   { margin-bottom: 0.25rem; }
.mb-2   { margin-bottom: 0.5rem; }
.mb-3   { margin-bottom: 0.75rem; }
.mb-4   { margin-bottom: 1rem; }
.mb-5   { margin-bottom: 1.25rem; }
.mb-6   { margin-bottom: 1.5rem; }
.mb-8   { margin-bottom: 2rem; }
.mb-10  { margin-bottom: 2.5rem; }
.mb-12  { margin-bottom: 3rem; }
.mb-16  { margin-bottom: 4rem; }
.mt-0\.5 { margin-top: 0.125rem; }
.mt-1   { margin-top: 0.25rem; }
.mt-2   { margin-top: 0.5rem; }
.mt-3   { margin-top: 0.75rem; }
.mt-4   { margin-top: 1rem; }
.mt-5   { margin-top: 1.25rem; }
.mt-10  { margin-top: 2.5rem; }
.mt-16  { margin-top: 4rem; }
.ml-2   { margin-left: 0.5rem; }
.ml-3   { margin-left: 0.75rem; }
.ml-4   { margin-left: 1rem; }
.ml-64  { margin-left: 16rem; }
.mr-2   { margin-right: 0.5rem; }
.my-4   { margin-top: 1rem; margin-bottom: 1rem; }

/* ── Border ────────────────────────────────────────────────────────────── */
.border          { border-width: 1px; border-style: solid; }
.border-t        { border-top-width: 1px; border-top-style: solid; }
.border-b        { border-bottom-width: 1px; border-bottom-style: solid; }
.border-l        { border-left-width: 1px; border-left-style: solid; }
.border-r        { border-right-width: 1px; border-right-style: solid; }
.border-2        { border-width: 2px; }
.border-dashed   { border-style: dashed; }
.border-white\/5  { border-color: rgba(255,255,255,0.05); }
.border-white\/10 { border-color: rgba(255,255,255,0.10); }
.border-white\/20 { border-color: rgba(255,255,255,0.20); }
.border-emerald-500\/20 { border-color: rgba(16,185,129,0.20); }
.border-emerald-500\/30 { border-color: rgba(16,185,129,0.30); }
.border-emerald-500\/40 { border-color: rgba(16,185,129,0.40); }
.border-red-500\/20     { border-color: rgba(239,68,68,0.20); }
.border-yellow-500\/20  { border-color: rgba(234,179,8,0.20); }
.border-red-500\/30     { border-color: rgba(239,68,68,0.30); }

/* ── Border Radius ─────────────────────────────────────────────────────── */
.rounded    { border-radius: 0.25rem; }
.rounded-md { border-radius: 0.375rem; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: 0.75rem; }
.rounded-2xl { border-radius: 1rem; }
.rounded-3xl { border-radius: 1.5rem; }
.rounded-full { border-radius: 9999px; }
.rounded-t-2xl { border-top-left-radius: 1rem; border-top-right-radius: 1rem; }

/* ── Shadows ───────────────────────────────────────────────────────────── */
.shadow-lg   { box-shadow: 0 10px 15px -3px rgba(0,0,0,0.5), 0 4px 6px -2px rgba(0,0,0,0.3); }
.shadow-2xl  { box-shadow: 0 25px 50px -12px rgba(0,0,0,0.8); }
.shadow-black\/60 { --shadow-color: rgba(0,0,0,0.6); }

/* ── Backdrop ──────────────────────────────────────────────────────────── */
.backdrop-blur    { backdrop-filter: blur(8px); }
.backdrop-blur-sm { backdrop-filter: blur(4px); }

/* ── Gradients ─────────────────────────────────────────────────────────── */
.bg-gradient-to-br { background-image: linear-gradient(to bottom right, var(--tw-gradient-from), var(--tw-gradient-to)); }
.bg-gradient-to-b  { background-image: linear-gradient(to bottom, var(--tw-gradient-from), var(--tw-gradient-to)); }
.bg-gradient-to-r  { background-image: linear-gradient(to right, var(--tw-gradient-from), var(--tw-gradient-to)); }
.from-emerald-400  { --tw-gradient-from: #34d399; }
.from-emerald-500  { --tw-gradient-from: #10b981; }
.to-cyan-500       { --tw-gradient-to: #06b6d4; }
.via-cyan-400      { --tw-gradient-stops: var(--tw-gradient-from), #22d3ee, var(--tw-gradient-to); }
.to-blue-400       { --tw-gradient-to: #60a5fa; }
.bg-clip-text      { -webkit-background-clip: text; background-clip: text; }
.text-transparent  { color: transparent; }

/* ── Opacity tints ─────────────────────────────────────────────────────── */
.bg-emerald-500\/10 { background-color: rgba(16,185,129,0.10); }
.bg-emerald-500\/20 { background-color: rgba(16,185,129,0.20); }
.bg-emerald-500\/30 { background-color: rgba(16,185,129,0.30); }
.bg-cyan-500\/10    { background-color: rgba(6,182,212,0.10); }
.bg-blue-500\/10    { background-color: rgba(59,130,246,0.10); }
.bg-purple-500\/10  { background-color: rgba(168,85,247,0.10); }
.bg-yellow-500\/10  { background-color: rgba(234,179,8,0.10); }
.bg-red-500\/10     { background-color: rgba(239,68,68,0.10); }
.bg-red-500\/20     { background-color: rgba(239,68,68,0.20); }
.bg-black\/60       { background-color: rgba(0,0,0,0.60); }
.bg-black\/70       { background-color: rgba(0,0,0,0.70); }
.bg-gray-900\/30    { background-color: rgba(17,24,39,0.30); }
.bg-gray-900\/95    { background-color: rgba(17,24,39,0.95); }
.bg-gray-900\/97    { background-color: rgba(17,24,39,0.97); }
.bg-gray-950\/95    { background-color: rgba(3,7,18,0.95); }
.bg-gray-800\/60    { background-color: rgba(31,41,55,0.60); }
.bg-gray-800\/80    { background-color: rgba(31,41,55,0.80); }
.bg-gray-700\/50    { background-color: rgba(55,65,81,0.50); }
.bg-gray-700\/60    { background-color: rgba(55,65,81,0.60); }
.bg-white\/2        { background-color: rgba(255,255,255,0.02); }
.bg-white\/5        { background-color: rgba(255,255,255,0.05); }
.opacity-25    { opacity: 0.25; }
.opacity-30    { opacity: 0.30; }
.opacity-75    { opacity: 0.75; }
.pointer-events-none { pointer-events: none; }

/* ── Transforms ────────────────────────────────────────────────────────── */
.translate-y-0      { transform: translateY(0); }
.-translate-x-full  { transform: translateX(-100%); }
.translate-x-0      { transform: translateX(0); }
.-translate-x-1\/2  { transform: translateX(-50%); }
.-translate-y-1\/2  { transform: translateY(-50%); }
.translate-y-calc   { transform: translateY(calc(100% - 4.5rem)); }
.scale-105 { transform: scale(1.05); }
.rotate-180 { transform: rotate(180deg); }

/* ── Transitions ───────────────────────────────────────────────────────── */
.transition-all      { transition: all 0.15s ease; }
.transition-colors   { transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease; }
.transition-transform { transition: transform 0.3s ease; }
.duration-300        { transition-duration: 0.3s; }

/* ── Animations ────────────────────────────────────────────────────────── */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-10px); }
}
@keyframes fade-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.animate-pulse   { animation: pulse 2s cubic-bezier(0.4,0,0.6,1) infinite; }
.animate-spin    { animation: spin 1s linear infinite; }
.animate-float   { animation: float 3s ease-in-out infinite; }
.animate-fade-in { animation: fade-in 0.3s ease forwards; }

/* ── Scrollbar ─────────────────────────────────────────────────────────── */
::-webkit-scrollbar       { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }

/* ═══════════════════════════════════════════════════════════════════════════
   COMPONENT CLASSES
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Buttons ────────────────────────────────────────────────────────────── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 1.25rem;
  background: linear-gradient(135deg, #10b981, #06b6d4);
  color: #fff;
  font-weight: 600;
  font-size: 0.875rem;
  border-radius: 0.75rem;
  border: none;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 0 20px rgba(16,185,129,0.25);
  white-space: nowrap;
}
.btn-primary:hover:not(:disabled) { opacity: 0.92; transform: translateY(-1px); box-shadow: 0 0 28px rgba(16,185,129,0.35); }
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1.25rem;
  background: rgba(255,255,255,0.04);
  color: #d1d5db;
  font-weight: 500;
  font-size: 0.875rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(255,255,255,0.10);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  white-space: nowrap;
}
.btn-ghost:hover { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.18); color: #fff; }

.btn-sm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 0.5rem;
  border: none;
  cursor: pointer;
  transition: background 0.15s;
  white-space: nowrap;
}

/* ── Cards ──────────────────────────────────────────────────────────────── */
.card {
  background: rgba(31,41,55,0.6);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 1rem;
  backdrop-filter: blur(8px);
}

.feature-card {
  background: rgba(17,24,39,0.6);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 1rem;
  padding: 1.5rem;
  transition: border-color 0.2s, background 0.2s;
}
.feature-card:hover { border-color: rgba(52,211,153,0.2); background: rgba(17,24,39,0.9); }
.feature-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.625rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.route-card {
  background: rgba(31,41,55,0.5);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 1rem;
  padding: 1rem;
  transition: border-color 0.2s;
}
.route-card:hover { border-color: rgba(52,211,153,0.25); }

.stat-card {
  background: rgba(31,41,55,0.5);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 0.75rem;
  padding: 1rem 1.25rem;
}
.stat-label { font-size: 0.75rem; color: #6b7280; margin-bottom: 0.25rem; }
.stat-value { font-size: 1.875rem; font-weight: 700; color: #fff; }

.uni-card {
  background: rgba(31,41,55,0.5);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  transition: border-color 0.2s;
}
.uni-card:hover { border-color: rgba(52,211,153,0.25); }

.quick-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.625rem;
  padding: 1rem;
  background: rgba(31,41,55,0.5);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 0.875rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #d1d5db;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
  text-align: center;
}
.quick-action:hover { border-color: rgba(52,211,153,0.3); background: rgba(31,41,55,0.8); color: #fff; }
.quick-action-icon { font-size: 1.5rem; }

/* ── Skeleton ───────────────────────────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, rgba(31,41,55,0.6) 25%, rgba(55,65,81,0.4) 50%, rgba(31,41,55,0.6) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 1rem;
  border: 1px solid rgba(255,255,255,0.05);
}
@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Form fields ────────────────────────────────────────────────────────── */
.form-field { display: flex; flex-direction: column; gap: 0.375rem; }
.form-field label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: #9ca3af;
}
.form-field input,
.form-field select,
.form-field textarea {
  background: rgba(31,41,55,0.8);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 0.625rem;
  padding: 0.625rem 0.875rem;
  font-size: 0.875rem;
  color: #f9fafb;
  width: 100%;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  -webkit-appearance: none;
}
.form-field input::placeholder,
.form-field textarea::placeholder { color: #4b5563; }
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: rgba(16,185,129,0.5);
  box-shadow: 0 0 0 3px rgba(16,185,129,0.10);
}
.form-field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2.25rem;
}
.form-field select option { background: #1f2937; color: #f9fafb; }

/* Standalone selects (not in form-field) */
.select-sm {
  background: rgba(31,41,55,0.8);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 0.5rem;
  padding: 0.375rem 2rem 0.375rem 0.75rem;
  font-size: 0.8125rem;
  color: #d1d5db;
  outline: none;
  cursor: pointer;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.625rem center;
  transition: border-color 0.15s;
}
.select-sm:focus { border-color: rgba(16,185,129,0.4); outline: none; box-shadow: 0 0 0 2px rgba(16,185,129,0.1); }
.select-sm option { background: #1f2937; color: #f9fafb; }

/* Password strength bars */
.strength-bar { flex: 1; height: 3px; border-radius: 99px; background: #374151; transition: background 0.3s; }

/* ── Navbar ─────────────────────────────────────────────────────────────── */
#navbar { background: transparent; }
#navbar.navbar-scrolled {
  background: rgba(3,7,18,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

/* ── Navigation links (sidebar) ─────────────────────────────────────────── */
.nav-link {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.625rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #6b7280;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  width: 100%;
  border: none;
  background: none;
  text-align: left;
}
.nav-link:hover { background: rgba(255,255,255,0.05); color: #e5e7eb; }
.nav-link.active { background: rgba(16,185,129,0.10); color: var(--emerald-400); }

/* ── Hero decorative bus markers ─────────────────────────────────────────── */
.bus-marker-demo { font-size: 1.75rem; filter: drop-shadow(0 4px 12px rgba(16,185,129,0.4)); }

/* ── Map custom styles ───────────────────────────────────────────────────── */
.leaflet-container { background: #111827 !important; }
.leaflet-tile { filter: brightness(0.7) saturate(0.6) hue-rotate(5deg); }

/* Bus marker */
.bus-marker-icon {
  background: linear-gradient(135deg, #10b981, #06b6d4);
  border: 2px solid rgba(255,255,255,0.9);
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  box-shadow: 0 4px 16px rgba(16,185,129,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: transform 0.4s ease;
}
.bus-marker-icon > span { transform: rotate(45deg); display: block; }

/* User location marker */
.user-location-marker {
  width: 16px; height: 16px;
  background: #3b82f6;
  border: 3px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 6px rgba(59,130,246,0.2);
}

/* ── Bus list items (side panel) ─────────────────────────────────────────── */
.bus-list-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  border-radius: 0.75rem;
  background: rgba(31,41,55,0.4);
  border: 1px solid rgba(255,255,255,0.06);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.bus-list-item:hover { background: rgba(31,41,55,0.8); border-color: rgba(52,211,153,0.2); }
.bus-list-item.active { border-color: rgba(52,211,153,0.4); background: rgba(16,185,129,0.08); }
.bus-pulse { width: 8px; height: 8px; border-radius: 50%; background: #34d399; flex-shrink: 0; box-shadow: 0 0 0 3px rgba(52,211,153,0.2); }
@keyframes live-pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(52,211,153,0.2); }
  50%       { box-shadow: 0 0 0 6px rgba(52,211,153,0.05); }
}
.bus-pulse { animation: live-pulse 2s infinite; }

/* WebSocket status badge colors */
.ws-connected    { color: #34d399; }
.ws-connecting   { color: #facc15; }
.ws-disconnected { color: #f87171; }
.dot-connected    { background: #34d399; }
.dot-connecting   { background: #facc15; animation: pulse 1s infinite; }
.dot-disconnected { background: #f87171; }

/* ── Responsive Grid Helpers ─────────────────────────────────────────────── */
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.grid-cols-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }

@media (min-width: 640px) {
  .sm\:flex { display: flex; }
  .sm\:hidden { display: none !important; }
  .sm\:block { display: block; }
  .sm\:flex-row { flex-direction: row; }
  .sm\:items-center { align-items: center; }
  .sm\:w-auto { width: auto; }
  .sm\:px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
  .sm\:p-6 { padding: 1.5rem; }
  .sm\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .sm\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
  .sm\:text-6xl { font-size: 3.75rem; line-height: 1; }
}

@media (min-width: 768px) {
  .md\:flex  { display: flex; }
  .md\:block { display: block; }
  .md\:hidden { display: none !important; }
  .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .md\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
  .md\:flex-row { flex-direction: row; }
  .md\:flex-col { flex-direction: column; }
}

@media (min-width: 1024px) {
  .lg\:flex  { display: flex; }
  .lg\:block { display: block; }
  .lg\:hidden { display: none !important; }
  .lg\:flex-row { flex-direction: row; }
  .lg\:flex-col { flex-direction: column; }
  .lg\:translate-x-0 { transform: translateX(0) !important; }
  .lg\:ml-64  { margin-left: 16rem; }
  .lg\:p-8    { padding: 2rem; }
  .lg\:px-8   { padding-left: 2rem; padding-right: 2rem; }
  .lg\:w-1\/2 { width: 50%; }
  .lg\:w-80   { width: 20rem; }
  .lg\:text-7xl { font-size: 4.5rem; line-height: 1; }
  .lg\:bottom-8 { bottom: 2rem; }
}

/* ── Mobile bottom sheet open state ─────────────────────────────────────── */
#mobile-sheet.open { transform: translateY(0) !important; }

/* ── Table ───────────────────────────────────────────────────────────────── */
table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; }
