:root {
  color-scheme: light;
  --bg: #eef1f5;
  --ink: #17202a;
  --muted: #667085;
  --panel: #ffffff;
  --line: #d9dee7;
  --accent: #6f4ce6;
  --accent-dark: #5636bd;
  --ok: #157347;
  --warn: #b7791f;
  --danger: #b42318;
  --shadow: 0 12px 28px rgba(16, 24, 40, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  letter-spacing: 0;
}

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

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 260px;
  background: #151923;
  color: #f8fafc;
  padding: 22px 18px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--accent);
  font-weight: 800;
}

.brand-title {
  font-weight: 800;
}

.brand-subtitle {
  color: #aab2c0;
  font-size: 13px;
}

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

.nav a,
.logout-form button {
  color: #dbe3ef;
  text-decoration: none;
  border: 0;
  background: transparent;
  text-align: left;
  border-radius: 8px;
  padding: 10px 12px;
  cursor: pointer;
}

.nav a.active,
.nav a:hover,
.logout-form button:hover {
  background: #232a38;
  color: #fff;
}

.logout-form {
  margin-top: auto;
}

.main {
  margin-left: 260px;
  min-height: 100vh;
}

.content {
  max-width: 1320px;
  padding: 28px;
}

.page-title {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

h1 {
  margin: 0;
  font-size: 28px;
}

.lede {
  margin: 6px 0 0;
  color: var(--muted);
}

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

.stat,
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.stat {
  padding: 16px;
}

.stat-label {
  color: var(--muted);
  font-size: 13px;
}

.stat-value {
  margin-top: 8px;
  font-size: 26px;
  font-weight: 800;
}

.panel {
  padding: 18px;
  margin-top: 16px;
}

.panel h2 {
  margin: 0 0 12px;
  font-size: 18px;
}

.toolbar,
.form-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: end;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

input,
select,
textarea {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: #fff;
  color: var(--ink);
}

textarea {
  min-width: 280px;
  min-height: 70px;
}

button,
.button {
  min-height: 38px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 8px 12px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  text-decoration: none;
}

button.secondary {
  background: #fff;
  color: var(--ink);
  border-color: var(--line);
}

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

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

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

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

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

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 2px 9px;
  font-size: 12px;
  font-weight: 700;
  background: #edf0f5;
  color: #344054;
}

.badge.approved,
.badge.valid {
  background: #dcfce7;
  color: var(--ok);
}

.badge.needs_moderation,
.badge.warning {
  background: #fef3c7;
  color: var(--warn);
}

.badge.blocked,
.badge.failed {
  background: #fee4e2;
  color: var(--danger);
}

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

.empty,
.error {
  padding: 18px;
  color: var(--muted);
}

.error {
  color: var(--danger);
}

.login-page {
  display: grid;
  place-items: center;
  padding: 20px;
}

.login-panel {
  width: min(420px, 100%);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 26px;
}

.login-brand {
  font-size: 24px;
  font-weight: 800;
}

.login-panel p {
  color: var(--muted);
}

.login-panel form {
  display: grid;
  gap: 14px;
}

.login-error {
  margin: 12px 0;
  color: var(--danger);
  font-weight: 700;
}

@media (max-width: 900px) {
  .sidebar {
    position: static;
    width: auto;
  }

  .main {
    margin-left: 0;
  }

  .stats {
    grid-template-columns: repeat(2, minmax(140px, 1fr));
  }
}

