/* JTA Controls Project Workspace - internal-tool aesthetic */

:root {
  --bg: #f4f6f8;
  --card: #ffffff;
  --ink: #16202b;
  --ink-soft: #4a5b6e;
  --muted: #7a8a9c;
  --line: #e2e7ec;
  --line-strong: #c8d2dc;
  --accent: #1f3a5f;       /* JTA-ish industrial navy */
  --accent-2: #2f5d8a;
  --accent-soft: #e8eef6;
  --warn: #b34a00;
  --good: #1f7a3f;
  --bad: #b21f2d;
  --shadow: 0 1px 2px rgba(20,30,45,.06), 0 3px 12px rgba(20,30,45,.04);
  --radius: 6px;
  --mono: ui-monospace, "Cascadia Mono", "JetBrains Mono", Consolas, "SF Mono", monospace;
  --sans: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ---------- Top bar ---------- */
.topbar {
  background: var(--accent);
  color: #fff;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 3px solid #16263f;
}
.brand-link {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  text-decoration: none;
}
.logo {
  height: 38px;
  width: auto;
  background: #fff;
  padding: 4px 8px;
  border-radius: 4px;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-line1 { font-weight: 600; font-size: 15px; letter-spacing: .2px; }
.brand-line2 { font-size: 11px; opacity: .75; text-transform: uppercase; letter-spacing: 1px; }

.topnav { display: flex; align-items: center; gap: 18px; }
.navlink {
  color: #dbe3ee;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
}
.navlink:hover { color: #fff; border-bottom-color: rgba(255,255,255,.5); }
.navlink.subtle { color: #a8b6c8; }
.userchip {
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.15);
  color: #fff;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
}

/* ---------- Layout ---------- */
.container { flex: 1; max-width: 1240px; width: 100%; margin: 0 auto; padding: 24px; }
.footer {
  border-top: 1px solid var(--line);
  background: #eef2f5;
  color: var(--muted);
  font-size: 12px;
  padding: 10px 24px;
  display: flex;
  justify-content: space-between;
}

/* ---------- Headings ---------- */
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 16px;
}
.page-head.spaced { margin-top: 32px; }
.page-title { margin: 0; font-size: 23px; font-weight: 700; color: var(--ink); letter-spacing: -.2px; }
.page-sub { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.section-title { margin: 0; font-size: 15px; font-weight: 700; color: var(--ink);
  text-transform: uppercase; letter-spacing: .4px; }
.crumbs { color: var(--muted); font-size: 12px; margin-bottom: 4px; text-transform: uppercase; letter-spacing: .6px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent); }

/* ---------- Cards ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 20px;
  margin-bottom: 18px;
}
.card.narrow { max-width: 640px; }
.card.center { text-align: center; }
.card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 960px) { .two-col { grid-template-columns: 1fr; } }

/* ---------- Tables ---------- */
.table { width: 100%; border-collapse: collapse; }
.table th, .table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.table th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: var(--muted);
  font-weight: 600;
  background: #fafbfc;
}
.table tbody tr:hover { background: #fafcfe; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table.compact th, .table.compact td { padding: 7px 10px; }
.empty { text-align: center; color: var(--muted); padding: 24px; font-style: italic; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 8px 14px;
  border: 1px solid var(--line-strong);
  background: #fff;
  color: var(--ink);
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  font-family: inherit;
}
.btn:hover { background: #f4f7fa; border-color: var(--accent-2); }
.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.btn-primary:hover { background: var(--accent-2); border-color: var(--accent-2); }
.btn-small { padding: 5px 10px; font-size: 12px; }
.btn-block { width: 100%; }

/* ---------- Links ---------- */
.link { color: var(--accent-2); text-decoration: none; }
.link:hover { text-decoration: underline; }
.link.strong { font-weight: 600; color: var(--accent); }
.link.small { font-size: 12px; }

/* ---------- Forms ---------- */
.form { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 4px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.label { font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .4px; }
.field input, .field textarea, .field select {
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  padding: 8px 10px;
  font-size: 14px;
  font-family: inherit;
  background: #fff;
  color: var(--ink);
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-color: var(--accent-2);
  box-shadow: 0 0 0 3px rgba(47,93,138,.15);
}
.field .req { color: var(--bad); }
.actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 6px; }

.upload-form {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
  background: #fafbfc;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  margin-top: 12px;
}
.upload-form input[type=text] { flex: 0 1 200px; }
.upload-form input[type=file] { flex: 1; }
.upload-form input[type=text],
.upload-form input[type=file] {
  border: 1px solid var(--line);
  padding: 5px 8px;
  border-radius: 4px;
  font-size: 12px;
  background: #fff;
}
.run-form {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  padding: 10px 12px;
  background: #fafbfc;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
}
.run-form input[type=text] { flex: 1; }
.run-form select, .run-form input[type=text] {
  border: 1px solid var(--line);
  padding: 5px 8px;
  border-radius: 4px;
  font-size: 12px;
  background: #fff;
}

/* ---------- Pills ---------- */
.pill {
  display: inline-block;
  padding: 2px 8px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .5px;
  border-radius: 999px;
  font-weight: 600;
  background: #eef2f5;
  color: var(--ink-soft);
}
.pill-open, .pill-in_progress, .pill-active { background: #e1ecf7; color: #1d4f86; }
.pill-passed { background: #e0f1e3; color: #1f6a3a; }
.pill-failed, .pill-retired { background: #fbe3e6; color: #9a1a26; }
.pill-rework, .pill-proposed { background: #fdeed4; color: #8a4f00; }
/* purchasing line statuses */
.pill-pending_mgr  { background: #fdeed4; color: #8a4f00; }
.pill-pending_buyer{ background: #e1ecf7; color: #1d4f86; }
.pill-ordered      { background: #ece1f7; color: #5b2a86; }
.pill-pending_officer { background: #f7e1ec; color: #862a5b; }
.pill-received     { background: #e0f1e3; color: #1f6a3a; }
.pill-declined, .pill-cancelled, .pill-inactive { background: #fbe3e6; color: #9a1a26; }
.pill-draft { background: #eef2f5; color: #5b6b7d; }
/* purchase-order statuses */
.pill-open    { background: #fdeed4; color: #8a4f00; }
.pill-sent    { background: #e1ecf7; color: #1d4f86; }
.pill-partial { background: #ece1f7; color: #5b2a86; }
.pill-closed  { background: #eef2f5; color: #475569; }
.po-head { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; font-size: 13px; }
.badge { background: #b91c1c; color: #fff; border-radius: 999px; padding: 0 6px; font-size: 11px; font-weight: 700; }
.unreadrow { background: #fffbeb; }
.progress { background: #e8edf2; border-radius: 999px; height: 8px; overflow: hidden; margin-bottom: 3px; }
.progress-fill { background: #1f6a3a; height: 100%; }

/* purchasing form helpers */
.chk { display: inline-flex; align-items: center; gap: 6px; margin: 2px 12px 2px 0; }
.checks { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
.formgrid .field { margin-bottom: 10px; }

/* dashboard stat cards */
.cardrow { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.statcard {
  flex: 1 1 160px; background: #fff; border: 1px solid var(--line, #e2e8f0);
  border-radius: 10px; padding: 16px 18px; text-decoration: none; transition: box-shadow .12s;
}
.statcard:hover { box-shadow: 0 2px 10px rgba(0,0,0,.08); }
.statnum { font-size: 30px; font-weight: 700; color: #1d4f86; line-height: 1; }
.statlabel { margin-top: 6px; font-size: 13px; color: var(--ink-soft, #475569); }

/* role selector cards (profile) */
.rolecard {
  width: 100%; text-align: left; cursor: pointer; background: #fff;
  border: 1px solid var(--line, #e2e8f0); border-radius: 10px; padding: 14px 16px;
  font: inherit; transition: box-shadow .12s, border-color .12s;
}
.rolecard:hover { box-shadow: 0 2px 10px rgba(0,0,0,.08); }
.rolecard-active { border-color: #1d4f86; box-shadow: 0 0 0 2px rgba(29,79,134,.18); }
.rolecard-name { font-weight: 700; color: #1d4f86; }
.rolecard-ou { margin-top: 4px; font-size: 12px; color: var(--ink-soft, #475569); }

/* ---------- App shell (left-rail navigation) ---------- */
body.has-shell { display: flex; flex-direction: column; min-height: 100vh; }
.wordmark { font-weight: 700; font-size: 18px; letter-spacing: .3px; color: #fff; }
.globalsearch { flex: 1 1 auto; max-width: 560px; margin: 0; }
.globalsearch input {
  width: 100%; padding: 7px 12px; border-radius: 6px; font-size: 13px;
  border: 1px solid rgba(255,255,255,.28); background: rgba(255,255,255,.14); color: #fff;
}
.globalsearch input::placeholder { color: rgba(255,255,255,.72); }
.globalsearch input:focus { outline: none; background: rgba(255,255,255,.22); border-color: rgba(255,255,255,.55); }
.topright { display: flex; align-items: center; gap: 16px; }
.iconlink { position: relative; color: #fff; text-decoration: none; font-size: 18px; line-height: 1; }
.iconlink .badge { position: absolute; top: -8px; right: -10px; }
.userchip { color: #fff; text-decoration: none; font-weight: 600; font-size: 13px;
  background: rgba(255,255,255,.14); padding: 5px 11px; border-radius: 999px; }
.userchip:hover { background: rgba(255,255,255,.24); }
.appbody { display: flex; flex: 1; min-height: 0; align-items: stretch; }
.rail { flex: 0 0 218px; width: 218px; background: var(--card); border-right: 1px solid var(--line);
  padding: 14px 10px; overflow-y: auto; }
.navgroup { margin-bottom: 16px; }
.navgroup-h { font-size: 11px; text-transform: uppercase; letter-spacing: .8px;
  color: var(--accent); font-weight: 800; padding: 4px 10px 6px; margin-bottom: 4px;
  border-bottom: 1px solid var(--line); }
.navitem { display: block; padding: 7px 10px; margin: 1px 0; border-radius: 6px;
  color: var(--ink-soft); text-decoration: none; font-size: 13.5px; }
.navitem:hover { background: var(--accent-soft); color: var(--accent); }
.navitem.active { background: var(--accent); color: #fff; font-weight: 600; }
.maincol { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.maincol .container { max-width: none; width: 100%; flex: 1; padding: 22px 28px; }
.maincol .footer { border-top: 1px solid var(--line); margin-top: 0; }
/* hamburger + drawer backdrop are desktop-hidden by default */
.hamburger { display: none; }
.nav-backdrop { display: none; }

@media (max-width: 820px) {
  /* top bar reflows: row 1 = menu + brand + bell + profile; search drops full-width below */
  .hamburger { display: inline-flex; align-items: center; justify-content: center;
    font-size: 22px; line-height: 1; color: #fff; cursor: pointer; padding: 4px 8px;
    margin-right: 2px; text-decoration: none; border-radius: 6px; }
  .hamburger:active { background: rgba(255,255,255,.18); }
  .topbar { flex-wrap: wrap; padding: 8px 12px; gap: 8px 12px; }
  .wordmark { font-size: 16px; }
  .globalsearch { display: block; order: 10; flex-basis: 100%; max-width: none; }
  .topright { gap: 14px; margin-left: auto; }

  /* left rail becomes a slide-in drawer toggled by the hamburger checkbox */
  .appbody { display: block; }
  .rail { position: fixed; top: 0; left: 0; bottom: 0; width: 250px; z-index: 60;
    transform: translateX(-100%); transition: transform .2s ease; overflow-y: auto;
    box-shadow: 2px 0 18px rgba(0,0,0,.22); padding: 16px 12px; }
  .navtoggle-cb:checked ~ .appbody .rail { transform: translateX(0); }
  .navtoggle-cb:checked ~ .appbody .nav-backdrop {
    display: block; position: fixed; inset: 0; z-index: 55; background: rgba(10,18,28,.45); }
  .navitem { padding: 11px 12px; font-size: 15px; }      /* finger-sized targets */
  .navgroup { margin-bottom: 14px; }

  /* content: tighter gutters, wide tables scroll instead of breaking layout */
  .maincol .container { padding: 14px 14px; }
  .maincol .container .card { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .page-head { flex-direction: column; align-items: flex-start; gap: 10px; }
  .page-actions { flex-wrap: wrap; gap: 8px; }
  .formgrid { display: block; }
  .cardrow { flex-direction: column; }
  .login-shell { padding: 32px 16px; }
}

/* Admin destructive action + closed-project banner (from Angelo's latest build) */
.btn-danger { color: #9a1a26; border-color: #f2bcc3; }
.btn-danger:hover { background: #fbe3e6; border-color: #e08490; }
.flash-closed { background: #efeaf6; border: 1px solid #d7cdec; color: #5a4b86;
  padding: 10px 14px; border-radius: 8px; }

/* employee-record form: two-column grid with section subheads */
.profilegrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 18px; }
.subhead { font-size: 11px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted);
  font-weight: 700; margin: 16px 0 4px; border-bottom: 1px solid var(--line); padding-bottom: 3px; }
@media (max-width: 640px) { .profilegrid { grid-template-columns: 1fr; } }

/* "View as" lens banner */
.viewas-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: #fef3c7; color: #8a5a00; border-bottom: 1px solid #f0d089; padding: 8px 18px; font-size: 13px; }
.viewas-bar .btn { background: #fff; }

/* ---------- Login ---------- */
.login-shell { display: flex; justify-content: center; padding: 60px 20px; }
.login-card {
  background: #fff;
  padding: 36px 32px;
  border-radius: 8px;
  box-shadow: var(--shadow);
  width: 100%;
  max-width: 380px;
  border: 1px solid var(--line);
  text-align: center;
}
.login-logo { height: 48px; margin-bottom: 12px; }
.login-title { margin: 6px 0 2px; font-size: 18px; }
.login-sub { margin: 0 0 22px; color: var(--muted); font-size: 13px; }
.login-foot { margin-top: 18px; font-size: 11px; color: var(--muted); }
.login-card .form { text-align: left; }

/* login: grey screen, centered white panel (~70%), logo + form side by side */
.authmain { flex: 1; display: flex; align-items: center; justify-content: center;
  background: var(--bg); padding: 32px 20px; }
.login-panel { width: 70%; max-width: 960px; background: #fff; border: 1px solid var(--line);
  border-radius: 14px; box-shadow: 0 6px 28px rgba(20,30,45,.12);
  display: flex; align-items: center; justify-content: center; gap: 40px; padding: 44px 52px; }
.login-brand-img { width: 300px; max-width: 42%; object-fit: contain; opacity: 1; }
.login-panel .login-card { box-shadow: none; border: none; padding: 0; max-width: 340px; }
@media (max-width: 820px) {
  .login-panel { width: 92%; flex-direction: column; gap: 22px; padding: 32px 26px; }
  .login-brand-img { width: 180px; max-width: 60%; }
}

/* ---------- Misc ---------- */
.muted { color: var(--muted); }
.small { font-size: 12px; }
.mono { font-family: var(--mono); font-size: 12.5px; }
.desc { margin: 10px 0 0; color: var(--ink-soft); max-width: 760px; }
.meta-line { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 8px; font-size: 13px; }
.meta-item { color: var(--ink-soft); }
.meta-label { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .5px; margin-right: 4px; }
.flashes { margin-bottom: 14px; }
.flash { padding: 10px 14px; border-radius: 4px; margin-bottom: 6px; font-size: 13px; border: 1px solid; }
.flash-ok { background: #e6f3e9; border-color: #b8dcc1; color: #1f6a3a; }
.flash-error { background: #fbe3e6; border-color: #f2bcc3; color: #9a1a26; }

/* ---------- Pipeline progress ---------- */
.stage-label { font-size: 16px; font-weight: 600; color: var(--accent); margin-bottom: 10px; }
.progress {
  background: #eef2f5;
  border: 1px solid var(--line);
  border-radius: 999px;
  height: 22px;
  position: relative;
  overflow: hidden;
  margin-bottom: 14px;
}
.progress-bar {
  background: linear-gradient(90deg, var(--accent-2), var(--accent));
  height: 100%;
  width: 0;
  transition: width .5s ease;
}
.progress-bar.failed { background: linear-gradient(90deg, #c44, var(--bad)); }
.progress-pct {
  position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: #fff; text-shadow: 0 1px 1px rgba(0,0,0,.3);
  pointer-events: none;   /* overlay text must never swallow clicks */
}
.stage-pills { display: flex; gap: 10px; margin: 12px 0 18px; flex-wrap: wrap; }
.stage-pill {
  padding: 6px 12px;
  border-radius: 999px;
  background: #eef2f5;
  border: 1px solid var(--line);
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .4px;
}
.stage-pill.active { background: var(--accent); color: #fff; border-color: var(--accent); animation: pulse 1.5s ease-in-out infinite; }
.stage-pill.done { background: var(--good); color: #fff; border-color: var(--good); }
@keyframes pulse { 0%,100% { opacity: 1 } 50% { opacity: .6 } }
.log-card { border: 1px solid var(--line); border-radius: 4px; background: #0f1419; margin-top: 16px; }
.log-head { padding: 8px 12px; background: #1c2530; color: #c8d2dc; font-size: 12px; border-bottom: 1px solid #283242; }
.log-pre { margin: 0; padding: 12px; color: #d4dce6; font-family: var(--mono); font-size: 12px; max-height: 280px; overflow: auto; white-space: pre-wrap; }

/* ---------- Banner (e.g. pipeline endpoint callout) ---------- */
.banner {
  background: #fff8e6;
  border: 1px solid #f1d98a;
  border-left: 3px solid #d4a017;
  padding: 10px 14px;
  border-radius: 4px;
  margin-bottom: 16px;
  font-size: 13px;
  color: #5a4400;
}
.banner code {
  background: #fff;
  border: 1px solid #e0c878;
  padding: 1px 6px;
  border-radius: 3px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink);
}

/* ---------- Stat row (counts under page title) ---------- */
.stat-row { display: flex; gap: 22px; margin-top: 14px; }
.stat {
  display: flex;
  flex-direction: column;
  padding: 8px 16px;
  background: var(--accent-soft);
  border-left: 3px solid var(--accent-2);
  border-radius: 4px;
  min-width: 90px;
}
.stat-num { font-size: 22px; font-weight: 700; color: var(--accent); line-height: 1.1; }
.stat-lbl { font-size: 11px; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .6px; margin-top: 2px; }

/* ---------- Rules table ---------- */
.rules-table { table-layout: fixed; }
.rules-table .col-cat { width: 130px; vertical-align: top; }
.rules-table .col-title { width: 220px; vertical-align: top; }
.rules-table .col-body { vertical-align: top; }
.rules-table .col-status { width: 90px; vertical-align: top; }
.rules-table .col-updated { width: 130px; vertical-align: top; }
.rules-table .col-actions { width: 60px; vertical-align: top; text-align: right; }
.rules-table tr { border-bottom: 1px solid var(--line); }
.cat-tag {
  display: inline-block;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  padding: 3px 8px;
  border-radius: 3px;
  border-left: 3px solid var(--accent-2);
}
.body-cell { white-space: normal; word-wrap: break-word; color: var(--ink-soft); font-size: 13px; }
.rationale-line { margin-top: 4px; font-style: italic; }

/* ---------- Rules listing (legacy card view, unused) ---------- */
.rules { display: flex; flex-direction: column; gap: 16px; }
.rule {
  padding: 14px 16px;
  background: #fafbfc;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent-2);
  border-radius: 4px;
}
.rule-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; gap: 12px; }
.rule-title { font-weight: 600; display: flex; align-items: center; gap: 8px; }
.rule-body { color: var(--ink-soft); margin: 4px 0 6px; }
.rule-rationale { color: var(--muted); font-size: 12.5px; font-style: italic; border-top: 1px dotted var(--line); padding-top: 6px; margin-top: 6px; }
.rule-actions { margin-top: 8px; text-align: right; }

/* ---------- Rule revision history (rules list) ---------- */
.rule-history { margin-top: 6px; }
.rule-history > summary {
  font-size: 11.5px; color: var(--accent-2); cursor: pointer;
  user-select: none; list-style-position: inside;
}
.rule-history > summary:hover { text-decoration: underline; }
.rule-history .history-row { padding: 8px 0; }
.rule-history .diff-text { font-size: 11.5px; max-height: 180px; overflow-y: auto; }

/* ---------- History diff ---------- */
.history-row { padding: 12px 0; border-bottom: 1px solid var(--line); }
.history-row:last-child { border-bottom: 0; }
.history-meta { margin-bottom: 6px; }
.diff { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.diff-col { background: #fafbfc; border: 1px solid var(--line); border-radius: 4px; padding: 8px 10px; }
.diff-label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 4px; }
.diff-text { font-size: 12.5px; white-space: pre-wrap; }
.diff-text.old { background: #fbf0f1; padding: 4px 6px; border-radius: 3px; }
.diff-text.new { background: #ecf5ef; padding: 4px 6px; border-radius: 3px; }
