/* ==========================================================================
   FEDX FULL-WIDTH RESPONSIVE TELEMATICS DASHBOARD STYLESHEET
   Fintech-Grade, Modern, Responsive for all screen sizes (Mobile to 4K)
   ========================================================================== */

:root {
  --fedx-purple: #4D148C;
  --fedx-purple-dark: #330c5e;
  --fedx-orange: #FF6200;
  --fedx-blue: #2563EB;
  --dashboard-bg: #F4F7FB;
  --card-bg: #FFFFFF;
  --card-border: #E2E8F0;
  --text-primary: #0F172A;
  --text-muted: #64748B;
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 12px;
}

body.dashboard-body {
  background-color: var(--dashboard-bg);
  min-height: 100vh;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text-primary);
  margin: 0;
  padding: 0;
}

/* Full-Width Desktop Layout Container */
.dashboard-main-wrapper {
  max-width: 1440px;
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
}

@media (min-width: 768px) {
  .dashboard-main-wrapper {
    padding: 2rem 1.5rem 4rem;
  }
}

/* Fintech Hero Card (Track, Send, Receive) */
.fintech-hero-card {
  background: linear-gradient(135deg, #0A0E1A 0%, #15203B 100%);
  border-radius: var(--radius-xl);
  padding: 2.2rem;
  color: #FFFFFF;
  box-shadow: 0 20px 45px -10px rgba(10, 14, 26, 0.4);
  margin-bottom: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
  overflow: hidden;
}
.fintech-hero-card::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(255, 98, 0, 0.15) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.fintech-hero-title {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 4px;
}
@media (min-width: 768px) {
  .fintech-hero-title {
    font-size: 2.4rem;
  }
}
.fintech-hero-sub {
  color: #94A3B8;
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

/* Dashboard Tracking Search Bar */
.dashboard-search-bar {
  display: flex;
  align-items: center;
  background: #FFFFFF;
  border-radius: 16px;
  padding: 6px 8px 6px 18px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  max-width: 650px;
}
.dashboard-search-bar input {
  border: none;
  outline: none;
  font-size: 0.95rem;
  width: 100%;
  color: #0F172A;
  font-weight: 500;
}
.dashboard-search-btn {
  background: var(--fedx-orange);
  color: #FFFFFF;
  border: none;
  border-radius: 12px;
  padding: 10px 22px;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
  flex-shrink: 0;
}
.dashboard-search-btn:hover {
  background: #E05600;
  transform: translateY(-1px);
}

/* Status Filter Tabs (All, In Transit, Custom, On Hold, Processing, Delivered) */
.filter-tabs-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 8px 2px;
  overflow: visible !important;
}
.filter-tabs-strip::-webkit-scrollbar {
  display: none;
}
.shipment-filter-tab {
  background: rgba(255, 255, 255, 0.12);
  color: #E2E8F0;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 9999px;
  padding: 7px 16px;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.25;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.shipment-filter-tab:hover {
  background: rgba(255, 255, 255, 0.22);
  color: #FFFFFF;
  border-color: rgba(255, 255, 255, 0.35);
  transform: translateY(-1px);
}
.shipment-filter-tab.active {
  background: #FFFFFF !important;
  color: #0F172A !important;
  border-color: #FFFFFF !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
  transform: translateY(-1px);
}

/* Telematics Main Panel */
.telematics-main-card {
  background: #FFFFFF;
  border-radius: var(--radius-xl);
  border: 1px solid var(--card-border);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  padding: 2rem;
  margin-bottom: 2rem;
}

/* Adjustable Schedule Banner */
.schedule-banner {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
}
.schedule-node {
  display: flex;
  align-items: center;
  gap: 12px;
}
.schedule-flag {
  font-size: 1.5rem;
  line-height: 1;
}
.schedule-city {
  font-size: 0.95rem;
  font-weight: 800;
  color: #0F172A;
}
.schedule-date {
  font-size: 0.75rem;
  color: #64748B;
  font-family: 'JetBrains Mono', monospace;
}
.btn-edit-schedule {
  background: #FFFFFF;
  border: 1px solid #CBD5E1;
  color: #334155;
  border-radius: 9999px;
  padding: 6px 14px;
  font-size: 0.75rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
  cursor: pointer;
}
.btn-edit-schedule:hover {
  background: #F1F5F9;
  border-color: #94A3B8;
  color: #0F172A;
}

/* Telematics Movement Gauges Strip */
.telematics-gauges-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 1.5rem;
}
.gauge-box {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: var(--radius-md);
  padding: 1rem 1.2rem;
}
.gauge-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: #64748B;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}
.gauge-value {
  font-size: 1.25rem;
  font-weight: 800;
  color: #0F172A;
  font-family: 'JetBrains Mono', monospace;
}

/* Live Leaflet Map Container */
.map-viewport-wrapper {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  position: relative;
  border: 1px solid #E2E8F0;
  margin-bottom: 2rem;
}
#live-leaflet-map {
  width: 100%;
  height: 420px;
  background: #E2E8F0;
}
@media (max-width: 768px) {
  #live-leaflet-map {
    height: 280px;
  }
}

.map-telemetry-overlay {
  position: absolute;
  top: 14px;
  left: 14px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(8px);
  color: #FFFFFF;
  border-radius: 9999px;
  padding: 6px 16px;
  font-size: 0.78rem;
  font-weight: 700;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 8px;
}
.map-floating-controls {
  position: absolute;
  right: 14px;
  top: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 1000;
}
.map-nav-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #1E293B;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s;
}
.map-nav-btn:hover {
  background: #F1F5F9;
  transform: scale(1.05);
}

/* 5-Step Milestone Stepper */
.milestone-stepper-card {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 2rem;
}
.stepper-progress-track {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 10px 8px;
}
.stepper-bg-line {
  position: absolute;
  top: 23px;
  left: 20px;
  right: 20px;
  height: 4px;
  background: #E2E8F0;
  z-index: 1;
}
.stepper-fill-line {
  height: 100%;
  background: var(--fedx-blue);
  border-radius: 2px;
  transition: width 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.milestone-node {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.milestone-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #CBD5E1;
  border: 3px solid #FFFFFF;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}
.milestone-node.completed .milestone-dot {
  background: var(--fedx-blue);
}
.milestone-node.active .milestone-dot {
  background: var(--fedx-blue);
  box-shadow: 0 0 0 5px rgba(37, 99, 235, 0.25);
  transform: scale(1.15);
}
.milestone-node.on-hold .milestone-dot {
  background: #EF4444 !important;
  box-shadow: 0 0 0 5px rgba(239, 68, 68, 0.25);
}
.milestone-label-text {
  font-size: 0.72rem;
  font-weight: 700;
  color: #64748B;
  margin-top: 8px;
  text-align: center;
  white-space: nowrap;
}
.milestone-node.active .milestone-label-text {
  color: var(--fedx-blue);
}
.milestone-node.on-hold .milestone-label-text {
  color: #EF4444;
}

/* Payment & Receipt Card */
.payment-receipt-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

/* Status Pill Badges */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.status-pill.in-transit {
  background: #EFF6FF;
  color: #1D4ED8;
  border: 1px solid #BFDBFE;
}
.status-pill.out-for-delivery {
  background: #FFF7ED;
  color: #C2410C;
  border: 1px solid #FFEDD5;
}
.status-pill.delivered {
  background: #ECFDF5;
  color: #047857;
  border: 1px solid #A7F3D0;
}
.status-pill.custom-badge {
  background: #FFFBEB;
  color: #B45309;
  border: 1px solid #FDE68A;
}
.status-pill.on-hold-badge {
  background: #FEF2F2;
  color: #B91C1C;
  border: 1px solid #FECACA;
}
.status-pill.processing-badge {
  background: #F5F3FF;
  color: #6D28D9;
  border: 1px solid #DDD6FE;
}

/* Active Shipments Sidebar Cards */
.shipment-list-item {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 16px;
  padding: 14px 16px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}
.shipment-list-item:hover {
  transform: translateY(-2px);
  border-color: #CBD5E1;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
}
.shipment-list-item.active-selected {
  border-color: var(--fedx-purple);
  background: #FAF5FF;
  box-shadow: 0 6px 18px rgba(77, 20, 140, 0.12);
}
.shipment-thumb-wrapper {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  overflow: hidden;
  background: #F1F5F9;
  flex-shrink: 0;
  border: 1px solid #E2E8F0;
}
.shipment-thumb-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.shipment-info-col {
  flex-grow: 1;
  min-width: 0;
}
.shipment-id-tag {
  font-size: 0.72rem;
  font-weight: 700;
  color: #64748B;
}
.shipment-name {
  font-size: 0.875rem;
  font-weight: 700;
  color: #0F172A;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.shipment-route-sub {
  font-size: 0.72rem;
  color: #64748B;
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 2px;
}
.shipment-meta-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
}

/* Timeline Checkpoints in Card */
.timeline-event-item {
  display: flex;
  gap: 14px;
  position: relative;
  padding-bottom: 20px;
}
.timeline-event-item:last-child {
  padding-bottom: 0;
}
.timeline-event-item::before {
  content: '';
  position: absolute;
  top: 18px;
  left: 9px;
  bottom: 0;
  width: 2px;
  background: #E2E8F0;
}
.timeline-event-item:last-child::before {
  display: none;
}
.timeline-bullet-circle {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #EFF6FF;
  border: 4px solid var(--fedx-blue);
  flex-shrink: 0;
  position: relative;
  z-index: 2;
}
.timeline-event-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #0F172A;
}
