:root {
  color-scheme: light;
  --canvas: #f5f5f7;
  --surface: #ffffff;
  --surface-muted: #f9f9fb;
  --surface-strong: #eff1f4;
  --line: #dedfe3;
  --line-strong: #c8cad0;
  --ink: #1d1d1f;
  --muted: #6e6e73;
  --faint: #909096;
  --blue: #0066cc;
  --blue-soft: #e8f2ff;
  --green: #1d7f4e;
  --green-soft: #e8f6ee;
  --amber: #9a5b00;
  --amber-soft: #fff4df;
  --red: #c22d2d;
  --red-soft: #fcebec;
  --terminal: #17191d;
  --terminal-line: #2b2e34;
  --terminal-ink: #e6e8ec;
  --shadow-small: 0 1px 2px rgb(0 0 0 / 4%), 0 5px 18px rgb(0 0 0 / 4%);
  --shadow-large: 0 18px 60px rgb(0 0 0 / 12%);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
  font-size: 15px;
  letter-spacing: 0;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
}

button,
input,
select {
  color: inherit;
  font: inherit;
  letter-spacing: 0;
}

button,
select {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
a:focus-visible {
  outline: 3px solid rgb(0 102 204 / 24%);
  outline-offset: 2px;
}

[hidden] {
  display: none !important;
}

.login-screen {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 28px;
  background: var(--canvas);
}

.login-panel {
  width: min(100%, 370px);
  padding: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow-large);
}

.product-mark,
.brand-mark {
  display: grid;
  color: white;
  background: var(--ink);
  place-items: center;
}

.product-mark {
  width: 42px;
  height: 42px;
  margin-bottom: 24px;
  border-radius: 8px;
}

.product-mark svg {
  width: 22px;
}

.login-panel h1,
.login-panel p {
  margin: 0;
}

.login-panel h1 {
  font-size: 26px;
  font-weight: 680;
  line-height: 32px;
}

.login-panel > p {
  margin-top: 4px;
  color: var(--muted);
}

.login-panel form {
  margin-top: 30px;
}

.login-panel label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 600;
}

.password-field {
  position: relative;
}

.password-field svg {
  position: absolute;
  top: 13px;
  left: 13px;
  width: 18px;
  color: var(--muted);
}

.password-field input {
  width: 100%;
  height: 44px;
  padding: 0 12px 0 42px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--surface);
}

.primary-command {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 44px;
  margin-top: 14px;
  padding: 0 14px 0 16px;
  border: 0;
  border-radius: 6px;
  color: white;
  background: var(--ink);
  font-weight: 620;
}

.primary-command:hover {
  background: #343437;
}

.primary-command svg {
  width: 18px;
}

.form-error {
  margin-top: 13px !important;
  color: var(--red);
  font-size: 13px;
  line-height: 18px;
}

.app {
  min-height: 100vh;
}

.app-header {
  position: fixed;
  z-index: 30;
  top: 0;
  right: 0;
  left: 0;
  display: flex;
  align-items: center;
  height: 60px;
  padding: 0 18px;
  border-bottom: 1px solid var(--line);
  background: rgb(255 255 255 / 90%);
  backdrop-filter: saturate(180%) blur(20px);
}

.brand {
  display: flex;
  align-items: center;
  min-width: 218px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 7px;
}

.brand-mark svg {
  width: 18px;
}

.brand-copy {
  display: grid;
  margin-left: 10px;
}

.brand-copy strong {
  font-size: 14px;
  font-weight: 680;
  line-height: 17px;
}

.brand-copy small {
  color: var(--muted);
  font-size: 11px;
  line-height: 14px;
}

.header-state {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
  font-weight: 550;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0 3px var(--amber-soft);
}

.live-dot.online {
  background: var(--green);
  box-shadow: 0 0 0 3px var(--green-soft);
}

.live-dot.offline {
  background: var(--red);
  box-shadow: 0 0 0 3px var(--red-soft);
}

.header-actions {
  display: flex;
  gap: 5px;
  margin-left: 16px;
}

.icon-button {
  display: grid;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  place-items: center;
}

.icon-button:hover {
  border-color: var(--line);
  color: var(--ink);
  background: var(--surface-muted);
}

.icon-button svg {
  width: 18px;
  height: 18px;
}

.icon-button.spinning svg {
  animation: spin 0.8s linear infinite;
}

.app-layout {
  display: grid;
  grid-template-columns: 218px minmax(0, 1fr);
  min-height: 100vh;
  padding-top: 60px;
}

.sidebar {
  position: fixed;
  z-index: 20;
  top: 60px;
  bottom: 0;
  left: 0;
  display: flex;
  width: 218px;
  flex-direction: column;
  padding: 18px 12px;
  border-right: 1px solid var(--line);
  background: #fbfbfc;
}

.sidebar nav {
  display: grid;
  gap: 3px;
}

.sidebar nav button,
.mobile-nav button {
  border: 0;
  color: var(--muted);
  background: transparent;
}

.sidebar nav button {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 40px;
  padding: 0 11px;
  border-radius: 6px;
  text-align: left;
}

.sidebar nav button:hover {
  color: var(--ink);
  background: var(--surface-strong);
}

.sidebar nav button.active {
  color: var(--ink);
  background: #e8e9ed;
  font-weight: 620;
}

.sidebar nav svg {
  width: 17px;
  margin-right: 11px;
}

.sidebar-footer {
  display: grid;
  gap: 6px;
  margin-top: auto;
  padding: 14px 11px 4px;
  color: var(--faint);
  font-size: 11px;
  line-height: 15px;
}

.mode-indicator {
  color: var(--blue);
  font-weight: 650;
}

.workspace {
  grid-column: 2;
  width: 100%;
  max-width: 1480px;
  min-width: 0;
  margin: 0 auto;
  padding: 38px clamp(24px, 4vw, 64px) 80px;
}

.initial-loader {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 220px;
  color: var(--muted);
  justify-content: center;
}

.loader-ring {
  width: 19px;
  height: 19px;
  border: 2px solid var(--line);
  border-top-color: var(--ink);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}

.page-header h1,
.page-header p {
  margin: 0;
}

.page-header h1 {
  font-size: 27px;
  font-weight: 680;
  line-height: 34px;
}

.page-header p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.header-stat {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 34px;
}

.summary-cell,
.metric-cell {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  box-shadow: var(--shadow-small);
}

.summary-cell {
  min-height: 112px;
  padding: 18px;
}

.summary-cell-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
}

.summary-cell-top span {
  overflow: hidden;
  font-size: 12px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.summary-cell-top svg {
  width: 17px;
  flex: 0 0 auto;
}

.summary-value {
  display: block;
  margin-top: 14px;
  font-size: 25px;
  font-weight: 680;
  line-height: 30px;
}

.summary-note {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.alert-stack {
  display: grid;
  gap: 8px;
  margin-bottom: 28px;
}

.alert-row {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 11px;
  padding: 12px 14px;
  border: 1px solid #efcc91;
  border-radius: 6px;
  color: #714200;
  background: var(--amber-soft);
}

.alert-row.critical {
  border-color: #edb8bc;
  color: #8a2027;
  background: var(--red-soft);
}

.alert-row svg {
  width: 17px;
  margin-top: 1px;
}

.alert-row strong,
.alert-row span {
  display: block;
}

.alert-row strong {
  font-size: 13px;
}

.alert-row span {
  margin-top: 2px;
  font-size: 12px;
  opacity: 0.82;
}

.section-band {
  margin-top: 36px;
}

.section-band:first-of-type {
  margin-top: 0;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 13px;
}

.section-title h2,
.section-title p {
  margin: 0;
}

.section-title h2 {
  font-size: 17px;
  font-weight: 670;
  line-height: 22px;
}

.section-title p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.host-header {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.host-icon {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--muted);
  background: var(--surface);
  place-items: center;
}

.host-icon svg {
  width: 17px;
}

.host-copy {
  min-width: 0;
}

.host-copy h2,
.host-copy p {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-badge,
.risk-badge,
.type-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--muted);
  background: var(--surface);
  font-size: 11px;
  font-weight: 620;
  white-space: nowrap;
}

.status-badge.online,
.status-badge.complete {
  border-color: #b9dfca;
  color: var(--green);
  background: var(--green-soft);
}

.status-badge.offline,
.status-badge.critical {
  border-color: #edb8bc;
  color: var(--red);
  background: var(--red-soft);
}

.status-badge.waiting,
.status-badge.in-progress {
  border-color: #efcc91;
  color: var(--amber);
  background: var(--amber-soft);
}

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

.metric-cell {
  min-height: 96px;
  padding: 14px;
}

.metric-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.metric-label svg {
  width: 15px;
}

.metric-value {
  display: block;
  margin-top: 9px;
  font-size: 18px;
  font-weight: 670;
}

.progress-track {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: 5px;
  margin-top: 11px;
  border-radius: 3px;
  background: var(--surface-strong);
}

.progress-fill {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--blue);
  transition: width 260ms ease;
}

.progress-fill.good { background: var(--green); }
.progress-fill.warn { background: #d17a00; }
.progress-fill.bad { background: var(--red); }

.data-panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  box-shadow: var(--shadow-small);
}

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

.data-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.data-table th {
  height: 38px;
  padding: 0 13px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  background: var(--surface-muted);
  font-size: 11px;
  font-weight: 650;
  text-align: left;
}

.data-table td {
  height: 52px;
  padding: 8px 13px;
  border-bottom: 1px solid #ececef;
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.data-table tbody tr:last-child td {
  border-bottom: 0;
}

.data-table tbody tr:hover td {
  background: #fafafd;
}

.service-name {
  display: flex;
  align-items: center;
  min-width: 0;
}

.service-dot {
  width: 8px;
  height: 8px;
  margin-right: 9px;
  border-radius: 50%;
  background: var(--red);
}

.service-dot.active { background: var(--green); }

.service-copy {
  min-width: 0;
}

.service-copy strong,
.service-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.service-copy strong {
  font-weight: 620;
}

.service-copy small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.row-action {
  display: grid;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 5px;
  color: var(--muted);
  background: transparent;
  place-items: center;
}

.row-action:hover {
  border-color: var(--line);
  color: var(--ink);
  background: var(--surface-muted);
}

.row-action svg {
  width: 16px;
}

.activity-list,
.workflow-list,
.migration-list {
  display: grid;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  box-shadow: var(--shadow-small);
}

.activity-row,
.workflow-row,
.migration-row {
  border-bottom: 1px solid #ececef;
}

.activity-row:last-child,
.workflow-row:last-child,
.migration-row:last-child {
  border-bottom: 0;
}

.activity-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) 92px;
  align-items: center;
  gap: 22px;
  min-height: 68px;
  padding: 12px 15px;
}

.activity-row strong,
.activity-row small {
  display: block;
}

.activity-row strong {
  font-size: 13px;
}

.activity-row small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.activity-progress span:first-child {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 11px;
}

.empty-state {
  display: grid;
  min-height: 116px;
  padding: 20px;
  color: var(--muted);
  font-size: 13px;
  place-items: center;
  text-align: center;
}

.empty-state svg {
  width: 22px;
  margin-bottom: 8px;
  color: var(--faint);
}

.filter-toolbar {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 18px;
}

.search-field {
  position: relative;
  width: min(100%, 360px);
}

.search-field svg {
  position: absolute;
  top: 10px;
  left: 11px;
  width: 16px;
  color: var(--muted);
}

.search-field input,
.select-control {
  height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--surface);
}

.search-field input {
  width: 100%;
  padding: 0 12px 0 36px;
}

.select-control {
  min-width: 150px;
  padding: 0 32px 0 11px;
}

.workflow-group {
  margin-top: 30px;
}

.workflow-group:first-of-type {
  margin-top: 0;
}

.workflow-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.2fr) minmax(260px, 2fr) 120px 110px;
  align-items: center;
  gap: 20px;
  min-height: 72px;
  padding: 11px 15px;
}

.workflow-name strong,
.workflow-name code,
.workflow-summary {
  display: block;
}

.workflow-name strong {
  font-size: 13px;
}

.workflow-name code,
.code-path {
  margin-top: 3px;
  overflow: hidden;
  color: var(--muted);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workflow-summary {
  color: var(--muted);
  font-size: 12px;
  line-height: 17px;
}

.risk-badge.critical,
.risk-badge.destructive {
  border-color: #edb8bc;
  color: var(--red);
  background: var(--red-soft);
}

.risk-badge.writes,
.risk-badge.external-api,
.risk-badge.public-deploy {
  border-color: #efcc91;
  color: var(--amber);
  background: var(--amber-soft);
}

.risk-badge.read-only {
  border-color: #b9dfca;
  color: var(--green);
  background: var(--green-soft);
}

.log-toolbar {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 12px;
}

.log-toolbar .select-control {
  min-width: 200px;
}

.log-toolbar .icon-button {
  border-color: var(--line);
  background: var(--surface);
}

.follow-control {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
}

.terminal {
  min-height: 500px;
  max-height: calc(100vh - 240px);
  overflow: auto;
  padding: 18px;
  border: 1px solid #0d0f12;
  border-radius: 7px;
  color: var(--terminal-ink);
  background: var(--terminal);
  box-shadow: var(--shadow-small);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 11px;
  line-height: 18px;
  white-space: pre-wrap;
  word-break: break-word;
}

.terminal.empty {
  display: grid;
  color: #8e939c;
  place-items: center;
  text-align: center;
}

.audit-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  overflow: hidden;
  margin-bottom: 26px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  box-shadow: var(--shadow-small);
}

.audit-cell {
  min-width: 0;
  padding: 14px;
  border-right: 1px solid var(--line);
}

.audit-cell:last-child {
  border-right: 0;
}

.audit-cell strong,
.audit-cell span {
  display: block;
}

.audit-cell strong {
  font-size: 18px;
}

.audit-cell span {
  margin-top: 3px;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.code-item {
  min-width: 0;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  box-shadow: var(--shadow-small);
}

.code-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.code-item strong {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.code-item p {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 16px;
}

.migration-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 110px;
  align-items: center;
  gap: 26px;
  margin-bottom: 20px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  box-shadow: var(--shadow-small);
}

.migration-summary h2,
.migration-summary p {
  margin: 0;
}

.migration-summary h2 {
  font-size: 16px;
}

.migration-summary p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 17px;
}

.migration-percent {
  text-align: right;
}

.migration-percent strong,
.migration-percent span {
  display: block;
}

.migration-percent strong {
  font-size: 24px;
}

.migration-percent span {
  color: var(--muted);
  font-size: 10px;
}

.migration-row {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 92px;
  align-items: center;
  gap: 12px;
  min-height: 70px;
  padding: 11px 14px;
}

.migration-icon {
  display: grid;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: var(--muted);
  background: var(--surface-strong);
  place-items: center;
}

.migration-icon.complete {
  color: var(--green);
  background: var(--green-soft);
}

.migration-icon.in-progress,
.migration-icon.waiting {
  color: var(--amber);
  background: var(--amber-soft);
}

.migration-icon svg {
  width: 14px;
}

.migration-copy strong,
.migration-copy small {
  display: block;
}

.migration-copy strong {
  font-size: 13px;
}

.migration-copy small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  line-height: 16px;
}

.mobile-nav {
  display: none;
}

.toast-region {
  position: fixed;
  z-index: 100;
  right: 18px;
  bottom: 18px;
  display: grid;
  width: min(360px, calc(100vw - 36px));
  gap: 8px;
}

.toast {
  padding: 11px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  color: var(--ink);
  background: var(--surface);
  box-shadow: var(--shadow-large);
  font-size: 12px;
}

.toast.error {
  border-color: #edb8bc;
  color: var(--red);
}

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

  .workflow-row {
    grid-template-columns: minmax(180px, 1fr) minmax(220px, 1.6fr) 110px;
  }

  .workflow-row > :last-child {
    display: none;
  }

  .audit-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .audit-cell:nth-child(3) {
    border-right: 0;
  }

  .audit-cell:nth-child(n + 4) {
    border-top: 1px solid var(--line);
  }
}

@media (max-width: 760px) {
  .app-header {
    height: 56px;
    padding: 0 12px;
  }

  .brand {
    min-width: 0;
  }

  .brand-copy small,
  .header-state span:last-child {
    display: none;
  }

  .brand-mark {
    width: 32px;
    height: 32px;
  }

  .header-state {
    margin-left: auto;
  }

  .header-actions {
    margin-left: 10px;
  }

  .app-layout {
    display: block;
    padding-top: 56px;
  }

  .sidebar {
    display: none;
  }

  .workspace {
    width: 100%;
    padding: 24px 14px 94px;
  }

  .mobile-nav {
    position: fixed;
    z-index: 40;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    min-height: 64px;
    padding: 5px 5px max(5px, env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    background: rgb(255 255 255 / 94%);
    backdrop-filter: saturate(180%) blur(20px);
  }

  .mobile-nav button {
    display: grid;
    min-width: 0;
    padding: 4px 2px;
    border-radius: 6px;
    place-items: center;
  }

  .mobile-nav button.active {
    color: var(--blue);
    background: var(--blue-soft);
  }

  .mobile-nav svg {
    width: 18px;
  }

  .mobile-nav span {
    margin-top: 2px;
    overflow: hidden;
    max-width: 100%;
    font-size: 9px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .page-header {
    align-items: flex-start;
    margin-bottom: 22px;
  }

  .page-header h1 {
    font-size: 23px;
    line-height: 29px;
  }

  .header-stat {
    display: none;
  }

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

  .summary-cell {
    min-height: 98px;
    padding: 13px;
  }

  .summary-value {
    margin-top: 10px;
    font-size: 21px;
  }

  .metric-cell {
    min-height: 88px;
    padding: 12px;
  }

  .section-band {
    margin-top: 30px;
  }

  .activity-row {
    grid-template-columns: minmax(0, 1fr) 74px;
    gap: 12px;
  }

  .activity-progress {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .filter-toolbar,
  .log-toolbar {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .search-field,
  .log-toolbar .select-control {
    width: 100%;
    min-width: 0;
  }

  .workflow-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 11px;
    min-height: 78px;
  }

  .workflow-summary,
  .workflow-row > :last-child {
    display: none;
  }

  .code-grid {
    grid-template-columns: 1fr;
  }

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

  .audit-cell,
  .audit-cell:nth-child(3) {
    border-right: 1px solid var(--line);
  }

  .audit-cell:nth-child(even) {
    border-right: 0;
  }

  .audit-cell:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }

  .migration-summary {
    grid-template-columns: minmax(0, 1fr) 70px;
    gap: 12px;
    padding: 15px;
  }

  .migration-row {
    grid-template-columns: 30px minmax(0, 1fr);
  }

  .migration-row > :last-child {
    display: none;
  }

  .terminal {
    min-height: 430px;
    max-height: none;
  }

  .login-panel {
    padding: 28px 24px;
  }
}

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

  .summary-cell {
    min-height: 88px;
  }

  .summary-value {
    margin-top: 7px;
  }

  .audit-strip {
    grid-template-columns: 1fr;
  }

  .audit-cell,
  .audit-cell:nth-child(3),
  .audit-cell:nth-child(even) {
    border-right: 0;
    border-top: 1px solid var(--line);
  }

  .audit-cell:first-child {
    border-top: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
