:root {
  color-scheme: light;
  --navy: #17213a;
  --navy-2: #21304f;
  --gold: #8b651f;
  --gold2: #d8bc7a;
  --paper: #f4f6f9;
  --bg: #f4f6f9;
  --ink: #182033;
  --text: #182033;
  --muted: #667085;
  --line: #dce2ea;
  --ok: #067647;
  --danger: #b42318;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--paper);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  padding: 0 max(24px, calc((100vw - 1120px) / 2));
  color: #fff;
  background: var(--navy);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}
.brand img { width: 38px; height: 46px; object-fit: contain; }
.brand span, .brand strong, .brand small { display: block; }
.brand strong { font-family: Georgia, "Times New Roman", serif; font-size: 17px; }
.brand small { margin-top: 2px; color: #cbd3df; font-size: 11px; font-weight: 700; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 8px 13px;
  color: var(--navy);
  background: #fff;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}
.btn.primary { color: #fff; background: var(--navy); }
.btn.ghost.light { color: #fff; border-color: rgba(255, 255, 255, .28); background: rgba(255, 255, 255, .08); }

main {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 54px 0 72px;
}
.page-head { max-width: 780px; margin-bottom: 30px; }
.eyebrow {
  margin: 0 0 8px;
  color: var(--gold);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .12em;
}
h1, h2 { margin: 0; font-family: Georgia, "Times New Roman", serif; color: var(--navy); }
h1 { font-size: clamp(34px, 5vw, 52px); line-height: 1.05; }
.page-head > p:last-child { margin: 16px 0 0; color: var(--muted); font-size: 16px; line-height: 1.65; }

.layout { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(280px, .8fr); gap: 22px; align-items: start; }
.panel, .info-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 16px 40px rgba(23, 33, 58, .07);
}
.panel { padding: 28px; }
.connection-head { padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.connection-head > div { display: grid; grid-template-columns: auto 1fr; column-gap: 10px; align-items: center; }
.connection-head strong { font-size: 17px; }
.connection-head small { grid-column: 2; margin-top: 3px; color: var(--muted); line-height: 1.45; }
.status-dot { width: 11px; height: 11px; border-radius: 50%; background: #98a2b3; box-shadow: 0 0 0 4px #f2f4f7; }
.status-dot.configured { background: var(--ok); box-shadow: 0 0 0 4px #dcfae6; }

form { display: grid; gap: 18px; margin-top: 24px; }
label { display: grid; gap: 7px; color: #344054; font-size: 13px; font-weight: 750; }
input {
  width: 100%;
  min-height: 46px;
  border: 1px solid #cfd7e3;
  border-radius: 9px;
  padding: 10px 12px;
  color: var(--ink);
  background: #fff;
  font: inherit;
  font-weight: 500;
}
input:focus { outline: 3px solid rgba(179, 135, 49, .18); border-color: var(--gold); }
.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  cursor: pointer;
}
.check-row input { width: 18px; min-height: 18px; accent-color: var(--navy); }
.field-note { margin: -5px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.button {
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 9px 14px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}
.button:disabled { cursor: wait; opacity: .62; }
.button.primary { color: #fff; background: var(--navy); }
.button.secondary { color: var(--navy); border-color: #cfd7e3; background: #fff; }
.button.danger { color: var(--danger); border-color: #f0c2bd; background: #fff; }
.action-status { min-height: 22px; margin: 18px 0 0; color: var(--muted); font-size: 13px; font-weight: 700; }
.action-status.ok { color: var(--ok); }
.action-status.error { color: var(--danger); }

.side { display: grid; gap: 16px; }
.info-card { padding: 22px; }
.info-card h2 { font-size: 22px; }
.info-card ul { display: grid; gap: 15px; margin: 20px 0 0; padding: 0; list-style: none; }
.info-card li { display: grid; gap: 4px; color: var(--muted); font-size: 13px; }
.info-card li strong { color: var(--ink); }
.info-card code { width: fit-content; border-radius: 5px; padding: 3px 6px; color: #344054; background: #f2f4f7; font-size: 11px; }
.security > p:not(.eyebrow) { margin: 14px 0 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.guide-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 18px;
  color: #765817;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}
.guide-link:hover { text-decoration: underline; }

@media (max-width: 780px) {
  .layout { grid-template-columns: 1fr; }
  main { width: min(100% - 28px, 1120px); padding-top: 36px; }
  .topbar { padding-inline: 14px; }
  .panel { padding: 20px; }
  .actions { display: grid; }
}
