:root {
  color-scheme: light dark;
  --bg: #f7f7f5;
  --surface: #ffffff;
  --text: #1a1a1a;
  --muted: #6b6b6b;
  --border: #e2e2e0;
  --accent: #b45309;
  --accent-contrast: #ffffff;
  --danger: #b3261e;
  --ok: #2f6f4f;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17181a;
    --surface: #1f2023;
    --text: #ececec;
    --muted: #9a9a9a;
    --border: #303236;
    --accent: #d18a3d;
    --accent-contrast: #17181a;
    --danger: #e5766d;
    --ok: #6fbf94;
  }
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  padding: 24px 16px 48px;
}
.wrap { max-width: 720px; margin: 0 auto; }
header.top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 8px;
}
header.top h1 { font-size: 17px; margin: 0; }
header.top h1 a { color: inherit; text-decoration: none; }
.topline { display: flex; align-items: baseline; gap: 4px; font-size: 14px; }
.topline .who { color: var(--muted); margin-right: 12px; }
.topline a { color: var(--muted); text-decoration: none; }
.topline a:hover { color: var(--text); }

/* Tab-strip nav (added 2026-09-13), styled after GitHub's repo-level
   nav: a flat row of links with an underline on the active tab, rather
   than a dropdown menu — this app has few enough pages that hiding them
   behind a menu would cost more than it saves. Admin-only tabs are set
   apart from the single Dashboard tab every member sees by a small
   uppercase "Admin" label, not a separate menu. */
nav.tabs {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  flex-wrap: wrap;
  margin: 0 0 24px;
  border-bottom: 1px solid var(--border);
}
nav.tabs a {
  display: inline-block;
  padding: 9px 10px;
  margin-bottom: -1px;
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
nav.tabs a:hover { color: var(--text); }
nav.tabs a.active { color: var(--text); font-weight: 600; border-bottom-color: var(--accent); }
nav.tabs .tabs-group {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--muted);
  margin: 0 2px 0 14px;
  padding-bottom: 10px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 16px;
}
h2 { font-size: 16px; margin: 0 0 12px; }
label { display: block; font-size: 13px; color: var(--muted); margin: 12px 0 4px; }
input[type=email], input[type=password], input[type=text], textarea, select {
  width: 100%;
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
}
label input[type=checkbox] { width: auto; margin-right: 6px; }
button, .btn {
  display: inline-block;
  margin-top: 16px;
  padding: 9px 16px;
  border: none;
  border-radius: 6px;
  background: var(--accent);
  color: var(--accent-contrast);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}
button.secondary, .btn.secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.error { color: var(--danger); font-size: 13px; margin-top: 10px; }
.notice { color: var(--muted); font-size: 13px; margin-top: 10px; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--border); }
th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .03em; }
code { font-size: 13px; }

/* Project status badges. Six values as of the 2026-09-12 db/schema.sql
   uplift (see that file's comment on projects.status): requested/
   declined/provisioned keep their original colors; approved and
   provisioning share the "in progress" accent color (a lighter step
   before the real success/failure color applies); provisioning_failed
   reuses the danger color, same as declined, since both mean "stop and
   look at this," just for different reasons. */
.status { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.status.requested { background: rgba(180,83,9,.15); color: var(--accent); }
.status.approved { background: rgba(180,83,9,.10); color: var(--accent); }
.status.provisioning { background: rgba(180,83,9,.10); color: var(--accent); }
.status.provisioning_failed { background: rgba(179,38,30,.15); color: var(--danger); }
.status.provisioned { background: rgba(47,111,79,.15); color: var(--ok); }
.status.declined { background: rgba(179,38,30,.15); color: var(--danger); }

/* Profile sync-status badges (public/admin_profiles.php) reuse the same
   three-color vocabulary as project status rather than inventing a
   fourth palette: synced borrows "provisioned" (ok), drift borrows
   "declined" (danger, needs attention), never borrows "requested"
   (neutral/in-progress accent). */
.empty { color: var(--muted); font-size: 14px; padding: 8px 0; }
