/* Compact, calm Autopilot tab (sentinel-autopilot.js). */
.sentinel-panel {
  padding: 1rem 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.sentinel-panel[hidden],
.sentinel-card[hidden],
.sentinel-row-detail[hidden] {
  display: none;
}

/* 1. Single compact top bar */
.sentinel-topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem 1rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid var(--line, rgba(148, 163, 184, 0.28));
}

.sentinel-topbar-left {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.85rem;
  min-width: 0;
}

.sentinel-status-cluster {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.sentinel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #94a3b8;
  flex-shrink: 0;
}

.sentinel-dot.live {
  background: #10b981;
}

.sentinel-heading {
  margin: 0;
  font-size: 0.96rem;
  font-weight: 650;
}

.sentinel-mode-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.12rem 0.48rem;
  border-radius: 999px;
  font-size: 0.73rem;
  font-weight: 600;
  background: rgba(16, 185, 129, 0.12);
  color: #065f46;
}

.sentinel-mode-pill.standby {
  background: rgba(100, 116, 139, 0.14);
  color: var(--quiet, #475569);
}

.sentinel-inline-checks {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.6rem;
  font-size: 0.76rem;
  color: var(--quiet, #64748b);
}

.sentinel-check {
  display: inline-flex;
  align-items: center;
}

.sentinel-check + .sentinel-check::before {
  content: "·";
  margin-right: 0.5rem;
  opacity: 0.55;
}

.sentinel-check.alert {
  color: #b91c1c;
  font-weight: 600;
}

.sentinel-topbar-right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.sentinel-kpi-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.65rem 0.95rem;
}

.sentinel-stat {
  display: inline-flex;
  align-items: baseline;
  gap: 0.28rem;
  font-size: 0.76rem;
  color: var(--quiet, #64748b);
}

.sentinel-stat strong {
  font-size: 0.88rem;
  font-weight: 650;
  color: var(--ink, #0f172a);
}

/* 2. Slim filter & burn-in toolbar */
.sentinel-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem 0.75rem;
}

.sentinel-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.sentinel-pill {
  padding: 0.2rem 0.58rem;
  border-radius: 6px;
  border: 1px solid var(--line, rgba(148, 163, 184, 0.36));
  background: transparent;
  color: var(--quiet, #475569);
  font-size: 0.76rem;
  line-height: 1.3;
  cursor: pointer;
}

.sentinel-pill.selected {
  background: var(--navy, #1e293b);
  color: #ffffff;
  border-color: var(--navy, #1e293b);
  font-weight: 600;
}

.sentinel-burnin-inline {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.74rem;
  min-width: 0;
}

.sentinel-mini-meter {
  width: 56px;
  height: 4px;
  accent-color: #10b981;
}

.sentinel-notice {
  margin: 0;
  font-size: 0.8rem;
}

.sentinel-empty {
  margin: 0.4rem 0;
  font-size: 0.84rem;
}

/* 3. Compact single-line table rows */
.sentinel-group-label {
  margin: 0.2rem 0 0;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--quiet, #64748b);
}

.sentinel-table {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line, rgba(148, 163, 184, 0.28));
  border-radius: 8px;
  overflow: hidden;
}

.sentinel-row + .sentinel-row {
  border-top: 1px solid var(--line, rgba(148, 163, 184, 0.22));
}

.sentinel-row-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.42rem 0.65rem;
  min-height: 2.35rem;
}

.sentinel-row-bar:hover {
  background: rgba(148, 163, 184, 0.06);
}

.sentinel-tag {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  padding: 0.1rem 0.42rem;
  border-radius: 4px;
  font-size: 0.69rem;
  font-weight: 600;
  white-space: nowrap;
}

.sentinel-tag.ok {
  background: rgba(16, 185, 129, 0.13);
  color: #065f46;
}

.sentinel-tag.warn {
  background: rgba(220, 38, 38, 0.13);
  color: #991b1b;
}

.sentinel-tag.idea {
  background: rgba(245, 158, 11, 0.15);
  color: #92400e;
}

.sentinel-tag.neutral {
  background: rgba(148, 163, 184, 0.16);
  color: var(--ink, #334155);
}

.sentinel-row-toggle {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.sentinel-row-title {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 0.83rem;
  font-weight: 500;
  color: var(--ink, #0f172a);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sentinel-row-who {
  flex-shrink: 0;
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.75rem;
  color: var(--quiet, #64748b);
}

.sentinel-row-time {
  flex-shrink: 0;
  font-size: 0.72rem;
  color: var(--quiet, #64748b);
}

.sentinel-row-chev {
  flex-shrink: 0;
  font-size: 0.72rem;
  color: var(--quiet, #64748b);
  transition: transform 0.12s ease;
}

.sentinel-row-toggle[aria-expanded="true"] .sentinel-row-chev {
  transform: rotate(180deg);
}

.sentinel-row-actions {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.sentinel-compact-btn {
  padding: 0.18rem 0.52rem;
  font-size: 0.74rem;
  min-height: 1.65rem;
}

.sentinel-link-btn {
  border: 0;
  background: none;
  padding: 0.12rem 0.28rem;
  font-size: 0.75rem;
  color: var(--navy, #1e3a5f);
  cursor: pointer;
  white-space: nowrap;
}

.sentinel-link-btn:hover {
  text-decoration: underline;
}

.sentinel-link-btn.quiet {
  color: var(--quiet, #64748b);
}

/* Expanded details drawer */
.sentinel-row-detail {
  padding: 0.5rem 0.75rem 0.6rem 0.75rem;
  border-top: 1px dashed var(--line, rgba(148, 163, 184, 0.25));
  background: rgba(148, 163, 184, 0.04);
  display: flex;
  flex-direction: column;
  gap: 0.32rem;
  font-size: 0.8rem;
}

.sentinel-row-detail p {
  margin: 0;
}

.sentinel-detail-meta {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--quiet, #64748b);
}

.sentinel-detail-note {
  padding: 0.32rem 0.55rem;
  border-radius: 5px;
  border-left: 2px solid #10b981;
  background: rgba(16, 185, 129, 0.07);
  font-size: 0.79rem;
}

.sentinel-detail-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  margin-top: 0.15rem;
}

/* Dark theme contrast support */
:root[data-theme="dark"] .sentinel-mode-pill:not(.standby),
:root[data-theme="dark"] .sentinel-tag.ok {
  color: #6ee7b7;
  background: rgba(16, 185, 129, 0.18);
}

:root[data-theme="dark"] .sentinel-tag.warn,
:root[data-theme="dark"] .sentinel-check.alert {
  color: #fca5a5;
}

:root[data-theme="dark"] .sentinel-tag.idea {
  color: #fcd34d;
  background: rgba(245, 158, 11, 0.2);
}

:root[data-theme="dark"] .sentinel-link-btn:not(.quiet) {
  color: #93c5fd;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]):not([data-theme="light-forced"]) .sentinel-mode-pill:not(.standby),:root:not([data-theme="light"]):not([data-theme="light-forced"]) .sentinel-tag.ok{
    color: #6ee7b7;
    background: rgba(16, 185, 129, 0.18);
  }
  :root:not([data-theme="light"]):not([data-theme="light-forced"]) .sentinel-tag.warn,:root:not([data-theme="light"]):not([data-theme="light-forced"]) .sentinel-check.alert{
    color: #fca5a5;
  }
  :root:not([data-theme="light"]):not([data-theme="light-forced"]) .sentinel-tag.idea{
    color: #fcd34d;
    background: rgba(245, 158, 11, 0.2);
  }
  :root:not([data-theme="light"]):not([data-theme="light-forced"]) .sentinel-link-btn:not(.quiet){
    color: #93c5fd;
  }
}
/* Same dark rules for an explicit dark choice when the computer is light. */
:root[data-theme="dark"]:not([data-theme="light-forced"]) .sentinel-mode-pill:not(.standby),:root[data-theme="dark"]:not([data-theme="light-forced"]) .sentinel-tag.ok{color: #6ee7b7;
    background: rgba(16, 185, 129, 0.18);}
:root[data-theme="dark"]:not([data-theme="light-forced"]) .sentinel-tag.warn,:root[data-theme="dark"]:not([data-theme="light-forced"]) .sentinel-check.alert{color: #fca5a5;}
:root[data-theme="dark"]:not([data-theme="light-forced"]) .sentinel-tag.idea{color: #fcd34d;
    background: rgba(245, 158, 11, 0.2);}
:root[data-theme="dark"]:not([data-theme="light-forced"]) .sentinel-link-btn:not(.quiet){color: #93c5fd;}

/* Phone width (360px): stack cleanly with zero sideways scroll */
@media (max-width: 640px) {
  .sentinel-panel {
    padding: 0.8rem 0.75rem;
  }
  .sentinel-row-bar {
    flex-wrap: wrap;
    align-items: flex-start;
  }
  .sentinel-row-toggle {
    flex: 1 1 100%;
    flex-wrap: wrap;
    gap: 0.2rem 0.5rem;
  }
  .sentinel-row-title {
    flex: 1 1 100%;
    white-space: normal;
  }
  .sentinel-row-who {
    max-width: 100%;
  }
}

/* 2026-11-20: where findings stand in the closed loop. */
.sentinel-loop {
  margin: 6px 0 2px;
  flex-wrap: wrap;
}

/* 2026-11-20: how often each check was right (L6). */
.sentinel-precision {
  margin: 6px 0 2px;
  overflow-x: auto;
}
.sentinel-precision-table {
  border-collapse: collapse;
  font-size: 0.85rem;
}
.sentinel-precision-table th,
.sentinel-precision-table td {
  padding: 2px 8px;
  text-align: left;
  white-space: nowrap;
}
.sentinel-precision-table tr.alert td {
  font-weight: 600;
}
