:root {
  color-scheme: light;
  --ink: #17231f;
  --muted: #64716b;
  --paper: #f4f6f1;
  --card: #ffffff;
  --line: #dde3dc;
  --green: #176b50;
  --green-dark: #0e4c38;
  --red: #a53b34;
  --amber: #9b6500;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font-size: 17px; line-height: 1.5; }
a { color: var(--green-dark); }
button, input, textarea { font: inherit; }
.topbar { min-height: 68px; display: flex; align-items: center; gap: 28px; padding: 0 5vw; background: var(--card); border-bottom: 1px solid var(--line); }
.brand, .mark { color: var(--card); background: var(--green); font-weight: 800; letter-spacing: .04em; text-decoration: none; border-radius: 10px; padding: 8px 11px; }
.topbar nav { display: flex; gap: 22px; flex: 1; }
.topbar nav a { color: var(--ink); text-decoration: none; }
.quiet { border: 0; background: transparent; color: var(--muted); cursor: pointer; }
.page { width: min(1100px, 92vw); margin: 42px auto 80px; }
.auth-card { width: min(460px, 100%); margin: 10vh auto; padding: 40px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 18px 60px #183b2920; }
.auth-card .mark { display: inline-block; }
.auth-card h1 { margin-bottom: 4px; }
form label { display: block; margin: 18px 0; font-weight: 650; }
label span, .help, small, time { color: var(--muted); font-weight: 400; }
input, textarea { display: block; width: 100%; margin-top: 7px; padding: 12px 14px; border: 1px solid #aeb9b2; border-radius: 9px; background: #fff; color: var(--ink); }
input:focus, textarea:focus { outline: 3px solid #80cbb350; border-color: var(--green); }
button { min-height: 44px; border-radius: 9px; padding: 9px 17px; cursor: pointer; font-weight: 700; }
.primary, .approve { border: 1px solid var(--green); background: var(--green); color: white; }
.primary { width: 100%; margin: 8px 0 20px; }
.reject { border: 1px solid #d2a6a2; background: #fff; color: var(--red); }
.welcome { display: flex; justify-content: space-between; align-items: end; gap: 28px; margin-bottom: 30px; }
.welcome h1, .review h1, .report h1 { font-size: clamp(2rem, 5vw, 3.25rem); line-height: 1.05; margin: 4px 0 10px; }
.eyebrow { color: var(--green); font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; font-weight: 800; }
.pending-count { min-width: 180px; padding: 20px; background: #e5efe8; border-radius: 14px; text-align: center; }
.pending-count strong { display: block; font-size: 2rem; }
.pending-count span { color: var(--muted); }
.panel, .review, .report { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: clamp(20px, 4vw, 40px); margin: 20px 0; }
.section-title { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.section-title h2 { margin: 0; }
.list-item { display: flex; justify-content: space-between; align-items: center; gap: 20px; border-top: 1px solid var(--line); padding: 17px 2px; color: var(--ink); text-decoration: none; }
.list-item strong, .list-item small { display: block; }
.list-item:hover strong { color: var(--green); }
.pill, .status { display: inline-block; white-space: nowrap; border-radius: 999px; background: #edf1ed; color: var(--muted); padding: 5px 10px; font-size: .82rem; font-weight: 700; }
.status { margin: 15px 0; }
.status-submitted { background: #fff0c7; color: var(--amber); }
.status-applied { background: #dbf0e7; color: var(--green-dark); }
.status-rejected, .status-stale, .status-apply_failed { background: #fae4e1; color: var(--red); }
.lead { color: #43504a; font-size: 1.15rem; max-width: 760px; }
.facts { display: flex; flex-wrap: wrap; gap: 30px; margin: 24px 0; }
.facts div { min-width: 190px; }
.facts dt { color: var(--muted); font-size: .85rem; }
.facts dd { margin: 2px 0; font-weight: 700; }
.change-card { margin: 28px 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.change-heading { padding: 14px 17px; background: #f8faf7; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.change-heading small { margin-left: auto; }
.operation { color: var(--green-dark); font-size: .78rem; font-weight: 800; text-transform: uppercase; }
.table-wrap { max-width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .94rem; }
th { text-align: left; background: #f8faf7; }
th, td { padding: 12px 15px; border-bottom: 1px solid var(--line); vertical-align: top; }
.before { color: #73504d; background: #fff9f8; }
.after { color: #164d3a; background: #f5fcf8; font-weight: 650; }
.decision { margin-top: 30px; padding: 24px; background: #f8faf7; border-radius: 12px; }
.buttons { display: flex; justify-content: flex-end; gap: 12px; }
.notice { padding: 13px 16px; border-radius: 10px; background: #e3f1e9; border: 1px solid #b7d9c6; }
.notice.error { background: #fae7e5; border-color: #e3bbb6; }
.empty { color: var(--muted); padding: 25px 0; }
.back { display: inline-block; margin-bottom: 14px; text-decoration: none; }
details { border-top: 1px solid var(--line); margin-top: 30px; padding-top: 20px; color: var(--muted); }
summary { cursor: pointer; font-weight: 700; color: var(--ink); }
code, pre { white-space: pre-wrap; overflow-wrap: anywhere; font-size: .82rem; }
.highlights { padding: 20px 38px; background: #eaf3ed; border-radius: 12px; }
.pager { text-align: right; }
@media (max-width: 650px) {
  body { font-size: 16px; }
  .page { margin-top: 24px; }
  .topbar { padding: 10px 4vw; gap: 15px; }
  .topbar nav { gap: 12px; }
  .auth-card { padding: 25px; }
  .welcome { align-items: stretch; flex-direction: column; }
  .pending-count { text-align: left; }
  .list-item, .change-heading { align-items: flex-start; flex-direction: column; }
  .change-heading small { margin-left: 0; }
  .buttons { flex-direction: column-reverse; }
  .buttons button { width: 100%; }
}
