/* ============================================================
   Waypoint Modern Design System (2026)
   ============================================================ */

:root {
  /* Color palette - modern indigo/violet with vibrant accents */
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: #818cf8;
  --primary-50: #eef2ff;
  --primary-100: #e0e7ff;

  --accent: #f59e0b;
  --accent-dark: #d97706;

  --success: #10b981;
  --success-light: #d1fae5;
  --danger: #ef4444;
  --danger-light: #fee2e2;
  --warning: #f59e0b;
  --warning-light: #fef3c7;
  --info: #06b6d4;
  --info-light: #cffafe;

  --bg: #f8fafc;
  --bg-soft: #f1f5f9;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --text: #0f172a;
  --text-muted: #64748b;
  --text-soft: #94a3b8;

  /* Radii */
  --radius-sm: 0.5rem;
  --radius: 0.875rem;
  --radius-lg: 1.25rem;
  --radius-xl: 1.5rem;
  --radius-2xl: 2rem;
  --radius-pill: 999px;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 2px 4px rgba(15, 23, 42, 0.06);
  --shadow: 0 4px 12px -2px rgba(15, 23, 42, 0.08), 0 2px 4px -2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 8px 20px -4px rgba(15, 23, 42, 0.1), 0 4px 8px -4px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 16px 40px -8px rgba(15, 23, 42, 0.12), 0 8px 16px -8px rgba(15, 23, 42, 0.08);
  --shadow-xl: 0 24px 60px -12px rgba(15, 23, 42, 0.18);
  --shadow-primary: 0 10px 25px -5px color-mix(in srgb, var(--primary, #6366f1) 50%, transparent);
  --shadow-glow: 0 0 0 4px rgba(99, 102, 241, 0.12);

  /* Transitions */
  --t-fast: 120ms cubic-bezier(.4, 0, .2, 1);
  --t-base: 200ms cubic-bezier(.4, 0, .2, 1);
  --t-slow: 300ms cubic-bezier(.4, 0, .2, 1);
}

* { box-sizing: border-box; }
html { -webkit-tap-highlight-color: transparent; }

body {
  font-family: 'Sarabun', 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html[lang="en"] body { font-family: 'Inter', 'Sarabun', system-ui, sans-serif; }

h1, h2, h3, h4, h5, h6 { font-weight: 700; letter-spacing: -0.01em; }

a { color: var(--primary); text-decoration: none; transition: color var(--t-fast); }
a:hover { color: var(--primary-dark); }

/* ============================================================
   Navigation
   ============================================================ */
.nav-modern {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1030;
}
.nav-modern .container { display: flex; align-items: center; padding: 0.875rem 1rem; }
.nav-brand {
  font-weight: 800; font-size: 1.15rem;
  color: var(--text); text-decoration: none;
  display: flex; align-items: center; gap: 0.5rem;
  white-space: nowrap;
  max-width: 260px;
  overflow: hidden; text-overflow: ellipsis;
}
.nav-brand > span { overflow: hidden; text-overflow: ellipsis; }
.nav-brand-icon {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--primary) 0%, #8b5cf6 100%);
  color: #fff; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; box-shadow: var(--shadow-primary);
}
.nav-brand:hover { color: var(--text); }

.nav-links { display: flex; gap: 0.15rem; margin-left: 1.5rem; flex: 1; align-items: center; }
.nav-links a {
  color: var(--text-muted);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 0.9rem;
  transition: all var(--t-fast);
  display: inline-flex; align-items: center; gap: 0.4rem;
  white-space: nowrap;
  text-decoration: none;
}
.nav-links a:hover { background: var(--bg-soft); color: var(--text); }
.nav-links a.active { background: var(--primary-50); color: var(--primary-dark); }
.nav-links .fi { font-size: 1.05em; line-height: 1; }

/* Dropdown in navbar */
.nav-dropdown .dropdown-menu {
  margin-top: 6px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  padding: 0.4rem;
  min-width: 220px;
}
.nav-dropdown .dropdown-item {
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  font-weight: 500;
  white-space: nowrap;
}
.nav-dropdown .dropdown-item .fi { color: var(--text-muted); font-size: 1.05em; width: 1.2em; text-align: center; }
.nav-dropdown .dropdown-item:hover { background: var(--bg-soft); }
.nav-dropdown .dropdown-item.active { background: var(--primary-50); color: var(--primary-dark); }
.nav-dropdown .dropdown-item.active .fi { color: var(--primary); }

@media (max-width: 1199px) {
  .nav-links { margin-left: 0.5rem; }
  .nav-links a { padding: 0.5rem 0.55rem; font-size: 0.85rem; }
}

/* Mobile drawer: group title for collapsed dropdowns */
.mobile-nav-group { border-top: 1px solid var(--border); padding-top: 0.4rem; margin-top: 0.4rem; }
.mobile-nav-group:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
.mobile-nav-group-title {
  padding: 0.65rem 1rem 0.25rem;
  font-size: 0.72rem; font-weight: 700;
  color: var(--text-soft);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  display: flex; align-items: center; gap: 0.4rem;
}

.nav-actions { display: flex; align-items: center; gap: 0.5rem; margin-left: auto; }
.nav-toggle { margin-left: auto; order: 99; }
@media (max-width: 991px) {
  .nav-modern .nav-actions { gap: 0.35rem; }
  .nav-modern .nav-actions > .dropdown,
  .nav-modern .nav-actions > a:not(.nav-toggle) { order: 1; }
  .nav-toggle { order: 99; }
}
.nav-toggle {
  display: none;
  border: 1px solid var(--border); background: var(--surface);
  width: 40px; height: 40px; border-radius: 10px;
  align-items: center; justify-content: center;
  cursor: pointer; transition: all var(--t-fast);
}
.nav-toggle:hover { background: var(--bg-soft); }

@media (max-width: 991px) {
  .nav-links { display: none; }
  .nav-toggle { display: inline-flex; }
}

/* Mobile drawer */
.mobile-drawer {
  position: fixed; inset: 0; z-index: 1040;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
  opacity: 0; visibility: hidden;
  transition: all var(--t-base);
}
.mobile-drawer.open { opacity: 1; visibility: visible; }
.mobile-drawer-panel {
  position: absolute; top: 0; right: 0; bottom: 0;
  width: 320px; max-width: 85vw;
  background: var(--surface);
  padding: 1.5rem;
  transform: translateX(100%);
  transition: transform var(--t-base);
  overflow-y: auto;
}
.mobile-drawer.open .mobile-drawer-panel { transform: translateX(0); }
.mobile-drawer .nav-links {
  display: flex; flex-direction: column; gap: 0.25rem;
  margin: 0; padding: 1rem 0;
}
.mobile-drawer .nav-links a {
  padding: 0.875rem 1rem; font-size: 1rem;
}

/* ============================================================
   Language switcher
   ============================================================ */
.lang-pill {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.4rem 0.75rem;
  background: var(--bg-soft);
  border-radius: var(--radius-pill);
  font-size: 0.85rem; font-weight: 600;
  color: var(--text); cursor: pointer; border: 0;
  transition: all var(--t-fast);
}
.lang-pill:hover { background: var(--primary-100); color: var(--primary-dark); }

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.925rem;
  padding: 0.6rem 1.1rem;
  transition: all var(--t-fast);
  border: 1px solid transparent;
  display: inline-flex; align-items: center; gap: 0.4rem;
  justify-content: center;
}
.btn-lg { padding: 0.8rem 1.5rem; font-size: 1rem; border-radius: var(--radius); }
.btn-sm { padding: 0.4rem 0.75rem; font-size: 0.825rem; }

.btn-primary {
  background: var(--primary); border-color: var(--primary); color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-primary:focus { box-shadow: var(--shadow-glow); }

.btn-secondary {
  background: var(--surface); border-color: var(--border); color: var(--text);
}
.btn-secondary:hover { background: var(--bg-soft); border-color: var(--border-strong); }

.btn-success { background: var(--success); border-color: var(--success); color: #fff; }
.btn-success:hover { background: #059669; border-color: #059669; }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-warning { background: var(--warning); border-color: var(--warning); color: #fff; }
.btn-info { background: var(--info); border-color: var(--info); color: #fff; }

.btn-outline-primary { color: var(--primary); border-color: var(--border); background: transparent; }
.btn-outline-primary:hover { background: var(--primary-50); border-color: var(--primary); color: var(--primary-dark); }
.btn-outline-secondary { color: var(--text-muted); border-color: var(--border); }
.btn-outline-secondary:hover { background: var(--bg-soft); color: var(--text); }
.btn-outline-danger { color: var(--danger); border-color: var(--border); }
.btn-outline-danger:hover { background: var(--danger-light); border-color: var(--danger); color: var(--danger); }
.btn-outline-info { color: var(--info); border-color: var(--border); }
.btn-outline-info:hover { background: var(--info-light); border-color: var(--info); }

.btn-link { color: var(--primary); text-decoration: none; padding: 0; }
.btn-link:hover { color: var(--primary-dark); text-decoration: underline; }

/* ============================================================
   Forms
   ============================================================ */
.form-control, .form-select {
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  padding: 0.6rem 0.875rem;
  font-size: 0.95rem;
  background: var(--surface);
  transition: all var(--t-fast);
  color: var(--text);
}
.form-control:focus, .form-select:focus {
  border-color: var(--primary);
  box-shadow: var(--shadow-glow);
  outline: 0;
}
.form-control-sm, .form-select-sm { padding: 0.45rem 0.7rem; font-size: 0.875rem; }
.form-control-lg { padding: 0.8rem 1rem; font-size: 1.05rem; }
.form-label {
  font-weight: 600; color: var(--text);
  font-size: 0.85rem; margin-bottom: 0.4rem;
}
.form-check-input { border-color: var(--border-strong); }
.form-check-input:checked { background-color: var(--primary); border-color: var(--primary); }
.form-check-input:focus { box-shadow: var(--shadow-glow); }

/* ============================================================
   Cards & Surfaces
   ============================================================ */
.card, .card-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
}
.card-section { padding: 1.5rem; margin-bottom: 1.25rem; }
.surface {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 1.5rem;
}

/* ============================================================
   Hero (Homepage)
   ============================================================ */
.hero {
  background:
    radial-gradient(at 20% 20%, rgba(139, 92, 246, 0.35) 0px, transparent 50%),
    radial-gradient(at 80% 0%, rgba(99, 102, 241, 0.4) 0px, transparent 50%),
    radial-gradient(at 90% 80%, rgba(236, 72, 153, 0.25) 0px, transparent 50%),
    linear-gradient(135deg, #4f46e5 0%, #7c3aed 60%, #ec4899 100%);
  color: #fff;
  border-radius: var(--radius-2xl);
  padding: clamp(2.5rem, 5vw, 5rem) clamp(1.5rem, 4vw, 3.5rem);
  position: relative;
  overflow: hidden;
  margin-bottom: 2rem;
}
.hero::after {
  content: '';
  position: absolute; top: -50%; right: -10%;
  width: 60%; height: 200%;
  background: radial-gradient(ellipse, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
  transform: rotate(15deg);
}
.hero h1 {
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
  position: relative; z-index: 1;
}
.hero .lead {
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  opacity: 0.9;
  max-width: 580px;
  position: relative; z-index: 1;
}
.hero-badges {
  display: flex; flex-wrap: wrap; gap: 0.5rem;
  margin-top: 1.5rem;
  position: relative; z-index: 1;
}
.hero-badge {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 0.4rem 0.875rem;
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 500;
}

/* ============================================================
   Search Card (floating over hero)
   ============================================================ */
.search-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: 0 12px 32px -8px rgba(15, 23, 42, 0.12),
              0 4px 12px -4px rgba(15, 23, 42, 0.06);
  margin-top: -2.5rem;
  margin-bottom: 2rem;
  position: relative;
  z-index: 5;
}

/* ============================================================
   Trip Cards
   ============================================================ */
.trip-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
  transition: all var(--t-base);
  cursor: pointer;
}
.trip-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.trip-time { font-size: 1.5rem; font-weight: 800; color: var(--text); letter-spacing: -0.02em; }
.trip-route { color: var(--text-muted); font-size: 0.85rem; font-weight: 500; }
.trip-price { font-size: 1.5rem; font-weight: 800; color: var(--success); letter-spacing: -0.02em; }
.trip-divider {
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--border-strong), transparent);
  position: relative; margin: 0.5rem 0;
}
.trip-divider::after {
  content: ''; position: absolute; left: 50%; top: 50%;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--primary); transform: translate(-50%, -50%);
}

/* ============================================================
   Seat map (modernized)
   ============================================================ */
.bus-layout {
  background: linear-gradient(180deg, #f8fafc 0%, #e2e8f0 100%);
  border-radius: var(--radius-xl);
  padding: 1.75rem 1.25rem 1.25rem;
  max-width: 380px;
  margin: 0 auto;
  position: relative;
  border: 1px solid var(--border);
}
.bus-driver {
  display: flex; justify-content: flex-end; align-items: center; gap: 0.5rem;
  border-bottom: 2px dashed var(--border-strong);
  padding-bottom: 0.75rem; margin-bottom: 1.25rem;
  color: var(--text-muted); font-size: 0.85rem; font-weight: 500;
}
.bus-driver i { font-size: 1.5rem; }
.seat-row {
  display: flex; align-items: center; gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.seat-row .gap { flex: 1; min-width: 0.875rem; }
.seat {
  width: 44px; height: 48px;
  border: 2px solid var(--border-strong);
  border-radius: 10px 10px 4px 4px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem; font-weight: 700;
  cursor: pointer;
  background: var(--surface); color: var(--text);
  transition: all var(--t-fast);
  user-select: none;
  position: relative;
  box-shadow: var(--shadow-xs);
}
.seat:hover:not(.booked) {
  transform: scale(1.1) translateY(-2px);
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
}
.seat.selected {
  background: var(--theme-grad, linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%));
  color: #fff; border-color: var(--primary);
  box-shadow: var(--shadow-primary);
}
.seat.booked {
  background: #fecaca; color: #991b1b;
  border-color: #fca5a5; cursor: not-allowed;
}
.seat-legend {
  display: flex; gap: 1.25rem;
  justify-content: center; align-items: center;
  margin-top: 1.5rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}
.seat-legend > div { display: inline-flex; align-items: center; gap: 0.4rem; }
.seat-legend .seat { cursor: default; width: 22px; height: 26px; font-size: 0; }

/* ============================================================
   Stat cards / Badges
   ============================================================ */
.badge {
  font-weight: 600; padding: 0.35rem 0.65rem;
  border-radius: var(--radius-pill); font-size: 0.75rem;
  letter-spacing: 0.01em;
}
.bg-primary { background: var(--primary) !important; }
.bg-success { background: var(--success) !important; }
.bg-warning { background: var(--warning) !important; color: #fff !important; }
.bg-danger { background: var(--danger) !important; }
.bg-info { background: var(--info) !important; }
.bg-secondary { background: var(--bg-soft) !important; color: var(--text-muted) !important; }

/* Soft variants */
.badge-soft-warning { background: var(--warning-light); color: #92400e; }
.badge-soft-success { background: var(--success-light); color: #065f46; }
.badge-soft-danger { background: var(--danger-light); color: #991b1b; }
.badge-soft-info { background: var(--info-light); color: #0e7490; }

/* ============================================================
   Tables
   ============================================================ */
.table {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
}
.table thead th {
  background: var(--bg-soft);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.875rem 1rem;
  border-bottom: 1px solid var(--border);
  border-top: 0;
}
.table tbody td {
  padding: 0.875rem 1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  font-size: 0.925rem;
}
.table-hover tbody tr { transition: background var(--t-fast); }
.table-hover tbody tr:hover { background: var(--bg-soft); }
.table-sm thead th { padding: 0.6rem 0.75rem; font-size: 0.72rem; }
.table-sm tbody td { padding: 0.6rem 0.75rem; font-size: 0.875rem; }

/* ============================================================
   Alerts
   ============================================================ */
.alert {
  border-radius: var(--radius);
  border: 1px solid transparent;
  padding: 0.875rem 1.125rem;
  font-size: 0.925rem;
}
.alert-success { background: var(--success-light); color: #065f46; border-color: #6ee7b7; }
.alert-warning { background: var(--warning-light); color: #92400e; border-color: #fcd34d; }
.alert-danger { background: var(--danger-light); color: #991b1b; border-color: #fca5a5; }
.alert-info { background: var(--info-light); color: #0e7490; border-color: #67e8f9; }

/* ============================================================
   Modern Ticket
   ============================================================ */
.tk {
  background: var(--surface);
  max-width: 640px;
  margin: 0 auto;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
}
.tk-header {
  background: linear-gradient(135deg, var(--primary) 0%, #8b5cf6 50%, #ec4899 100%);
  color: #fff;
  padding: 2rem 1.75rem;
  position: relative;
  overflow: hidden;
}
.tk-header::before {
  content: ''; position: absolute; top: -50%; right: -20%;
  width: 70%; height: 200%;
  background: rgba(255, 255, 255, 0.08);
  transform: rotate(20deg);
}
.tk-body { padding: 1.75rem; position: relative; }
.tk-label { color: var(--text-muted); font-size: 0.78rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.tk-value { font-weight: 600; color: var(--text); }
.tk-perforated {
  position: relative;
  height: 24px;
  background:
    radial-gradient(circle at 12px 50%, transparent 8px, var(--border) 8px, var(--border) 9px, transparent 9px),
    var(--bg-soft);
  background-size: 24px 100%;
}
.tk-perforated::before, .tk-perforated::after {
  content: ''; position: absolute; top: 50%; transform: translateY(-50%);
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--bg);
}
.tk-perforated::before { left: -14px; box-shadow: inset -2px 0 4px rgba(0, 0, 0, 0.06); }
.tk-perforated::after { right: -14px; box-shadow: inset 2px 0 4px rgba(0, 0, 0, 0.06); }
.tk-footer {
  padding: 1.25rem 1.75rem;
  background: var(--bg-soft);
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.seat-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 56px; height: 56px;
  background: var(--theme-grad, linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%));
  color: #fff;
  border-radius: var(--radius);
  font-size: 1.4rem; font-weight: 800;
  margin: 0.25rem;
  box-shadow: var(--shadow-primary);
  padding: 0 0.75rem;
}

/* ============================================================
   Modern Luggage Tag
   ============================================================ */
.lug-tag {
  background: var(--surface);
  max-width: 380px;
  margin: 0 auto 1.5rem;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 2px solid var(--text);
  box-shadow: var(--shadow-lg);
}
.lug-header {
  background: var(--text);
  color: #fff; padding: 0.875rem 1.25rem;
  display: flex; justify-content: space-between; align-items: center;
}
.lug-destination {
  text-align: center;
  padding: 1.5rem 1rem;
  border-top: 2px solid var(--text);
  border-bottom: 2px solid var(--text);
  background: #fef9c3;
}
.lug-destination-label { font-size: 0.75rem; font-weight: 700; color: var(--text-muted); letter-spacing: 0.1em; }
.lug-destination-code {
  font-size: 3rem; font-weight: 900;
  color: var(--danger); letter-spacing: 0.05em;
  line-height: 1;
}
.lug-destination-name { font-size: 1rem; font-weight: 600; letter-spacing: 0.05em; margin-top: 0.25rem; }
.lug-info { padding: 1rem 1.25rem; font-size: 0.875rem; }
.lug-info .row { padding: 0.4rem 0; border-bottom: 1px dotted var(--border-strong); }
.lug-info .label { color: var(--text-muted); font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.lug-barcode {
  background: var(--text);
  color: #fff;
  padding: 0.6rem; text-align: center;
  letter-spacing: 0.15em;
  font-family: 'Courier New', monospace;
  font-size: 1.1rem; font-weight: 700;
}

/* ============================================================
   Process steps (homepage)
   ============================================================ */
.step-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  text-align: center;
  height: 100%;
  transition: all var(--t-base);
}
.step-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.step-icon {
  width: 64px; height: 64px;
  background: var(--primary-50);
  color: var(--primary);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.75rem; margin: 0 auto 1rem;
}

/* ============================================================
   Thai date picker
   ============================================================ */
.tdp-wrapper { position: relative; }
.tdp-display {
  cursor: pointer;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--text-muted) 50%),
    linear-gradient(135deg, var(--text-muted) 50%, transparent 50%);
  background-position: calc(100% - 16px) calc(50% - 3px), calc(100% - 11px) calc(50% - 3px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 2rem;
}
.tdp-popup {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xl);
  padding: 1rem;
  min-width: 304px;
  z-index: 1050;
  display: none;
  animation: tdpFade 150ms ease-out;
}
.tdp-popup.open { display: block; }
@keyframes tdpFade { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }
.tdp-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 0.75rem;
}
.tdp-nav {
  background: transparent; border: 0;
  width: 32px; height: 32px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--text-muted);
  transition: all var(--t-fast);
}
.tdp-nav:hover { background: var(--bg-soft); color: var(--text); }
.tdp-title {
  font-weight: 700; cursor: pointer;
  padding: 0.4rem 0.75rem; border-radius: 8px;
  transition: background var(--t-fast);
}
.tdp-title:hover { background: var(--bg-soft); }
.tdp-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}
.tdp-dow {
  text-align: center; font-size: 0.75rem; font-weight: 700;
  color: var(--text-muted); padding: 0.4rem 0;
}
.tdp-day {
  text-align: center; padding: 0.5rem 0;
  font-size: 0.9rem; font-weight: 500;
  cursor: pointer; border-radius: 8px;
  transition: all var(--t-fast);
  color: var(--text);
}
.tdp-day:hover { background: var(--primary-50); color: var(--primary-dark); }
.tdp-day.muted { color: var(--text-soft); }
.tdp-day.today { color: var(--primary); font-weight: 700; box-shadow: inset 0 0 0 1.5px var(--primary); }
.tdp-day.selected { background: var(--primary); color: #fff; font-weight: 700; }
.tdp-day.disabled { color: var(--text-soft); cursor: not-allowed; opacity: 0.4; }
.tdp-day.disabled:hover { background: transparent; }
.tdp-footer {
  display: flex; justify-content: space-between;
  margin-top: 0.75rem; padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}
.tdp-footer button {
  background: transparent; border: 0;
  color: var(--primary); font-weight: 600;
  font-size: 0.875rem; cursor: pointer;
  padding: 0.4rem 0.75rem; border-radius: 6px;
}
.tdp-footer button:hover { background: var(--primary-50); }
.tdp-months, .tdp-years {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}
.tdp-mo, .tdp-yr {
  text-align: center; padding: 0.75rem 0;
  border-radius: 8px; cursor: pointer;
  font-size: 0.9rem; font-weight: 500;
  transition: all var(--t-fast);
}
.tdp-mo:hover, .tdp-yr:hover { background: var(--primary-50); color: var(--primary-dark); }
.tdp-mo.selected, .tdp-yr.selected { background: var(--primary); color: #fff; font-weight: 700; }
.tdp-time-bar {
  display: flex; align-items: center; gap: 0.4rem;
  padding-top: 0.75rem; margin-top: 0.75rem;
  border-top: 1px solid var(--border);
}
.tdp-time-label {
  flex: 1; color: var(--text-muted); font-size: 0.82rem; font-weight: 600;
  display: inline-flex; align-items: center; gap: 0.3rem;
}
.tdp-time-input {
  width: 56px;
  text-align: center;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 0.4rem 0.3rem;
  font-size: 1rem;
  font-weight: 700;
  background: var(--surface);
  color: var(--text);
  appearance: textfield;
  -moz-appearance: textfield;
}
.tdp-time-input::-webkit-outer-spin-button,
.tdp-time-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.tdp-time-input:focus {
  border-color: var(--primary); outline: 0;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 14%, transparent);
}
.tdp-time-colon { font-weight: 800; color: var(--text); padding: 0 0.15rem; }
.tdp-done-btn { background: var(--primary) !important; color: #fff !important; padding: 0.4rem 0.85rem !important; }
.tdp-done-btn:hover { background: var(--primary-dark) !important; }

/* ============================================================
   Footer
   ============================================================ */
.footer {
  background: var(--text);
  color: rgba(255, 255, 255, 0.7);
  padding: 2.5rem 0 1.5rem;
  margin-top: 4rem;
}
.footer h6 { color: #fff; margin-bottom: 0.875rem; font-weight: 700; }
.footer a { color: rgba(255, 255, 255, 0.7); }
.footer a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 2rem; padding-top: 1.25rem;
  font-size: 0.85rem;
}

/* ============================================================
   Utility
   ============================================================ */
.text-primary { color: var(--primary) !important; }
.text-success { color: var(--success) !important; }
.text-danger { color: var(--danger) !important; }
.text-warning { color: var(--warning) !important; }
.text-muted { color: var(--text-muted) !important; }

.shadow-sm { box-shadow: var(--shadow-sm) !important; }
.shadow { box-shadow: var(--shadow) !important; }
.shadow-lg { box-shadow: var(--shadow-lg) !important; }

main { padding: 1.5rem 0; }

/* Dropdown */
.dropdown-menu {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  padding: 0.4rem;
  min-width: 180px;
}
.dropdown-item {
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.75rem;
  font-size: 0.925rem;
  font-weight: 500;
  color: var(--text);
}
.dropdown-item:hover, .dropdown-item:focus { background: var(--bg-soft); color: var(--text); }
.dropdown-item.active { background: var(--primary-50); color: var(--primary-dark); }

/* Print */
@media print {
  body { background: #fff !important; }
  nav, footer, .no-print, .nav-modern { display: none !important; }
  main { padding: 0 !important; }
}

/* ── Brand (Waypoint default artwork) ─────────────────────── */
.nav-brand-mark { height: 40px; width: auto; flex-shrink: 0; display: block; }
.nav-brand-logo { height: 36px; width: auto; max-width: 160px; object-fit: contain; border-radius: 8px; flex-shrink: 0; }
.brand-on-dark { display: none !important; }
:root[data-mode="dark"] .brand-on-light { display: none !important; }
:root[data-mode="dark"] .brand-on-dark { display: block !important; }
@media (prefers-color-scheme: dark) {
  :root[data-mode="auto"] .brand-on-light { display: none !important; }
  :root[data-mode="auto"] .brand-on-dark { display: block !important; }
}
.auth-brand-logo { display: block; max-width: 240px; margin: 0 auto 1.25rem; }
.auth-brand-logo img { width: 100%; height: auto; display: block; }
