/* bol.css — the Bill of Lading document, styled. Single source of truth shared
   by the browser app (preview + print) and the Node renderer (render.cjs).
   Everything is scoped under `.page` so it can't collide with the app shell UI
   in index.html. A .page is one printable BOL: 7.5in wide so it fits inside a
   Letter sheet with 0.5in margins (7.5in printable), min 10in tall. */
:root {
  --bol-red: #e41e26;
  --bol-ink: #231f20;
  --bol-line: #c9c9c9;
  --bol-soft: #f4f4f4;
}

.page {
  box-sizing: border-box;
  width: 7.5in;
  min-height: 10in;
  margin: 0 auto;
  background: #fff;
  color: var(--bol-ink);
  font-family: "Helvetica Neue", Arial, Helvetica, sans-serif;
  font-size: 10.5px;
  line-height: 1.35;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}
.page * { box-sizing: border-box; }

/* Header */
.page .head { display: flex; align-items: stretch; border: 2px solid var(--bol-ink); }
.page .brandmark {
  width: 78px; background: var(--bol-red);
  display: flex; align-items: center; justify-content: center; padding: 8px;
}
.page .brandmark svg { width: 100%; height: auto; display: block; }
.page .brandtext {
  flex: 1; padding: 8px 12px;
  display: flex; flex-direction: column; justify-content: center;
  border-left: 2px solid var(--bol-ink);
}
.page .brandtext .name { font-size: 17px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; }
.page .brandtext .name span { color: var(--bol-red); }
.page .brandtext .addr { margin-top: 2px; color: #444; font-size: 9.5px; line-height: 1.3; }
.page .doctitle {
  width: 210px; background: var(--bol-ink); color: #fff;
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  text-align: center; padding: 6px;
}
.page .doctitle .t1 { font-size: 16px; font-weight: 800; letter-spacing: 1px; line-height: 1; }
.page .doctitle .t2 { font-size: 8.5px; letter-spacing: 2px; margin-top: 3px; text-transform: uppercase; color: #ffb3b6; }

/* Meta bar */
.page .metabar { display: flex; border: 2px solid var(--bol-ink); border-top: none; }
.page .metabar .cell { flex: 1; padding: 6px 10px; border-left: 1px solid var(--bol-line); }
.page .metabar .cell:first-child { border-left: none; }
.page .metabar .cell.truck { background: var(--bol-red); color: #fff; flex: 0 0 130px; }
.page .lbl { font-size: 8px; text-transform: uppercase; letter-spacing: 1px; color: #777; }
.page .metabar .cell.truck .lbl { color: #ffd2d4; }
.page .val { font-size: 12.5px; font-weight: 700; margin-top: 1px; }
.page .metabar .cell.truck .val { font-size: 15px; }

/* Address blocks */
.page .addrgrid { display: flex; border: 2px solid var(--bol-ink); border-top: none; }
.page .addrgrid .box { flex: 1; padding: 9px 12px; border-left: 1px solid var(--bol-line); }
.page .addrgrid .box:first-child { border-left: none; }
.page .boxhdr {
  display: inline-block; background: var(--bol-ink); color: #fff;
  font-size: 8.5px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase;
  padding: 2px 8px; margin-bottom: 6px;
}
.page .boxhdr.red { background: var(--bol-red); }
.page .party { font-weight: 700; font-size: 11.5px; }
.page .lines { margin-top: 2px; color: #333; line-height: 1.45; }
.page .lines .muted { color: #666; }

/* Final destination banner */
.page .dest { border: 2px solid var(--bol-red); border-top: none; padding: 9px 12px; background: #fff5f5; }
.page .dest .boxhdr.red { margin-bottom: 5px; }
.page .destrow { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.page .destrow .party { font-size: 12.5px; }
.page .docks {
  margin-left: auto; background: var(--bol-ink); color: #fff;
  font-weight: 800; letter-spacing: .5px; padding: 4px 12px; font-size: 12px; white-space: nowrap;
}

/* Freight table */
.page table { width: 100%; border-collapse: collapse; border: 2px solid var(--bol-ink); border-top: none; }
.page thead th {
  background: var(--bol-ink); color: #fff; font-size: 8.5px; letter-spacing: .6px;
  text-transform: uppercase; padding: 6px 8px; text-align: left; font-weight: 700;
}
.page tbody td { padding: 9px 8px; border-top: 1px solid var(--bol-line); vertical-align: top; font-size: 11px; }
.page tbody tr:first-child td { border-top: none; }
.page .col-hu { width: 70px; text-align: center; font-weight: 800; font-size: 14px; }
.page .col-type { width: 80px; }
.page .col-wt { width: 95px; text-align: right; font-weight: 700; }
.page .col-cls { width: 60px; text-align: center; color: #888; }
.page .desc-main { font-weight: 700; }
.page .desc-sub { color: #666; font-size: 9.5px; margin-top: 1px; }
.page tfoot td {
  padding: 7px 8px; border-top: 2px solid var(--bol-ink);
  font-weight: 800; background: var(--bol-soft); font-size: 11.5px;
}
.page tfoot .col-wt { font-size: 13px; color: var(--bol-red); }

/* Special instructions */
.page .special { border: 2px solid var(--bol-ink); border-top: none; padding: 8px 12px; }
.page .special .boxhdr { margin-bottom: 5px; }
.page .special ul { margin: 0; padding-left: 16px; }
.page .special li { margin: 2px 0; }

/* Signatures */
.page .sign { display: flex; border: 2px solid var(--bol-ink); border-top: none; }
.page .sign .sbox { flex: 1; padding: 10px 12px 8px; border-left: 1px solid var(--bol-line); }
.page .sign .sbox:first-child { border-left: none; }
.page .sigline { border-bottom: 1px solid var(--bol-ink); height: 26px; }
.page .sigcap { font-size: 8px; text-transform: uppercase; letter-spacing: .8px; color: #777; margin-top: 3px; }

/* Footer line */
.page .foot { margin-top: 6px; font-size: 8px; color: #999; text-align: center; letter-spacing: .5px; }
.page .foot span { color: var(--bol-red); font-weight: 700; }
