.workspace .system-workspace {
  display: grid;
  gap: 18px;
  width: min(100%, 1560px);
}
.system-workspace > .heading { margin-bottom: 0; }
.system-heading h1 { overflow-wrap: anywhere; }
.system-nav .nav-child { padding-left: 14px; gap: 9px; }
.system-nav-label { margin: 0 14px 8px; color: var(--muted); font-size: 12px; font-weight: 650; }
.system-layout.menu-collapsed .system-nav-label, .system-layout.menu-collapsed .system-menu-label { display: none; }
.system-layout.menu-collapsed .nav-child { justify-content: center; padding-inline: 0; }
.system-card {
  display: grid;
  min-width: 0;
  align-content: start;
  gap: 16px;
  box-shadow: 0 1px 2px #17274208;
}
.system-card .card-head { padding-bottom: 0; }
.system-card-section { display: grid; gap: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.system-card-section.actions { display: flex; }
.system-detail-grid { gap: 18px; }
.system-return { margin: -4px 0 -12px; }
.system-return .button { padding-inline: 4px 8px; }

.system-overview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 178px), 1fr));
  gap: 14px;
  margin: 0;
}
.system-tile {
  display: grid;
  min-width: 0;
  min-height: 92px;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-content: center;
  align-items: center;
  gap: 3px 13px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 1px 2px #17274208;
}
.system-symbol {
  display: inline-grid;
  flex: none;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 9px;
  background: var(--soft);
  color: var(--accent);
}
.system-tile .system-symbol { grid-row: 1 / 3; }
.system-tile.positive .system-symbol { background: var(--green-bg); color: var(--green); }
.system-tile.warning .system-symbol { background: var(--orange-bg); color: var(--orange); }
.system-tile.quiet .system-symbol { background: #edf0f4; color: #556173; }
.system-tile dt { color: var(--muted); font-size: 13px; }
.system-tile dd { margin: 0; font-size: 22px; font-weight: 650; line-height: 1.26; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.system-tile dd .pill { vertical-align: top; }
.system-pill { width: fit-content; align-items: center; gap: 5px; padding-inline: 8px; line-height: 1.45; border-radius: 4px; font-weight: 550; }
.system-pill::before { content: ""; flex: none; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.system-pill.info { background: var(--soft); color: var(--accent); }

.tenant-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.tenant-toolbar select { width: auto; min-width: 136px; }
.tenant-search { position: relative; flex: 1 1 200px; max-width: 360px; min-width: 0; }
.tenant-search input { padding-inline-start: 36px; }
.tenant-search .ui-icon { position: absolute; inset: 9px auto auto 11px; color: var(--muted); pointer-events: none; }
.tenant-table { font-variant-numeric: tabular-nums; }
.tenant-table :is(th, td) { padding: 10px 14px; }
.tenant-table tbody tr:hover { background: #f8faff; }
.tenant-table tr:last-child td { border-bottom: 0; }
.tenant-table :is(th, td):last-child { text-align: right; }
.tenant-table td:first-child { width: 37%; white-space: normal; }
.tenant-identity { display: flex; align-items: center; gap: 10px; min-width: 0; }
.tenant-identity > div { display: grid; gap: 3px; min-width: 0; overflow-wrap: anywhere; }
.tenant-identity strong { font-weight: 650; }
.tenant-identity small { color: var(--muted); font-size: 12px; }
.tenant-identity .system-symbol { width: 32px; height: 32px; border-radius: 7px; }
.tenant-mobile-label { display: none; }
.tenant-pagination { display: flex; gap: 10px; justify-content: space-between; align-items: center; flex-wrap: wrap; }
.tenant-empty { display: grid; min-height: 142px; justify-items: center; align-content: center; text-align: center; gap: 8px; padding: 20px; background: var(--surface-subtle); border-radius: 6px; }
.tenant-empty .system-symbol { margin-bottom: 2px; }
.tenant-create { width: min(440px, 94vw); }
.tenant-create .actions { justify-content: flex-end; }

.system-facts { display: grid; gap: 11px 18px; grid-template-columns: max-content minmax(0, 1fr); align-items: start; margin: 0; }
.system-facts dt { color: var(--muted); }
.system-facts dd { margin: 0; overflow-wrap: anywhere; }
.system-key { white-space: normal; overflow-wrap: anywhere; }
.system-code-row { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 10px; }
.system-code-row .button { padding-inline: 5px; }
.system-note { margin: 0; padding: 10px 12px; color: var(--muted); border-radius: 6px; background: var(--surface-subtle); overflow-wrap: anywhere; }
.system-workspace input[type=file] { height: auto; padding: 7px; }
.system-workspace input[type=file]::file-selector-button { padding: 4px 9px; margin-inline-end: 10px; border: 1px solid var(--stroke); border-radius: 4px; background: var(--surface-subtle); color: var(--ink); cursor: pointer; }
.system-metrics, .system-license-limits { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 164px), 1fr)); gap: 12px; margin: 0; }
.system-metric, .system-license-limits > div { display: grid; min-width: 0; align-content: start; gap: 6px; padding: 14px; background: var(--surface-subtle); border: 1px solid var(--line); border-radius: 6px; }
.system-metric { --meter: var(--accent); }
.system-metric.elevated { --meter: var(--orange); }
.system-metric.critical { --meter: var(--red); }
.system-metric dt { display: flex; align-items: center; gap: 7px; }
.system-metric dt, .system-license-limits dt { color: var(--muted); font-size: 13px; }
.system-metric dt .ui-icon { color: var(--meter); }
.system-metric dd, .system-license-limits dd { margin: 0; font-size: 22px; font-weight: 650; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.system-metric progress { display: block; width: 100%; height: 7px; margin-block: 1px 3px; border: 0; border-radius: 8px; overflow: hidden; accent-color: var(--meter); }
.system-metric progress::-webkit-progress-bar { background: #e8edf6; }
.system-metric progress::-webkit-progress-value { background: var(--meter); border-radius: 8px; }

.registration-card { width: min(100%, 450px); }
.registration-nav { margin-bottom: 14px; padding-bottom: 9px; border-bottom: 1px solid var(--line); }
.registration-nav [aria-pressed=true] { background: var(--soft); font-weight: 650; }
.registration-challenge-title { justify-content: space-between; margin-bottom: 6px; }
.registration-challenge-title h2 { font-size: 18px; }
#registration-verification { width: min(100% - 24px, 420px); }
#verification-result:empty { display: none; }
.registration-dialog-actions { justify-content: flex-end; }
#challenge-picture { display: block; width: 100%; height: auto; border-radius: 6px; background: var(--surface-subtle); }
#challenge-range { height: 28px; min-height: 28px; margin: 4px 0; padding: 0; accent-color: var(--accent); }
.registration-back { display: inline-block; margin-top: 8px; }

@media (max-width: 845px) {
  .system-detail-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .workspace .system-workspace { gap: 14px; }
  .system-tile { min-height: 78px; padding: 12px; }
  .system-overview { gap: 10px; }
}
@media (max-width: 620px) {
  .system-overview { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .system-overview:has(.system-tile:nth-child(3):last-child) .system-tile:last-child { grid-column: 1 / -1; }
  .system-license-limits { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .system-tile { gap: 3px 8px; }
  .system-tile dd { font-size: 18px; }
  .system-tile .system-symbol { width: 30px; height: 30px; }
  .tenant-search { flex: 1 0 100%; max-width: none; }
  .tenant-toolbar select { flex: 1; min-width: 0; }
  .tenant-table-wrap { border: 0; border-radius: 0; overflow: visible; }
  .tenant-table, .tenant-table tbody { display: block; }
  .tenant-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .tenant-table tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 6px; }
  .tenant-table tr + tr { margin-top: 9px; }
  .tenant-table td { display: grid; align-content: start; justify-items: start; gap: 4px; padding: 0; border: 0; white-space: normal; overflow-wrap: anywhere; }
  .tenant-table td:first-child { grid-column: 1 / -1; width: auto; padding-bottom: 9px; border-bottom: 1px solid var(--line); }
  .tenant-table .tenant-row-action { align-content: end; justify-items: end; }
  .tenant-mobile-label { display: block; color: var(--muted); font-size: 12px; }
}
