.settings-shell {
  max-width: 980px;
  margin: 0 auto;
}

.settings-heading {
  margin-bottom: 1.5rem;
}

.settings-heading h1 {
  margin: 0.25rem 0 0.75rem;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 750;
}

.settings-lead,
.settings-note {
  color: var(--bs-secondary-color);
  max-width: 760px;
}

.settings-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 1rem;
}

.settings-section {
  margin-top: 2.25rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(23, 21, 43, 0.1);
}

.settings-section h2 {
  margin: 0.25rem 0 0.75rem;
  font-size: clamp(1.45rem, 3vw, 2rem);
}

.settings-card {
  border: 1px solid rgba(23, 21, 43, 0.1);
  border-radius: 1.25rem;
  background: #fff;
  padding: clamp(1.1rem, 3vw, 1.6rem);
  box-shadow: 0 0.5rem 1.5rem rgba(23, 21, 43, 0.05);
}

.settings-card h2 {
  margin-bottom: 1rem;
  font-size: 1.2rem;
  font-weight: 700;
}

.proxy-status {
  display: flex;
  gap: 0.8rem;
  align-items: flex-start;
  border-radius: 1rem;
  background: #f6f6fb;
  padding: 1rem;
}

.proxy-status p {
  margin: 0.25rem 0;
}

.proxy-status small {
  color: #6b687c;
  overflow-wrap: anywhere;
}

.proxy-health {
  display: grid;
  gap: 0.2rem;
  margin-top: 0.8rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid #d9d7e4;
  border-radius: 0.8rem;
  background: #fff;
}

.proxy-health span {
  color: #565267;
  font-size: 0.88rem;
}

.proxy-health-ok {
  border-color: #b8dfce;
  background: #eef9f4;
}

.proxy-health-failed {
  border-color: #ecc1c1;
  background: #fff2f2;
}

.proxy-check-form {
  margin-top: 0.75rem;
}

.proxy-check-form .btn {
  width: 100%;
}

.proxy-status-dot {
  width: 0.75rem;
  height: 0.75rem;
  margin-top: 0.32rem;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #7d7890;
}

.proxy-status-success .proxy-status-dot {
  background: #16865b;
}

.proxy-status-failed .proxy-status-dot,
.proxy-status-unavailable .proxy-status-dot {
  background: #b64141;
}

.proxy-status-queued .proxy-status-dot,
.proxy-status-processing .proxy-status-dot {
  background: #d28b16;
  box-shadow: 0 0 0 0.3rem rgba(210, 139, 22, 0.14);
}

.token-category-guide {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 0.7rem;
  margin: 1.25rem 0;
}

.token-category-guide > div {
  display: grid;
  gap: 0.2rem;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(23, 21, 43, 0.1);
  border-radius: 0.9rem;
  background: rgba(255, 255, 255, 0.72);
}

.token-category-guide span,
.token-category-guide small,
.token-status small,
.token-result small {
  color: #6b687c;
}

.token-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem 1rem;
  margin: 0 0 1rem;
  font-size: 0.9rem;
}

.token-legend span,
.token-result {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.token-dot {
  display: inline-block;
  width: 0.72rem;
  height: 0.72rem;
  flex: 0 0 auto;
  border-radius: 50%;
}

.token-red {
  background: #b64141;
}

.token-yellow {
  background: #d28b16;
}

.token-green {
  background: #16865b;
}

.token-status {
  display: grid;
  gap: 0.8rem;
}

.token-status-head p {
  margin: 0.35rem 0;
}

.token-results {
  display: grid;
  gap: 0.45rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.token-result {
  padding: 0.65rem 0.75rem;
  border-radius: 0.75rem;
  background: #f6f6fb;
}

.token-result span {
  display: grid;
}

@media (max-width: 760px) {
  .settings-grid {
    grid-template-columns: 1fr;
  }

  .app-navbar .nav-link {
    padding-inline: 0.35rem;
    font-size: 0.88rem;
  }
}
