:root {
  color-scheme: light;
  font-family: Inter, "SF Pro Text", "PingFang SC", "Microsoft YaHei", sans-serif;
  --bg: #f4f7fb;
  --surface: #ffffff;
  --surface-soft: #f8fafd;
  --ink: #172033;
  --ink-2: #344054;
  --muted: #667085;
  --muted-2: #98a2b3;
  --line: #e4eaf1;
  --line-strong: #d6deea;
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --blue-soft: #edf4ff;
  --cyan: #35a9f2;
  --green: #14875d;
  --green-soft: #eaf8f2;
  --amber: #b7791f;
  --amber-soft: #fff8e7;
  --red: #c23b3b;
  --red-soft: #fff0f0;
  --shadow-sm: 0 2px 10px rgba(25, 42, 70, 0.05);
  --shadow-md: 0 14px 40px rgba(27, 50, 86, 0.08);
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

.login-screen {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
  background: radial-gradient(circle at 50% 0%, #eaf2ff 0, transparent 38%), var(--bg);
}

.login-card {
  width: min(390px, 100%);
  padding: 30px;
  border: 1px solid #d9e3f1;
  border-radius: 20px;
  background: white;
  box-shadow: 0 24px 70px rgba(27, 50, 86, 0.13);
}

.login-logo {
  display: block;
  width: 76px;
  height: 56px;
  margin: -4px 0 18px;
  object-fit: cover;
}

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

.login-card h1 {
  margin-top: 7px;
  font-size: 26px;
}

.login-card p {
  margin-top: 9px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.7;
}

.login-card form {
  display: grid;
  gap: 13px;
  margin-top: 22px;
}

.login-card .field {
  grid-column: 1 / -1;
}

.login-card .primary-button {
  margin-top: 4px;
}

.login-loading {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 24px;
  padding: 13px;
  border-radius: 10px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 10px;
  font-weight: 750;
}

.login-security-note {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin-top: 15px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 9px;
  line-height: 1.55;
}

.login-security-note .icon {
  flex: 0 0 auto;
  margin-top: 1px;
  color: var(--green);
}

button,
input,
textarea,
select {
  font: inherit;
}

button,
select {
  cursor: pointer;
}

button {
  color: inherit;
}

.icon {
  display: block;
  flex: 0 0 auto;
}

.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-header {
  position: sticky;
  z-index: 20;
  top: 0;
  border-bottom: 1px solid rgba(214, 222, 234, 0.9);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(18px);
}

.header-inner {
  display: flex;
  width: min(1120px, calc(100% - 40px));
  min-height: 70px;
  align-items: center;
  justify-content: space-between;
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: inherit;
  text-decoration: none;
}

.brand-logo {
  display: block;
  width: 44px;
  height: 34px;
  object-fit: cover;
}

.brand-mark {
  position: relative;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 11px;
  background: var(--blue);
  box-shadow: 0 7px 18px rgba(37, 99, 235, 0.22);
}

.brand-mark i {
  position: absolute;
  width: 18px;
  height: 4px;
  transform: rotate(-24deg);
  border-radius: 8px;
  background: white;
}

.brand-mark i:first-child {
  transform: translateY(-6px) rotate(-24deg);
  opacity: 0.58;
}

.brand-mark i:last-child {
  transform: translateY(6px) rotate(-24deg);
  opacity: 0.76;
}

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

.brand strong {
  font-size: 15px;
  letter-spacing: -0.01em;
}

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

.admin-area {
  display: flex;
  align-items: center;
  gap: 12px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 3px;
  margin-left: auto;
  margin-right: 18px;
}

.desktop-nav button {
  padding: 7px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

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

.session-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border: 1px solid #cfeadd;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 11px;
}

.session-pill strong {
  color: #0e6745;
  font-variant-numeric: tabular-nums;
}

.admin-profile {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 6px 5px 5px;
  border: 0;
  border-radius: 12px;
  background: transparent;
}

.admin-profile:hover {
  background: var(--surface-soft);
}

.avatar {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 10px;
  background: #e9effa;
  color: #34507c;
  font-size: 12px;
  font-weight: 800;
}

.admin-copy {
  text-align: left;
}

.admin-copy strong {
  font-size: 12px;
}

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

.page-shell {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 38px 0 70px;
}

.page-intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 16px;
}

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

.page-intro h1 {
  font-size: clamp(19px, 2vw, 24px);
  line-height: 1.15;
  letter-spacing: -0.025em;
}

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

.project-compact {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 7px;
}

.compact-project-label {
  color: var(--muted-2);
  font-size: 9px;
  font-weight: 700;
  white-space: nowrap;
}

.compact-select-wrap {
  position: relative;
  min-width: 188px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.compact-select-wrap:focus-within {
  border-color: #a9c5f8;
  box-shadow: 0 0 0 3px rgba(53, 112, 225, 0.08);
}

.compact-select-wrap select {
  width: 100%;
  padding: 8px 28px 8px 10px;
  border: 0;
  outline: 0;
  appearance: none;
  background: transparent;
  color: var(--ink);
  font-size: 11px;
  font-weight: 760;
}

.compact-select-wrap .select-arrow {
  right: 7px;
  top: 50%;
  transform: translateY(-50%);
}

.compact-chain-state {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--green);
  font-size: 9px;
  font-weight: 750;
  white-space: nowrap;
}

.compact-chain-state.offline {
  color: var(--amber);
}

.compact-chain-state.offline .online-dot {
  background: #dfa342;
  box-shadow: 0 0 0 3px rgba(223, 163, 66, 0.12);
}

.compact-manage-button {
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: var(--surface);
  color: var(--muted);
}

.project-monitor {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 11px;
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow-sm);
}

.monitor-heading {
  width: 92px;
  flex: 0 0 auto;
}

.monitor-heading span,
.monitor-heading small {
  display: block;
}

.monitor-heading span {
  font-size: 10px;
  font-weight: 800;
}

.monitor-heading small {
  margin-top: 3px;
  overflow: hidden;
  color: var(--muted-2);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.monitor-metrics {
  display: grid;
  min-width: 0;
  flex: 1;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.monitor-metric {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
  padding: 2px 13px;
  border-left: 1px solid var(--line);
}

.monitor-icon {
  display: grid;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 9px;
  background: var(--blue-soft);
  color: var(--blue);
}

.project-monitor.healthy .monitor-metric:first-child .monitor-icon {
  background: var(--green-soft);
  color: var(--green);
}

.monitor-metric small,
.monitor-metric strong,
.monitor-metric em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.monitor-metric strong {
  margin-top: 1px;
  font-size: 12px;
}

.monitor-metric em {
  margin-top: 1px;
  color: var(--muted-2);
  font-size: 7px;
  font-style: normal;
}

.prototype-tag,
.overline {
  color: var(--blue);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.outline-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 700;
  box-shadow: var(--shadow-sm);
}

.project-card {
  padding: 21px 22px 18px;
  border: 1px solid #d9e3f1;
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.project-topline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.project-select-wrap {
  position: relative;
  display: flex;
  min-width: 420px;
  align-items: center;
  gap: 10px;
  margin-top: 7px;
  padding: 5px 10px 5px 6px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--surface-soft);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.project-select-wrap:hover,
.project-select-wrap:focus-within {
  border-color: #a9c5f8;
  background: var(--surface);
  box-shadow: 0 0 0 3px rgba(53, 112, 225, 0.08);
}

.project-select-wrap select {
  width: 100%;
  padding: 5px 32px 5px 0;
  border: 0;
  outline: 0;
  appearance: none;
  background: transparent;
  color: var(--ink);
  font-size: 19px;
  font-weight: 760;
  letter-spacing: -0.02em;
}

.select-arrow {
  position: absolute;
  right: 4px;
  color: var(--muted);
  pointer-events: none;
}

.network-state {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 11px;
  font-weight: 700;
}

.project-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.network-state.offline {
  background: var(--amber-soft);
  color: var(--amber);
}

.network-state.offline .online-dot {
  background: #dfa342;
  box-shadow: 0 0 0 4px rgba(223, 163, 66, 0.12);
}

.manage-projects-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 9px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: var(--surface);
  color: var(--ink-2);
  font-size: 10px;
  font-weight: 750;
}

.online-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #20ad78;
  box-shadow: 0 0 0 4px rgba(32, 173, 120, 0.12);
}

.contract-line {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 17px;
  padding-top: 15px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
}

.contract-line code {
  min-width: 0;
  color: var(--ink-2);
  font-family: "SFMono-Regular", Consolas, monospace;
  overflow-wrap: anywhere;
}

.network-badge {
  padding: 5px 8px;
  border-radius: 7px;
  background: var(--blue-soft);
  color: var(--blue);
  font-weight: 750;
}

.meta-separator {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--muted-2);
}

.icon-button {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  border: 0;
  border-radius: 7px;
  background: var(--surface-soft);
  color: var(--muted);
}

.project-guard {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 11px 0 0;
  color: var(--muted);
  font-size: 10px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 14px 0 24px;
}

.stat-card {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 11px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.stat-icon {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 10px;
  background: var(--blue-soft);
  color: var(--blue);
}

.stat-card.has-alert .stat-icon {
  background: var(--red-soft);
  color: var(--red);
}

.stat-card span,
.stat-card strong,
.stat-card small {
  display: inline;
}

.stat-card span {
  display: block;
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 10px;
}

.stat-card strong {
  font-size: 18px;
  letter-spacing: -0.025em;
}

.stat-card small {
  margin-left: 4px;
  color: var(--muted-2);
  font-size: 9px;
}

.workspace {
  display: block;
}

.operation-tabs {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.operation-tab {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
}

.operation-tab:hover {
  background: var(--surface-soft);
}

.operation-tab.active {
  background: var(--blue-soft);
  color: var(--blue);
}

.operation-tab .operation-icon {
  width: 27px;
  height: 27px;
  border: 0;
  background: transparent;
  color: currentColor;
}

.operation-tab strong {
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.operation-rail,
.execution-card,
.activity-card {
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.operation-rail {
  padding: 13px;
}

.rail-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 7px 11px;
}

.rail-heading span {
  font-size: 12px;
  font-weight: 800;
}

.rail-heading small {
  color: var(--muted-2);
  font-size: 9px;
}

.operation-list {
  display: grid;
  gap: 5px;
}

.operation-item {
  display: grid;
  grid-template-columns: 36px 1fr 16px;
  gap: 10px;
  width: 100%;
  align-items: center;
  padding: 10px;
  border: 1px solid transparent;
  border-radius: 11px;
  background: transparent;
  text-align: left;
}

.operation-item:hover {
  background: var(--surface-soft);
}

.operation-item.active {
  border-color: #cfe0ff;
  background: var(--blue-soft);
  color: var(--blue-dark);
}

.operation-icon {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--muted);
}

.operation-item.active .operation-icon {
  border-color: #c9dcff;
  color: var(--blue);
}

.operation-item strong,
.operation-item small {
  display: block;
}

.operation-item strong {
  font-size: 12px;
}

.operation-item small {
  margin-top: 3px;
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.operation-item > .icon {
  color: var(--muted-2);
}

.permission-note {
  display: flex;
  gap: 9px;
  margin-top: 14px;
  padding: 12px;
  border-radius: 11px;
  background: var(--green-soft);
  color: var(--green);
}

.permission-note strong,
.permission-note span {
  display: block;
}

.permission-note strong {
  font-size: 10px;
}

.permission-note span {
  margin-top: 3px;
  color: #4d866f;
  font-size: 9px;
}

.execution-card {
  min-width: 0;
  margin-top: 11px;
  padding: 19px;
}

.execution-card form {
  margin-top: 18px;
}

.execution-header,
.execution-title,
.result-heading,
.user-result-head,
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.execution-title {
  justify-content: flex-start;
  gap: 11px;
}

.operation-icon.large {
  width: 42px;
  height: 42px;
  border-color: #cfe0ff;
  background: var(--blue-soft);
  color: var(--blue);
}

.execution-header h2,
.section-heading h2 {
  margin: 3px 0 0;
  font-size: 17px;
  letter-spacing: -0.015em;
}

.risk-pill {
  padding: 6px 9px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 9px;
  font-weight: 800;
}

.risk-transfer {
  background: var(--red-soft);
  color: var(--red);
}

.risk-chainup {
  background: var(--amber-soft);
  color: var(--amber);
}

.function-context {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 17px 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-soft);
  font-size: 11px;
}

.function-context code {
  color: var(--muted);
  font-family: "SFMono-Regular", Consolas, monospace;
}

.function-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cyan);
}

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

.field {
  min-width: 0;
}

.field-wide {
  grid-column: 1 / -1;
}

.field > span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 7px;
  color: var(--ink-2);
  font-size: 10px;
  font-weight: 750;
}

.field > span small {
  color: var(--muted-2);
  font-size: 8px;
  font-weight: 500;
}

.field input,
.field textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  outline: none;
  background: var(--surface);
  color: var(--ink);
  transition: border-color 120ms ease, box-shadow 120ms ease;
}

.field input {
  height: 43px;
  padding: 0 12px;
  font-size: 12px;
}

.field textarea {
  min-height: 112px;
  padding: 12px;
  resize: vertical;
  font-size: 11px;
  line-height: 1.65;
}

.field input:focus,
.field textarea:focus {
  border-color: #8ab2ff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.09);
}

.data-format-help {
  margin: 12px 0;
  padding: 10px 12px;
  border: 1px solid #d6e4fb;
  border-radius: 10px;
  background: #f7faff;
  color: var(--ink-2);
}

.data-format-help summary {
  cursor: pointer;
  color: var(--blue);
  font-size: 9px;
  font-weight: 750;
}

.data-format-help p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.7;
}

.resolved-user {
  display: grid;
  gap: 5px;
  margin: 12px 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--surface-soft);
}

.resolved-user span {
  color: var(--muted);
  font-size: 9px;
}

.resolved-user code {
  overflow-wrap: anywhere;
  color: var(--ink-2);
  font-size: 9px;
}

.mono {
  font-family: "SFMono-Regular", Consolas, monospace;
}

.inline-notice {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 13px;
  padding: 10px 11px;
  border-radius: 9px;
  background: var(--blue-soft);
  color: #41648f;
  font-size: 9px;
  line-height: 1.55;
}

.inline-notice.warning {
  background: var(--amber-soft);
  color: #866427;
}

.inline-notice.danger {
  background: var(--red-soft);
  color: #9d4646;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  min-height: 43px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: 15px;
  padding: 0 17px;
  border: 0;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 800;
}

.primary-button {
  width: 100%;
  background: var(--blue);
  color: white;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.16);
}

.primary-button:hover {
  background: var(--blue-dark);
}

.danger-button {
  background: var(--red);
  box-shadow: 0 8px 18px rgba(194, 59, 59, 0.15);
}

.query-options {
  display: flex;
  gap: 9px;
  margin-top: 13px;
}

.query-options label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--ink-2);
  font-size: 9px;
}

.query-options input {
  accent-color: var(--blue);
}

.result-panel {
  margin-top: 17px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
}

.empty-result {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 76px;
}

.empty-result-icon {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 10px;
  background: white;
  color: var(--muted-2);
  box-shadow: var(--shadow-sm);
}

.empty-result strong,
.empty-result span {
  display: block;
}

.empty-result strong {
  font-size: 11px;
}

.empty-result span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 9px;
}

.success-result,
.review-result {
  border-color: #cfeadd;
  background: #fbfefc;
}

.review-result {
  border-color: #d6e2f5;
  background: #fbfdff;
}

.transfer-review {
  border-color: #f2caca;
  background: #fffafa;
}

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

.result-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--green);
  font-size: 9px;
  font-weight: 800;
}

.result-status.pending {
  color: var(--amber);
}

.danger-text {
  color: var(--red);
}

.result-heading time,
.review-badge {
  color: var(--muted-2);
  font-size: 8px;
}

.review-badge {
  padding: 5px 7px;
  border-radius: 999px;
  background: white;
  font-weight: 700;
}

.result-panel h3 {
  margin: 0 0 11px;
  font-size: 13px;
  letter-spacing: -0.01em;
}

.result-data {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: white;
}

.result-data span {
  color: var(--muted);
  font-size: 8px;
}

.result-data code,
.chain-preview {
  overflow-wrap: anywhere;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 9px;
}

.result-data button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 8px;
  border: 0;
  border-radius: 7px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 8px;
  font-weight: 800;
}

.chain-preview {
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: white;
  color: var(--ink-2);
  line-height: 1.7;
}

.secondary-button {
  min-height: 36px;
  margin-top: 11px;
  background: var(--blue-soft);
  color: var(--blue);
}

.danger-solid {
  background: var(--red);
  color: white;
}

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

.result-grid > div {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: white;
}

.result-grid span,
.result-grid strong {
  display: block;
}

.result-grid span {
  color: var(--muted);
  font-size: 8px;
}

.result-grid strong {
  margin-top: 5px;
  overflow: hidden;
  font-size: 10px;
  text-overflow: ellipsis;
}

.mono-small {
  font-family: "SFMono-Regular", Consolas, monospace;
}

.transfer-route {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 10px;
  align-items: center;
}

.transfer-route div {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: white;
}

.transfer-route span,
.transfer-route strong {
  display: block;
}

.transfer-route span {
  color: var(--muted);
  font-size: 8px;
}

.transfer-route strong {
  margin-top: 4px;
  font-size: 10px;
}

.transfer-route b {
  color: var(--red);
}

.transfer-review p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 8px;
}

.user-result-head {
  justify-content: flex-start;
  gap: 10px;
  margin-bottom: 12px;
}

.user-avatar {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 10px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
}

.user-result-head h3 {
  margin: 0;
}

.user-result-head div:nth-child(2) span {
  color: var(--muted);
  font-size: 8px;
}

.live-asset,
.live-holdings,
.live-transfers {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.live-asset > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.live-asset span,
.live-holdings > span,
.live-transfers > span {
  color: var(--muted);
  font-size: 8px;
  font-weight: 700;
}

.live-asset strong {
  color: var(--blue);
  font-size: 11px;
}

.live-asset pre {
  max-height: 210px;
  margin: 9px 0 0;
  overflow: auto;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-soft);
  color: var(--ink-2);
  font-family: inherit;
  font-size: 9px;
  line-height: 1.7;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.live-holdings > div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.live-holdings b {
  padding: 5px 7px;
  border-radius: 7px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 8px;
}

.live-holdings em,
.live-transfers em {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 9px;
  font-style: normal;
}

.live-transfers > div {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto;
  gap: 8px;
  align-items: center;
  min-height: 34px;
  border-bottom: 1px solid var(--line);
}

.live-transfers code,
.live-transfers time {
  color: var(--ink-2);
  font-size: 8px;
}

.live-transfers time {
  color: var(--muted);
}

.verified-badge {
  margin-left: auto;
  padding: 5px 7px;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 8px;
  font-weight: 800;
}

.activity-card {
  margin-top: 14px;
  padding: 18px;
}

.task-activity {
  margin-top: 18px;
  padding-top: 17px;
  border-top: 1px solid var(--line);
}

.task-activity .activity-table {
  margin-bottom: -4px;
}

.section-heading button {
  border: 0;
  background: transparent;
  color: var(--blue);
  font-size: 10px;
  font-weight: 750;
}

.activity-table {
  margin-top: 14px;
  border-top: 1px solid var(--line);
}

.activity-row {
  display: grid;
  grid-template-columns: 8px 1fr 1.5fr auto;
  gap: 12px;
  align-items: center;
  min-height: 54px;
  border-bottom: 1px solid var(--line);
}

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

.activity-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
}

.activity-dot.pending {
  background: #e9a23b;
}

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

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

.activity-row small,
.activity-row code {
  margin-top: 3px;
  color: var(--muted);
  font-size: 8px;
}

.activity-row code {
  font-family: "SFMono-Regular", Consolas, monospace;
}

.activity-status {
  padding: 5px 7px;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 8px;
  font-weight: 800;
}

.activity-status.pending {
  background: var(--amber-soft);
  color: var(--amber);
}

.activity-status.danger {
  background: var(--red-soft);
  color: var(--red);
}

.module-page {
  margin-top: 14px;
  padding: 22px;
  border: 1px solid #d9e3f1;
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.module-toolbar,
.account-card,
.security-grid article,
.audit-item,
.task-item {
  display: flex;
  align-items: center;
}

.module-toolbar {
  justify-content: space-between;
  gap: 18px;
}

.module-toolbar h2,
.module-toolbar p {
  margin: 0;
}

.module-toolbar h2 {
  margin-top: 5px;
  font-size: 22px;
  letter-spacing: -0.025em;
}

.module-toolbar p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 10px;
}

.module-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 12px;
  border: 1px solid #c9d9f4;
  border-radius: 10px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 10px;
  font-weight: 750;
}

.module-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 18px;
}

.module-summary div {
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface-soft);
}

.module-summary span,
.module-summary strong {
  display: block;
}

.module-summary span {
  color: var(--muted);
  font-size: 9px;
}

.module-summary strong {
  margin-top: 5px;
  font-size: 20px;
}

.segment-control {
  display: inline-flex;
  gap: 3px;
  margin-top: 16px;
  padding: 3px;
  border-radius: 10px;
  background: #eef2f7;
}

.segment-control button {
  padding: 7px 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
}

.segment-control button.active {
  background: white;
  color: var(--blue);
  box-shadow: var(--shadow-sm);
}

.task-list,
.audit-list {
  margin-top: 14px;
  border-top: 1px solid var(--line);
}

.module-empty {
  display: flex;
  min-height: 82px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: var(--muted);
  font-size: 9px;
}

.task-item {
  gap: 12px;
  min-height: 78px;
  border-bottom: 1px solid var(--line);
}

.task-icon,
.setting-icon {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 10px;
  background: var(--green-soft);
  color: var(--green);
}

.task-icon.tone-pending {
  background: var(--amber-soft);
  color: var(--amber);
}

.task-icon.tone-danger {
  background: var(--red-soft);
  color: var(--red);
}

.task-main {
  min-width: 0;
  flex: 1;
}

.task-main > div {
  display: flex;
  align-items: center;
  gap: 7px;
}

.task-main strong,
.task-main h3,
.task-main p {
  margin: 0;
}

.task-main strong {
  font-size: 9px;
}

.task-main h3 {
  margin-top: 5px;
  font-size: 11px;
}

.task-main p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 8px;
}

.task-progress {
  height: 3px;
  margin-top: 7px;
  overflow: hidden;
  border-radius: 99px;
  background: #e8edf4;
}

.task-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--blue);
}

.task-progress.progress-20 i { width: 20%; }
.task-progress.progress-66 i { width: 66%; }
.task-progress.progress-100 i { width: 100%; }

.task-item > button {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 0;
  background: transparent;
  color: var(--muted);
}

.audit-filters {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 10px;
  margin-top: 18px;
}

.audit-filters label > span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 700;
}

.audit-filters select,
.audit-filters input {
  width: 100%;
  padding: 10px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  outline: 0;
  background: var(--surface-soft);
  color: var(--ink);
  font-size: 9px;
}

.audit-item {
  gap: 11px;
  min-height: 70px;
  border-bottom: 1px solid var(--line);
}

.audit-avatar,
.account-avatar {
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: var(--blue-soft);
  color: var(--blue);
  font-weight: 850;
}

.audit-avatar {
  width: 36px;
  height: 36px;
  font-size: 11px;
}

.audit-item > div:nth-child(2) {
  min-width: 0;
  flex: 1;
}

.audit-item strong,
.audit-item span,
.audit-item p {
  display: block;
  margin: 0;
}

.audit-item strong {
  font-size: 10px;
}

.audit-item span,
.audit-item p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 8px;
}

.audit-item b {
  padding: 5px 7px;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 8px;
}

.account-card {
  gap: 12px;
  margin-top: 18px;
  padding: 16px;
  border-radius: 13px;
  background: linear-gradient(135deg, #eef5ff, #f7fbff);
}

.account-avatar {
  width: 46px;
  height: 46px;
  font-size: 15px;
}

.account-card > div:nth-child(2) {
  flex: 1;
}

.account-card strong,
.account-card span {
  display: block;
}

.account-card strong {
  font-size: 12px;
}

.account-card span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 9px;
}

.account-card > b {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--green);
  font-size: 9px;
}

.security-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 12px;
}

.security-grid article {
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.setting-icon {
  background: var(--surface-soft);
  color: var(--blue);
}

.security-grid article > div:nth-child(2) {
  min-width: 0;
  flex: 1;
}

.security-grid strong,
.security-grid span {
  display: block;
}

.security-grid strong {
  font-size: 10px;
}

.security-grid span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 8px;
}

.security-grid button {
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--blue);
  font-size: 8px;
  font-weight: 750;
}

.permission-card,
.login-records {
  margin-top: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 13px;
}

.permission-card > .section-heading > span {
  color: var(--muted);
  font-size: 9px;
}

.permission-list {
  margin-top: 12px;
  border-top: 1px solid var(--line);
}

.permission-list > div,
.login-records > div:not(.section-heading) {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  border-bottom: 1px solid var(--line);
}

.permission-list > div:last-child,
.login-records > div:last-child {
  border-bottom: 0;
}

.permission-list span {
  flex: 1;
  color: var(--ink-2);
  font-size: 9px;
}

.permission-list span strong {
  display: inline-block;
  min-width: 58px;
  color: var(--blue);
}

.permission-list b {
  color: var(--green);
  font-size: 8px;
}

.login-records > div:not(.section-heading) span {
  min-width: 64px;
  color: var(--muted);
  font-size: 8px;
}

.login-records > div:not(.section-heading) strong {
  flex: 1;
  font-size: 9px;
}

.login-records time {
  color: var(--muted);
  font-size: 8px;
}

.mobile-nav {
  display: none;
}

body.modal-open {
  overflow: hidden;
}

.modal-backdrop {
  position: fixed;
  z-index: 70;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(23, 32, 51, 0.35);
  backdrop-filter: blur(5px);
}

.saas-manager {
  width: min(820px, 100%);
  max-height: min(760px, calc(100vh - 44px));
  overflow: auto;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 19px;
  background: var(--surface);
  box-shadow: 0 28px 80px rgba(22, 35, 60, 0.22);
}

.manager-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.manager-header h2,
.manager-header p {
  margin: 0;
}

.manager-header h2 {
  margin-top: 6px;
  font-size: 21px;
  letter-spacing: -0.025em;
}

.manager-header p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 10px;
}

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

.scope-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 18px;
}

.scope-summary > div {
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-soft);
}

.scope-summary span,
.scope-summary strong {
  display: block;
}

.scope-summary span {
  color: var(--muted);
  font-size: 8px;
}

.scope-summary strong {
  margin-top: 4px;
  font-size: 17px;
}

.manager-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 20px;
}

.manager-toolbar strong,
.manager-toolbar span {
  display: block;
}

.manager-toolbar strong {
  font-size: 12px;
}

.manager-toolbar span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 8px;
}

.manager-toolbar button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 10px;
  border: 0;
  border-radius: 9px;
  background: var(--blue);
  color: white;
  font-size: 9px;
  font-weight: 750;
}

.saas-add-form {
  margin-top: 12px;
  padding: 14px;
  border: 1px solid #cfe0ff;
  border-radius: 12px;
  background: #f8fbff;
}

.saas-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
}

.saas-form-actions button {
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  font-size: 9px;
  font-weight: 750;
}

.saas-form-actions button[type="submit"] {
  border-color: var(--blue);
  background: var(--blue);
  color: white;
}

.contract-preset-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.contract-preset {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
}

.contract-preset.needs-attention {
  border-style: dashed;
  background: #fffdfa;
}

.preset-id {
  display: grid;
  width: 50px;
  height: 50px;
  place-items: center;
  border-radius: 11px;
  background: var(--blue-soft);
  color: var(--blue);
}

.preset-id span,
.preset-id strong {
  display: block;
  text-align: center;
}

.preset-id span {
  align-self: end;
  font-size: 7px;
}

.preset-id strong {
  align-self: start;
  font-size: 15px;
}

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

.preset-title {
  display: flex;
  align-items: center;
  gap: 7px;
}

.preset-title strong {
  font-size: 10px;
}

.preset-status {
  padding: 4px 6px;
  border-radius: 999px;
  font-size: 7px;
  font-weight: 800;
}

.preset-status.enabled {
  background: var(--green-soft);
  color: var(--green);
}

.preset-status.disabled {
  background: var(--amber-soft);
  color: var(--amber);
}

.preset-main > span,
.preset-main code {
  display: block;
  margin-top: 4px;
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 8px;
}

.preset-main code {
  color: var(--ink-2);
  font-family: "SFMono-Regular", Consolas, monospace;
}

.preset-actions {
  display: flex;
  gap: 6px;
}

.preset-actions button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 7px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 8px;
  font-weight: 750;
}

.preset-actions .disable-action {
  color: var(--red);
}

.preset-actions .enable-action {
  color: var(--green);
}

.manager-safety {
  display: flex;
  gap: 9px;
  margin-top: 14px;
  padding: 12px;
  border-radius: 10px;
  background: var(--green-soft);
  color: var(--green);
}

.manager-safety strong,
.manager-safety span {
  display: block;
}

.manager-safety strong {
  font-size: 9px;
}

.manager-safety span {
  margin-top: 3px;
  color: #4d866f;
  font-size: 8px;
  line-height: 1.5;
}

.toast {
  position: fixed;
  z-index: 80;
  top: 82px;
  left: 50%;
  max-width: min(340px, calc(100% - 32px));
  padding: 10px 14px;
  transform: translate(-50%, -16px);
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #172033;
  color: white;
  font-size: 10px;
  font-weight: 700;
  opacity: 0;
  box-shadow: var(--shadow-md);
  transition: 160ms ease;
  pointer-events: none;
}

.toast.show {
  transform: translate(-50%, 0);
  opacity: 1;
}

@media (max-width: 760px) {
  .header-inner,
  .page-shell {
    width: calc(100% - 28px);
  }

  .header-inner {
    min-height: 62px;
  }

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

  .brand-logo {
    width: 40px;
    height: 31px;
  }

  .brand strong {
    font-size: 13px;
  }

  .brand small,
  .admin-copy,
  .session-pill span {
    display: none;
  }

  .admin-area {
    gap: 7px;
  }

  .desktop-nav {
    display: none;
  }

  .session-pill {
    padding: 6px 8px;
  }

  .admin-profile {
    padding: 0;
  }

  .admin-profile > .icon {
    display: none;
  }

  .avatar {
    width: 34px;
    height: 34px;
  }

  .page-shell {
    padding: 24px 0 112px;
  }

  .page-intro {
    display: block;
    margin-bottom: 18px;
  }

  .page-intro h1 {
    font-size: 20px;
  }

  .page-intro p {
    max-width: 340px;
    font-size: 11px;
    line-height: 1.6;
  }

  .outline-button {
    display: none;
  }

  .project-compact {
    width: 100%;
    margin-top: 13px;
  }

  .project-monitor {
    display: block;
    padding: 11px;
  }

  .monitor-heading {
    width: auto;
    margin-bottom: 9px;
  }

  .monitor-heading small {
    display: inline;
    margin-left: 5px;
  }

  .monitor-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }

  .monitor-metric {
    padding: 7px;
    border: 1px solid var(--line);
    border-radius: 10px;
  }

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

  .compact-select-wrap {
    min-width: 0;
    flex: 1;
  }

  .compact-select-wrap select {
    font-size: 10px;
  }

  .compact-chain-state {
    font-size: 8px;
  }

  .project-card {
    padding: 17px;
    border-radius: 16px;
  }

  .project-topline {
    display: block;
    gap: 10px;
  }

  .project-select-wrap {
    min-width: 0;
    width: 100%;
    max-width: none;
  }

  .project-select-wrap select {
    min-width: 0;
    font-size: 16px;
  }

  .project-controls {
    justify-content: space-between;
    margin-top: 12px;
  }

  .manage-projects-button {
    padding: 6px 8px;
    font-size: 9px;
  }

  .network-state {
    padding: 6px 8px;
    font-size: 9px;
    white-space: nowrap;
  }

  .contract-line {
    flex-wrap: wrap;
    gap: 7px;
  }

  .project-guard {
    align-items: flex-start;
    line-height: 1.5;
  }

  .module-page {
    padding: 17px;
    border-radius: 16px;
  }

  .module-toolbar {
    align-items: flex-start;
  }

  .module-toolbar h2 {
    font-size: 19px;
  }

  .module-toolbar p {
    max-width: 220px;
    line-height: 1.5;
  }

  .module-action {
    flex: 0 0 auto;
    padding: 8px 9px;
    font-size: 8px;
  }

  .module-summary {
    gap: 7px;
  }

  .module-summary div {
    padding: 11px 10px;
  }

  .module-summary strong {
    font-size: 17px;
  }

  .segment-control {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    width: 100%;
  }

  .segment-control button {
    padding: 7px 5px;
  }

  .task-item {
    gap: 9px;
    min-height: 82px;
  }

  .live-transfers > div {
    grid-template-columns: 1fr auto 1fr;
  }

  .live-transfers time {
    grid-column: 1 / -1;
    padding-bottom: 7px;
  }

  .task-icon {
    width: 34px;
    height: 34px;
  }

  .audit-filters,
  .security-grid {
    grid-template-columns: 1fr;
  }

  .account-card {
    padding: 13px;
  }

  .account-card > b {
    max-width: 82px;
    justify-content: flex-end;
    text-align: right;
  }

  .security-grid article {
    padding: 12px;
  }

  .permission-card,
  .login-records {
    padding: 14px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: 16px;
  }

  .stat-card {
    padding: 12px;
  }

  .workspace {
    display: block;
  }

  .operation-tabs {
    gap: 2px;
    padding: 3px;
  }

  .operation-tab {
    flex-direction: column;
    gap: 3px;
    padding: 7px 3px;
  }

  .operation-tab .operation-icon {
    width: 25px;
    height: 25px;
  }

  .operation-tab strong {
    font-size: 9px;
  }

  .operation-rail {
    margin-bottom: 10px;
    padding: 11px;
  }

  .rail-heading,
  .permission-note {
    display: none;
  }

  .operation-list {
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
  }

  .operation-item {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 6px;
    padding: 9px 5px;
    text-align: center;
  }

  .operation-item .operation-icon {
    width: 32px;
    height: 32px;
  }

  .operation-item strong {
    font-size: 9px;
    white-space: nowrap;
  }

  .operation-item small,
  .operation-item > .icon {
    display: none;
  }

  .execution-card {
    padding: 15px;
  }

  .execution-header h2 {
    font-size: 15px;
  }

  .operation-icon.large {
    width: 38px;
    height: 38px;
  }

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

  .field-wide {
    grid-column: auto;
  }

  .field > span {
    display: block;
  }

  .field > span small {
    display: block;
    margin-top: 3px;
  }

  .query-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
  }

  .query-options label {
    justify-content: center;
    padding: 8px 5px;
    font-size: 8px;
  }

  .result-data {
    grid-template-columns: 1fr auto;
  }

  .result-data > span {
    grid-column: 1 / -1;
  }

  .result-grid {
    gap: 5px;
  }

  .result-grid > div {
    padding: 8px;
  }

  .activity-card {
    padding: 15px;
  }

  .activity-row {
    grid-template-columns: 7px 1fr auto;
    gap: 9px;
  }

  .activity-row code {
    display: none;
  }

  .mobile-nav {
    position: fixed;
    z-index: 30;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    height: 72px;
    grid-template-columns: repeat(4, 1fr);
    padding: 7px 12px max(8px, env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(16px);
  }

  .mobile-nav button {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 4px;
    border: 0;
    background: transparent;
    color: var(--muted-2);
    font-size: 8px;
    font-weight: 700;
  }

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

  .mobile-nav i {
    position: absolute;
    top: 2px;
    left: calc(50% + 6px);
    display: grid;
    width: 14px;
    height: 14px;
    place-items: center;
    border: 2px solid white;
    border-radius: 50%;
    background: var(--red);
    color: white;
    font-size: 7px;
    font-style: normal;
  }

  .modal-backdrop {
    align-items: end;
    padding: 0;
  }

  .saas-manager {
    width: 100%;
    max-height: 92vh;
    padding: 18px 14px max(22px, env(safe-area-inset-bottom));
    border-radius: 20px 20px 0 0;
  }

  .manager-header h2 {
    font-size: 18px;
  }

  .manager-toolbar {
    align-items: flex-end;
  }

  .contract-preset {
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 9px;
  }

  .preset-id {
    width: 44px;
    height: 44px;
  }

  .preset-actions {
    grid-column: 2;
    justify-content: flex-end;
  }
}

@media (max-width: 390px) {
  .header-inner,
  .page-shell {
    width: calc(100% - 24px);
  }

  .compact-project-label {
    display: none;
  }

  .compact-chain-state {
    max-width: 55px;
    line-height: 1.2;
    white-space: normal;
  }

  .stat-icon {
    width: 30px;
    height: 30px;
  }

  .stat-card strong {
    font-size: 16px;
  }
}

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