:root {
  --bg: #f4f6fb;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #475569;
  --border: #d9dfec;
  --primary: #0a7b83;
  --danger: #b91c1c;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: linear-gradient(180deg, #eef2ff 0%, var(--bg) 260px);
  color: var(--text);
  font-family: "Avenir Next", "Segoe UI", sans-serif;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  background: #0b1224;
  color: #f8fafc;
}

.topbar__brand {
  display: grid;
}

.topbar__nav {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.topbar__nav a {
  color: #cbd5e1;
  text-decoration: none;
  font-weight: 600;
}

.topbar__nav a:hover {
  color: #ffffff;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 18px;
  display: grid;
  gap: 16px;
}

h1,
h2,
h3 {
  margin: 0;
}

h1 {
  font-size: 26px;
}

h2 {
  font-size: 18px;
}

h3 {
  font-size: 15px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  box-shadow: 0 12px 22px rgba(15, 23, 42, 0.06);
}

.stack {
  display: grid;
  gap: 10px;
}

.grid {
  display: grid;
  gap: 14px;
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.space-between {
  justify-content: space-between;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.table th,
.table td {
  text-align: left;
  border-bottom: 1px solid var(--border);
  padding: 8px;
  vertical-align: top;
}

.table th {
  background: #f8fafc;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #334155;
}

label {
  font-size: 13px;
  font-weight: 600;
}

input,
select,
textarea,
button,
.button {
  font: inherit;
}

input,
select,
textarea {
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 8px 10px;
  background: #ffffff;
}

textarea {
  resize: vertical;
  min-height: 120px;
}

button,
.button {
  border: none;
  background: var(--primary);
  color: #ffffff;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  font-weight: 700;
}

.button.ghost,
button.ghost {
  background: #e2e8f0;
  color: #0f172a;
}

button.danger,
.danger {
  background: var(--danger);
}

.checkbox {
  display: flex;
  gap: 8px;
  align-items: center;
}

.muted {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.alert {
  margin: 0;
  background: #fee2e2;
  border: 1px solid #fecaca;
  color: #7f1d1d;
  padding: 10px;
  border-radius: 8px;
}

.ok {
  margin: 0;
  background: #dcfce7;
  border: 1px solid #bbf7d0;
  color: #14532d;
  padding: 10px;
  border-radius: 8px;
}

.pill {
  display: inline-block;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
}

.pill-ok {
  background: #dcfce7;
  color: #14532d;
}

.pill-warn {
  background: #fff7ed;
  color: #9a3412;
}

.pill-bad {
  background: #fee2e2;
  color: #7f1d1d;
}

.pill-info {
  background: #e0f2fe;
  color: #075985;
}

code {
  background: #f1f5f9;
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 12px;
}

.auth {
  min-height: calc(100vh - 90px);
  display: grid;
  place-items: center;
}

.auth form {
  width: min(520px, 100%);
}
