:root {
  color-scheme: light;
  --ink: #17201f;
  --ink-soft: #42504e;
  --muted: #687572;
  --line: #dbe2df;
  --line-strong: #c7d1cd;
  --canvas: #f3f6f5;
  --surface: #ffffff;
  --surface-soft: #f8faf9;
  --teal: #0f766e;
  --teal-dark: #0b5d57;
  --teal-soft: #dff3ef;
  --amber: #b7791f;
  --amber-soft: #fff5d9;
  --red: #b42318;
  --red-dark: #8f1c13;
  --red-soft: #fee9e7;
  --green: #217a50;
  --green-soft: #e5f5ec;
  --blue: #35658d;
  --blue-soft: #e8f1f8;
  --shadow: 0 12px 32px rgba(23, 32, 31, 0.08);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
}

body {
  min-width: 320px;
  font-size: 14px;
}

.auth-gate {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: var(--canvas);
}

.auth-shell {
  width: min(420px, 100%);
  padding: 30px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: var(--shadow);
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
}

.auth-brand h1 {
  font-size: 20px;
}

.auth-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: #d5f4ed;
  background: var(--teal);
  border: 1px solid #2a8f85;
  border-radius: 6px;
}

.auth-mark .icon {
  width: 22px;
  height: 22px;
}

.auth-description {
  margin-bottom: 20px;
  color: var(--ink-soft);
  line-height: 1.6;
}

.auth-error {
  margin: -4px 0 14px;
  padding: 10px 12px;
  color: var(--red-dark);
  background: var(--red-soft);
  border: 1px solid #e8aaa4;
  border-radius: 5px;
  font-size: 12px;
  line-height: 1.45;
}

.auth-note {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  color: var(--muted);
  line-height: 1.45;
}

.auth-note .icon {
  width: 14px;
  height: 14px;
  color: var(--teal);
}

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

button,
select,
input[type="checkbox"] {
  cursor: pointer;
}

button:disabled,
input:disabled,
select:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(15, 118, 110, 0.25);
  outline-offset: 2px;
}

.icon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 66px;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  align-items: center;
  gap: 20px;
  padding: 10px 20px;
  color: #f7fbfa;
  background: #17201f;
  border-bottom: 1px solid #2e3b39;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: max-content;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: #d5f4ed;
  background: var(--teal);
  border: 1px solid #2a8f85;
  border-radius: 6px;
}

.brand-mark .icon {
  width: 21px;
  height: 21px;
}

.brand > span:last-child {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.brand strong {
  font-size: 22px;
  line-height: 1;
}

.brand small {
  color: #9fb2ae;
  font-size: 10px;
  font-weight: 700;
}

.segmented {
  display: inline-grid;
  grid-auto-flow: column;
  padding: 3px;
  border: 1px solid #3b4947;
  border-radius: 6px;
  background: #202b29;
}

.segment {
  min-width: 106px;
  height: 34px;
  padding: 0 14px;
  color: #aebebb;
  border: 0;
  border-radius: 4px;
  background: transparent;
  font-size: 12px;
  font-weight: 700;
  transition: color 180ms ease, background-color 180ms ease;
}

.segment:hover {
  color: #ffffff;
}

.segment.is-active {
  color: #10201e;
  background: #d9eee9;
}

.topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.chain-select {
  display: inline-flex;
  align-items: center;
}

.chain-select select {
  min-width: 142px;
  height: 34px;
  padding: 0 30px 0 11px;
  color: #cad6d3;
  border: 1px solid #3b4947;
  border-radius: 5px;
  outline: 0;
  background-color: #202b29;
  font-size: 12px;
  font-weight: 650;
}

.chain-select select:hover,
.chain-select select:focus-visible {
  color: #ffffff;
  border-color: #687975;
}

.chain-select option {
  color: var(--ink);
  background: var(--surface);
}

.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;
}

.status-button,
.local-badge {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 11px;
  color: #cad6d3;
  border: 1px solid #3b4947;
  border-radius: 5px;
  background: #202b29;
  font-size: 12px;
  font-weight: 650;
}

.status-button {
  transition: border-color 180ms ease, color 180ms ease;
}

.status-button:hover {
  color: #ffffff;
  border-color: #687975;
}

.local-badge .icon {
  width: 14px;
  height: 14px;
  color: #78c9b8;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #d39a37;
  box-shadow: 0 0 0 3px rgba(211, 154, 55, 0.14);
}

.status-dot.is-online {
  background: #42b883;
  box-shadow: 0 0 0 3px rgba(66, 184, 131, 0.14);
}

.status-dot.is-error {
  background: #e45b50;
  box-shadow: 0 0 0 3px rgba(228, 91, 80, 0.14);
}

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

.wallet-sidebar {
  position: sticky;
  top: 66px;
  height: calc(100vh - 66px);
  min-height: 0;
  max-height: calc(100vh - 66px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--surface);
  border-right: 1px solid var(--line);
}

.sidebar-header,
.pane-heading,
.section-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.sidebar-header {
  padding: 20px 18px 14px;
}

.eyebrow {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: 0;
}

h1,
h2,
p {
  margin: 0;
}

h1,
h2 {
  letter-spacing: 0;
}

h1 {
  font-size: 19px;
  line-height: 1.25;
}

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

.icon-button {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  color: var(--ink-soft);
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: var(--surface);
  transition: color 180ms ease, border-color 180ms ease, background-color 180ms ease;
}

.icon-button:hover {
  color: var(--teal);
  border-color: #91bbb4;
  background: var(--teal-soft);
}

.icon-button-danger:hover {
  color: var(--red);
  border-color: #e8aaa4;
  background: var(--red-soft);
}

.wallet-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  padding: 0 18px 14px;
}

.sidebar-clear-action {
  padding: 0 18px 14px;
}

.button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 15px;
  border: 1px solid transparent;
  border-radius: 5px;
  font-size: 13px;
  font-weight: 750;
  text-decoration: none;
  transition: color 180ms ease, background-color 180ms ease, border-color 180ms ease;
}

.button-small {
  min-height: 36px;
  font-size: 12px;
}

.button-block {
  width: 100%;
}

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

.button-primary:hover:not(:disabled) {
  background: var(--teal-dark);
  border-color: var(--teal-dark);
}

.button-secondary {
  color: var(--ink);
  background: var(--surface);
  border-color: var(--line-strong);
}

.button-secondary:hover:not(:disabled) {
  color: var(--teal-dark);
  border-color: #82aaa3;
  background: var(--teal-soft);
}

.button-danger {
  color: #ffffff;
  background: var(--red);
  border-color: var(--red);
}

.button-danger:hover:not(:disabled) {
  background: var(--red-dark);
  border-color: var(--red-dark);
}

.button-danger-outline {
  color: var(--red-dark);
  background: var(--surface);
  border-color: #e8aaa4;
}

.button-danger-outline:hover:not(:disabled) {
  color: #ffffff;
  background: var(--red);
  border-color: var(--red);
}

.button-stop {
  min-height: 36px;
  color: var(--red);
  background: var(--red-soft);
  border-color: #e8aaa4;
}

.button-stop:hover:not(:disabled) {
  color: #ffffff;
  background: var(--red);
  border-color: var(--red);
}

.selection-row {
  min-height: 39px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  color: var(--muted);
  background: var(--surface-soft);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}

.wallet-filter-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 10px 14px 6px;
}

.wallet-filter-input {
  min-width: 0;
  height: 34px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 5px 0 9px;
  color: var(--muted);
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: var(--surface-soft);
}

.wallet-filter-input:focus-within {
  color: var(--teal);
  border-color: #82aaa3;
  background: var(--surface);
}

.wallet-filter-input > .icon {
  width: 15px;
  height: 15px;
}

.wallet-filter-input input {
  width: 100%;
  min-width: 0;
  padding: 0;
  color: var(--ink);
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 12px;
}

.wallet-filter-input input::placeholder {
  color: #8a9793;
}

.icon-button-compact {
  width: 24px;
  height: 24px;
  border: 0;
  background: transparent;
}

.icon-button-compact .icon {
  width: 14px;
  height: 14px;
}

.wallet-filter-toggle {
  gap: 5px;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.wallet-list-meta {
  min-height: 22px;
  padding: 0 18px 5px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-soft);
  font-weight: 650;
}

input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--teal);
}

.wallet-list {
  min-height: 0;
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.wallet-row {
  min-height: 56px;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 8px 18px;
  border-bottom: 1px solid #edf1ef;
  transition: background-color 160ms ease;
}

.wallet-row:hover {
  background: #f8fbfa;
}

.wallet-row.is-selected {
  background: #f0f8f6;
}

.wallet-address {
  min-width: 0;
}

.wallet-address strong,
.mono {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  letter-spacing: 0;
}

.wallet-address strong {
  display: block;
  overflow: hidden;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
}

.wallet-address small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.wallet-balance {
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 750;
  white-space: nowrap;
}

.wallet-balance.is-error {
  color: var(--red);
}

.empty-compact {
  min-height: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
}

.empty-filter {
  min-height: 150px;
}

.empty-compact .icon {
  width: 28px;
  height: 28px;
  color: #a3afac;
}

.sidebar-footer {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 18px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 11px;
}

.sidebar-footer .icon {
  width: 15px;
  height: 15px;
  color: var(--teal);
}

.workspace {
  min-width: 0;
  padding: 22px;
}

.metric-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.metric {
  min-height: 82px;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto 1fr;
  align-items: end;
  gap: 2px 8px;
  padding: 15px 18px;
  border-right: 1px solid var(--line);
}

.metric:last-child {
  border-right: 0;
}

.metric span {
  grid-column: 1 / -1;
  align-self: start;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.metric strong {
  font-size: 26px;
  line-height: 1;
}

.metric small {
  color: var(--muted);
  font-size: 11px;
}

.metric-accent strong {
  color: var(--amber);
}

.tabs {
  min-height: 46px;
  display: flex;
  align-items: end;
  gap: 4px;
  padding: 0 4px;
  border-bottom: 1px solid var(--line-strong);
}

.tab {
  position: relative;
  min-width: 100px;
  height: 45px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 16px;
  color: var(--muted);
  border: 0;
  background: transparent;
  font-size: 13px;
  font-weight: 750;
  transition: color 180ms ease, background-color 180ms ease;
}

.tab::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: -1px;
  height: 3px;
  background: transparent;
}

.tab:hover {
  color: var(--ink);
  background: #edf2f0;
}

.tab.is-active {
  color: var(--teal-dark);
}

.tab.is-active::after {
  background: var(--teal);
}

.tab-panel {
  padding-top: 18px;
}

.intelligence-panel {
  margin-bottom: 18px;
  padding: 18px 0 20px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.intelligence-heading,
.intelligence-actions,
.section-caption,
.stage-head,
.stage-actions {
  display: flex;
  align-items: center;
}

.intelligence-heading {
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.intelligence-actions {
  gap: 9px;
}

.nft-overview {
  display: grid;
  grid-template-columns: minmax(180px, 1.5fr) repeat(4, minmax(110px, 1fr));
  margin-bottom: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.intel-metric {
  min-width: 0;
  min-height: 68px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 11px 14px;
  border-right: 1px solid var(--line);
}

.intel-metric:last-child {
  border-right: 0;
}

.intel-metric span,
.section-caption span,
.stage-meta span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.intel-metric strong {
  margin-top: 6px;
  overflow: hidden;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.intelligence-grid {
  display: grid;
  grid-template-columns: minmax(300px, 0.85fr) minmax(0, 1.65fr);
  gap: 18px;
}

.stage-section,
.eligibility-section {
  min-width: 0;
}

.section-caption {
  justify-content: space-between;
  min-height: 28px;
  margin-bottom: 8px;
}

.stage-list {
  display: grid;
  gap: 8px;
}

.stage-notice {
  display: grid;
  gap: 3px;
  padding: 11px 13px;
  color: #684b16;
  background: #fff8e8;
  border: 1px solid #e7c980;
  border-radius: 6px;
  font-size: 12px;
  line-height: 1.45;
}

.stage-notice strong {
  color: #4f390f;
}

.stage-item {
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--blue);
  border-radius: 5px;
}

.stage-item[data-status="live"] {
  border-left-color: var(--green);
}

.stage-item[data-status="credential_required"] {
  border-left-color: var(--amber);
}

.stage-head {
  justify-content: space-between;
  gap: 10px;
}

.stage-head strong {
  min-width: 0;
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stage-state {
  flex: 0 0 auto;
  color: var(--blue);
  font-size: 10px;
  font-weight: 800;
}

.stage-item[data-status="live"] .stage-state {
  color: var(--green);
}

.stage-item[data-status="credential_required"] .stage-state {
  color: var(--amber);
}

.stage-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.stage-meta div {
  min-width: 0;
}

.stage-meta strong {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stage-actions {
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 11px;
  padding-top: 9px;
  border-top: 1px solid #e9eeec;
}

.stage-source {
  min-width: 180px;
  flex: 1 1 180px;
  color: var(--muted);
  font-size: 10px;
}

.stage-use-button {
  min-height: 28px;
  padding: 0 9px;
  font-size: 10px;
}

.eligibility-table-wrap {
  max-height: 390px;
  background: var(--surface);
}

.eligibility-table-wrap table {
  min-width: 720px;
}

.eligibility-reason {
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.forge-intelligence {
  margin-bottom: 18px;
  padding: 2px 0 18px;
  border-bottom: 1px solid var(--line);
}

.forge-titlebar,
.forge-title-actions,
.forge-contract-lock,
.forge-arm-note {
  display: flex;
  align-items: center;
}

.forge-titlebar {
  min-height: 62px;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.forge-titlebar h2 {
  margin: 3px 0 0;
  font-size: 20px;
}

.forge-titlebar p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.forge-title-actions {
  flex: 0 0 auto;
  gap: 8px;
}

.forge-title-actions a {
  text-decoration: none;
}

.forge-overview {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin-bottom: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.forge-overview-empty {
  grid-column: 1 / -1;
  min-height: 66px;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 12px;
}

.forge-metric {
  min-width: 0;
  min-height: 66px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 10px 12px;
  border-right: 1px solid var(--line);
}

.forge-metric:last-child {
  border-right: 0;
}

.forge-metric span,
.forge-stage-meta span,
.forge-contract-lock small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}

.forge-metric strong {
  margin-top: 6px;
  overflow: hidden;
  color: var(--ink);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.forge-metric[data-tone="green"] strong {
  color: var(--green);
}

.forge-metric[data-tone="amber"] strong {
  color: var(--amber);
}

.forge-stage-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.forge-stage {
  min-width: 0;
  padding: 11px 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--line-strong);
  border-radius: 5px;
  transition: border-color 180ms ease, background-color 180ms ease;
}

.forge-stage.is-selected {
  border-color: #d0a454;
  border-left-color: var(--amber);
  background: #fffdf8;
}

.forge-stage.is-open {
  border-left-color: var(--green);
}

.forge-stage-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.forge-stage-head strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.forge-stage-state {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 9px;
  font-weight: 850;
}

.forge-stage.is-open .forge-stage-state {
  color: var(--green);
}

.forge-stage-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin-top: 10px;
}

.forge-stage-meta strong {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.forge-work-grid {
  grid-template-columns: minmax(310px, 380px) minmax(0, 1fr);
}

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

.forge-phase-segmented {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.forge-contract-lock {
  gap: 9px;
  min-height: 48px;
  margin: 0 0 16px;
  padding: 8px 11px;
  color: var(--blue);
  background: var(--blue-soft);
  border: 1px solid #c7dceb;
  border-radius: 5px;
}

.forge-contract-lock .icon {
  width: 16px;
  height: 16px;
}

.forge-contract-lock span {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.forge-contract-lock strong {
  color: var(--ink-soft);
  font-size: 11px;
}

.forge-arm-note {
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 13px;
  padding: 9px 10px;
  color: #684b16;
  background: var(--amber-soft);
  border: 1px solid #e7c980;
  border-radius: 5px;
  font-size: 10px;
  line-height: 1.45;
}

.forge-arm-note .icon {
  width: 14px;
  height: 14px;
  margin-top: 1px;
}

.forge-wallet-table-wrap {
  max-height: 460px;
  background: var(--surface);
}

.forge-empty-state {
  min-height: 420px;
}

.work-grid {
  display: grid;
  grid-template-columns: minmax(280px, 350px) minmax(0, 1fr);
  min-height: 530px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
}

.control-pane,
.result-pane {
  min-width: 0;
  padding: 22px;
}

.control-pane {
  align-self: stretch;
  border-right: 1px solid var(--line);
  background: var(--surface-soft);
}

.result-pane {
  display: flex;
  flex-direction: column;
}

.pane-heading {
  min-height: 44px;
  margin-bottom: 22px;
}

.result-heading {
  margin-bottom: 16px;
}

.network-label,
.job-status {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  color: var(--blue);
  background: var(--blue-soft);
  border-radius: 4px;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.result-heading-actions,
.result-toolbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
}

.job-status[data-tone="green"] {
  color: var(--green);
  background: var(--green-soft);
}

.job-status[data-tone="amber"] {
  color: var(--amber);
  background: var(--amber-soft);
}

.job-status[data-tone="red"] {
  color: var(--red);
  background: var(--red-soft);
}

.job-status[data-tone="gray"] {
  color: var(--ink-soft);
  background: #edf1ef;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 16px;
}

.mode-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 16px;
}

.mode-field > span {
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 750;
}

.mode-segmented {
  width: 100%;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.sale-segmented {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.sale-segmented .segment {
  font-size: 11px;
  padding: 0 6px;
}

.mode-segmented .segment {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.mode-segmented .icon {
  width: 14px;
  height: 14px;
}

.field > span:not(.input-action),
.select-field > span {
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 750;
}

.field input,
.field textarea,
.field select,
.select-field select {
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  color: var(--ink);
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: var(--surface);
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.field textarea {
  min-height: 210px;
  resize: vertical;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  line-height: 1.6;
}

#whitelistCredentials {
  min-height: 150px;
}

.control-details {
  margin: 0 0 16px;
  padding: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.control-details summary {
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--ink-soft);
  cursor: pointer;
  font-size: 12px;
  font-weight: 750;
  list-style: none;
}

.control-details summary::-webkit-details-marker {
  display: none;
}

.control-details summary::after {
  content: "+";
  color: var(--muted);
  font-size: 16px;
}

.control-details[open] summary::after {
  content: "-";
}

.control-details summary small {
  margin-left: auto;
  margin-right: 10px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
}

.control-details > .field {
  margin-bottom: 12px;
}

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

.protection-grid .field:last-child {
  grid-column: 1 / -1;
}

.field input:hover,
.field textarea:hover,
.field select:hover,
.select-field select:hover {
  border-color: #95aaa5;
}

.field input:focus,
.field textarea:focus,
.field select:focus,
.select-field select:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.1);
}

.field small {
  color: var(--muted);
  font-size: 10px;
}

.input-action {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  gap: 7px;
}

.input-action .icon-button {
  width: 42px;
  height: 42px;
  background: var(--surface);
}

.target-status[data-tone="success"] {
  color: var(--green);
}

.target-status[data-tone="error"] {
  color: var(--red);
}

.target-status[data-tone="loading"] {
  color: var(--amber);
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.field-row.is-single {
  grid-template-columns: 1fr;
}

.selected-stage-banner {
  min-height: 54px;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  margin: -4px 0 16px;
  padding: 10px 12px;
  color: var(--teal-dark);
  background: var(--teal-soft);
  border: 1px solid #abd7cf;
  border-radius: 5px;
}

.selected-stage-banner[hidden] {
  display: none;
}

.selected-stage-banner .icon {
  width: 20px;
  height: 20px;
}

.selected-stage-banner span,
.selected-stage-banner strong,
.selected-stage-banner small {
  min-width: 0;
  display: block;
}

.selected-stage-banner strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.selected-stage-banner small {
  margin-top: 3px;
  color: var(--ink-soft);
  font-size: 10px;
  line-height: 1.4;
}

.selected-wallet-summary {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 4px 0 16px;
  padding: 0 13px;
  color: var(--ink-soft);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 5px;
  font-size: 12px;
}

.selected-wallet-summary strong {
  color: var(--teal-dark);
  font-size: 18px;
}

.empty-state {
  min-height: 360px;
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--muted);
  text-align: center;
}

.empty-state strong {
  color: var(--ink-soft);
  font-size: 14px;
}

.empty-state > span:last-child {
  font-size: 12px;
}

.empty-visual {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  margin-bottom: 6px;
  color: var(--teal);
  background: var(--teal-soft);
  border-radius: 6px;
}

.empty-visual .icon {
  width: 25px;
  height: 25px;
}

.job-content {
  min-width: 0;
  display: flex;
  flex: 1;
  flex-direction: column;
}

.task-progress {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
  padding: 12px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 5px;
}

.task-phase {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
}

.task-phase-marker {
  width: 28px;
  height: 28px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  color: var(--muted);
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--surface);
}

.task-phase-marker .icon {
  width: 13px;
  height: 13px;
}

.task-phase > span:last-child {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.task-phase small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
}

.task-phase strong {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-phase.is-current {
  color: var(--teal-dark);
}

.task-phase.is-current .task-phase-marker {
  color: var(--teal-dark);
  border-color: #82aaa3;
  background: var(--teal-soft);
}

.task-phase.is-current strong {
  color: var(--ink);
}

.task-phase.is-complete .task-phase-marker {
  color: var(--green);
  border-color: #9dcbb1;
  background: var(--green-soft);
}

.task-phase.is-complete strong {
  color: var(--ink-soft);
}

.job-summary,
.result-overview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

.summary-item {
  min-height: 58px;
  padding: 10px 12px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 5px;
}

.summary-item span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.summary-item strong {
  display: block;
  margin-top: 6px;
  overflow: hidden;
  color: var(--ink);
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.table-wrap {
  width: 100%;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 5px;
}

.table-wrap-large {
  max-height: calc(100vh - 305px);
  min-height: 380px;
  background: var(--surface);
}

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

.mint-wallet-table {
  min-width: 1040px;
}

th,
td {
  height: 45px;
  padding: 8px 11px;
  border-bottom: 1px solid #e9eeec;
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: var(--muted);
  background: #f6f9f8;
  font-size: 10px;
  font-weight: 800;
}

td {
  color: var(--ink-soft);
  font-size: 11px;
}

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

tbody tr:hover td {
  background: #fbfcfc;
}

.status-pill {
  min-height: 23px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0 8px;
  color: var(--blue);
  background: var(--blue-soft);
  border-radius: 4px;
  font-size: 10px;
  font-weight: 800;
}

.status-pill.is-green {
  color: var(--green);
  background: var(--green-soft);
}

.status-pill.is-amber {
  color: var(--amber);
  background: var(--amber-soft);
}

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

.status-pill.is-gray {
  color: var(--ink-soft);
  background: #edf1ef;
}

.status-pill .icon {
  width: 12px;
  height: 12px;
}

.text-error {
  max-width: 260px;
  overflow: hidden;
  color: var(--red);
  text-overflow: ellipsis;
}

.row-note {
  max-width: 260px;
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
}

.hash-cell,
.token-list {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.mini-copy {
  width: 26px;
  height: 26px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  color: var(--muted);
  border: 0;
  background: transparent;
}

.mini-copy:hover {
  color: var(--teal);
}

.mini-copy .icon {
  width: 14px;
  height: 14px;
}

.action-bar {
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: auto;
  padding-top: 14px;
  color: var(--muted);
  font-size: 11px;
}

.section-toolbar {
  min-height: 68px;
  padding: 14px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px 6px 0 0;
}

.select-field {
  display: flex;
  align-items: center;
  gap: 10px;
}

.select-field select {
  width: min(420px, 45vw);
  min-height: 36px;
  padding: 6px 10px;
}

.result-overview {
  margin: 0;
  padding: 14px;
  background: var(--surface);
  border-right: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.collect-grid {
  min-height: 560px;
}

.modal {
  width: min(600px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  padding: 0;
  color: var(--ink);
  border: 0;
  border-radius: 7px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.modal::backdrop {
  background: rgba(12, 20, 18, 0.58);
  backdrop-filter: blur(2px);
}

.modal-shell {
  padding: 22px;
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 20px;
}

.import-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 11px;
}

.import-meta span:last-child {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.import-meta .icon {
  width: 13px;
  height: 13px;
  color: var(--teal);
}

.modal-confirm {
  width: min(500px, calc(100vw - 32px));
}

.modal-confirm .modal-shell {
  text-align: center;
}

.confirm-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  margin: 0 auto 14px;
  color: var(--red);
  background: var(--red-soft);
  border-radius: 6px;
}

.confirm-icon .icon {
  width: 25px;
  height: 25px;
}

.modal-confirm p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.stop-safety-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 11px;
  color: var(--red-dark);
  background: var(--red-soft);
  border: 1px solid #f0c0bb;
  border-radius: 5px;
  text-align: left;
  font-size: 11px;
  line-height: 1.45;
}

.stop-safety-note .icon {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
}

.confirm-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  margin: 18px 0;
  overflow: hidden;
  text-align: left;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 5px;
}

.confirm-details div {
  min-width: 0;
  padding: 10px 11px;
  background: var(--surface-soft);
}

.confirm-details dt {
  color: var(--muted);
  font-size: 10px;
}

.confirm-details dd {
  margin: 4px 0 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 12px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.confirm-check {
  justify-content: center;
}

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

.toast {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  min-height: 52px;
  padding: 10px 12px;
  color: #f6fbf9;
  background: #1f2c2a;
  border: 1px solid #394945;
  border-radius: 6px;
  box-shadow: var(--shadow);
}

.toast.is-error {
  background: #471f1b;
  border-color: #74362f;
}

.toast .icon {
  width: 17px;
  height: 17px;
  color: #78c9b8;
}

.toast.is-error .icon {
  color: #ffaaa2;
}

.toast span {
  min-width: 0;
  font-size: 12px;
  line-height: 1.4;
}

.toast button {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  padding: 0;
  color: #b8c6c3;
  border: 0;
  background: transparent;
}

.is-loading .icon {
  animation: spin 800ms linear infinite;
}

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

[hidden] {
  display: none !important;
}

@media (max-width: 1080px) {
  .topbar {
    grid-template-columns: 1fr auto;
  }

  .topbar-actions {
    grid-column: 2;
    grid-row: 1;
  }

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

  .wallet-sidebar {
    top: 114px;
    height: calc(100vh - 114px);
    max-height: calc(100vh - 114px);
  }

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

  .job-summary,
  .result-overview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .intel-metric:nth-child(3) {
    border-right: 0;
  }

  .intel-metric:nth-child(-n + 3) {
    border-bottom: 1px solid var(--line);
  }

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

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

  .forge-metric:nth-child(3) {
    border-right: 0;
  }

  .forge-metric:nth-child(-n + 3) {
    border-bottom: 1px solid var(--line);
  }
}

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

  .wallet-sidebar {
    position: static;
    height: auto;
    max-height: none;
    min-height: 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .wallet-list {
    max-height: 250px;
  }

  .sidebar-footer {
    display: none;
  }

  .workspace {
    padding: 16px;
  }

  .work-grid {
    display: block;
  }

  .control-pane {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

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

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

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

  .forge-stage-grid {
    grid-template-columns: 1fr;
  }

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

  .metric:nth-child(2) {
    border-right: 0;
  }

  .metric:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 560px) {
  .topbar {
    position: static;
    grid-template-columns: 1fr;
    gap: 9px;
    padding: 12px;
  }

  .topbar-actions {
    grid-column: 1;
    grid-row: auto;
    justify-content: stretch;
  }

  .topbar-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
  }

  .chain-select select {
    width: 100%;
    min-width: 0;
  }

  .status-button {
    justify-content: center;
  }

  .workspace {
    padding: 12px;
  }

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

  .metric strong {
    font-size: 22px;
  }

  .tabs {
    justify-content: stretch;
  }

  .tab {
    min-width: 0;
    flex: 1;
    padding: 0 8px;
    font-size: 11px;
  }

  .control-pane,
  .result-pane {
    padding: 16px;
  }

  .button,
  .button-small {
    min-height: 44px;
  }

  .field-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

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

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

  .forge-metric,
  .forge-metric:nth-child(3) {
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
  }

  .forge-metric:nth-child(even) {
    border-right: 0;
  }

  .forge-title-actions {
    width: 100%;
  }

  .forge-title-actions .button {
    flex: 1;
  }

  .intel-metric,
  .intel-metric:nth-child(3) {
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
  }

  .intel-metric:nth-child(even) {
    border-right: 0;
  }

  .intel-metric:last-child {
    grid-column: 1 / -1;
    border-right: 0;
    border-bottom: 0;
  }

  .intelligence-actions {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
  }

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

  .protection-grid .field:last-child {
    grid-column: auto;
  }

  .sale-segmented {
    grid-auto-flow: row;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mode-segmented {
    grid-auto-flow: row;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #forgePhaseSwitcher {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .pane-heading,
  .section-toolbar {
    align-items: flex-start;
  }

  .result-heading {
    flex-direction: column;
  }

  .result-heading-actions,
  .result-toolbar-actions {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
  }

  .result-heading-actions .button,
  .result-toolbar-actions .button {
    width: 100%;
  }

  .section-toolbar {
    flex-direction: column;
  }

  .select-field {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
  }

  .select-field select {
    width: 100%;
  }

  .job-summary,
  .result-overview {
    grid-template-columns: 1fr 1fr;
  }

  .task-progress {
    grid-template-columns: 1fr;
  }

  .action-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .action-bar .button {
    width: 100%;
  }

  .modal-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

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

@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;
  }
}
