:root {
  color-scheme: light;
  --bg: #f6f8fb;
  --panel: #ffffff;
  --line: #e9edf3;
  --line-strong: #dce2eb;
  --text: #1e293b;
  --muted: #758197;
  --brand: #5267e8;
  --brand-strong: #4053ce;
  --brand-soft: #eef0ff;
  --success: #208766;
  --warn: #a86c16;
  --danger: #cf4c5a;
  --radius: 12px;
  --shadow-soft: 0 2px 5px rgb(34 49 76 / 2%);
}
* {
  box-sizing: border-box;
}
html {
  min-height: 100%;
  scroll-padding-top: 24px;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font:
    14px/1.6 -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    'PingFang SC',
    'Microsoft YaHei',
    sans-serif;
  -webkit-font-smoothing: antialiased;
}
a {
  color: var(--brand-strong);
  text-decoration: none;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea,
summary,
[tabindex] {
  -webkit-tap-highlight-color: transparent;
}
button:focus-visible,
a:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid #bdc5ff;
  outline-offset: 3px;
}
[hidden] {
  display: none !important;
}
svg {
  display: block;
}
.skip-link {
  position: fixed;
  top: -60px;
  left: 20px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 8px;
  color: white;
  background: var(--brand);
}
.skip-link:focus {
  top: 12px;
}
.app-shell {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: 24px 16px 16px;
  background: white;
  border-right: 1px solid var(--line);
  z-index: 40;
  overflow-y: auto;
}
.sidebar-brand,
.auth-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--text);
}
.sidebar-brand {
  padding: 0 10px 18px;
}
.brand-mark {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 38px;
  height: 40px;
  color: white;
  background: var(--brand);
  border-radius: 11px;
}
.brand-mark svg {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linejoin: round;
  stroke-linecap: round;
}
.brand-copy {
  min-width: 0;
}
.brand-copy strong {
  display: block;
  font-size: 17px;
  letter-spacing: -0.5px;
  overflow-wrap: anywhere;
}
.brand-copy small {
  display: block;
  font-size: 9px;
  color: var(--muted);
  letter-spacing: 1.65px;
  margin-top: 1px;
}
.sidebar-nav {
  display: grid;
  gap: 3px;
}
.nav-group-label {
  margin: 12px 12px 5px;
  color: #8b95a6;
  font-size: 11px;
  letter-spacing: 1px;
}
.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 40px;
  padding: 9px 13px;
  color: #68758b;
  border-radius: 8px;
  transition:
    background-color 0.15s,
    color 0.15s;
  font-size: 13px;
}
.nav-link:hover {
  background: #f6f7fb;
  color: var(--text);
}
.nav-link.is-active {
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-weight: 650;
}
.nav-icon {
  flex-shrink: 0;
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.nav-active-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--brand);
  margin-left: auto;
}
.sidebar-footer {
  margin-top: auto;
  padding-top: 18px;
}
.sidebar-details {
  margin: 0 4px 13px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  font-size: 12px;
  color: var(--muted);
}
.sidebar-details summary {
  display: flex;
  align-items: center;
  gap: 9px;
  list-style: none;
  cursor: pointer;
}
.sidebar-details summary::-webkit-details-marker {
  display: none;
}
.sidebar-details p {
  margin: 12px 0 8px;
  overflow-wrap: anywhere;
}
.details-chevron {
  margin-left: auto;
  font-size: 15px;
}
.system-dot {
  display: inline-block;
  flex-shrink: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #8e9bb0;
}
.logout-form {
  margin: 0;
  border-top: 1px solid var(--line);
  padding-top: 8px;
}
.logout-button {
  justify-content: flex-start;
  width: 100%;
  gap: 12px;
  color: var(--muted);
  background: transparent;
  border: 0;
  font-weight: 500;
}
.logout-button:hover {
  color: var(--text);
  background: #f6f7fb;
}
.content {
  min-width: 0;
}
.workspace-bar {
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 15px;
  justify-content: space-between;
  padding: 0 36px;
  border-bottom: 1px solid var(--line);
  background: white;
}
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 13px;
  font-size: 12px;
  color: #929bad;
}
.breadcrumb strong {
  font-weight: 500;
  color: #5c687c;
}
.workspace-status[data-worker-state='offline'] .system-dot,
.workspace-status[data-worker-state='error'] .system-dot {
  background: var(--danger);
  box-shadow: none;
}

.workspace-status[data-worker-state='unknown'] .system-dot {
  background: var(--muted);
  box-shadow: none;
}

.workspace-status {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 11px;
  color: var(--muted);
}
.workspace-status-text {
  color: #526079;
}
.workspace-status:hover {
  color: var(--brand);
}
.page-container {
  width: 100%;
  max-width: 1600px;
  margin: auto;
  padding: 30px 36px 20px;
}
.page-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 26px;
}
.eyebrow {
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 1.7px;
  color: #8c98ac;
}
.page-copy {
  min-width: 0;
}
.page-copy h2 {
  margin: 5px 0 7px;
  font-size: 28px;
  line-height: 1.3;
  font-weight: 650;
  letter-spacing: -0.6px;
}
.page-copy p {
  margin: 0;
  font-size: 12px;
  max-width: 700px;
}
.hero-meta {
  display: flex;
  gap: 20px;
  flex-shrink: 0;
}
.meta-chip {
  display: grid;
  gap: 4px;
  max-width: 180px;
}
.meta-chip + .meta-chip {
  padding-left: 20px;
  border-left: 1px solid var(--line-strong);
}
.meta-chip > span {
  color: var(--muted);
  font-size: 11px;
}
.meta-chip strong {
  font-size: 12px;
  font-weight: 550;
  overflow-wrap: anywhere;
}
.muted,
.tip {
  color: var(--muted);
}
.tip {
  margin-top: 16px;
}
.grid,
.metric-grid,
.summary-strip,
.module-grid {
  display: grid;
  gap: 18px;
}
.grid {
  margin-bottom: 20px;
}
.grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.metric-grid,
.summary-strip {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  margin-bottom: 22px;
}
.metric-card,
.summary-card {
  position: relative;
  min-width: 0;
  padding: 20px 22px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}
.metric-card > span,
.summary-card > span {
  display: block;
  font-size: 12px;
  color: #707d91;
}
.metric-card > strong,
.summary-card > strong {
  display: block;
  font-size: 30px;
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -1px;
  margin-top: 10px;
  font-variant-numeric: tabular-nums;
}
.metric-card > small,
.summary-card > small {
  display: block;
  font-size: 11px;
  color: #8a95a7;
  margin-top: 12px;
  line-height: 1.65;
}
.metric-card::after {
  content: '';
  position: absolute;
  right: 22px;
  top: 24px;
  width: 8px;
  height: 8px;
  border-radius: 3px;
  background: #d6dcff;
}
.metric-card:nth-child(2)::after {
  background: #c8eadf;
}
.metric-card:nth-child(4)::after {
  background: #d7e8fb;
}
.metric-card.danger::after {
  background: #f4d7d9;
}
.metric-card.danger strong,
.summary-card.danger strong {
  color: var(--danger);
}
.action-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
}
.panel {
  padding: 22px;
  margin-bottom: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  box-shadow: var(--shadow-soft);
  min-width: 0;
}
.grid > .panel {
  margin-bottom: 0;
}
.panel-toolbar,
.timeline-head,
.form-actions,
.inline-field,
.actions,
.kv-list li {
  display: flex;
  align-items: center;
  gap: 12px;
}
.panel-toolbar,
.timeline-head {
  justify-content: space-between;
}
.panel-toolbar {
  margin-bottom: 20px;
  gap: 16px;
  flex-wrap: wrap;
}
.panel-toolbar h3 {
  font-size: 15px;
  font-weight: 650;
  margin: 0 0 5px;
  letter-spacing: -0.2px;
}
.panel-toolbar p {
  margin: 0;
  font-size: 12px;
  max-width: 760px;
}
.panel-toolbar > div:first-child {
  min-width: 0;
}
.panel > .inline-note {
  margin-bottom: 14px;
}
.panel > .field-hint {
  margin-bottom: 14px;
}
.button,
button,
.ghost-link,
.link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  min-height: 38px;
  padding: 8px 15px;
  border: 1px solid transparent;
  border-radius: 7px;
  font-weight: 550;
  font-size: 12px;
  line-height: 1.5;
  cursor: pointer;
  text-decoration: none;
  transition:
    background-color 0.15s,
    border-color 0.15s,
    color 0.15s;
}
.button,
button {
  background: var(--brand);
  color: white;
}
.button:hover,
button:hover {
  background: var(--brand-strong);
}
.button:disabled,
button:disabled,
.link-button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.button.ghost,
.button.secondary {
  border-color: var(--line-strong);
  background: white;
  color: #546177;
}
.button.ghost:hover,
.button.secondary:hover {
  color: var(--brand-strong);
  border-color: #c1c9f5;
  background: #f9faff;
}
.ghost-link {
  color: var(--brand-strong);
  background: transparent;
  padding-left: 8px;
  padding-right: 8px;
}
.ghost-link:hover {
  background: var(--brand-soft);
}
.link-button,
.link-button.danger-soft {
  color: var(--danger);
  background: #fff4f4;
  border-color: #fce8ea;
}
.link-button:hover,
.link-button.danger-soft:hover {
  background: #ffe9ec;
  border-color: #f7cdd2;
}
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  min-height: 25px;
  padding: 3px 9px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 550;
  line-height: 1.5;
  white-space: nowrap;
  border: 1px solid transparent;
}
.status-pill::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}
.tone-success {
  color: #287c62;
  background: #edf8f2;
  border-color: #dff1e6;
}
.tone-warn {
  color: #9b6a20;
  background: #fff8e9;
  border-color: #fbefd3;
}
.tone-danger {
  color: #bf4b5a;
  background: #fff0f2;
  border-color: #fbe1e6;
}
.tone-neutral {
  color: #738097;
  background: #f1f4f8;
  border-color: #e7ecf3;
}
.tone-text-success {
  color: var(--success);
}
.tone-text-warn {
  color: var(--warn);
}
.tone-text-danger {
  color: var(--danger);
}
.tone-text-neutral {
  color: #647188;
}
.flash-banner,
.flash,
.inline-note,
.logic-chip {
  padding: 12px 14px;
  border: 1px solid #e3e8fd;
  border-radius: 8px;
  font-size: 12px;
  color: #66729d;
  background: #f5f7ff;
  overflow-wrap: anywhere;
}
.flash-banner {
  margin-bottom: 20px;
}
.flash-banner.tone-success {
  color: var(--success);
  background: #edf8f2;
  border-color: #dff1e6;
}
.flash-banner.tone-warn {
  color: var(--warn);
  background: #fff8e9;
  border-color: #fbefd3;
}
.flash-banner.tone-danger {
  color: var(--danger);
  background: #fff0f2;
  border-color: #fbe1e6;
}
.flash.error {
  color: #ad4050;
  background: #fff3f5;
  border-color: #f6dde2;
}
.inline-note[data-tone='success'] {
  color: #397c63;
  background: #f1faf5;
  border-color: #e2f2e7;
}
.inline-note[data-tone='warn'] {
  color: #9b752f;
  background: #fffaf0;
  border-color: #f5ead4;
}
.inline-note[data-tone='danger'] {
  color: #ad4050;
  background: #fff3f5;
  border-color: #f6dde2;
}
.form-intro {
  margin: 0 0 16px;
}
.attention-list,
.timeline-list,
.plain-list,
.kv-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.attention-list,
.timeline-list {
  display: grid;
  gap: 12px;
}
.attention-item,
.timeline-item {
  padding: 14px;
  border-radius: 8px;
  background: #fafbfd;
  border: 1px solid var(--line);
}
.attention-item strong,
.timeline-item strong {
  display: block;
  margin: 7px 0 5px;
  font-size: 12px;
  font-weight: 600;
}
.timeline-head strong {
  margin: 0;
}
.attention-item p,
.timeline-item p,
.module-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}
.timeline-item p {
  margin-top: 7px;
}
.empty-state {
  text-align: center;
  padding: 30px 18px;
  min-height: 160px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  background: #fafbfd;
  border: 1px dashed var(--line-strong);
}
.empty-state::before {
  content: '✓';
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #eaf6f0;
  color: #369470;
  margin-bottom: 12px;
  font-size: 16px;
}
.empty-state strong {
  font-size: 13px;
  font-weight: 550;
}
.empty-state p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
}
.fold-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fafbfd;
  overflow: hidden;
}
.fold-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 15px;
  cursor: pointer;
  list-style: none;
}
.fold-summary::-webkit-details-marker {
  display: none;
}
.fold-copy {
  min-width: 0;
  flex: 1 1 auto;
}
.fold-copy strong {
  display: block;
  font-size: 12px;
  font-weight: 550;
  margin-bottom: 4px;
}
.fold-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fold-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.fold-count,
.fold-trigger {
  font-size: 11px;
  color: var(--muted);
}
.fold-trigger::before {
  content: '展开 ↓';
}
.fold-card[open] .fold-trigger::before {
  content: '收起 ↑';
}
.timeline-list.compact {
  padding: 0 14px 14px;
}
.module-grid {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
}
.module-card {
  display: grid;
  justify-items: start;
  align-content: start;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fcfdff;
}
.module-name {
  font-size: 13px;
  font-weight: 600;
}
.module-card small {
  color: #919bad;
  font-size: 11px;
}
.form-help {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 11px;
}
.form-help summary {
  cursor: pointer;
  color: #7a88a0;
}
.form-help p {
  margin: 10px 0 0;
  padding: 12px;
  border-radius: 6px;
  background: #f8fafd;
  line-height: 1.8;
}
.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  scrollbar-width: thin;
  scrollbar-color: #cbd3e0 #f7f9fc;
  background: white;
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.table-wrap .data-table:has(.table-empty) {
  min-width: 0;
}
.data-table:has(.table-empty) thead {
  display: none;
}
.data-table.is-wide {
  min-width: 850px;
}
.data-table.is-xwide {
  min-width: 1100px;
}
.data-table th,
.data-table td {
  padding: 14px 15px;
  text-align: left;
  vertical-align: middle;
  border-bottom: 1px solid var(--line);
}
.data-table th {
  font-size: 11px;
  font-weight: 550;
  color: #8490a3;
  background: #f8fafc;
  white-space: nowrap;
}
.data-table td {
  color: #58667c;
}
.data-table td strong {
  font-weight: 550;
  color: #344258;
}
.data-table td .text-small {
  margin-top: 4px;
}
.data-table tbody tr:last-child td {
  border-bottom: 0;
}
.data-table tbody tr:hover td {
  background: #fafbfe;
}
.data-table td.actions {
  display: table-cell;
  min-width: 175px;
}
.data-table td.actions > * {
  display: inline-flex;
  vertical-align: middle;
  margin: 2px 3px 2px 0;
}
.data-table .actions .button,
.data-table .actions .ghost-link,
.data-table .actions .link-button {
  min-height: 30px;
  padding: 5px 9px;
  font-size: 11px;
  border-radius: 5px;
  white-space: nowrap;
}
.data-table .table-empty {
  text-align: center;
  padding: 42px 24px;
  color: #8a95a8;
  font-size: 12px;
}
.data-table .table-empty::before {
  content: '';
  display: block;
  width: 30px;
  height: 23px;
  margin: 0 auto 13px;
  border: 1.5px solid #cbd3e4;
  border-radius: 5px;
  background: linear-gradient(#dfe5f0, #dfe5f0) center 8px / 14px 2px no-repeat;
}
.instances-grid,
.grid.two.instances-grid {
  grid-template-columns: minmax(0, 1fr);
}
.launch-filter-form {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 12px;
  margin-bottom: 20px;
}
.launch-filter-form > label:first-of-type {
  flex: 2 1 220px;
}
.launch-filter-form > label {
  flex: 1 1 140px;
}
.launch-inline-form {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 12px;
  margin: 16px 0;
}
.launch-inline-form > label {
  flex: 1 1 240px;
}
.launch-copy-rule {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.launch-copy-rule > summary,
.launch-copy-template > summary {
  cursor: pointer;
  color: var(--brand);
  font-size: 12px;
}
.launch-copy-template[open] {
  min-width: 180px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.launch-copy-template > form {
  margin-top: 10px;
}
.launch-row-actions {
  min-width: 260px;
  gap: 8px;
}
.launch-spec-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 24px;
  margin: 0 0 20px;
}
.launch-spec-grid > div {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  min-width: 0;
}
.launch-spec-grid > .full {
  grid-column: 1 / -1;
}
.launch-spec-grid dt {
  margin-bottom: 6px;
  font-size: 11px;
  color: var(--muted);
}
.launch-spec-grid dd {
  margin: 0;
  font-size: 13px;
  font-weight: 550;
  overflow-wrap: anywhere;
}
.launch-preview {
  border-top: 3px solid #9bdbc2;
}
.launch-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  padding: 0;
  margin: 0 0 24px;
  list-style: none;
  color: var(--muted);
  font-size: 12px;
}
.launch-steps .is-current {
  color: var(--brand);
  font-weight: 600;
}
.launch-selected-template {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px;
  margin: 18px 0;
  background: var(--bg);
  border-radius: 8px;
  font-size: 12px;
  overflow-wrap: anywhere;
}
.launch-selected-template span {
  color: var(--muted);
}
@media (max-width: 640px) {
  .launch-spec-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .launch-filter-form > label {
    flex-basis: 100%;
  }
  .launch-inline-form > button {
    width: 100%;
  }
}
.form-shell {
  scroll-margin-top: 20px;
  border-top: 3px solid #cbd3ff;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.form-grid .full {
  grid-column: 1 / -1;
}
label {
  display: grid;
  gap: 8px;
  font-weight: 550;
  font-size: 12px;
  color: #536078;
}
input,
textarea,
select {
  width: 100%;
  min-width: 0;
  min-height: 41px;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: white;
  color: var(--text);
  font-size: 13px;
  transition:
    box-shadow 0.15s,
    border-color 0.15s;
}
input::placeholder,
textarea::placeholder {
  color: #a4adbd;
}
input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: #9da9f2;
  box-shadow: 0 0 0 3px #eef0ff;
}
textarea {
  min-height: 104px;
  resize: vertical;
  line-height: 1.7;
}
select {
  padding-right: 30px;
}
.form-stack {
  display: grid;
  gap: 12px;
}
.inline-field {
  align-items: stretch;
  min-width: 0;
}
.inline-field > :first-child {
  flex: 1 1 auto;
  min-width: 0;
}
.inline-button {
  flex-shrink: 0;
}
.checkbox-row {
  display: flex;
  align-items: center;
  gap: 9px;
}
.checkbox-row input {
  width: 16px;
  height: 16px;
  min-height: 0;
  accent-color: var(--brand);
}
.form-actions {
  border-top: 1px solid var(--line);
  padding-top: 20px;
}
.actions {
  flex-wrap: wrap;
}
.actions form {
  margin: 0;
}
.field-hint {
  margin-top: 6px;
  font-size: 11px;
  font-weight: 400;
  line-height: 1.75;
  color: #8793a5;
  overflow-wrap: anywhere;
}
.kv-list li {
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}
.kv-list li > span {
  color: var(--muted);
  flex-shrink: 0;
}
.kv-list li strong {
  font-weight: 500;
  text-align: right;
  overflow-wrap: anywhere;
}
.kv-list li:last-child {
  border-bottom: 0;
}
.text-small {
  font-size: 11px;
}
.text-mono {
  font-family: 'Cascadia Code', Consolas, monospace;
  font-size: 12px;
}
code {
  padding: 2px 5px;
  border-radius: 4px;
  background: #f1f3f9;
  overflow-wrap: anywhere;
}
.badge {
  display: inline-flex;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #f8faff;
  font-size: 11px;
}
.wide {
  width: 100%;
}
.copy-chip {
  min-height: 28px;
  padding: 3px 5px;
  margin-left: -5px;
  background: transparent;
  color: #536994;
  border: 0;
  border-radius: 4px;
  font-family: 'Cascadia Code', Consolas, monospace;
  font-size: 12px;
  font-weight: 400;
  cursor: copy;
}
.copy-chip:hover {
  background: var(--brand-soft);
  color: var(--brand-strong);
}
.copy-chip__value {
  user-select: none;
}
.copy-toast {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 99;
  max-width: 160px;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: white;
  color: #41516c;
  box-shadow: 0 4px 16px rgb(29 44 78 / 12%);
  font-size: 11px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, calc(-100% - 12px));
  transition: opacity 0.15s;
}
.copy-toast.is-visible {
  opacity: 1;
}
.copy-toast.is-error {
  color: var(--danger);
  border-color: #f6dade;
}
.page-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: #9aa5b6;
  font-size: 10px;
  padding: 3px 0 6px;
}
.menu-toggle,
.sidebar-backdrop {
  display: none;
}
.auth-page {
  background: white;
}
.auth-page .shell {
  min-height: 100vh;
}
.auth-page .flash-banner {
  position: absolute;
  left: 50%;
  top: 20px;
  transform: translateX(-50%);
  z-index: 10;
}
.auth-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 46% minmax(0, 1fr);
}
.auth-intro {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #f1f4fc;
  padding: 44px 12%;
  border-right: 1px solid #e8edf8;
}
.auth-intro::after {
  content: '';
  position: absolute;
  width: 460px;
  height: 460px;
  right: -340px;
  bottom: -140px;
  border: 1px solid #e4e9f8;
  border-radius: 50%;
  box-shadow:
    0 0 0 65px #f4f6fc,
    0 0 0 66px #e8edf8;
  pointer-events: none;
}
.auth-brand {
  position: relative;
  z-index: 1;
  gap: 12px;
}
.auth-brand strong {
  font-size: 19px;
  font-weight: 600;
}
.auth-intro-copy {
  margin: auto 0;
  padding: 65px 0 42px;
}
.auth-intro .eyebrow {
  color: #7d8aba;
  font-size: 10px;
  letter-spacing: 1.5px;
}
.auth-intro h1 {
  margin: 20px 0 18px;
  font-size: clamp(32px, 3.6vw, 52px);
  letter-spacing: -1.5px;
  line-height: 1.4;
  font-weight: 600;
  color: #26395d;
}
.auth-intro-copy > p {
  margin: 0;
  color: #8090ad;
  font-size: 14px;
  line-height: 1.9;
}
.auth-illustration {
  position: relative;
  height: 240px;
  width: 100%;
  max-width: 370px;
  margin-top: 34px;
}
.cloud-orbit {
  position: absolute;
  width: 230px;
  height: 130px;
  border: 1px dashed #cfd8ed;
  transform: rotate(-26deg);
  left: 26px;
  top: 38px;
  border-radius: 50%;
}
.orbit-two {
  transform: rotate(26deg);
  border-color: #dce3f2;
}
.cloud-center {
  position: absolute;
  width: 70px;
  height: 76px;
  display: grid;
  place-items: center;
  left: 112px;
  top: 55px;
  border-radius: 20px;
  background: white;
  box-shadow: 0 8px 30px #dce3f3;
  color: #8492ea;
  transform: rotate(-5deg);
}
.cloud-center svg {
  width: 42px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.cloud-node {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 10px;
  background: white;
  border: 1px solid #e6ebf7;
  box-shadow: 0 6px 18px rgb(66 82 131 / 4%);
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 12px;
  color: #536383;
}
.node-linode {
  top: 20px;
  left: 0;
}
.node-aws {
  top: 124px;
  left: 185px;
}
.provider-dot {
  width: 9px;
  height: 9px;
  border-radius: 3px;
}
.linode-dot {
  background: #81c6aa;
}
.aws-dot {
  background: #ebbe77;
}
.node-check {
  margin-left: 8px;
  color: #a0c9b5;
}
.cloud-caption {
  position: absolute;
  bottom: 10px;
  left: 14px;
  font-size: 11px;
  color: #97a3ba;
}
.cloud-caption span {
  padding: 0 12px;
  color: #bac3d7;
}
.auth-intro-footer {
  position: relative;
  z-index: 1;
  margin-top: auto;
  font-size: 9px;
  letter-spacing: 1.7px;
  color: #9da9c0;
}
.auth-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 50px 12%;
  position: relative;
}
.auth-card {
  width: 100%;
  max-width: 380px;
  margin: auto;
  padding: 45px 0;
}
.auth-step {
  color: var(--brand);
  font-size: 12px;
  margin-bottom: 13px;
  font-weight: 550;
}
.auth-card h2 {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.8px;
  line-height: 1.4;
  margin: 0 0 10px;
}
.auth-card > p {
  font-size: 12px;
  margin: 0 0 30px;
}
.auth-card .flash {
  margin-bottom: 22px;
}
.auth-form {
  gap: 10px;
}
.auth-form > label:not(:first-of-type) {
  margin-top: 10px;
}
.auth-form input {
  height: 46px;
}
.password-field {
  position: relative;
}
.password-field input {
  padding-right: 59px;
}
.password-toggle {
  position: absolute;
  right: 6px;
  top: 6px;
  min-height: 34px;
  padding: 7px 9px;
  color: #8b96ac;
  background: transparent;
  font-size: 11px;
}
.password-toggle:hover {
  color: var(--brand);
  background: #f3f5fc;
}
.auth-field-note {
  font-size: 11px;
  color: #929db0;
  margin: 2px 0 0;
  line-height: 1.8;
}
.auth-submit {
  width: 100%;
  min-height: 45px;
  justify-content: space-between;
  padding: 10px 17px;
  margin-top: 15px;
  font-size: 13px;
}
.auth-submit span {
  font-size: 19px;
  line-height: 1;
  font-weight: 400;
}
.auth-card .auth-footer-note {
  margin: 23px 0 0;
  color: #9ba5b5;
  font-size: 11px;
  text-align: center;
}
.auth-panel-footer {
  text-align: center;
  color: #b0b8c7;
  font-size: 10px;
  letter-spacing: 2px;
}
@media (min-width: 1600px) {
  .page-container {
    padding-top: 38px;
  }
  .page-hero {
    margin-bottom: 32px;
  }
}
@media (max-width: 1200px) {
  .app-shell {
    grid-template-columns: 212px minmax(0, 1fr);
  }
  .sidebar {
    padding-left: 12px;
    padding-right: 12px;
  }
  .workspace-bar {
    padding: 0 24px;
  }
  .page-container {
    padding: 25px 24px 18px;
  }
  .page-hero {
    align-items: flex-start;
    gap: 20px;
  }
  .hero-meta {
    gap: 12px;
  }
  .meta-chip {
    max-width: 120px;
  }
  .meta-chip + .meta-chip {
    padding-left: 12px;
  }
  .metric-card,
  .summary-card {
    padding: 18px;
  }
  .metric-card::after {
    right: 18px;
  }
  .auth-intro {
    padding-left: 12%;
    padding-right: 8%;
  }
  .auth-panel {
    padding-left: 12%;
    padding-right: 12%;
  }
}
@media (max-width: 1024px) {
  .page-hero {
    display: block;
  }
  .hero-meta {
    margin-top: 15px;
    flex-wrap: wrap;
  }
  .meta-chip {
    display: flex;
    gap: 7px;
    max-width: none;
    align-items: center;
  }
  .meta-chip + .meta-chip {
    border-left: 0;
    padding-left: 8px;
  }
  .grid.two {
    grid-template-columns: minmax(0, 1fr);
  }
  .metric-grid,
  .summary-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .workspace-status-text {
    display: none;
  }
  .auth-intro h1 {
    font-size: 36px;
  }
  .auth-intro {
    padding-left: 10%;
    padding-right: 8%;
  }
  .node-aws {
    left: 155px;
  }
}
@media (max-width: 760px) {
  .app-shell {
    display: block;
  }
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 248px;
    height: 100dvh;
    transform: translateX(-100%);
    visibility: hidden;
    transition:
      transform 0.2s,
      visibility 0.2s;
    padding-top: 24px;
    box-shadow: 14px 0 45px rgb(25 40 74 / 8%);
  }
  .sidebar-open .sidebar {
    transform: translateX(0);
    visibility: visible;
  }
  .sidebar-open {
    overflow: hidden;
  }
  .sidebar-backdrop {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100dvh;
    border: 0;
    border-radius: 0;
    padding: 0;
    z-index: 35;
    background: rgb(31 43 72 / 22%);
  }
  .sidebar-backdrop:hover {
    background: rgb(31 43 72 / 22%);
  }
  .sidebar-open .sidebar-backdrop {
    display: block;
  }
  .workspace-bar {
    min-height: 62px;
    padding: 0 18px;
    gap: 11px;
  }
  .menu-toggle {
    display: inline-flex;
    min-height: 32px;
    width: 32px;
    padding: 6px;
  }
  .breadcrumb {
    margin-right: auto;
    gap: 8px;
    font-size: 11px;
  }
  .workspace-status {
    gap: 6px;
    font-size: 10px;
  }
  .page-container {
    padding: 23px 16px 15px;
  }
  .page-copy h2 {
    font-size: 25px;
  }
  .page-copy p {
    line-height: 1.8;
  }
  .page-hero {
    margin-bottom: 22px;
  }
  .eyebrow {
    font-size: 9px;
  }
  .hero-meta {
    gap: 12px;
    margin-top: 13px;
  }
  .meta-chip,
  .meta-chip strong,
  .meta-chip > span {
    font-size: 10px;
  }
  .grid,
  .metric-grid,
  .summary-strip {
    gap: 12px;
  }
  .metric-card,
  .summary-card {
    padding: 16px;
  }
  .metric-card > strong,
  .summary-card > strong {
    font-size: 27px;
    margin-top: 8px;
  }
  .metric-card > small,
  .summary-card > small {
    font-size: 10px;
    margin-top: 9px;
  }
  .metric-card::after {
    right: 16px;
    top: 21px;
    width: 6px;
    height: 6px;
  }
  .metric-card > span,
  .summary-card > span {
    font-size: 11px;
  }
  .panel {
    padding: 16px;
    border-radius: 10px;
  }
  .panel-toolbar {
    align-items: flex-start;
    gap: 12px;
  }
  .panel-toolbar > .actions {
    width: 100%;
  }
  .panel-toolbar h3 {
    font-size: 14px;
  }
  .panel-toolbar p {
    font-size: 11px;
    line-height: 1.8;
  }
  .panel-toolbar > .ghost-link {
    padding-left: 0;
  }
  .action-strip {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 20px;
  }
  .action-strip .button {
    font-size: 11px;
    padding-left: 8px;
    padding-right: 8px;
  }
  .form-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 17px;
  }
  .form-grid .full {
    grid-column: auto;
  }
  .inline-field {
    flex-wrap: wrap;
  }
  .inline-field > :first-child {
    flex-basis: 190px;
  }
  .inline-note,
  .logic-chip {
    font-size: 11px;
    line-height: 1.8;
  }
  .table-wrap {
    border-radius: 6px;
  }
  .data-table {
    min-width: 660px;
  }
  .data-table th,
  .data-table td {
    padding: 12px;
  }
  .data-table .table-empty {
    white-space: normal;
  }
  .fold-meta {
    gap: 7px;
  }
  .fold-count {
    display: none;
  }
  .fold-summary {
    padding: 12px;
  }
  .page-footer {
    font-size: 9px;
    gap: 8px;
  }
  .auth-layout {
    display: block;
  }
  .auth-intro {
    display: block;
    padding: 26px 28px;
    border: 0;
    background: #f4f6fd;
  }
  .auth-brand strong {
    font-size: 17px;
  }
  .auth-brand .brand-mark {
    width: 33px;
    height: 35px;
    border-radius: 9px;
  }
  .auth-intro-copy,
  .auth-intro-footer {
    display: none;
  }
  .auth-intro::after {
    display: none;
  }
  .auth-panel {
    min-height: calc(100dvh - 87px);
    padding: 32px 28px 24px;
  }
  .auth-card {
    max-width: 410px;
    padding: 20px 0 50px;
  }
  .auth-card h2 {
    font-size: 27px;
  }
  .auth-form input {
    font-size: 16px;
  }
  .auth-form input::placeholder {
    font-size: 13px;
  }
  .auth-panel-footer {
    margin-top: auto;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

.sidebar-close {
  display: none;
}
@media (max-width: 760px) {
  .sidebar-close {
    display: inline-flex;
    position: absolute;
    top: 13px;
    right: 10px;
    min-height: 28px;
    padding: 4px;
    border: 0;
    color: var(--muted);
    background: transparent;
  }
  .sidebar-close:hover {
    color: var(--brand);
    background: var(--brand-soft);
  }
  .sidebar-brand {
    padding-top: 15px;
  }
}
.proxy-filter-form {
  display: grid;
  grid-template-columns: minmax(180px, 2fr) repeat(3, minmax(100px, 1fr)) auto;
  align-items: end;
  gap: 12px;
  margin-top: 20px;
}

.proxy-filter-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

.proxy-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 20px;
  font-size: 13px;
}

.proxy-diagnostics {
  min-width: 180px;
}

.proxy-diagnostics summary {
  cursor: pointer;
}

.proxy-diagnostics dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 12px;
  margin: 12px 0 0;
  font-size: 12px;
}

.proxy-diagnostics dt {
  color: var(--muted);
}

.proxy-diagnostics dd {
  margin: 0;
}

.proxy-affected-accounts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  padding-left: 20px;
}

.proxy-review-cancel {
  margin-top: 12px;
}

@media (max-width: 900px) {
  .proxy-filter-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .proxy-filter-form label:first-of-type,
  .proxy-filter-form .actions {
    grid-column: 1 / -1;
  }
}
