/*
Path: C:/Users/Owner/Desktop/vscode/BodyPlus_XPro/admin_web/static/css/indicators.css
Description: Styles for the Indicators page shell, topbar cards, and snapshot actions; input: HTML class names, output: responsive visual layout.
Last-Updated: 2026-04-09
*/

.bp-indicators-page {
  max-width: 1280px;
  margin-inline: auto;
  display: grid;
  gap: 0.9rem;
}

.bp-shell {
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  padding: 1rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.bp-topbar-shell {
  position: sticky;
  top: 0.8rem;
  z-index: 5;
}

.bp-topbar-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 0.85rem;
}

.bp-title {
  font-size: 1.1rem;
  line-height: 1.25rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
}

.bp-subtitle {
  margin: 0.15rem 0 0;
  font-size: 0.86rem;
  color: #475569;
}

.bp-topbar-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}

.bp-kpi-card {
  border: 1px solid #dbe3ef;
  border-radius: 0.8rem;
  background: #ffffff;
  padding: 0.65rem;
  display: grid;
  gap: 0.45rem;
}

.bp-kpi-label {
  margin: 0;
  font-size: 0.75rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #64748b;
  font-weight: 700;
}

.bp-kpi-hint {
  margin: 0;
  font-size: 0.75rem;
  color: #64748b;
}

.bp-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.18rem 0.55rem;
  border: 1px solid #d7e0ea;
  border-radius: 999px;
  background: #f8fafc;
  font-size: 0.8rem;
  color: #334155;
  width: fit-content;
  max-width: 100%;
}

.bp-pill.bp-pill-ok {
  border-color: #86efac;
  background: #dcfce7;
  color: #166534;
}

.bp-pill.bp-pill-warn {
  border-color: #fde68a;
  background: #fef3c7;
  color: #92400e;
}

.bp-pill.bp-pill-err {
  border-color: #fecaca;
  background: #fee2e2;
  color: #991b1b;
}

.bp-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #cbd5e1;
  flex: 0 0 10px;
}

.bp-dot.ok {
  background: #22c55e;
}

.bp-dot.warn {
  background: #f59e0b;
}

.bp-dot.err {
  background: #ef4444;
}

.bp-dot.bp-dot-ok {
  background: #22c55e;
}

.bp-mini-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  font-size: 0.8rem;
  color: #475569;
}

.bp-actions {
  margin-top: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.bp-btn {
  appearance: none;
  border: 1px solid #cbd5e1;
  border-radius: 0.6rem;
  background: #ffffff;
  color: #0f172a;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.45rem 0.7rem;
  cursor: pointer;
  transition: background-color 120ms ease, border-color 120ms ease, transform 80ms ease;
}

.bp-btn:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}

.bp-btn:active,
.bp-btn.is-active {
  transform: translateY(1px);
  background: #e2e8f0;
}

.bp-btn:focus,
.bp-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.3);
  border-color: #2563eb;
}

.bp-runbook {
  margin: 0.65rem 0 0;
  border: 1px dashed #cbd5e1;
  border-radius: 0.7rem;
  padding: 0.6rem;
  background: #ffffff;
  color: #1e293b;
  font-size: 0.81rem;
  white-space: pre-wrap;
  max-height: 260px;
  overflow: auto;
  display: none;
}

.bp-runbook.show {
  display: block;
}

.bp-section-title {
  margin: 0 0 0.65rem;
  font-size: 0.96rem;
  font-weight: 700;
  color: #0f172a;
}

.bp-flow {
  margin: 0 0 0.55rem;
  color: #64748b;
  font-size: 0.8rem;
}

.bp-toast {
  position: fixed;
  left: 1rem;
  bottom: 1rem;
  z-index: 80;
  border: 1px solid #cbd5e1;
  border-radius: 0.65rem;
  background: #111827;
  color: #f8fafc;
  font-size: 0.82rem;
  padding: 0.52rem 0.7rem;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 140ms ease, transform 140ms ease;
}

.bp-toast.show {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1120px) {
  .bp-topbar-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .bp-topbar-shell {
    position: static;
  }

  .bp-topbar-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bp-btn,
  .bp-toast {
    transition: none;
  }
}
