* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* iOS San Francisco Font System */
  --font-system: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-mono: "SF Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  --bg-primary: #e8eaed;
  --bg-secondary: #f4f5f7;
  --bg-tertiary: #fafbfc;
  --bg-card: #fdfdfd;
  --border-color: #d1d5db;
  --border-light: #e5e7eb;
  --text-primary: #1f2937;
  --text-secondary: #4b5563;
  --text-muted: #6b7280;
  --accent-blue: #1e40af;
  --accent-green: #059669;
  --accent-yellow: #d97706;
  --accent-red: #b91c1c;
  --status-processing: #d97706;
  --status-transit: #1e40af;
  --status-hold: #b91c1c;
  --status-delivered: #059669;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 2px 4px rgba(0,0,0,0.06), 0 4px 6px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 15px rgba(0,0,0,0.06);
  --shadow-card: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);

  /* Status badge colors - semantic and accessible */
  --status-verified-bg: rgba(16, 185, 129, 0.1);
  --status-verified-border: rgba(16, 185, 129, 0.3);
  --status-verified-text: #047857;

  --status-hold-bg: rgba(239, 68, 68, 0.1);
  --status-hold-border: rgba(239, 68, 68, 0.3);
  --status-hold-text: #b91c1c;

  --status-transit-bg: rgba(59, 130, 246, 0.1);
  --status-transit-border: rgba(59, 130, 246, 0.3);
  --status-transit-text: #1e40af;

  --status-warning-bg: rgba(245, 158, 11, 0.1);
  --status-warning-border: rgba(245, 158, 11, 0.3);
  --status-warning-text: #d97706;
}

/* Dark theme variables */
body.dark-theme {
  --bg-primary: #0a0e14;
  --bg-secondary: #121820;
  --bg-tertiary: #1a1f28;
  --bg-card: #1e2430;
  --border-color: #2d3748;
  --border-light: #374151;
  --text-primary: #e2e8f0;
  --text-secondary: #cbd5e0;
  --text-muted: #a0aec0;
  --accent-blue: #3b82f6;
  --accent-green: #10b981;
  --accent-yellow: #f59e0b;
  --accent-red: #ef4444;
  --status-processing: #f59e0b;
  --status-transit: #3b82f6;
  --status-hold: #ef4444;
  --status-delivered: #10b981;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
  --shadow-md: 0 2px 4px rgba(0,0,0,0.4), 0 4px 6px rgba(0,0,0,0.3);
  --shadow-lg: 0 10px 15px rgba(0,0,0,0.5);
  --shadow-card: 0 2px 4px rgba(0,0,0,0.5), 0 1px 2px rgba(0,0,0,0.3);

  /* Status badge colors - dark theme */
  --status-verified-bg: rgba(16, 185, 129, 0.15);
  --status-verified-border: rgba(16, 185, 129, 0.4);
  --status-verified-text: #34d399;

  --status-hold-bg: rgba(239, 68, 68, 0.15);
  --status-hold-border: rgba(239, 68, 68, 0.4);
  --status-hold-text: #f87171;

  --status-transit-bg: rgba(59, 130, 246, 0.15);
  --status-transit-border: rgba(59, 130, 246, 0.4);
  --status-transit-text: #60a5fa;

  --status-warning-bg: rgba(245, 158, 11, 0.15);
  --status-warning-border: rgba(245, 158, 11, 0.4);
  --status-warning-text: #fbbf24;
}

body {
  font-family: var(--font-system);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 20px;
}

header {
  background-color: var(--bg-secondary);
  border-bottom: 2px solid var(--border-color);
  padding: 20px 0;
  box-shadow: var(--shadow-sm);
}

.header-content {
  margin-bottom: 15px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.brand-logo {
  flex-shrink: 0;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* Typography Hierarchy */
header h1 {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--text-primary);
  margin: 0;
  line-height: 1.2;
}

.subtitle {
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  margin: 0;
}

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

.theme-toggle {
  padding: 6px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  background-color: var(--bg-card);
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.theme-toggle:hover {
  border-color: var(--accent-blue);
  background-color: var(--bg-tertiary);
}

.theme-toggle:focus {
  outline: none;
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 2px rgba(30, 64, 175, 0.1);
}

.language-selector {
  padding: 6px 10px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  background-color: var(--bg-card);
  color: var(--text-primary);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}

.language-selector:hover {
  border-color: var(--accent-blue);
}

.language-selector:focus {
  outline: none;
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 2px rgba(30, 64, 175, 0.1);
}

.version {
  font-size: 10px;
  color: var(--text-muted);
  font-family: monospace;
  background: var(--bg-tertiary);
  padding: 4px 8px;
  border-radius: 3px;
  border: 1px solid var(--border-light);
}

nav {
  display: flex;
  gap: 30px;
  border-top: 1px solid var(--border-color);
  padding-top: 15px;
}

nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: color 0.2s;
}

nav a:hover {
  color: var(--text-primary);
}

nav a.active {
  color: var(--accent-blue);
}

main {
  flex: 1;
  padding: 40px 0;
}

h2 {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text-primary);
  line-height: 1.3;
  letter-spacing: -0.02em;
}

h3 {
  font-size: 18px;
  font-weight: 600;
  margin-top: 30px;
  margin-bottom: 12px;
  color: var(--text-primary);
  line-height: 1.4;
  letter-spacing: -0.01em;
}

.section-description {
  color: var(--text-secondary);
  margin-bottom: 30px;
  font-size: 14px;
}

.tracking-section {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 32px;
  margin-bottom: 30px;
  box-shadow: var(--shadow-card);
}

.tracking-form {
  margin-top: 20px;
}

.input-group {
  margin-bottom: 20px;
}

.input-group label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Enhanced Search Input */
.input-group input {
  width: 100%;
  max-width: 300px;
  padding: 14px 16px;
  background-color: var(--bg-secondary);
  border: 2px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 16px;
  font-family: monospace;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.02);
}

/* Hover state - subtle lift */
.input-group input:hover:not(:focus) {
  border-color: var(--border-light);
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.06), 0 2px 4px rgba(0,0,0,0.04);
  transform: translateY(-1px);
}

/* Focus state - clear visual feedback */
.input-group input:focus {
  outline: none;
  border-color: var(--accent-blue);
  background-color: var(--bg-card);
  box-shadow: 0 0 0 4px rgba(3, 102, 214, 0.12), 0 2px 8px rgba(3, 102, 214, 0.08);
  transform: translateY(-1px);
}

/* Placeholder - helpful hints */
.input-group input::placeholder {
  color: var(--text-muted);
  font-style: italic;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.input-group input:focus::placeholder {
  opacity: 0.5;
}

/* Enhanced Action Button */
.btn-primary {
  padding: 14px 32px;
  background: linear-gradient(180deg, var(--accent-blue) 0%, #2c5aa0 100%);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 4px rgba(3, 102, 214, 0.2), 0 1px 2px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

/* Hover state - elevate and brighten */
.btn-primary:hover:not(:disabled) {
  background: linear-gradient(180deg, #2c5aa0 0%, #1e3a8a 100%);
  box-shadow: 0 4px 8px rgba(3, 102, 214, 0.3), 0 2px 4px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

/* Active state - press down */
.btn-primary:active:not(:disabled) {
  background: linear-gradient(180deg, #1e3a8a 0%, #1e40af 100%);
  box-shadow: 0 1px 2px rgba(3, 102, 214, 0.2), inset 0 2px 4px rgba(0, 0, 0, 0.2);
  transform: translateY(0);
}

/* Focus state - accessibility */
.btn-primary:focus {
  outline: none;
  box-shadow: 0 0 0 4px rgba(3, 102, 214, 0.3), 0 4px 8px rgba(3, 102, 214, 0.2);
}

/* Disabled state - clear visual feedback */
.btn-primary:disabled {
  background: var(--border-color);
  color: var(--text-muted);
  cursor: not-allowed;
  opacity: 0.6;
  box-shadow: none;
  transform: none;
}

/* Loading state (when button has .loading class) */
.btn-primary.loading {
  pointer-events: none;
  opacity: 0.8;
  color: transparent;
}

.btn-primary.loading::after {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ===== ICON SYSTEM ===== */
/* Consistent 20x20px icons for visual scanning */

.icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.icon-sm {
  width: 16px;
  height: 16px;
}

.icon-md {
  width: 20px;
  height: 20px;
}

.icon-lg {
  width: 24px;
  height: 24px;
}

/* Status icons with semantic colors */
.icon-check {
  color: var(--status-verified-text);
}

.icon-security {
  color: var(--status-warning-text);
}

.icon-flight {
  color: var(--status-transit-text);
}

.icon-package {
  color: var(--text-secondary);
}

.icon-hold {
  color: var(--status-hold-text);
}

/* Location type icons */
.icon-city,
.icon-airport,
.icon-facility {
  color: var(--text-muted);
  opacity: 0.8;
}

/* Action type icons */
.icon-scan,
.icon-document,
.icon-lock {
  color: var(--text-secondary);
}

/* SVG icon styling for crisp rendering */
.icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Icon alignment in flex containers */
.with-icon {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* ===== LOADING & EMPTY STATES ===== */

.result-container {
  margin-top: 30px;
  padding-top: 30px;
  border-top: 1px solid var(--border-color);
  transition: opacity 0.3s ease-in-out;
}

/* Loading skeleton cards */
.skeleton-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 20px;
  animation: pulse 1.5s ease-in-out infinite;
}

.skeleton-line {
  height: 16px;
  background: linear-gradient(
    90deg,
    var(--bg-secondary) 25%,
    var(--border-light) 50%,
    var(--bg-secondary) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: 4px;
  margin-bottom: 12px;
}

.skeleton-line.short {
  width: 60%;
}

.skeleton-line.medium {
  width: 80%;
}

.skeleton-line.long {
  width: 100%;
}

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

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.6;
  }
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.empty-state-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-state-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.empty-state-message {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 20px;
  line-height: 1.6;
}

.empty-state-examples {
  display: inline-flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
  background: var(--bg-secondary);
  padding: 16px 20px;
  border-radius: 6px;
  border: 1px solid var(--border-color);
}

.empty-state-examples-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.example-id {
  font-family: monospace;
  font-size: 13px;
  color: var(--text-primary);
  padding: 4px 8px;
  background: var(--bg-card);
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.2s;
}

.example-id:hover {
  background: var(--accent-blue);
  color: #ffffff;
  transform: translateX(4px);
}

.result-container.hidden {
  display: none;
}

.result-container.loading {
  opacity: 0.5;
}

.loading-state {
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 2px;
  padding: 40px;
  text-align: center;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  margin: 0 auto 20px;
  border: 3px solid var(--border-color);
  border-top-color: var(--accent-blue);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-text {
  font-size: 13px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.result-success {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 28px;
  animation: fadeIn 0.4s ease-in-out;
  box-shadow: var(--shadow-card);
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.result-header {
  font-size: 14px;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--border-color);
}

.result-error {
  background-color: rgba(229, 62, 62, 0.05);
  border: 1px solid var(--border-color);
  border-radius: 2px;
  padding: 20px;
  color: var(--text-secondary);
  font-size: 14px;
  text-align: center;
  animation: fadeIn 0.4s ease-in-out;
}

.result-field {
  margin-bottom: 18px;
}

.result-field:last-child {
  margin-bottom: 0;
}

.result-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 5px;
}

.result-value {
  font-size: 14px;
  color: var(--text-primary);
}

.result-value.tracking-id {
  font-family: monospace;
  font-size: 16px;
  color: var(--text-primary);
  letter-spacing: 0.5px;
}

.result-value.remarks {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid var(--border-color);
}

.sticky-summary {
  position: sticky;
  top: 0;
  background-color: var(--bg-tertiary);
  z-index: 10;
  margin: -25px -25px 25px -25px;
  padding: 20px 25px;
  border-bottom: 2px solid var(--border-color);
  box-shadow: 0 2px 4px rgba(0,0,0,0.04);
  transition: padding 0.3s ease, box-shadow 0.3s ease;
}

.sticky-summary.compact {
  padding: 12px 25px;
  box-shadow: 0 3px 8px rgba(0,0,0,0.08);
}

.sticky-summary.compact .summary-grid {
  gap: 15px;
}

.sticky-summary.compact .result-label {
  font-size: 10px;
  margin-bottom: 3px;
}

.sticky-summary.compact .result-value {
  font-size: 13px;
}

.summary-compact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}

.summary-compact-content {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  flex: 1;
}

.summary-toggle {
  padding: 8px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background-color: var(--bg-card);
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.summary-toggle:hover {
  background-color: var(--bg-secondary);
  border-color: var(--accent-blue);
}

.summary-toggle .toggle-icon {
  transition: transform 0.3s ease;
}

.summary-toggle.expanded .toggle-icon {
  transform: rotate(180deg);
}

.summary-details {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, margin-top 0.3s ease;
}

.summary-details.expanded {
  max-height: 500px;
  margin-top: 20px;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

/* Status Badges - Semantic Color Coding */
.status-badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  background-color: var(--status-warning-bg);
  color: var(--status-warning-text);
  border: 1px solid var(--status-warning-border);
  transition: all 0.2s ease;
}

/* Verified/Completed states (green) - CLR, CMP, ✓ */
.status-badge[data-status="CLR"],
.status-badge[data-status="CMP"],
.status-badge[data-status="INIT"] {
  background-color: var(--status-verified-bg);
  color: var(--status-verified-text);
  border-color: var(--status-verified-border);
}

/* Hold/Alert states (red) - HLD, OBS, ⧗ */
.status-badge[data-status="HLD"],
.status-badge[data-status="OBS"] {
  background-color: var(--status-hold-bg);
  color: var(--status-hold-text);
  border-color: var(--status-hold-border);
}

/* In-transit states (blue) - ENR, CHK, ✈ */
.status-badge[data-status="ENR"],
.status-badge[data-status="CHK"],
.status-badge[data-status="RER"] {
  background-color: var(--status-transit-bg);
  color: var(--status-transit-text);
  border-color: var(--status-transit-border);
}

.timeline-section {
  margin-top: 25px;
}

.timeline-header {
  font-size: 13px;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 20px;
  font-weight: 600;
}

/* ===== LOCATION & ROUTE CARD ===== */

.card-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 20px 0;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border-color);
}

.location-route-card {
  background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-secondary) 100%);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.location-route-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--border-color);
}

.location-icon {
  font-size: 24px;
  color: var(--accent-blue);
  filter: drop-shadow(0 2px 4px rgba(3, 102, 214, 0.3));
}

.location-route-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

/* Current Location Display */
.current-location {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px;
  background: var(--bg-primary);
  border: 1px solid var(--border-light);
  border-left: 4px solid var(--accent-blue);
  border-radius: 6px;
  margin-bottom: 16px;
}

.location-pin-icon {
  font-size: 28px;
  color: var(--accent-blue);
  flex-shrink: 0;
}

.location-details {
  flex: 1;
}

.location-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
  line-height: 1.4;
}

.location-timestamp {
  font-size: 12px;
  color: var(--text-muted);
  font-family: monospace;
}

/* Route Progress Visualization */
.route-progress {
  position: relative;
  padding: 20px 0;
}

.route-line {
  position: absolute;
  left: 24px;
  top: 32px;
  bottom: 32px;
  width: 3px;
  background: linear-gradient(to bottom,
    var(--accent-green) 0%,
    var(--accent-blue) 50%,
    var(--border-color) 100%
  );
  border-radius: 2px;
}

.route-point {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 28px;
  position: relative;
  z-index: 1;
}

.route-point:last-child {
  margin-bottom: 0;
}

.route-point-marker {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  flex-shrink: 0;
  position: relative;
  box-shadow: 0 0 0 4px var(--bg-card);
  transition: all 0.3s ease;
}

.route-point.completed .route-point-marker {
  background: var(--accent-green);
  border: 3px solid var(--accent-green);
}

.route-point.current .route-point-marker {
  background: var(--accent-blue);
  border: 3px solid var(--accent-blue);
  animation: pulse-marker 2s ease-in-out infinite;
}

.route-point.upcoming .route-point-marker {
  background: var(--bg-secondary);
  border: 3px solid var(--border-color);
}

@keyframes pulse-marker {
  0%, 100% {
    box-shadow: 0 0 0 4px var(--bg-card), 0 0 0 8px rgba(3, 102, 214, 0);
  }
  50% {
    box-shadow: 0 0 0 4px var(--bg-card), 0 0 0 8px rgba(3, 102, 214, 0.3);
  }
}

.route-point-info {
  flex: 1;
  padding-top: 2px;
}

.route-point-location {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.route-point-status {
  font-size: 12px;
  color: var(--text-secondary);
}

.route-point.completed .route-point-status {
  color: var(--accent-green);
}

.route-point.current .route-point-status {
  color: var(--accent-blue);
  font-weight: 600;
}

/* ===== ROUTING ZONES VISUALIZATION ===== */

.routing-zones-card {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.03) 0%, rgba(3, 102, 214, 0.02) 100%);
  border: 2px dashed var(--border-color);
  border-radius: 12px;
  padding: 0;
  margin-bottom: 32px;
  margin-top: 32px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.02);
  overflow: hidden;
}

.zones-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 24px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  cursor: pointer;
  user-select: none;
  transition: background-color 0.2s ease;
}

.zones-header:hover {
  background: var(--bg-secondary);
}

.zones-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.zones-icon {
  font-size: 22px;
  color: var(--accent-green);
  filter: drop-shadow(0 2px 4px rgba(16, 185, 129, 0.3));
}

.zones-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.zones-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 400;
  margin-left: 8px;
  text-transform: none;
  letter-spacing: 0;
}

.zones-toggle {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: transform 0.3s ease, color 0.2s ease;
}

.zones-header:hover .zones-toggle {
  color: var(--text-primary);
}

.routing-zones-card.collapsed .zones-toggle {
  transform: rotate(-90deg);
}

.zones-content {
  padding: 24px;
  max-height: 1000px;
  opacity: 1;
  transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.2s ease,
              padding 0.3s ease;
}

.routing-zones-card.collapsed .zones-content {
  max-height: 0;
  opacity: 0;
  padding: 0 24px;
  overflow: hidden;
}

/* Zones Grid Layout */
.zones-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.zone-item {
  background: var(--bg-primary);
  border: 2px solid var(--border-color);
  border-radius: 6px;
  padding: 16px;
  transition: all 0.3s ease;
  cursor: pointer;
}

.zone-item:hover {
  border-color: var(--accent-green);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.15);
  transform: translateY(-2px);
}

.zone-item.active {
  border-color: var(--accent-blue);
  background: linear-gradient(135deg, rgba(3, 102, 214, 0.08) 0%, transparent 100%);
  box-shadow: 0 4px 12px rgba(3, 102, 214, 0.2);
}

.zone-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.zone-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.zone-badge {
  display: inline-block;
  padding: 2px 8px;
  background: var(--accent-green);
  color: #ffffff;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.zone-item.active .zone-badge {
  background: var(--accent-blue);
  animation: badge-pulse 2s ease-in-out infinite;
}

@keyframes badge-pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

.zone-coverage {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.zone-countries {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.country-tag {
  display: inline-block;
  padding: 4px 10px;
  background: var(--bg-secondary);
  color: var(--text-secondary);
  border: 1px solid var(--border-light);
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.country-tag:hover {
  background: var(--accent-blue);
  color: #ffffff;
  border-color: var(--accent-blue);
  transform: translateY(-1px);
}

.zone-item.active .country-tag {
  border-color: var(--accent-blue);
  background: rgba(3, 102, 214, 0.1);
  color: var(--accent-blue);
  font-weight: 600;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .zones-grid {
    grid-template-columns: 1fr;
  }

  .location-route-card,
  .routing-zones-card {
    padding: 20px;
  }

  .route-progress {
    padding: 16px 0;
  }
}

.timeline {
  position: relative;
  padding-left: 30px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 8px;
  bottom: 8px;
  width: 3px;
  background: linear-gradient(to bottom,
    var(--accent-green) 0%,
    var(--accent-blue) 40%,
    var(--border-light) 70%,
    var(--border-color) 100%);
  border-radius: 2px;
  box-shadow: 0 0 8px rgba(3, 102, 214, 0.15);
}

.timeline-item {
  position: relative;
  padding-bottom: 20px;
  display: flex;
  align-items: flex-start;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-item:first-child {
  padding-bottom: 25px;
}

/* Timeline Markers with Color Coding */
.timeline-marker {
  position: absolute;
  left: -30px;
  top: 5px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background-color: var(--bg-secondary);
  border: 3px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  box-shadow: 0 0 0 3px var(--bg-card);
  transition: all 0.3s ease;
}

.timeline-marker.verified {
  background-color: var(--status-verified-bg);
  border-color: var(--status-verified-text);
}

.timeline-marker.hold {
  background-color: var(--status-hold-bg);
  border-color: var(--status-hold-text);
}

.timeline-marker.transit {
  background-color: var(--status-transit-bg);
  border-color: var(--status-transit-text);
}

.timeline-marker svg {
  width: 10px;
  height: 10px;
  opacity: 0.5;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
    box-shadow: 0 0 0 4px rgba(49, 130, 206, 0.3);
  }
  50% {
    opacity: 0.5;
    transform: scale(1.15);
    box-shadow: 0 0 0 8px rgba(49, 130, 206, 0.5), 0 0 20px rgba(49, 130, 206, 0.4);
  }
}

.timeline-item.active {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  margin: 0;
  box-shadow: none;
}

.timeline-item.active .timeline-marker {
  background-color: var(--accent-blue);
  border-color: var(--accent-blue);
  animation: pulse 2s ease-in-out infinite;
  color: #ffffff;
  box-shadow: 0 0 0 4px rgba(3, 102, 214, 0.1);
  width: 22px;
  height: 22px;
  border-width: 4px;
}

.timeline-item.active .timeline-marker svg {
  opacity: 1;
  filter: brightness(2);
  width: 12px;
  height: 12px;
}

.timeline-item.active .status-code {
  font-size: 13px;
  font-weight: 700;
}

.timeline-item.active .timeline-city {
  font-weight: 600;
}

.timeline-content {
  padding-left: 8px;
  flex: 1;
}

/* Contextual Event Icon (SVG) */
.event-icon {
  margin-left: 16px;
  margin-right: 12px;
  flex-shrink: 0;
  color: var(--accent-blue);
  opacity: 0.85;
  stroke-width: 1.8;
}

.timeline-item.active .event-icon {
  color: var(--accent-blue);
  opacity: 1;
  animation: icon-pulse 2s ease-in-out infinite;
}

.timeline-item.completed .event-icon {
  color: var(--text-muted);
  opacity: 0.6;
}

@keyframes icon-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.timeline-status {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
  position: relative;
}

.status-code {
  font-family: var(--font-system);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.timeline-time {
  font-size: 13px;
  color: var(--text-muted);
  font-family: var(--font-system);
  font-weight: 400;
  display: flex;
  align-items: center;
  gap: 4px;
}

.relative-time {
  color: var(--text-muted);
  font-weight: 400;
  font-size: 12px;
  opacity: 1;
}

.timeline-city {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 13px;
}

/* Timeline status - clickable header */
.timeline-status {
  cursor: pointer;
  user-select: none;
  transition: background-color 0.15s ease;
  padding: 2px 0;
  border-radius: 4px;
}

.timeline-status:hover {
  background-color: var(--bg-secondary);
  padding: 2px 8px;
  margin: 0 -8px;
}

/* Visual indicator for collapsed state */
.timeline-item.collapsed .timeline-marker {
  opacity: 0.5;
}

.timeline-item.collapsed .timeline-content {
  opacity: 0.7;
}

/* Timeline details wrapper */
.timeline-details {
  overflow: hidden;
  transition: max-height 0.25s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.2s ease,
              margin-top 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  max-height: 1000px;
  opacity: 1;
  margin-top: 8px;
}

.timeline-item.collapsed .timeline-details {
  max-height: 0;
  opacity: 0;
  margin-top: 0;
}

.timeline-location {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-secondary);
  line-height: 1.4;
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin-bottom: 5px;
}

.location-icon-inline {
  font-size: 15px;
  flex-shrink: 0;
  margin-top: 1px;
  opacity: 0.9;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.1));
}

.timeline-remarks {
  font-size: 14px;
  font-weight: 400;
  color: var(--text-muted);
  margin-top: 3px;
  display: flex;
  align-items: flex-start;
  gap: 6px;
  line-height: 1.5;
}

.remark-icon {
  font-size: 13px;
  flex-shrink: 0;
  margin-top: 1px;
  opacity: 0.85;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.08));
}

/* Active timeline item enhancement */
.timeline-item.active {
  background: linear-gradient(to right, rgba(30, 64, 175, 0.03), transparent);
  border-radius: 8px;
  padding: 4px 0;
  margin-left: -4px;
  padding-left: 4px;
}

.timeline-item.active .timeline-location {
  font-weight: 600;
  color: var(--accent-blue);
}

.timeline-item.active .status-code {
  font-weight: 700;
}

.notice {
  background-color: var(--bg-secondary);
  border-left: 3px solid var(--accent-yellow);
  padding: 20px;
  border-radius: 3px;
}

.notice h3 {
  margin-top: 0;
  font-size: 16px;
  color: var(--accent-yellow);
}

.notice p {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 10px;
}

.notice p:last-child {
  margin-bottom: 0;
}

.notice a {
  color: var(--accent-blue);
  text-decoration: none;
}

.notice a:hover {
  text-decoration: underline;
}

.info-section {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 40px;
  box-shadow: var(--shadow-card);
}

.info-section p {
  color: var(--text-secondary);
  margin-bottom: 15px;
  font-size: 15px;
}

.info-section h3:first-of-type {
  margin-top: 20px;
}

.status-list {
  margin-top: 15px;
  margin-left: 20px;
}

/* Enhanced Info Page - Card-based Division Blocks */
.division-block {
  margin-bottom: 20px;
  padding: 18px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  border-left: 4px solid var(--accent-blue);
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.division-block:hover {
  border-left-color: var(--accent-blue);
  box-shadow: 0 2px 6px rgba(3, 102, 214, 0.1), 0 1px 3px rgba(0,0,0,0.08);
  transform: translateX(2px);
}

.division-block:last-of-type {
  margin-bottom: 0;
}

.division-block h4 {
  font-size: 15px;
  color: var(--text-primary);
  font-weight: 700;
  margin-bottom: 10px;
  letter-spacing: 0.3px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.division-block h4::before {
  content: '▸';
  color: var(--accent-blue);
  font-size: 14px;
}

.division-block p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin: 0;
}

/* Enhanced Zone Details with Card Layout */
.zone-details {
  margin-bottom: 16px;
  padding: 14px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  border-left: 3px solid var(--accent-green);
  transition: all 0.2s ease;
}

.zone-details:hover {
  box-shadow: 0 2px 4px rgba(16, 185, 129, 0.1);
  border-left-color: var(--accent-green);
}

.zone-details h4 {
  font-size: 14px;
  color: var(--text-primary);
  font-weight: 700;
  margin-bottom: 6px;
  font-family: monospace;
  letter-spacing: 0.5px;
}

.zone-coverage {
  font-size: 12px;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.6;
}

/* Contact Form Styles */
.contact-form {
  margin-top: 24px;
  padding: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  max-width: 600px;
}

.contact-form .form-group {
  margin-bottom: 20px;
}

.contact-form label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
  width: 100%;
  padding: 12px 14px;
  font-size: 14px;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  transition: all 0.2s ease;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  box-sizing: border-box;
}

.contact-form input[type="text"]:focus,
.contact-form input[type="email"]:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(3, 102, 214, 0.1);
}

.contact-form textarea {
  resize: vertical;
  min-height: 120px;
}

.contact-form .btn-primary {
  width: 100%;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 600;
  color: #ffffff;
  background-color: var(--accent-blue);
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 8px;
}

.contact-form .btn-primary:hover {
  background-color: #0256b8;
  box-shadow: 0 2px 8px rgba(3, 102, 214, 0.2);
}

.contact-form .btn-primary:active {
  transform: scale(0.98);
}

.contact-form .btn-primary:disabled {
  background-color: var(--border-color);
  cursor: not-allowed;
  opacity: 0.6;
}

.contact-feedback {
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
}

.contact-feedback.success {
  background-color: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--accent-green);
}

.contact-feedback.error {
  background-color: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #ef4444;
}

/* Enhanced Status List - Table Format */
.status-list {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px 20px;
  margin-top: 20px;
  padding: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 6px;
}

.status-list dt {
  color: var(--text-primary);
  font-weight: 700;
  font-size: 13px;
  font-family: monospace;
  letter-spacing: 1px;
  background: var(--bg-secondary);
  padding: 6px 12px;
  border-radius: 4px;
  border: 1px solid var(--border-color);
  text-align: center;
  min-width: 60px;
}

.status-list dd {
  color: var(--text-secondary);
  margin: 0;
  font-size: 13px;
  display: flex;
  align-items: center;
  line-height: 1.6;
}

/* FAQ Section */
.faq-section {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 24px;
  margin-top: 24px;
}

.faq-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-light);
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.faq-item {
  border: 1px solid var(--border-light);
  border-radius: 6px;
  background-color: var(--bg-secondary);
  transition: all 0.2s ease;
}

.faq-item:hover {
  border-color: var(--border-color);
}

.faq-item[open] {
  background-color: var(--bg-tertiary);
}

.faq-question {
  padding: 12px 16px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-question::after {
  content: '+';
  font-size: 18px;
  font-weight: 300;
  color: var(--text-muted);
  transition: transform 0.2s ease;
}

.faq-item[open] .faq-question::after {
  content: '-';
}

.faq-answer {
  padding: 0 16px 14px 16px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}

footer {
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 25px 0;
  margin-top: auto;
}

footer p {
  color: var(--text-muted);
  font-size: 13px;
  text-align: center;
  margin-bottom: 5px;
}

footer p:last-child {
  margin-bottom: 0;
}

.footer-notice {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.timeline-item.hold .timeline-marker {
  background-color: var(--accent-yellow);
  border-color: var(--accent-yellow);
  box-shadow: 0 0 0 4px rgba(214, 158, 46, 0.2);
}

.timeline-item.hold.verified .timeline-marker {
  background-color: var(--accent-green);
  border-color: var(--accent-green);
  box-shadow: 0 0 0 4px rgba(72, 187, 120, 0.2);
}

/* Validation pin for completed events */
.timeline-item.completed .timeline-marker::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 6px;
  height: 6px;
  background-color: var(--accent-green);
  border-radius: 50%;
  border: 1px solid var(--bg-card);
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.timeline-item.active.completed .timeline-marker::after {
  display: none;
}

/* Enhanced Security Alert Section */
.security-verification {
  margin: 20px 0 20px 30px;
  padding: 24px;
  background: linear-gradient(135deg, rgba(255, 165, 0, 0.08) 0%, rgba(255, 165, 0, 0.04) 100%);
  border: 1px solid #FFA500;
  border-radius: 8px;
  border-left: 5px solid #E8A400;
  max-width: 650px;
  box-shadow: 0 2px 8px rgba(255, 165, 0, 0.12), 0 1px 3px rgba(0, 0, 0, 0.06);
}

@media (max-width: 768px) {
  .security-verification {
    margin: 20px 0;
    padding: 15px;
  }
}

.security-alert {
  display: flex;
  gap: 18px;
  margin-bottom: 20px;
  align-items: flex-start;
}

.alert-icon {
  font-size: 32px;
  color: #FFA500;
  flex-shrink: 0;
  line-height: 1;
  filter: drop-shadow(0 2px 4px rgba(255, 165, 0, 0.3));
}

.alert-content {
  flex: 1;
}

.alert-title {
  font-size: 15px;
  font-weight: 700;
  color: #E8A400;
  margin-bottom: 8px;
  letter-spacing: 0.3px;
}

.alert-message {
  font-size: 13px;
  color: var(--text-primary);
  line-height: 1.6;
}

.security-actions {
  margin-top: 20px;
  padding-top: 15px;
  border-top: 1px solid var(--border-light);
}

.btn-request-code {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background-color: var(--accent-blue);
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-request-code:hover {
  background-color: #2563eb;
  transform: translateY(-1px);
}

.btn-request-code:disabled {
  background-color: var(--border-color);
  cursor: not-allowed;
  opacity: 0.6;
  transform: none;
}

.btn-request-code .btn-icon {
  font-size: 16px;
}

.request-code-feedback {
  margin-top: 12px;
  font-size: 13px;
}

.code-verify-form {
  margin-top: 20px;
  padding-top: 15px;
  border-top: 1px solid var(--border-light);
}

.code-input-group {
  margin-bottom: 15px;
}

.code-input-group label {
  display: block;
  font-size: 12px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.code-input-group input {
  width: 100%;
  max-width: 200px;
  padding: 12px 15px;
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 3px;
  color: var(--text-primary);
  font-size: 18px;
  font-family: monospace;
  letter-spacing: 2px;
  text-align: center;
}

.code-input-group input:focus {
  outline: none;
  border-color: var(--accent-yellow);
}

.code-attempts {
  margin-top: 8px;
  font-size: 11px;
  color: var(--text-muted);
}

.btn-verify {
  padding: 12px 25px;
  background-color: var(--accent-yellow);
  color: var(--bg-primary);
  border: none;
  border-radius: 3px;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.btn-verify:hover {
  background-color: #c88d27;
}

.btn-verify:disabled {
  background-color: var(--border-color);
  cursor: not-allowed;
  opacity: 0.6;
}

.verify-feedback {
  margin-top: 15px;
  font-size: 13px;
}

.feedback-success {
  color: var(--accent-green);
  padding: 10px;
  background-color: rgba(56, 161, 105, 0.1);
  border: 1px solid var(--accent-green);
  border-radius: 3px;
}

.feedback-error {
  color: var(--accent-red);
  padding: 10px;
  background-color: rgba(229, 62, 62, 0.1);
  border: 1px solid var(--accent-red);
  border-radius: 3px;
}

.feedback-loading {
  color: var(--text-secondary);
  padding: 10px;
  background-color: rgba(49, 130, 206, 0.1);
  border: 1px solid var(--accent-blue);
  border-radius: 3px;
}

/* ===== RESPONSIVE MOBILE LAYOUT ===== */

/* Tablet and Small Desktop (≤768px) */
@media (max-width: 768px) {
  /* Container padding for tablets */
  .container {
    padding: 0 20px;
  }

  /* Header adjustments */
  header h1 {
    font-size: 20px;
    letter-spacing: 1.5px;
  }

  .subtitle {
    font-size: 10px;
  }

  .brand-logo {
    width: 26px;
    height: 26px;
  }

  .header-content {
    flex-wrap: nowrap;
    gap: 12px;
  }

  .header-right {
    gap: 10px;
  }

  .theme-toggle {
    padding: 6px;
    min-width: 32px;
    min-height: 32px;
  }

  .theme-icon {
    width: 16px;
    height: 16px;
  }

  .language-selector {
    font-size: 12px;
    padding: 6px 10px;
    max-width: 120px;
    min-height: 32px;
  }

  /* Navigation - full width on tablet */
  nav {
    gap: 25px;
    font-size: 13px;
    padding: 12px 0;
  }

  nav a {
    padding: 8px 0;
  }

  /* Content sections */
  .tracking-section,
  .info-section {
    padding: 25px;
    margin: 20px 0;
  }

  /* Typography adjustments */
  h2 {
    font-size: 22px;
  }

  h3 {
    font-size: 17px;
  }

  /* Full-width form inputs */
  .input-group {
    flex-direction: column;
    gap: 12px;
  }

  .input-group input {
    max-width: 100%;
    width: 100%;
  }

  .input-group button {
    width: 100%;
    justify-content: center;
    min-height: 44px;
  }

  /* Results - stack cards vertically */
  .summary-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .summary-compact-content {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }

  /* Timeline adjustments */
  .timeline {
    padding-left: 28px;
  }

  .timeline-marker {
    left: -28px;
  }

  .timeline-content {
    padding: 14px 16px;
  }

  /* Status badges - ensure readability */
  .status-badge {
    padding: 5px 12px;
    font-size: 10px;
  }

  /* Info page blocks */
  .division-block,
  .zone-details {
    margin-bottom: 18px;
  }
}

/* Small Phones (≤480px) */
@media (max-width: 480px) {
  /* Container - edge-to-edge on small screens */
  .container {
    padding: 0 16px;
  }

  /* Compact header for small screens */
  header {
    padding: 12px 0;
  }

  header h1 {
    font-size: 18px;
    letter-spacing: 1px;
  }

  .subtitle {
    font-size: 9px;
  }

  .brand-logo {
    width: 24px;
    height: 24px;
  }

  .brand {
    gap: 10px;
  }

  .header-content {
    gap: 10px;
  }

  .header-right {
    gap: 8px;
  }

  /* Touch-friendly button sizes (min 44x44px) */
  .theme-toggle {
    padding: 8px;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .theme-icon {
    width: 18px;
    height: 18px;
  }

  .language-selector {
    font-size: 12px;
    padding: 8px 12px;
    max-width: 130px;
    min-height: 44px;
  }

  /* Navigation - touch-friendly */
  nav {
    gap: 20px;
    font-size: 13px;
    padding: 12px 0;
  }

  nav a {
    padding: 10px 0;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }

  /* Content sections - tighter on small screens */
  .tracking-section,
  .info-section {
    padding: 20px;
    margin: 16px 0;
  }

  /* Typography - mobile optimized */
  h2 {
    font-size: 20px;
    margin-bottom: 14px;
  }

  h3 {
    font-size: 16px;
    margin-top: 24px;
    margin-bottom: 10px;
  }

  /* Full-width inputs with touch targets */
  .input-group {
    flex-direction: column;
    gap: 12px;
  }

  .input-group input {
    width: 100%;
    max-width: 100%;
    padding: 12px 14px;
    font-size: 16px; /* Prevents zoom on iOS */
    min-height: 48px;
  }

  .input-group button {
    width: 100%;
    padding: 14px 20px;
    min-height: 48px;
    font-size: 14px;
  }

  /* Result cards - optimized stacking */
  .result-success {
    padding: 20px;
    margin: 16px 0;
  }

  .summary-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  /* Compact summary for mobile */
  .summary-compact {
    gap: 12px;
    padding: 14px;
  }

  .summary-compact-content {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .summary-compact-content .result-label {
    font-size: 10px;
    margin-bottom: 3px;
  }

  .summary-compact-content .result-value {
    font-size: 13px;
  }

  /* Touch-friendly toggle button */
  .summary-toggle {
    padding: 10px;
    min-width: 44px;
    min-height: 44px;
    align-self: flex-start;
    margin-top: 0;
  }

  .summary-toggle svg {
    width: 18px;
    height: 18px;
  }

  /* Sticky summary adjustments */
  .sticky-summary {
    margin: -20px -20px 16px -20px;
    padding: 14px 16px;
  }

  /* Timeline - single column mobile */
  .timeline {
    padding-left: 26px;
  }

  .timeline::before {
    left: 5px;
  }

  .timeline-marker {
    left: -26px;
    width: 16px;
    height: 16px;
  }

  .timeline-content {
    padding: 12px 14px;
  }

  .timeline-status {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .timeline-time {
    font-size: 11px;
  }

  .timeline-location {
    font-size: 13px;
  }

  .timeline-remarks {
    font-size: 12px;
    margin-top: 8px;
  }

  /* Status badges - mobile optimized */
  .status-badge {
    padding: 5px 10px;
    font-size: 10px;
    letter-spacing: 0.5px;
  }

  /* Info page - mobile layout */
  .division-block,
  .zone-details {
    margin-bottom: 16px;
    padding-bottom: 12px;
  }

  .division-block h4,
  .zone-details h4 {
    font-size: 13px;
  }

  .division-block p,
  .zone-coverage {
    font-size: 12px;
  }

  .status-list dt {
    font-size: 12px;
    margin-top: 10px;
  }

  .status-list dd {
    font-size: 12px;
    margin-left: 16px;
  }

  /* Footer - compact */
  footer {
    padding: 20px 0;
  }

  footer p {
    font-size: 12px;
  }

  .footer-notice {
    font-size: 11px;
  }
}

/* Max Attempts Notification */
.max-attempts-notification {
  background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
  border: 2px solid #bd2130;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  max-width: 700px;
  box-shadow: 0 8px 24px rgba(220, 53, 69, 0.3);
  animation: slideIn 0.5s ease-out;
}

@media (max-width: 768px) {
  .max-attempts-notification {
    padding: 16px;
    margin: 0 0 20px 0;
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.notification-content {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

@media (max-width: 768px) {
  .notification-content {
    flex-direction: column;
    gap: 12px;
  }

  .notification-icon {
    font-size: 32px;
  }
}

.notification-icon {
  font-size: 48px;
  flex-shrink: 0;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

.notification-body {
  flex: 1;
}

.notification-body h3 {
  margin: 0 0 12px 0;
  font-size: 20px;
  font-weight: 700;
  color: #fff;
}

.notification-body p {
  margin: 0 0 12px 0;
  color: #fff;
  line-height: 1.6;
}

.notification-actions {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  padding: 16px;
  margin: 16px 0;
}

.notification-actions p {
  margin: 0 0 8px 0;
  font-weight: 600;
  color: #fff;
}

.notification-actions ul {
  margin: 8px 0 0 20px;
  padding: 0;
  color: #fff;
}

.notification-actions li {
  margin: 6px 0;
  line-height: 1.5;
}

.notification-footer {
  font-style: italic;
  color: #ffe5e8 !important;
  margin: 12px 0 0 0 !important;
  font-size: 14px;
}

.feedback-success {
  background: #d4edda;
  border: 1px solid #c3e6cb;
  color: #155724;
  padding: 12px;
  border-radius: 6px;
  margin-top: 12px;
  font-weight: 600;
}

/* ===============================================
   PHASE 1.1: STATUS SUMMARY CARD
   =============================================== */

.status-summary-card {
  background: var(--bg-card);
  border-left: 4px solid var(--accent-blue);
  border-radius: 6px;
  padding: 20px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-card);
}

.status-summary-card--hold {
  border-left-color: #dc3545;
}

.status-summary-header {
  margin-bottom: 16px;
}

.status-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.status-badge-container {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.status-badge--on-hold,
.status-badge--in-transit,
.status-badge--delivered {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.status-badge--on-hold {
  background: #fff5f5;
  color: #dc3545;
  border: 2px solid #dc3545;
}

.status-badge--in-transit {
  background: #fffbf0;
  color: #ff9800;
  border: 2px solid #ff9800;
}

.status-badge--delivered {
  background: #f1f8f4;
  color: #28a745;
  border: 2px solid #28a745;
}

.status-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: currentColor;
  animation: pulse-status 2s infinite;
}

@keyframes pulse-status {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.status-details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
  padding: 12px 0;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.status-details-grid--3col {
  grid-template-columns: 1fr 1fr 1fr;
}

.status-item--delivery {
  background: rgba(220, 53, 69, 0.05);
  padding: 12px;
  border-radius: 6px;
  border-left: 3px solid #dc3545;
}

.status-value--large {
  font-size: 18px;
  font-weight: 700;
  color: #dc3545;
}

.status-hint {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: 4px;
  display: block;
}

.status-item {
  display: flex;
  flex-direction: column;
}

.status-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.status-value {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

.status-alert {
  background: rgba(255, 152, 0, 0.1);
  border: 1px solid rgba(255, 152, 0, 0.3);
  border-radius: 4px;
  padding: 12px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.alert-icon-emoji {
  font-size: 18px;
  flex-shrink: 0;
}

.alert-content-summary {
  flex: 1;
}

.alert-content-summary strong {
  display: block;
  color: #ff9800;
  font-size: 14px;
  margin-bottom: 4px;
}

.alert-content-summary p {
  margin: 0;
  font-size: 13px;
  color: var(--text-secondary);
}

/* ===============================================
   PHASE 1.2: COLLAPSIBLE REFERENCE & DETAILS
   =============================================== */

.reference-details-section {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  margin-bottom: 24px;
  overflow: hidden;
}

.reference-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  cursor: pointer;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  transition: background-color 0.2s ease;
}

.reference-header:hover {
  background: var(--bg-tertiary);
}

.reference-main {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.reference-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.reference-tracking {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  font-family: var(--font-mono);
}

.reference-handler {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
}

.reference-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.reference-id {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  font-family: var(--font-mono);
}

.toggle-details-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--accent-blue);
  font-weight: 600;
  font-size: 13px;
  transition: all 0.3s ease;
}

.toggle-details-btn:hover {
  color: #003d82;
}

.toggle-icon-arrow {
  display: inline-block;
  transition: transform 0.3s ease;
  font-size: 12px;
}

.toggle-details-btn[aria-expanded="true"] .toggle-icon-arrow {
  transform: rotate(180deg);
}

.reference-details {
  padding: 16px;
  background: var(--bg-card);
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.detail-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.detail-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.detail-value {
  font-size: 14px;
  color: var(--text-primary);
  font-weight: 500;
}

.badge-verified {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(40, 167, 69, 0.15);
  color: #155724;
  padding: 4px 8px;
  border-radius: 3px;
  font-size: 12px;
  font-weight: 600;
}

/* Dark theme adjustments for badge */
body.dark-theme .badge-verified {
  background: rgba(40, 167, 69, 0.2);
  color: #34d399;
}

/* ===============================================
   JOURNEY ROUTE MAP - Visual Route Visualization
   =============================================== */

.journey-route-section {
  margin: 24px 0;
  padding: 20px;
  background: var(--bg-card);
  border-radius: 8px;
  box-shadow: var(--shadow-card);
}

.journey-route-section .section-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-light);
}

.journey-route-map {
  display: flex;
  align-items: center;
  justify-content: space-between;
  overflow-x: auto;
  padding: 24px 16px;
  gap: 40px;
  scrollbar-width: thin;
  scrollbar-color: var(--border-color) transparent;
  width: 100%;
}

.journey-route-map::-webkit-scrollbar {
  height: 8px;
}

.journey-route-map::-webkit-scrollbar-track {
  background: transparent;
}

.journey-route-map::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}

.route-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  min-width: 140px;
  flex: 1;
  flex-shrink: 0;
}

.route-node-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.route-node-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.route-node-city {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  text-align: center;
  max-width: 120px;
  line-height: 1.3;
}

.route-node-time {
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
}

.route-node-status {
  font-size: 11px;
  font-weight: 500;
  color: #dc3545;
  text-align: center;
  margin-top: 2px;
}

.route-node-marker {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  background: var(--bg-secondary);
  border: 2px solid var(--border-color);
  z-index: 2;
  transition: all 0.3s ease;
}

.route-node-marker svg {
  width: 20px;
  height: 20px;
  display: block;
}

.route-node--completed .route-node-marker {
  background: rgba(40, 167, 69, 0.15);
  border-color: #28a745;
  color: #28a745;
}

.route-node--completed .route-node-city {
  color: #28a745;
  font-weight: 600;
}

.route-connector--completed {
  background: #28a745 !important;
  height: 4px;
}

.route-node--completed .route-connector {
  background: #28a745;
}

.route-node--current .route-node-marker {
  background: rgba(220, 53, 69, 0.15);
  border-color: #dc3545;
  color: #dc3545;
  box-shadow: 0 0 0 4px rgba(220, 53, 69, 0.2);
  animation: pulse-route 2s infinite;
}

.route-node--pending .route-node-marker {
  background: var(--bg-tertiary);
  border-color: var(--border-color);
  color: var(--text-muted);
}

@keyframes pulse-route {
  0%, 100% {
    box-shadow: 0 0 0 4px rgba(220, 53, 69, 0.2);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(220, 53, 69, 0.1);
  }
}

.route-node-label {
  margin-top: 10px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  text-align: center;
  max-width: 90px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.route-node--current .route-node-label {
  color: #dc3545;
  font-weight: 600;
}

.route-node--completed .route-node-label {
  color: #28a745;
}

.route-connector {
  position: absolute;
  top: 17px;
  left: calc(50% + 18px);
  right: auto;
  width: calc(100% + 22px);
  height: 4px;
  background: #ddd;
  z-index: 1;
  transition: background 0.3s ease;
}

/* Dark theme adjustments */
body.dark-theme .route-node--completed .route-node-marker {
  background: rgba(40, 167, 69, 0.2);
}

body.dark-theme .route-node--current .route-node-marker {
  background: rgba(220, 53, 69, 0.2);
}

/* Mobile responsive for journey route */
@media (max-width: 480px) {
  .journey-route-section {
    padding: 20px 16px;
    margin: 16px 0;
  }

  .journey-route-map {
    padding: 20px 12px;
    gap: 30px;
    justify-content: flex-start;
  }

  .route-node {
    min-width: 110px;
  }

  .route-node-city {
    font-size: 11px;
    max-width: 85px;
  }

  .route-node-time {
    font-size: 9px;
  }

  .route-node-status {
    font-size: 9px;
  }

  .route-node-marker {
    width: 30px;
    height: 30px;
    font-size: 13px;
  }

  .route-node-marker svg {
    width: 16px;
    height: 16px;
  }

  .route-node-label {
    font-size: 10px;
    max-width: 60px;
  }

  .route-connector {
    top: 14px;
    left: calc(50% + 15px);
    width: calc(100% + 15px);
    height: 3px;
  }
}

/* ===============================================
   PHASE 2: VISUAL TIMELINE
   =============================================== */

.movement-history-section {
  margin-top: 32px;
}

.section-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 24px 0;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--accent-blue);
}

/* New Timeline Item Styles */
.timeline-item--current,
.timeline-item--completed {
  display: flex;
  gap: 16px;
  padding: 16px;
  border-radius: 6px;
  margin-bottom: 12px;
  background: var(--bg-secondary);
  border-left: 3px solid var(--border-color);
  transition: all 0.2s ease;
}

.timeline-item--current:hover,
.timeline-item--completed:hover {
  background: var(--bg-tertiary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.timeline-item--current {
  background: rgba(220, 53, 69, 0.05);
  border-left-color: #dc3545;
  border-radius: 8px;
  padding: 18px;
  margin-bottom: 20px;
}

body.dark-theme .timeline-item--current {
  background: rgba(220, 53, 69, 0.1);
}

.timeline-item--completed {
  background: var(--bg-secondary);
  border-left-color: var(--accent-green);
}

/* Timeline Marker */
.timeline-marker {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.timeline-circle {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 14px;
  background: var(--border-color);
  color: var(--text-secondary);
}

.timeline-item--current .timeline-circle.current {
  background: #dc3545;
  color: white;
  font-size: 16px;
  animation: pulse-dot 2s infinite;
}

.timeline-item--completed .timeline-circle {
  background: var(--accent-green);
  color: white;
  font-size: 14px;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* Timeline Content */
.timeline-header-new {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
  flex-wrap: wrap;
  gap: 8px;
}

.timeline-status-text {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.timeline-item--current .timeline-status-text {
  color: #dc3545;
}

.timeline-location-text {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

.timeline-time-new {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  flex-wrap: wrap;
  gap: 8px;
}

.timeline-time-new time {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

.time-ago {
  font-size: 11px;
  color: var(--text-muted);
  font-style: italic;
}

.timeline-description {
  margin-top: 8px;
}

.timeline-description strong {
  display: block;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.timeline-description p {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.4;
}

/* Toggle Buttons for Timeline */
.timeline-toggle-btn,
.timeline-toggle-all-btn {
  width: 100%;
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  padding: 12px 16px;
  margin: 16px 0;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent-blue);
  transition: all 0.3s ease;
}

.timeline-toggle-btn:hover,
.timeline-toggle-all-btn:hover {
  background: var(--bg-secondary);
  border-color: var(--accent-blue);
}

.toggle-text {
  flex: 1;
  text-align: left;
}

.toggle-count {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 400;
  margin: 0 12px;
}

.toggle-arrow {
  font-size: 12px;
  transition: transform 0.3s ease;
}

.timeline-toggle-btn[aria-expanded="true"] .toggle-arrow,
.timeline-toggle-all-btn[aria-expanded="true"] .toggle-arrow {
  transform: rotate(180deg);
}

/* Timeline Events Container - For collapsible sections */
.timeline-events-container {
  animation: slideDown 0.3s ease;
}

.timeline-events-container[hidden] {
  display: none;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===============================================
   PHASE 3: FORM INPUT ENHANCEMENTS
   =============================================== */

.tracking-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
  margin-top: 20px;
}

/* Track button - constrain width on desktop */
.tracking-form .btn-primary {
  width: fit-content;
  min-width: 160px;
  max-width: 200px;
}

/* Mobile: full width button */
@media (max-width: 768px) {
  .tracking-form .btn-primary {
    width: 100%;
    max-width: 100%;
  }
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.label-hint {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-muted);
}

/* ===============================================
   PHASE 5: MOBILE RESPONSIVE OPTIMIZATIONS
   =============================================== */

/* Large desktop */
@media (min-width: 1200px) {
  .status-details-grid {
    grid-template-columns: 1fr 1fr;
  }
  .status-details-grid--3col {
    grid-template-columns: 1fr 1fr 1fr;
  }
  .detail-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Tablet */
@media (max-width: 1024px) {
  .status-summary-card {
    padding: 18px;
  }
}

/* Mobile (primary focus) */
@media (max-width: 768px) {
  /* Status Summary Card mobile */
  .status-summary-card {
    padding: 16px;
    margin-bottom: 20px;
  }

  .status-title {
    font-size: 16px;
  }

  .status-details-grid,
  .status-details-grid--3col {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .status-item--delivery {
    margin-top: 8px;
  }

  /* Reference Details mobile */
  .reference-details-section {
    margin-bottom: 20px;
  }

  .reference-header {
    padding: 14px;
  }

  .reference-tracking {
    font-size: 14px;
  }

  .reference-handler {
    font-size: 12px;
  }

  .reference-id {
    font-size: 16px;
  }

  .detail-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .toggle-details-btn {
    font-size: 12px;
    padding: 4px;
  }

  /* Timeline mobile */
  .timeline-item--current,
  .timeline-item--completed {
    gap: 12px;
    padding: 14px;
    margin-bottom: 10px;
  }

  .timeline-item--current {
    padding: 14px;
    margin-bottom: 16px;
  }

  .timeline-marker {
    width: 36px;
    height: 36px;
  }

  .timeline-circle {
    width: 20px;
    height: 20px;
    font-size: 12px;
  }

  .timeline-header-new {
    flex-direction: column;
    align-items: flex-start;
  }

  .timeline-status-text {
    font-size: 13px;
  }

  .timeline-time-new {
    flex-direction: column;
    align-items: flex-start;
  }

  .timeline-toggle-btn,
  .timeline-toggle-all-btn {
    padding: 12px;
    margin: 12px 0;
    font-size: 13px;
  }

  .toggle-count {
    display: none;
  }

  .section-title {
    font-size: 16px;
    margin-bottom: 16px;
  }
}

/* Small mobile */
@media (max-width: 480px) {
  body {
    font-size: 14px;
  }

  .reference-id {
    font-size: 14px;
  }

  .status-badge--on-hold,
  .status-badge--in-transit,
  .status-badge--delivered {
    font-size: 12px;
    padding: 6px 10px;
  }

  .timeline-toggle-btn,
  .timeline-toggle-all-btn {
    padding: 12px;
    font-size: 14px;
  }
}

/* ==============================================
   MOBILE TIMELINE - Clean & Simple
   Based on FedEx/UPS/DHL patterns
   ============================================== */

@media (max-width: 768px) {
  /* Container */
  .container {
    padding: 16px;
  }

  /* Prevent text overflow */
  #result-content,
  #result-content > div {
    max-width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  /* Timeline: vertical line + circles */
  .timeline {
    padding-left: 40px;
    position: relative;
  }

  .timeline::before {
    left: 14px;
    top: 0;
    bottom: 0;
    width: 3px;
  }

  /* Timeline Item: simple block */
  .timeline-item {
    display: block;
    position: relative;
    padding-bottom: 24px;
    padding-left: 0;
  }

  .timeline-item:last-child {
    padding-bottom: 0;
  }

  /* Remove active background on mobile */
  .timeline-item.active {
    background: transparent;
    border: none;
    padding-bottom: 24px;
    margin: 0;
    box-shadow: none;
  }

  /* Circle markers - centered on line (line at 14px, marker 24px wide = center at 12px, so left = 14-12 = 2px from timeline, = -38px from item) */
  .timeline-marker {
    position: absolute;
    left: -38px;
    top: 0;
    width: 24px;
    height: 24px;
  }

  /* Active marker slightly larger */
  .timeline-item.active .timeline-marker {
    width: 28px;
    height: 28px;
    left: -40px;
    top: -2px;
  }

  /* Content: no background, clean */
  .timeline-content {
    padding: 0;
    background: none;
    border: none;
    box-shadow: none;
  }

  /* Status line: Icon + Status + Location on ONE line */
  .timeline-status {
    display: block;
    margin-bottom: 4px;
    background: transparent !important;
    padding: 0 !important;
    margin: 0 0 4px 0 !important;
  }

  .timeline-status:hover {
    background: transparent !important;
    padding: 0 !important;
    margin: 0 0 4px 0 !important;
  }

  /* Event icon + Status code on first line */
  .event-icon {
    display: inline-block;
    width: 20px;
    height: 20px;
    vertical-align: middle;
    margin-right: 8px;
  }

  .status-code {
    display: inline;
    font-size: 16px;
    font-weight: 700;
    vertical-align: middle;
  }

  .timeline-item.active .status-code {
    font-size: 16px;
    font-weight: 700;
  }

  .timeline-item.completed .status-code {
    font-size: 14px;
    font-weight: 400;
    opacity: 0.8;
  }

  /* Location on second line */
  .timeline-city {
    display: block;
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 2px;
    margin-left: 28px;
  }

  /* Time on third line */
  .timeline-time {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
    margin-left: 28px;
  }

  .relative-time {
    font-size: 12px;
  }

  /* Details: hidden by default, simple */
  .timeline-details {
    margin-top: 8px;
    margin-left: 28px;
    font-size: 13px;
    color: var(--text-secondary);
  }

  .timeline-location,
  .timeline-remarks {
    font-size: 13px;
    line-height: 1.5;
  }

  /* Routing zones */
  .zones-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}
