:root {
  --bg-main: #f4efe2;
  --ink: #102a26;
  --line: #d8d0bd;
  --card: #fffdf8;
  --brand: #11685f;
  --danger: #b0372a;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--ink);
  font-family: "Manrope", sans-serif;
  background: linear-gradient(180deg, #fbf8f1, var(--bg-main));
}

.shell {
  max-width: 980px;
  margin: 0 auto;
  padding: 16px;
  display: grid;
  gap: 12px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
}

.topbar, .header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.grid-2 {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 12px;
}

.form-grid {
  display: grid;
  gap: 10px;
}

label {
  display: grid;
  gap: 5px;
  font-size: 14px;
  font-weight: 600;
}

.checkbox-row {
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 8px;
}

input, button, .secondary {
  font-family: inherit;
  font-size: 14px;
}

input {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
}

button, .secondary {
  border: 0;
  border-radius: 10px;
  padding: 10px 12px;
  text-decoration: none;
  cursor: pointer;
}

button {
  color: #fff;
  background: var(--brand);
}

.secondary {
  color: var(--ink);
  background: #efe8d9;
}

.danger {
  background: var(--danger);
  color: #fff;
}

.table-wrap {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  text-align: left;
  border-bottom: 1px solid var(--line);
  padding: 10px;
  font-size: 13px;
}

th {
  font-family: "Chivo Mono", monospace;
  background: #f8f4eb;
}

.feedback { min-height: 18px; font-size: 12px; }
.feedback.error { color: #ab2f1d; }
.feedback.ok { color: #1f8b57; }

.toast {
  position: fixed;
  right: 16px;
  bottom: 16px;
  color: #fff;
  background: #173a34;
  padding: 10px 12px;
  border-radius: 10px;
}

.hidden { display: none !important; }

@media (max-width: 860px) {
  .grid-2 {
    grid-template-columns: 1fr;
  }

  .topbar, .header-row {
    display: grid;
  }
}
