:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f5f7fa;
  color: #1f2933;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

button,
input,
.button-link {
  font: inherit;
}

button,
.button-link {
  border: 0;
  border-radius: 6px;
  background: #116466;
  color: white;
  min-height: 38px;
  padding: 0 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

button.secondary {
  background: #334e68;
}

button.ghost {
  background: white;
  border: 1px solid #cbd5e1;
  color: #243b53;
}

input {
  width: 100%;
  min-height: 38px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 0 10px;
  background: white;
}

label {
  display: grid;
  gap: 6px;
  color: #52606d;
  font-size: 13px;
}

.shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 24px;
}

.shell.narrow {
  max-width: 680px;
}

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

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 26px;
}

h2 {
  font-size: 17px;
}

.topbar p {
  margin-top: 4px;
  color: #627d98;
}

.panel {
  margin-top: 18px;
  border: 1px solid #d9e2ec;
  border-radius: 8px;
  background: white;
  padding: 18px;
}

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

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

.stack,
form {
  display: grid;
  gap: 12px;
}

.auth-panel {
  display: grid;
  gap: 16px;
  max-width: 520px;
}

.auth-form {
  gap: 14px;
}

.setup-link {
  color: #116466;
  font-size: 14px;
  text-decoration: none;
}

.turnstile-box {
  min-height: 65px;
}

.empty-state {
  display: grid;
  gap: 12px;
}

.inline {
  grid-template-columns: 150px 1fr auto;
  align-items: end;
  margin: 14px 0;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.stat,
.item {
  border: 1px solid #e5eaf0;
  border-radius: 8px;
  padding: 12px;
  background: #fbfcfd;
}

.stat b {
  display: block;
  margin-top: 4px;
  font-size: 24px;
}

.list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.item {
  display: grid;
  gap: 6px;
}

.muted {
  color: #627d98;
  font-size: 13px;
}

.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.hidden {
  display: none !important;
}

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

@media (max-width: 780px) {
  .shell {
    padding: 16px;
  }

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

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