/* admin.archagentix.com — console styling. Same token vocabulary as the
   secrets site (system font stack, light/dark via theme-boot data-theme). */

:root {
  --bg: #0d1017;
  --panel: #151a24;
  --panel-2: #1b2130;
  --text: #e6e9ef;
  --muted: #9aa3b5;
  --accent: #5b8cff;
  --danger: #ff6b6b;
  --ok: #4ade80;
  --border: #262e40;
  color-scheme: dark;
}
[data-theme="light"] {
  --bg: #f5f7fb;
  --panel: #ffffff;
  --panel-2: #eef1f7;
  --text: #1b2230;
  --muted: #5b6474;
  --accent: #2f6bff;
  --danger: #c92a2a;
  --ok: #178a4c;
  --border: #d7dce6;
  color-scheme: light;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) { /* theme-boot sets data-theme explicitly; this is the no-JS fallback */ }
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px 22px;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
}
header h1 { font-size: 18px; margin: 0; }
header h1 a { color: var(--text); text-decoration: none; }
nav#auth-nav { display: flex; align-items: center; gap: 12px; font-size: 14px; }
#user-email { color: var(--muted); }

nav#tabs {
  display: flex;
  gap: 4px;
  padding: 10px 22px 0;
}
nav#tabs a {
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  background: var(--panel-2);
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
}
nav#tabs a.active { background: var(--panel); color: var(--text); font-weight: 600; }

main {
  padding: 22px;
  max-width: 1200px;
  margin: 0 auto;
}
section {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 0 10px 10px 10px;
  padding: 18px 20px;
  margin-bottom: 18px;
}
h2 { margin: 0; font-size: 17px; }
h3 { font-size: 14px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.lede, .muted { color: var(--muted); }
.error { color: var(--danger); }
code {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 13px;
}

button {
  font: inherit;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  border-radius: 8px;
  padding: 7px 14px;
  cursor: pointer;
}
button:disabled { opacity: 0.55; cursor: default; }
button.ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
button.small { padding: 3px 10px; font-size: 13px; }
button.disable { border-color: var(--danger); background: transparent; color: var(--danger); }
button.enable { border-color: var(--ok); background: transparent; color: var(--ok); }

.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { text-align: left; padding: 7px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; }
th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; }
tbody tr:hover { background: var(--panel-2); }

dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: 4px 18px; margin: 10px 0; }
dl.facts div { display: contents; }
dt { color: var(--muted); }
dd { margin: 0; }

form.rotate-form {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 10px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  margin: 12px 0;
}
form.rotate-form label { width: 100%; color: var(--muted); font-size: 13px; }
form.rotate-form input {
  flex: 1 1 260px;
  font: inherit;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
}
form.rotate-form p { width: 100%; margin: 0; }

footer {
  padding: 18px 22px;
  color: var(--muted);
  font-size: 13px;
  border-top: 1px solid var(--border);
}
footer a { color: var(--muted); }
