.row-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 220px;
  white-space: nowrap;
}

.node-actions {
  min-width: 480px;
}

.row-actions form {
  display: inline-flex;
}

.button-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 9px 13px;
  border: 1px solid #aebbb3;
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  text-decoration: none;
}

.button-link:hover {
  background: #f4f7f5;
}

.row-actions button,
.row-actions .button-link {
  flex: 0 0 auto;
}

.warning {
  border-color: #d9bd75;
  background: #fffdf5;
  color: #7a5200;
}

.warning:hover {
  background: #fff7db;
}

input[readonly] {
  background: #f1f5f2;
  color: var(--muted);
}

.s-online {
  background: #d9f5e8;
  color: #087044;
}

.s-offline {
  background: #fee4e2;
  color: #8f1d14;
}

.s-unknown {
  background: #e7ece9;
  color: #48584f;
}

.node-login-grid {
  align-items: start;
}

.node-login-grid > .card {
  min-height: 100%;
}

.qr-panel {
  margin: 16px 0;
  text-align: center;
}

.qr-panel img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
  padding: 12px;
  border: 1px solid #d8ded9;
  border-radius: 12px;
  background: #fff;
}

.qr-panel figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-size: .92rem;
}

.error-text {
  color: #b42318;
  overflow-wrap: anywhere;
}

.debug-schema {
  display: grid;
  grid-template-columns: minmax(88px, max-content) minmax(0, 1fr);
  gap: 8px 16px;
}

.debug-schema dt {
  font-weight: 700;
}

.debug-schema dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.debug-response {
  max-height: 560px;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.danger-check {
  color: #8f1d14;
  font-weight: 700;
}

.section-title {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}

.onboarding-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
  padding: 0;
  list-style: none;
}

.onboarding-list li {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid #d8ded9;
  border-radius: 10px;
}

.onboarding-list a {
  color: inherit;
}

.onboarding-list b {
  font-size: .85rem;
}

.step-dot {
  width: 12px;
  height: 12px;
  border: 2px solid currentColor;
  border-radius: 50%;
}

.is-complete .step-dot {
  background: currentColor;
  box-shadow: inset 0 0 0 2px #eef9f3;
}

.onboarding-list .is-complete {
  background: #eef9f3;
  color: #087044;
}

@media (max-width: 800px) {
  .row-actions {
    min-width: 220px;
  }

  .actions .button-link {
    width: 100%;
  }
}
.top nav a.active,
.top nav a[aria-current="page"] {
  color: #fff;
  background: #ffffff1f;
  border-radius: 7px;
  box-shadow: inset 0 -2px 0 #71d5b4;
}

.log-text,
.log-detail-body,
.error-detail {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.log-detail {
  min-width: 240px;
  max-width: 520px;
}

.log-detail summary {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  color: var(--text);
  cursor: pointer;
}

.log-detail summary::before {
  content: "";
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-right: 2px solid var(--primary);
  border-bottom: 2px solid var(--primary);
  transform: rotate(-45deg);
  transform-origin: center;
  transition: transform 120ms ease;
}

.log-detail[open] summary::before {
  transform: rotate(45deg);
}

.log-detail summary:focus-visible {
  outline: 3px solid #71d5b4;
  outline-offset: 2px;
  border-radius: 4px;
}

.log-preview {
  min-width: 0;
}

.summary-affordance {
  flex: 0 0 auto;
  color: var(--primary);
  font-size: .82rem;
  font-weight: 700;
}

.log-detail-body {
  margin: 6px 0 10px;
  padding: 10px 12px;
  border-left: 3px solid #a9d7c5;
  border-radius: 0 8px 8px 0;
  background: #f4f7f5;
  white-space: pre-wrap;
}

.error-detail {
  min-width: 260px;
  max-width: 520px;
  white-space: pre-wrap;
}

.error-detail .error-message {
  display: block;
  color: #8f1d14;
  font-weight: 650;
}

.recovery-hint,
.health-scope-note {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: .9rem;
  line-height: 1.5;
}

.health-scope-note {
  padding: 10px 12px;
  border-left: 3px solid #d9bd75;
  background: #fffdf5;
}

.queue-channel {
  display: grid;
  gap: 2px;
  min-width: 130px;
}

.queue-channel small,
.time-pair small {
  color: var(--muted);
}

.time-pair {
  display: grid;
  gap: 3px;
  min-width: 150px;
  font-variant-numeric: tabular-nums;
}

.s-ambiguous {
  background: #fff1cc;
  color: #7a5200;
  border: 1px solid #e3c66f;
}

.queue-actions {
  min-width: 120px;
}

/* The full admin navigation no longer fits at common tablet widths. */
@media (max-width: 1180px) {
  .top {
    height: auto;
    min-height: 58px;
    flex-wrap: wrap;
    padding: 10px 16px;
  }

  .menu {
    display: block;
  }

  .top nav {
    display: none;
    width: 100%;
    margin: 8px 0 0;
    flex-direction: column;
    align-items: stretch;
  }

  .top nav.open {
    display: flex;
  }

  .top nav a,
  .top .link {
    width: 100%;
    min-height: 44px;
    text-align: left;
  }

  .top nav a.active,
  .top nav a[aria-current="page"] {
    box-shadow: inset 3px 0 0 #71d5b4;
  }
}

@media (min-width: 801px) and (max-width: 1180px) {
  .top nav.open {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 800px) {
  .log-detail,
  .error-detail {
    min-width: 220px;
    max-width: 80vw;
  }
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 16px;
  z-index: 20;
  padding: 10px 14px;
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  box-shadow: var(--shadow);
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

#admin-main {
  scroll-margin-top: 76px;
}

.table-wrap:focus-visible {
  outline: 3px solid #71d5b4;
  outline-offset: 3px;
}

button,
.button-link,
.top a,
.log-detail summary {
  touch-action: manipulation;
}

button:active,
.button-link:active,
.top nav a:active {
  filter: brightness(.96);
}

@media (max-width: 800px) {
  .top nav a.active,
  .top nav a[aria-current="page"] {
    box-shadow: inset 3px 0 0 #71d5b4;
  }
}
