:root {
  --bg: #f4f6f7;
  --surface: #ffffff;
  --surface-soft: #eef3f3;
  --surface-strong: #e3ebeb;
  --text: #1e292c;
  --muted: #65757a;
  --border: #d6e0e2;
  --border-strong: #bdcbce;
  --nav: #17282b;
  --nav-muted: #9db0b4;
  --primary: #0e6c65;
  --primary-hover: #0a5954;
  --success: #1e7a4d;
  --success-soft: #e8f4ed;
  --warning: #a96506;
  --warning-soft: #fff3dc;
  --danger: #b13a3a;
  --danger-hover: #922f2f;
  --danger-soft: #fbeaea;
  --blue: #256a8a;
  --blue-soft: #e7f1f6;
  --shadow: 0 1px 2px rgba(21, 40, 44, 0.06), 0 8px 24px rgba(21, 40, 44, 0.05);
}

* { box-sizing: border-box; }

html { background: var(--bg); }

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: Inter, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
  font-size: 14px;
  letter-spacing: 0;
}

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

button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(14, 108, 101, 0.2);
  outline-offset: 1px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

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

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 20px 14px 16px;
  color: #f3f7f7;
  background: var(--nav);
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 8px;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: var(--primary);
  border-radius: 6px;
}

.brand-mark svg { width: 19px; height: 19px; }
.brand-block strong { display: block; font-size: 14px; font-weight: 500; }
.brand-block span { display: block; margin-top: 2px; color: var(--nav-muted); font-size: 12px; }

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

.nav-item {
  width: 100%;
  min-height: 42px;
  padding: 0 10px;
  border: 0;
  border-radius: 5px;
  color: var(--nav-muted);
  background: transparent;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  text-align: left;
  cursor: pointer;
}

.nav-item:hover { color: #ffffff; background: rgba(255, 255, 255, 0.06); }
.nav-item.is-active { color: #ffffff; background: rgba(255, 255, 255, 0.1); }
.nav-item svg { width: 17px; height: 17px; }

.nav-count {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: #dce7e7;
  background: rgba(255, 255, 255, 0.1);
  font-size: 11px;
}

.sidebar-status {
  margin-top: auto;
  padding: 12px 8px 2px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  gap: 9px;
}

.sidebar-status strong { display: block; font-weight: 500; }
.sidebar-status span:last-child { display: block; margin-top: 2px; color: var(--nav-muted); font-size: 11px; }

.status-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--border-strong);
}

.status-dot.is-live,
.status-dot.is-success { background: var(--success); box-shadow: 0 0 0 3px rgba(30, 122, 77, 0.14); }
.status-dot.is-warning { background: var(--warning); box-shadow: 0 0 0 3px rgba(169, 101, 6, 0.12); }
.status-dot.is-danger { background: var(--danger); box-shadow: 0 0 0 3px rgba(177, 58, 58, 0.12); }

.app-main { min-width: 0; }

.topbar {
  min-height: 72px;
  padding: 14px 28px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.92);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.topbar h1 { margin: 0; font-size: 22px; font-weight: 500; }
.topbar p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }

.environment-badge {
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 5px;
  color: var(--muted);
  background: var(--surface);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}

.icon-button,
.field-icon {
  border: 0;
  color: var(--muted);
  background: transparent;
  display: inline-grid;
  place-items: center;
  cursor: pointer;
}

.icon-button {
  width: 34px;
  height: 34px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--surface);
}

.icon-button:hover,
.field-icon:hover { color: var(--text); background: var(--surface-soft); }
.icon-button svg, .field-icon svg { width: 16px; height: 16px; }

main { padding: 24px 28px 44px; }
.view { display: none; max-width: 1440px; margin: 0 auto; }
.view.is-visible { display: block; }

.workflow-steps {
  min-height: 70px;
  padding: 0 18px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  display: grid;
  grid-template-columns: auto minmax(32px, 1fr) auto minmax(32px, 1fr) auto minmax(32px, 1fr) auto;
  align-items: center;
  box-shadow: var(--shadow);
}

.workflow-step { display: flex; align-items: center; gap: 9px; color: var(--muted); }
.workflow-step > span {
  width: 28px;
  height: 28px;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 12px;
}
.workflow-step strong { display: block; color: inherit; font-weight: 500; white-space: nowrap; }
.workflow-step small { display: block; margin-top: 2px; color: var(--muted); font-size: 11px; white-space: nowrap; }
.workflow-step.is-active { color: var(--primary); }
.workflow-step.is-active > span { color: #ffffff; border-color: var(--primary); background: var(--primary); }
.workflow-step.is-complete { color: var(--success); }
.workflow-step.is-complete > span { color: #ffffff; border-color: var(--success); background: var(--success); }
.workflow-step.is-error { color: var(--danger); }
.workflow-step.is-error > span { color: #ffffff; border-color: var(--danger); background: var(--danger); }
.workflow-line { height: 1px; margin: 0 16px; background: var(--border); }

.workspace-section {
  margin-top: 18px;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.workspace-section.no-top-border { margin-top: 0; }

.section-heading {
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.section-heading > div { display: flex; align-items: baseline; gap: 10px; }
.section-heading h2 { margin: 0; font-size: 18px; font-weight: 500; }
.section-index { color: var(--primary); font-size: 11px; font-weight: 500; }
.section-heading-actions {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}
.section-context {
  color: var(--muted);
  font-size: 11px;
  overflow-wrap: anywhere;
  text-align: right;
}
.section-state {
  min-height: 26px;
  padding: 0 9px;
  border-radius: 4px;
  color: var(--muted);
  background: var(--surface-soft);
  display: inline-flex;
  align-items: center;
  font-size: 11px;
}
.section-state.is-success { color: var(--success); background: var(--success-soft); }
.section-state.is-warning { color: var(--warning); background: var(--warning-soft); }
.section-state.is-danger { color: var(--danger); background: var(--danger-soft); }

.file-layout { display: grid; grid-template-columns: minmax(340px, 1.25fr) minmax(260px, 0.75fr); gap: 18px; }

.drop-zone {
  min-height: 190px;
  padding: 24px;
  border: 1px dashed var(--border-strong);
  border-radius: 6px;
  background: var(--surface-soft);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.drop-zone.is-dragging { border-color: var(--primary); background: #e6f1f0; }
.drop-icon {
  width: 42px;
  height: 42px;
  margin-bottom: 10px;
  border-radius: 6px;
  color: var(--primary);
  background: #dceceb;
  display: grid;
  place-items: center;
}
.drop-icon svg { width: 21px; height: 21px; }
.drop-zone strong { font-weight: 500; }
.drop-zone > span { margin-top: 4px; color: var(--muted); font-size: 12px; }

.button-row { margin-top: 18px; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }

.button {
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid var(--border-strong);
  border-radius: 5px;
  color: var(--text);
  background: var(--surface);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-weight: 500;
  cursor: pointer;
}
.button:hover:not(:disabled) { border-color: #9aabad; background: var(--surface-soft); }
.button:disabled { opacity: 0.46; cursor: not-allowed; }
.button svg { width: 16px; height: 16px; }
.button-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}
.button-primary { color: #ffffff; border-color: var(--primary); background: var(--primary); }
.button-primary:hover:not(:disabled) { border-color: var(--primary-hover); background: var(--primary-hover); }
.button-danger { color: #ffffff; border-color: var(--danger); background: var(--danger); }
.button-danger:hover:not(:disabled) { border-color: var(--danger-hover); background: var(--danger-hover); }
.button-block { width: 100%; }

.file-summary {
  min-height: 190px;
  padding: 18px;
  border-left: 3px solid var(--border);
  background: var(--surface-soft);
  display: flex;
  align-items: center;
}

.file-facts { width: 100%; margin: 0; display: grid; gap: 0; }
.file-facts div { padding: 10px 0; border-bottom: 1px solid var(--border); display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 12px; }
.file-facts div:last-child { border-bottom: 0; }
.file-facts dt { color: var(--muted); }
.file-facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; font-weight: 500; }

.empty-state {
  width: 100%;
  min-height: 180px;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
}
.empty-state.compact { min-height: 90px; }
.empty-state svg { width: 20px; height: 20px; }

.analysis-area { margin-top: 18px; }
.is-hidden { display: none !important; }

.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.metric-card {
  min-height: 96px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
}
.metric-card span { display: block; color: var(--muted); font-size: 12px; }
.metric-card strong { display: block; margin-top: 7px; font-size: 24px; font-weight: 500; font-variant-numeric: tabular-nums; }
.metric-card small { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; }

.data-grid { margin-top: 14px; display: grid; grid-template-columns: minmax(300px, 0.75fr) minmax(480px, 1.25fr); gap: 14px; }
.chart-panel, .table-panel { min-width: 0; border-top: 1px solid var(--border); padding-top: 14px; }
.panel-heading { margin-bottom: 12px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.panel-heading h3 { margin: 0; font-size: 14px; font-weight: 500; }
.panel-heading span { color: var(--muted); font-size: 11px; }

.bar-chart { height: 190px; display: grid; grid-template-columns: repeat(6, minmax(34px, 1fr)); align-items: end; gap: 10px; }
.bar-column { height: 100%; min-width: 0; display: grid; grid-template-rows: 22px minmax(0, 1fr) 22px; gap: 5px; text-align: center; }
.bar-value { color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.bar-track { min-height: 100px; border-bottom: 1px solid var(--border-strong); display: flex; align-items: end; justify-content: center; }
.bar-fill { width: min(34px, 78%); min-height: 2px; border-radius: 3px 3px 0 0; background: var(--primary); transition: height 220ms ease; }
.bar-column.is-zero .bar-fill { background: var(--warning); }
.bar-label { color: var(--muted); font-size: 11px; white-space: nowrap; }

.table-wrap { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { height: 39px; padding: 0 10px; border-bottom: 1px solid var(--border); text-align: left; white-space: nowrap; }
th { color: var(--muted); background: var(--surface-soft); font-size: 11px; font-weight: 500; }
td { font-size: 12px; }
td code { color: var(--text); }
.align-right { text-align: right; }
tbody tr:hover { background: #f6f9f9; }

.region-control { width: fit-content; margin-bottom: 16px; padding: 3px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface-soft); display: flex; }
.segment { min-width: 76px; height: 30px; padding: 0 12px; border: 0; border-radius: 4px; color: var(--muted); background: transparent; cursor: pointer; }
.segment:hover { color: var(--text); }
.segment.is-selected { color: #ffffff; background: var(--primary); }

.form-grid { display: grid; gap: 12px; }
.three-columns { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.account-grid { grid-template-columns: minmax(230px, 0.8fr) minmax(280px, 1.2fr) minmax(180px, 0.6fr); }
.field { min-width: 0; display: grid; gap: 7px; color: var(--muted); font-size: 12px; }
.field input, .field select {
  width: 100%;
  height: 38px;
  padding: 0 10px;
  border: 1px solid var(--border-strong);
  border-radius: 5px;
  color: var(--text);
  background: var(--surface);
}
.field input::placeholder { color: #95a2a6; }
.field input:focus, .field select:focus { border-color: var(--primary); }
.password-field { position: relative; display: block; }
.password-field input { padding-right: 40px; }
.field-icon { position: absolute; top: 3px; right: 3px; width: 32px; height: 32px; border-radius: 4px; }
.action-field { align-content: end; }
.action-field .button { height: 38px; }

.action-strip {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.inline-status { min-width: 0; color: var(--muted); display: flex; align-items: center; gap: 9px; }
.inline-status span:last-child { overflow-wrap: anywhere; }
.inline-status.is-success { color: var(--success); }
.inline-status.is-warning { color: var(--warning); }
.inline-status.is-danger { color: var(--danger); }

.account-result { margin-top: 14px; border-top: 1px solid var(--border); }
.account-match { padding: 14px 0 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.account-match div { min-width: 0; }
.account-match span { display: block; color: var(--muted); font-size: 11px; }
.account-match strong { display: block; margin-top: 4px; overflow-wrap: anywhere; font-weight: 500; }
.issue-list { margin: 12px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.issue-list li { padding: 8px 10px; color: var(--warning); background: var(--warning-soft); border-radius: 4px; font-size: 12px; }

.submit-section { border-top: 3px solid var(--primary); }
.submit-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr); gap: 24px; }
.review-list { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; }
.review-list div { min-height: 46px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.review-list dt { color: var(--muted); }
.review-list dd { margin: 0; overflow-wrap: anywhere; text-align: right; font-weight: 500; }

.confirmation-panel { padding-left: 24px; border-left: 1px solid var(--border); display: grid; align-content: start; gap: 13px; }
.submission-risk {
  padding: 10px 11px;
  border-left: 3px solid var(--warning);
  color: var(--warning);
  background: var(--warning-soft);
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12px;
}
.submission-risk svg { width: 16px; height: 16px; flex: 0 0 auto; }
.submission-risk span { overflow-wrap: anywhere; }
.check-row { display: flex; align-items: flex-start; gap: 9px; cursor: pointer; }
.check-row input { width: 16px; height: 16px; margin: 2px 0 0; accent-color: var(--primary); }
.submit-message { min-height: 20px; color: var(--muted); font-size: 12px; }
.submit-message.is-danger { color: var(--danger); }
.submit-message.is-success { color: var(--success); }

.jobs-layout { display: grid; grid-template-columns: minmax(560px, 1.35fr) minmax(300px, 0.65fr); gap: 18px; }
.jobs-table-panel { position: relative; min-height: 390px; padding-top: 0; border-top: 0; }
.jobs-table-panel tbody tr { cursor: pointer; }
.jobs-table-panel tbody tr.is-selected { background: #eaf3f2; }
.jobs-table-panel .empty-state { position: absolute; inset: 42px 0 0; background: var(--surface); }

.status-badge { min-height: 24px; padding: 0 8px; border-radius: 4px; color: var(--muted); background: var(--surface-soft); display: inline-flex; align-items: center; font-size: 11px; }
.status-badge.is-success { color: var(--success); background: var(--success-soft); }
.status-badge.is-progress { color: var(--blue); background: var(--blue-soft); }
.status-badge.is-danger { color: var(--danger); background: var(--danger-soft); }
.status-badge.is-warning { color: var(--warning); background: var(--warning-soft); }

.job-detail { min-height: 390px; padding-left: 18px; border-left: 1px solid var(--border); }
.job-detail-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.job-detail-header h3 { margin: 0; font-size: 15px; font-weight: 500; }
.job-detail-header code { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }
.job-progress { margin: 22px 0; display: grid; gap: 0; }
.progress-step { position: relative; min-height: 56px; padding-left: 34px; }
.progress-step::before { content: ""; position: absolute; left: 11px; top: 20px; bottom: -4px; width: 1px; background: var(--border); }
.progress-step:last-child::before { display: none; }
.progress-node { position: absolute; left: 2px; top: 0; width: 20px; height: 20px; border: 1px solid var(--border-strong); border-radius: 50%; color: var(--muted); background: var(--surface); display: grid; place-items: center; font-size: 10px; }
.progress-step.is-complete .progress-node { color: #ffffff; border-color: var(--success); background: var(--success); }
.progress-step.is-active .progress-node { color: #ffffff; border-color: var(--blue); background: var(--blue); }
.progress-step.is-error .progress-node { color: #ffffff; border-color: var(--danger); background: var(--danger); }
.progress-step strong { display: block; font-weight: 500; }
.progress-step span { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; }
.job-summary { margin: 0; display: grid; gap: 0; }
.job-summary div { min-height: 38px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.job-summary dt { color: var(--muted); }
.job-summary dd { margin: 0; font-weight: 500; }
.job-actions { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 8px; }

.system-grid { display: grid; }
.system-row { min-height: 54px; padding: 0 10px; border-bottom: 1px solid var(--border); display: grid; grid-template-columns: 150px minmax(0, 1fr) auto; align-items: center; gap: 16px; }
.system-row span { color: var(--muted); }
.system-row code { overflow-wrap: anywhere; color: var(--text); }
.system-row strong { color: var(--muted); font-size: 12px; font-weight: 500; text-align: right; }
.endpoint-table { margin-top: 20px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.endpoint-table div { min-width: 0; padding: 12px; border: 1px solid var(--border); border-radius: 5px; background: var(--surface-soft); }
.endpoint-table span { display: block; color: var(--muted); font-size: 11px; }
.endpoint-table code { display: block; margin-top: 6px; overflow-wrap: anywhere; color: var(--text); font-size: 11px; }

.submit-dialog {
  width: min(440px, calc(100% - 28px));
  padding: 0;
  border: 0;
  border-radius: 7px;
  color: var(--text);
  background: var(--surface);
  box-shadow: 0 22px 70px rgba(20, 38, 42, 0.28);
}
.submit-dialog::backdrop { background: rgba(16, 31, 34, 0.52); }
.submit-dialog form { padding: 24px; }
.dialog-icon { width: 38px; height: 38px; margin-bottom: 12px; border-radius: 6px; color: var(--danger); background: var(--danger-soft); display: grid; place-items: center; }
.dialog-icon svg { width: 20px; height: 20px; }
.submit-dialog h2 { margin: 0; font-size: 18px; font-weight: 500; }
.dialog-summary { margin: 18px 0; display: grid; }
.dialog-summary div { min-height: 40px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.dialog-summary dt { color: var(--muted); }
.dialog-summary dd { margin: 0; overflow-wrap: anywhere; text-align: right; font-weight: 500; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; }

.toast-stack { position: fixed; z-index: 50; right: 18px; bottom: 18px; width: min(360px, calc(100% - 36px)); display: grid; gap: 8px; }
.toast { padding: 12px 14px; border: 1px solid var(--border); border-left: 4px solid var(--primary); border-radius: 5px; background: var(--surface); box-shadow: var(--shadow); animation: toast-in 160ms ease-out; }
.toast.is-danger { border-left-color: var(--danger); }
.toast.is-success { border-left-color: var(--success); }
.toast.is-warning { border-left-color: var(--warning); }
.toast strong { display: block; font-weight: 500; }
.toast span { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }

@keyframes toast-in { from { transform: translateY(6px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}

@media (max-width: 1100px) {
  .three-columns { grid-template-columns: 1fr 1fr; }
  .three-columns .field:first-child { grid-column: 1 / -1; }
  .file-layout, .data-grid, .submit-grid, .jobs-layout { grid-template-columns: 1fr; }
  .file-summary { border-left: 0; border-top: 3px solid var(--border); }
  .confirmation-panel, .job-detail { padding-left: 0; padding-top: 18px; border-left: 0; border-top: 1px solid var(--border); }
  .job-detail { min-height: 320px; }
}

@media (max-width: 820px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; padding: 12px 14px; gap: 12px; }
  .brand-block { padding: 0; }
  .nav-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .nav-item { grid-template-columns: 18px minmax(0, 1fr) auto; }
  .sidebar-status { display: none; }
  .topbar { padding: 12px 18px; }
  main { padding: 18px; }
  .workflow-steps { padding: 12px; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
  .workflow-line { display: none; }
  .workflow-step { justify-content: center; }
  .workflow-step div { display: none; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .account-grid { grid-template-columns: 1fr 1fr; }
  .action-field { grid-column: 1 / -1; }
  .account-match { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .endpoint-table { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .nav-item { min-height: 38px; padding: 0 8px; }
  .nav-item span:nth-child(2) { font-size: 12px; }
  .topbar h1 { font-size: 18px; }
  .environment-badge { display: none; }
  main { padding: 12px; }
  .workspace-section { padding: 16px; }
  .section-heading { align-items: flex-start; }
  .section-heading-actions { align-items: flex-end; flex-direction: column; gap: 6px; }
  .workflow-steps { min-height: 54px; }
  .file-layout, .three-columns, .account-grid, .metric-grid, .review-list { grid-template-columns: 1fr; }
  .three-columns .field:first-child, .action-field { grid-column: auto; }
  .drop-zone { min-height: 210px; padding: 18px 12px; }
  .button-row { width: 100%; }
  .button-row .button { width: 100%; }
  .bar-chart { gap: 4px; }
  .bar-value, .bar-label { font-size: 10px; }
  .action-strip { align-items: stretch; flex-direction: column; }
  .action-strip .button { width: 100%; }
  .submit-grid { gap: 18px; }
  .system-row { padding: 10px 0; grid-template-columns: 1fr; gap: 5px; }
  .system-row strong { text-align: left; }
  .account-match { grid-template-columns: 1fr; }
}
