/* Evidence Action brand styles — Archive Desk
   Ink #20253a · Magenta #e600a0 · Kale Green #05545a · Cool Gray #f8f8fa
   Headings: JetBrains Mono · Body: Roboto Condensed Light */

:root {
  --ink: #20253a;
  --magenta: #e600a0;
  --kale: #05545a;
  --cool: #f8f8fa;
  --blue: #d5f4f7;
  --lblue: #ecfafb;
  --green: #5dd9b3;
  --lemon: #f4f252;
  --pink: #ffb9ef;
  --tangerine: #feca90;
  --beige: #f2ede8;
  --line: #dfe2ea;
  --muted: #6b7183;
  --head: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --body: "Roboto Condensed", "Roboto Condensed Light", "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--body);
  font-weight: 300;
  font-size: 15.5px;
  line-height: 1.55;
  color: var(--ink);
  background: #fff;
}

h1, h2, h3, h4, .brandtype { font-family: var(--head); font-weight: 700; color: var(--ink); }
h1 { font-size: 1.6rem; margin: 0 0 .35rem; letter-spacing: -.01em; }
h2 { font-size: 1.15rem; margin: 2rem 0 .7rem; }
h3 { font-size: .98rem; margin: 1.4rem 0 .5rem; color: var(--kale); }
a { color: var(--kale); text-decoration: none; }
a:hover { text-decoration: underline; }
p { margin: .4rem 0 .8rem; }

/* ---------- shell ---------- */
.layout { display: flex; min-height: 100vh; }

.sidebar {
  width: 232px; flex: 0 0 232px; background: var(--ink); color: #fff;
  padding: 1.35rem 0 2rem; position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.sidebar .logo { padding: 0 1.25rem 1.15rem; border-bottom: 1px solid rgba(255,255,255,.13); }
.sidebar .logo img { width: 132px; display: block; }
.sidebar .logo .sub {
  font-family: var(--head); font-size: .62rem; letter-spacing: .13em;
  color: var(--magenta); margin-top: .55rem; font-weight: 700;
}
.nav { padding: 1rem .7rem 0; }
.nav .group {
  font-family: var(--head); font-size: .58rem; letter-spacing: .16em; text-transform: uppercase;
  color: rgba(255,255,255,.42); padding: 1.1rem .6rem .4rem;
}
.nav a {
  display: flex; justify-content: space-between; align-items: center;
  color: rgba(255,255,255,.84); padding: .46rem .6rem; border-radius: 6px;
  font-size: .93rem; margin-bottom: 1px;
}
.nav a:hover { background: rgba(255,255,255,.09); text-decoration: none; color: #fff; }
.nav a.active { background: var(--magenta); color: #fff; font-weight: 400; }
.nav .pill {
  background: rgba(255,255,255,.16); border-radius: 20px; padding: 0 .45rem;
  font-size: .72rem; font-family: var(--head);
}
.nav a.active .pill { background: rgba(0,0,0,.22); }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: .8rem 1.9rem; border-bottom: 1px solid var(--line); background: #fff;
  position: sticky; top: 0; z-index: 20;
}
.topbar .who { font-size: .86rem; color: var(--muted); text-align: right; }
.topbar .who strong { color: var(--ink); font-weight: 400; display: block; }
.content { padding: 1.6rem 1.9rem 4rem; max-width: 1180px; }

/* ---------- components ---------- */
.lede { color: var(--muted); font-size: .95rem; max-width: 62ch; margin-bottom: 1.4rem; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(168px, 1fr)); gap: .85rem; }
.card {
  border: 1px solid var(--line); border-radius: 10px; padding: .95rem 1.05rem; background: #fff;
}
.card .n { font-family: var(--head); font-size: 1.85rem; font-weight: 700; line-height: 1; }
.card .k {
  font-size: .68rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); margin-top: .45rem; font-family: var(--head);
}
.card.accent { background: var(--lblue); border-color: var(--blue); }
.card.warn { background: #fff6fb; border-color: var(--pink); }
.card.warn .n { color: var(--magenta); }

.panel {
  border: 1px solid var(--line); border-radius: 10px; padding: 1.15rem 1.25rem;
  margin: 1rem 0; background: #fff;
}
.panel.tinted { background: var(--cool); }
.panel > h2:first-child, .panel > h3:first-child { margin-top: 0; }

table { width: 100%; border-collapse: collapse; margin: .6rem 0 1rem; font-size: .9rem; }
th {
  text-align: left; background: var(--ink); color: #fff; font-family: var(--head);
  font-size: .7rem; letter-spacing: .05em; padding: .55rem .7rem; font-weight: 700;
}
td { padding: .55rem .7rem; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:nth-child(even) td { background: var(--cool); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.mono { font-family: var(--head); font-size: .84rem; }

.tag {
  display: inline-block; padding: .1rem .48rem; border-radius: 20px; font-size: .7rem;
  font-family: var(--head); font-weight: 700; letter-spacing: .03em;
}
.tag.ok { background: var(--green); color: #063a2c; }
.tag.wait { background: var(--blue); color: var(--kale); }
.tag.warn { background: var(--lemon); color: #4a4600; }
.tag.bad { background: var(--pink); color: #6d0049; }
.tag.grey { background: var(--line); color: var(--muted); }
.tag.ink { background: var(--ink); color: #fff; }

.btn {
  display: inline-block; border: 0; border-radius: 7px; padding: .5rem 1.05rem;
  font-family: var(--head); font-size: .8rem; font-weight: 700; cursor: pointer;
  background: var(--ink); color: #fff; text-decoration: none;
}
.btn:hover { background: #2c3350; text-decoration: none; color: #fff; }
.btn.primary { background: var(--magenta); }
.btn.primary:hover { background: #c40089; }
.btn.ghost { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.btn.ghost:hover { background: var(--cool); color: var(--ink); }
.btn.sm { padding: .3rem .7rem; font-size: .72rem; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }

label { display: block; font-size: .78rem; font-family: var(--head); font-weight: 700;
        color: var(--kale); margin: .85rem 0 .25rem; letter-spacing: .02em; }
input[type=text], input[type=email], input[type=password], input[type=number],
input[type=date], select, textarea {
  width: 100%; padding: .5rem .65rem; border: 1px solid var(--line); border-radius: 7px;
  font-family: var(--body); font-size: .92rem; color: var(--ink); background: #fff;
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--blue); border-color: var(--kale);
}
textarea { min-height: 90px; font-family: var(--head); font-size: .78rem; }
.hint { font-size: .78rem; color: var(--muted); margin-top: .25rem; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.1rem; }
.row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0 1.1rem; }
.checkline { display: flex; align-items: center; gap: .5rem; margin-top: .9rem; }
.checkline input { width: auto; }
.checkline label { margin: 0; }

.flash {
  border-left: 4px solid var(--green); background: #f0fdf8; padding: .6rem .9rem;
  border-radius: 0 7px 7px 0; margin: .8rem 0; font-size: .9rem;
}
.flash.error { border-left-color: var(--magenta); background: #fff5fb; }
.flash.info { border-left-color: var(--kale); background: var(--lblue); }

.callout {
  border-left: 4px solid var(--magenta); background: var(--cool);
  padding: .7rem 1rem; border-radius: 0 8px 8px 0; margin: .9rem 0; font-size: .9rem;
}

.flaglist { margin: .5rem 0 0; padding-left: 1.1rem; font-size: .86rem; color: #7a3d00; }
.flaglist li { margin-bottom: .18rem; }

/* ---------- login ---------- */
.loginwrap {
  min-height: 100vh; display: grid; grid-template-columns: 1.05fr .95fr;
}
.loginhero {
  background: var(--ink); color: #fff; padding: 3.2rem 3rem; display: flex;
  flex-direction: column; justify-content: space-between;
}
.loginhero img { width: 168px; }
.loginhero h1 { color: #fff; font-size: 2.05rem; line-height: 1.15; margin-top: 2.6rem; }
.loginhero .accent { color: var(--magenta); }
.loginhero p { color: rgba(255,255,255,.72); max-width: 40ch; font-size: .96rem; }
.loginhero .foot { font-size: .74rem; color: rgba(255,255,255,.42); font-family: var(--head); }
.loginform { display: flex; align-items: center; justify-content: center; padding: 2rem; }
.loginform .inner { width: 100%; max-width: 350px; }
.loginform .btn { width: 100%; margin-top: 1.4rem; padding: .65rem; }
.divider {
  display: flex; align-items: center; gap: .7rem; margin: 1.5rem 0 .4rem;
  color: var(--muted); font-size: .72rem; font-family: var(--head);
}
.divider::before, .divider::after {
  content: ""; flex: 1; height: 1px; background: var(--line);
}
.ssobtn {
  width: 100%; border: 1px solid var(--line); background: #fff; border-radius: 7px;
  padding: .6rem; font-family: var(--head); font-size: .8rem; color: var(--muted);
  display: flex; align-items: center; justify-content: center; gap: .5rem;
}

/* ---------- review ---------- */
.reviewgrid { display: grid; grid-template-columns: 1fr 320px; gap: 1.4rem; align-items: start; }
.pageview { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--cool); }
.pageview img { width: 100%; display: block; background: #fff; }
.pagebar {
  display: flex; align-items: center; justify-content: space-between;
  padding: .5rem .8rem; background: var(--ink); color: #fff; font-family: var(--head);
  font-size: .76rem;
}
.pagebar button {
  background: rgba(255,255,255,.14); color: #fff; border: 0; border-radius: 5px;
  padding: .25rem .7rem; cursor: pointer; font-family: var(--head); font-size: .74rem;
}
.pagebar button:hover { background: rgba(255,255,255,.28); }
.thumbs { display: flex; gap: .4rem; overflow-x: auto; padding: .5rem; background: var(--cool); }
.thumbs img {
  height: 62px; border: 2px solid transparent; border-radius: 4px; cursor: pointer; background: #fff;
}
.thumbs img.on { border-color: var(--magenta); }
.side .panel { margin-top: 0; }
.kv { font-size: .86rem; margin-bottom: .55rem; }
.kv .k { color: var(--muted); font-size: .7rem; font-family: var(--head);
         text-transform: uppercase; letter-spacing: .07em; }

.setupgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(232px, 1fr)); gap: .9rem; }
.setupcard {
  border: 1px solid var(--line); border-radius: 10px; padding: 1.1rem; background: #fff;
  display: block; color: var(--ink);
}
.setupcard:hover { border-color: var(--kale); text-decoration: none; background: var(--lblue); }
.setupcard h3 { margin: 0 0 .3rem; color: var(--ink); }
.setupcard p { font-size: .84rem; color: var(--muted); margin: 0; }

.checkrow { display: flex; align-items: center; gap: .6rem; padding: .4rem 0;
            border-bottom: 1px solid var(--line); font-size: .9rem; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--line); flex: 0 0 9px; }
.dot.on { background: var(--green); }

.dropzone {
  border: 2px dashed var(--line); border-radius: 10px; padding: 1.6rem; text-align: center;
  background: var(--cool); color: var(--muted); font-size: .9rem;
}
.dropzone.over { border-color: var(--magenta); background: #fff5fb; color: var(--ink); }
.filelist { font-size: .84rem; margin-top: .6rem; color: var(--ink); font-family: var(--head); }

footer.appfoot {
  margin-top: auto; padding: 1rem 1.9rem; border-top: 1px solid var(--line);
  font-size: .74rem; color: var(--muted); display: flex; justify-content: space-between;
}

@media (max-width: 900px) {
  .layout { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: static; }
  .reviewgrid, .row, .row3, .loginwrap { grid-template-columns: 1fr; }
  .loginhero { padding: 2rem; }
}
