/* Utilitarian internal-tool styling — a handful of the mobile app's own
   design tokens (design/ui-handoff/tokens/, also used by landing/index.html)
   for light brand consistency, not a full port of the mobile theme. */
:root {
  --green-700: #1e5231;
  --green-600: #2a6a40;
  --ink-900: #14181c;
  --ink-600: #414b53;
  --ink-500: #59636c;
  --ink-150: #e0e5e9;
  --ink-100: #e9edf0;
  --ink-50: #f2f5f7;
  --paper: #fbfcfd;
  --danger: #b3261e;
  --danger-soft: #fbe9e7;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0e1317;
    --ink-900: #eef2f4;
    --ink-600: #b8c1c8;
    --ink-500: #9aa5ad;
    --ink-150: #2a343b;
    --ink-100: #212a30;
    --ink-50: #171d22;
    --danger-soft: #3a1f1d;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink-900);
  min-height: 100vh;
}

a { color: var(--green-600); }

header.admin-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0.75rem 1.25rem;
  background: var(--ink-50);
  border-bottom: 1px solid var(--ink-150);
  flex-wrap: wrap;
}

header.admin-nav .brand {
  font-weight: 700;
  color: var(--green-700);
  margin-right: 0.5rem;
}

header.admin-nav nav {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

header.admin-nav nav a {
  text-decoration: none;
  color: var(--ink-600);
  font-size: 0.9rem;
}

header.admin-nav nav a.active {
  color: var(--green-700);
  font-weight: 600;
}

main {
  max-width: 960px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3rem;
}

h1 { font-size: 1.4rem; margin: 0 0 1rem; }
h2 { font-size: 1.05rem; margin: 1.75rem 0 0.75rem; }

.card {
  background: var(--ink-50);
  border: 1px solid var(--ink-150);
  border-radius: 10px;
  padding: 1rem 1.15rem;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.75rem;
}

.stat {
  background: var(--ink-50);
  border: 1px solid var(--ink-150);
  border-radius: 10px;
  padding: 0.85rem 1rem;
}

.stat .label { font-size: 0.78rem; color: var(--ink-500); }
.stat .value { font-size: 1.4rem; font-weight: 700; }
.stat .note { font-size: 0.72rem; color: var(--ink-500); margin-top: 0.2rem; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

th, td {
  text-align: left;
  padding: 0.5rem 0.6rem;
  border-bottom: 1px solid var(--ink-150);
}

th { color: var(--ink-500); font-weight: 600; font-size: 0.78rem; text-transform: uppercase; }

.empty-state {
  padding: 1.5rem;
  text-align: center;
  color: var(--ink-500);
  border: 1px dashed var(--ink-150);
  border-radius: 10px;
}

input, select, button, textarea {
  font: inherit;
  padding: 0.45rem 0.6rem;
  border-radius: 6px;
  border: 1px solid var(--ink-150);
  background: var(--paper);
  color: var(--ink-900);
}

button {
  background: var(--green-600);
  color: white;
  border: none;
  cursor: pointer;
  font-weight: 600;
}

button:hover { background: var(--green-700); }

button.secondary {
  background: transparent;
  color: var(--ink-600);
  border: 1px solid var(--ink-150);
}

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

.inline-form { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; margin: 0.5rem 0; }

.badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
}

.badge.active { background: #dcecdf; color: var(--green-700); }
.badge.banned { background: var(--danger-soft); color: var(--danger); }
.badge.pending { background: var(--ink-100); color: var(--ink-600); }

.msg { padding: 0.5rem 0.75rem; border-radius: 6px; font-size: 0.85rem; margin: 0.5rem 0; }
.msg.error { background: var(--danger-soft); color: var(--danger); }
.msg.ok { background: #dcecdf; color: var(--green-700); }
