body {
  margin: 0;
  font-family: "Segoe UI", Arial, sans-serif;
  background: #eff5fb;
  color: #405c7d;
}

.settings-page {
  padding: 18px 24px 24px;
}

.settings-layout {
  width: min(100%, 1180px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 230px;
  gap: 24px;
  justify-content: center;
  align-items: start;
}

.settings-main,
.settings-sidebar {
  min-width: 0;
}

.settings-title {
  margin: 2px 0 20px;
  color: #4c688a;
  font-size: 31px;
  line-height: 1.12;
  font-weight: 300;
  letter-spacing: 0;
}

.settings-card {
  margin-bottom: 20px;
  padding: 18px 16px 18px;
  background: #fff;
  border: 1px solid #d5dfeb;
  border-radius: 6px;
  box-shadow: 0 2px 7px rgba(54, 85, 120, 0.18);
}

.settings-card--summary {
  padding-top: 18px;
  padding-bottom: 18px;
}

.card-title {
  margin: 0 0 14px;
  font-size: 17px;
  line-height: 1.2;
  font-weight: 700;
  color: #2580df;
}

.card-text,
.form-note,
.sidebar-text p,
.more-apps-copy p,
.more-apps-copy a,
.settings-message {
  font-size: 14px;
  line-height: 1.45;
}

.card-text,
.form-note,
.sidebar-text p,
.more-apps-copy p {
  color: #5c7595;
}

.settings-message {
  margin: 0 0 18px;
  padding: 10px 14px;
  border-left: 5px solid #1ca357;
  background: #f4f8fd;
  color: #405c7d;
}

.settings-form {
  display: block;
}

.form-section + .form-section {
  margin-top: 18px;
}

.form-radio {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  color: #314f74;
}

.form-radio input[type="radio"] {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: #2580df;
}

.form-note {
  margin: 10px 0 0 28px;
}

.field-row {
  margin-top: 12px;
  margin-left: 28px;
  max-width: 305px;
}

.field-box {
  display: block;
  min-width: 0;
}

.field-box span {
  display: block;
  margin-bottom: 7px;
  color: #2580df;
  font-size: 13px;
  font-weight: 700;
}

.field-box input,
.field-box select {
  width: 100%;
  height: 40px;
  padding: 0 10px;
  border: 1px solid #afbfd3;
  border-radius: 2px;
  background: #fff;
  color: #405c7d;
  font-size: 18px;
}

.field-box select {
  font-size: 15px;
}

.form-radio--compact {
  margin-top: 14px;
  font-size: 14px;
}

.form-radio input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: #2580df;
}

.operator-form {
  display: grid;
  grid-template-columns: 1.2fr 1fr 0.8fr auto;
  gap: 12px;
  align-items: end;
}

.operator-form .action-button {
  width: 100%;
}

.inline-link-form {
  display: grid;
  grid-template-columns: minmax(110px, 0.8fr) minmax(150px, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-width: 430px;
}

.inline-link-form input[type="text"] {
  width: 100%;
  min-width: 0;
  height: 34px;
  padding: 0 9px;
  border: 1px solid #afbfd3;
  border-radius: 2px;
  color: #405c7d;
  font-size: 13px;
}

.action-button--small {
  height: 34px;
  padding: 0 12px;
  font-size: 11px;
  box-shadow: none;
}

.data-table-wrap {
  width: 100%;
  margin-top: 16px;
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  line-height: 1.35;
}

.data-table th,
.data-table td {
  padding: 9px 10px;
  border-bottom: 1px solid #dbe5ef;
  text-align: left;
  vertical-align: top;
}

.data-table th {
  color: #2580df;
  font-weight: 700;
  white-space: nowrap;
}

.data-table td {
  color: #405c7d;
}

.data-table code {
  font-family: Consolas, "Courier New", monospace;
  font-size: 12px;
  color: #314f74;
}

.qr-payload {
  display: block;
  width: 220px;
  height: 72px;
  padding: 8px;
  border: 1px solid #afbfd3;
  border-radius: 2px;
  color: #405c7d;
  font-family: Consolas, "Courier New", monospace;
  font-size: 11px;
  resize: vertical;
}

.qr-box {
  display: grid;
  gap: 8px;
  justify-items: center;
  width: 220px;
}

.qr-image {
  display: block;
  width: 220px;
  height: 220px;
  border: 1px solid #d5dfeb;
  border-radius: 4px;
  background: #fff;
}

.qr-hint {
  color: #5c7595;
  font-size: 12px;
  line-height: 1.3;
}

.status-error {
  color: #b42318;
}

.muted-text {
  color: #8aa0b8;
}

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

.log-line {
  margin: 0 0 10px;
  color: #5c7595;
  font-size: 13px;
  line-height: 1.4;
}

.log-line strong {
  display: inline-block;
  min-width: 58px;
  color: #2580df;
  text-transform: uppercase;
}

.settings-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 18px;
}

.action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 43px;
  padding: 0 16px;
  border: 0;
  border-radius: 3px;
  background: #2e83de;
  box-shadow: 0 2px 7px rgba(54, 85, 120, 0.18);
  color: #fff;
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
}

.action-button:hover {
  background: #246dbd;
}

.more-apps {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  padding: 4px 0 0;
}

.more-apps-copy p {
  margin: 0 0 10px;
}

.more-apps-copy a {
  color: #2a49d7;
}

.more-apps img {
  width: 170px;
  height: auto;
  object-fit: contain;
}

.settings-sidebar {
  padding-top: 38px;
}

.sidebar-visual {
  text-align: center;
}

.sidebar-visual img {
  display: inline-block;
  width: 205px;
  height: auto;
}

.sidebar-visual--mark {
  display: grid;
  place-items: center;
  width: min(205px, 100%);
  aspect-ratio: 1;
  margin: 0 auto;
  border-radius: 6px;
  background: linear-gradient(135deg, #1ca357 0%, #2580df 100%);
  box-shadow: 0 2px 7px rgba(54, 85, 120, 0.18);
}

.sidebar-visual--mark span {
  color: #fff;
  font-size: 46px;
  font-weight: 700;
}

.sidebar-text {
  margin-top: 16px;
}

.sidebar-text p {
  margin: 0 0 16px;
}

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

  .settings-sidebar {
    padding-top: 0;
  }
}

@media (max-width: 760px) {
  .settings-page {
    padding: 14px 12px 24px;
  }

  .settings-title {
    font-size: 32px;
  }

  .settings-card {
    padding: 20px 16px;
  }

  .card-text,
  .form-note,
  .sidebar-text p,
  .more-apps-copy p,
  .more-apps-copy a,
  .settings-message {
    font-size: 15px;
  }

  .form-radio {
    align-items: flex-start;
    font-size: 17px;
  }

  .form-note,
  .field-row {
    margin-left: 0;
  }

  .field-box input,
  .field-box select {
    font-size: 20px;
  }

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

  .inline-link-form {
    grid-template-columns: 1fr;
    min-width: 240px;
  }

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

  .more-apps {
    flex-direction: column;
    align-items: flex-start;
  }

  .more-apps img {
    width: 190px;
  }
}
