:root {
  --ink: #1c1917;
  --char: #1a1a1a;
  --red: #c8102e;
  --orange: #f26522;
  --gold: #f5c518;
  --paper: #f4f0e8;
  --card: #ffffff;
  --line: #e5ddd2;
  --in: #0f7a45;
  --out: #b42318;
  --muted: #6f675f;
  --shadow: 0 12px 32px rgba(40, 24, 8, 0.06);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Segoe UI", "Avenir Next", "Trebuchet MS", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(1100px 420px at 0% -10%, rgba(245, 197, 24, 0.18), transparent 55%),
    radial-gradient(900px 380px at 100% 0%, rgba(200, 16, 46, 0.08), transparent 50%),
    var(--paper);
  min-height: 100vh;
}
a { color: #9a3412; }
header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 252, 247, 0.94);
  backdrop-filter: blur(12px);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  padding: 0.7rem 1.3rem 0.85rem;
}
header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--red) 0%, var(--orange) 46%, var(--gold) 100%);
}
header a { color: var(--char); text-decoration: none; }
.brand { display: flex; align-items: center; }
.brand img { height: 40px; width: auto; display: block; }
nav { display: flex; gap: 0.35rem; align-items: center; flex-wrap: wrap; }
nav a {
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.92rem;
}
nav a:hover { background: #fff4e5; }
nav a.on { background: var(--char); color: white; }
nav form { margin: 0; }
button, .button {
  background: var(--char);
  color: white;
  border: 0;
  border-radius: 999px;
  padding: 0.5rem 0.95rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  font: inherit;
  font-weight: 650;
  font-weight: 600;
}
button:hover, .button:hover { background: #333; }
button.secondary, .button.secondary {
  background: white;
  color: var(--char);
  border: 1px solid #d9d0c4;
}
button.secondary:hover, .button.secondary:hover { background: #fff8ee; }
header button {
  background: transparent;
  color: var(--char);
  border: 1px solid #d9d0c4;
}
header button:hover { background: white; }
main { max-width: 1180px; margin: 0 auto; padding: 1.3rem 1.2rem 2.5rem; }
.panel, form.panel, .card, .table-wrap {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
}
.panel, form.panel, .card { padding: 1rem 1.05rem; margin-bottom: 1rem; }
.table-wrap { overflow: auto; margin-bottom: 1rem; }
.filters {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 0.9fr 0.8fr auto;
  gap: 0.7rem;
  align-items: end;
}
label { display: flex; flex-direction: column; gap: 0.3rem; font-size: 0.82rem; color: var(--muted); font-weight: 600; }
input, select, textarea {
  font: inherit;
  font-weight: 500;
  color: var(--ink);
  border: 1px solid #ddd4c8;
  border-radius: 10px;
  padding: 0.5rem 0.6rem;
  background: white;
  width: 100%;
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid rgba(245, 197, 24, 0.85);
  border-color: #e0a31a;
}
.card label, form.card label { margin-bottom: 0.6rem; }
table { width: 100%; border-collapse: collapse; background: transparent; }
th, td {
  text-align: left;
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  font-size: 0.92rem;
}
th {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  background: #fbf8f3;
}
tbody tr:hover { background: #fffaf3; }
td a { font-weight: 650; font-weight: 600; text-decoration: none; }
td a:hover { text-decoration: underline; }
.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.badge {
  display: inline-block;
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
  font-size: 0.75rem;
  font-weight: 700;
  background: #eee;
}
.badge.in { background: #e5f6ec; color: var(--in); }
.badge.out { background: #fdecea; color: var(--out); }
.badge.untracked, .badge.missing { background: #f3efe8; color: var(--muted); }
.notice, .warn {
  padding: 0.7rem 0.85rem;
  border-radius: 12px;
  margin: 0 0 1rem;
}
.notice { background: #e8f6ee; border: 1px solid #b7e0c6; }
.warn { background: #fff6e8; border: 1px solid #f0d2a4; }
.muted { color: var(--muted); font-weight: 500; }
.row-actions { display: flex; gap: 0.45rem; align-items: center; flex-wrap: wrap; }
.pager { display: flex; gap: 1rem; align-items: center; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; }
h1 { font-size: 1.7rem; letter-spacing: -0.03em; margin: 0 0 0.35rem; }
h2 { font-size: 1.05rem; margin: 0 0 0.6rem; }
.kicker {
  margin: 0 0 0.15rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.7rem; margin: 0.8rem 0 1rem; }
.stat {
  background: white;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.75rem 0.9rem;
  box-shadow: var(--shadow);
}
.stat b { display: block; font-size: 1.35rem; letter-spacing: -0.03em; }
.stat span { color: var(--muted); font-size: 0.78rem; }
.stat.in b { color: var(--in); }
.stat.out b { color: var(--out); }
.chips { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.2rem 0 1rem; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem 0.6rem;
  border-radius: 999px;
  background: white;
  border: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 650;
  font-weight: 600;
}
.chip:hover { border-color: #e0a31a; }
.chip.on { background: var(--char); color: white; border-color: var(--char); }
.who { display: inline-flex; align-items: center; gap: 0.45rem; font-weight: 650; font-weight: 600; }
.who-lg .mark { width: 36px; height: 36px; }
.mark { width: 22px; height: 22px; flex: none; display: block; }
.cat {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  background: #fff1e6;
  color: #c2410c;
  flex: none;
}
.cat svg { width: 15px; height: 15px; }
.chip.on .cat { background: rgba(255, 255, 255, 0.16); color: white; }
.meta { display: flex; align-items: center; gap: 0.35rem; color: var(--muted); font-size: 0.78rem; margin-top: 0.25rem; }
.crumbs { display: flex; flex-wrap: wrap; gap: 0.35rem 0.8rem; }
.price { font-size: 1.35rem; font-weight: 700; letter-spacing: -0.03em; margin: 0.2rem 0; }
.signin { max-width: 440px; margin: 7vh auto; padding: 1.4rem 1.3rem 1.2rem; }
.signin-logo { height: 52px; width: auto; display: block; margin-bottom: 0.8rem; }
.email-quote { display: flex; gap: 0.5rem; align-items: end; flex-wrap: wrap; margin: 0.35rem 0 0.8rem; }
.email-quote label { min-width: 220px; flex: 1; }
.doc-row { padding: 0.35rem 0 0.7rem; border-bottom: 1px solid var(--line); }
ul.people { list-style: none; padding: 0; margin: 0 0 1rem; }
ul.people li { padding: 0.35rem 0; border-bottom: 1px solid var(--line); }
@media (max-width: 980px) {
  .filters, .stats, .grid-2 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .filters, .stats, .grid-2 { grid-template-columns: 1fr; }
  header { align-items: flex-start; flex-direction: column; }
  .brand img { height: 34px; }
}
