:root {
  color-scheme: light;
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-subtle: #f9fafb;
  --border: #e4e7ec;
  --border-strong: #d0d5dd;
  --text: #101828;
  --text-muted: #667085;
  --text-soft: #98a2b3;
  --blue: #2563eb;
  --blue-soft: #eff6ff;
  --green: #12805c;
  --green-soft: #e9f8f0;
  --amber: #b54708;
  --amber-soft: #fff7e6;
  --red: #c0362c;
  --red-soft: #fff1f0;
  --shadow: 0 1px 2px rgb(16 24 40 / 0.06);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  line-height: 1.5;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  font-weight: 400;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: 20px 14px;
  border-right: 1px solid var(--border);
  background: #ffffff;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 6px 20px;
}

.brand-mark {
  display: grid;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  border: 1px solid #d5e9ff;
  background: #eaf6ff;
  overflow: hidden;
}

.brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand-title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.25;
}

.brand-subtitle,
.footer-text,
.section-kicker,
.eyebrow,
.metric-label,
.metric-note,
.target-item p {
  color: var(--text-muted);
}

.brand-subtitle {
  margin-top: 2px;
  font-size: 12px;
}

.nav-list {
  display: grid;
  gap: 14px;
}

.version-footer {
  display: grid;
  gap: 8px;
  margin-top: auto;
  padding: 12px 8px 0;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
}

.version-heading {
  display: grid;
  gap: 2px;
}

.version-label {
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.version-footer strong {
  overflow: hidden;
  color: #344054;
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.version-meta {
  display: grid;
  gap: 4px;
  margin: 0;
}

.version-meta div {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 6px;
  align-items: baseline;
}

.version-meta dt {
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 700;
}

.version-meta dd {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: #475467;
  font-size: 11px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.version-footer small {
  overflow: hidden;
  font-size: 11px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-section {
  display: grid;
  gap: 4px;
}

.nav-section-title {
  padding: 0 10px 2px;
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.nav-item {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 10px;
  border-radius: 8px;
  color: #344054;
  text-decoration: none;
  font-weight: 500;
}

.nav-item:hover,
.nav-item.active {
  background: var(--blue-soft);
  color: #1d4ed8;
}

.nav-icon {
  color: var(--text-soft);
  text-align: center;
}

.nav-count {
  min-width: 22px;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--amber-soft);
  color: var(--amber);
  font-size: 12px;
  font-weight: 600;
  text-align: center;
}

.main {
  min-width: 0;
  padding: 24px;
}

.topbar,
.topbar-actions,
.panel-actions,
.build-meta,
.target-chip-row,
.latest-actions,
.panel-header,
.target-state {
  display: flex;
  align-items: center;
}

.topbar {
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
}

.eyebrow,
.section-kicker {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  margin-top: 2px;
  font-size: 26px;
  font-weight: 700;
  line-height: 1.25;
}

h2 {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.3;
}

h3 {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
}

.topbar-actions {
  gap: 10px;
  flex-wrap: wrap;
}

.user-chip,
.icon-button,
.button,
.segment,
.row-action,
.status-pill,
.target-chip,
.health {
  border-radius: 8px;
}

.icon-button,
.row-action {
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--border);
  background: var(--surface);
  color: #344054;
}

.icon-button {
  width: 36px;
  height: 36px;
}

.row-action {
  width: 30px;
  height: 30px;
}

.row-action.text {
  width: auto;
  min-width: 48px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 600;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 9px 5px 5px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: #344054;
  font-weight: 600;
}

.user-chip:hover,
.user-chip[aria-expanded="true"] {
  border-color: var(--border-strong);
  background: var(--surface-subtle);
}

.user-chip[data-authenticated="false"] {
  color: var(--text-muted);
}

.user-chip[data-authenticated="false"] .avatar {
  background: #667085;
}

.avatar {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 999px;
  background: #111827;
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
}

.user-menu-root {
  position: relative;
}

.user-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 20;
  display: grid;
  width: min(280px, calc(100vw - 32px));
  gap: 4px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 12px 30px rgb(16 24 40 / 0.12);
}

.user-menu-id {
  display: grid;
  gap: 4px;
  padding: 8px 9px 10px;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 12px;
}

.user-menu-id code {
  overflow: hidden;
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.menu-item {
  display: flex;
  align-items: center;
  min-height: 34px;
  padding: 0 9px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #344054;
  font-weight: 600;
  text-align: left;
}

.menu-item:hover {
  background: var(--surface-subtle);
}

.menu-item.danger {
  color: var(--red);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.view-stack {
  display: grid;
  gap: 16px;
}

.metric-card,
.panel,
.latest-band {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.metric-card {
  display: grid;
  gap: 4px;
  padding: 16px;
}

.metric-card-button {
  width: 100%;
  appearance: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.metric-card-button:hover {
  border-color: var(--blue);
}

.metric-card-button:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.metric-card strong {
  font-size: 26px;
  font-weight: 700;
  line-height: 1.15;
}

.positive {
  color: var(--green);
}

.pending {
  color: var(--amber);
}

.running {
  color: var(--blue);
}

.danger {
  color: var(--red);
}

.latest-band {
  display: grid;
  grid-template-columns: minmax(360px, 1.4fr) minmax(240px, 0.7fr) max-content;
  gap: 20px;
  align-items: center;
  margin-bottom: 16px;
  padding: 18px;
}

.latest-main,
.latest-status-panel {
  min-width: 0;
}

.latest-main h2 {
  margin-top: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.latest-image-line {
  margin-top: 6px;
  overflow: hidden;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.build-meta {
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
  color: var(--text-muted);
  font-size: 13px;
}

.build-meta span {
  padding-right: 8px;
  border-right: 1px solid var(--border);
}

.build-meta span:last-child {
  border-right: 0;
}

.latest-status-panel {
  display: grid;
  gap: 8px;
  justify-items: start;
}

.target-chip-row,
.latest-actions {
  gap: 8px;
  flex-wrap: wrap;
}

.target-chip-row {
  min-width: 0;
}

.latest-actions {
  justify-content: flex-end;
}

.target-chip,
.status-pill,
.health {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

button.target-chip {
  border: 0;
  font: inherit;
}

button.target-chip:hover,
button.target-chip:focus-visible {
  outline: 2px solid rgb(37 99 235 / 0.28);
  outline-offset: 2px;
}

.status-pill.success,
.target-chip.success,
.health.ok {
  background: var(--green-soft);
  color: var(--green);
}

.status-pill.pending,
.target-chip.pending,
.health.warn {
  background: var(--amber-soft);
  color: var(--amber);
}

.status-pill.running,
.target-chip.running {
  background: var(--blue-soft);
  color: var(--blue);
}

.status-pill.danger {
  background: var(--red-soft);
  color: var(--red);
}

.status-pill.muted {
  background: #f2f4f7;
  color: var(--text-muted);
}

.dashboard-error {
  margin-bottom: 16px;
  padding: 10px 12px;
  border: 1px solid var(--amber-soft);
  border-radius: 8px;
  background: #fffbeb;
  color: #92400e;
  font-weight: 600;
}

.dashboard-notice {
  margin-bottom: 16px;
  padding: 10px 12px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: var(--blue-soft);
  color: #1d4ed8;
  font-weight: 600;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid transparent;
  font-weight: 600;
  text-decoration: none;
}

.button.primary {
  background: var(--blue);
  color: #ffffff;
}

.button.secondary {
  border-color: var(--border);
  background: var(--surface);
  color: #344054;
}

.button.compact {
  min-height: 32px;
  padding-inline: 10px;
  font-size: 12px;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}

.panel {
  min-width: 0;
  padding: 16px;
}

.panel.wide {
  min-height: 0;
}

.panel.full {
  grid-column: 1 / -1;
}

.panel-header {
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.panel-header.simple {
  align-items: flex-start;
}

.list-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(160px, 220px);
  gap: 12px;
  align-items: end;
  margin-bottom: 14px;
}

.compact-field {
  gap: 5px;
  font-size: 12px;
}

.segment-control {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-subtle);
}

.segment {
  min-height: 30px;
  padding: 0 10px;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
}

.segment.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
}

.table-wrap {
  overflow-x: auto;
}

.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 40px;
  margin-top: 12px;
  color: var(--text-muted);
  font-size: 12px;
}

.pagination-info {
  white-space: nowrap;
}

.pagination-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.pagination-page {
  min-width: 34px;
  padding-right: 10px;
  padding-left: 10px;
}

.pagination-page.active {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

.pagination-ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  color: var(--text-muted);
}

table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
}

.build-history-table {
  min-width: 960px;
  table-layout: fixed;
}

.build-history-table th {
  white-space: nowrap;
}

.build-history-table td {
  overflow: hidden;
}

.build-history-table .table-main {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.build-history-table th:nth-child(1),
.build-history-table td:nth-child(1) {
  width: 180px;
}

.build-history-table th:nth-child(2),
.build-history-table td:nth-child(2) {
  width: 140px;
}

.build-history-table th:nth-child(3),
.build-history-table td:nth-child(3) {
  width: 300px;
}

.build-history-table th:nth-child(4),
.build-history-table td:nth-child(4) {
  width: 120px;
}

.build-history-table th:nth-child(5),
.build-history-table td:nth-child(5) {
  width: 112px;
}

.build-history-table th:nth-child(6),
.build-history-table td:nth-child(6) {
  width: 108px;
}

.build-history-table th:nth-child(7),
.build-history-table td:nth-child(7) {
  width: 80px;
}

.webhook-events-table {
  min-width: 1180px;
  table-layout: fixed;
}

.webhook-col-time {
  width: 92px;
}

.webhook-col-status {
  width: 128px;
}

.webhook-col-event {
  width: 260px;
}

.webhook-col-image {
  width: 300px;
}

.webhook-col-count {
  width: 76px;
}

.webhook-col-note {
  width: auto;
}

th,
td {
  height: 48px;
  padding: 0 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: middle;
}

th {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
}

.webhook-events-table th {
  white-space: nowrap;
}

td {
  color: #344054;
}

.table-nowrap {
  white-space: nowrap;
}

.table-main {
  overflow: hidden;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.table-subtext {
  display: -webkit-box;
  overflow: hidden;
  margin-top: 3px;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.table-ellipsis {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.numeric-cell {
  text-align: center;
  white-space: nowrap;
}

.webhook-event-row {
  cursor: pointer;
}

.webhook-event-row:focus-visible,
[data-build-row]:focus-visible,
[data-deployment-row]:focus-visible,
[data-image-source-row]:focus-visible,
[data-target-row]:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: -2px;
}

[data-build-row],
[data-deployment-row],
[data-image-source-row],
[data-target-row] {
  cursor: pointer;
}

.webhook-note {
  display: -webkit-box;
  overflow: hidden;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

tbody tr:hover,
tr.highlight {
  background: #f8fbff;
}

.target-item:hover {
  background: #f8fbff;
}

.mono {
  color: #475467;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 12px;
}

.target-list {
  display: grid;
  gap: 10px;
}

.target-list.expanded {
  grid-template-columns: minmax(0, 1fr);
}

.detail-body {
  display: grid;
  gap: 16px;
}

.detail-grid,
.diagnostic-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.detail-card,
.diagnostic-card {
  display: grid;
  min-width: 0;
  gap: 6px;
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-subtle);
}

.detail-card span,
.diagnostic-card span {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
}

.detail-card strong,
.diagnostic-card strong,
.diagnostic-card code {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.diagnostic-card code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

.detail-section {
  display: grid;
  gap: 12px;
}

.detail-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.detail-chip-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.empty-state {
  padding: 18px 12px;
  border: 1px dashed var(--border-strong);
  border-radius: 8px;
  color: var(--text-muted);
  text-align: center;
}

.target-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 86px;
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-subtle);
}

.target-item p {
  margin-top: 4px;
  font-size: 13px;
}

.target-state {
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
}

.action-dialog {
  width: min(520px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
}

.action-dialog.wide-dialog {
  width: min(760px, calc(100vw - 32px));
}

.action-dialog.record-detail-dialog {
  width: min(1080px, calc(100vw - 32px));
}

.action-dialog.json-dialog {
  width: min(920px, calc(100vw - 32px));
}

.action-dialog::backdrop {
  background: rgb(16 24 40 / 0.42);
}

.action-dialog-card {
  display: grid;
  min-width: 0;
  max-width: 100%;
  gap: 16px;
  overflow-x: hidden;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 18px 48px rgb(16 24 40 / 0.2);
}

.action-dialog-card > * {
  min-width: 0;
}

.record-detail-card {
  max-height: calc(100vh - 48px);
  overflow: auto;
}

.action-dialog-header,
.dialog-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.action-summary {
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-subtle);
  color: #344054;
  overflow-wrap: anywhere;
}

.json-viewer {
  max-height: min(68vh, 720px);
  margin: 0;
  overflow: auto;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #0f172a;
  color: #dbeafe;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 12px;
  line-height: 1.65;
  tab-size: 2;
  white-space: pre;
}

.json-token-key {
  color: #93c5fd;
}

.json-token-string {
  color: #bbf7d0;
}

.json-token-number {
  color: #fde68a;
}

.json-token-boolean,
.json-token-null {
  color: #fca5a5;
}

.field {
  display: grid;
  gap: 7px;
  color: #344054;
  font-weight: 600;
}

.field-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.field-help {
  position: relative;
  display: inline-grid;
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  place-items: center;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  background: var(--surface-subtle);
  color: var(--text-muted);
  cursor: help;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

.field-help::after {
  content: attr(data-tooltip);
  position: absolute;
  top: calc(100% + 8px);
  z-index: 30;
  left: 0;
  display: none;
  width: min(320px, calc(100vw - 64px));
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #111827;
  box-shadow: var(--shadow);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
  opacity: 0;
  pointer-events: none;
  text-align: left;
  transform: translateY(-4px);
  transition:
    opacity 0.12s ease,
    transform 0.12s ease;
  overflow-wrap: anywhere;
  white-space: normal;
}

.field-help:hover,
.field-help:focus-visible {
  border-color: #93b4f7;
  color: var(--blue);
  outline: none;
}

.field-help:hover::after,
.field-help:focus-visible::after {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
}

.field textarea {
  min-height: 116px;
  padding-block: 9px;
  resize: vertical;
}

.field select[multiple] {
  height: auto;
  padding: 8px;
}

.user-picker {
  display: block;
  min-width: 0;
}

.user-picker-chips {
  display: flex;
  width: 100%;
  min-height: 40px;
  box-sizing: border-box;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  padding: 6px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: var(--surface);
  cursor: pointer;
}

.user-picker-chips:hover,
.user-picker-chips:focus-visible {
  border-color: #93b4f7;
  outline: none;
  box-shadow: 0 0 0 3px rgb(37 99 235 / 0.12);
}

.user-picker-empty {
  color: var(--text-muted);
  font-size: 13px;
}

.user-chip.small {
  display: inline-flex;
  max-width: 100%;
  align-items: center;
  gap: 6px;
  padding: 4px 7px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-subtle);
  font-size: 12px;
  font-weight: 700;
}

.user-chip.small span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-chip.small button {
  display: grid;
  width: 18px;
  height: 18px;
  padding: 0;
  place-items: center;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font: inherit;
}

.user-picker-dialog-card {
  max-width: 560px;
}

.user-picker-options {
  display: grid;
  max-height: 320px;
  gap: 8px;
  overflow: auto;
}

.user-picker-option {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  width: 100%;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.user-picker-option:hover,
.user-picker-option.selected {
  border-color: #93b4f7;
  background: var(--blue-soft);
}

.user-picker-check {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  color: var(--blue);
  font-weight: 800;
}

.user-picker-option small {
  display: block;
  margin-top: 2px;
  color: var(--text-muted);
  font-size: 12px;
}

.field-status {
  margin: 12px 0 4px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #f8fafc;
  color: var(--text-muted);
  font-size: 13px;
}

.field-status.success {
  border-color: rgba(22, 163, 74, 0.24);
  background: #f0fdf4;
  color: #166534;
}

.field-status.warning {
  border-color: rgba(217, 119, 6, 0.28);
  background: #fffbeb;
  color: #92400e;
}

.field-status.danger {
  border-color: rgba(220, 38, 38, 0.24);
  background: #fef2f2;
  color: #991b1b;
}

.field-status.info {
  border-color: rgba(37, 99, 235, 0.22);
  background: var(--blue-soft);
  color: #1d4ed8;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.form-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.checkbox-field {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  min-height: 38px;
}

.checkbox-field input {
  width: 16px;
  min-height: 16px;
}

.panel-actions {
  gap: 8px;
  flex-wrap: wrap;
}

.table-actions {
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.role-form {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.pending-users-summary {
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-subtle);
  color: #344054;
  font-size: 13px;
  font-weight: 600;
}

.inline-check {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  color: #344054;
  font-size: 12px;
  font-weight: 600;
}

.dialog-note {
  color: var(--text-muted);
  font-size: 13px;
}

.settings-summary {
  display: grid;
  grid-template-columns: minmax(220px, 0.4fr) minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-subtle);
}

.settings-summary strong {
  display: block;
  margin-top: 4px;
  font-size: 22px;
  line-height: 1.2;
}

.settings-summary p,
.check-item p {
  color: var(--text-muted);
}

.settings-section {
  display: grid;
  gap: 14px;
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}

.settings-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.check-list {
  display: grid;
  gap: 10px;
}

.tool-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 14px;
}

.tool-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.timeline-list,
.diff-list {
  display: grid;
  gap: 10px;
}

.timeline-list {
  position: relative;
  gap: 0;
  padding: 2px 0;
}

.timeline-list::before {
  position: absolute;
  top: 18px;
  bottom: 18px;
  left: 17px;
  width: 2px;
  border-radius: 999px;
  background: #d9e2ec;
  content: "";
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  min-height: 64px;
  padding: 8px 0;
}

.timeline-rail {
  display: flex;
  justify-content: center;
  padding-top: 3px;
}

.timeline-marker {
  z-index: 1;
  display: inline-flex;
  width: 18px;
  height: 18px;
  align-items: center;
  justify-content: center;
  border: 2px solid #d9e2ec;
  border-radius: 999px;
  background: var(--surface);
  color: transparent;
  font-size: 0;
}

.timeline-marker.pending {
  border-color: #f2b84b;
  background: #fff7e6;
}

.timeline-marker.running {
  border-color: var(--blue);
  background: #eff6ff;
}

.timeline-marker.success {
  border-color: var(--green);
  background: #ecfdf3;
}

.timeline-marker.danger {
  border-color: var(--red);
  background: #fff1f3;
}

.timeline-content {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-subtle);
}

.timeline-content h3 {
  margin: 0;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
}

.timeline-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.timeline-meta code {
  padding: 2px 7px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-muted);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 11px;
  font-weight: 700;
}

.diff-item {
  display: grid;
  gap: 12px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-subtle);
}

.diff-item {
  grid-template-columns: 120px minmax(0, 1fr);
}

.diff-item span {
  color: var(--text-muted);
  font-weight: 600;
}

.diff-item code {
  overflow-wrap: anywhere;
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

.check-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-subtle);
}

.check-item code {
  display: inline-block;
  max-width: 100%;
  margin: 5px 0 3px;
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  overflow-wrap: anywhere;
}

.check-item.ready {
  border-color: #cdebdc;
}

.check-item.warning {
  border-color: #f7d99b;
}

.check-item.blocked {
  border-color: #f3b8b4;
}

[hidden] {
  display: none !important;
}

@media (max-width: 1120px) {
  .app-shell {
    grid-template-columns: 76px minmax(0, 1fr);
  }

  .brand-title,
  .brand-subtitle,
  .nav-item span:not(.nav-icon):not(.nav-count),
  .version-footer {
    display: none;
  }

  .brand {
    justify-content: center;
    padding-inline: 0;
  }

  .nav-item {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .nav-count {
    position: absolute;
    transform: translate(12px, -10px);
  }

  .latest-band {
    grid-template-columns: minmax(0, 1fr);
  }

  .content-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 760px) {
  .app-shell {
    display: block;
  }

  .sidebar {
    position: static;
    height: auto;
    padding: 12px;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .brand {
    justify-content: flex-start;
    padding-bottom: 10px;
  }

  .brand-title,
  .brand-subtitle,
  .nav-item span:not(.nav-icon):not(.nav-count) {
    display: block;
  }

  .nav-list {
    grid-auto-flow: column;
    grid-auto-columns: max-content;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .nav-item {
    grid-template-columns: 22px auto;
    min-width: max-content;
  }

  .nav-count {
    position: static;
    transform: none;
  }

  .main {
    padding: 16px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  h1 {
    font-size: 22px;
  }

  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .panel-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .segment-control {
    width: 100%;
    overflow-x: auto;
  }

  .target-item {
    grid-template-columns: minmax(0, 1fr);
  }

  .settings-summary,
  .settings-section-header,
  .check-item,
  .list-toolbar,
  .detail-grid,
  .diagnostic-grid,
  .form-grid,
  .form-grid.two {
    grid-template-columns: minmax(0, 1fr);
  }

  .settings-section-header {
    display: grid;
    align-items: start;
  }

  .dialog-actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .dialog-actions .button {
    width: 100%;
  }
}

@media (max-width: 460px) {
  .metric-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .latest-actions,
  .latest-actions .button,
  .topbar-actions,
  .topbar-actions .button,
  .topbar-actions .user-menu-root,
  .topbar-actions .user-chip {
    width: 100%;
  }

  .button {
    justify-content: center;
  }
}
