:root {
  --navy: #1c2f4a; --navy-2: #24395a; --gold: #b08d57; --bg: #fafaf7;
  --ink: #1f2937; --muted: #6f7b89; --line: #e2e8f0; --panel: #fff;
  --helps: #2f7d4f; --hurts: #b4452f; --neutral: #7b8794;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg); color: var(--ink); }
a { color: var(--navy); }
.muted { color: var(--muted); }
code { background: #f0eee6; padding: 1px 5px; border-radius: 3px; font-size: 12px; }

/* ---- layout ---- */
.layout { display: grid; grid-template-columns: 220px 1fr; min-height: 100vh; }
.sidebar { background: var(--navy); color: #fff; display: flex; flex-direction: column; padding: 16px 0; }
.brand { display: block; font-family: Georgia, serif; font-size: 17px; letter-spacing: .5px;
  padding: 8px 20px 18px; color: inherit; text-decoration: none; }
.brand span { color: var(--gold); }
.sidebar nav { display: flex; flex-direction: column; }
.sidebar nav a { color: rgba(255,255,255,.72); text-decoration: none; padding: 10px 20px;
  font-size: 14px; border-left: 3px solid transparent; }
.sidebar nav a:hover { color: #fff; background: var(--navy-2); }
.sidebar nav a.active { color: #fff; border-left-color: var(--gold); background: var(--navy-2); }
.side-foot { margin-top: auto; padding: 16px 20px 4px; border-top: 1px solid rgba(255,255,255,.1); }
.side-foot .who { font-size: 12px; color: rgba(255,255,255,.7); display: flex; flex-direction: column; gap: 2px; }
.side-foot .role { color: var(--gold); text-transform: uppercase; letter-spacing: 1px; font-size: 10px; }
.link-btn { background: none; border: none; color: rgba(255,255,255,.6); cursor: pointer;
  padding: 8px 0 0; font-size: 12px; }
.link-btn:hover { color: #fff; }
.content { padding: 28px 32px; max-width: 1100px; min-width: 0; }

/* ---- headers ---- */
.page-head h1 { margin: 0 0 2px; font-size: 22px; }
.page-head .muted { margin: 0 0 18px; font-size: 13px; }

/* ---- cards ---- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 16px 18px;
  text-decoration: none; color: inherit; border-left: 3px solid var(--gold); display: block; }
a.card:hover { box-shadow: 0 2px 10px rgba(28,47,74,.08); }
.card-num { font-size: 28px; font-weight: 700; color: var(--navy); }
.card-label { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }

.banner { background: #fff8e6; border: 1px solid #f0d98a; color: #7a5b12; padding: 12px 16px;
  border-radius: 8px; margin: 18px 0; font-size: 13px; }

/* ---- panels / issues ---- */
.panel { margin-top: 26px; }
.panel h2 { font-size: 16px; margin: 0 0 12px; }
.issue-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.issue-cat { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; }
.issue-cat h3 { font-size: 12px; margin: 0 0 8px; color: var(--gold); text-transform: uppercase; letter-spacing: .5px; }
.issue-cat ul { margin: 0; padding-left: 16px; }
.issue-cat li { font-size: 13px; line-height: 1.7; color: #374151; }

/* ---- tables ---- */
.search { width: 100%; max-width: 340px; padding: 9px 12px; border: 1px solid var(--line);
  border-radius: 7px; font-size: 14px; margin-bottom: 16px; }
table.data { width: 100%; border-collapse: collapse; background: var(--panel);
  border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
table.data th { background: var(--navy); color: #fff; text-align: left; font-size: 11px;
  text-transform: uppercase; letter-spacing: 1px; padding: 9px 12px; }
table.data td { padding: 9px 12px; border-top: 1px solid var(--line); font-size: 13px; }
/* Detail-page tables have few columns — size to content instead of sprawling. */
.detail-main table.data { width: auto; max-width: 100%; }
.detail-main table.data th, .detail-main table.data td { white-space: nowrap; }
.side { padding: 2px 8px; border-radius: 4px; font-size: 11px; font-weight: 600; }
.side-ttg { background: #e6efe9; color: var(--helps); }
.side-csi { background: #f6e7e3; color: var(--hurts); }
.side-third-party, .side-unknown { background: #eef1f4; color: var(--neutral); }

/* ---- timeline ---- */
.tl-legend { margin-bottom: 12px; }
.chip { display: inline-block; font-size: 11px; padding: 2px 9px; border-radius: 10px; margin-right: 6px; }
.chip.helps { background: #e6efe9; color: var(--helps); }
.chip.hurts { background: #f6e7e3; color: var(--hurts); }
.chip.neutral { background: #eef1f4; color: var(--neutral); }
.tl-canvas { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 6px; }
.vis-item.ev-helps { background: #e6efe9; border-color: var(--helps); color: #14532d; }
.vis-item.ev-hurts { background: #f6e7e3; border-color: var(--hurts); color: #6b1d10; }
.vis-item.ev-neutral { background: #eef1f4; border-color: var(--neutral); color: #2b3543; }
.tl-detail { position: fixed; right: 22px; bottom: 22px; width: 320px; background: var(--panel);
  border: 1px solid var(--line); border-left: 3px solid var(--gold); border-radius: 8px;
  padding: 16px 18px; box-shadow: 0 8px 28px rgba(28,47,74,.18); }
.tl-detail h3 { margin: 0 8px 6px 0; font-size: 15px; }
.tl-close { position: absolute; top: 8px; right: 10px; border: none; background: none; font-size: 20px;
  color: var(--muted); cursor: pointer; }
.tl-d-meta { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.tag { display: inline-block; background: #eef1f4; color: #374151; font-size: 11px; padding: 2px 8px;
  border-radius: 4px; margin: 2px 4px 2px 0; }
.tl-d-evidence { margin-top: 10px; }
.ev-link { font-size: 13px; font-weight: 600; text-decoration: none; }

/* ---- stub ---- */
.stub { background: var(--panel); border: 1px dashed var(--line); border-radius: 10px; padding: 40px;
  text-align: center; color: var(--muted); }
.stub-mark { display: inline-block; background: var(--gold); color: #fff; border-radius: 10px;
  padding: 2px 10px; font-size: 11px; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 10px; }

/* ---- login ---- */
.login-body { display: grid; place-items: center; min-height: 100vh; background: var(--navy); }
.login-card { background: var(--panel); padding: 32px 34px; border-radius: 12px; width: 340px;
  display: flex; flex-direction: column; gap: 4px; box-shadow: 0 14px 40px rgba(0,0,0,.3); }
.brand-lg { font-size: 24px; padding: 0; text-align: center; }
.login-sub { text-align: center; color: var(--muted); font-size: 13px; margin: 2px 0 16px; }
.login-card label { font-size: 12px; color: var(--muted); display: flex; flex-direction: column; gap: 5px;
  margin-bottom: 12px; }
.login-card input { padding: 10px 12px; border: 1px solid var(--line); border-radius: 7px; font-size: 14px; }
.btn-primary { background: var(--navy); color: #fff; border: none; padding: 11px; border-radius: 7px;
  font-size: 14px; cursor: pointer; margin-top: 4px; }
.btn-primary:hover { background: var(--navy-2); }
.login-error { background: #f6e7e3; color: var(--hurts); padding: 9px 12px; border-radius: 7px;
  font-size: 13px; margin-bottom: 12px; }

/* ---- filter chips ---- */
.filter-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.chip-link { text-decoration: none; font-size: 12px; padding: 4px 11px; border-radius: 14px;
  border: 1px solid var(--line); color: #374151; background: #fff; }
.chip-link:hover { border-color: var(--gold); }
.chip-link.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.chip-link span { opacity: .65; margin-left: 3px; }

/* ---- document detail ---- */
.detail-grid { display: grid; grid-template-columns: 1fr 240px; gap: 24px; }
/* let the main column shrink so overflow-x (doc scroller) scrolls instead of widening the page */
.detail-main { min-width: 0; }
.doc-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-bottom: 14px; }
.doc-meta span { font-size: 12px; color: #4a5568; }
.doc-meta b { color: var(--muted); text-transform: uppercase; letter-spacing: .5px; font-size: 10px; margin-right: 4px; }
.doc-text { background: var(--panel); border: 1px solid var(--line); border-radius: 8px;
  padding: 16px; max-height: 60vh; overflow: auto; white-space: pre-wrap; word-wrap: break-word;
  font: 13px/1.6 ui-monospace, monospace; color: #1f2937; }
.detail-side h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .5px; color: var(--gold); }
.side-list { list-style: none; padding: 0; margin: 0; }
.side-list li { font-size: 13px; padding: 5px 0; border-bottom: 1px solid var(--line); display: flex;
  justify-content: space-between; align-items: center; gap: 6px; }
.alias-badge { position: relative; font-size: 11px; color: var(--muted); background: var(--panel);
  border: 1px solid var(--line); border-radius: 10px; padding: 0 6px; margin-left: 4px; cursor: pointer;
  white-space: nowrap; outline: none; }
/* hover/focus popover listing the merged-in names */
.alias-pop { display: none; position: absolute; left: 0; top: 140%; z-index: 30; min-width: 180px;
  max-width: 320px; background: #fff; color: var(--ink, #111); border: 1px solid var(--line);
  border-radius: 6px; box-shadow: 0 4px 16px rgba(0,0,0,0.14); padding: 8px 10px; white-space: normal;
  font-weight: 400; }
.alias-pop b { display: block; font-size: 11px; color: var(--muted); margin-bottom: 4px; }
.alias-pop span { display: block; font-size: 12px; padding: 2px 0; border-top: 1px solid var(--line); }
.alias-badge:hover .alias-pop, .alias-badge:focus .alias-pop { display: block; }
.btn-link { background: none; border: none; color: var(--accent, #2563eb); font-size: 12px; cursor: pointer;
  padding: 0 2px; white-space: nowrap; }
.btn-link:hover { text-decoration: underline; }

/* ---- inline auto-save edit controls ---- */
.inline-edit { padding: 3px 6px; border: 1px solid var(--line); border-radius: 5px; font-size: 12px;
  background: #fff; max-width: 150px; }
table.data .inline-edit { width: 100%; }
.flash-slot, .flash-ok { font-size: 11px; color: #15803d; font-weight: 600; margin-left: 6px; }
.role-form label { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; margin-right: 12px; }

/* ---- document list (person/org detail): full-width, scrolls vertically ---- */
.doc-list-wrap { max-height: 72vh; overflow: auto; border: 1px solid var(--line); border-radius: 8px; }
.detail-main table.doc-list { width: 100%; max-width: 100%; border: 0; border-radius: 0; }
.detail-main table.doc-list th, .detail-main table.doc-list td { white-space: normal; }
table.doc-list thead th { position: sticky; top: 0; z-index: 1; }

/* ---- mention highlighting in document text ---- */
.hl-bar { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted);
  margin-bottom: 8px; }
mark.hl { background: #fde68a; color: #5a4300; border-radius: 2px; padding: 0 1px; }
mark.hl.on { background: #f59e0b; color: #1f2937; outline: 2px solid #b45309; }

/* ---- document prev/next nav ---- */
.doc-nav { display: flex; justify-content: space-between; align-items: center; gap: 12px;
  margin-bottom: 6px; flex-wrap: wrap; }
.doc-nav-pn { display: flex; align-items: center; gap: 8px; }
.btn-sm.disabled { opacity: .4; pointer-events: none; }

/* ---- document card grid (person/org detail): wraps, scrolls vertically,
   contained — usable for 5 docs or 900+ ---- */
.doc-scroll { display: flex; flex-wrap: wrap; gap: 10px; padding: 6px 2px;
  max-height: 440px; overflow-y: auto; }
.doc-card { flex: 1 1 200px; max-width: 320px; display: flex; flex-direction: column;
  gap: 6px; min-height: 70px; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px;
  background: var(--panel); text-decoration: none; color: inherit; }
.doc-card:hover { border-color: var(--accent, #2563eb); }
.doc-card-title { font-size: 13px; font-weight: 600; line-height: 1.3; overflow: hidden;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.doc-card-meta { font-size: 11px; color: var(--muted); margin-top: auto; }

/* ---- Excel-style column filters ---- */
.filter-row th { padding: 3px 6px; background: var(--panel); border-bottom: 2px solid var(--line); font-weight: 400; }
.col-filter { width: 100%; padding: 3px 5px; border: 1px solid var(--line); border-radius: 5px;
  font-size: 12px; background: #fff; }

/* ---- managed vocabulary editor ---- */
.vocab-list { display: flex; flex-direction: column; gap: 6px; max-width: 640px; }
.vocab-row { display: flex; align-items: center; gap: 10px; padding: 4px 0;
  border-bottom: 1px solid var(--line); }
.vocab-edit { display: flex; align-items: center; gap: 8px; margin: 0; }
.vocab-edit input[name="label"] { padding: 4px 8px; border: 1px solid var(--line); border-radius: 5px; }
.vocab-edit input[type="color"] { width: 30px; height: 26px; padding: 0; border: 1px solid var(--line); }
.vocab-hide { font-size: 12px; color: var(--muted); display: inline-flex; align-items: center; gap: 4px; }
.vocab-del { margin: 0; }
.vocab-flag { font-size: 11px; }

/* ---- document tags ---- */
.tag-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.tag-chip { display: inline-flex; align-items: center; gap: 4px; background: var(--panel);
  border: 1px solid var(--line); border-radius: 12px; padding: 2px 4px 2px 10px; font-size: 12px; }
.tag-x { background: none; border: none; cursor: pointer; color: var(--muted); font-size: 14px;
  line-height: 1; padding: 0 4px; }
.tag-x:hover { color: #b91c1c; }
.tag-mini { display: inline-block; background: var(--panel); border: 1px solid var(--line);
  border-radius: 10px; padding: 0 7px; font-size: 11px; color: var(--muted); white-space: nowrap; }

/* ---- bulk merge / classify toolbar ---- */
.bulk-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: var(--panel);
  border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px; margin-bottom: 12px; font-size: 13px; }
.bulk-bar .bulk-sep { color: var(--muted); }
/* stacked people-bulk controls for the narrow detail sidebar */
.pbulk { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.pbulk-row { display: flex; gap: 6px; align-items: center; }
.pbulk-row select { flex: 1; min-width: 0; padding: 5px 7px; border: 1px solid var(--line);
  border-radius: 6px; font-size: 13px; }
.bulk-side { padding: 6px 9px; border: 1px solid var(--line); border-radius: 6px; font-size: 13px; }
.cbcol { width: 28px; text-align: center; }
.cbcol input { cursor: pointer; }

/* ---- sortable headers ---- */
th.sortable { padding: 0; }
.sort-th { display: block; padding: 9px 12px; color: #fff; text-decoration: none; }
.sort-th:hover { background: var(--navy-2); }
.sort-th .arr { color: var(--gold); }

/* ---- inline edit forms (detail sidebar) ---- */
.inline-form { display: flex; gap: 6px; margin-bottom: 18px; align-items: center; }
.inline-form select { flex: 1; padding: 7px 9px; border: 1px solid var(--line); border-radius: 6px;
  font-size: 13px; max-width: 100%; }
.btn-sm { background: var(--navy); color: #fff; border: none; padding: 7px 12px; border-radius: 6px;
  font-size: 12px; cursor: pointer; white-space: nowrap; }
.btn-sm:hover { background: var(--navy-2); }

/* ---- settings form ---- */
.settings-form { background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
  padding: 22px 24px; max-width: 560px; }
.settings-form h2 { font-size: 14px; margin: 0 0 14px; color: var(--gold);
  text-transform: uppercase; letter-spacing: .5px; }
.settings-form label { display: flex; flex-direction: column; gap: 5px; font-size: 13px;
  font-weight: 600; margin-bottom: 18px; }
.settings-form input { padding: 9px 12px; border: 1px solid var(--line); border-radius: 7px;
  font-size: 14px; font-weight: 400; }
.settings-form .hint { font-size: 12px; color: var(--muted); font-weight: 400; }

/* ---- badges ---- */
.badge { font-size: 11px; padding: 2px 8px; border-radius: 4px; font-weight: 600; }
.badge.ok { background: #e6efe9; color: var(--helps); }
.badge.warn { background: #fff3d6; color: #8a6100; }
.badge.muted-badge { background: #eef1f4; color: var(--neutral); }

/* ---- Issue Timeline Builder (TL) ---- */
.tl-new { margin-bottom: 16px; }
.tl-new-form { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.tl-new-form input { padding: 7px 9px; border: 1px solid var(--line); border-radius: 6px;
  font-size: 13px; flex: 1 1 180px; }
.tl-topics { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.tl-topic-card { display: flex; flex-direction: column; gap: 4px; background: var(--panel);
  border: 1px solid var(--line); border-radius: 8px; padding: 14px; text-decoration: none; color: inherit; }
.tl-topic-card:hover { border-color: var(--accent, #2563eb); }
.tl-topic-name { font-weight: 600; font-size: 14px; }
.tl-counts { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 6px; }

.tl-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px;
  flex-wrap: wrap; margin-bottom: 16px; }
.tl-exports { display: flex; gap: 6px; }

.timeline { list-style: none; margin: 0; padding: 0; }
.tl-event { display: grid; grid-template-columns: 104px 22px 1fr; }
.tl-date { font-size: 12px; color: var(--muted); text-align: right; padding: 16px 10px 0 0;
  font-weight: 600; white-space: nowrap; }
.tl-line { position: relative; }
.tl-line::before { content: ""; position: absolute; left: 10px; top: 0; bottom: 0; width: 2px; background: var(--line); }
.tl-dot { position: absolute; left: 4px; top: 18px; width: 13px; height: 13px; border-radius: 50%;
  background: #94a3b8; border: 2px solid #fff; }
.tl-event.tl-approved .tl-dot { background: #15803d; }
.tl-event.tl-excluded .tl-dot { background: #cbd5e1; }
.tl-event.tl-excluded .tl-card { opacity: .55; }
.tl-card { background: var(--panel); border: 1px solid var(--line); border-radius: 8px;
  padding: 12px 14px; margin: 8px 0; }
.tl-card-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tl-title { font-weight: 600; font-size: 14px; }
.tl-summary { font-size: 13px; margin: 6px 0; line-height: 1.45; }
.tl-relevance { font-size: 12px; color: #4a5568; margin: 4px 0; }
.tl-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 6px 0; }
.tl-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 6px;
  border-top: 1px solid var(--line); padding-top: 8px; }
.tl-edit-wrap { width: 100%; }
.tl-edit { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; background: #f8fafc;
  padding: 12px; border-radius: 6px; }
.tl-edit label { display: flex; flex-direction: column; gap: 3px; font-size: 11px; color: var(--muted);
  text-transform: uppercase; letter-spacing: .4px; }
.tl-edit input, .tl-edit textarea, .tl-edit select { padding: 6px 8px; border: 1px solid var(--line);
  border-radius: 5px; font-size: 13px; font-family: inherit; }
.tl-edit-2 { display: flex; gap: 8px; }
.tl-edit-2 label { flex: 1; }
.tl-topic-picks { display: flex; flex-direction: column; gap: 4px; max-height: 220px; overflow-y: auto;
  margin: 6px 0; border: 1px solid var(--line); border-radius: 6px; padding: 8px; }
.tl-pick { font-size: 12px; display: flex; gap: 6px; align-items: center; }

/* Ask the Case (AI-01) */
.ask-form { display: flex; gap: 8px; align-items: center; margin-bottom: 14px; }
.ask-form .btn-primary { width: auto; padding: 9px 20px; }
.ask-answer { background: var(--panel); border: 1px solid var(--line); border-radius: 8px;
  padding: 16px 18px; line-height: 1.55; font-size: 14px; max-width: 820px; }
.ask-answer a { color: var(--navy); font-weight: 600; text-decoration: none; }
.ask-answer a:hover { text-decoration: underline; }
.ask-sources { max-width: 820px; padding-left: 22px; }
.ask-sources li { margin: 4px 0; font-size: 13px; }
.ask-thread { margin-bottom: 18px; }
.ask-turn { margin-bottom: 20px; }
.ask-turn + .ask-turn { border-top: 1px dashed var(--line); padding-top: 18px; }
.ask-q { font-size: 15px; font-weight: 600; color: var(--navy); margin-bottom: 8px;
  max-width: 820px; }
.ask-q-badge { display: inline-block; font-size: 10px; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; color: #fff; background: var(--navy); border-radius: 4px;
  padding: 2px 6px; margin-right: 8px; vertical-align: middle; }
.ask-form .btn-sm { align-self: center; }
/* Ask layout: previous-queries sidebar + thread */
.ask-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 24px; align-items: start; }
.ask-main { min-width: 0; }
.ask-history { border-right: 1px solid var(--line); padding-right: 16px; }
.ask-history-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.ask-history-head h3 { margin: 0; font-size: 13px; }
.ask-history-list { list-style: none; margin: 0; padding: 0; }
.ask-history-list li { border-radius: 6px; margin-bottom: 2px; }
.ask-history-list li.on { background: var(--panel); }
.ask-history-list a { display: block; padding: 7px 9px; text-decoration: none; color: inherit; }
.ask-history-list a:hover { background: var(--panel); border-radius: 6px; }
.ask-h-title { display: block; font-size: 13px; line-height: 1.3; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; }
.ask-h-date { display: block; font-size: 11px; color: var(--muted); margin-top: 1px; }
@media (max-width: 760px) { .ask-layout { grid-template-columns: 1fr; }
  .ask-history { border-right: none; border-bottom: 1px solid var(--line); padding: 0 0 12px; } }

/* Document upload (INGEST-07) */
.page-head-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.btn-inline { width: auto; display: inline-block; padding: 9px 16px; text-decoration: none; white-space: nowrap; }
.upload-form { max-width: 560px; display: flex; flex-direction: column; gap: 16px; }
.up-field { display: flex; flex-direction: column; gap: 5px; }
.up-label { font-size: 13px; font-weight: 600; }
.up-field input[type=text], .up-field select, .up-field input[type=file] {
  padding: 9px 12px; border: 1px solid var(--line); border-radius: 7px; font-size: 14px;
  background: var(--panel); max-width: 100%; }
.up-check { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; line-height: 1.4; }
.up-check input { margin-top: 2px; }
.up-actions { display: flex; align-items: center; gap: 12px; margin-top: 4px; }

/* Drag-and-drop upload (INGEST-07) */
.dropzone { border: 2px dashed var(--line); border-radius: 10px; padding: 26px 18px;
  text-align: center; cursor: pointer; background: var(--panel); transition: border-color .15s, background .15s; }
.dropzone:hover, .dropzone:focus { border-color: var(--gold); outline: none; }
.dropzone.over { border-color: var(--navy); background: #f3f6fb; }
.dz-icon { font-size: 26px; color: var(--navy); margin-bottom: 6px; }
.dz-browse { color: var(--navy); font-weight: 600; text-decoration: underline; }
.dz-list { list-style: none; margin: 14px 0 0; padding: 12px 0 0; border-top: 1px solid var(--line);
  text-align: left; font-size: 13px; }
.dz-list li { padding: 3px 0; color: #374151; }

/* Relationship graph (STORE-04 / INTEL-01) */
.graph-controls { display: flex; gap: 14px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 14px; }
.graph-controls .up-field input { padding: 9px 12px; border: 1px solid var(--line); border-radius: 7px; font-size: 14px; }
.graph-canvas { height: 64vh; min-height: 420px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); }

/* Graph edge → shared-documents panel (INTEL-01) */
.edge-panel { margin-top: 14px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--panel); padding: 14px 16px; max-height: 46vh; overflow: auto; }
.edge-panel table.data { margin-top: 4px; }

/* Show/hide password eye (PLAT-09) */
.pw-wrap { position: relative; display: block; }
.pw-wrap input { width: 100%; padding-right: 40px !important; }
.pw-eye { position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; padding: 4px; line-height: 0;
  color: var(--muted); opacity: .7; display: flex; align-items: center; }
.pw-eye:hover { opacity: 1; color: var(--navy); }
