body.options-page {
  width: auto;
  min-width: 320px;
  min-height: 100vh;
  background: #f9fafb;
}

.options-header {
  height: 68px;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
}

.options-container {
  width: min(calc(100% - 40px), 960px);
  margin-inline: auto;
}

.header-inner {
  display: flex;
  height: 100%;
  align-items: center;
  justify-content: space-between;
}

.version-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.options-main {
  padding-block: 48px 70px;
}

.options-title {
  margin-bottom: 28px;
}

.options-title p {
  margin: 0 0 4px;
  color: var(--blue-dark);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.options-title h1 {
  margin: 0;
  color: var(--ink);
  font-size: 34px;
  line-height: 1.1;
}

#settings-form {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.settings-section {
  display: grid;
  padding: 30px;
  border-bottom: 1px solid var(--line);
  grid-template-columns: minmax(230px, 0.8fr) minmax(320px, 1.2fr);
  gap: 48px;
}

.section-copy {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

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

.section-icon svg {
  width: 19px;
  height: 19px;
}

.section-copy h2 {
  margin: 1px 0 6px;
  color: var(--ink);
  font-size: 17px;
}

.section-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.section-fields {
  display: grid;
  align-content: start;
  gap: 14px;
}

.connection-profile-toolbar {
  display: grid;
  align-items: end;
  grid-template-columns: minmax(0, 1fr) 40px 40px;
  gap: 8px;
}

.connection-profile-toolbar .icon-button {
  width: 40px;
  height: 40px;
}

.danger-button:hover {
  color: var(--danger);
  border-color: #efb5af;
}

.danger-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.token-field {
  display: grid;
  align-items: center;
  grid-template-columns: minmax(0, 1fr) 38px;
}

.token-field input {
  grid-column: 1 / -1;
  grid-row: 1;
  padding-right: 44px;
}

.token-field .field-icon-button {
  z-index: 1;
  width: 32px;
  height: 32px;
  grid-column: 2;
  grid-row: 1;
  border: 0;
}

.connection-result {
  display: flex;
  min-height: 49px;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  background: #f2faf6;
  border: 1px solid #cce9db;
  border-radius: 7px;
}

.connection-result div {
  display: grid;
}

.connection-result strong {
  color: var(--ink);
  font-size: 13px;
}

.connection-result span:last-child {
  color: var(--muted);
  font-size: 11px;
}

.toggle-row {
  display: flex;
  min-height: 54px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  cursor: pointer;
}

.toggle-row > span {
  display: grid;
}

.toggle-row strong {
  color: var(--ink);
  font-size: 13px;
}

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

.toggle-row input {
  position: relative;
  width: 42px;
  height: 24px;
  flex: 0 0 auto;
  appearance: none;
  background: #cdd6e0;
  border-radius: 12px;
  cursor: pointer;
  transition: background-color 150ms ease;
}

.toggle-row input::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  content: "";
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(21, 39, 64, 0.2);
  transition: transform 150ms ease;
}

.toggle-row input:checked {
  background: var(--blue);
}

.toggle-row input:checked::after {
  transform: translateX(18px);
}

.ignored-sites {
  display: grid;
  gap: 10px;
  margin-top: 4px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.ignored-sites[hidden] {
  display: none;
}

.ignored-sites > span {
  display: grid;
}

.ignored-sites strong {
  color: var(--ink);
  font-size: 13px;
}

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

.ignored-host-list {
  display: grid;
  gap: 6px;
}

.ignored-host {
  display: flex;
  min-width: 0;
  min-height: 38px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 7px 6px 11px;
  color: var(--ink);
  background: #f9fafb;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 11px;
}

.ignored-host span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ignored-host .icon-button {
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
}

.compact-button {
  min-height: 36px;
  justify-self: start;
}

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

.destination-tenant-field {
  grid-column: 1 / -1;
}

.update-summary {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.update-summary > span {
  display: grid;
}

.update-summary strong {
  color: var(--ink);
  font-size: 13px;
}

.update-summary small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.update-download-button {
  justify-self: start;
}

.options-actions {
  display: flex;
  min-height: 78px;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 18px 30px;
}

.options-actions .status-line {
  min-width: 0;
  margin-right: auto;
  padding: 0;
}

.security-note {
  display: flex;
  gap: 14px;
  margin-top: 18px;
  padding: 18px 20px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.security-note > svg {
  width: 21px;
  height: 21px;
  flex: 0 0 auto;
  color: var(--success);
}

.security-note strong {
  color: var(--ink);
  font-size: 13px;
}

.security-note p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 11px;
}

@media (max-width: 760px) {
  .options-container {
    width: min(calc(100% - 28px), 960px);
  }

  .options-main {
    padding-top: 32px;
  }

  .settings-section {
    grid-template-columns: 1fr;
    gap: 24px;
  }

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

  .update-summary {
    align-items: stretch;
    flex-direction: column;
  }

  .options-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .options-actions .status-line {
    width: 100%;
    margin: 0;
  }
}
