/* ==========================================================================
   AgriNex Driver & Fleet Console Stylesheet
   Strictly matched with reference console (media_1789883573025.png)
   ========================================================================== */

:root {
  --dc-bg-page: #f8fafc;
  --dc-sidebar-bg: #0b3b24;
  --dc-sidebar-hover: #124b30;
  --dc-orange-brand: #d97706;
  --dc-amber-cta: #b45309;
  --dc-amber-cta-hover: #92400e;
  --dc-navy-card: #1a2638;
  --dc-navy-subcard: #121c2b;
  --dc-navy-telemetry: rgba(18, 28, 43, 0.94);
  --dc-green-primary: #15803d;
  --dc-green-hover: #166534;
  --dc-text-muted: #94a3b8;
  --dc-border-subtle: #e2e8f0;
}

body.driver-console-body {
  margin: 0;
  padding: 0;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--dc-bg-page);
  color: #0f172a;
  overflow-x: hidden;
}

/* App Container */
.dc-app-layout {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

/* --------------------------------------------------------------------------
   Left Sidebar: Driver Shift Workflow
   -------------------------------------------------------------------------- */
.dc-sidebar {
  width: 220px;
  min-width: 220px;
  background-color: var(--dc-sidebar-bg);
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: sticky;
  top: 0;
  z-index: 1000;
  overflow-y: auto;
  box-shadow: 2px 0 12px rgba(0, 0, 0, 0.12);
}

.dc-sidebar-brand-strip {
  background: #ea580c;
  color: #ffffff;
  padding: 10px 14px;
  font-size: 0.8rem;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.01em;
}
.dc-sidebar-brand-strip .sub {
  font-size: 0.68rem;
  font-weight: 600;
  opacity: 0.9;
  display: block;
}

.dc-sidebar-content {
  padding: 18px 12px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.dc-workflow-heading {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: #86efac;
  text-transform: uppercase;
  margin-bottom: 12px;
  padding-left: 6px;
}

.dc-nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dc-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  color: #dcfce7;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
}

.dc-nav-item:hover {
  background-color: var(--dc-sidebar-hover);
  color: #ffffff;
}

.dc-nav-item.active {
  background-color: #ffffff;
  color: #064e3b;
  font-weight: 800;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.dc-nav-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.dc-nav-item.active .dc-nav-icon {
  stroke: #064e3b;
}

.dc-sidebar-bottom-user {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  gap: 10px;
}

.dc-user-circle {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #d97706;
  color: #ffffff;
  font-weight: 800;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dc-user-meta {
  min-width: 0;
  flex: 1;
}
.dc-user-name {
  font-size: 0.82rem;
  font-weight: 800;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dc-user-veh {
  font-size: 0.68rem;
  color: #86efac;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* --------------------------------------------------------------------------
   Top Extended Header Bar
   -------------------------------------------------------------------------- */
.dc-main-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background-color: var(--dc-bg-page);
}

.dc-top-header {
  background: #ffffff;
  border-bottom: 1px solid var(--dc-border-subtle);
  padding: 12px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 990;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
}

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

.dc-header-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.dc-veh-pill {
  background: #fef9c3;
  color: #854d0e;
  border: 1px solid #fde047;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.5px;
}

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

.dc-lang-selector-group {
  display: flex;
  align-items: center;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
}

.dc-lang-btn {
  background: none;
  border: none;
  padding: 5px 12px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #64748b;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.dc-lang-btn.active {
  background: #0284c7;
  color: #ffffff;
  box-shadow: 0 1px 3px rgba(2, 132, 199, 0.3);
}

.dc-btn-sos {
  background: #dc2626;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 7px 14px;
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 6px rgba(220, 38, 38, 0.3);
  transition: transform 0.1s ease, background 0.15s ease;
}

.dc-btn-sos:hover {
  background: #b91c1c;
  transform: scale(1.02);
}

/* --------------------------------------------------------------------------
   Main Console Two-Column Content Grid
   -------------------------------------------------------------------------- */
.dc-content-body {
  padding: 20px 24px;
  display: grid;
  grid-template-columns: 1fr 370px;
  gap: 22px;
  align-items: start;
}

@media (max-width: 1100px) {
  .dc-content-body {
    grid-template-columns: 1fr;
  }
}

/* --------------------------------------------------------------------------
   Center Column: Dispatched Mission Card
   -------------------------------------------------------------------------- */
.dc-mission-banner {
  background: var(--dc-navy-card);
  border: 2px solid var(--dc-orange-brand);
  border-radius: 16px;
  padding: 20px 24px;
  color: #ffffff;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
  margin-bottom: 18px;
  position: relative;
}

.dc-mission-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.dc-mission-pool-tag {
  color: #fbbf24;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.dc-mission-active-badge {
  background: #78350f;
  color: #fef3c7;
  border: 1px solid #d97706;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.dc-mission-title {
  font-size: 1.32rem;
  font-weight: 800;
  color: #ffffff;
  margin: 0 0 6px 0;
  letter-spacing: -0.01em;
}

.dc-mission-meta-line {
  font-size: 0.82rem;
  color: #cbd5e1;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.dc-mission-net-pay {
  color: #fbbf24;
  font-weight: 800;
  font-size: 0.92rem;
}

/* Current Active Task Subcard */
.dc-task-subcard {
  background: var(--dc-navy-subcard);
  border: 1px solid #334155;
  border-radius: 12px;
  padding: 14px 18px;
  margin-top: 14px;
}

.dc-task-subcard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.dc-task-label {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.6px;
  color: #94a3b8;
  text-transform: uppercase;
}

.dc-task-status-pill {
  background: #d97706;
  color: #ffffff;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.dc-task-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #ffffff;
  margin: 0 0 4px 0;
}

.dc-task-desc {
  font-size: 0.82rem;
  color: #94a3b8;
}

/* Big Navigation CTA Button */
.dc-cta-nav-button {
  background: var(--dc-amber-cta);
  color: #ffffff;
  border: none;
  border-radius: 12px;
  padding: 16px 22px;
  font-size: 1.15rem;
  font-weight: 800;
  width: 100%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 6px 18px rgba(180, 83, 9, 0.35);
  transition: all 0.15s ease;
  margin-bottom: 6px;
}

.dc-cta-nav-button:hover {
  background: var(--dc-amber-cta-hover);
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(180, 83, 9, 0.45);
}

.dc-cta-nav-button:active {
  transform: translateY(0);
}

.dc-cta-caption {
  font-size: 0.78rem;
  color: #64748b;
  text-align: center;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

/* --------------------------------------------------------------------------
   Interactive Map & Telemetry Overlay
   -------------------------------------------------------------------------- */
.dc-map-wrapper {
  background: #ffffff;
  border: 1px solid var(--dc-border-subtle);
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

.dc-leaflet-container {
  height: 440px;
  width: 100%;
  position: relative;
  z-index: 10;
}

/* Floating Top Controls Inside Map */
.dc-map-floating-controls {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 500;
  display: flex;
  gap: 8px;
}

.dc-map-ctrl-btn {
  background: #ffffff;
  color: #0f172a;
  border: 1px solid #cbd5e1;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  gap: 5px;
  transition: background 0.15s ease;
}

.dc-map-ctrl-btn:hover {
  background: #f8fafc;
}

.map-layer-selector-group {
  display: flex;
  align-items: center;
  gap: 2px;
}

.map-layer-btn {
  font-family: inherit;
  font-size: 0.7rem;
  font-weight: 700;
  border: none;
  border-radius: 6px;
  padding: 4px 8px;
  cursor: pointer;
  background: transparent;
  color: #475569;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.map-layer-btn:hover {
  color: #0f172a;
  background: rgba(0, 0, 0, 0.05);
}

.map-layer-btn.active {
  background: #0c5a36 !important;
  color: #ffffff !important;
  font-weight: 800;
  box-shadow: 0 1px 3px rgba(12, 90, 54, 0.3);
}

#btn-map-traffic.active {
  background: #fef2f2 !important;
  color: #b91c1c !important;
  border-color: #fca5a5 !important;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.25);
}

.map-fullscreen-active {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 99999 !important;
  border-radius: 0 !important;
  margin: 0 !important;
  background: #ffffff !important;
}

.map-fullscreen-active .dc-leaflet-container {
  height: calc(100vh - 65px) !important;
}

/* Shortest Route Indicator Pill Inside Map */
.dc-map-route-indicator {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 500;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dc-route-badge-shortest {
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(6px);
  color: #ffffff;
  border: 1.5px solid #10b981;
  padding: 5px 12px;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 800;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  gap: 6px;
}

.dc-route-badge-shortest span.savings {
  color: #34d399;
  font-weight: 700;
}

.dc-route-selector-pills {
  display: flex;
  gap: 6px;
}

.dc-route-choice-btn {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(4px);
  border: 1.5px solid #cbd5e1;
  color: #334155;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.15s ease;
}

.dc-route-choice-btn.active {
  background: #0c5a36;
  color: #ffffff;
  border-color: #0c5a36;
  box-shadow: 0 2px 6px rgba(12, 90, 54, 0.3);
}

/* Floating Bottom Telemetry Bar */
.dc-telemetry-bar {
  position: absolute;
  bottom: 14px;
  left: 14px;
  right: 14px;
  background: var(--dc-navy-telemetry);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 12px 24px;
  display: grid;
  grid-template-columns: 1fr 1fr 1.3fr;
  align-items: center;
  text-align: center;
  z-index: 500;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.dc-telemetry-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.dc-telemetry-item:not(:last-child) {
  border-right: 1px solid rgba(255, 255, 255, 0.12);
}

.dc-telemetry-label {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.6px;
  color: var(--dc-text-muted);
  text-transform: uppercase;
}

.dc-telemetry-value {
  font-size: 1.15rem;
  font-weight: 800;
  color: #ffffff;
}

.dc-telemetry-value.amber {
  color: #fbbf24;
}

.dc-telemetry-value.green {
  color: #34d399;
}

/* --------------------------------------------------------------------------
   Right Column Cards: Profile, Shift Payout & Fare Breakdown
   -------------------------------------------------------------------------- */
.dc-right-column {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.dc-card {
  background: #ffffff;
  border: 1px solid var(--dc-border-subtle);
  border-radius: 16px;
  padding: 18px 20px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
}

/* Driver Profile Card */
.dc-profile-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.dc-profile-avatar-large {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #d97706;
  color: #ffffff;
  font-size: 1.1rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dc-profile-info-block {
  min-width: 0;
  flex: 1;
}

.dc-profile-driver-name {
  font-size: 1.05rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
}

.dc-profile-driver-sub {
  font-size: 0.74rem;
  color: #64748b;
  margin: 2px 0;
}

.dc-profile-rating-line {
  font-size: 0.72rem;
  font-weight: 700;
  color: #d97706;
}

.dc-profile-duty-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid #f1f5f9;
  padding-top: 10px;
}

.dc-duty-badge-online {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #bbf7d0;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 5px;
}

.dc-btn-toggle-duty {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #475569;
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.dc-btn-toggle-duty:hover {
  background: #f8fafc;
  color: #0f172a;
}

/* Shift Earnings & Instant Payout Card */
.dc-payout-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 4px;
}

.dc-payout-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.dc-payout-tag-instant {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.dc-payout-subtitle {
  font-size: 0.75rem;
  color: #64748b;
  margin: 0 0 14px 0;
}

/* 2x2 Stats Grid */
.dc-shift-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}

.dc-stat-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px 12px;
}

.dc-stat-box-title {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #64748b;
  text-transform: uppercase;
  margin-bottom: 2px;
}

.dc-stat-box-value {
  font-size: 1.15rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.2;
}

.dc-stat-box-value.green {
  color: #15803d;
}

.dc-stat-box-sub {
  font-size: 0.68rem;
  color: #64748b;
  margin-top: 2px;
}

/* UPI VPA Strip & Button */
.dc-upi-strip {
  background: #f0fdf4;
  border: 1px dashed #86efac;
  border-radius: 8px;
  padding: 6px 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-size: 0.72rem;
}

.dc-upi-label {
  color: #166534;
  font-weight: 700;
}

.dc-upi-vpa {
  color: #0c5a36;
  font-family: monospace;
  font-weight: 800;
}

.dc-btn-withdraw {
  background: var(--dc-green-primary);
  color: #ffffff;
  border: none;
  border-radius: 10px;
  padding: 12px 18px;
  font-size: 0.92rem;
  font-weight: 800;
  width: 100%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 3px 10px rgba(21, 128, 61, 0.3);
  transition: all 0.15s ease;
}

.dc-btn-withdraw:hover {
  background: var(--dc-green-hover);
  box-shadow: 0 4px 14px rgba(21, 128, 61, 0.4);
}

/* Trip Fare Breakdown Card */
.dc-fare-card-title {
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.6px;
  color: #475569;
  text-transform: uppercase;
  margin: 0 0 12px 0;
}

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

.dc-fare-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
}

.dc-fare-item-name {
  color: #64748b;
}

.dc-fare-item-amount {
  font-weight: 700;
  color: #0f172a;
}

.dc-fare-total-row {
  border-top: 1px dashed #cbd5e1;
  padding-top: 10px;
  margin-top: 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.dc-fare-total-label {
  font-size: 0.88rem;
  font-weight: 800;
  color: #0f172a;
}

.dc-fare-total-val {
  font-size: 1.2rem;
  font-weight: 800;
  color: #15803d;
}

.dc-escrow-pill-footer {
  font-size: 0.7rem;
  color: #15803d;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
}

/* --------------------------------------------------------------------------
   Interactive Leaflet Map Markers & Radar Pulse
   -------------------------------------------------------------------------- */
.dc-truck-marker {
  position: relative;
}

.dc-truck-radar-ring {
  position: absolute;
  top: -10px;
  left: -10px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 2px solid #0284c7;
  background: rgba(2, 132, 199, 0.15);
  animation: dcPulse 2s infinite ease-out;
  pointer-events: none;
}

.dc-truck-bubble {
  background: #0284c7;
  color: #ffffff;
  border: 2px solid #ffffff;
  border-radius: 20px;
  padding: 4px 10px;
  font-size: 0.74rem;
  font-weight: 800;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  gap: 5px;
}

.dc-stop-marker-bubble {
  background: #15803d;
  color: #ffffff;
  border: 2px solid #ffffff;
  border-radius: 20px;
  padding: 4px 10px;
  font-size: 0.74rem;
  font-weight: 800;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  gap: 5px;
}

.dc-hub-marker-bubble {
  background: #b45309;
  color: #ffffff;
  border: 2px solid #ffffff;
  border-radius: 20px;
  padding: 4px 10px;
  font-size: 0.74rem;
  font-weight: 800;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  gap: 5px;
}

@keyframes dcPulse {
  0% { transform: scale(0.6); opacity: 1; }
  100% { transform: scale(1.6); opacity: 0; }
}

/* Modal Styling */
.dc-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 16px;
}

.dc-modal-card {
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  width: 100%;
  max-width: 480px;
  overflow: hidden;
  animation: dcModalPop 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes dcModalPop {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}
