.boot-note {
  padding: 40px;
}
.trace-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: end;
  margin: 20px 0;
}
.trace-filters label {
  display: grid;
  gap: 6px;
  min-width: 120px;
  max-width: 310px;
  font-size: 12px;
}
.trace-filters .trace-correlation {
  flex: 1;
  min-width: 230px;
}
.trace-filters input,
.trace-filters select {
  padding: 10px;
  border: 1px solid var(--rule-strong);
  border-radius: 3px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  min-width: 0;
  width: 100%;
}
.trace-compare {
  display: flex;
  gap: 24px;
  justify-content: space-between;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--rule);
  padding: 16px;
  margin-bottom: 14px;
  font-size: 13px;
}
.trace-compare p {
  margin: 8px 0 0;
}
.trace-caption {
  font-size: 12px;
  color: var(--muted);
  margin: 14px 0;
}
.trace-row td {
  vertical-align: top;
}
.trace-row td:first-child {
  min-width: 180px;
}
.trace-row td:nth-child(2) {
  min-width: 240px;
  max-width: 520px;
  white-space: normal;
}
.trace-row p {
  margin: 6px 0;
  font-size: 12px;
  line-height: 1.7;
}
.trace-row code {
  font-size: 11px;
  overflow-wrap: anywhere;
}
.trace-warning td:first-child {
  border-left: 3px solid var(--red);
}
.trace-link {
  font: inherit;
  font-size: 12px;
  padding: 6px 0;
  border: 0;
  background: transparent;
  color: var(--blue);
  cursor: pointer;
  text-align: left;
}
.trace-link:hover {
  text-decoration: underline;
}
.trace-footer {
  display: flex;
  gap: 14px;
  align-items: center;
  margin: 16px 0;
  font-size: 12px;
  color: var(--muted);
}
@media (max-width: 760px) {
  .trace-compare {
    display: block;
  }
  .trace-compare > div + div {
    margin-top: 12px;
  }
  .trace-filters label {
    flex: 1;
    max-width: 100%;
  }
  .trace-footer {
    flex-wrap: wrap;
  }
}
.login-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--paper);
}
.login-brand {
  padding: 12vh 8vw;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-right: 1px solid var(--rule);
  background: var(--surface);
}
.login-brand h1 {
  font-size: 34px;
  margin: 36px 0 16px;
}
.login-brand p {
  max-width: 440px;
  color: var(--muted);
  line-height: 1.9;
}
.login-brand .brand {
  color: var(--ink);
}
.login-panel {
  width: min(420px, 85%);
  margin: auto;
}
.login-panel h2 {
  font-size: 23px;
  margin-bottom: 24px;
}
.live-form {
  display: grid;
  gap: 16px;
}
.live-form label {
  display: grid;
  gap: 7px;
  font-weight: 500;
}
.live-form input,
.live-form select,
.filter-bar input,
.filter-bar select,
.query-form input,
.query-form select,
.observe-select {
  font: inherit;
  padding: 9px 10px;
  border: 1px solid var(--rule-strong);
  background: var(--surface);
  color: var(--ink);
  border-radius: 3px;
  max-width: 100%;
  min-width: 0;
}
.live-form input[type='checkbox'] {
  width: 17px;
  height: 17px;
}
.live-form fieldset {
  border: 1px solid var(--rule);
  padding: 12px;
  max-height: 240px;
  overflow: auto;
}
.live-form .device-choice {
  display: flex;
  flex-direction: row;
  align-items: center;
  padding: 8px 0;
  font-weight: 400;
}
.live-form .form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.form-error {
  color: var(--red);
  background: var(--red-soft);
  padding: 10px 12px;
  line-height: 1.65;
  white-space: pre-wrap;
}
.form-error:empty {
  display: none;
}
.connection-state {
  font-size: 12px;
  color: var(--green);
}
.connection-state.stale {
  color: var(--red);
}
.sidebar-bottom a {
  color: var(--blue);
  font-size: 13px;
}
.live-subtitle {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}
.live-note {
  padding: 12px 16px;
  border: 1px solid var(--rule);
  background: var(--surface);
  line-height: 1.7;
  color: var(--muted);
  margin-bottom: 16px;
}
.live-note.warn {
  border-left: 3px solid var(--amber);
}
.live-note.error {
  color: var(--red);
  border-left: 3px solid var(--red);
}
.live-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 1fr);
  gap: 16px;
}
.live-grid .panel {
  min-width: 0;
}
.panel-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--rule);
}
.panel-title h2 {
  font-size: 15px;
  margin: 0;
}
.live-panel-body {
  padding: 16px;
}
.live-table {
  font-size: 13px;
}
.live-table td {
  vertical-align: middle;
}
.live-table .id {
  display: block;
  max-width: 230px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
}
.live-table .cell-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.live-table .btn {
  padding: 5px 9px;
  min-height: 30px;
}
.live-table .empty {
  padding: 40px 20px;
}
.metric-caption {
  font-size: 12px;
  color: var(--muted);
}
.query-form {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
  margin-bottom: 16px;
}
.query-form label {
  display: grid;
  gap: 5px;
  min-width: 90px;
  font-size: 12px;
  color: var(--muted);
}
.query-form .wide {
  flex: 1;
  min-width: 230px;
}
.query-form input[type='number'] {
  width: 108px;
}
.query-form .follow {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
}
.filter-bar {
  display: flex;
  gap: 10px;
  margin: 0 0 14px;
  flex-wrap: wrap;
}
.filter-bar input {
  min-width: 220px;
}
.live-chart {
  width: 100%;
  height: 240px;
  display: block;
}
.live-chart text {
  font-size: 11px;
  fill: var(--muted);
  font-family: var(--font-mono);
}
.live-chart .grid-line {
  stroke: var(--rule);
  stroke-width: 1;
}
.live-chart .trace {
  fill: none;
  stroke: var(--blue);
  stroke-width: 2;
}
.live-chart .dot {
  fill: var(--blue);
}
.chart-caption {
  padding: 8px 16px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}
.table-footer {
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  border-top: 1px solid var(--rule);
  font-size: 12px;
  color: var(--muted);
}
.gap-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 12px 0;
}
.gap-chip {
  font: 12px var(--font-mono);
  border: 1px solid var(--rule);
  padding: 6px 10px;
  background: var(--amber-soft);
}
.json-detail {
  font: 12px/1.7 var(--font-mono);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-height: 50vh;
  overflow: auto;
  background: var(--paper);
  padding: 14px;
  border: 1px solid var(--rule);
}
.simulation-strip {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}
.simulation-strip p {
  margin: 3px 0;
}
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.topbar .brand-sub {
  display: inline;
}
.query-stats {
  display: flex;
  gap: 24px;
  padding: 14px 16px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--rule);
}
.query-stats strong {
  margin-left: 8px;
  font-family: var(--font-mono);
}
.login-panel .btn {
  width: 100%;
  justify-content: center;
  min-height: 42px;
}
.login-panel .environment {
  margin-top: 20px;
  font: 12px var(--font-mono);
  color: var(--muted);
  word-break: break-all;
}
.page-head .actions {
  flex-wrap: wrap;
}
.dialog-body .live-form {
  min-width: 0;
}
.dialog-body {
  max-height: 75vh;
  overflow: auto;
}
.last-sync {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
#toast {
  max-width: min(640px, 90vw);
  white-space: pre-wrap;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}
@media (max-width: 1000px) {
  .live-grid {
    grid-template-columns: 1fr;
  }
  .header-tools .last-sync {
    display: none;
  }
}
@media (max-width: 700px) {
  .login-page {
    grid-template-columns: 1fr;
  }
  .login-brand {
    padding: 28px 24px;
    border-right: 0;
    border-bottom: 1px solid var(--rule);
  }
  .login-brand h1 {
    font-size: 24px;
    margin: 22px 0 8px;
  }
  .login-panel {
    margin: 30px auto;
  }
  .login-brand p {
    display: none;
  }
  .topbar .brand-sub {
    display: none;
  }
  .header-tools {
    gap: 8px;
  }
  .header-tools .btn {
    font-size: 12px;
    padding: 5px 8px;
  }
  .page-head {
    gap: 10px;
  }
  .query-form .wide {
    min-width: 100%;
  }
  .query-stats {
    gap: 10px;
  }
  .live-table {
    min-width: 660px;
  }
  .live-chart {
    height: 210px;
  }
  .observe-select {
    max-width: 200px;
  }
  .live-note {
    font-size: 13px;
  }
}

/* Management tables keep the same cobalt workbench tokens. */
.state-reason {
  max-width: 300px;
  white-space: normal;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.role-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  border: 1px solid var(--rule);
  background: var(--surface);
  padding: 16px;
  margin-bottom: 16px;
  font-size: 13px;
}
.role-summary b {
  margin-right: 8px;
}
.grant-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.grant-list {
  max-height: 300px;
  overflow: auto;
  border: 1px solid var(--rule);
  padding: 12px;
  min-width: 0;
}
.grant-list legend {
  font-weight: 600;
  font-size: 13px;
}
.grant-list small {
  display: block;
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 12px;
}
.grant-list .device-choice {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 0;
  min-height: 44px;
}
.grant-list input[type='checkbox'] {
  width: 18px;
  height: 18px;
  margin-top: 3px;
  flex-shrink: 0;
}
.live-form textarea {
  width: 100%;
  min-height: 80px;
  resize: vertical;
  border: 1px solid var(--rule-strong);
  padding: 10px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
}
.live-form input[readonly] {
  background: var(--subtle);
  color: var(--muted);
}
.detail-list {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 14px;
  font-size: 14px;
}
.detail-list dt {
  color: var(--muted);
}
.detail-list dd {
  margin: 0;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.form-error:focus {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}
.account-name {
  max-width: 190px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
@media (max-width: 800px) {
  .grant-columns {
    grid-template-columns: 1fr;
  }
  .account-name {
    display: none;
  }
  .role-summary {
    display: grid;
    gap: 10px;
  }
}

.dialog-body .form-actions {
  position: sticky;
  bottom: -20px;
  z-index: 2;
  padding: 12px 0;
  background: var(--surface);
  border-top: 1px solid var(--rule);
}
.dialog-body .form-actions .btn {
  min-height: 44px;
}

.download-page {
  max-width: 1200px;
}
.download-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px;
  border-top: 1px solid var(--rule);
}
.download-copy {
  min-width: 0;
}
.download-copy h3 {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 8px;
}
.download-copy p,
.download-note p {
  margin: 0;
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
}
.download-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  flex-shrink: 0;
}
.download-actions .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  text-decoration: none;
}
.download-note {
  border-top: 1px solid var(--rule);
  background: var(--subtle);
  padding: 16px 24px;
}
.download-note p + p {
  margin-top: 8px;
}
.download-note code {
  overflow-wrap: anywhere;
  color: var(--ink);
}
@media (max-width: 1000px) {
  .download-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 16px;
  }
  .download-actions {
    justify-content: flex-start;
  }
}
@media (max-width: 600px) {
  .download-page .panel-title {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }
  .download-row,
  .download-note {
    padding: 16px;
  }
  .download-actions {
    width: 100%;
  }
}
