.monitoring-panel {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.panel-tools {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.3rem 0.6rem;
  border-radius: 999px;
}

.live-badge .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.live-badge.on {
  color: #15803d;
  background: rgba(34, 197, 94, 0.12);
}

.live-badge.on .dot {
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
  animation: live-pulse 2s infinite;
}

.live-badge.off {
  color: #64748b;
  background: rgba(100, 116, 139, 0.12);
}

.live-badge.off .dot {
  background: #94a3b8;
}

@keyframes live-pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.4;
  }
}

.monitor-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.65rem;
}

.monitor-stat {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  background: rgba(148, 163, 184, 0.08);
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.monitor-stat b {
  font-size: 1.35rem;
  color: var(--text, #0f172a);
}

.monitor-stat span {
  font-size: 0.72rem;
  color: #64748b;
}

.monitor-stat .muted {
  font-size: 1rem;
}

.monitor-error {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0.9rem;
  border-radius: 10px;
  font-size: 0.85rem;
  color: #b91c1c;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.monitor-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 0.85rem;
}

.monitor-grid .table-wrap {
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.job-link {
  text-decoration: none;
  color: inherit;
}

.job-link b {
  display: block;
  font-size: 0.9rem;
}

.job-link b:hover {
  color: #2563eb;
}

.job-link small {
  color: #64748b;
  font-size: 0.75rem;
}

.monitor-feed {
  display: flex;
  flex-direction: column;
  border: 1px solid #e2e7eb;
  border-radius: 12px;
  background: #ffffff;
  padding: 0.9rem;
}

.feed-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.6rem;
}

.feed-head h3 {
  font-size: 0.9rem;
  margin: 0;
}

.feed-head span {
  font-size: 0.75rem;
  color: #64748b;
}

.monitor-feed .timeline {
  max-height: 380px;
  overflow-y: auto;
}

.monitor-legend {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  font-size: 0.78rem;
  color: #64748b;
}

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

.empty-cell {
  padding: 1.5rem;
  text-align: center;
}

.monitor-apply {
  display: inline-block;
  padding: 0.3rem 0.7rem;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  text-decoration: none;
  color: #fff;
  background: #2563eb;
}

.monitor-apply:hover {
  background: #1d4ed8;
}

@media (max-width: 900px) {
  .monitor-grid {
    grid-template-columns: 1fr;
  }

  .monitor-stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .monitor-stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

.monitor-sessions {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  border: 1px solid #e2e7eb;
  border-radius: 12px;
  background: #ffffff;
  padding: 0.9rem;
}

.monitor-session-strip {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.monitor-session-chip {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.8rem;
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 10px;
  background: #f8fafc;
  min-width: 200px;
}

.monitor-session-chip.chip-alert {
  border-color: #86efac;
  background: #f0fdf4;
}

.session-chip-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.tone-dot-green {
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
  animation: live-pulse 1s infinite;
}

.tone-dot-red {
  background: #ef4444;
}

.tone-dot-slate {
  background: #94a3b8;
}

.tone-dot-blue {
  background: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.monitor-session-chip b {
  display: block;
  font-size: 0.78rem;
  color: #1e293b;
}

.monitor-session-chip small {
  display: block;
  font-size: 0.68rem;
  color: #64748b;
  margin-top: 2px;
}

/* ───────────────── Shift Radar ───────────────── */

.radar-panel {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  border: 1px solid rgba(59, 130, 246, 0.28);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(59, 130, 246, 0.04), transparent 40%);
  padding: 0.9rem 1rem;
}

.radar-head h2 {
  font-size: 1.05rem;
  margin: 0;
  color: #1d4ed8;
}

.radar-head p {
  margin: 0.2rem 0 0;
  color: #64748b;
  font-size: 0.78rem;
}

.radar-stats {
  grid-template-columns: repeat(4, 1fr);
}

.radar-flash {
  color: #16a34a;
  animation: live-pulse 1.2s infinite;
}

.radar-unposted {
  color: #dc2626;
  animation: live-pulse 1s infinite;
}

.radar-watch-row {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.radar-watch-input {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  flex: 1;
  min-width: 280px;
}

.radar-watch-input input {
  flex: 1;
  padding: 0.45rem 0.7rem;
  border: 1px solid rgba(148, 163, 184, 0.4);
  border-radius: 8px;
  font-size: 0.82rem;
  background: #fff;
  color: #0f172a;
  outline: none;
}

.radar-watch-input input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.radar-checked {
  font-size: 0.72rem;
  color: #64748b;
  white-space: nowrap;
}

.radar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 0.7rem;
}

.radar-card {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 12px;
  background: #fff;
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.radar-card.radar-avail {
  border-color: rgba(34, 197, 94, 0.65);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.12);
}

.radar-card.radar-unposted-card {
  border-left: 3px solid #dc2626;
}

.radar-card.radar-new {
  animation: radar-pulse-ring 1.4s ease-out 3;
  border-color: #2563eb;
}

@keyframes radar-pulse-ring {
  0% {
    box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.45);
  }
  70% {
    box-shadow: 0 0 0 12px rgba(37, 99, 235, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(37, 99, 235, 0);
  }
}

.radar-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}

.radar-title {
  font-size: 0.88rem;
  color: #0f172a;
}

.radar-title-link {
  text-decoration: none;
  min-width: 0;
}

.radar-title-link:hover .radar-title {
  color: #2563eb;
}

.radar-flags {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.radar-post {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  text-transform: uppercase;
}

.post-unposted {
  color: #dc2626;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
}

.post-posted {
  color: #15803d;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.post-unknown {
  color: #475569;
  background: rgba(148, 163, 184, 0.15);
  border: 1px solid rgba(148, 163, 184, 0.3);
}

.radar-avail-badge {
  font-size: 0.62rem;
  font-weight: 700;
  color: #15803d;
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.4);
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
}

.radar-new-badge {
  font-size: 0.62rem;
  font-weight: 800;
  color: #fff;
  background: #2563eb;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  animation: live-pulse 1s infinite;
}

.radar-line {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.78rem;
  color: #334155;
}

.radar-line svg {
  color: #64748b;
  flex-shrink: 0;
}

.radar-sep {
  color: #94a3b8;
}

.radar-hours {
  margin-left: auto;
  font-size: 0.7rem;
  color: #475569;
  background: rgba(148, 163, 184, 0.15);
  padding: 0.1rem 0.45rem;
  border-radius: 6px;
}

.radar-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 0.2rem;
  padding-top: 0.4rem;
  border-top: 1px dashed rgba(148, 163, 184, 0.3);
}

.radar-card-foot > div {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  align-items: center;
}

.radar-foot-item {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.68rem;
  color: #64748b;
}

.radar-card-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.radar-open {
  display: inline-block;
  padding: 0.3rem 0.7rem;
  border-radius: 8px;
  font-size: 0.72rem;
  font-weight: 600;
  text-decoration: none;
  color: #fff;
  background: #2563eb;
  white-space: nowrap;
}

.radar-open:hover {
  background: #1d4ed8;
}

.radar-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border: none;
  border-radius: 6px;
  color: #94a3b8;
  background: transparent;
  cursor: pointer;
}

.radar-remove:hover {
  color: #dc2626;
  background: rgba(239, 68, 68, 0.1);
}

.radar-empty {
  grid-column: 1 / -1;
}

.radar-watch-chips {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  max-height: 120px;
  overflow-y: auto;
}

.radar-chip {
  display: inline-flex;
  flex-direction: column;
  gap: 0.1rem;
  font-size: 0.72rem;
  color: #1e293b;
  background: #f8fafc;
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 8px;
  padding: 0.3rem 0.6rem;
  white-space: nowrap;
}

.radar-chip small {
  font-size: 0.64rem;
  color: #64748b;
}

@media (max-width: 900px) {
  .radar-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .radar-grid {
    grid-template-columns: 1fr;
  }
}

/* ── Sound selector ── */
.radar-sound-wrap {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(148, 163, 184, 0.08);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 8px;
  padding: 3px 6px;
}

.radar-sound-label {
  font-size: 13px;
  margin-right: 2px;
}

.radar-sound-btn {
  border: 1px solid transparent;
  background: none;
  color: #64748b;
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.12s;
  white-space: nowrap;
}

.radar-sound-btn:hover {
  background: rgba(37, 99, 235, 0.08);
  color: #2563eb;
  border-color: rgba(37, 99, 235, 0.2);
}

.radar-sound-btn.active {
  background: #2563eb;
  color: #fff;
  border-color: #2563eb;
}
