/* ===== ROOT & RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #6C63FF;
  --primary-dark: #5A52E0;
  --secondary: #FF6584;
  --accent: #43E97B;
  --bg: #0A0A1A;
  --bg2: #0F0F2A;
  --card: rgba(255,255,255,0.05);
  --card-border: rgba(255,255,255,0.1);
  --text: #F0F0FF;
  --text-muted: rgba(240,240,255,0.55);
  --success: #43E97B;
  --warning: #FFD166;
  --danger: #FF6584;
  --info: #4FC3F7;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 8px 32px rgba(108,99,255,0.18);
  --transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  touch-action: manipulation;
}

/* ===== ANIMATED BACKGROUND ===== */
.bg-animation {
  position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden;
}
.orb {
  position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.18; animation: float 12s ease-in-out infinite;
}
.orb1 { width: 600px; height: 600px; background: var(--primary); top: -200px; left: -200px; animation-delay: 0s; }
.orb2 { width: 500px; height: 500px; background: var(--secondary); bottom: -150px; right: -150px; animation-delay: 4s; }
.orb3 { width: 400px; height: 400px; background: var(--accent); top: 40%; left: 40%; animation-delay: 8s; }

@keyframes float {
  0%, 100% { transform: translate(0,0) scale(1); }
  33% { transform: translate(30px,-30px) scale(1.05); }
  66% { transform: translate(-20px,20px) scale(0.95); }
}

/* ===== NAVBAR ===== */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 5%;
  background: rgba(10,10,26,0.7);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--card-border);
}
.nav-brand {
  display: flex; align-items: center; gap: 10px;
  font-size: 1.4rem; font-weight: 800; color: var(--text);
  text-decoration: none;
}
.nav-brand i { color: var(--primary); font-size: 1.6rem; }
.nav-links { display: flex; gap: 32px; }
.nav-links a {
  color: var(--text-muted); text-decoration: none; font-weight: 500;
  font-size: 0.95rem; transition: var(--transition);
}
.nav-links a:hover { color: var(--primary); }

/* ===== HERO ===== */
.hero {
  position: relative; z-index: 1;
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 120px 5% 60px;
  text-align: center;
  transition: min-height 0.35s ease, padding 0.35s ease;
}
/* After track: collapse hero so result stays on-screen (no long up/down scroll) */
body.result-open .hero {
  min-height: auto;
  padding: 88px 5% 12px;
}
body.result-open .stats-row,
body.result-open .hero-sub,
body.result-open .badge {
  display: none;
}
body.result-open .hero h1 {
  font-size: clamp(1.4rem, 3vw, 2rem);
  margin-bottom: 12px;
}
body.result-open .track-card {
  margin-bottom: 8px;
  padding: 18px 22px;
}
.hero-content { max-width: 860px; width: 100%; }
body.result-open .hero-content { max-width: 1100px; }

.badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(108,99,255,0.15); border: 1px solid rgba(108,99,255,0.4);
  color: var(--primary); padding: 8px 18px; border-radius: 50px;
  font-size: 0.85rem; font-weight: 600; margin-bottom: 24px;
  animation: pulse-badge 2s ease-in-out infinite;
}
@keyframes pulse-badge {
  0%,100% { box-shadow: 0 0 0 0 rgba(108,99,255,0.3); }
  50% { box-shadow: 0 0 0 8px rgba(108,99,255,0); }
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 800; line-height: 1.15;
  margin-bottom: 20px; letter-spacing: -1px;
}
.gradient-text {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-sub {
  font-size: 1.1rem; color: var(--text-muted); margin-bottom: 40px; line-height: 1.7;
}

/* ===== TRACK CARD ===== */
.track-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--card-border);
  border-radius: 24px;
  padding: 32px;
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow);
  margin-bottom: 40px;
}

.track-tabs {
  display: flex; gap: 8px; margin-bottom: 24px;
  background: rgba(255,255,255,0.04); border-radius: 12px; padding: 4px;
}
.tab {
  flex: 1; padding: 10px; border: none; border-radius: 10px;
  background: transparent; color: var(--text-muted);
  font-family: 'Inter', sans-serif; font-size: 0.9rem; font-weight: 600;
  cursor: pointer; transition: var(--transition);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.tab.active {
  background: var(--primary); color: #fff;
  box-shadow: 0 4px 15px rgba(108,99,255,0.4);
}

.tab-content { display: none; }
.tab-content.active { display: block; }

.input-group {
  display: flex; gap: 12px; flex-wrap: wrap;
}
.select-wrap, .track-input-wrap {
  display: flex; align-items: center; gap: 10px;
  background: rgba(255,255,255,0.06); border: 1px solid var(--card-border);
  border-radius: var(--radius-sm); padding: 0 16px;
  transition: var(--transition);
}
.select-wrap:focus-within, .track-input-wrap:focus-within {
  border-color: var(--primary); box-shadow: 0 0 0 3px rgba(108,99,255,0.15);
}
.select-wrap i, .track-input-wrap i { color: var(--primary); font-size: 0.9rem; }
.select-wrap { min-width: 220px; }
.track-input-wrap { flex: 1; min-width: 200px; }

select, input[type="text"] {
  background: transparent; border: none; outline: none;
  color: var(--text); font-family: 'Inter', sans-serif;
  /* 16px minimum prevents iOS focus-zoom and improves tap accuracy */
  font-size: 16px; padding: 14px 0; width: 100%;
  -webkit-appearance: none;
  appearance: none;
  touch-action: manipulation;
}
select {
  cursor: pointer;
  /* room for native chevron / custom caret */
  padding-right: 8px;
}
select option { background: #1a1a3a; color: var(--text); }
select optgroup { color: var(--text-muted); font-size: 0.8rem; }
input::placeholder { color: var(--text-muted); }

.clear-btn {
  background: none; border: none; color: var(--text-muted);
  cursor: pointer; padding: 8px; display: none; transition: var(--transition);
  min-width: 36px; min-height: 36px;
  touch-action: manipulation;
}
.clear-btn:hover { color: var(--danger); }

.track-btn {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff; border: none; border-radius: var(--radius-sm);
  padding: 14px 28px; font-family: 'Inter', sans-serif;
  font-size: 1rem; font-weight: 700; cursor: pointer;
  transition: var(--transition); white-space: nowrap;
  box-shadow: 0 4px 20px rgba(108,99,255,0.4);
  min-height: 48px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.track-btn:hover {
  transform: translateY(-2px); box-shadow: 0 8px 30px rgba(108,99,255,0.5);
}
.track-btn:active { transform: translateY(0); }

.hint {
  margin-top: 14px; font-size: 0.82rem; color: var(--text-muted);
  display: flex; align-items: center; gap: 6px;
}
.hint i { color: var(--primary); }

/* Bulk */
textarea {
  width: 100%; min-height: 120px; background: rgba(255,255,255,0.06);
  border: 1px solid var(--card-border); border-radius: var(--radius-sm);
  color: var(--text); font-family: 'Inter', sans-serif; font-size: 0.9rem;
  padding: 14px 16px; resize: vertical; outline: none; transition: var(--transition);
  margin-bottom: 12px;
}
textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(108,99,255,0.15); }
textarea::placeholder { color: var(--text-muted); }

.bulk-actions {
  display: flex; gap: 12px; align-items: center;
}
.bulk-actions select {
  flex: 1; background: rgba(255,255,255,0.06); border: 1px solid var(--card-border);
  border-radius: var(--radius-sm); padding: 14px 16px; color: var(--text);
  font-family: 'Inter', sans-serif; font-size: 0.9rem; outline: none;
}

/* ===== STATS ===== */
.stats-row {
  display: flex; justify-content: center; gap: 40px; flex-wrap: wrap;
}
.stat { text-align: center; }
.stat span {
  display: block; font-size: 1.6rem; font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.stat p { font-size: 0.82rem; color: var(--text-muted); margin-top: 4px; }

.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ===== LIVE PARCELS TAB (bottom-right floating card) ===== */
.live-parcels-tab {
  position: fixed;
  left: max(12px, env(safe-area-inset-left, 0px));
  right: auto;
  bottom: max(12px, env(safe-area-inset-bottom, 0px));
  z-index: 8800;
  width: auto;
  max-width: min(200px, calc(100vw - 88px)); /* leave room for feedback FAB */
  pointer-events: none; /* display-only: never steal taps from page controls */
  animation: lptEnter 0.65s cubic-bezier(0.22, 1, 0.36, 1) both;
  transition: opacity 0.25s ease, transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.live-parcels-tab.lpt-tucked {
  opacity: 0;
  transform: translateY(12px) scale(0.94);
  pointer-events: none;
}
@keyframes lptEnter {
  from { opacity: 0; transform: translateY(24px) scale(0.92); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.lpt-glow {
  position: absolute;
  inset: -1.5px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(67,233,123,0.55), rgba(108,99,255,0.45), rgba(56,249,215,0.4));
  background-size: 200% 200%;
  animation: lptBorderFlow 6s linear infinite;
  filter: blur(0.4px);
  opacity: 0.85;
  z-index: 0;
}
@keyframes lptBorderFlow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.lpt-inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px 8px 8px;
  border-radius: 14px;
  background:
    radial-gradient(80px 50px at 18% 30%, rgba(67,233,123,0.14), transparent 70%),
    radial-gradient(90px 60px at 90% 90%, rgba(108,99,255,0.14), transparent 65%),
    linear-gradient(160deg, rgba(18, 20, 48, 0.96), rgba(10, 12, 32, 0.94));
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow:
    0 10px 28px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(67, 233, 123, 0.08) inset,
    0 0 24px rgba(67, 233, 123, 0.06);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.live-parcels-tab:hover .lpt-inner {
  transform: translateY(-1px);
  box-shadow:
    0 14px 32px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(67, 233, 123, 0.14) inset,
    0 0 28px rgba(67, 233, 123, 0.12);
}
.live-parcels-tab.lpt-bump .lpt-inner {
  animation: lptBump 0.7s ease;
}
@keyframes lptBump {
  0% { transform: scale(1); }
  35% { transform: scale(1.04); box-shadow: 0 14px 32px rgba(67,233,123,0.25); }
  100% { transform: scale(1); }
}

/* Animated progress ring + icon */
.lpt-ring-wrap {
  position: relative;
  width: 48px;
  height: 48px;
  flex-shrink: 0;
}
.lpt-ring {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
  display: block;
}
.lpt-ring-bg {
  fill: none;
  stroke: rgba(255,255,255,0.08);
  stroke-width: 7;
}
.lpt-ring-fg {
  fill: none;
  stroke-width: 7;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}
.lpt-ring-dot {
  transform-origin: 50px 50px;
  animation: lptOrbit 4.5s linear infinite;
}
@keyframes lptOrbit {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
.lpt-icon {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #43E97B;
  font-size: 0.85rem;
  filter: drop-shadow(0 0 8px rgba(67,233,123,0.4));
}
.lpt-pulse {
  position: absolute;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1.5px solid rgba(67,233,123,0.4);
  animation: lptPulse 2.2s ease-out infinite;
  pointer-events: none;
}
@keyframes lptPulse {
  0% { transform: scale(0.7); opacity: 0.7; }
  100% { transform: scale(1.35); opacity: 0; }
}

.lpt-body {
  min-width: 0;
  flex: 1;
  padding-right: 2px;
}
.lpt-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.9px;
  color: #43E97B;
  background: rgba(67,233,123,0.12);
  border: 1px solid rgba(67,233,123,0.28);
  padding: 2px 6px;
  border-radius: 999px;
  margin-bottom: 2px;
}
.lpt-live-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #43E97B;
  box-shadow: 0 0 6px #43E97B;
  animation: blink 1.2s ease-in-out infinite;
}
.lpt-count {
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.4px;
  background: linear-gradient(120deg, #F0F0FF 10%, #43E97B 55%, #38F9D7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0;
}
.lpt-title {
  font-size: 0.68rem;
  font-weight: 650;
  color: var(--text-muted);
  margin-top: 1px;
  white-space: nowrap;
}

/* Soft scan-line sheen */
.lpt-inner::after {
  content: '';
  position: absolute;
  top: -40%;
  left: -60%;
  width: 40%;
  height: 180%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.06), transparent);
  transform: rotate(18deg);
  animation: lptSheen 5.5s ease-in-out infinite;
  pointer-events: none;
}
@keyframes lptSheen {
  0%, 40% { left: -60%; opacity: 0; }
  50% { opacity: 1; }
  70%, 100% { left: 120%; opacity: 0; }
}

/* ===== RESULT SECTION (compact, no vertical scroll needed) ===== */
.result-section, .bulk-result-section {
  position: relative; z-index: 1; padding: 16px 4% 28px;
}
.result-container {
  max-width: 1100px; margin: 0 auto;
  background: rgba(255,255,255,0.04); border: 1px solid var(--card-border);
  border-radius: 18px; padding: 16px 20px 14px; backdrop-filter: blur(20px);
  animation: slideUp 0.4s ease;
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Top bar: Track Complete LEFT · Delivery Status RIGHT */
.result-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: nowrap;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--card-border);
}
.result-top-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  flex: 1;
}
.track-complete-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(67,233,123,0.14);
  border: 1px solid rgba(67,233,123,0.4);
  color: var(--accent);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.3px;
  white-space: nowrap;
  flex-shrink: 0;
}
.track-complete-tab i { font-size: 0.9rem; }
.result-track-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.result-courier-icon {
  width: 40px; height: 40px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem;
  background: rgba(108,99,255,0.15);
  border: 1px solid rgba(108,99,255,0.3);
  flex-shrink: 0;
}
.result-track-text {
  display: flex; flex-direction: column; gap: 2px; min-width: 0;
}
.result-awb {
  font-size: 1rem; font-weight: 800; letter-spacing: 0.5px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.result-courier-name {
  font-size: 0.78rem; color: var(--text-muted); font-weight: 500;
}

.result-top-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
  text-align: right;
}
.status-corner-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
}
.status-pill {
  padding: 8px 18px; border-radius: 50px; font-size: 0.82rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.6px;
  white-space: nowrap;
}
.status-pill-lg {
  padding: 10px 22px;
  font-size: 0.9rem;
  min-width: 140px;
  text-align: center;
}
.status-delivered { background: rgba(67,233,123,0.15); color: var(--success); border: 1px solid rgba(67,233,123,0.35); }
.status-transit { background: rgba(79,195,247,0.15); color: var(--info); border: 1px solid rgba(79,195,247,0.35); }
.status-pending { background: rgba(255,209,102,0.15); color: var(--warning); border: 1px solid rgba(255,209,102,0.35); }
.status-exception { background: rgba(255,101,132,0.15); color: var(--danger); border: 1px solid rgba(255,101,132,0.35); }

.live-badge-sm {
  padding: 3px 10px !important;
  font-size: 0.68rem !important;
}

/* Legacy header (errors / fallbacks) */
.result-header {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px; margin-bottom: 16px;
}
.result-info { display: flex; align-items: center; gap: 12px; }
.courier-badge {
  width: 48px; height: 48px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; background: rgba(108,99,255,0.15);
  border: 1px solid rgba(108,99,255,0.3);
}
.result-info h3 { font-size: 1.05rem; font-weight: 700; letter-spacing: 1px; }
.result-info p { font-size: 0.82rem; color: var(--text-muted); margin-top: 2px; }

/* Progress Steps — compact flight path */
.progress-section { margin-bottom: 12px; }
.progress-compact { margin-bottom: 10px; }

/* ===== FLIGHT PROGRESS — plane locked to milestones ===== */
.flight-progress {
  background: linear-gradient(180deg, rgba(108,99,255,0.07), transparent 80%);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 18px 12px 14px;
}
.flight-rail {
  position: relative;
  width: 100%;
  /* room above markers for the plane badge */
  padding-top: 8px;
}

/* Line only between first and last milestone (JS sets left + width) */
.flight-corridor {
  position: absolute;
  top: 20px; /* vertical center of 26px markers (+ padding) */
  left: 0;
  width: 0;
  height: 4px;
  background: rgba(255,255,255,0.1);
  border-radius: 999px;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.flight-corridor-fill {
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), #8b84ff, var(--accent));
  box-shadow: 0 0 12px rgba(108,99,255,0.4);
  transition: width 1.05s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Plane: left is set in px to marker center; centered with translateX */
.flight-plane {
  position: absolute;
  top: 2px;
  left: 0;
  z-index: 5;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #5a52e0);
  color: #fff;
  font-size: 0.88rem;
  box-shadow:
    0 4px 16px rgba(108,99,255,0.5),
    0 0 0 3px rgba(15,15,42,0.95);
  transform: translateX(-50%);
  transition: left 1.05s cubic-bezier(0.4, 0, 0.2, 1), background 0.35s ease, box-shadow 0.35s ease;
  pointer-events: none;
  will-change: left;
}
/* SVG plane already faces right — no CSS rotate */
.flight-plane .plane-svg {
  width: 1.05em;
  height: 1.05em;
  display: block;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.35));
}
.plane-svg-sm {
  width: 0.85em;
  height: 0.85em;
  vertical-align: -0.1em;
  margin-right: 2px;
}
.flight-plane-glow {
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(108,99,255,0.4), transparent 70%);
  z-index: -1;
  opacity: 0.65;
}
.flight-plane.flying .flight-plane-glow {
  animation: planeGlow 1.05s ease-in-out;
}
.flight-plane.landed {
  background: linear-gradient(135deg, var(--accent), #2bbf6a);
  box-shadow:
    0 4px 16px rgba(67,233,123,0.5),
    0 0 0 3px rgba(15,15,42,0.95);
}
@keyframes planeGlow {
  0%, 100% { opacity: 0.45; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.3); }
}

/* Equal milestone columns — plane lands on each marker center */
.flight-milestones {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  width: 100%;
}
.flight-ms {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}
.flight-ms .step-marker {
  /* Keep marker on the corridor line */
  position: relative;
  z-index: 2;
}

/* Legacy classes still used elsewhere */
.progress-steps {
  display: flex; justify-content: space-between; margin-bottom: 0; position: relative;
}
.progress-step {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  flex: 1; position: relative; z-index: 1;
}
.step-dot {
  width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.72rem; border: 2px solid var(--card-border);
  background: var(--bg2); transition: var(--transition);
}
.step-dot.done { background: var(--primary); border-color: var(--primary); color: #fff; }
.step-dot.active { background: var(--accent); border-color: var(--accent); color: #000; box-shadow: 0 0 12px rgba(67,233,123,0.4); }

/* Milestone markers — plane covers the active one (empty slot) */
.step-marker {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  border: 1.5px solid rgba(255,255,255,0.12);
  background: rgba(15,15,42,0.98);
  color: var(--text-muted);
  transition: var(--transition);
  box-shadow: 0 0 0 3px rgba(15,15,42,0.9);
}
.step-marker.done {
  background: rgba(108,99,255,0.28);
  border-color: rgba(108,99,255,0.7);
  color: #d4d0ff;
}
.step-marker.active {
  /* Transparent hole under the plane so it looks "on" this milestone */
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  color: transparent;
}
.ms-plane-slot {
  display: block;
  width: 8px;
  height: 8px;
}
.step-label {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-align: center;
  max-width: 76px;
  line-height: 1.25;
  font-weight: 500;
}
.step-label.done, .step-label.active { color: var(--text); font-weight: 600; }
.step-label.active { color: var(--accent); }

.progress-bar-wrap {
  height: 5px; background: rgba(255,255,255,0.08); border-radius: 3px; overflow: hidden;
}
.progress-bar-fill {
  height: 100%; border-radius: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transition: width 1s ease; width: 0%;
}

/* Meta chips row (replaces tall info cards grid) */
.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--card-border);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text);
  max-width: 100%;
}
.meta-chip i { color: var(--primary); font-size: 0.7rem; }

/* Timeline — horizontal only (no vertical list) */
.timeline-wrap { margin-bottom: 10px; }
.timeline-compact { margin-bottom: 8px; }
.timeline-title-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-bottom: 6px;
}
.timeline-wrap h4, .timeline-title-row h4 {
  font-size: 0.85rem; font-weight: 700; margin: 0;
  display: flex; align-items: center; gap: 8px; color: var(--text-muted);
}
.timeline-wrap h4 i, .timeline-title-row h4 i { color: var(--primary); }
.timeline-hint {
  font-size: 0.7rem; font-weight: 500; color: var(--text-muted);
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
}
.timeline-hint i { color: var(--primary); font-size: 0.68rem; }
.timeline-empty {
  color: var(--text-muted); font-size: 0.82rem; margin: 4px 0 0;
}

.timeline-scroll {
  position: relative;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 4px 2px 10px;
  margin: 0 -2px;
  scrollbar-width: thin;
  scrollbar-color: rgba(108,99,255,0.5) rgba(255,255,255,0.06);
}
.timeline-scroll::-webkit-scrollbar { height: 7px; }
.timeline-scroll::-webkit-scrollbar-track {
  background: rgba(255,255,255,0.06); border-radius: 4px;
}
.timeline-scroll::-webkit-scrollbar-thumb {
  background: rgba(108,99,255,0.45); border-radius: 4px;
}
.timeline-scroll::-webkit-scrollbar-thumb:hover {
  background: rgba(108,99,255,0.7);
}

.timeline {
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 0;
  min-width: min-content;
  /* Top pad so continuous bar + plane sit in the track row */
  padding: 22px 12px 4px;
}

/*
 * Big continuous flight bar — runs through the CENTER of every marker/plane.
 * left/right inset = half item width so the bar starts/ends at first/last marker center.
 * Item is 170px → half ≈ 85px; use 85px so line sits under plane direction.
 */
.timeline::before {
  content: '';
  position: absolute;
  left: 85px;   /* center of first 170px item */
  right: 85px;  /* center of last item */
  top: 38px;    /* vertical center of marker row (22px pad + ~16px) */
  height: 4px;
  background: linear-gradient(90deg,
    rgba(108,99,255,0.95),
    rgba(108,99,255,0.7) 40%,
    rgba(67,233,123,0.75) 85%,
    rgba(67,233,123,0.9));
  border-radius: 999px;
  z-index: 0;
  box-shadow:
    0 0 12px rgba(108,99,255,0.35),
    0 0 2px rgba(67,233,123,0.25);
  pointer-events: none;
}

.timeline-item {
  position: relative;
  z-index: 1;
  flex: 0 0 170px;
  width: 170px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0 8px;
  animation: fadeIn 0.35s ease;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.timeline-item::before { display: none; content: none; }

/* Markers sit ON the continuous bar (plane in the middle of the line) */
.tl-marker {
  width: 36px;
  height: 36px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  z-index: 2; /* above the bar so plane rides on the line */
}
.tl-marker.dot .tl-check {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.55rem;
  background: rgba(15,15,42,0.95);
  border: 2px solid rgba(108,99,255,0.75);
  color: #cfcbff;
  /* ring matches bar so check sits in the line */
  box-shadow:
    0 0 0 3px rgba(15,15,42,0.95),
    0 0 10px rgba(108,99,255,0.35);
}
.tl-marker.plane .tl-plane {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  font-size: 0.9rem;
  /* plane badge sits centered on the continuous bar */
  box-shadow:
    0 0 0 4px rgba(15,15,42,0.95),
    0 4px 18px rgba(67,233,123,0.45),
    0 0 22px rgba(108,99,255,0.4);
  animation: tlPlaneFloat 2.2s ease-in-out infinite;
}
.tl-marker.plane .tl-plane .plane-svg {
  width: 1.05em;
  height: 1.05em;
  display: block;
}
@keyframes tlPlaneFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-2px); }
}

.timeline-card {
  width: 100%;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 10px 8px;
  min-height: 88px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: var(--transition);
}
.timeline-item.latest .timeline-card {
  border-color: rgba(67,233,123,0.45);
  background: linear-gradient(160deg, rgba(67,233,123,0.1), rgba(108,99,255,0.08));
  box-shadow: 0 6px 20px rgba(67,233,123,0.08);
}
.timeline-card:hover {
  border-color: rgba(108,99,255,0.4);
  transform: translateY(-2px);
}

.tl-date {
  font-size: 0.66rem;
  color: var(--text-muted);
  line-height: 1.3;
  word-break: break-word;
}
.tl-status {
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
}
.timeline-item.latest .tl-status { color: var(--accent); }
.tl-location {
  font-size: 0.68rem;
  color: var(--text-muted);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 4px;
  line-height: 1.3;
  margin-top: auto;
}
.tl-location i {
  color: var(--secondary);
  font-size: 0.65rem;
  margin-top: 2px;
  flex-shrink: 0;
}

.result-footer-compact {
  margin-top: 4px;
  padding-top: 10px;
  border-top: 1px solid var(--card-border);
  justify-content: flex-end !important;
}
.result-footer-actions {
  display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
}
.btn-sm, a.btn-sm {
  padding: 8px 14px !important;
  font-size: 0.8rem !important;
}
.redirect-btn.btn-sm {
  display: inline-flex; align-items: center; gap: 6px;
  text-decoration: none;
}

@media (max-width: 768px) {
  .result-topbar {
    flex-wrap: wrap;
    align-items: flex-start;
  }
  .result-top-left { width: 100%; }
  .result-top-right {
    width: 100%;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    text-align: left;
  }
  .timeline-item { flex: 0 0 150px; width: 150px; }
  .timeline::before { left: 75px; right: 75px; top: 36px; }
  .timeline-card { min-height: 84px; padding: 8px 6px; }
  .tl-status { font-size: 0.74rem; }
  .track-complete-tab { font-size: 0.72rem; padding: 6px 10px; }
  .flight-progress { padding: 14px 8px 12px; }
  .flight-plane { width: 32px; height: 32px; font-size: 0.78rem; top: 4px; }
  .flight-corridor { top: 18px; height: 3px; }
  .step-marker { width: 26px; height: 26px; }
  .step-label { font-size: 0.58rem; max-width: 56px; }
  .tl-marker.plane .tl-plane { width: 34px; height: 34px; font-size: 0.8rem; }
}

/* Info Cards */
.info-cards {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px; margin-bottom: 28px;
}
.info-card {
  background: rgba(255,255,255,0.04); border: 1px solid var(--card-border);
  border-radius: var(--radius-sm); padding: 16px;
}
.info-card-label { font-size: 0.75rem; color: var(--text-muted); margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.5px; }
.info-card-value { font-size: 0.95rem; font-weight: 600; }

.track-again-btn {
  background: transparent; border: 1px solid var(--primary); color: var(--primary);
  padding: 12px 24px; border-radius: var(--radius-sm); font-family: 'Inter', sans-serif;
  font-size: 0.9rem; font-weight: 600; cursor: pointer; transition: var(--transition);
  display: flex; align-items: center; gap: 8px;
}
.track-again-btn:hover { background: var(--primary); color: #fff; }

/* ===== BULK TABLE ===== */
.bulk-table-wrap { overflow-x: auto; margin-top: 20px; }
.bulk-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.bulk-table th {
  padding: 12px 16px; text-align: left; font-weight: 600;
  color: var(--text-muted); border-bottom: 1px solid var(--card-border);
  font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.5px;
}
.bulk-table td {
  padding: 14px 16px; border-bottom: 1px solid rgba(255,255,255,0.04);
  vertical-align: middle;
}
.bulk-table tr:hover td { background: rgba(255,255,255,0.03); }
.bulk-status { padding: 4px 12px; border-radius: 50px; font-size: 0.78rem; font-weight: 600; }
.bulk-track-btn {
  background: rgba(108,99,255,0.15); border: 1px solid rgba(108,99,255,0.3);
  color: var(--primary); padding: 6px 14px; border-radius: 8px;
  font-size: 0.8rem; font-weight: 600; cursor: pointer; transition: var(--transition);
  font-family: 'Inter', sans-serif;
}
.bulk-track-btn:hover { background: var(--primary); color: #fff; }

/* ===== COURIERS SECTION ===== */
.couriers-section, .how-section, .faq-section {
  position: relative; z-index: 1; padding: 80px 5%;
}
.section-header { text-align: center; margin-bottom: 50px; }
.section-header h2 { font-size: clamp(1.8rem, 3vw, 2.6rem); font-weight: 800; margin-bottom: 12px; }
.section-header p { color: var(--text-muted); font-size: 1rem; }

.couriers-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px; max-width: 1100px; margin: 0 auto;
}
.courier-card {
  background: var(--card); border: 1px solid var(--card-border);
  border-radius: var(--radius); padding: 24px 16px; text-align: center;
  cursor: pointer; transition: var(--transition);
}
.courier-card:hover {
  border-color: var(--primary); transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(108,99,255,0.2);
}
.courier-card .c-icon { font-size: 2rem; margin-bottom: 10px; }
.courier-card .c-name { font-size: 0.85rem; font-weight: 600; }
.courier-card .c-type { font-size: 0.72rem; color: var(--text-muted); margin-top: 4px; }

/* ===== HOW IT WORKS ===== */
.steps-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px; max-width: 900px; margin: 0 auto;
}
.step-card {
  background: var(--card); border: 1px solid var(--card-border);
  border-radius: var(--radius); padding: 32px 24px; text-align: center;
  position: relative; transition: var(--transition);
}
.step-card:hover { border-color: var(--primary); transform: translateY(-4px); }
.step-icon {
  width: 64px; height: 64px; border-radius: 18px; margin: 0 auto 16px;
  background: rgba(108,99,255,0.15); border: 1px solid rgba(108,99,255,0.3);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; color: var(--primary);
}
.step-num {
  position: absolute; top: 20px; right: 20px;
  font-size: 2.5rem; font-weight: 900; color: rgba(108,99,255,0.1);
  line-height: 1;
}
.step-card h4 { font-size: 1rem; font-weight: 700; margin-bottom: 10px; }
.step-card p { font-size: 0.88rem; color: var(--text-muted); line-height: 1.6; }

/* ===== FAQ ===== */
.faq-list { max-width: 720px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.faq-item {
  background: var(--card); border: 1px solid var(--card-border);
  border-radius: var(--radius-sm); overflow: hidden; transition: var(--transition);
}
.faq-item.open { border-color: rgba(108,99,255,0.4); }
.faq-q {
  padding: 18px 20px; display: flex; justify-content: space-between; align-items: center;
  cursor: pointer; font-weight: 600; font-size: 0.95rem;
}
.faq-q i { color: var(--primary); transition: var(--transition); }
.faq-item.open .faq-q i { transform: rotate(180deg); }
.faq-a {
  max-height: 0; overflow: hidden; transition: max-height 0.4s ease, padding 0.3s ease;
  font-size: 0.88rem; color: var(--text-muted); line-height: 1.7;
  padding: 0 20px;
}
.faq-item.open .faq-a { max-height: 200px; padding: 0 20px 18px; }

/* ===== FOOTER ===== */
.footer {
  position: relative; z-index: 1;
  border-top: 1px solid var(--card-border);
  padding: 60px 5% 0;
}
.footer-content {
  display: grid; grid-template-columns: 2fr 1fr 1fr;
  gap: 40px; max-width: 1100px; margin: 0 auto; padding-bottom: 40px;
}
.footer-brand i { font-size: 1.8rem; color: var(--primary); }
.footer-brand span { display: block; font-size: 1.3rem; font-weight: 800; margin: 8px 0 6px; }
.footer-brand p { font-size: 0.85rem; color: var(--text-muted); }
.footer-links h5, .footer-couriers h5 {
  font-size: 0.85rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1px; color: var(--text-muted); margin-bottom: 16px;
}
.footer-links a, .footer-couriers a {
  display: block; color: var(--text-muted); text-decoration: none;
  font-size: 0.88rem; margin-bottom: 10px; transition: var(--transition);
}
.footer-links a:hover, .footer-couriers a:hover { color: var(--primary); }
.footer-bottom {
  border-top: 1px solid var(--card-border); padding: 20px 0;
  text-align: center; font-size: 0.82rem; color: var(--text-muted);
  max-width: 1100px; margin: 0 auto;
}

/* ===== LOADING OVERLAY ===== */
.loading-overlay {
  position: fixed; inset: 0; z-index: 999;
  background: rgba(10,10,26,0.85); backdrop-filter: blur(10px);
  display: none; align-items: center; justify-content: center;
  pointer-events: none;
}
.loading-overlay.active {
  display: flex;
  pointer-events: auto;
}
.loader-box { text-align: center; }
.loader-ring {
  width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 20px;
  border: 3px solid rgba(108,99,255,0.2);
  border-top-color: var(--primary);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loader-box p { font-size: 0.95rem; color: var(--text-muted); margin-bottom: 16px; }
.loader-steps { display: flex; flex-direction: column; gap: 8px; }
.loader-step {
  font-size: 0.82rem; color: var(--text-muted);
  display: flex; align-items: center; gap: 8px; justify-content: center;
}
.loader-step.done { color: var(--accent); }
.loader-step i { font-size: 0.75rem; }

/* ===== TOAST ===== */
.toast {
  position: fixed; bottom: 100px; right: 28px; z-index: 9999;
  background: rgba(30,30,60,0.95); border: 1px solid var(--card-border);
  border-radius: var(--radius-sm); padding: 14px 20px;
  font-size: 0.88rem; font-weight: 500; backdrop-filter: blur(20px);
  transform: translateY(100px); opacity: 0; transition: var(--transition);
  max-width: 320px;
  pointer-events: none; /* never block taps when hidden */
}
.toast.show {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}
.toast.success { border-color: rgba(67,233,123,0.4); color: var(--success); }
.toast.error { border-color: rgba(255,101,132,0.4); color: var(--danger); }
.toast.info { border-color: rgba(108,99,255,0.4); color: var(--primary); }

/* ===== FEEDBACK WIDGET (bottom-right) ===== */
.feedback-widget {
  position: fixed;
  bottom: max(16px, env(safe-area-inset-bottom, 0px));
  right: max(16px, env(safe-area-inset-right, 0px));
  z-index: 9000;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  /* IMPORTANT: shrink-wrap to FAB only when panel closed so it never blocks taps */
  width: auto;
  height: auto;
  max-width: none;
  pointer-events: none; /* pass-through empty space; children re-enable */
  font-family: 'Inter', sans-serif;
}
.feedback-widget > * {
  pointer-events: auto;
}

.feedback-fab {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  box-shadow: 0 8px 28px rgba(108, 99, 255, 0.45);
  transition: var(--transition);
}
.feedback-fab:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 12px 36px rgba(108, 99, 255, 0.55);
}
.feedback-fab:active { transform: scale(0.98); }
.feedback-fab i { font-size: 1.15rem; }
.feedback-fab.open {
  background: rgba(30, 30, 60, 0.95);
  border: 1px solid var(--card-border);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

.feedback-panel {
  /* Closed: take ZERO layout space so mobile taps are never blocked */
  position: absolute;
  right: 0;
  bottom: calc(100% + 12px);
  width: min(380px, calc(100vw - 32px));
  max-height: min(70vh, 520px);
  overflow: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: rgba(15, 15, 42, 0.96);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  backdrop-filter: blur(24px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45), var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px) scale(0.96);
  transform-origin: bottom right;
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
  pointer-events: none;
  display: none; /* hard-remove from hit-testing when closed */
}
.feedback-panel.open {
  display: block;
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.feedback-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 18px 12px;
  border-bottom: 1px solid var(--card-border);
}
.feedback-panel-header h4 {
  font-size: 1.05rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.feedback-panel-header h4 i { color: var(--primary); }
.feedback-panel-header p {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.45;
  max-width: 280px;
}
.feedback-close {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid var(--card-border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  flex-shrink: 0;
}
.feedback-close:hover {
  color: var(--text);
  border-color: rgba(255, 101, 132, 0.4);
  background: rgba(255, 101, 132, 0.1);
}

.feedback-form { padding: 16px 18px 18px; }

.feedback-types {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}
.feedback-type {
  cursor: pointer;
  user-select: none;
}
.feedback-type input { position: absolute; opacity: 0; pointer-events: none; }
.feedback-type span {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 6px;
  border-radius: 10px;
  border: 1px solid var(--card-border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 600;
  transition: var(--transition);
  text-align: center;
}
.feedback-type input:checked + span {
  color: var(--text);
  border-color: rgba(108, 99, 255, 0.55);
  background: rgba(108, 99, 255, 0.15);
  box-shadow: 0 0 0 1px rgba(108, 99, 255, 0.2);
}
.feedback-type:hover span {
  border-color: rgba(108, 99, 255, 0.35);
  color: var(--text);
}

.feedback-field { margin-bottom: 12px; }
.feedback-field label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.feedback-field label span { font-weight: 400; opacity: 0.8; }
.feedback-field label .req { color: var(--secondary); opacity: 1; }
.feedback-field input,
.feedback-field textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  padding: 11px 12px;
  outline: none;
  transition: var(--transition);
  resize: vertical;
}
.feedback-field input::placeholder,
.feedback-field textarea::placeholder { color: rgba(240, 240, 255, 0.35); }
.feedback-field input:focus,
.feedback-field textarea:focus {
  border-color: rgba(108, 99, 255, 0.55);
  background: rgba(108, 99, 255, 0.08);
  box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.12);
}
.feedback-char {
  text-align: right;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.feedback-submit {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: 12px;
  padding: 13px 16px;
  font-family: 'Inter', sans-serif;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  box-shadow: 0 4px 18px rgba(108, 99, 255, 0.35);
  transition: var(--transition);
  margin-top: 4px;
}
.feedback-submit:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(108, 99, 255, 0.45);
}
.feedback-submit:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}
.feedback-submit.secondary {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--card-border);
  box-shadow: none;
  color: var(--text);
  margin-top: 12px;
}
.feedback-submit.secondary:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(108, 99, 255, 0.1);
}

.feedback-success {
  padding: 28px 22px 22px;
  text-align: center;
}
.feedback-success-icon {
  font-size: 2.4rem;
  color: var(--accent);
  margin-bottom: 10px;
}
.feedback-success h4 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.feedback-success p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* ===== RESPONSIVE / MOBILE USABILITY ===== */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .input-group {
    flex-direction: column;
    gap: 10px;
  }
  .select-wrap,
  .track-input-wrap {
    min-width: 0;
    width: 100%;
    min-height: 48px;
  }
  .track-btn {
    width: 100%;
    justify-content: center;
    display: inline-flex;
    align-items: center;
    gap: 8px;
  }
  .tab {
    min-height: 44px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }
  .footer-content { grid-template-columns: 1fr; }
  .stats-row { gap: 24px; }
  .progress-steps { gap: 4px; }
  .step-label { font-size: 0.65rem; max-width: 55px; }
  .result-header { flex-direction: column; align-items: flex-start; }

  /* Keep floating chrome from covering primary actions */
  .hero {
    padding-bottom: 88px; /* space above bottom widgets */
  }
  body.result-open .hero {
    padding-bottom: 24px;
  }
  .result-section,
  .bulk-result-section {
    padding-bottom: 96px;
  }

  /* Full-width bulk track stack */
  .bulk-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .bulk-actions select,
  .bulk-actions .track-btn {
    width: 100%;
    min-height: 48px;
  }

  textarea {
    font-size: 16px; /* prevent iOS zoom */
    min-height: 110px;
  }
}
@media (max-width: 480px) {
  .track-card { padding: 16px; border-radius: 18px; }
  .result-container { padding: 16px; }
  .hero { padding: 96px 4% 88px; }
  .hero h1 { font-size: clamp(1.7rem, 7vw, 2.4rem); }
  .hint { font-size: 0.75rem; line-height: 1.4; align-items: flex-start; text-align: left; }

  .live-parcels-tab {
    left: max(10px, env(safe-area-inset-left, 0px));
    bottom: max(10px, env(safe-area-inset-bottom, 0px));
    max-width: min(168px, calc(100vw - 84px));
  }
  .lpt-ring-wrap { width: 40px; height: 40px; }
  .lpt-icon { font-size: 0.75rem; }
  .lpt-pulse { width: 24px; height: 24px; }
  .lpt-count { font-size: 1.05rem; }
  .lpt-title { font-size: 0.6rem; }
  .lpt-badge { font-size: 0.54rem; padding: 1px 5px; }
  .lpt-inner { padding: 5px 8px 5px 5px; gap: 7px; border-radius: 12px; }

  .feedback-widget {
    bottom: max(12px, env(safe-area-inset-bottom, 0px));
    right: max(12px, env(safe-area-inset-right, 0px));
  }
  .feedback-fab-label { display: none; }
  .feedback-fab {
    width: 56px;
    height: 56px;
    padding: 0;
    border-radius: 50%;
    justify-content: center;
  }
  .feedback-fab i { font-size: 1.3rem; }
  .feedback-panel {
    width: min(360px, calc(100vw - 24px));
    max-height: min(65vh, 480px);
  }

  .toast {
    bottom: 84px;
    left: 12px;
    right: 12px;
    max-width: none;
  }
}

/* ===== REDIRECT CARD ===== */
.redirect-card {
  display: flex; align-items: flex-start; gap: 20px; flex-wrap: wrap;
  background: rgba(108,99,255,0.08); border: 1px solid rgba(108,99,255,0.3);
  border-radius: var(--radius); padding: 28px; margin-bottom: 20px;
}
.redirect-icon { font-size: 3rem; flex-shrink: 0; }
.redirect-info { flex: 1; min-width: 200px; }
.redirect-info h4 { font-size: 1.05rem; font-weight: 700; margin-bottom: 8px; }
.redirect-info p { font-size: 0.88rem; color: var(--text-muted); line-height: 1.6; margin-bottom: 10px; }
.redirect-url {
  font-size: 0.75rem; color: var(--primary); word-break: break-all;
  background: rgba(108,99,255,0.1); padding: 6px 10px; border-radius: 6px;
  font-family: monospace;
}
.redirect-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff; text-decoration: none; padding: 14px 24px;
  border-radius: var(--radius-sm); font-weight: 700; font-size: 0.95rem;
  transition: var(--transition); white-space: nowrap; align-self: center;
  box-shadow: 0 4px 20px rgba(108,99,255,0.4);
}
.redirect-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(108,99,255,0.5); }

/* ===== WARN BOX ===== */
.warn-box {
  display: flex; align-items: flex-start; gap: 14px;
  background: rgba(255,209,102,0.08); border: 1px solid rgba(255,209,102,0.3);
  border-radius: var(--radius-sm); padding: 16px 20px; margin-bottom: 20px;
}
.warn-box i { color: var(--warning); font-size: 1.1rem; margin-top: 2px; flex-shrink: 0; }
.warn-box strong { display: block; font-size: 0.9rem; color: var(--warning); margin-bottom: 4px; }
.warn-box p { font-size: 0.82rem; color: var(--text-muted); font-family: monospace; }

/* ===== WHY BOX ===== */
.why-box {
  display: flex; align-items: flex-start; gap: 14px;
  background: rgba(67,233,123,0.06); border: 1px solid rgba(67,233,123,0.2);
  border-radius: var(--radius-sm); padding: 16px 20px; margin-bottom: 20px;
}
.why-icon { font-size: 1.3rem; color: var(--accent); flex-shrink: 0; margin-top: 2px; }
.why-box strong { display: block; font-size: 0.88rem; color: var(--accent); margin-bottom: 4px; }
.why-box p { font-size: 0.82rem; color: var(--text-muted); line-height: 1.6; }

/* ===== ALT COURIERS ===== */
.alt-couriers { margin-bottom: 24px; }
.alt-couriers > p { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 12px; display: flex; align-items: center; gap: 6px; }
.alt-couriers > p i { color: var(--primary); }
.alt-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.alt-courier-btn {
  background: rgba(255,255,255,0.05); border: 1px solid var(--card-border);
  color: var(--text); padding: 7px 14px; border-radius: 8px;
  font-size: 0.82rem; font-weight: 500; cursor: pointer;
  font-family: 'Inter', sans-serif; transition: var(--transition);
}
.alt-courier-btn:hover { border-color: var(--primary); color: var(--primary); background: rgba(108,99,255,0.1); }

/* ===== NOT FOUND BOX ===== */
.not-found-box { text-align: center; padding: 20px 0; }
.nf-icon { font-size: 4rem; margin-bottom: 16px; }
.not-found-box h3 { font-size: 1.3rem; font-weight: 700; margin-bottom: 10px; }
.not-found-box > p { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 8px; }
.nf-tips {
  text-align: left; background: rgba(255,255,255,0.04); border: 1px solid var(--card-border);
  border-radius: var(--radius-sm); padding: 20px 24px; margin: 20px 0;
}
.nf-tips strong { display: block; font-size: 0.88rem; margin-bottom: 12px; color: var(--text-muted); }
.nf-tips ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.nf-tips li { font-size: 0.85rem; color: var(--text-muted); }

/* ===== SERVER STATUS ===== */
.server-status {
  display: flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.05); border: 1px solid var(--card-border);
  padding: 6px 14px; border-radius: 50px; font-size: 0.78rem; font-weight: 500;
}
.server-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--warning); transition: var(--transition);
  animation: blink 1.5s ease-in-out infinite;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0.4} }
.server-label { color: var(--text-muted); white-space: nowrap; }

/* ===== LIVE BADGE ===== */
.result-footer {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px;
}
.live-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(67,233,123,0.1); border: 1px solid rgba(67,233,123,0.3);
  color: var(--accent); padding: 6px 14px; border-radius: 50px;
  font-size: 0.78rem; font-weight: 700;
}
.live-badge i { font-size: 0.5rem; animation: blink 1s infinite; }

/* ===== ERROR BOX ===== */
.error-box { text-align: center; padding: 20px 0; }
.error-icon { font-size: 3.5rem; margin-bottom: 16px; }
.error-box h3 { font-size: 1.2rem; font-weight: 700; margin-bottom: 10px; color: var(--warning); }
.error-box > p { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 20px; line-height: 1.6; }
.server-tip {
  background: rgba(255,255,255,0.04); border: 1px solid var(--card-border);
  border-radius: var(--radius-sm); padding: 16px 20px; margin-bottom: 20px;
  text-align: left;
}
.server-tip strong { display: block; font-size: 0.85rem; margin-bottom: 10px; color: var(--text-muted); }
.server-tip code {
  display: block; background: rgba(108,99,255,0.15); color: var(--primary);
  padding: 10px 14px; border-radius: 8px; font-size: 0.95rem;
  font-family: monospace; margin-bottom: 8px; letter-spacing: 0.5px;
}
.server-tip span { font-size: 0.82rem; color: var(--text-muted); }
.server-tip a { color: var(--primary); }

@media (max-width: 768px) {
  .server-status { display: none; }
}


