/* ═══════════════════════════════════════════════════════
   udex app — Judicial Brutalism
   Matching docs site: amber accents, sharp geometry, dark
   ═══════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=DM+Mono:ital,wght@0,300;0,400;0,500;1,400&family=Instrument+Serif:ital@0;1&family=IBM+Plex+Sans:wght@300;400;500;600&display=swap');

:root {
  --bg: #0a0a0b;
  --bg-surface: #111113;
  --bg-surface-alt: #19191c;
  --bg-elevated: #141416;
  --border: #2a2a2f;
  --border-hover: #3a3a42;
  --fg: #e8e6e1;
  --fg-muted: #9c9a94;
  --fg-dim: #5c5a55;
  --accent: #c9a84c;
  --accent-bright: #dfc06a;
  --accent-dim: #8b7535;
  --accent-glow: rgba(201, 168, 76, 0.15);
  --success: #5a9a6b;
  --warning: #c9884c;
  --error: #b35454;
  --info: #5a7a9a;
  --stale: #c9884c;
  --font-display: 'Instrument Serif', Georgia, serif;
  --font-body: 'IBM Plex Sans', -apple-system, sans-serif;
  --font-mono: 'DM Mono', 'Menlo', monospace;
  --radius: 2px;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body { font-family: var(--font-body); background: var(--bg); color: var(--fg); padding: 2rem; line-height: 1.6; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-bright); }
h1 { font-family: var(--font-display); font-size: 1.8rem; margin-bottom: 0.5rem; font-weight: 400; }
h1 span { color: var(--fg-dim); font-weight: normal; font-family: var(--font-body); font-size: 1.2rem; }
h2 { font-family: var(--font-display); font-size: 1.3rem; margin: 1.5rem 0 0.75rem; color: var(--accent); border-bottom: 1px solid var(--border); padding-bottom: 0.25rem; font-weight: 400; }

code, pre, .mono { font-family: var(--font-mono); }

/* Layout */
.container { max-width: 960px; margin: 0 auto; }
.back { display: inline-block; margin-bottom: 1rem; font-family: var(--font-mono); font-size: 0.85rem; }

/* Sidebar Layout */
.app-layout { display: flex; min-height: 100vh; }
.sidebar {
  width: 220px;
  min-width: 220px;
  background: var(--bg-surface);
  border-right: 1px solid var(--border);
  padding: 0;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  overflow-y: auto;
  z-index: 50;
}
.sidebar-header {
  padding: 1.25rem 1.25rem 1rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
}
.sidebar-logo {
  color: var(--accent);
  font-size: 1.4em;
  line-height: 1;
}
.sidebar-title {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 1.1rem;
  color: var(--fg);
}
.sidebar-group { padding: 1rem 0 0; }
.sidebar-group-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-dim);
  padding: 0 1.25rem 0.5rem;
}
.sidebar-nav { list-style: none; }
.sidebar-nav a {
  display: block;
  padding: 0.4rem 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--fg-muted);
  transition: color 0.15s, background 0.15s;
  border-left: 2px solid transparent;
}
.sidebar-nav a:hover {
  color: var(--fg);
  background: var(--bg-surface-alt);
}
.sidebar-nav a.active {
  color: var(--accent);
  border-left-color: var(--accent);
  background: var(--accent-glow);
}
.main-content {
  margin-left: 220px;
  flex: 1;
  padding: 2rem;
  min-height: 100vh;
}
.main-content .container { max-width: 960px; margin: 0; }

/* Stats bar */
.stats-bar {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.5rem;
  min-width: 120px;
}
.stat-card-num {
  font-family: var(--font-mono);
  font-size: 1.8rem;
  font-weight: 500;
  color: var(--accent);
  line-height: 1;
}
.stat-card-label {
  font-size: 0.75rem;
  color: var(--fg-dim);
  margin-top: 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Sections */
.section { background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; margin-bottom: 0.5rem; }
.meta { color: var(--fg-muted); margin-bottom: 1rem; font-size: 0.9rem; }
.meta span { margin-right: 1.5rem; }
.empty { color: var(--fg-dim); padding: 2rem; text-align: center; font-family: var(--font-mono); font-size: 0.85rem; }

/* Status badges */
.status-badge { padding: 0.15rem 0.5rem; border-radius: var(--radius); font-size: 0.8rem; font-family: var(--font-mono); }
.ready-badge { color: var(--success); font-weight: bold; font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.05em; }
.not-ready-badge { color: var(--fg-dim); font-family: var(--font-mono); font-size: 0.75rem; }

/* Filters */
.filter-bar { display: flex; gap: 0.75rem; margin-bottom: 1rem; align-items: center; flex-wrap: wrap; }
.filter-bar select, .filter-bar input {
  background: var(--bg-surface); border: 1px solid var(--border); color: var(--fg);
  padding: 0.4rem 0.6rem; border-radius: var(--radius); font-family: var(--font-mono); font-size: 0.8rem;
}
.filter-bar select:focus, .filter-bar input:focus {
  outline: none;
  border-color: var(--accent-dim);
}
.filter-bar input { flex: 1; min-width: 12rem; }

/* Change list */
.changes { display: flex; flex-direction: column; gap: 0.5rem; }
.change { display: flex; align-items: center; gap: 1rem; padding: 0.75rem 1rem; background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius); text-decoration: none; color: inherit; transition: border-color 0.15s, background 0.15s; }
.change:hover { border-color: var(--border-hover); background: var(--bg-elevated); }
.change.hidden { display: none; }
.change-id { color: var(--accent); font-weight: 500; min-width: 4rem; font-family: var(--font-mono); font-size: 0.9rem; }
.change-title { flex: 1; }
.change-status { padding: 0.15rem 0.5rem; border-radius: var(--radius); font-size: 0.75rem; font-family: var(--font-mono); }
.change-parent { color: var(--fg-dim); font-family: var(--font-mono); font-size: 0.85rem; }

/* Confidence */
.confidence-bar { display: flex; gap: 3px; }
.confidence-dot { width: 10px; height: 10px; border-radius: var(--radius); }
.dim-row { display: flex; align-items: center; gap: 1rem; padding: 0.35rem 0; }
.dim-name { min-width: 12rem; font-family: var(--font-mono); font-size: 0.85rem; }
.dim-bar { flex: 1; height: 6px; background: var(--border); border-radius: var(--radius); overflow: hidden; }
.dim-fill { height: 100%; border-radius: var(--radius); transition: width 0.3s; }
.dim-score { min-width: 3rem; text-align: right; font-family: var(--font-mono); font-size: 0.85rem; }
.dim-status { min-width: 4rem; font-family: var(--font-mono); font-size: 0.85rem; }

/* Criteria */
.criteria-list { list-style: none; padding: 0; }
.criteria-list li { padding: 0.25rem 0; font-size: 0.9rem; }
.criteria-list li::before { content: "[ ] "; color: var(--fg-dim); font-family: var(--font-mono); }

/* Evidence */
.evidence-item { padding: 0.5rem 0; border-bottom: 1px solid var(--bg-surface-alt); font-size: 0.9rem; }
.evidence-item:last-child { border-bottom: none; }
.evidence-type { color: var(--accent); font-family: var(--font-mono); }
.evidence-dim { color: var(--fg-dim); font-family: var(--font-mono); }
.evidence-time { color: var(--fg-dim); font-size: 0.8rem; font-family: var(--font-mono); }

/* Reviews */
.review-dim { display: inline-block; padding: 0.1rem 0.5rem; margin: 0.15rem; border-radius: var(--radius); font-size: 0.8rem; font-family: var(--font-mono); }

/* Diff viewer */
.diff-file { margin-bottom: 0.75rem; }
.diff-header { display: flex; align-items: center; gap: 0.5rem; cursor: pointer; padding: 0.35rem 0; }
.diff-header:hover { color: var(--accent); }
.diff-badge { font-size: 0.7rem; padding: 0.1rem 0.4rem; border-radius: var(--radius); font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.03em; }
.diff-badge-added { background: color-mix(in srgb, var(--success) 15%, transparent); color: var(--success); }
.diff-badge-modified { background: color-mix(in srgb, var(--warning) 15%, transparent); color: var(--warning); }
.diff-badge-deleted { background: color-mix(in srgb, var(--error) 15%, transparent); color: var(--error); }
.diff-content { display: none; background: var(--bg-surface-alt); border: 1px solid var(--border); border-radius: var(--radius); padding: 0; overflow-x: auto; font-size: 0.8rem; line-height: 1.5; }
.diff-content.open { display: block; }
.diff-table { width: 100%; border-collapse: collapse; font-family: var(--font-mono); }
.diff-table td { padding: 0 0.5rem; white-space: pre; vertical-align: top; }
.diff-table .line-no { color: var(--fg-dim); text-align: right; min-width: 3rem; user-select: none; border-right: 1px solid var(--border); padding-right: 0.5rem; }
.diff-line-add { color: var(--success); }
.diff-line-del { color: var(--error); }
.diff-line-ctx { color: var(--fg-dim); }
.diff-line-hdr { color: var(--accent); font-weight: bold; }

/* Timeline */
.timeline-row { display: flex; gap: 0.75rem; padding: 0.3rem 0; border-bottom: 1px solid var(--bg-surface-alt); }
.timeline-time { color: var(--fg-dim); min-width: 10rem; font-size: 0.8rem; font-family: var(--font-mono); }
.timeline-icon { min-width: 1.5rem; text-align: center; font-family: var(--font-mono); }
.timeline-dim { color: var(--fg-dim); font-size: 0.8rem; font-family: var(--font-mono); }

/* Data tables */
.data-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.data-table th {
  text-align: left;
  padding: 0.5rem 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fg-dim);
  border-bottom: 1px solid var(--border);
  font-weight: 500;
}
.data-table td {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--bg-surface-alt);
  vertical-align: top;
}
.data-table tr:hover td { background: var(--bg-elevated); }
.data-table a { color: var(--accent); }

/* Tags/Pills */
.tag {
  display: inline-block;
  padding: 0.1rem 0.45rem;
  border-radius: var(--radius);
  font-size: 0.7rem;
  font-family: var(--font-mono);
  background: var(--bg-surface-alt);
  border: 1px solid var(--border);
  color: var(--fg-muted);
}
.tag-accent { background: var(--accent-glow); border-color: var(--accent-dim); color: var(--accent); }
.tag-success { background: rgba(90,154,107,0.15); border-color: rgba(90,154,107,0.3); color: var(--success); }
.tag-error { background: rgba(179,84,84,0.15); border-color: rgba(179,84,84,0.3); color: var(--error); }
.tag-warn { background: rgba(201,136,76,0.15); border-color: rgba(201,136,76,0.3); color: var(--warning); }
.tag-info { background: rgba(90,122,154,0.15); border-color: rgba(90,122,154,0.3); color: var(--info); }

/* Cards grid */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }
.card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  transition: border-color 0.15s;
}
.card:hover { border-color: var(--border-hover); }
.card-title { font-family: var(--font-mono); font-size: 0.9rem; color: var(--fg); margin-bottom: 0.5rem; }
.card-meta { font-size: 0.8rem; color: var(--fg-dim); }

/* Progress bar */
.progress-bar {
  height: 6px;
  background: var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: var(--radius);
  transition: width 0.3s;
}

/* Terminal output blocks */
.term-output {
  background: var(--bg-surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.5;
  overflow-x: auto;
  white-space: pre-wrap;
  color: var(--fg-muted);
}

/* Forms */
.form-input { background: var(--bg-surface-alt); border: 1px solid var(--border); color: var(--fg); padding: 0.4rem 0.6rem; border-radius: var(--radius); font-family: var(--font-mono); font-size: 0.85rem; }
.form-input:focus { outline: none; border-color: var(--accent-dim); }
.form-select { background: var(--bg-surface-alt); border: 1px solid var(--border); color: var(--fg); padding: 0.4rem; border-radius: var(--radius); font-family: var(--font-mono); font-size: 0.85rem; }
.form-select:focus { outline: none; border-color: var(--accent-dim); }
.btn { padding: 0.4rem 1rem; border: none; border-radius: var(--radius); cursor: pointer; font-family: var(--font-mono); font-weight: 500; font-size: 0.8rem; letter-spacing: 0.02em; transition: opacity 0.15s; }
.btn:hover { opacity: 0.85; }
.btn-primary { background: var(--accent); color: var(--bg); }
.btn-success { background: var(--success); color: var(--bg); }
.btn-ghost { background: none; border: 1px solid var(--border); color: var(--fg-muted); font-weight: normal; }
.btn-ghost:hover { border-color: var(--border-hover); color: var(--fg); }

/* Page header */
.page-header { margin-bottom: 1.5rem; }
.page-header h1 { margin-bottom: 0.25rem; }
.page-header p { color: var(--fg-dim); font-size: 0.85rem; }

/* File browser */
.file-tree a { font-family: var(--font-mono); font-size: 0.85rem; }

/* Blame view */
.blame-table { width: 100%; border-collapse: collapse; font-family: var(--font-mono); font-size: 0.8rem; }
.blame-table td { padding: 0 0.5rem; white-space: pre; vertical-align: top; border-bottom: 1px solid var(--bg-surface-alt); }
.blame-change { color: var(--accent-dim); min-width: 5rem; user-select: none; }
.blame-line-no { color: var(--fg-dim); text-align: right; min-width: 3rem; user-select: none; }
.blame-even { background: rgba(255,255,255,0.01); }

/* Graph */
.graph-container { position: relative; min-height: 400px; }
.graph-node {
  position: absolute;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  transition: border-color 0.15s;
  max-width: 200px;
}
.graph-node:hover { border-color: var(--accent); }
.graph-node-id { font-family: var(--font-mono); font-size: 0.75rem; color: var(--accent); }
.graph-node-title { font-size: 0.8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Mobile */
@media (max-width: 768px) {
  .sidebar { display: none; }
  .main-content { margin-left: 0; }
  body { padding: 1rem; }
  .change { flex-wrap: wrap; gap: 0.5rem; }
  .change-id { min-width: auto; }
  .dim-row { flex-wrap: wrap; }
  .dim-name { min-width: auto; width: 100%; }
  .dim-bar { width: 100%; }
  .filter-bar { flex-direction: column; }
  .filter-bar input { min-width: auto; width: 100%; }
  .timeline-row { flex-wrap: wrap; }
  .timeline-time { min-width: auto; }
  .stats-bar { gap: 0.75rem; }
  .stat-card { min-width: auto; flex: 1; }
  .card-grid { grid-template-columns: 1fr; }
}

/* ── Project selector (multi-project mode) ── */
.sidebar-project {
  padding: 0.5rem 1rem;
  border-bottom: 1px solid var(--border);
}
.project-selector {
  position: relative;
}
.project-selector summary {
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent);
  padding: 0.35rem 0.5rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 2px;
  list-style: none;
}
.project-selector summary::-webkit-details-marker { display: none; }
.project-selector summary::after { content: ' \25BE'; color: var(--fg-dim); }
.project-selector-list {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 100;
  margin: 0.25rem 0 0;
  padding: 0.25rem 0;
  list-style: none;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 2px;
  max-height: 300px;
  overflow-y: auto;
}
.project-selector-list li a {
  display: block;
  padding: 0.35rem 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--fg-muted);
  text-decoration: none;
}
.project-selector-list li a:hover {
  background: var(--bg-surface-alt);
  color: var(--fg);
}
.sidebar-group-bottom {
  margin-top: auto;
  border-top: 1px solid var(--border);
  padding-top: 0.5rem;
}

/* ── Home layout (multi-project dashboard) ── */
.home-layout {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem;
}
.home-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
}
.home-header .sidebar-logo {
  font-size: 2rem;
}

/* ── README display ── */
.readme-container {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 1.5rem 2rem;
  margin-bottom: 1.5rem;
}
.readme-content {
  font-family: var(--font-body);
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--fg);
}
.readme-content h1,
.readme-content h2,
.readme-content h3 {
  font-family: var(--font-display);
  color: var(--fg);
  margin: 1.25rem 0 0.5rem;
  padding-bottom: 0.25rem;
}
.readme-content h1 { font-size: 1.5rem; border-bottom: 1px solid var(--border); padding-bottom: 0.4rem; }
.readme-content h2 { font-size: 1.2rem; border-bottom: 1px solid var(--border); padding-bottom: 0.3rem; }
.readme-content h3 { font-size: 1rem; }
.readme-content h1:first-child { margin-top: 0; }
.readme-content p { margin: 0.5rem 0; }
.readme-content a { color: var(--accent); text-decoration: none; }
.readme-content a:hover { text-decoration: underline; }
.readme-content code {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  background: var(--bg-elevated);
  padding: 0.15rem 0.35rem;
  border-radius: 2px;
  border: 1px solid var(--border);
}
.readme-content pre {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 0.75rem 1rem;
  overflow-x: auto;
  margin: 0.75rem 0;
}
.readme-content pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.8rem;
  line-height: 1.5;
}
.readme-content ul, .readme-content ol {
  padding-left: 1.5rem;
  margin: 0.5rem 0;
}
.readme-content li { margin: 0.2rem 0; }
.readme-content blockquote {
  border-left: 3px solid var(--accent);
  margin: 0.75rem 0;
  padding: 0.25rem 1rem;
  color: var(--fg-muted);
}
.readme-content table {
  border-collapse: collapse;
  margin: 0.75rem 0;
  width: 100%;
}
.readme-content th, .readme-content td {
  border: 1px solid var(--border);
  padding: 0.35rem 0.75rem;
  text-align: left;
  font-size: 0.85rem;
}
.readme-content th {
  background: var(--bg-elevated);
  font-weight: 500;
}
.readme-content img { max-width: 100%; }
.readme-content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1rem 0;
}

/* ── Recent landed ── */
.recent-landed {
  margin-bottom: 1rem;
}
.recent-landed-title {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--fg-muted);
  margin: 0 0 0.5rem;
}
.recent-landed-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.recent-landed-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.4rem 0.75rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 2px;
  text-decoration: none;
  color: var(--fg);
  font-size: 0.85rem;
  transition: border-color 0.15s;
}
.recent-landed-item:hover {
  border-color: var(--accent-dim);
}
.recent-landed-item .change-id {
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: 0.8rem;
  min-width: 3.5rem;
}
.recent-landed-item .change-title {
  color: var(--fg-muted);
}

/* ═══ Settings & Admin ═══ */
.settings-sections { max-width: 640px; }
.settings-section { background: var(--bg-surface); border: 1px solid var(--border); border-radius: 6px; padding: 1.5rem; margin-bottom: 1.5rem; }
.settings-section h2 { margin: 0 0 1rem; font-size: 1.1rem; color: var(--accent); font-family: var(--font-mono); }
.settings-form { display: flex; flex-direction: column; gap: 0.75rem; }
.settings-field label { display: block; font-size: 0.85rem; color: var(--fg-muted); margin-bottom: 0.25rem; }
.settings-field input { width: 100%; padding: 0.5rem; background: var(--bg); border: 1px solid var(--border); border-radius: 4px; color: var(--fg); font-family: var(--font-mono); font-size: 0.9rem; box-sizing: border-box; }
.settings-field input:focus { border-color: var(--accent); outline: none; }
.settings-field-row { display: flex; justify-content: space-between; align-items: center; padding: 0.5rem 0; border-bottom: 1px solid var(--border); }
.settings-label { font-size: 0.85rem; color: var(--fg-muted); }
.settings-msg { font-size: 0.85rem; padding: 0.5rem; border-radius: 4px; }
.settings-msg.success { background: #5a9a6b22; color: #5a9a6b; }
.settings-msg.error { background: #b3545422; color: #b35454; }
.btn { display: inline-block; padding: 0.5rem 1rem; border: 1px solid var(--border); border-radius: 4px; background: var(--bg-surface-alt); color: var(--fg); cursor: pointer; font-size: 0.85rem; }
.btn:hover { border-color: var(--border-hover); background: var(--bg-elevated); }
.btn-primary { background: var(--accent-dim); border-color: var(--accent); color: var(--bg); }
.btn-primary:hover { background: var(--accent); }
.btn-danger { background: #b3545433; border-color: #b35454; color: #b35454; }
.btn-danger:hover { background: #b3545455; }
.btn-sm { padding: 0.25rem 0.5rem; font-size: 0.8rem; }
.sessions-list { display: flex; flex-direction: column; gap: 0.5rem; }
.session-item { display: flex; justify-content: space-between; align-items: center; padding: 0.75rem; background: var(--bg); border: 1px solid var(--border); border-radius: 4px; }
.session-current { border-color: var(--accent-dim); }
.session-info { display: flex; flex-direction: column; gap: 0.2rem; }
.session-ip { font-family: var(--font-mono); font-size: 0.85rem; }
.session-ua { font-size: 0.8rem; color: var(--fg-muted); }
.session-date { font-size: 0.75rem; color: var(--fg-dim); }
.recovery-codes { background: var(--bg); border: 1px solid var(--border); padding: 1rem; border-radius: 4px; font-family: var(--font-mono); font-size: 0.9rem; line-height: 1.8; }
.mono { font-family: var(--font-mono); }

/* Admin panel */
.admin-tabs { display: flex; gap: 0; margin-bottom: 1.5rem; border-bottom: 2px solid var(--border); }
.admin-tab { padding: 0.5rem 1.5rem; background: none; border: none; color: var(--fg-muted); cursor: pointer; font-size: 0.9rem; border-bottom: 2px solid transparent; margin-bottom: -2px; }
.admin-tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.admin-tab:hover { color: var(--fg); }
.admin-panel { }
.admin-section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.admin-section-header h2 { margin: 0; font-size: 1.1rem; }
.admin-form-inline { display: flex; gap: 0.5rem; align-items: center; margin-bottom: 1rem; flex-wrap: wrap; }
.admin-form-inline input, .admin-form-inline select { padding: 0.4rem 0.5rem; background: var(--bg); border: 1px solid var(--border); border-radius: 4px; color: var(--fg); font-size: 0.85rem; }
.data-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.data-table th { text-align: left; padding: 0.5rem; border-bottom: 2px solid var(--border); color: var(--fg-muted); font-weight: 500; font-size: 0.8rem; text-transform: uppercase; }
.data-table td { padding: 0.5rem; border-bottom: 1px solid var(--border); }
.data-table select { padding: 0.25rem; background: var(--bg); border: 1px solid var(--border); border-radius: 3px; color: var(--fg); font-size: 0.8rem; }

/* Login Page */
.login-page { display: flex; justify-content: center; align-items: center; min-height: 100vh; padding: 2rem; }
.login-card { background: var(--bg-surface); border: 1px solid var(--border); padding: 2.5rem 2rem 2rem; width: 320px; }
.login-logo { color: var(--accent); font-size: 2.2rem; text-align: center; line-height: 1; margin-bottom: 0.25rem; }
.login-title { font-family: var(--font-display); font-size: 1.4rem; text-align: center; margin-bottom: 1.5rem; color: var(--fg); font-weight: 400; border: none; }
.login-label { display: block; font-size: 0.75rem; color: var(--fg-muted); text-transform: uppercase; letter-spacing: 0.05em; font-family: var(--font-mono); margin-bottom: 0.25rem; }
.login-input { width: 100%; padding: 0.6rem 0.5rem; margin-bottom: 1rem; border: 1px solid var(--border); background: var(--bg); color: var(--fg); font-family: var(--font-mono); font-size: 0.9rem; outline: none; }
.login-input:focus { border-color: var(--accent); }
.login-btn { width: 100%; padding: 0.7rem; background: var(--accent); color: var(--bg); border: none; cursor: pointer; font-family: var(--font-body); font-weight: 600; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; }
.login-btn:hover { background: var(--accent-bright); }
.login-error { color: var(--error); font-size: 0.85rem; font-family: var(--font-mono); display: none; margin-bottom: 0.75rem; }
.login-mfa-step { display: none; }
.login-mfa-toggle { font-size: 0.8rem; margin-top: 0.75rem; text-align: center; }
.login-mfa-toggle a { color: var(--fg-dim); }
