:root {
  --bg: #f4f6f8;
  --card: #ffffff;
  --text: #1f2933;
  --muted: #62748a;
  --accent: #2fc6f6;
  --border: #d9e2ec;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.45;
}

.header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.header h1 { margin: 0; font-size: 1.15rem; }
.header nav a { margin-left: 12px; color: var(--muted); text-decoration: none; }
.header nav a:hover { color: var(--text); }

.container { max-width: 1100px; margin: 24px auto; padding: 0 16px; }
.lead, .muted { color: var(--muted); }
h2 { margin: 0 0 12px; font-size: 1.05rem; }
h3 { margin: 0 0 8px; font-size: 0.95rem; }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  margin-top: 16px;
}

.status {
  padding: 10px 12px;
  border-radius: 6px;
  background: #e6f7fc;
  color: #0b6e99;
  border: 1px solid #b6e6f5;
}
.status.error { background: #fde8e8; color: #9b1c1c; border-color: #f5c2c2; }
.status.ok { background: #e8f8ef; color: #146c43; border-color: #b7e4c7; }

.btn {
  appearance: none;
  border: 0;
  border-radius: 6px;
  background: var(--accent);
  color: #083344;
  font-weight: 600;
  padding: 10px 16px;
  cursor: pointer;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn.secondary { background: #e2e8f0; }

.grid { display: grid; gap: 12px; }
.cols-2 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.cols-3 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

label { display: block; font-size: 0.9rem; margin-bottom: 4px; }
input:not([type="checkbox"]):not([type="radio"]),
select,
textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font: inherit;
}

.field-list {
  max-height: 260px;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px;
  background: #fafbfc;
}
.field-list label {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin: 4px 0;
  font-size: 0.85rem;
  color: var(--text);
}
.field-list input[type="checkbox"] {
  width: auto;
  flex: 0 0 auto;
  margin-top: 2px;
  padding: 0;
  border: none;
  accent-color: var(--accent);
}
.field-list label span {
  flex: 1 1 auto;
  min-width: 0;
  word-break: break-word;
}
.field-list .row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
}
.field-list .row:last-child { border-bottom: 0; }

.progress {
  height: 8px;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 8px;
}
.progress > span {
  display: block;
  height: 100%;
  background: var(--accent);
  width: 0%;
  transition: width 0.2s ease;
}
