/* ZCAMS Dashboard v2 — ZAFFA operations mockup */

#app-root.dashboard-shell .nav-link.active {
  color: #fff;
  background: var(--zambia-orange);
  border-left: none;
  border-radius: 10px;
  box-shadow: 0 6px 16px rgba(239, 125, 0, 0.28);
  font-weight: 700;
  padding-left: 12px;
  margin: 2px 8px;
}

.sidebar-gn83-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 8px 12px 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.82);
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
}

.sidebar-gn83-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.nav-online-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.25);
  margin-left: auto;
  margin-right: 4px;
}

/* Global top bar */
.global-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 20px;
  background: #fff;
  border-bottom: 1px solid var(--mist-200);
  flex-shrink: 0;
}

.global-search-wrap {
  flex: 1;
  max-width: 520px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  height: 40px;
  border-radius: 999px;
  background: var(--mist-50);
  border: 1px solid var(--mist-200);
}

.global-search-input {
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  font-size: 13px;
  color: var(--mist-900);
}

.global-search-input::placeholder {
  color: var(--mist-400);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.topbar-icon-btn {
  position: relative;
  width: 36px;
  height: 36px;
  border: 1px solid var(--mist-200);
  border-radius: 10px;
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--mist-600);
  text-decoration: none;
}

.topbar-bell .nav-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  transform: scale(0.85);
}

.topbar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-left: 8px;
  margin-left: 4px;
  border-left: 1px solid var(--mist-200);
}

.topbar-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--zambia-orange), var(--zambia-yellow));
  color: #111;
  font-size: 11px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.topbar-user-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--mist-900);
}

.topbar-user-role {
  font-size: 10px;
  color: var(--mist-400);
}

/* Dashboard page */
.dashboard-v2 {
  padding: 18px 22px 12px;
  background: #f4f7f2;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.dash-greeting-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.dash-greeting-title {
  margin: 0;
  font-size: 26px;
  font-weight: 800;
  color: var(--mist-900);
}

.dash-greeting-sub {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--mist-500);
}

.dash-system-online {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--mist-200);
  font-size: 12px;
  font-weight: 600;
  color: var(--mist-700);
}

.dash-online-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  animation: dash-pulse 2s infinite;
}

@keyframes dash-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.45); }
  50% { box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
}

/* Stat cards */
.dash-stats-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.dash-stat-link {
  text-decoration: none;
  color: inherit;
}

.dash-stat-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid var(--mist-200);
  box-shadow: 0 8px 24px rgba(13, 25, 11, 0.04);
  min-height: 96px;
}

.dash-stat-card-highlight {
  background: linear-gradient(135deg, #fff7ed 0%, #fff 100%);
  border-color: #fed7aa;
}

.dash-stat-value {
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
  color: var(--mist-900);
}

.dash-stat-label {
  margin-top: 6px;
  font-size: 12px;
  color: var(--mist-500);
  font-weight: 600;
}

.dash-stat-tag {
  display: inline-block;
  margin-top: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
}

.tag-orange { background: #ffedd5; color: #c2410c; }
.tag-blue { background: #dbeafe; color: #1d4ed8; }
.tag-green { background: #dcfce7; color: #15803d; }
.tag-urgent { background: #fee2e2; color: #b91c1c; }

.dash-stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-green { background: #eaf6e5; color: var(--zambia-green); }
.icon-blue { background: #dbeafe; color: #2563eb; }
.icon-purple { background: #ede9fe; color: #7c3aed; }
.icon-orange { background: #ffedd5; color: var(--zambia-orange); }

/* Two-column rows */
.dash-row {
  display: grid;
  gap: 14px;
}

.dash-row-2-1 {
  grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
}

.dash-card {
  background: #fff;
  border: 1px solid var(--mist-200);
  border-radius: 18px;
  padding: 16px 18px;
  box-shadow: 0 10px 28px rgba(13, 25, 11, 0.05);
}

.dash-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.dash-card-title {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  color: var(--mist-900);
}

.dash-card-sub {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--mist-400);
}

.dash-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.dash-pill-progress { background: #ffedd5; color: #c2410c; }
.dash-pill-routes { background: #eaf6e5; color: var(--zambia-green); }
.dash-pill-notif { background: #fee2e2; color: #b91c1c; }

/* Journey tracker */
.dash-journey-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.dash-journey-ref {
  font-size: 11px;
  font-weight: 700;
  color: var(--mist-600);
}

.dash-journey-steps {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
  gap: 8px;
  margin-bottom: 12px;
}

.dash-journey-step {
  text-align: center;
}

.dash-journey-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  margin: 0 auto 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dash-journey-done { background: var(--zambia-green); }
.dash-journey-active { background: #fff; border: 2px solid var(--zambia-orange); }
.dash-journey-pending { background: #eef2ea; border: 2px solid #d8e3d2; }

.dash-journey-dot-active,
.dash-journey-dot-pending {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: block;
}

.dash-journey-dot-active { background: var(--zambia-orange); }
.dash-journey-dot-pending { background: #cbd5c4; }

.dash-journey-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--mist-700);
}

.dash-journey-date {
  font-size: 9px;
  color: var(--mist-400);
  margin-top: 2px;
}

.dash-journey-bar-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dash-journey-bar-fill-wrap {
  flex: 1;
  height: 6px;
  border-radius: 999px;
  background: #eef2ea;
  overflow: hidden;
}

.dash-journey-bar-fill-wrap > div {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--zambia-green), var(--zambia-orange));
}

.dash-journey-pct {
  font-size: 11px;
  font-weight: 700;
  color: var(--mist-500);
}

/* Quick actions */
.dash-quick-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.dash-quick-action {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 8px;
  min-height: 72px;
  padding: 12px 14px;
  border-radius: 14px;
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
  color: var(--mist-900);
}

.qa-green { background: #0c270c; color: #fff; }
.qa-beige { background: #f5f0e6; }
.qa-orange { background: var(--zambia-orange); color: #fff; }
.qa-peach { background: #dcfce7; color: #14532d; }

/* Transit map */
.dash-map {
  position: relative;
  height: 200px;
  border-radius: 14px;
  margin-bottom: 12px;
  background: #041604;
  overflow: hidden;
}

.dash-map-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.95;
}

.dash-map-route-line {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.dash-map-dot {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #38bdf8;
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.25), 0 0 16px rgba(56, 189, 248, 0.8);
  z-index: 2;
}

.dash-map-dot-dar { top: 42%; left: 68%; }
.dash-map-dot-ndola { top: 48%; left: 48%; background: #22c55e; box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.25), 0 0 16px rgba(34, 197, 94, 0.8); }
.dash-map-dot-durban { top: 78%; left: 55%; }
.dash-map-dot-lusaka { top: 52%; left: 50%; background: #fbbf24; box-shadow: 0 0 0 4px rgba(251, 191, 36, 0.25), 0 0 16px rgba(251, 191, 36, 0.7); }

.dash-map-label {
  position: absolute;
  font-size: 9px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.85);
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.35);
  z-index: 2;
}

.dash-map-label-dar { top: 34%; left: 64%; }
.dash-map-label-ndola { top: 40%; left: 44%; }
.dash-map-label-durban { top: 84%; left: 50%; }
.dash-map-label-lusaka { top: 44%; left: 52%; }

.dash-route-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dash-route-card {
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--mist-50);
  border: 1px solid var(--mist-100);
}

.dash-route-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
}

.dash-route-status {
  font-size: 10px;
  font-weight: 700;
  color: var(--zambia-green);
}

.dash-route-status.hold { color: #dc2626; }

.dash-route-eta {
  font-size: 10px;
  color: var(--mist-400);
  margin: 4px 0 6px;
}

.dash-route-bar {
  height: 4px;
  border-radius: 999px;
  background: #e5ebe2;
  overflow: hidden;
}

.dash-route-bar > div {
  height: 100%;
  border-radius: 999px;
}

.bar-orange > div { background: var(--zambia-orange); }
.bar-red > div { background: #ef4444; }
.bar-green > div { background: #22c55e; }

/* Notifications */
.dash-notif-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 240px;
  overflow: auto;
}

.dash-notif-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--mist-100);
}

.dash-notif-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ni-green { background: #dcfce7; color: #15803d; }
.ni-blue { background: #dbeafe; color: #2563eb; }
.ni-orange { background: #ffedd5; color: #c2410c; }
.ni-purple { background: #ede9fe; color: #7c3aed; }
.ni-gray { background: #f3f4f6; color: #6b7280; }

.dash-notif-copy strong {
  display: block;
  font-size: 12px;
}

.dash-notif-msg {
  margin: 2px 0 0;
  font-size: 11px;
  color: var(--mist-500);
}

.dash-notif-time {
  margin-left: auto;
  font-size: 10px;
  color: var(--mist-400);
  white-space: nowrap;
}

.dash-notif-link {
  display: inline-block;
  margin-top: 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--zambia-green);
  text-decoration: none;
}

/* Chart */
.dash-chart {
  height: 220px;
}

.dash-chart .js-plotly-plot,
.dash-chart .plot-container {
  height: 100% !important;
}

/* Integrity */
.dash-integrity-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dash-integrity-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--mist-100);
}

.dash-integrity-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ok-green { background: #dcfce7; color: #15803d; }
.ok-blue { background: #dbeafe; color: #2563eb; }

.dash-integrity-sub {
  margin: 2px 0 0;
  font-size: 10px;
  color: var(--mist-400);
}

.dash-integrity-row > svg:last-child {
  margin-left: auto;
}

/* BL table */
.dash-table-head {
  align-items: center;
}

.dash-table-upload-btn {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 10px;
  background: var(--zambia-orange);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(239, 125, 0, 0.25);
}

.dash-table-upload-btn:hover {
  filter: brightness(1.05);
}

.dash-table-wrap {
  overflow-x: auto;
}

.dash-bl-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.dash-bl-table th {
  text-align: left;
  padding: 10px 12px;
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--mist-400);
  border-bottom: 1px solid var(--mist-200);
}

.dash-bl-table td {
  padding: 12px;
  border-bottom: 1px solid var(--mist-100);
  color: var(--mist-800);
}

.dash-table-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
}

.dash-badge-green { background: #dcfce7; color: #15803d; }
.dash-badge-red { background: #fee2e2; color: #b91c1c; }
.dash-badge-blue { background: #dbeafe; color: #1d4ed8; }
.dash-badge-orange { background: #ffedd5; color: #c2410c; }

/* Footer */
.dash-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 4px 6px;
  font-size: 11px;
  color: var(--mist-400);
  flex-wrap: wrap;
}

.dash-footer-links {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.dash-footer-links a {
  color: var(--mist-500);
  text-decoration: none;
}

.dash-footer-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #dcfce7;
  color: #15803d;
  font-weight: 700;
}

@media (max-width: 1200px) {
  .dash-stats-row,
  .dash-row-2-1 {
    grid-template-columns: 1fr;
  }

  .dash-journey-steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .global-topbar {
    flex-wrap: wrap;
  }

  .global-search-wrap {
    max-width: none;
    width: 100%;
  }

  .topbar-user-meta {
    display: none;
  }
}
