/* ==========================================================================
   EXECUTIVE LOGISTICS & BUSINESS OVERVIEW DASHBOARD STYLES
   Mir Concrete Products Ltd - 100% Matching Custom UI/UX
   ========================================================================== */

/* --------------------------------------------------------------------------
   Container & Page Wrapper
   -------------------------------------------------------------------------- */
.dashboard-page-wrapper {
  background: #f8fafc;
  min-height: 100vh;
  overflow-y: auto;
  box-sizing: border-box;
}

html.dark .dashboard-page-wrapper,
[data-theme="dark"] .dashboard-page-wrapper {
  background: #0b1120;
}

.dash-new-container {
  padding: 24px 28px 48px;
  max-width: 1560px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
  box-sizing: border-box;
}

/* Staggered Entry Animation */
@keyframes dashItemEnter {
  0% {
    opacity: 0;
    transform: translateY(16px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.dash-animated-item {
  animation: dashItemEnter 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.delay-1 { animation-delay: 0.05s; }
.delay-2 { animation-delay: 0.10s; }
.delay-3 { animation-delay: 0.15s; }
.delay-4 { animation-delay: 0.20s; }
.delay-5 { animation-delay: 0.25s; }
.delay-6 { animation-delay: 0.30s; }
.delay-7 { animation-delay: 0.35s; }
.delay-8 { animation-delay: 0.40s; }
.delay-9 { animation-delay: 0.45s; }
.delay-10 { animation-delay: 0.50s; }

/* --------------------------------------------------------------------------
   Card Base
   -------------------------------------------------------------------------- */
.dash-card {
  background: #ffffff;
  border: 1px solid #eef2f6;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02), 0 2px 8px rgba(15, 23, 42, 0.03);
  box-sizing: border-box;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s ease;
}

.dash-card:hover {
  border-color: #e2e8f0;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.06);
}

html.dark .dash-card,
[data-theme="dark"] .dash-card {
  background: #131d2e;
  border-color: #1e293b;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}

html.dark .dash-card:hover,
[data-theme="dark"] .dash-card:hover {
  border-color: #334155;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.45);
}

/* --------------------------------------------------------------------------
   ROW 1: Top 4 KPI Stat Cards
   -------------------------------------------------------------------------- */
.dash-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

@media (max-width: 1200px) {
  .dash-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .dash-kpi-grid {
    grid-template-columns: 1fr;
  }
}

.dash-kpi-card {
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  position: relative;
  overflow: hidden;
}

.dash-kpi-top {
  display: flex;
  align-items: center;
  gap: 14px;
}

.dash-kpi-icon-box {
  width: 44px;
  height: 44px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.dash-kpi-card:hover .dash-kpi-icon-box {
  transform: scale(1.08);
}

.dash-kpi-icon-box.green {
  background: #e6f7ef;
  color: #059669;
}

.dash-kpi-icon-box.blue {
  background: #ebf4ff;
  color: #2563eb;
}

.dash-kpi-icon-box.purple {
  background: #f3e8ff;
  color: #7c3aed;
}

.dash-kpi-icon-box.orange {
  background: #fff1e6;
  color: #ea580c;
}

html.dark .dash-kpi-icon-box.green { background: rgba(5, 150, 105, 0.2); color: #34d399; }
html.dark .dash-kpi-icon-box.blue { background: rgba(37, 99, 235, 0.2); color: #60a5fa; }
html.dark .dash-kpi-icon-box.purple { background: rgba(124, 58, 237, 0.2); color: #a78bfa; }
html.dark .dash-kpi-icon-box.orange { background: rgba(234, 88, 12, 0.2); color: #fb923c; }

.dash-kpi-meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.dash-kpi-label {
  font-size: 13px;
  font-weight: 500;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

html.dark .dash-kpi-label {
  color: #94a3b8;
}

.dash-kpi-val {
  font-size: 24px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
  line-height: 1.15;
  white-space: nowrap;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

html.dark .dash-kpi-val {
  color: #f8fafc;
}

.dash-kpi-bottom {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.dash-kpi-trend {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: #64748b;
  white-space: nowrap;
}

.dash-kpi-trend .trend-badge {
  font-weight: 700;
  color: #059669;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.dash-kpi-trend .trend-sub {
  color: #94a3b8;
  font-weight: 400;
}

html.dark .dash-kpi-trend .trend-sub {
  color: #64748b;
}

.dash-kpi-sparkline {
  width: 96px;
  height: 34px;
  flex-shrink: 0;
}

.dash-kpi-sparkline svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

/* --------------------------------------------------------------------------
   ROW 2: Sales & Delivery Overview Chart Card
   -------------------------------------------------------------------------- */
.dash-chart-card {
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.dash-chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.dash-chart-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dash-chart-icon {
  font-size: 18px;
  color: #059669;
}

.dash-chart-title {
  font-size: 17px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.01em;
  margin: 0;
}

html.dark .dash-chart-title {
  color: #f8fafc;
}

.dash-chart-legend {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: 14px;
  flex-wrap: wrap;
}

.dash-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #475569;
  font-weight: 500;
}

html.dark .dash-legend-item {
  color: #94a3b8;
}

.dash-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.dash-legend-dot.green { background: #10b981; }
.dash-legend-dot.blue { background: #3b82f6; }
.dash-legend-dot.purple { background: #a855f7; }

/* Period Switcher Pills */
.dash-period-group {
  display: flex;
  align-items: center;
  background: #f1f5f9;
  border-radius: 4px;
  padding: 3px;
  gap: 2px;
}

html.dark .dash-period-group {
  background: #1e293b;
}

.dash-period-btn {
  padding: 6px 14px;
  border-radius: 4px;
  border: none;
  background: transparent;
  color: #64748b;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.16s ease;
  white-space: nowrap;
}

.dash-period-btn:hover {
  color: #0f172a;
  background: rgba(255, 255, 255, 0.6);
}

html.dark .dash-period-btn:hover {
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.05);
}

.dash-period-btn.active {
  background: #064e3b !important;
  color: #ffffff !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

/* SVG Chart Area */
.dash-chart-canvas-wrap {
  width: 100%;
  height: 340px;
  position: relative;
  overflow: visible;
  user-select: none;
}

.dash-chart-svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

/* Tooltip on SVG Chart */
.dash-chart-tooltip {
  position: absolute;
  top: 30px;
  left: 48%;
  transform: translateX(-50%);
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  padding: 10px 14px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.04);
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 140px;
  pointer-events: none;
  transition: transform 0.12s ease, opacity 0.15s ease;
}

html.dark .dash-chart-tooltip {
  background: #1e293b;
  border-color: #334155;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

.dash-tooltip-date {
  font-size: 11px;
  font-weight: 700;
  color: #0f172a;
  padding-bottom: 4px;
  border-bottom: 1px solid #f1f5f9;
  letter-spacing: -0.1px;
}

html.dark .dash-tooltip-date {
  color: #f8fafc;
  border-bottom-color: #334155;
}

.dash-tooltip-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 11px;
}

.dash-tooltip-key {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #64748b;
  font-weight: 500;
}

html.dark .dash-tooltip-key {
  color: #94a3b8;
}

.dash-tooltip-val {
  font-weight: 700;
  color: #0f172a;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

html.dark .dash-tooltip-val {
  color: #f8fafc;
}

/* --------------------------------------------------------------------------
   ROW 3: 3 Columns Grid (Quick Overview, Labour Bill, Company Vehicle)
   -------------------------------------------------------------------------- */
.dash-middle-grid {
  display: grid;
  grid-template-columns: 2fr 1.15fr 1.1fr;
  gap: 18px;
}

@media (max-width: 1200px) {
  .dash-middle-grid {
    grid-template-columns: 1fr;
  }
}

.dash-sub-card {
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.dash-sub-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dash-sub-card-title {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

html.dark .dash-sub-card-title {
  color: #f8fafc;
}

/* 5 Mini Quick Overview Cards */
.dash-quick-items-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}

@media (max-width: 768px) {
  .dash-quick-items-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

.dash-quick-mini-item {
  background: #ffffff;
  border: 1px solid #f1f5f9;
  border-radius: 4px;
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
  transition: all 0.18s ease;
}

.dash-quick-mini-item:hover {
  transform: translateY(-2px);
  border-color: #e2e8f0;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
}

html.dark .dash-quick-mini-item {
  background: #0f172a;
  border-color: #1e293b;
}

html.dark .dash-quick-mini-item:hover {
  border-color: #334155;
}

.dash-mini-icon-circle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
}

.dash-mini-icon-circle.green { background: #ecfdf5; color: #059669; }
.dash-mini-icon-circle.blue { background: #eff6ff; color: #2563eb; }
.dash-mini-icon-circle.purple { background: #faf5ff; color: #7c3aed; }
.dash-mini-icon-circle.orange { background: #fff7ed; color: #ea580c; }
.dash-mini-icon-circle.teal { background: #f0fdfa; color: #0d9488; }

html.dark .dash-mini-icon-circle.green { background: rgba(5, 150, 105, 0.18); color: #34d399; }
html.dark .dash-mini-icon-circle.blue { background: rgba(37, 99, 235, 0.18); color: #60a5fa; }
html.dark .dash-mini-icon-circle.purple { background: rgba(124, 58, 237, 0.18); color: #a78bfa; }
html.dark .dash-mini-icon-circle.orange { background: rgba(234, 88, 12, 0.18); color: #fb923c; }
html.dark .dash-mini-icon-circle.teal { background: rgba(13, 148, 136, 0.18); color: #2dd4bf; }

.dash-mini-label {
  font-size: 11px;
  font-weight: 500;
  color: #64748b;
  line-height: 1.2;
}

html.dark .dash-mini-label {
  color: #94a3b8;
}

.dash-mini-val {
  font-size: 18px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.01em;
  line-height: 1;
}

html.dark .dash-mini-val {
  color: #f8fafc;
}

.dash-mini-sparkline {
  width: 100%;
  height: 18px;
}

.dash-mini-sparkline svg {
  width: 100%;
  height: 100%;
}

/* Donut Chart Containers */
.dash-donut-content-layout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 100%;
}

.dash-donut-canvas {
  position: relative;
  width: 130px;
  height: 130px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dash-donut-canvas svg {
  transform: rotate(-90deg);
  width: 100%;
  height: 100%;
}

.dash-donut-center-info {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.dash-donut-center-num {
  font-size: 17px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1;
}

html.dark .dash-donut-center-num {
  color: #f8fafc;
}

.dash-donut-center-sub {
  font-size: 9.5px;
  color: #64748b;
  font-weight: 500;
  white-space: nowrap;
}

html.dark .dash-donut-center-sub {
  color: #94a3b8;
}

.dash-donut-legend-col {
  display: flex;
  flex-direction: column;
  gap: 9px;
  flex: 1;
}

.dash-donut-legend-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
}

.dash-donut-legend-lbl {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #475569;
  font-weight: 500;
}

html.dark .dash-donut-legend-lbl {
  color: #94a3b8;
}

.dash-donut-legend-pct {
  font-weight: 700;
  color: #0f172a;
}

html.dark .dash-donut-legend-pct {
  color: #f8fafc;
}

/* --------------------------------------------------------------------------
   ROW 4: Labour Serial Cards — Trending Premium Soft UI Design
   -------------------------------------------------------------------------- */
.dash-bottom-tables-grid {
  display: flex;
  flex-direction: column;
  gap: 28px;
  width: 100%;
}

.dash-serial-full-card {
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.85);
  border-radius: 20px;
  box-shadow:
    0 10px 30px -5px rgba(15, 23, 42, 0.04),
    0 4px 12px -2px rgba(15, 23, 42, 0.02),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.dash-serial-full-card:hover {
  box-shadow:
    0 14px 36px -6px rgba(15, 23, 42, 0.07),
    0 6px 16px -2px rgba(15, 23, 42, 0.03),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

html.dark .dash-serial-full-card {
  background: #0f1929;
  border-color: #1a2742;
  box-shadow:
    0 10px 30px -5px rgba(0, 0, 0, 0.4),
    0 1px 0 rgba(255, 255, 255, 0.04) inset;
}

/* Card Top Zone (header + floating queue bar) */
.dash-sfc-top {
  padding: 22px 24px 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.6) 0%, rgba(255, 255, 255, 0) 100%);
  border-bottom: 1px solid #f1f5f9;
}

html.dark .dash-sfc-top {
  background: linear-gradient(180deg, rgba(15, 25, 41, 0.6) 0%, rgba(15, 25, 41, 0) 100%);
  border-bottom-color: #1a2742;
}

/* Card Table Zone */
.dash-sfc-body {
  padding: 0 24px;
}

/* Card Footer Zone */
.dash-sfc-footer {
  padding: 14px 24px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: #64748b;
  border-top: 1px solid #f1f5f9;
  background: #f8fafc;
}

html.dark .dash-sfc-footer {
  background: #0b1320;
  border-top-color: #1a2742;
  color: #94a3b8;
}

.dash-serial-header-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dash-serial-subtitle {
  font-size: 12px;
  color: #64748b;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
}

html.dark .dash-serial-subtitle {
  color: #94a3b8;
}

.dash-serial-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.dash-serial-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid transparent;
}

.dash-serial-btn-history {
  background: #f1f5f9;
  color: #334155;
  border-color: #e2e8f0;
}

.dash-serial-btn-history:hover {
  background: #e2e8f0;
  color: #0f172a;
  transform: translateY(-1px);
}

html.dark .dash-serial-btn-history {
  background: #1e293b;
  color: #cbd5e1;
  border-color: #334155;
}

html.dark .dash-serial-btn-history:hover {
  background: #334155;
  color: #ffffff;
}

.dash-serial-btn-bonus {
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  color: #92400e;
  border-color: #fde68a;
  box-shadow: 0 1px 3px rgba(245, 158, 11, 0.1);
}

.dash-serial-btn-bonus:hover {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  color: #78350f;
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(245, 158, 11, 0.18);
}

html.dark .dash-serial-btn-bonus {
  background: rgba(245, 158, 11, 0.15);
  color: #fcd34d;
  border-color: rgba(245, 158, 11, 0.3);
}

/* ==========================================================================
   TRENDING SOFT UI: FLOATING ANIMATED NEXT-TO-LOAD LABOUR GROUP BOX
   ========================================================================== */
.dash-queue-highlight-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 18px;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 16px;
  flex-wrap: wrap;
  position: relative;
}

html.dark .dash-queue-highlight-bar {
  background: linear-gradient(135deg, #0e1726 0%, #111d30 100%);
  border-color: #1e293b;
}

.dash-queue-highlight-bar.ship-theme {
  background: linear-gradient(135deg, #f8fafc 0%, #f0f7ff 100%);
  border-color: rgba(2, 132, 199, 0.18);
}

html.dark .dash-queue-highlight-bar.ship-theme {
  background: linear-gradient(135deg, #0c1829 0%, #0d1e36 100%);
  border-color: rgba(2, 132, 199, 0.25);
}

/* Floating Box: Vehicle Loading (Emerald soft glow & gentle bobbing animation) */
.dash-queue-next-float {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  background: #ffffff;
  padding: 9px 18px;
  border-radius: 14px;
  border: 1.5px solid rgba(16, 185, 129, 0.35);
  box-shadow:
    0 10px 24px -4px rgba(16, 185, 129, 0.2),
    0 4px 8px -2px rgba(16, 185, 129, 0.1);
  animation: softFloatVeh 3.5s ease-in-out infinite;
  position: relative;
  transition: all 0.25s ease;
}

.dash-queue-next-float:hover {
  border-color: #10b981;
  box-shadow:
    0 16px 32px -4px rgba(16, 185, 129, 0.3),
    0 6px 12px -2px rgba(16, 185, 129, 0.15);
}

@keyframes softFloatVeh {
  0%, 100% {
    transform: translateY(0px);
    box-shadow:
      0 10px 24px -4px rgba(16, 185, 129, 0.2),
      0 4px 8px -2px rgba(16, 185, 129, 0.1);
  }
  50% {
    transform: translateY(-4px);
    box-shadow:
      0 18px 32px -4px rgba(16, 185, 129, 0.32),
      0 8px 14px -2px rgba(16, 185, 129, 0.16);
  }
}

/* Floating Box: Ship Loading (Sky/Sapphire soft glow & animation) */
.dash-queue-next-float.ship {
  border-color: rgba(2, 132, 199, 0.35);
  box-shadow:
    0 10px 24px -4px rgba(2, 132, 199, 0.2),
    0 4px 8px -2px rgba(2, 132, 199, 0.1);
  animation: softFloatShip 3.5s ease-in-out infinite;
}

.dash-queue-next-float.ship:hover {
  border-color: #0284c7;
  box-shadow:
    0 16px 32px -4px rgba(2, 132, 199, 0.3),
    0 6px 12px -2px rgba(2, 132, 199, 0.15);
}

@keyframes softFloatShip {
  0%, 100% {
    transform: translateY(0px);
    box-shadow:
      0 10px 24px -4px rgba(2, 132, 199, 0.2),
      0 4px 8px -2px rgba(2, 132, 199, 0.1);
  }
  50% {
    transform: translateY(-4px);
    box-shadow:
      0 18px 32px -4px rgba(2, 132, 199, 0.32),
      0 8px 14px -2px rgba(2, 132, 199, 0.16);
  }
}

html.dark .dash-queue-next-float {
  background: #0f2030;
  border-color: rgba(16, 185, 129, 0.45);
}

html.dark .dash-queue-next-float.ship {
  background: #0a1f38;
  border-color: rgba(2, 132, 199, 0.45);
}

/* Animated Beacon Core */
.dash-queue-next-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #059669;
  font-size: 16px;
  position: relative;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.2);
}

.dash-queue-next-float.ship .dash-queue-next-icon {
  background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
  color: #0284c7;
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.2);
}

html.dark .dash-queue-next-icon {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
}

html.dark .dash-queue-next-float.ship .dash-queue-next-icon {
  background: rgba(2, 132, 199, 0.2);
  color: #38bdf8;
}

.dash-queue-next-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dash-queue-next-eyebrow {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #059669;
  display: flex;
  align-items: center;
  gap: 6px;
}

.dash-queue-next-float.ship .dash-queue-next-eyebrow {
  color: #0284c7;
}

html.dark .dash-queue-next-eyebrow {
  color: #34d399;
}

html.dark .dash-queue-next-float.ship .dash-queue-next-eyebrow {
  color: #38bdf8;
}

.dash-queue-group-name {
  font-size: 15px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.2px;
  line-height: 1.2;
}

html.dark .dash-queue-group-name {
  color: #f8fafc;
}

.dash-queue-turn-tag {
  font-size: 10.5px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 6px;
  background: #d1fae5;
  color: #065f46;
  width: fit-content;
  margin-top: 2px;
}

.dash-queue-turn-tag.ship {
  background: #e0f2fe;
  color: #0369a1;
}

html.dark .dash-queue-turn-tag {
  background: rgba(16, 185, 129, 0.2);
  color: #6ee7b7;
}

html.dark .dash-queue-turn-tag.ship {
  background: rgba(2, 132, 199, 0.2);
  color: #7dd3fc;
}

/* Rotating radar pulse dot */
.dash-pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  display: inline-block;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: dashPulse 1.8s infinite;
}

.dash-pulse-dot.ship {
  background: #0284c7;
  box-shadow: 0 0 0 0 rgba(2, 132, 199, 0.7);
  animation: dashPulseShip 1.8s infinite;
}

@keyframes dashPulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 7px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

@keyframes dashPulseShip {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(2, 132, 199, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 7px rgba(2, 132, 199, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(2, 132, 199, 0); }
}

.dash-queue-arrow {
  color: #cbd5e1;
  font-size: 13px;
  margin: 0 2px;
}

.dash-queue-pending-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dash-queue-pending-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 5px;
}

html.dark .dash-queue-pending-label {
  color: #94a3b8;
}

.dash-queue-pending-list {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.dash-pending-pill {
  font-size: 12px;
  font-weight: 600;
  color: #334155;
  background: #ffffff;
  padding: 5px 12px;
  border-radius: 9px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  transition: all 0.15s ease;
}

.dash-pending-pill:hover {
  border-color: #cbd5e1;
  transform: translateY(-1px);
}

html.dark .dash-pending-pill {
  background: #1e293b;
  color: #cbd5e1;
  border-color: #334155;
}

.dash-queue-mini-sep {
  color: #cbd5e1;
}

.dash-queue-summary-pill {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: #475569;
  background: #ffffff;
  padding: 7px 16px;
  border-radius: 10px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

html.dark .dash-queue-summary-pill {
  background: #0f172a;
  color: #94a3b8;
  border-color: #334155;
}

/* Quick Rotate Button next to floating box */
.dash-queue-rotate-btn {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #475569;
  font-size: 11px;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.18s ease;
}

.dash-queue-rotate-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
  transform: translateY(-1px);
}

html.dark .dash-queue-rotate-btn {
  background: #1e293b;
  border-color: #334155;
  color: #cbd5e1;
}

/* ==========================================================================
   CLEAN & FRESH SOFT TABLE STYLING
   ========================================================================== */
.dash-table-wrap {
  overflow-x: auto;
  border: 1px solid #f1f5f9;
  border-radius: 14px;
  margin: 4px 0 16px;
  background: #ffffff;
}

html.dark .dash-table-wrap {
  background: #0b1320;
  border-color: #1a2742;
}

.dash-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 12.5px;
  text-align: left;
}

/* Table Headers */
.dash-table thead tr th {
  background: #f8fafc;
  color: #64748b;
  font-weight: 700;
  padding: 12px 14px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid #e2e8f0;
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 2;
}

html.dark .dash-table thead tr th {
  background: #0c1626;
  color: #64748b;
  border-bottom-color: #1a2742;
}

/* Clean Table Rows */
.dash-table tbody tr.srl-data-row {
  transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.dash-table tbody tr.srl-data-row td {
  padding: 12px 14px;
  border-bottom: 1px solid #f1f5f9;
  color: #334155;
  white-space: nowrap;
  vertical-align: middle;
}

html.dark .dash-table tbody tr.srl-data-row td {
  border-bottom-color: #1a2742;
  color: #cbd5e1;
}

/* Soft Hover effect on row */
.dash-table tbody tr.srl-data-row:hover td {
  background: rgba(16, 185, 129, 0.035);
}

.dash-table.dash-ship-table tbody tr.srl-data-row:hover td {
  background: rgba(2, 132, 199, 0.035);
}

html.dark .dash-table tbody tr.srl-data-row:hover td {
  background: rgba(16, 185, 129, 0.06);
}

html.dark .dash-table.dash-ship-table tbody tr.srl-data-row:hover td {
  background: rgba(2, 132, 199, 0.06);
}

/* Drag & Drop Feedback: Up & Down reordering */
.srl-drag-handle {
  cursor: grab;
  color: #94a3b8;
  font-size: 13px;
  padding: 5px 6px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  user-select: none;
}

.srl-drag-handle:hover {
  color: #0f172a;
  background: #f1f5f9;
}

.srl-drag-handle:active {
  cursor: grabbing;
}

.dash-table tbody tr.srl-dragging {
  opacity: 0.35;
  background: #f1f5f9 !important;
}

.dash-table tbody tr.srl-drag-over-top td {
  border-top: 3px solid #10b981 !important;
}

.dash-table tbody tr.srl-drag-over-bottom td {
  border-bottom: 3px solid #10b981 !important;
}

.dash-table.dash-ship-table tbody tr.srl-drag-over-top td {
  border-top: 3px solid #0284c7 !important;
}

.dash-table.dash-ship-table tbody tr.srl-drag-over-bottom td {
  border-bottom: 3px solid #0284c7 !important;
}

/* Date Divider Group Banner (Today & Yesterday) */
.dash-date-group-header td {
  padding: 10px 16px !important;
  background: linear-gradient(90deg, #f8fafc 0%, #f1f5f9 100%) !important;
  border-top: 1px solid #e2e8f0 !important;
  border-bottom: 1px solid #e2e8f0 !important;
}

html.dark .dash-date-group-header td {
  background: linear-gradient(90deg, #131f30 0%, #0e1726 100%) !important;
  border-color: #1e293b !important;
}

.dash-date-header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.dash-date-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 8px;
}

.dash-date-badge.today {
  background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
  color: #065f46;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

html.dark .dash-date-badge.today {
  background: rgba(16, 185, 129, 0.18);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.3);
}

.dash-date-badge.yesterday {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
}

html.dark .dash-date-badge.yesterday {
  background: rgba(148, 163, 184, 0.12);
  color: #94a3b8;
  border-color: #334155;
}

.dash-date-summary {
  font-size: 12px;
  color: #64748b;
  font-weight: 600;
}

html.dark .dash-date-summary {
  color: #94a3b8;
}

/* Number Index Badge */
.dash-sl-pill {
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  background: #f1f5f9;
  padding: 2px 7px;
  border-radius: 6px;
  display: inline-block;
  min-width: 18px;
  text-align: center;
}

html.dark .dash-sl-pill {
  background: #1e293b;
  color: #94a3b8;
}

/* Group & Bonus Pills */
.dash-group-badge-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.dash-group-pill {
  font-weight: 700;
  color: #1e293b;
  font-size: 12px;
  background: #f8fafc;
  padding: 4px 10px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  white-space: nowrap;
}

html.dark .dash-group-pill {
  background: #1e293b;
  color: #cbd5e1;
  border-color: #334155;
}

.dash-bonus-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 6px;
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  color: #92400e;
  font-size: 10.5px;
  font-weight: 700;
  border: 1px solid #fde68a;
}

html.dark .dash-bonus-tag {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.3);
}

.dash-bill-val {
  font-family: 'JetBrains Mono', 'Fira Code', Consolas, monospace;
  font-weight: 700;
  color: #059669;
  font-size: 12.5px;
  background: rgba(5, 150, 105, 0.08);
  padding: 3px 8px;
  border-radius: 6px;
}

html.dark .dash-bill-val {
  color: #34d399;
  background: rgba(52, 211, 153, 0.1);
}

/* Inline Edit Styles */
.srl-editable-cell {
  cursor: pointer;
  position: relative;
  transition: background 0.15s ease;
}

.srl-editable-cell:hover {
  background: rgba(0, 0, 0, 0.02);
  border-radius: 4px;
}

.srl-editable-cell:hover::after {
  content: ' ✎';
  font-size: 10px;
  color: #94a3b8;
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
}

.srl-edit-input {
  width: 100%;
  padding: 5px 8px;
  border: 1.5px solid #10b981;
  border-radius: 8px;
  font-size: 12.5px;
  background: #ffffff;
  color: #0f172a;
  outline: none;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.14);
  min-width: 90px;
}

html.dark .srl-edit-input {
  background: #0f172a;
  color: #f1f5f9;
  border-color: #10b981;
}

.srl-ship-edit-input {
  border-color: #0284c7;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.14);
}

/* Row Action Buttons Column */
.srl-row-actions {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.srl-row-act-btn {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #64748b;
  font-size: 11.5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.18s ease;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.srl-row-act-btn:hover {
  border-color: #10b981;
  color: #059669;
  background: #f0fdf4;
  transform: scale(1.08);
}

.srl-row-act-btn.edit:hover {
  border-color: #3b82f6;
  color: #2563eb;
  background: #eff6ff;
}

.srl-row-act-btn.danger:hover {
  border-color: #ef4444;
  color: #dc2626;
  background: #fef2f2;
}

html.dark .srl-row-act-btn {
  background: #1e293b;
  border-color: #334155;
  color: #94a3b8;
}

html.dark .srl-row-act-btn:hover {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
}

html.dark .srl-row-act-btn.danger:hover {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
}

/* Status Pills — Premium Soft Design */
.dash-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 11px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1px;
  white-space: nowrap;
}

.dash-status-pill.active {
  background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
  color: #166534;
  border: 1px solid rgba(22, 101, 52, 0.2);
}

.dash-status-pill.inactive {
  background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
  color: #991b1b;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.dash-status-pill.running {
  background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
  color: #1e40af;
  border: 1px solid rgba(30, 64, 175, 0.2);
}

.dash-status-pill.next-to-load {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  color: #92400e;
  border: 1px solid rgba(146, 64, 14, 0.2);
}

.dash-status-pill.waiting {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
}

html.dark .dash-status-pill.active {
  background: rgba(22, 101, 52, 0.25);
  color: #4ade80;
  border-color: rgba(74, 222, 128, 0.3);
}

html.dark .dash-status-pill.running {
  background: rgba(30, 64, 175, 0.25);
  color: #60a5fa;
  border-color: rgba(96, 165, 250, 0.3);
}

html.dark .dash-status-pill.next-to-load {
  background: rgba(146, 64, 14, 0.25);
  color: #fbbf24;
  border-color: rgba(251, 191, 36, 0.3);
}

html.dark .dash-status-pill.waiting {
  background: rgba(71, 85, 105, 0.2);
  color: #94a3b8;
  border-color: #334155;
}


/* Dots action button — keep for modal triggers */
.dash-action-dots-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
  font-size: 15px;
  transition: all 0.15s ease;
  font-weight: 700;
  line-height: 1;
}

.dash-action-dots-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
}

html.dark .dash-action-dots-btn:hover {
  background: #334155;
  color: #f8fafc;
}

/* Table Pagination Footer */
.dash-table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
  color: #64748b;
  padding-top: 4px;
}

html.dark .dash-table-footer {
  color: #94a3b8;
}

.dash-pagination-btns {
  display: flex;
  align-items: center;
  gap: 4px;
}

.dash-page-btn {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.dash-page-btn:hover {
  border-color: #cbd5e1;
  color: #0f172a;
}

.dash-page-btn.active {
  background: #064e3b;
  color: #ffffff;
  border-color: #064e3b;
}

html.dark .dash-page-btn {
  background: #1e293b;
  border-color: #334155;
  color: #94a3b8;
}

html.dark .dash-page-btn.active {
  background: #064e3b;
  color: #ffffff;
  border-color: #064e3b;
}

/* --------------------------------------------------------------------------
   ROW 5: Brand Footer
   -------------------------------------------------------------------------- */
.dash-brand-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 4px 6px;
  font-size: 11.5px;
  color: #94a3b8;
  border-top: 1px solid #eef2f6;
  margin-top: 6px;
}

html.dark .dash-brand-footer {
  border-top-color: #1e293b;
  color: #64748b;
}

/* --------------------------------------------------------------------------
   Add Serial Modal
   -------------------------------------------------------------------------- */
.dash-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
}

.dash-modal-backdrop.hidden {
  display: none !important;
}

.dash-modal-box {
  width: 100%;
  max-width: 480px;
  background: #ffffff;
  border-radius: 4px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  border: 1px solid #e2e8f0;
  animation: dashItemEnter 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

html.dark .dash-modal-box {
  background: #131d2e;
  border-color: #1e293b;
}

.dash-modal-header {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #f1f5f9;
}

html.dark .dash-modal-header {
  border-bottom-color: #1e293b;
}

.dash-modal-title {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
}

html.dark .dash-modal-title {
  color: #f8fafc;
}

.dash-modal-close-btn {
  background: transparent;
  border: none;
  color: #64748b;
  font-size: 16px;
  cursor: pointer;
}

.dash-modal-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.dash-modal-row {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.dash-modal-label {
  font-size: 12px;
  font-weight: 600;
  color: #475569;
}

html.dark .dash-modal-label {
  color: #94a3b8;
}

.dash-modal-input {
  padding: 8px 12px;
  border-radius: 4px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  font-size: 13px;
  color: #0f172a;
  outline: none;
  transition: border-color 0.15s ease;
}

html.dark .dash-modal-input {
  background: #0f172a;
  border-color: #334155;
  color: #f8fafc;
}

.dash-modal-input:focus {
  border-color: #059669;
}

.dash-modal-footer {
  padding: 14px 20px;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  border-top: 1px solid #f1f5f9;
}

html.dark .dash-modal-footer {
  background: #0f172a;
  border-top-color: #1e293b;
}

.dash-modal-cancel {
  padding: 7px 14px;
  border-radius: 4px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #475569;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

html.dark .dash-modal-cancel {
  background: #1e293b;
  border-color: #334155;
  color: #cbd5e1;
}

.dash-modal-submit {
  padding: 7px 16px;
  border-radius: 4px;
  background: #064e3b;
  color: #ffffff;
  border: none;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.dash-modal-submit:hover {
  background: #047857;
}

/* --------------------------------------------------------------------------
   Delivery Schedule Analytics Section on Dashboard
   -------------------------------------------------------------------------- */
.dash-delivery-analytics {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.dash-delivery-analytics-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  gap: 12px;
  flex-wrap: wrap;
}

.dash-daterange-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  color: #334155;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  transition: all 0.2s ease;
}

html.dark .dash-daterange-badge,
[data-theme="dark"] .dash-daterange-badge {
  background: #1e293b;
  border-color: #334155;
  color: #cbd5e1;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.dash-daterange-icon {
  color: #047857;
  font-size: 13px;
}

html.dark .dash-daterange-icon,
[data-theme="dark"] .dash-daterange-icon {
  color: #10b981;
}

.dash-daterange-text {
  font-size: 12px;
  letter-spacing: 0.1px;
}

#view-dashboard .odoo-graph-kpi-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 16px;
}

@media (max-width: 1200px) {
  #view-dashboard .odoo-graph-kpi-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  #view-dashboard .odoo-graph-kpi-row {
    grid-template-columns: 1fr;
  }
}

#view-dashboard .odoo-graph-kpi-card {
  background: #ffffff;
  border: 1px solid #eef2f6;
  border-radius: 4px;
  padding: 16px 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02), 0 2px 8px rgba(15, 23, 42, 0.03);
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s ease;
}

#view-dashboard .odoo-graph-kpi-card:hover {
  border-color: #e2e8f0;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.06);
}

#view-dashboard .odoo-graph-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 16px;
}

@media (max-width: 992px) {
  #view-dashboard .odoo-graph-grid {
    grid-template-columns: 1fr;
  }
}

#view-dashboard .odoo-graph-card {
  background: #ffffff;
  border: 1px solid #eef2f6;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02), 0 2px 8px rgba(15, 23, 42, 0.03);
  overflow: visible;
  display: flex;
  flex-direction: column;
}

#view-dashboard .odoo-graph-card-header {
  padding: 14px 20px;
  border-bottom: 1px solid #f1f5f9;
  font-size: 13px;
  font-weight: 700;
  color: #1e293b;
  background: #ffffff;
}

#view-dashboard .odoo-chart-canvas-wrap {
  padding: 18px 20px;
  min-height: 240px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
}

/* Dark mode overrides for dashboard delivery analytics */
html.dark #view-dashboard .odoo-graph-kpi-card,
[data-theme="dark"] #view-dashboard .odoo-graph-kpi-card,
html.dark #view-dashboard .odoo-graph-card,
[data-theme="dark"] #view-dashboard .odoo-graph-card {
  background: #131d2e;
  border-color: #1e293b;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}

html.dark #view-dashboard .odoo-kpi-title,
[data-theme="dark"] #view-dashboard .odoo-kpi-title {
  color: #94a3b8;
}

html.dark #view-dashboard .odoo-kpi-value,
[data-theme="dark"] #view-dashboard .odoo-kpi-value {
  color: #f1f5f9;
}

html.dark #view-dashboard .odoo-graph-card-header,
[data-theme="dark"] #view-dashboard .odoo-graph-card-header {
  background: #131d2e;
  border-bottom-color: #1e293b;
  color: #f1f5f9;
}

html.dark #view-dashboard .odoo-vbar-label,
[data-theme="dark"] #view-dashboard .odoo-vbar-label {
  color: #cbd5e1;
}

html.dark #view-dashboard .odoo-vbar-track,
[data-theme="dark"] #view-dashboard .odoo-vbar-track {
  background: #334155;
}

html.dark #view-dashboard .odoo-dist-item,
[data-theme="dark"] #view-dashboard .odoo-dist-item {
  background: #0f172a;
  border-color: #1e293b;
}

html.dark #view-dashboard .odoo-dist-item span,
[data-theme="dark"] #view-dashboard .odoo-dist-item span {
  color: #f1f5f9 !important;
}

/* --------------------------------------------------------------------------
   Time Filter Segmented Control Pills (Day, Week, Month, Year, Lifetime)
   -------------------------------------------------------------------------- */
.dash-time-filter-wrap {
  display: inline-flex;
  align-items: center;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 3px;
  gap: 3px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

html.dark .dash-time-filter-wrap,
[data-theme="dark"] .dash-time-filter-wrap {
  background: #1e293b;
  border-color: #334155;
}

.dash-time-pill {
  background: transparent;
  border: none;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  padding: 5px 14px;
  min-height: 28px;
  border-radius: 4px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.dash-time-pill:hover {
  color: #0f172a;
  background: rgba(255, 255, 255, 0.7);
}

html.dark .dash-time-pill,
[data-theme="dark"] .dash-time-pill {
  color: #94a3b8;
}

html.dark .dash-time-pill:hover,
[data-theme="dark"] .dash-time-pill:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.dash-time-pill.active {
  background: linear-gradient(135deg, #065f46 0%, #047857 100%);
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(4, 120, 87, 0.35);
}

/* --------------------------------------------------------------------------
   Horizontal Daily Dispatch Velocity Column Chart (Y-axis on left, dates bottom)
   -------------------------------------------------------------------------- */
.dash-vchart-container {
  display: flex;
  flex-direction: row;
  width: 100%;
  height: 250px;
  position: relative;
  box-sizing: border-box;
  padding: 10px 10px 0 0;
}

/* Left Y-Axis Scale */
.dash-vchart-yaxis {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-end;
  padding-right: 12px;
  width: 50px;
  flex-shrink: 0;
  height: calc(100% - 28px);
  box-sizing: border-box;
}

.dash-vchart-ytick {
  font-size: 10.5px;
  font-weight: 600;
  color: #94a3b8;
  line-height: 1;
  letter-spacing: -0.2px;
}

html.dark .dash-vchart-ytick,
[data-theme="dark"] .dash-vchart-ytick {
  color: #64748b;
}

/* Chart Canvas Area with Gridlines & Bars */
.dash-vchart-canvas {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
  width: 100%;
  min-width: 0;
  overflow: visible;
}

/* Background Guide Gridlines */
.dash-vchart-gridlines {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: calc(100% - 28px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  pointer-events: none;
}

.dash-vchart-gridline {
  width: 100%;
  height: 1px;
  background: #f1f5f9;
  border-top: 1px dashed #e2e8f0;
}

html.dark .dash-vchart-gridline,
[data-theme="dark"] .dash-vchart-gridline {
  background: transparent;
  border-top: 1px dashed #1e293b;
}

/* Vertical Scanning Guide Line */
.dash-vchart-guideline {
  position: absolute;
  top: 0;
  bottom: 28px;
  width: 1px;
  background: rgba(16, 185, 129, 0.35);
  border-left: 1px dashed #10b981;
  pointer-events: none;
  opacity: 0;
  z-index: 6;
  transition: opacity 0.12s ease;
}

/* Dynamic Floating HUD Tooltip (Always within visible chart canvas bounds) */
.dash-vchart-floating-tooltip {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #ffffff;
  padding: 8px 12px;
  border-radius: 7px;
  font-size: 11px;
  line-height: 1.35;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s ease;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.3), 0 2px 6px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.14);
  z-index: 999;
}

html.dark .dash-vchart-floating-tooltip,
[data-theme="dark"] .dash-vchart-floating-tooltip {
  background: rgba(15, 23, 42, 0.96);
  border-color: rgba(51, 65, 85, 0.85);
}

.dash-vcol-tooltip-date {
  font-weight: 700;
  font-size: 11px;
  color: #f8fafc;
  margin-bottom: 3px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  padding-bottom: 2px;
  letter-spacing: -0.2px;
}

.dash-vcol-tooltip-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 2px;
}

.dash-vcol-tooltip-key {
  color: #cbd5e1;
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 10.5px;
}

.dash-vcol-tooltip-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
}

.dash-vcol-tooltip-dot.green { background: #10b981; }
.dash-vcol-tooltip-dot.orange { background: #f59e0b; }

.dash-vcol-tooltip-val {
  font-weight: 700;
  font-size: 11px;
}

/* Bars Row Container (Bars sit horizontally side-by-side filling 100% width) */
.dash-vchart-bars-row {
  height: calc(100% - 28px);
  display: flex;
  align-items: flex-end;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  position: relative;
  z-index: 2;
  box-sizing: border-box;
}

/* Density: Day & Week (1 - 10 bars) */
.dash-vchart-bars-row.density-coarse {
  justify-content: space-around;
  gap: 12px;
  padding: 0 8px;
}
.dash-vchart-bars-row.density-coarse .dash-vcol-wrapper {
  max-width: 52px;
}
.dash-vchart-bars-row.density-coarse .dash-vcol-bar {
  border-radius: 6px 6px 2px 2px;
  max-width: 44px;
}

/* Density: Month (11 - 35 bars) */
.dash-vchart-bars-row.density-medium {
  justify-content: space-between;
  gap: 3px;
  padding: 0 4px;
}
.dash-vchart-bars-row.density-medium .dash-vcol-wrapper {
  max-width: 24px;
}
.dash-vchart-bars-row.density-medium .dash-vcol-bar {
  border-radius: 3px 3px 1px 1px;
}

/* Density: 36 - 120 bars */
.dash-vchart-bars-row.density-compact {
  justify-content: space-between;
  gap: 2px;
  padding: 0 2px;
}
.dash-vchart-bars-row.density-compact .dash-vcol-wrapper {
  max-width: none;
}
.dash-vchart-bars-row.density-compact .dash-vcol-bar {
  border-radius: 2px 2px 0 0;
}

/* Density: Year (121 - 370 bars - ultra-thin, fits strictly into 100% width) */
.dash-vchart-bars-row.density-dense {
  justify-content: space-between;
  gap: 1px;
  padding: 0 1px;
}
.dash-vchart-bars-row.density-dense .dash-vcol-wrapper {
  max-width: none;
}
.dash-vchart-bars-row.density-dense .dash-vcol-bar {
  border-radius: 1px 1px 0 0;
  box-shadow: none;
}

/* Density: Lifetime (370+ bars - touching continuous equalizer bars) */
.dash-vchart-bars-row.density-ultra {
  justify-content: stretch;
  gap: 0px;
  padding: 0;
}
.dash-vchart-bars-row.density-ultra .dash-vcol-wrapper {
  max-width: none;
}
.dash-vchart-bars-row.density-ultra .dash-vcol-bar {
  border-radius: 0;
  box-shadow: none;
}

/* Single Column Wrapper (Bar + Hover Anchor) */
.dash-vcol-wrapper {
  flex: 1 1 0px;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  position: relative;
  cursor: pointer;
  min-width: 0;
  box-sizing: border-box;
}

/* The Vertical Column Bar */
.dash-vcol-bar {
  width: 100%;
  background: linear-gradient(180deg, #34d399 0%, #059669 100%);
  position: relative;
  transition: transform 0.15s ease, filter 0.15s ease;
  box-shadow: 0 2px 6px rgba(5, 150, 105, 0.16);
  transform-origin: bottom;
  animation: dashBarGrow 0.45s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes dashBarGrow {
  0% { transform: scaleY(0); opacity: 0; }
  100% { transform: scaleY(1); opacity: 1; }
}

/* Maximum Delivery Day Bar (Full Glowing Green Gradient) */
.dash-vcol-bar.is-max {
  background: linear-gradient(180deg, #10b981 0%, #047857 100%);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.45);
  filter: drop-shadow(0 0 5px rgba(16, 185, 129, 0.35));
}

.dash-vcol-bar.is-max::after {
  content: "★";
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  color: #10b981;
  font-weight: 800;
  animation: starPulse 1.8s ease-in-out infinite;
  pointer-events: none;
}

.dash-vchart-bars-row.density-dense .dash-vcol-bar.is-max::after,
.dash-vchart-bars-row.density-ultra .dash-vcol-bar.is-max::after {
  font-size: 8px;
  top: -12px;
}

@keyframes starPulse {
  0%, 100% { transform: translateX(-50%) scale(1); opacity: 0.9; }
  50% { transform: translateX(-50%) scale(1.25); opacity: 1; }
}

/* Pending Only Bar (When delivered is 0) */
.dash-vcol-bar.is-pending {
  background: linear-gradient(180deg, #fbbf24 0%, #f59e0b 100%);
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.25);
}

/* Bar Hover State */
.dash-vcol-wrapper.is-hovered .dash-vcol-bar,
.dash-vcol-wrapper:hover .dash-vcol-bar {
  filter: brightness(1.25) saturate(1.2);
  transform: scaleY(1.04);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.7);
  z-index: 10;
}

/* X-Axis Date Labels Row */
.dash-vchart-dates-row {
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 8px;
  border-top: 1px solid #e2e8f0;
  padding: 0 4px;
  width: 100%;
  box-sizing: border-box;
}

.dash-vchart-dates-row.is-milestone {
  justify-content: space-between;
  gap: 0;
  padding: 0 6px;
}

html.dark .dash-vchart-dates-row,
[data-theme="dark"] .dash-vchart-dates-row {
  border-top-color: #334155;
}

.dash-vcol-date {
  flex: 1;
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.15s ease;
}

.dash-vcol-milestone-date {
  font-size: 10px;
  font-weight: 600;
  color: #64748b;
  white-space: nowrap;
  letter-spacing: -0.2px;
}

html.dark .dash-vcol-date,
[data-theme="dark"] .dash-vcol-date,
html.dark .dash-vcol-milestone-date,
[data-theme="dark"] .dash-vcol-milestone-date {
  color: #94a3b8;
}


