/* L&M Jobs. Plain CSS, system fonts: nothing is fetched from anywhere. */
:root {
  --bg: #f5f6f8; --surface: #fff; --ink: #1d232b; --ink-2: #4a5562; --muted: #6b7682;
  --line: #dde1e6; --accent: #0064a7; --accent-ink: #fff; --accent-soft: #e2eef7;
  --open: #8a5a00; --open-bg: #fff3d6; --won: #007953; --won-bg: #dbf1e8;
  --lost: #9b2c2c; --lost-bg: #fbe2e2; --declined: #4a5562; --declined-bg: #e9ecef;
  --flash: #e2eef7; --error: #9b2c2c; --error-bg: #fbe2e2; --bar: #0064a7;
  --radius: 6px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #14181d; --surface: #1c2229; --ink: #e6e9ed; --ink-2: #b8c0c9; --muted: #8d97a2;
    --line: #2e363f; --accent: #5ea9dd; --accent-ink: #0d1218; --accent-soft: #1f2e3b;
    --open: #f0c060; --open-bg: #3a2f14; --won: #7ed29c; --won-bg: #173222;
    --lost: #f19a9a; --lost-bg: #3d1d1d; --declined: #b8c0c9; --declined-bg: #2a3038;
    --flash: #1f2e3b; --error: #f19a9a; --error-bg: #3d1d1d; --bar: #5ea9dd;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink);
  font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; }
a { color: var(--accent); }
h1 { font-size: 1.5rem; margin: .2rem 0 .8rem; }
h2 { font-size: 1.1rem; margin: 0 0 .6rem; }
h3 { font-size: 1rem; margin: 1rem 0 .3rem; }
.muted { color: var(--muted); } .small { font-size: .85rem; }
.pre { white-space: pre-wrap; }
.sr { position: absolute; left: -9999px; }
header.top { display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap; padding: .5rem 1rem;
  background: var(--surface); border-bottom: 1px solid var(--line); }
.brand { font-weight: 700; text-decoration: none; color: var(--ink); }
header nav { display: flex; gap: .2rem; flex-wrap: wrap; flex: 1; }
header nav a { text-decoration: none; color: var(--ink-2); padding: .35rem .6rem; border-radius: var(--radius); }
header nav a[aria-current] { background: var(--accent-soft); color: var(--ink); font-weight: 600; }
.who { display: flex; gap: .6rem; align-items: center; color: var(--muted); font-size: .9rem; }
main { padding: 1rem; max-width: 1400px; margin: 0 auto; }
.head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; }
.crumb { margin: 0; color: var(--muted); font-size: .9rem; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1rem; margin-bottom: 1rem; }
.cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1rem; align-items: start; }
@media (max-width: 900px) { .cols { grid-template-columns: minmax(0, 1fr); } }
button, .button { font: inherit; padding: .4rem .8rem; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); color: var(--ink); cursor: pointer; text-decoration: none; display: inline-block; }
.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
button.link { border: 0; background: none; color: var(--accent); padding: 0; text-decoration: underline; }
input, select, textarea { font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: .35rem .5rem; max-width: 100%; }
textarea { width: 100%; }
.flash { background: var(--flash); padding: .5rem .8rem; border-radius: var(--radius); }
.error { background: var(--error-bg); color: var(--error); padding: .5rem .8rem; border-radius: var(--radius); }
.notice { background: var(--open-bg); color: var(--ink); padding: .5rem .8rem; border-radius: var(--radius); }
.tabs { display: flex; flex-wrap: wrap; gap: .3rem; margin-bottom: .6rem; }
.tabs a { padding: .3rem .7rem; border-radius: 99px; border: 1px solid var(--line); text-decoration: none;
  color: var(--ink-2); background: var(--surface); }
.tabs a[aria-current] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.tabs .saved { display: inline-flex; align-items: center; gap: .1rem; }
.tabs .x { text-decoration: none; color: var(--muted); }
.filters { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin-bottom: .4rem; }
.filters input[type=search] { min-width: 18rem; flex: 1; }
.count { display: flex; gap: 1rem; align-items: center; margin: .3rem 0 .5rem; }
.inline { display: inline; }
details.save summary { cursor: pointer; color: var(--accent); }
.table-wrap { overflow-x: auto; }
table.list { width: 100%; border-collapse: collapse; background: var(--surface); }
.list th, .list td { text-align: left; padding: .45rem .55rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.list th { font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); font-weight: 600; }
.list.compact td, .list.compact th { padding: .3rem .4rem; }
.num { text-align: right !important; font-variant-numeric: tabular-nums; }
.stage { display: inline-block; padding: .1rem .5rem; border-radius: 99px; font-size: .82rem; white-space: nowrap; }
.s-open { background: var(--open-bg); color: var(--open); }
.s-won { background: var(--won-bg); color: var(--won); }
.s-lost { background: var(--lost-bg); color: var(--lost); }
.s-declined, .s-other { background: var(--declined-bg); color: var(--declined); }
.tag { display: inline-block; padding: .05rem .45rem; border-radius: 99px; border: 1px solid var(--line);
  font-size: .78rem; color: var(--ink-2); margin-left: .2rem; }
dl.fields { display: grid; grid-template-columns: 11rem minmax(0, 1fr); gap: .3rem .8rem; margin: 0; }
dl.fields dt { color: var(--muted); } dl.fields dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 600px) { dl.fields { grid-template-columns: minmax(0, 1fr); } dl.fields dd { margin-bottom: .4rem; } }
.stage-buttons { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .6rem; }
.pick { padding: .3rem .6rem; border-radius: 99px; cursor: pointer; }
.pick:has(input:checked) { outline: 2px solid var(--accent); }
.stage-form { display: block; } .stage-form input[name=note] { width: 100%; margin-bottom: .5rem; }
.timeline, .history, .plain { list-style: none; padding: 0; margin: 0; }
.timeline li { border-top: 1px solid var(--line); padding: .6rem 0; }
.timeline .meta { font-size: .88rem; color: var(--ink-2); }
.timeline .body { white-space: pre-wrap; margin-top: .2rem; overflow-wrap: anywhere; }
.file-row { margin-top: .2rem; padding-left: .8rem; border-left: 3px solid var(--line); }
.missing { color: var(--muted); text-decoration: line-through; }
.history li { padding: .2rem 0; } .plain li { padding: .2rem 0; }
.comment-form .row { display: flex; justify-content: space-between; align-items: center; gap: .5rem; margin: .4rem 0 .6rem; flex-wrap: wrap; }
.form fieldset { border: 0; border-top: 1px solid var(--line); padding: .8rem 0; margin: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); gap: .6rem 1rem; }
.form legend { font-weight: 600; padding-right: .5rem; }
.form label { display: flex; flex-direction: column; gap: .2rem; font-size: .9rem; color: var(--ink-2); }
.form label.wide { grid-column: 1 / -1; }
.form .checks { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: .2rem; }
.form .checks label { flex-direction: row; align-items: center; gap: .4rem; color: var(--ink); }
.form .row { padding-top: .6rem; }
.lookup { position: relative; }
.lookup-list { position: absolute; z-index: 5; left: 0; right: 0; list-style: none; margin: 0; padding: 0;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); max-height: 18rem; overflow: auto; }
.lookup-list li { padding: .35rem .5rem; cursor: pointer; } .lookup-list li[aria-selected=true], .lookup-list li:hover { background: var(--accent-soft); }
.lookup-list small { color: var(--muted); margin-left: .4rem; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem 1rem;
  text-decoration: none; color: var(--ink); display: flex; flex-direction: column; }
.tile .label { color: var(--muted); font-size: .9rem; } .tile .value { font-size: 2rem; font-weight: 650; font-variant-numeric: tabular-nums; }
.tile .sub { color: var(--ink-2); font-size: .85rem; }
.bars td:nth-child(2) { min-width: 9rem; white-space: nowrap; }
.bar { display: inline-block; height: .7rem; width: calc(var(--w) * .7); min-width: 2px; max-width: 70%;
  background: var(--bar); border-radius: 0 4px 4px 0; vertical-align: middle; }
.pager { display: flex; gap: 1rem; justify-content: center; margin: 1rem 0; }
.login { max-width: 26rem; margin: 3rem auto; }
.login .dev { border-top: 1px solid var(--line); margin-top: 1rem; padding-top: 1rem; display: grid; gap: .6rem; }
.login label { display: grid; gap: .2rem; }
.downloads li { display: flex; gap: 1rem; align-items: center; padding: .3rem 0; }
code { font-size: .8rem; overflow-wrap: anywhere; }
@media (max-width: 600px) { .filters input[type=search] { min-width: 0; width: 100%; } main { padding: 1rem 16px; } }
/* Brand: L&M Surveys blue #0064a7 is the accent; their green marks a won job. */
.brand { display: inline-flex; align-items: center; gap: .5rem; }
.brand img { display: block; }
.login { text-align: center; } .login .dev { text-align: left; }
.login .logo { display: block; margin: 0 auto .5rem; }

/* Mailings */
.badge { display: inline-block; padding: .05rem .45rem; border-radius: 99px; font-size: .78rem; white-space: nowrap;
  background: var(--declined-bg); color: var(--declined); }
.badge.bad { background: var(--lost-bg); color: var(--lost); }
.badge.warn { background: var(--open-bg); color: var(--open); }
.toolbar { display: flex; gap: .3rem; margin: .2rem 0; }
.toolbar button { padding: .15rem .5rem; }
.mail-preview { border: 1px solid var(--line); border-radius: var(--radius); padding: .8rem 1rem; background: #fff;
  color: #222; font-family: Arial, Helvetica, sans-serif; overflow-wrap: anywhere; }
.mail-preview a { color: #0b57d0; }
.inline-check { flex-direction: row !important; align-items: center; gap: .4rem; }
