:root {
  color-scheme: light;
  --ink: #17212b;
  --muted: #637083;
  --line: #d9e0e7;
  --surface: #ffffff;
  --soft: #f4f7f9;
  --brand: #0b7a75;
  --brand-dark: #075c58;
  --warn: #b54708;
  --danger: #b42318;
  --ok: #067647;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--soft);
  color: var(--ink);
}

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

button {
  border: 0;
  border-radius: 6px;
  background: var(--brand);
  color: white;
  min-height: 40px;
  padding: 0 16px;
  cursor: pointer;
  font-weight: 700;
}

button:hover {
  background: var(--brand-dark);
}

.ghost {
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--line);
}

.ghost:hover {
  background: var(--soft);
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
  padding: 10px 12px;
  color: var(--ink);
}

textarea {
  resize: vertical;
}

label {
  display: grid;
  gap: 6px;
  color: #344054;
  font-size: 14px;
  font-weight: 650;
}

.hidden {
  display: none !important;
}

.login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-panel {
  width: min(430px, 100%);
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 32px;
  display: grid;
  gap: 28px;
}

.app {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 260px 1fr;
}

.sidebar {
  background: #111820;
  color: white;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  position: sticky;
  top: 0;
  height: 100vh;
}

.sidebar h2 {
  margin: 0;
  font-size: 22px;
}

.sidebar nav {
  display: grid;
  gap: 8px;
}

.sidebar a {
  color: #d6dde6;
  text-decoration: none;
  padding: 10px 12px;
  border-radius: 6px;
}

.sidebar a.active,
.sidebar a:hover {
  background: #243141;
  color: white;
}

.sidebar .ghost {
  margin-top: auto;
  color: white;
  border-color: #3d4a59;
}

.content {
  padding: 24px;
  display: grid;
  gap: 24px;
  align-content: start;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: white;
  border-bottom: 1px solid var(--line);
  margin: -24px -24px 0;
  padding: 20px 24px;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 4px;
  font-size: 28px;
}

h2 {
  margin-bottom: 14px;
  font-size: 18px;
}

.eyebrow {
  margin-bottom: 8px;
  color: var(--brand);
  text-transform: uppercase;
  letter-spacing: 0;
  font-size: 12px;
  font-weight: 800;
}

.muted {
  color: var(--muted);
}

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

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

.two {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.panel,
section > .list,
.table {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(140px, 1fr));
  gap: 14px;
}

.metric {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
}

.metric strong {
  display: block;
  margin-top: 8px;
  font-size: 28px;
}

.list {
  display: grid;
  gap: 12px;
}

.item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: white;
}

.item h3 {
  margin: 0 0 6px;
  font-size: 16px;
}

.progress {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8edf2;
  margin-top: 10px;
}

.progress span {
  display: block;
  height: 100%;
  background: var(--brand);
}

.table {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 850px;
}

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

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.badge {
  display: inline-flex;
  border-radius: 999px;
  padding: 4px 9px;
  background: #eef4ff;
  color: #1849a9;
  font-size: 12px;
  font-weight: 800;
}

.badge.blocked {
  background: #fef3f2;
  color: var(--danger);
}

.split {
  display: grid;
  grid-template-columns: 1fr 120px;
  gap: 12px;
}

.inline {
  display: flex;
  align-items: center;
  gap: 10px;
}

.inline input {
  width: auto;
}

.compact-form {
  max-width: 680px;
  margin-bottom: 18px;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  max-width: 360px;
  background: #111820;
  color: white;
  border-radius: 8px;
  padding: 12px 14px;
  box-shadow: 0 16px 40px rgb(17 24 32 / 18%);
}

.error {
  color: var(--danger);
  min-height: 20px;
  margin: 0;
}

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

  .sidebar {
    position: static;
    height: auto;
  }

  .two,
  .metrics {
    grid-template-columns: 1fr;
  }

  .topbar {
    align-items: stretch;
    flex-direction: column;
  }
}
