*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --bg: #0f1419;
  --surface: #1a2332;
  --border: #2d3a4d;
  --text: #e7ecf3;
  --muted: #8b9cb3;
  --accent: #3d9a6b;
  --accent-hover: #52b883;
  --focus: #6eb5ff;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, sans-serif;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  line-height: 1.45;
}

.layout {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(320px, 1fr);
  min-height: 100vh;
  gap: 0;
}

@media (max-width: 900px) {
  .layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
  }
}

.panel {
  padding: 1.25rem 1.5rem;
  border-right: 1px solid var(--border);
}

.panel--input {
  background: var(--surface);
  overflow-y: auto;
}

.panel--output {
  display: flex;
  flex-direction: column;
  background: var(--bg);
  min-height: 50vh;
}

.panel__title {
  margin: 0 0 1rem;
  font-size: 1.1rem;
  font-weight: 600;
}

.field-group {
  margin-bottom: 0.85rem;
}

.field-group label {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

input[type="text"],
input[type="password"],
input[type="url"],
textarea {
  width: 100%;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #121922;
  color: var(--text);
  font-size: 0.95rem;
}

textarea {
  resize: vertical;
  font-family: ui-monospace, "Cascadia Code", "Fira Code", monospace;
  font-size: 0.85rem;
}

input:focus,
textarea:focus {
  outline: 2px solid var(--focus);
  outline-offset: 1px;
}

.block {
  margin: 1.25rem 0;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.15);
}

/* getSettings и getStateInstance — только столбик, на всю ширину */
.connect-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.connect-actions button {
  display: block;
  width: 100%;
}

button {
  padding: 0.55rem 1rem;
  border: none;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
}

button:hover {
  background: var(--accent-hover);
}

button:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

#responseOut {
  flex: 1;
  min-height: 320px;
  margin: 0;
}
