/* ============================================================
   NISHAN TRANSPORT — Design System (shared across all pages)
   Theme tokens: defined here as CSS variables and mirrored in
   assets/js/tailwind-config.js for Tailwind utility classes.
   ============================================================ */

:root {
  /* surfaces */
  --color-ink-950: #0B0B0F;
  --color-ink-900: #111114;
  --color-ink-850: #16161B;
  --color-ink-800: #1A1A20;
  --color-ink-700: #24242C;
  --color-ink-600: #2E2E38;

  /* brand */
  --color-brand: #E11D2E;
  --color-brand-dark: #D90429;
  --color-brand-soft: rgba(225, 29, 46, 0.12);

  /* text */
  --color-text: #E5E5E5;
  --color-muted: #9CA3AF;

  /* lines */
  --color-border: rgba(255, 255, 255, 0.08);
  --color-border-strong: rgba(255, 255, 255, 0.16);

  /* status */
  --color-success: #34D399;
  --color-warning: #FBBF24;
  --color-danger: #F87171;

  /* type */
  --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Poppins', 'Inter', system-ui, sans-serif;

  /* shape */
  --radius: 16px;
}

/* ---------- base ---------- */
html { scroll-behavior: smooth; }

body {
  background-color: var(--color-ink-950);
  color: var(--color-text);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: rgba(225, 29, 46, 0.35); color: #fff; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--color-ink-950); }
::-webkit-scrollbar-thumb { background: var(--color-ink-600); border-radius: 999px; border: 2px solid var(--color-ink-950); }

/* ---------- layout ---------- */
.container-site {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: 1.25rem;
}
@media (min-width: 768px) { .container-site { padding-inline: 2rem; } }

/* Mobile-first column (~430px). Expands to the 1200px site container on desktop. */
.container-mobile {
  width: 100%;
  max-width: 430px;
  margin-inline: auto;
  padding-inline: 1.25rem;
}
@media (min-width: 768px) {
  .container-mobile { max-width: 1200px; padding-inline: 2rem; }
}

/* ambient red glow at the top of hero/splash pages */
.glow-top {
  pointer-events: none;
  position: absolute;
  inset-inline: 0;
  top: 0;
  height: 20rem;
  background: radial-gradient(600px 320px at 50% -10%, rgba(225, 29, 46, 0.16), transparent 60%);
}

/* red gradient surface for the route banner card */
.gradient-brand {
  background: linear-gradient(135deg, #E11D2E 0%, #D90429 55%, #7A0A1D 130%);
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1;
  border-radius: 12px;
  padding: 0.95rem 1.6rem;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.1s ease;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--color-brand); color: #fff; box-shadow: 0 10px 26px -12px rgba(225, 29, 46, 0.6); }
.btn-primary:hover { background: var(--color-brand-dark); }
.btn-secondary { background: transparent; color: var(--color-text); border-color: var(--color-border-strong); }
.btn-secondary:hover { border-color: var(--color-brand); color: #fff; background: rgba(225, 29, 46, 0.06); }
.btn-ghost { background: transparent; color: var(--color-muted); border-color: var(--color-border); }
.btn-ghost:hover { color: var(--color-text); border-color: var(--color-border-strong); }
.btn-block { width: 100%; }
.btn-sm { padding: 0.6rem 1.1rem; font-size: 0.85rem; border-radius: 10px; }

/* ---------- cards ---------- */
.card {
  background: var(--color-ink-800);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  transition: border-color 0.15s ease, transform 0.15s ease;
}
a.card:hover { border-color: var(--color-border-strong); }

/* ---------- form ---------- */
.label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin-bottom: 0.5rem;
}
.input {
  width: 100%;
  background: var(--color-ink-900);
  border: 1px solid var(--color-border-strong);
  color: var(--color-text);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  font-size: 0.95rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.input::placeholder { color: #6B7280; }
.input:focus { outline: none; border-color: var(--color-brand); box-shadow: 0 0 0 3px rgba(225, 29, 46, 0.15); }

/* dark styled select with custom chevron */
select.input {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 2.75rem;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239CA3AF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 1rem;
}
select.input option { background: var(--color-ink-900); color: var(--color-text); }

/* radio-style duty timing option */
.duty-option {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  background: var(--color-ink-900);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 0.75rem 0.9rem;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.duty-option:hover { border-color: var(--color-border-strong); }
.duty-option input { position: absolute; opacity: 0; pointer-events: none; }
.duty-radio {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 2px solid var(--color-border-strong);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s ease;
}
.duty-radio::after {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--color-brand);
  transform: scale(0);
  transition: transform 0.15s ease;
}
.duty-option:has(input:checked) { border-color: var(--color-brand); background: var(--color-brand-soft); }
.duty-option:has(input:checked) .duty-radio { border-color: var(--color-brand); }
.duty-option:has(input:checked) .duty-radio::after { transform: scale(1); }
.duty-option:has(input:focus-visible) { box-shadow: 0 0 0 3px rgba(225, 29, 46, 0.15); }

/* ---------- status badges ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.32rem 0.7rem;
  border-radius: 999px;
  white-space: nowrap;
}
.badge-dot::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: currentColor;
}
.badge-confirmed { color: var(--color-success); background: rgba(52, 211, 153, 0.12); }
.badge-pending   { color: var(--color-warning); background: rgba(251, 191, 36, 0.12); }
.badge-cancelled { color: var(--color-danger); background: rgba(248, 113, 113, 0.12); }

/* ---------- navigation ---------- */
/* Desktop top navigation */
.nav-top {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 11, 15, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--color-border);
}
.nav-top a { color: var(--color-muted); font-weight: 500; font-size: 0.9rem; text-decoration: none; transition: color 0.15s ease; }
.nav-top a:hover { color: #fff; }
.nav-top a.active { color: var(--color-brand); }

/* Mobile bottom navigation */
.nav-bottom {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: 50;
  background: rgba(15, 15, 19, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--color-border);
}
.nav-bottom__inner {
  display: flex;
  max-width: 430px;
  margin-inline: auto;
}
.nav-bottom a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  padding: 0.55rem 0 calc(0.55rem + env(safe-area-inset-bottom));
  font-size: 0.62rem;
  font-weight: 500;
  color: var(--color-muted);
  text-decoration: none;
  transition: color 0.15s ease;
}
.nav-bottom a svg { width: 22px; height: 22px; }
.nav-bottom a:hover { color: var(--color-text); }
.nav-bottom a.active { color: var(--color-brand); }

/* ---------- tabs ---------- */
.tab-btn {
  padding: 0.55rem 1.15rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--color-muted);
  border-radius: 10px;
  border: 1px solid transparent;
  transition: color 0.15s ease, background-color 0.15s ease;
}
.tab-btn:hover { color: #fff; }
.tab-btn.active { color: var(--color-brand); background: var(--color-brand-soft); border-color: rgba(225, 29, 46, 0.25); }

/* ---------- links ---------- */
.link-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--color-brand);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  transition: color 0.15s ease, gap 0.15s ease;
}
.link-brand:hover { color: #fff; gap: 0.55rem; }

/* ---------- profile ---------- */
.icon-box {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.3rem;
  height: 2.3rem;
  border-radius: 0.7rem;
  background: var(--color-brand-soft);
  color: var(--color-brand);
  flex-shrink: 0;
}
.icon-box svg { width: 1.05rem; height: 1.05rem; }
.menu-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1rem 1.1rem;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--color-text);
  text-decoration: none;
  transition: background-color 0.15s ease;
}
.menu-row:hover { background: rgba(255, 255, 255, 0.03); }

/* ---------- date badge ---------- */
.date-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 3.9rem;
  min-width: 3.9rem;
  padding: 0.55rem 0.25rem;
  border-radius: 12px;
  background: var(--color-ink-900);
  border: 1px solid var(--color-border-strong);
}
.date-badge .month { font-size: 0.66rem; font-weight: 700; letter-spacing: 0.1em; color: var(--color-brand); text-transform: uppercase; }
.date-badge .day { font-family: var(--font-display); font-size: 1.3rem; font-weight: 700; line-height: 1.15; color: #fff; }
.date-badge .year { font-size: 0.6rem; color: var(--color-muted); }

/* ---------- misc ---------- */
.divider { border-top: 1px solid var(--color-border); }
