/**
 * Bivo Dashboard — tokens unifiés avec le shell
 */

.bivo-dash-pro {
  max-width: 1400px;
  margin: 0 auto;
  padding-bottom: 8px;
}

.bivo-dash-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px 20px;
  margin: 0 0 16px;
}

.bivo-dash-hero h1 {
  margin: 4px 0 6px;
  font-size: var(--bivo-fs-2xl);
  font-weight: var(--bivo-fw-black);
  color: var(--bivo-ink);
  letter-spacing: -0.025em;
  line-height: 1.15;
}

.bivo-dash-hero p {
  margin: 0;
  color: var(--bivo-muted);
  font-size: var(--bivo-fs-base);
  font-weight: var(--bivo-fw-med);
  line-height: var(--bivo-lh);
}

.bivo-dash-hero-aside {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.bivo-dash-cta {
  border-radius: 10px !important;
  font-weight: var(--bivo-fw-bold);
  font-size: var(--bivo-fs-base) !important;
  padding: 10px 16px !important;
  height: 40px;
  display: inline-flex;
  align-items: center;
}

.bivo-breadcrumb {
  font-size: var(--bivo-fs-sm);
  color: var(--bivo-muted);
  margin: 0;
  line-height: 1.2;
}

.bivo-breadcrumb a {
  color: var(--bivo-orange);
  text-decoration: none;
  font-weight: var(--bivo-fw-semi);
}

.bivo-breadcrumb a:hover { color: var(--bivo-orange-dark); }

.bivo-breadcrumb-sep {
  margin: 0 6px;
  opacity: 0.45;
}

.bivo-dash-date {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  font-size: var(--bivo-fs-sm);
  color: var(--bivo-muted);
  font-weight: var(--bivo-fw-semi);
  background: #fff;
  border: 1px solid var(--bivo-border);
  border-radius: 999px;
  padding: 0 14px;
}

.bivo-overview-strip {
  display: flex;
  flex-wrap: wrap;
  background: var(--bivo-card);
  border: 1px solid var(--bivo-border);
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 16px;
}

.bivo-overview-label {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bivo-navy);
  color: #fff;
  font-weight: var(--bivo-fw-bold);
  font-size: var(--bivo-fs-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0 18px;
  min-width: 156px;
  min-height: 84px;
}

.bivo-overview-items {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  flex: 1;
}

.bivo-overview-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border-left: 1px solid var(--bivo-border);
  min-height: 84px;
}

.bivo-overview-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f1f5f9;
  color: var(--bivo-navy);
  font-size: 0.95rem;
  flex-shrink: 0;
}

.bivo-overview-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.bivo-overview-pending .bivo-overview-icon { background: #fff7ed; color: #ea580c; }
.bivo-overview-completed .bivo-overview-icon { background: #dcfce7; color: #16a34a; }
.bivo-overview-cancelled .bivo-overview-icon { background: #fee2e2; color: #dc2626; }
.bivo-overview-users .bivo-overview-icon,
.bivo-overview-bus .bivo-overview-icon { background: #e0e7ff; color: var(--bivo-navy); }

.bivo-overview-pending .bivo-stat { color: #ea580c; }
.bivo-overview-completed .bivo-stat { color: #16a34a; }
.bivo-overview-cancelled .bivo-stat { color: #dc2626; }
.bivo-overview-users .bivo-stat,
.bivo-overview-bus .bivo-stat { color: var(--bivo-navy); }

.bivo-kpi-row {
  --bs-gutter-x: 16px;
  --bs-gutter-y: 16px;
  margin-bottom: 4px;
}

.bivo-kpi-link {
  display: block;
  text-decoration: none;
  color: inherit;
  height: 100%;
}

.bivo-kpi-card {
  background: var(--bivo-card);
  border: 1px solid var(--bivo-border);
  border-radius: 14px;
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.bivo-kpi-link:hover .bivo-kpi-card {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.bivo-kpi-top {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 16px 12px;
  min-height: 88px;
}

.bivo-kpi-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  flex-shrink: 0;
}

.bivo-kpi-meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.bivo-kpi-meta p {
  margin: 0;
}

.bivo-kpi-meta h4 {
  margin: 0;
  font-size: 1.25rem;
  word-break: break-word;
}

.bivo-kpi-chart {
  margin-top: auto;
  padding: 10px 14px 14px;
  background: #f8fafc;
  border-top: 1px solid var(--bivo-border);
}

.bivo-kpi-chart-head { margin-bottom: 8px; }
.bivo-kpi-chart-head .bivo-meta { color: #94a3b8; }

.bivo-mini-bars {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  align-items: end;
  gap: 4px;
  height: 44px;
}

.bivo-mini-bars span {
  display: block;
  width: 100%;
  border-radius: 4px 4px 2px 2px;
  min-height: 8px;
}

.bivo-kpi-orange .bivo-kpi-icon { background: rgba(249, 83, 21, 0.12); color: var(--bivo-orange); }
.bivo-kpi-green .bivo-kpi-icon { background: rgba(22, 163, 74, 0.12); color: #16a34a; }
.bivo-kpi-navy .bivo-kpi-icon { background: rgba(21, 44, 112, 0.1); color: var(--bivo-navy); }
.bivo-kpi-blue .bivo-kpi-icon { background: rgba(37, 99, 235, 0.12); color: #2563eb; }

.bivo-mini-bars-orange span { background: linear-gradient(180deg, #ff6a30, #f95315); }
.bivo-mini-bars-green span { background: linear-gradient(180deg, #4ade80, #16a34a); }
.bivo-mini-bars-navy span { background: linear-gradient(180deg, #3b5bcc, #152c70); }
.bivo-mini-bars-blue span { background: linear-gradient(180deg, #60a5fa, #2563eb); }

.bivo-table-row,
.bivo-operator-tools {
  --bs-gutter-x: 16px;
  --bs-gutter-y: 16px;
}

.bivo-panel,
.bivo-quick-stats {
  background: var(--bivo-card);
  border: 1px solid var(--bivo-border);
  border-radius: 14px;
  margin-bottom: 16px;
  overflow: hidden;
}

.bivo-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 52px;
  padding: 0 16px;
  border-bottom: 1px solid var(--bivo-border);
  background: #fafbfc;
}

.bivo-panel-link {
  font-size: var(--bivo-fs-sm);
  font-weight: var(--bivo-fw-bold);
  color: var(--bivo-orange);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.bivo-panel-link i { font-size: 0.7rem; }
.bivo-panel-link:hover { color: var(--bivo-orange-dark); }

.bivo-table { margin: 0; }

.bivo-table thead th {
  background: #f8fafc;
  border-bottom: 1px solid var(--bivo-border);
  font-size: var(--bivo-fs-xs);
  font-weight: var(--bivo-fw-bold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--bivo-muted);
  padding: 12px 16px;
  vertical-align: middle;
  white-space: nowrap;
}

.bivo-table tbody td {
  padding: 12px 16px;
  vertical-align: middle;
  border-bottom: 1px solid #f1f5f9;
  font-size: var(--bivo-fs-base);
  color: #334155;
  line-height: 1.35;
}

.bivo-table tbody tr:last-child td { border-bottom: 0; }
.bivo-table tbody tr:hover { background: #fafbfc; }

.bivo-empty {
  text-align: center !important;
  color: var(--bivo-muted) !important;
  padding: 28px 16px !important;
  font-weight: 500;
}

.bivo-id {
  font-weight: 800;
  color: var(--bivo-navy);
  font-size: var(--bivo-fs-sm);
}

.bivo-cell-name { font-weight: 600; color: var(--bivo-ink); }

.bivo-cell-route {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.bivo-cell-route span {
  font-weight: 600;
  font-size: var(--bivo-fs-sm);
  color: #334155;
}

.bivo-cell-route i {
  font-size: 0.6rem;
  color: #94a3b8;
}

.bivo-cell-muted {
  color: var(--bivo-muted) !important;
  font-size: var(--bivo-fs-sm) !important;
}

.bivo-amount {
  color: var(--bivo-ink);
  font-weight: 800;
  font-size: var(--bivo-fs-base);
  white-space: nowrap;
}

.bivo-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 84px;
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: var(--bivo-fs-xs);
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.bivo-pill-success { background: #dcfce7; color: #15803d; }
.bivo-pill-warning { background: #ffedd5; color: #c2410c; }
.bivo-pill-danger { background: #fee2e2; color: #b91c1c; }

.bivo-quick-stats {
  background: var(--bivo-card);
  border: 1px solid var(--bivo-border);
  border-radius: 14px;
  margin-bottom: 16px;
  overflow: hidden;
}

.bivo-quick-stats-inline {
  height: calc(100% - 16px);
  margin-bottom: 16px;
}

.bivo-quick-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.bivo-quick-stats-grid-2,
.bivo-quick-stats-inline .bivo-quick-stats-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.bivo-quick-stat {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 76px;
  padding: 14px 16px;
  text-decoration: none;
  color: inherit;
  border-right: 1px solid var(--bivo-border);
  border-bottom: 1px solid var(--bivo-border);
}

.bivo-quick-stat:hover {
  background: #f8fafc;
  color: inherit;
}

.bivo-quick-stat-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #f1f5f9;
  color: var(--bivo-navy);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.9rem;
}

.bivo-quick-stat-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.bivo-price-panel { margin-bottom: 16px; }
.bivo-price-toggle-wrap { padding: 16px; }

.bivo-price-toggle {
  display: inline-flex;
  border: 1.5px solid var(--bivo-orange);
  border-radius: 999px;
  overflow: hidden;
  background: #fff;
}

.bivo-price-btn {
  border: 0;
  background: #fff;
  color: var(--bivo-orange);
  font-weight: 700;
  font-size: var(--bivo-fs-sm);
  height: 36px;
  padding: 0 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.bivo-price-btn.is-active {
  background: var(--bivo-orange);
  color: #fff;
}

.bivo-price-hint {
  margin: 12px 0 0;
  font-size: var(--bivo-fs-sm);
  color: var(--bivo-muted);
  line-height: 1.4;
}

@media (max-width: 1199px) {
  .bivo-overview-items { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bivo-quick-stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 767px) {
  .bivo-dash-hero h1 { font-size: 1.3rem; }
  .bivo-overview-label { width: 100%; min-width: 0; min-height: 48px; }
  .bivo-overview-items { grid-template-columns: 1fr 1fr; }
  .bivo-overview-item { border-left: 0; border-top: 1px solid var(--bivo-border); }
  .bivo-quick-stats-grid,
  .bivo-quick-stats-grid-2 { grid-template-columns: 1fr; }
  .bivo-quick-stat { border-right: 0; }
}

@media (max-width: 575px) {
  .bivo-overview-items { grid-template-columns: 1fr; }
}


/* Charts */
.bivo-chart-row {
  --bs-gutter-x: 16px;
  --bs-gutter-y: 16px;
  margin-bottom: 4px;
}

.bivo-chart-row-routes { margin-top: 0; }

.bivo-panel-hint {
  font-size: var(--bivo-fs-xs);
  font-weight: var(--bivo-fw-bold);
  color: var(--bivo-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.bivo-chart-box {
  padding: 8px 12px 4px;
  min-height: 120px;
}

.bivo-chart-box-doughnut {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 280px;
}

.bivo-apex {
  width: 100%;
  min-height: 280px;
}

.bivo-apex-sm { min-height: 260px; }
.bivo-apex-routes { min-height: 220px; }

.bivo-chart-caption {
  margin: 0;
  padding: 0 16px 14px;
  font-size: var(--bivo-fs-xs);
  font-weight: var(--bivo-fw-med);
  color: var(--bivo-muted);
  line-height: 1.4;
}

.bivo-chart-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 220px;
  color: var(--bivo-muted);
  font-size: var(--bivo-fs-base);
  font-weight: 500;
  background: #f8fafc;
  border-radius: 10px;
  margin: 8px;
}


.bivo-mini-bars-empty span {
  opacity: 0.28;
  background: #cbd5e1 !important;
}
