/* Session GEO Control — minimal internal-tool styling. */
:root {
  --bg: #f6f7f5;
  --panel: #ffffff;
  --ink: #24312b;
  --muted: #6b7a72;
  --accent: #2f6f4f;
  --border: #dde3df;
  --critical: #b3372f;
  --warning: #a06a12;
  --info: #47617a;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-size: 15px;
  line-height: 1.5;
}

.shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 210px;
  flex-shrink: 0;
  background: var(--ink);
  color: #e8ede9;
  display: flex;
  flex-direction: column;
  padding: 1rem;
}
.brand { font-weight: 700; font-size: 1.05rem; margin-bottom: 1.5rem; line-height: 1.3; }
.sidebar nav { display: flex; flex-direction: column; gap: 0.25rem; }
.sidebar nav a {
  color: #cfd9d2;
  text-decoration: none;
  padding: 0.35rem 0.5rem;
  border-radius: 6px;
}
.sidebar nav a:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.sidebar-footer { margin-top: auto; font-size: 0.85rem; }
.sidebar-footer a { color: #cfd9d2; }
.linklike {
  background: none; border: none; color: #cfd9d2;
  cursor: pointer; padding: 0; font: inherit; text-decoration: underline;
}

.content { flex: 1; padding: 1.5rem 2rem; max-width: 1100px; }
h1 { font-size: 1.4rem; margin-top: 0; }
h2 { font-size: 1.1rem; margin-top: 1.75rem; }
a { color: var(--accent); }
code, pre { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 0.85em; }
.muted { color: var(--muted); font-size: 0.9em; }

table { border-collapse: collapse; width: 100%; background: var(--panel); }
th, td { text-align: left; padding: 0.45rem 0.6rem; border-bottom: 1px solid var(--border); vertical-align: top; }
thead th { background: #eef1ee; font-size: 0.85em; }
td.num { text-align: right; }
td.subject { word-break: break-all; max-width: 320px; }
table.kv th { width: 160px; color: var(--muted); font-weight: 500; }
table.narrow, form.narrow { max-width: 480px; }

.stat-row { display: flex; gap: 1rem; flex-wrap: wrap; margin: 1rem 0; }
.stat {
  background: var(--panel); border: 1px solid var(--border); border-radius: 8px;
  padding: 0.75rem 1.25rem; min-width: 110px; text-align: center;
}
.stat-value { font-size: 1.7rem; font-weight: 700; }
.stat-label { font-size: 0.8rem; color: var(--muted); }
.sev-critical .stat-value { color: var(--critical); }
.sev-warning .stat-value { color: var(--warning); }
.sev-info .stat-value { color: var(--info); }

.trend { display: flex; align-items: flex-end; gap: 6px; height: 120px; margin: 0.5rem 0 1rem; }
.trend-bar {
  width: 34px; height: 100px; background: #e7ebe8; border-radius: 4px;
  position: relative; display: flex; align-items: flex-end;
}
.trend-fill { width: 100%; background: var(--accent); border-radius: 4px; }
.trend-label {
  position: absolute; top: 100%; left: 0; right: 0;
  text-align: center; font-size: 0.7rem; color: var(--muted);
}

.pill {
  display: inline-block; padding: 0.05rem 0.5rem; border-radius: 999px;
  font-size: 0.75rem; font-weight: 600; color: #fff;
}
.pill-critical { background: var(--critical); }
.pill-warning { background: var(--warning); }
.pill-info { background: var(--info); }
.pill-new { background: var(--accent); }

.status-completed, .status-approved { color: var(--accent); }
.status-failed, .status-disabled { color: var(--critical); }
.status-running, .status-pending { color: var(--warning); }

.flash { padding: 0.6rem 0.9rem; border-radius: 6px; margin-bottom: 1rem; }
.flash-error { background: #f7e3e1; color: var(--critical); }
.flash-success { background: #e2efe7; color: var(--accent); }
.field-error { color: var(--critical); font-size: 0.85em; }

.button {
  background: var(--accent); color: #fff; border: none; border-radius: 6px;
  padding: 0.45rem 0.9rem; cursor: pointer; font-size: 0.9rem;
}
.button:disabled { opacity: 0.5; cursor: default; }
.button-danger { background: var(--critical); }

form label { display: block; margin-bottom: 0.75rem; }
form label input, form textarea, select {
  display: block; width: 100%; max-width: 420px; padding: 0.4rem 0.5rem;
  border: 1px solid var(--border); border-radius: 6px; font: inherit; margin-top: 0.2rem;
}
form.inline, details.inline { display: inline-block; margin: 0 0.25rem 0 0; }
form.inline select, details.inline input { display: inline-block; width: auto; }
.filter-bar { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }
.filter-bar select { width: auto; display: inline-block; }
.two-col { display: flex; gap: 2rem; flex-wrap: wrap; }
.two-col > div { flex: 1; min-width: 320px; }
.pager { margin: 1rem 0; display: flex; gap: 1rem; }

.evidence {
  background: var(--panel); border: 1px solid var(--border); border-radius: 6px;
  padding: 0.75rem; overflow-x: auto; white-space: pre-wrap; word-break: break-all;
}

.auth-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.auth-card {
  background: var(--panel); border: 1px solid var(--border); border-radius: 10px;
  padding: 2rem; width: 380px;
}
.auth-card h1 { font-size: 1.2rem; }
.auth-alt { font-size: 0.85rem; }

article.doc { background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 1.5rem 2rem; }
article.doc h1 { font-size: 1.5rem; }
article.doc h2 { border-bottom: 1px solid var(--border); padding-bottom: 0.25rem; }
article.doc blockquote {
  border-left: 3px solid var(--accent); margin-left: 0; padding-left: 1rem; color: var(--muted);
}
article.doc table { font-size: 0.9em; }
