/* Dashboard-specific styles */

/* Fatigue Chart */
.fatigue-chart-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.chart-legend {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  padding: 0.375rem 0;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.75rem;
  color: var(--muted);
}

.legend-item strong {
  color: var(--text);
  font-family: 'JetBrains Mono', monospace;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  flex-shrink: 0;
}

/* Fatigue Stats row */
.fatigue-stats {
  display: flex;
  gap: 0;
  border-top: 1px solid var(--border);
  margin-top: 0.75rem;
  padding-top: 0.875rem;
}

.fstat {
  flex: 1;
  text-align: center;
  padding: 0 0.5rem;
  border-right: 1px solid var(--border);
}

.fstat:last-child {
  border-right: none;
}

.fstat-sep {
  border-left: 2px solid var(--border);
}

.fstat-val {
  font-size: 1.125rem;
  font-weight: 800;
  font-family: 'JetBrains Mono', monospace;
  line-height: 1.2;
}

.fstat-lbl {
  font-size: 0.5625rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-top: 0.125rem;
  font-weight: 600;
}

/* Activity Feed */
.activity-feed {
  display: flex;
  flex-direction: column;
}

.act-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.625rem 1rem;
  border-bottom: 1px solid rgba(0,0,0,0.04);
  transition: background 0.15s;
}

.act-item:last-child {
  border-bottom: none;
}

.act-item:hover {
  background: rgba(0,0,0,0.015);
}

.act-icon {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  flex-shrink: 0;
  margin-top: 1px;
}

.act-body {
  flex: 1;
  min-width: 0;
}

.act-text {
  font-size: 0.8125rem;
  color: var(--text);
  line-height: 1.4;
}

.act-meta {
  font-size: 0.6875rem;
  color: var(--muted);
  margin-top: 2px;
}

.act-time {
  font-size: 0.6875rem;
  font-family: 'JetBrains Mono', monospace;
  color: var(--muted);
  white-space: nowrap;
  padding-top: 3px;
  flex-shrink: 0;
}

/* Sbadge orange variant */
.sbadge-orange {
  background: rgba(249,115,22,0.12);
  color: #9A3412;
}

/* SVG bar chart transition */
#fatigueChart rect {
  transition: y 0.8s cubic-bezier(.4,0,.2,1), height 0.8s cubic-bezier(.4,0,.2,1);
}

#fatigueChart text {
  transition: opacity 0.4s ease 0.7s;
}

/* KPI counter animation */
@keyframes countUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.kpi-val {
  animation: countUp 0.5s ease forwards;
}

/* Hover shimmer on KPI cards */
.kpi::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 10px;
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}

.kpi {
  position: relative;
}

/* Compliance highlight row */
.data-table tbody tr:nth-child(2) td,
.data-table tbody tr:nth-child(5) td {
  background: rgba(16,185,129,0.025);
}

/* Progress bar animation */
.prog-bar-fill {
  transition: width 1s cubic-bezier(.4,0,.2,1);
}

/* Alert severity badge inline */
.sev-inline {
  display: inline-block;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  font-size: 0.5625rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.sev-inline-crit { background: rgba(239,68,68,0.15); color: #991B1B; }
.sev-inline-high { background: rgba(245,158,11,0.15); color: #92400E; }
.sev-inline-med  { background: rgba(37,99,235,0.15);  color: #1E40AF; }

/* Dashboard footer row totals highlight */
td strong {
  color: var(--text);
}
