/* ============================================ */
/* Dashboard — clean, sober                     */
/* ============================================ */
.kpi-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}
.kpi {
  padding: 14px 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-xs);
}
.kpi__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text-muted);
}
.kpi__label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
}
.kpi__value {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 600;
  margin: 4px 0 4px;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  color: var(--text-primary);
}
.kpi__sub {
  font-size: 11.5px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.kpi__trend {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 11.5px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.kpi__trend--up { color: var(--success); }
.kpi__trend--down { color: var(--danger); }

.dash-main {
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}
.dash-bottom {
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  gap: 12px;
}

.dot-pulse {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--live);
  display: inline-block;
  animation: pulse-soft 2s ease-in-out infinite;
}

/* Mini live viewer (preview of what's on the giant screen) */
.mini-viewer {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  background: #0F1419;
  border-radius: var(--r-md);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 1px;
}
.mini-viewer__tile {
  overflow: hidden;
  position: relative;
  background: #1A2030;
}
.mini-viewer__overlay-tl {
  position: absolute;
  top: 8px; left: 10px;
  z-index: 2;
}
.mini-viewer__overlay-tr {
  position: absolute;
  top: 8px; right: 10px;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}
.mini-viewer--standby {
  display: flex;
  align-items: center;
  justify-content: center;
  grid-template-columns: 1fr !important;
  grid-template-rows: 1fr !important;
}
.mini-viewer__standby {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* Now playing strip */
.now-playing {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 12px;
  margin-top: 12px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
}
.now-playing__left { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.now-playing__progress { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; max-width: 280px; }
.now-playing__progress-bar {
  flex: 1;
  height: 3px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}
.now-playing__progress-bar > div {
  height: 100%;
  background: var(--elsia-navy);
  border-radius: 2px;
}

/* Upcoming list */
.upcoming-list { padding: 4px 6px 10px; }
.upcoming-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 5px;
  transition: background 0.08s ease;
}
.upcoming-row:hover { background: var(--bg-subtle); }
.upcoming-row__time {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  width: 42px;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}
.upcoming-row__bar {
  width: 3px;
  height: 24px;
  border-radius: 2px;
  flex-shrink: 0;
}

/* Alert card (subtle, not "loud") */
.alert-card {
  background: var(--bg-surface);
  border-color: var(--border);
  border-left: 3px solid var(--danger);
}

/* Screen grid (dashboard) */
.screen-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  padding: 12px;
}
.screen-mini {
  padding: 10px 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  display: flex;
  flex-direction: column;
  gap: 3px;
  transition: border-color 0.1s ease;
}
.screen-mini:hover { border-color: var(--border-strong); }
.screen-mini--offline { opacity: 0.7; }
.screen-mini__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.screen-mini__name {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.screen-mini__location {
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}
.screen-mini__playing {
  font-size: 11.5px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
}
.screen-mini__playing svg { color: var(--text-muted); }

/* Activity rows */
.activity-row {
  display: flex;
  gap: 10px;
  padding: 8px 16px;
  align-items: flex-start;
}
.activity-row + .activity-row { border-top: 1px solid var(--border-faint); }
.activity-row:hover { background: var(--bg-row-hover); }
