.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 14px;
  overflow: auto;
}
.panel h2, .panel h3 { margin: 0 0 12px; }
.banner { border-radius: 10px; padding: 14px; margin-bottom: 14px; }
.banner.ok { background: #14532d; border: 1px solid var(--ok); }
.banner.sync { background: #7f1d1d; border: 1px solid var(--bad); }
.stat, .card, .store {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 13px;
}
.stat b { display: block; font-size: 22px; }
.store {
  cursor: pointer;
  background: linear-gradient(180deg, #243247, var(--panel));
}
.store:hover { border-color: #64748b; }
.store.offline { opacity: .58; }
.store.elevated { border-color: var(--bad); }
.store h2 { font-size: 15px; margin: 0 0 10px; }
.metric {
  display: flex;
  justify-content: space-between;
  background: var(--panel2);
  padding: 8px;
  border-radius: 8px;
}
.metric b { font-size: 25px; }
.row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 4px 0;
  font-size: 13px;
}
.chips { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 8px; }
.chip, .pill, .rolechip, .st {
  display: inline-block;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 11px;
}
.chip.ok, .pill.ok { background: rgba(34, 197, 94, .12); }
.chip.down, .pill.down {
  background: rgba(239, 68, 68, .13);
  border-color: var(--bad);
}
.chip.warn, .pill.warn { background: rgba(245, 158, 11, .13); }
table {
  width: 100%;
  border-collapse: collapse;
  background: var(--panel);
  min-width: 600px;
}
th, td {
  text-align: right;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
th { color: var(--muted); background: var(--panel2); }
.overlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 24px;
  background: rgba(2, 6, 23, .78);
  overflow: auto;
  z-index: 60;
}
.overlay.open { display: flex; }
.modal {
  position: relative;
  width: min(1100px, 100%);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px;
}
.close {
  position: absolute;
  inset-inline-end: 12px;
  top: 10px;
  font-size: 20px;
}
.authgate {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
}
.authgate.open { display: flex; }
.loginbox {
  width: min(360px, 92vw);
  padding: 26px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
}
.loginbox label {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin: 12px 0 4px;
}
.loginbox input, .loginbox button { width: 100%; }
.loginbox p { color: var(--muted); }
.error { min-height: 22px; margin-top: 8px; }
.sect { color: var(--muted); font-size: 14px; margin: 20px 0 8px; }
video { width: 100%; max-height: 60vh; background: #000; }
.scanner-modal { width: min(480px, 100%); text-align: center; }
.scanframe { position: relative; }
.scanframe::after {
  content: "";
  position: absolute;
  inset: 12%;
  border: 2px solid var(--accent);
  border-radius: 12px;
}
.bar {
  height: 7px;
  background: var(--panel2);
  border-radius: 5px;
  overflow: hidden;
}
.bar > i { display: block; height: 100%; }
.tab[aria-selected="true"] { border-color: var(--accent); }
