:root[data-theme="light"], :root {
  --bg: #f7f6f3;
  --surface: #ffffff;
  --text: #1a1a1a;
  --text-muted: #6b6b6b;
  --accent: #b88c4e;
  --border: #ece9e3;
}
:root[data-theme="dark"] {
  --bg: #0e1117;
  --surface: #161b22;
  --text: #e8e8e8;
  --text-muted: #9ca3af;
  --accent: #d4af6f;
  --border: #1f2530;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.5 -apple-system, system-ui, "Segoe UI", Roboto, sans-serif;
}
.wrap { max-width: 920px; margin: 0 auto; padding: 28px 22px; }
.brand { font-weight: 700; font-size: 16px; letter-spacing: -0.3px; color: var(--text); }
.brand span { color: var(--accent); }
.panel {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; padding: 22px; margin: 20px 0;
}
.btn {
  display: inline-block; padding: 9px 16px; border-radius: 6px;
  border: 1px solid var(--border); background: var(--surface);
  color: var(--text); text-decoration: none; font-weight: 600;
  font-size: 14px; cursor: pointer; transition: border-color 0.15s;
}
.btn:hover { border-color: var(--accent); }
.btn.primary { background: var(--text); color: var(--bg); border-color: var(--text); }
.btn.full { display: block; width: 100%; text-align: center; }
.btn.oauth { display: flex; align-items: center; justify-content: center; gap: 8px; }
.btn.oauth .icon { display: inline-block; width: 18px; height: 18px; }
.divider {
  display: flex; align-items: center; gap: 10px; margin: 14px 0;
  color: var(--text-muted); font-size: 12px;
}
.divider::before, .divider::after {
  content: ""; flex: 1; height: 1px; background: var(--border);
}
input[type=email], input[type=text], input[type=password], select, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border);
  border-radius: 6px; background: var(--surface); color: var(--text);
  font-size: 14px; box-sizing: border-box;
}
label { display: block; margin: 12px 0 4px; color: var(--text-muted); font-size: 12px; }
.section-label {
  font-size: 10px; text-transform: uppercase; letter-spacing: 1px;
  color: var(--text-muted); font-weight: 600; margin: 14px 0 8px;
}
table { width: 100%; border-collapse: collapse; }
td, th { padding: 8px 10px; border-bottom: 1px solid var(--border); text-align: left; }
th { font-size: 12px; color: var(--text-muted); font-weight: 600; }
.muted { color: var(--text-muted); }

/* Links — theme-aware & readable (previously fell back to browser blue/purple,
   which is invisible on the dark --bg). Brass accent: ~9:1 on dark, AA on light. */
:root, :root[data-theme="light"] { --link: #8a6a2e; }
:root[data-theme="dark"] { --link: #d4af6f; }
a { color: var(--link); text-decoration: underline; text-underline-offset: 2px; }
a:visited { color: var(--link); }
a:hover { color: var(--text); text-decoration: none; }
