/* BRN — Dashboard panel */

.dash-hero {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1.5rem;
  align-items: center;
  margin-bottom: 1.5rem;
  padding: 1.75rem 2rem;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(245, 158, 11, 0.2);
  background:
    radial-gradient(ellipse 80% 120% at 100% 0%, rgba(245, 158, 11, 0.18), transparent 55%),
    radial-gradient(ellipse 60% 80% at 0% 100%, rgba(59, 130, 246, 0.12), transparent 50%),
    var(--color-surface);
  overflow: hidden;
}

.dash-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.02'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}

.dash-hero__main {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  min-width: 0;
}

.dash-hero__avatar {
  flex-shrink: 0;
  width: 3.5rem;
  height: 3.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
  color: #0a0a0a;
  background: var(--gradient-brand);
  border-radius: 50%;
  box-shadow: 0 8px 24px rgba(245, 158, 11, 0.35);
}

.dash-hero__eyebrow {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-primary-light);
  margin-bottom: 0.35rem;
}

.dash-hero h2 {
  font-size: clamp(1.35rem, 2.5vw, 1.85rem);
  margin: 0 0 0.4rem;
  line-height: 1.25;
}

.dash-hero__meta {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin: 0 0 0.5rem;
}

.dash-hero__tagline {
  font-size: 0.88rem;
  color: var(--color-text-muted);
  margin: 0;
  max-width: 42ch;
}

.dash-hero__aside {
  position: relative;
  z-index: 1;
  text-align: right;
}

.dash-hero__clock {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-primary-light);
}

.dash-hero__updated {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-top: 0.25rem;
}

.dash-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
  margin-top: 1rem;
}

/* KPI grid */
.dash-kpis {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}

.dash-kpi {
  display: block;
  padding: 1rem 1.1rem;
  text-decoration: none;
  color: inherit;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.dash-kpi:hover {
  border-color: rgba(245, 158, 11, 0.35);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.25);
}

.dash-kpi__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 0.65rem;
}

.dash-kpi__icon {
  width: 2.25rem;
  height: 2.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
}

.dash-kpi__icon svg {
  width: 1.1rem;
  height: 1.1rem;
}

.dash-kpi__icon--amber { background: rgba(245, 158, 11, 0.15); color: var(--color-primary); }
.dash-kpi__icon--blue { background: rgba(59, 130, 246, 0.15); color: #60a5fa; }
.dash-kpi__icon--green { background: rgba(34, 197, 94, 0.15); color: #4ade80; }
.dash-kpi__icon--red { background: rgba(239, 68, 68, 0.15); color: #f87171; }

.dash-kpi__trend {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.15rem 0.4rem;
  border-radius: 999px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dash-kpi__trend--up { background: rgba(34, 197, 94, 0.12); color: #86efac; }
.dash-kpi__trend--down { background: rgba(239, 68, 68, 0.12); color: #fca5a5; }
.dash-kpi__trend--neutral { background: rgba(255, 255, 255, 0.06); color: var(--color-text-muted); }

.dash-kpi__value {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 0.15rem;
}

.dash-kpi__value--text {
  font-size: 1.05rem;
}

.dash-kpi__suffix {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--color-text-muted);
}

.dash-kpi__label {
  font-size: 0.78rem;
  color: var(--color-text-muted);
  margin: 0;
}

/* Insights */
.dash-insights {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}

.dash-insight {
  padding: 1rem 1.15rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  border-left-width: 3px;
}

.dash-insight--highlight { border-left-color: var(--color-primary); }
.dash-insight--growth { border-left-color: #4ade80; }
.dash-insight--warning { border-left-color: #f87171; }
.dash-insight--info { border-left-color: #60a5fa; }

.dash-insight h4 {
  font-size: 0.88rem;
  margin: 0 0 0.35rem;
}

.dash-insight p {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  line-height: 1.5;
  margin: 0;
}

/* Main layout */
.dash-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}

.dash-layout__main {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  min-width: 0;
}

.dash-layout__side {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.dash-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.dash-card__head h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0;
}

.dash-card__head a {
  font-size: 0.78rem;
  color: var(--color-primary-light);
  text-decoration: none;
}

.dash-card__head a:hover {
  color: var(--color-primary);
}

/* Chart */
.dash-chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
  font-size: 0.78rem;
  color: var(--color-text-muted);
}

.dash-chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.dash-chart-legend i {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  font-style: normal;
}

.dash-chart-legend i.dash-legend--reg { background: var(--color-primary); }
.dash-chart-legend i.dash-legend--mem { background: #60a5fa; }

.dash-chart {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
  height: 180px;
  padding-top: 0.5rem;
}

.dash-chart__col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
}

.dash-chart__bars {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 3px;
  width: 100%;
  height: 140px;
}

.dash-chart__bar {
  width: 42%;
  border-radius: 4px 4px 0 0;
  min-height: 4px;
  transition: height 0.4s ease;
}

.dash-chart__bar--reg {
  background: linear-gradient(180deg, #fbbf24, #d97706);
}

.dash-chart__bar--mem {
  background: linear-gradient(180deg, #60a5fa, #2563eb);
}

.dash-chart__label {
  font-size: 0.68rem;
  color: var(--color-text-muted);
  text-align: center;
}

/* Region bars */
.dash-region-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.dash-region-row__head {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  margin-bottom: 0.3rem;
}

.dash-region-row__head strong {
  font-weight: 500;
}

.dash-region-row__head span {
  color: var(--color-text-muted);
}

.dash-region-bar {
  height: 8px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  overflow: hidden;
}

.dash-region-bar span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #d97706, #fbbf24);
}

/* Funnel */
.dash-funnel {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.dash-funnel__row {
  display: grid;
  grid-template-columns: 5.5rem 1fr 2rem;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
}

.dash-funnel__bar {
  height: 10px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  overflow: hidden;
}

.dash-funnel__bar span {
  display: block;
  height: 100%;
  border-radius: 999px;
}

.dash-funnel__bar--pending span { background: #fbbf24; }
.dash-funnel__bar--approved span { background: #4ade80; }
.dash-funnel__bar--rejected span { background: #f87171; }

/* Finance mini */
.dash-finance-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  margin-bottom: 1rem;
}

.dash-finance-item {
  padding: 0.65rem 0.75rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
}

.dash-finance-item dt {
  font-size: 0.7rem;
  color: var(--color-text-muted);
  margin-bottom: 0.2rem;
}

.dash-finance-item dd {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 600;
}

.dash-finance-item dd.income { color: #4ade80; }
.dash-finance-item dd.expense { color: #f87171; }

.dash-tx-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.dash-tx-list li {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.55rem 0;
  font-size: 0.8rem;
  border-bottom: 1px solid var(--color-border);
}

.dash-tx-list li:last-child {
  border-bottom: none;
}

.dash-tx-list small {
  display: block;
  color: var(--color-text-muted);
  font-size: 0.72rem;
}

.dash-tx-amount--in { color: #4ade80; font-weight: 600; }
.dash-tx-amount--out { color: #f87171; font-weight: 600; }

/* Quick links */
.dash-quick-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
}

.dash-quick {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  padding: 0.65rem 0.75rem;
  text-decoration: none;
  color: inherit;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: border-color 0.12s ease, background 0.12s ease;
}

.dash-quick:hover {
  border-color: rgba(245, 158, 11, 0.35);
  background: rgba(245, 158, 11, 0.06);
}

.dash-quick__icon {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(245, 158, 11, 0.12);
  border-radius: var(--radius-sm);
  color: var(--color-primary);
}

.dash-quick__icon svg {
  width: 1rem;
  height: 1rem;
}

.dash-quick strong {
  display: block;
  font-size: 0.8rem;
  margin-bottom: 0.1rem;
}

.dash-quick span {
  font-size: 0.7rem;
  color: var(--color-text-muted);
  line-height: 1.35;
}

.dash-quick__badge {
  margin-left: auto;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.1rem 0.4rem;
  background: var(--color-primary);
  color: #0a0a0a;
  border-radius: 999px;
}

/* Fleet donut (CSS) */
.dash-fleet-ring {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.dash-fleet-ring__chart {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dash-fleet-legend {
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 1;
  min-width: 140px;
}

.dash-fleet-legend li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  padding: 0.35rem 0;
}

.dash-fleet-legend i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 0.5rem;
  font-style: normal;
}

/* Bottom grid */
.dash-bottom {
  display: grid;
  grid-template-columns: 1.2fr 1fr 0.85fr;
  gap: 1.25rem;
}

/* Activity */
.dash-activity {
  list-style: none;
  margin: 0;
  padding: 0;
}

.dash-activity li {
  display: flex;
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--color-border);
}

.dash-activity li:last-child {
  border-bottom: none;
}

.dash-activity__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 0.35rem;
}

.dash-activity__dot--success { background: #4ade80; box-shadow: 0 0 8px rgba(74, 222, 128, 0.5); }
.dash-activity__dot--warning { background: #fbbf24; }
.dash-activity__dot--info { background: #60a5fa; }
.dash-activity__dot--neutral { background: var(--color-text-muted); }

.dash-activity__body p {
  font-size: 0.82rem;
  margin: 0 0 0.2rem;
  line-height: 1.45;
}

.dash-activity__body time,
.dash-activity__body .dash-activity__time {
  font-size: 0.72rem;
  color: var(--color-text-muted);
}

.dash-activity a.dash-activity__link {
  color: inherit;
  text-decoration: none;
}

.dash-activity a.dash-activity__link:hover strong {
  color: var(--color-primary-light);
}

/* Top companies */
.dash-rank-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.dash-rank-list li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--color-border);
}

.dash-rank-list li:last-child {
  border-bottom: none;
}

.dash-rank__num {
  width: 1.5rem;
  height: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: #0a0a0a;
  background: var(--gradient-brand);
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.dash-rank__info {
  flex: 1;
  min-width: 0;
}

.dash-rank__info strong {
  display: block;
  font-size: 0.82rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-rank__info small {
  font-size: 0.72rem;
  color: var(--color-text-muted);
}

.dash-rank__units {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-primary-light);
}

/* Pending queue */
.dash-queue {
  list-style: none;
  margin: 0;
  padding: 0;
}

.dash-queue li {
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--color-border);
}

.dash-queue li:last-child {
  border-bottom: none;
}

.dash-queue a {
  text-decoration: none;
  color: inherit;
}

.dash-queue strong {
  display: block;
  font-size: 0.85rem;
}

.dash-queue small {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

@media (max-width: 1280px) {
  .dash-kpis {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .dash-layout {
    grid-template-columns: 1fr;
  }

  .dash-bottom {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .dash-hero {
    grid-template-columns: 1fr;
  }

  .dash-hero__aside {
    text-align: left;
  }

  .dash-hero__actions {
    justify-content: flex-start;
  }

  .dash-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dash-insights {
    grid-template-columns: 1fr;
  }

  .dash-quick-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .dash-kpis {
    grid-template-columns: 1fr;
  }
}
