/* Jay's Shop: same brand as jaysservicecenter.com (navy ink, electric blue, chrome), tuned for all-day use under shop lights. */
:root {
  --ink: #0b1a2e; --ink-soft: #3c4a5e; --ink-faint: #6b7788;
  --blue: #1e88f0; --blue-bright: #3aa0ff; --blue-deep: #0b56cc; --blue-wash: #e8f2fe;
  --paper: #f3f5f8; --white: #fff; --line: #d7dde6; --line-soft: #e7ebf1;
  --red: #c9302c; --red-wash: #fdecec; --amber: #a86400; --amber-wash: #fff4e0; --green: #17803d; --green-wash: #e6f6ec;
  --radius: 10px; --display: "Barlow Condensed", "Arial Narrow", sans-serif; --body: "Barlow", system-ui, sans-serif;
  --shadow: 0 1px 2px rgba(11,26,46,.06), 0 6px 18px -10px rgba(11,26,46,.25);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body.signed-out .sections, body.signed-out .search, body.signed-out .subbar { visibility: hidden; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.45 var(--body); }
a { color: var(--blue-deep); }
button, input, select, textarea { font: inherit; color: inherit; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
h1, h2, h3 { font-family: var(--display); line-height: 1.05; margin: 0; }
h1 { font-size: clamp(30px, 3.2vw, 40px); font-weight: 800; font-style: italic; text-transform: uppercase; letter-spacing: .01em; }
h2 { font-size: 22px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
h3 { font-size: 18px; font-weight: 700; }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 18px; padding: 8px 22px;
  background: radial-gradient(120% 140% at 0% 0%, #13305a 0%, var(--ink) 55%); color: #fff;
  box-shadow: 0 2px 0 rgba(58,160,255,.55), 0 10px 24px -14px rgba(0,0,0,.6);
}
.brand img { display: block; width: 132px; height: auto; filter: drop-shadow(0 2px 6px rgba(58,160,255,.35)); }
/* Toolbar: Motive Power's big icon buttons, in the same order, in Jay's colors */
.sections { display: flex; gap: 4px; }
.sections a {
  display: grid; justify-items: center; gap: 3px; min-width: 82px; padding: 7px 8px 6px; border-radius: 9px; text-decoration: none;
  color: #cfe3ff; font: 700 14px/1 var(--display); letter-spacing: .05em; text-transform: uppercase; border: 1px solid transparent;
}
.sections a svg { width: 28px; height: 28px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.sections a:hover { background: rgba(255,255,255,.07); color: #fff; }
.sections a[aria-current="page"] { color: #fff; background: linear-gradient(180deg, rgba(58,160,255,.32), rgba(30,136,240,.14)); border-color: rgba(143,230,255,.45); box-shadow: 0 0 18px -6px rgba(58,160,255,.8); }
.sections a[aria-current="page"] svg { stroke: #8fe6ff; }
/* Tab bar: Motive Power's red band of white buttons, here in electric blue */
.subbar { position: sticky; top: 74px; z-index: 19; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; min-height: 50px; padding: 8px 22px;
  background: linear-gradient(180deg, #2a95f5 0%, #1e7fe6 55%, #1468d6 100%); box-shadow: 0 6px 16px -10px rgba(11,26,46,.7); }
.subbar:empty { display: none; }
.subbar a, .subbar button, .subbar select {
  background: #fff; color: var(--ink); border: 1px solid rgba(11,26,46,.15); border-radius: 7px; padding: 7px 14px; min-height: 36px;
  font: 600 15px var(--body); text-decoration: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; box-shadow: 0 1px 0 rgba(11,26,46,.25);
}
.subbar a:hover, .subbar button:hover { background: #eef6ff; }
.subbar a[aria-current="page"] { background: var(--ink); color: #fff; border-color: var(--ink); box-shadow: inset 0 -3px 0 #8fe6ff; }
.subbar .soon { background: rgba(255,255,255,.55); color: var(--ink-soft); border: 1px solid rgba(11,26,46,.12); border-radius: 7px; padding: 7px 14px; min-height: 36px; font: 600 15px var(--body); display: inline-flex; align-items: center; gap: 6px; cursor: default; }
.subbar .soon::after { content: "soon"; font-size: 10px; text-transform: uppercase; letter-spacing: .08em; background: var(--amber-wash); color: var(--amber); border-radius: 4px; padding: 1px 5px; }
.subbar .sep { flex: 1; }
.subbar select { max-width: 420px; }
/* Inner tabs (grey strip under the title, like Motive Power's Jobs / Vehicle / Customer / Totals…) */
.innertabs { display: flex; gap: 2px; border-bottom: 2px solid var(--ink); margin: 0 0 18px; overflow-x: auto; }
.innertabs a { padding: 10px 18px; text-decoration: none; color: var(--ink-soft); font: 700 15px var(--display); letter-spacing: .06em; text-transform: uppercase; background: #e7ebf1; border-radius: 8px 8px 0 0; white-space: nowrap; }
.innertabs a:hover { background: #dbe3ee; color: var(--ink); }
.innertabs a[aria-current="page"] { background: var(--ink); color: #fff; }
.search { position: relative; flex: 1; max-width: 340px; margin-left: auto; }
.search input {
  width: 100%; height: 46px; border-radius: 10px; border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.08);
  color: #fff; padding: 0 44px 0 16px; font-size: 17px;
}
.search input::placeholder { color: #9fb6d4; }
.search input:focus { outline: none; background: #fff; color: var(--ink); border-color: var(--blue-bright); box-shadow: 0 0 0 3px rgba(58,160,255,.4); }
.search input:focus::placeholder { color: var(--ink-faint); }
.search kbd { position: absolute; right: 12px; top: 12px; font: 600 13px var(--body); color: #9fb6d4; border: 1px solid rgba(255,255,255,.25); border-radius: 5px; padding: 0 7px; }
.search input:focus + kbd { display: none; }
.who { background: none; border: 1px solid rgba(255,255,255,.2); color: #cfe3ff; border-radius: 8px; padding: 8px 12px; cursor: pointer; font-size: 14px; white-space: nowrap; }
.who:hover { color: #fff; border-color: rgba(255,255,255,.4); }

/* ---------- Page ---------- */
main { max-width: 1320px; margin: 0 auto; padding: 26px 22px 80px; outline: none; }
.loading { color: var(--ink-faint); }
.pagehead { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.pagehead .sub { margin: 6px 0 0; color: var(--ink-soft); }
.crumbs { font-size: 14px; margin-bottom: 6px; color: var(--ink-faint); }
.crumbs a { color: var(--ink-soft); }
.grid { display: grid; gap: 18px; align-items: start; }
.cols-2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.cols-side { grid-template-columns: minmax(0, 380px) minmax(0, 1fr); }
@media (max-width: 960px) { .cols-2, .cols-side { grid-template-columns: 1fr; } }
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px; }
.card > h2 { margin-bottom: 12px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.card.flush { padding: 0; overflow: hidden; }
.card.flush > h2 { padding: 16px 20px 0; }
.muted { color: var(--ink-faint); }
.small { font-size: 14px; }
.empty { padding: 26px; text-align: center; color: var(--ink-faint); }

/* Stat tiles */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); text-decoration: none; color: inherit; display: block; position: relative; overflow: hidden; }
.stat::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: linear-gradient(180deg, var(--blue-bright), var(--blue-deep)); }
.stat.warn::before { background: linear-gradient(180deg, #ffb020, #d97a00); }
.stat .n { font: 800 38px/1 var(--display); letter-spacing: .01em; }
.stat .l { margin-top: 6px; font: 700 14px var(--display); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); }
.stat .h { margin-top: 4px; font-size: 14px; color: var(--ink-faint); }
a.stat:hover { border-color: var(--blue-bright); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 9px;
  border: 1px solid var(--line); background: var(--white); color: var(--ink); font-weight: 700; cursor: pointer; text-decoration: none; white-space: nowrap;
}
.btn:hover { border-color: var(--blue); color: var(--blue-deep); }
.btn.primary { background: linear-gradient(180deg, #3aa0ff 0%, #1e7fe6 55%, #0b56cc 100%); border-color: #0b56cc; color: #fff; box-shadow: 0 6px 14px -8px rgba(11,86,204,.8); }
.btn.primary:hover { filter: brightness(1.06); color: #fff; }
.btn.danger { color: var(--red); }
.btn.small { min-height: 36px; padding: 0 12px; font-size: 14px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid rgba(58,160,255,.6); outline-offset: 2px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* Chips */
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; background: var(--line-soft); color: var(--ink-soft); white-space: nowrap; }
.chip.ok { background: var(--green-wash); color: var(--green); }
.chip.bad { background: var(--red-wash); color: var(--red); }
.chip.warn { background: var(--amber-wash); color: var(--amber); }
.chip.blue { background: var(--blue-wash); color: var(--blue-deep); }

/* Tables */
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font: 700 13px var(--display); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-faint); padding: 10px 14px; border-bottom: 1px solid var(--line); background: #fafbfd; position: sticky; top: 0; }
td { padding: 11px 14px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
tr.click { cursor: pointer; }
tr.click:hover td { background: var(--blue-wash); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.tablewrap { overflow-x: auto; }

/* Results list */
.results { display: grid; gap: 10px; }
.result { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1.4fr); gap: 14px; align-items: center; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; text-decoration: none; color: inherit; box-shadow: var(--shadow); }
.result:hover, .result:focus-visible { border-color: var(--blue-bright); background: #fbfdff; }
.result .nm { font-weight: 700; font-size: 18px; }
@media (max-width: 760px) { .result { grid-template-columns: 1fr; gap: 4px; } }

/* Forms */
.form { display: grid; gap: 14px; }
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
label.f { display: grid; gap: 5px; font-size: 14px; font-weight: 600; color: var(--ink-soft); }
label.f input, label.f select, label.f textarea {
  width: 100%; min-height: 44px; border: 1px solid var(--line); border-radius: 8px; padding: 9px 12px; background: #fff; color: var(--ink); font-size: 16px; font-weight: 400;
}
label.f textarea { min-height: 90px; resize: vertical; }
label.f input:focus, label.f select:focus, label.f textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(58,160,255,.25); }
.hint { font-size: 13px; color: var(--ink-faint); font-weight: 400; }
.err { color: var(--red); font-weight: 600; }
.phones { display: grid; gap: 8px; }
.phone-row { display: grid; grid-template-columns: 1fr 120px 40px; gap: 8px; }

/* Detail lists */
dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; }
dl.facts dt { color: var(--ink-faint); font-size: 14px; }
dl.facts dd { margin: 0; font-weight: 600; }

/* Vehicle tiles */
.cars { display: grid; gap: 10px; }
.car { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: 9px; text-decoration: none; color: inherit; }
.car:hover { border-color: var(--blue-bright); background: #fbfdff; }
.car .t { font-weight: 700; }
.car.inactive { opacity: .6; }

/* Timeline */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: grid; grid-template-columns: 110px 1fr auto; gap: 14px; padding: 14px 20px; border-top: 1px solid var(--line-soft); }
.timeline li:first-child { border-top: 0; }
.timeline .d { font-weight: 700; }
.timeline .jobs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.timeline .job { background: var(--paper); border: 1px solid var(--line-soft); border-radius: 6px; padding: 2px 8px; font-size: 14px; }
.timeline .job.declined { background: var(--amber-wash); border-color: #f3d9a4; color: var(--amber); }
@media (max-width: 640px) { .timeline li { grid-template-columns: 1fr; gap: 4px; } }

/* Mileage chart */
.spark { width: 100%; height: 110px; display: block; }

/* Toast */
#toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); opacity: 0; transition: .25s; background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 10px; box-shadow: 0 10px 30px -10px rgba(0,0,0,.6); z-index: 50; max-width: min(92vw, 560px); pointer-events: none; }
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
#toast.bad { background: var(--red); }

/* Sign-in */
.signin { max-width: 440px; margin: 7vh auto 0; }
.signin .card { padding: 30px; }
.signin h1 { margin-bottom: 8px; }

/* Notice boxes */
.notice { border-radius: 9px; padding: 12px 16px; background: var(--blue-wash); border: 1px solid #c5dcfb; }
.notice.warn { background: var(--amber-wash); border-color: #f3d9a4; }
.notice.bad { background: var(--red-wash); border-color: #f4c2c0; }
.notice.ok { background: var(--green-wash); border-color: #b9e3c7; }

/* Reminder list */
.rem-check { width: 22px; height: 22px; accent-color: var(--blue); }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; justify-content: space-between; padding: 14px 20px; border-bottom: 1px solid var(--line); background: #fafbfd; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; background: #fff; }
.seg button { border: 0; background: none; padding: 9px 14px; cursor: pointer; font-weight: 700; min-height: 42px; }
.seg button[aria-pressed="true"] { background: var(--ink); color: #fff; }

@media (max-width: 1100px) {
  .topbar { flex-wrap: wrap; gap: 10px; padding: 8px 14px; }
  .search { order: 3; flex-basis: 100%; max-width: none; }
  .sections { overflow-x: auto; order: 2; flex-basis: 100%; }
  .sections a { min-width: 70px; }
  .subbar { top: 0; position: relative; }
  .brand img { width: 110px; }
}

/* ---------- Postcards: 4 per letter sheet (each 4.25 × 5.5 in), on-screen preview + print ---------- */
#print { display: none; }
.sheets { display: grid; gap: 28px; justify-content: center; }
.sheet { width: 8.5in; height: 11in; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; background: #fff; box-shadow: 0 12px 40px -18px rgba(11,26,46,.45); border: 1px solid var(--line); }
.pc { border: 1px dashed #c3cad4; padding: .35in .35in .4in; display: grid; grid-template-rows: auto 1fr auto; color: #111; font: 11.5pt/1.35 Arial, Helvetica, sans-serif; overflow: hidden; }
.pc-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; border-bottom: 2.5pt solid #1e88f0; padding-bottom: 8px; }
.pc-brand { font: 900 italic 15pt/1 var(--display); text-transform: uppercase; letter-spacing: .03em; color: #0b1a2e; }
.pc-from { font-size: 7.5pt; color: #333; line-height: 1.3; margin-top: 3px; }
.pc-stamp { width: .8in; height: .9in; flex: none; border: 1px dashed #9aa5b3; display: grid; place-items: center; text-align: center; font-size: 7pt; line-height: 1.2; color: #8a94a3; text-transform: uppercase; letter-spacing: .06em; }
.pc-msg { padding-top: 12px; }
.pc-msg p { margin: 0 0 7px; }
.pc-phone { font: 800 15pt var(--display); color: #0b56cc; letter-spacing: .02em; }
.pc-to { justify-self: end; min-width: 2.4in; font-size: 11pt; line-height: 1.3; padding-top: 8px; border-top: 1px solid #ddd; }
@media (max-width: 900px) { .sheets { zoom: .5; } }
@media print {
  @page { size: letter; margin: 0; }
  body { background: #fff; }
  body.pc-mode > *:not(main), body.pc-mode .noprint { display: none !important; }
  body.pc-mode main { padding: 0; max-width: none; }
  body.pc-mode .sheets { display: block; zoom: 1; }
  body.pc-mode .sheet { box-shadow: none; border: 0; page-break-after: always; break-after: page; }
  body.pc-mode .pc-top, body.pc-mode .pc-phone { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ---------- Invoice: on-screen paper preview + print ---------- */
.paper { background: #fff; width: min(100%, 8.5in); margin: 0 auto; padding: .5in .55in; box-shadow: 0 12px 40px -18px rgba(11,26,46,.45); border: 1px solid var(--line); color: #111; font-size: 13.5px; line-height: 1.4; }
.inv-head { display: flex; justify-content: space-between; align-items: center; gap: 20px; background: var(--ink); color: #dfe9f7; margin: -.5in -.55in 0; padding: 16px .55in; border-bottom: 3px solid var(--blue-bright); }
.inv-logo { width: 150px; height: auto; display: block; }
.inv-shop { text-align: right; font-size: 12.5px; line-height: 1.45; }
.inv-shop b { color: #fff; font: 800 italic 18px var(--display); letter-spacing: .04em; text-transform: uppercase; }
.inv-title { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; padding: 18px 0 12px; border-bottom: 1px solid #cfd6df; }
.inv-title h1 { font-size: 30px; color: var(--ink); }
.inv-title h1 span { color: var(--blue-deep); }
.inv-title dl { display: grid; grid-template-columns: auto auto; gap: 2px 14px; margin: 0; font-size: 12.5px; }
.inv-title dt { color: #5b6676; text-align: right; } .inv-title dd { margin: 0; font-weight: 700; }
.inv-parties { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; padding: 14px 0; border-bottom: 1px solid #cfd6df; }
.paper h2 { font: 700 12px var(--display); letter-spacing: .14em; text-transform: uppercase; color: var(--blue-deep); margin: 0 0 4px; }
.paper p { margin: 0; }
.inv-block { padding: 12px 0; border-bottom: 1px solid #e3e7ed; }
.inv-lines { margin-top: 12px; }
.inv-lines th { background: #eef3fa; color: var(--ink); font-size: 11.5px; position: static; border-bottom: 2px solid var(--ink); }
.inv-lines td { padding: 6px 10px; border-bottom: 0; }
.inv-lines tr.job td { border-top: 1px solid #e3e7ed; padding-top: 9px; }
.inv-lines tr.part td { color: #333; font-size: 12.5px; padding-left: 26px; }
.inv-lines tr.part td.num { padding-left: 10px; }
.inv-lines .desc { font-size: 12.5px; color: #444; white-space: pre-wrap; }
.inv-lines .pn { color: #6b7788; font-size: 11.5px; }
.inv-lines .ptype { font-size: 10.5px; border: 1px solid #c8d0db; border-radius: 4px; padding: 0 4px; color: #4a5566; }
.inv-bottom { display: grid; grid-template-columns: 1fr 250px; gap: 26px; margin-top: 16px; padding-top: 14px; border-top: 2px solid var(--ink); }
.inv-notes p { margin-bottom: 8px; } .inv-notes .fine { font-size: 11px; color: #555; }
.sign { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; margin-top: 26px; }
.sign span { border-top: 1px solid #333; padding-top: 3px; font-size: 11px; color: #555; }
.inv-totals td { padding: 4px 0; border: 0; }
.inv-totals tr.strong td { font-weight: 800; font-size: 16px; border-top: 1px solid #333; padding-top: 7px; }
.inv-foot { margin-top: 22px; text-align: center; font: 700 italic 14px var(--display); letter-spacing: .06em; text-transform: uppercase; color: var(--blue-deep); }
@media (max-width: 700px) { .inv-parties, .inv-bottom { grid-template-columns: 1fr; } .paper { padding: 20px; } .inv-head { margin: -20px -20px 0; padding: 14px 20px; } }
@media print {
  body.invoice-mode > *:not(main), body.invoice-mode .noprint, body.invoice-mode #print { display: none !important; }
  body.invoice-mode main { padding: 0; max-width: none; }
  body.invoice-mode .paper { box-shadow: none; border: 0; width: auto; padding: .45in .5in; }
  body.invoice-mode .inv-head { margin: -.45in -.5in 0; padding: 14px .5in; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  body.invoice-mode .inv-lines th { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  @page { margin: 0; }
}

/* Customers page search */
.bigsearch { background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 16px; box-shadow: var(--shadow); }
.bigsearch input { width: 100%; height: 58px; border: 2px solid var(--line); border-radius: 10px; padding: 0 18px; font-size: 20px; }
.bigsearch input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(58,160,255,.22); }
.examples { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.examples button { border: 1px solid var(--line); background: var(--paper); border-radius: 999px; padding: 3px 10px; cursor: pointer; font-size: 13px; color: var(--ink-soft); }
.examples button:hover { border-color: var(--blue); color: var(--blue-deep); }

/* Reminders: list on the left, live preview on the right */
.rem-layout { display: grid; grid-template-columns: minmax(0, 1fr) 470px; gap: 18px; align-items: start; }
.rem-preview { position: sticky; top: 140px; }
#remRows tr.on td { background: var(--blue-wash); box-shadow: inset 3px 0 0 var(--blue); }
.pc-frame { aspect-ratio: 4.25 / 5.5; width: 100%; border: 1px solid var(--line); box-shadow: 0 8px 22px -14px rgba(11,26,46,.5); background: #fff; display: grid; overflow: hidden; }
.pc-frame .pc { border: 0; font-size: 10pt; padding: .28in .28in .3in; }
.print-only { display: none; }
@media (max-width: 1200px) { .rem-layout { grid-template-columns: 1fr; } .rem-preview { position: static; } }
@media print {
  body.pc-print-area main > *:not(#printArea) { display: none !important; }
  body.pc-print-area #printArea { display: block !important; }
}

/* Notes: customer + every car, easy to spot */
.notes-card { border-left: 4px solid #ffb020; }
.notes-card h2 { display: flex; justify-content: space-between; align-items: center; }
.note { padding: 10px 0; border-top: 1px solid var(--line-soft); }
.note:first-of-type { border-top: 0; padding-top: 0; }
.note-head { font: 700 13px var(--display); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 4px; }
.note p, .notes-card > p { margin: 0 0 6px; white-space: pre-wrap; }

/* Reminders: preview icon next to each name, opens a pop-up */
.name-cell { display: flex; align-items: center; gap: 10px; }
.pv-btn { flex: none; width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 8px; background: #fff; cursor: pointer; color: var(--blue-deep); }
.pv-btn:hover { border-color: var(--blue); background: var(--blue-wash); }
.pv-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.pv-dialog { border: 0; border-radius: 14px; padding: 20px 22px; width: min(560px, 94vw); max-height: 92vh; overflow: auto; box-shadow: 0 30px 80px -20px rgba(11,26,46,.6); }
.pv-dialog::backdrop { background: rgba(11,26,46,.55); }

/* =====================================================================
   Visual polish (Nov 30): same brand as jaysservicecenter.com, more depth.
   Navy ink, electric blue, chrome. Later rules here refine the base ones above.
   ===================================================================== */
:root {
  --paper: #eef2f7; --panel: #ffffff; --line: #d9e0ea; --line-soft: #e9eef4;
  --chrome-edge: linear-gradient(180deg, #ffffff 0%, #e8edf3 100%);
  --shadow: 0 1px 1px rgba(11,26,46,.04), 0 10px 28px -16px rgba(11,26,46,.28);
  --shadow-lift: 0 2px 4px rgba(11,26,46,.06), 0 18px 40px -18px rgba(11,26,46,.38);
}
body { background: radial-gradient(1200px 360px at 50% -120px, #dfe8f4 0%, rgba(223,232,244,0) 70%), var(--paper); }

/* Header: a chrome hairline under the navy, like the logo's metal edge */
.topbar { box-shadow: 0 1px 0 rgba(255,255,255,.08) inset, 0 2px 0 #3aa0ff, 0 3px 0 rgba(143,230,255,.35), 0 14px 30px -18px rgba(0,0,0,.7); }
.subbar { box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 8px 18px -12px rgba(11,26,46,.55); }
.subbar a, .subbar button, .subbar select { border-radius: 999px; padding: 6px 16px; font-weight: 600; box-shadow: 0 1px 0 rgba(11,26,46,.18), inset 0 1px 0 #fff; }
.subbar .soon { border-radius: 999px; }

/* Page heads: big italic display title with an electric underline */
.pagehead { margin-bottom: 22px; }
.pagehead h1 { position: relative; padding-bottom: 10px; text-wrap: balance;
  background: linear-gradient(180deg, #13305a 0%, #0b1a2e 60%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pagehead h1::after { content: ""; position: absolute; left: 0; bottom: 0; width: 64px; height: 4px; border-radius: 2px; background: linear-gradient(90deg, #8fe6ff, #1e88f0 60%, #0b56cc); box-shadow: 0 0 12px rgba(58,160,255,.55); }
.pagehead .sub { font-size: 16px; max-width: 70ch; }

/* Panels: crisper edges, softer depth, headings as small condensed labels */
.card { border-radius: 14px; border-color: var(--line); box-shadow: var(--shadow); }
.card > h2, .card.flush > h2 { font-size: 15px; letter-spacing: .14em; color: #33445c; padding-bottom: 10px; border-bottom: 1px solid var(--line-soft); margin-bottom: 14px; }
.card.flush > h2 { margin: 0; padding: 16px 20px 12px; }

/* Big numbers on Daily Tasks: electric gradient figures on a chrome tile */
.stat { border-radius: 14px; background: var(--chrome-edge); box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s; }
.stat::before { display: none; }
.stat .n { font-size: 44px; background: linear-gradient(180deg, #3aa0ff 0%, #1e7fe6 55%, #0b4fbf 100%); -webkit-background-clip: text; background-clip: text; color: transparent; font-variant-numeric: tabular-nums; }
.stat.warn .n { background: linear-gradient(180deg, #ffb020, #d97a00); -webkit-background-clip: text; background-clip: text; }
a.stat:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); border-color: #9fcfff; }

/* Tables: quiet header, gentle zebra, clear hover */
th { background: #f5f8fc; color: #5b6a80; font-size: 12.5px; border-bottom: 1px solid var(--line); }
tbody tr:nth-child(even) td { background: #fafcfe; }
tr.click:hover td, tbody tr:hover td { background: #eef6ff; }
td { border-bottom-color: var(--line-soft); }

/* Buttons */
.btn { border-radius: 10px; background: var(--chrome-edge); box-shadow: 0 1px 0 rgba(11,26,46,.08), inset 0 1px 0 #fff; transition: border-color .15s, box-shadow .15s, transform .1s; }
.btn:hover { box-shadow: 0 4px 12px -6px rgba(30,136,240,.45), inset 0 1px 0 #fff; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: linear-gradient(180deg, #4fb0ff 0%, #1e88f0 50%, #0b56cc 100%); box-shadow: 0 8px 18px -8px rgba(11,86,204,.85), inset 0 1px 0 rgba(255,255,255,.35); }
.btn.primary:hover { box-shadow: 0 10px 22px -8px rgba(11,86,204,.95), 0 0 0 3px rgba(58,160,255,.18), inset 0 1px 0 rgba(255,255,255,.35); }
.btn.danger { color: var(--red); }
.btn.danger:hover { border-color: #f0a8a5; box-shadow: 0 4px 12px -6px rgba(201,48,44,.4); }

/* Chips */
.chip { border-radius: 999px; padding: 3px 10px; font-size: 12.5px; border: 1px solid transparent; }
.chip.ok { border-color: #bfe6cc; } .chip.bad { border-color: #f4c2c0; } .chip.warn { border-color: #f3d9a4; } .chip.blue { border-color: #c5dcfb; }

/* Segmented tabs (Reminders: Email / Postcards / Can't reach) */
.seg { border-radius: 999px; padding: 3px; background: #e9eff6; border-color: transparent; gap: 2px; }
.seg button { border-radius: 999px; padding: 7px 16px; color: #3c4a5e; }
.seg button[aria-pressed="true"] { background: linear-gradient(180deg, #13305a, #0b1a2e); color: #fff; box-shadow: 0 4px 10px -6px rgba(11,26,46,.8); }
.toolbar { background: linear-gradient(180deg, #f8fafd, #f2f6fb); }

/* Inputs */
label.f input, label.f select, label.f textarea, .bigsearch input { border-radius: 10px; background: #fbfcfe; }
label.f input:focus, label.f select:focus, label.f textarea:focus { background: #fff; }
.bigsearch { border-radius: 16px; background: linear-gradient(180deg, #ffffff, #f6f9fd); }
.bigsearch input { background: #fff; box-shadow: inset 0 1px 2px rgba(11,26,46,.06); }

/* Customer results: initials badge in brand chrome/electric */
.result { border-radius: 14px; grid-template-columns: auto minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1.4fr); transition: transform .12s, box-shadow .12s, border-color .12s; }
.result:hover { transform: translateY(-1px); box-shadow: var(--shadow-lift); }
.avatar { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: radial-gradient(circle at 30% 25%, #8fe6ff 0%, #3aa0ff 35%, #0b56cc 100%); color: #fff;
  font: 800 16px/1 var(--display); letter-spacing: .04em; box-shadow: inset 0 -2px 4px rgba(0,0,0,.25), 0 4px 10px -4px rgba(11,86,204,.7); text-shadow: 0 1px 1px rgba(0,0,0,.3); }
.avatar.lg { width: 64px; height: 64px; font-size: 24px; }
.avatar.off { background: radial-gradient(circle at 30% 25%, #e3e9f0, #a9b5c4); }
@media (max-width: 760px) { .result { grid-template-columns: auto 1fr; } .result > div:nth-child(n+3) { grid-column: 2; } }
.namehead { display: flex; align-items: center; gap: 16px; }

/* Customer + car pages */
.car { border-radius: 12px; background: var(--chrome-edge); }
.car:hover { box-shadow: var(--shadow); }
.timeline .job { border-radius: 999px; padding: 2px 10px; background: #f1f5fa; border-color: #e1e8f0; }
.notes-card { border-left: 0; background: linear-gradient(180deg, #fffaf0, #ffffff 60%); border-color: #f2dfb8; }
.notes-card > h2 { color: #8a5a00; border-bottom-color: #f5e6c6; }

/* Inner ticket tabs */
.innertabs { border-bottom: 0; gap: 6px; background: #e9eff6; padding: 4px; border-radius: 12px; width: fit-content; max-width: 100%; }
.innertabs a { border-radius: 9px; background: transparent; padding: 8px 16px; }
.innertabs a:hover { background: #dde6f1; }
.innertabs a[aria-current="page"] { background: linear-gradient(180deg, #13305a, #0b1a2e); box-shadow: 0 4px 10px -6px rgba(11,26,46,.8); }

/* Notices and toast */
.notice { border-radius: 12px; }
#toast { border-radius: 12px; background: linear-gradient(180deg, #13305a, #0b1a2e); box-shadow: 0 0 0 1px rgba(143,230,255,.25), 0 16px 36px -12px rgba(0,0,0,.6); }

/* Sign-in: a proper welcome */
.signin .card { border-radius: 18px; box-shadow: var(--shadow-lift); }
.signin h1 { font-size: 36px; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

.quick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.quick a { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center; padding: 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--chrome-edge); text-decoration: none; color: var(--ink); transition: transform .12s, box-shadow .12s, border-color .12s; }
.quick a:hover { transform: translateY(-1px); border-color: #9fcfff; box-shadow: var(--shadow-lift); }
.quick svg { grid-row: span 2; width: 34px; height: 34px; padding: 6px; border-radius: 10px; box-sizing: content-box; fill: none; stroke: #fff; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; background: radial-gradient(circle at 30% 25%, #8fe6ff 0%, #3aa0ff 35%, #0b56cc 100%); box-shadow: 0 4px 10px -4px rgba(11,86,204,.7); }
.quick b { font: 700 17px var(--display); letter-spacing: .03em; text-transform: uppercase; }
.quick span { color: var(--ink-faint); font-size: 14px; }
@media (max-width: 640px) { .quick { grid-template-columns: 1fr; } }

.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tags button { border: 1px solid #c5dcfb; background: var(--blue-wash); color: var(--blue-deep); border-radius: 999px; padding: 3px 10px; cursor: pointer; font: 600 13px var(--body); }
.tags button:hover { background: #d9eaff; }
.pc-msg p { margin: 0 0 7px; }

/* ---------- Ticket editor ---------- */
.ticket-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; align-items: start; }
.totals-box { position: sticky; top: 140px; }
dl.tot { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; margin: 0; font-variant-numeric: tabular-nums; }
dl.tot dt { color: var(--ink-soft); } dl.tot dd { margin: 0; text-align: right; font-weight: 600; }
dl.tot .big { font: 800 24px var(--display); color: var(--ink); padding-top: 8px; border-top: 1px solid var(--line); }
.addjob { display: grid; grid-template-columns: 1fr auto auto; gap: 10px 12px; align-items: center; }
.addjob input[name=title] { height: 48px; border: 2px solid var(--line); border-radius: 10px; padding: 0 14px; font-size: 17px; }
.addjob input[name=title]:focus { outline: none; border-color: var(--blue); }
.quickjobs { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; color: var(--ink-faint); }
.quickjobs button { border: 1px solid #c5dcfb; background: var(--blue-wash); color: var(--blue-deep); border-radius: 999px; padding: 3px 12px; cursor: pointer; font: 600 13px var(--body); }
.job-card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 14px 16px; display: grid; gap: 10px; }
.job-card.declined { opacity: .6; background: #fbf8f1; }
.job-head { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.job-title { font: 700 19px var(--display); letter-spacing: .02em; text-transform: uppercase; border: 1px solid transparent; border-radius: 8px; padding: 4px 8px; min-width: 220px; flex: 1; background: transparent; }
input.job-title:hover, input.job-title:focus { border-color: var(--line); background: #fff; outline: none; }
.job-money { display: flex; gap: 10px; align-items: end; }
.mini { display: grid; gap: 2px; font-size: 12px; color: var(--ink-faint); }
.job-card input, .job-card select, .job-card textarea { border: 1px solid var(--line); border-radius: 7px; padding: 6px 8px; background: #fbfcfe; font-size: 15px; }
.job-card textarea { width: 100%; resize: vertical; }
.job-card input:focus, .job-card select:focus, .job-card textarea:focus { outline: none; border-color: var(--blue); background: #fff; box-shadow: 0 0 0 3px rgba(58,160,255,.2); }
.w-xs { width: 70px; } .w-sm { width: 100px; } .w-md { width: 220px; }
.job-flags { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; color: var(--ink-soft); }
.job-flags label { display: flex; gap: 6px; align-items: center; }
.job-flags .btn { margin-left: auto; }
table.lines td { padding: 6px 6px; vertical-align: middle; }
table.lines td input + input { margin-left: 4px; }
table.lines tr.fee td, table.lines tr.discount td { background: #fbfaf5; }
.x { border: 0; background: none; color: var(--ink-faint); cursor: pointer; font-size: 16px; padding: 4px 8px; border-radius: 6px; }
.x:hover { background: var(--red-wash); color: var(--red); }
.add-line { gap: 6px; }
.stagebar { display: flex; gap: 0; margin: -6px 0 16px; background: #e9eff6; border-radius: 999px; padding: 4px; width: fit-content; max-width: 100%; overflow-x: auto; }
.stagebar span { padding: 6px 16px; border-radius: 999px; font: 700 14px var(--display); letter-spacing: .06em; text-transform: uppercase; color: #8794a6; white-space: nowrap; }
.stagebar span.done { color: var(--green); }
.stagebar span.done::before { content: "✓ "; }
.stagebar span.now { background: linear-gradient(180deg, #13305a, #0b1a2e); color: #fff; box-shadow: 0 4px 10px -6px rgba(11,26,46,.8); }
@media (max-width: 1100px) { .ticket-grid { grid-template-columns: 1fr; } .totals-box { position: static; } .addjob { grid-template-columns: 1fr; } }

/* Practice copy: impossible to mistake for the real system */
#practiceBand { position: sticky; top: 0; z-index: 30; background: repeating-linear-gradient(135deg, #ffb020 0 18px, #ffc34d 18px 36px); color: #3a2600; text-align: center; font: 700 14px var(--body); padding: 6px 12px; letter-spacing: .02em; }
#practiceBand a { color: #3a2600; }
body.practice .topbar { top: 31px; }
body.practice .subbar { top: 105px; }

/* =====================================================================
   Invoice / estimate / work order printout, matching Danielle's design:
   garage photo header, slanted INVOICE banner, navy section tabs, five-icon footer.
   ===================================================================== */
.paper.iv { padding: 0; width: min(100%, 8.5in); color: #0e1626; font: 13px/1.35 var(--body); overflow: hidden; position: relative;
  background: radial-gradient(500px 300px at 100% 72%, rgba(11,26,46,.05), transparent 70%), radial-gradient(400px 260px at 0% 80%, rgba(11,26,46,.05), transparent 70%), #fff; }
.iv svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.iv-hero { position: relative; height: 1.95in; background: #050b16; color: #fff; overflow: hidden; display: flex; justify-content: space-between; align-items: center; padding: 0 .42in; border-bottom: 3px solid #1e88f0; box-shadow: 0 2px 0 rgba(143,230,255,.5); }
.iv-hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 40% 70%; opacity: .55; filter: saturate(.8) brightness(.8); }
.iv-hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(5,11,22,.95) 0%, rgba(5,11,22,.55) 34%, rgba(5,11,22,.15) 55%, rgba(5,11,22,.6) 72%, rgba(5,11,22,.96) 100%); z-index: 1; }
.iv-hero-car { position: absolute; left: 46%; bottom: -6px; width: 2.9in; transform: translateX(-30%); z-index: 2; filter: drop-shadow(0 10px 14px rgba(0,0,0,.7)) brightness(1.08); }
.iv-brand { position: relative; z-index: 3; display: grid; justify-items: center; gap: 6px; }
.iv-brand img { width: 2.6in; filter: drop-shadow(0 4px 10px rgba(58,160,255,.45)); }
.iv-fd { display: flex; align-items: center; gap: 10px; font: 700 italic 12.5px var(--display); letter-spacing: .38em; color: #dfe9f7; }
.iv-fd i { width: 26px; height: 2px; background: #1e88f0; box-shadow: 0 0 6px #3aa0ff; }
.iv-shop { position: relative; z-index: 3; text-align: right; font-size: 12.5px; line-height: 1.5; color: #e8eef7; }
.iv-shop b { display: block; font: 800 italic 19px/1.2 var(--display); letter-spacing: .04em; text-transform: uppercase; color: #fff; }
.iv-reg { display: block; margin-top: 6px; padding-top: 6px; border-top: 2px solid #1e88f0; font-size: 11px; line-height: 1.35; }
.iv-titlebar { display: flex; justify-content: space-between; align-items: center; padding: .16in .42in .12in 0; }
.iv-doc { display: flex; align-items: stretch; }
.iv-doc-name { position: relative; background: linear-gradient(180deg, #13305a, #0b1a2e); color: #fff; font: 900 italic 50px/1 var(--display); letter-spacing: .02em; padding: 12px 34px 10px .42in; clip-path: polygon(0 0, 100% 0, calc(100% - 22px) 100%, 0 100%); box-shadow: inset 0 -3px 0 #1e88f0; }
.iv-doc-name::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 18px; background: repeating-linear-gradient(115deg, #3aa0ff 0 6px, transparent 6px 10px); opacity: .9; }
.iv-doc-no { margin-left: -14px; background: linear-gradient(180deg, #ffffff 0%, #e2e8f0 50%, #c3ccd8 100%); color: #0b56cc; font: 900 italic 38px/1 var(--display); padding: 18px 34px 12px 34px; clip-path: polygon(22px 0, 100% 0, calc(100% - 22px) 100%, 0 100%); align-self: center; box-shadow: inset 0 1px 0 #fff; }
.iv-meta { display: grid; grid-template-columns: auto auto; gap: 1px 18px; margin: 0; padding-left: 18px; border-left: 3px solid #1e88f0; font-size: 12.5px; }
.iv-meta dt { color: #333d4d; } .iv-meta dd { margin: 0; font-weight: 800; font-size: 13.5px; }
.iv-cards { display: grid; grid-template-columns: 1fr 1fr; gap: .2in; padding: .06in .42in .1in; }
.iv-card { border: 1px solid #cdd6e2; border-radius: 10px; overflow: hidden; box-shadow: 0 3px 8px -5px rgba(11,26,46,.4); }
.iv-card h2, .iv-work-head { display: flex; align-items: center; gap: 12px; margin: 0; background: linear-gradient(180deg, #13305a, #0b1a2e); color: #fff; font: 800 italic 19px/1 var(--display); letter-spacing: .04em; text-transform: uppercase; padding: 8px 14px; box-shadow: inset 0 -2px 0 #1e88f0; }
.iv-card h2 svg { width: 28px; height: 28px; padding: 3px; border-radius: 6px; background: #fff; color: #0b1a2e; stroke: #0b1a2e; stroke-width: 2.2; fill: none; }
.iv-card h2 svg.i-user { fill: #0b1a2e; stroke: none; }
.iv-card-body { margin: 10px 14px 12px; padding-left: 12px; border-left: 4px solid #1e88f0; font-size: 14px; line-height: 1.35; }
.iv-card-body b { font-size: 16.5px; }
.iv-sec { padding: .04in .42in .08in; }
.iv-strip { position: relative; display: inline-flex; align-items: center; gap: 10px; margin: 0; background: linear-gradient(180deg, #13305a, #0b1a2e); color: #fff; font: 800 italic 16px/1 var(--display); letter-spacing: .04em; text-transform: uppercase; padding: 8px 60px 8px 14px; border-radius: 9px 0 0 0; clip-path: polygon(0 0, 100% 0, calc(100% - 18px) 100%, 0 100%); }
.iv-strip i { position: absolute; right: 22px; top: 0; bottom: 0; width: 26px; background: repeating-linear-gradient(115deg, #3aa0ff 0 5px, transparent 5px 9px); }
.iv-strip svg { color: #fff; }
.iv-box { border: 1px solid #cdd6e2; border-radius: 0 9px 9px 9px; padding: 9px 14px; font-size: 14px; background: linear-gradient(180deg, #f8fafd, #f0f4f9); margin-top: -1px; white-space: pre-wrap; }
.iv-work { margin: .04in .42in .1in; border: 1px solid #cdd6e2; border-radius: 10px; overflow: hidden; }
.iv-work-head { display: grid; grid-template-columns: 26px 1fr 90px 90px; font-size: 18px; }
.iv-work-head .c, .iv-jrow .c, .iv-prow .c { text-align: right; font-variant-numeric: tabular-nums; }
.iv-work-head .c { font-size: 15px; }
.iv-job { padding: 8px 14px 8px 18px; border-top: 1px solid #dfe5ee; }
.iv-job:first-of-type { border-top: 0; }
.iv-jrow, .iv-prow { display: grid; grid-template-columns: 1fr 90px 90px; gap: 6px; align-items: baseline; }
.iv-jrow b { font-size: 15px; } .iv-jrow .c { font-size: 14px; }
.iv-desc { font-size: 12.5px; color: #222b38; margin-top: 2px; white-space: pre-wrap; }
.iv-prow { position: relative; margin-left: 22px; padding: 6px 0 6px 26px; border-top: 1px solid #edf1f6; font-size: 13.5px; }
.iv-prow::before { content: ""; position: absolute; left: 6px; top: 0; height: 50%; width: 14px; border-left: 2px solid #1e88f0; border-bottom: 2px solid #1e88f0; }
.iv-pn { font-size: 11.5px; color: #4a5568; }
.iv-tag { display: inline-block; font: 800 10px/1 var(--body); letter-spacing: .06em; color: #0b56cc; border: 1.5px solid #1e88f0; border-radius: 999px; padding: 3px 8px; vertical-align: 1px; }
.iv-tag.warn { color: #9a5b00; border-color: #e0a12a; } .iv-tag.grey { color: #4a5568; border-color: #9aa5b3; }
.iv-bottom { display: grid; grid-template-columns: 1fr 2.6in; gap: .22in; padding: .08in .42in .04in; align-items: start; }
.iv-guarantee { padding-right: .18in; border-right: 2px solid #c9d3df; }
.iv-g-head { display: flex; align-items: center; gap: 10px; }
.iv-g-head svg { width: 40px; height: 40px; color: #0b2c57; }
.iv-g-head h2 { margin: 0; font: 900 italic 30px/1 var(--display); text-transform: uppercase; color: #0b1a2e; }
.iv-g-head h2 span { color: #1e7fe6; }
.iv-g-text { margin: 6px 0 6px 50px; font-size: 14.5px; font-weight: 600; }
.iv-note { margin: 0 0 4px 50px; font-size: 12px; }
.iv-fine { margin: 4px 0 0 50px; font-size: 11px; font-style: italic; color: #2c3644; }
.iv-totals { font-size: 15px; }
.iv-trow { display: flex; justify-content: space-between; padding: 3px 10px; border-bottom: 1px solid #dfe5ee; font-variant-numeric: tabular-nums; }
.iv-total { display: flex; justify-content: space-between; margin: 8px -6px; background: linear-gradient(180deg, #13305a, #0b1a2e); color: #fff; font: 900 italic 26px/1 var(--display); padding: 10px 20px; clip-path: polygon(14px 0, 100% 0, calc(100% - 14px) 100%, 0 100%); box-shadow: inset 0 -3px 0 #1e88f0; font-variant-numeric: tabular-nums; }
.iv-sign { display: grid; grid-template-columns: auto 1fr auto 1fr; gap: 12px; align-items: end; padding: .2in .42in .06in; font-style: italic; font-size: 14px; }
.iv-sign i { border-bottom: 1.5px solid #222; height: 18px; }
.iv-thanks { display: flex; align-items: center; justify-content: center; gap: 18px; margin: .08in 0 .14in; text-align: center; font: 800 italic 19px/1.25 var(--display); letter-spacing: .04em; text-transform: uppercase; color: #1060cc; }
.iv-thanks i { width: 60px; height: 3px; background: #1e88f0; border-radius: 2px; box-shadow: 0 0 6px rgba(58,160,255,.7); }
.iv-foot { display: grid; grid-template-columns: repeat(5, 1fr); background: linear-gradient(180deg, #0b1a2e, #050b16); color: #fff; padding: 14px .3in; border-top: 3px solid #1e88f0; }
.iv-foot div { display: flex; align-items: center; justify-content: center; gap: 10px; font: 800 13.5px/1.15 var(--display); letter-spacing: .05em; text-transform: uppercase; border-left: 1px solid rgba(255,255,255,.2); }
.iv-foot div:first-child { border-left: 0; }
.iv-foot svg { width: 34px; height: 34px; color: #3aa0ff; stroke-width: 1.6; }
@media (max-width: 760px) { .iv-hero-car { display: none; } .iv-cards, .iv-bottom { grid-template-columns: 1fr; } .iv-guarantee { border-right: 0; } .iv-foot { grid-template-columns: repeat(3, 1fr); row-gap: 10px; } .iv-doc-name { font-size: 34px; } .iv-doc-no { font-size: 26px; } }
@media print {
  body.invoice-mode .paper.iv { padding: 0; width: 8.5in; }
  body.invoice-mode .iv, body.invoice-mode .iv * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* Multi-page printing: margins on every page (except the photo header on page 1), nothing split mid-job */
@media print {
  html, body.invoice-mode { background: #fff !important; }
  @page { size: letter; margin: .45in 0 .55in; }
  @page :first { margin-top: 0; }
  body.invoice-mode .paper.iv { box-shadow: none; border: 0; background: #fff; overflow: visible; }
  .iv-job, .iv-card, .iv-cards, .iv-sec, .iv-bottom, .iv-end, .iv-titlebar { break-inside: avoid; page-break-inside: avoid; }
  .iv-work-head { break-after: avoid; page-break-after: avoid; }
  .iv-work { box-decoration-break: clone; -webkit-box-decoration-break: clone; }
  .iv-hero { break-after: avoid; }
}

/* Print: tighter rhythm so long invoices use as few pages as possible */
@media print {
  .iv-hero { height: 1.6in; }
  .iv-hero-car { width: 2.45in; }
  .iv-brand img { width: 2.25in; }
  .iv-titlebar { padding-top: .1in; padding-bottom: .08in; }
  .iv-doc-name { font-size: 42px; padding-top: 9px; padding-bottom: 8px; }
  .iv-doc-no { font-size: 32px; padding-top: 14px; padding-bottom: 9px; }
  .iv-cards { padding-bottom: .06in; }
  .iv-card-body { margin: 7px 12px 8px; font-size: 13px; }
  .iv-card-body b { font-size: 15px; }
  .iv-card h2, .iv-work-head { padding-top: 6px; padding-bottom: 6px; font-size: 17px; }
  .iv-job { padding: 5px 14px 5px 18px; }
  .iv-jrow b { font-size: 14px; }
  .iv-desc { font-size: 11.5px; line-height: 1.3; }
  .iv-prow { padding: 3px 0 3px 26px; font-size: 12.5px; }
  .iv-bottom { padding-top: .04in; }
  .iv-g-head h2 { font-size: 26px; }
  .iv-g-head svg { width: 34px; height: 34px; }
  .iv-total { font-size: 22px; padding: 8px 18px; }
  .iv-trow { padding: 2px 10px; font-size: 14px; }
  .iv-sign { padding-top: .14in; }
  .iv-thanks { font-size: 16px; margin: .06in 0 .1in; }
  .iv-foot { padding: 10px .3in; }
  .iv-foot svg { width: 28px; height: 28px; }
  /* Totals can go with the last jobs; only the signature/footer block must stay whole */
  .iv-bottom { break-inside: avoid; }
}

/* Signature pad + signature on the printout */
.sig-dialog { width: min(760px, 96vw); }
.sig-pad { position: relative; border: 2px dashed #9fb6d4; border-radius: 12px; background: linear-gradient(180deg, #fff, #f6f9fd); touch-action: none; }
.sig-pad canvas { display: block; width: 100%; height: auto; aspect-ratio: 1200 / 360; cursor: crosshair; touch-action: none; }
.sig-pad::after { content: ""; position: absolute; left: 7%; right: 7%; bottom: 26%; border-bottom: 1.5px solid #9aa5b3; pointer-events: none; }
.sig-x { position: absolute; left: 3%; bottom: 25%; color: #9aa5b3; font-size: 22px; pointer-events: none; }
.sig-hint { position: absolute; inset: 0; display: grid; place-items: center; color: #b6c2d2; font: 700 italic 28px var(--display); letter-spacing: .06em; text-transform: uppercase; pointer-events: none; }
.iv-sign i { position: relative; }
.iv-sign i.has-sig img { position: absolute; left: 6px; bottom: 1px; height: 46px; max-width: 100%; object-fit: contain; object-position: left bottom; }
.iv-sign i.iv-date { font-style: normal; font-size: 13px; padding-left: 6px; display: flex; align-items: flex-end; }
.iv-signed { margin: 2px .42in 0; font-size: 10.5px; color: #5b6676; text-align: left; }
.paper .iv-strip { color: #fff; font: 800 italic 16px/1 var(--display); letter-spacing: .04em; margin: 0; }

/* Signature sits inside its own line box (never pokes above it), and the end block may split between signature and footer */
.iv-sign { align-items: end; }
.iv-sign i.has-sig { height: 54px; display: flex; align-items: flex-end; }
.iv-sign i.has-sig img { position: static; height: 50px; width: auto; max-width: 100%; margin-left: 6px; }
.paper .iv-signed { margin: 3px .42in 0; font-size: 10.5px; color: #5b6676; }
@media print {
  .iv-end { break-inside: auto; page-break-inside: auto; }
  .iv-sigblock, .iv-thanks, .iv-foot { break-inside: avoid; page-break-inside: avoid; }
  .iv-sign { padding-top: .1in; }
}
/* Print: a little more room so short tickets stay on one page */
@media print {
  .iv-hero { height: 1.45in; }
  .iv-hero-car { width: 2.2in; }
  .iv-brand img { width: 2.05in; }
  .iv-shop { font-size: 11.5px; line-height: 1.4; }
  .iv-shop b { font-size: 17px; }
  .iv-titlebar { padding-top: .07in; padding-bottom: .05in; }
  .iv-doc-name { font-size: 38px; }
  .iv-doc-no { font-size: 29px; }
  .iv-meta { font-size: 11.5px; } .iv-meta dd { font-size: 12.5px; }
  .iv-cards { padding-top: .03in; padding-bottom: .04in; }
  .iv-sec { padding-top: .02in; padding-bottom: .05in; }
  .iv-box { padding: 6px 12px; font-size: 13px; }
  .iv-work { margin-top: .03in; margin-bottom: .06in; }
  .iv-g-text { font-size: 13.5px; margin-top: 3px; margin-bottom: 4px; }
  .paper .iv-note { font-size: 11px; margin-bottom: 2px; }
  .paper .iv-fine { font-size: 10px; margin-top: 2px; }
  .iv-sign { padding-top: .06in; }
  .iv-sign i.has-sig { height: 46px; } .iv-sign i.has-sig img { height: 42px; }
  .iv-thanks { font-size: 14px; margin: .05in 0 .07in; }
  .iv-thanks span br { display: none; }
  .iv-foot { padding: 7px .3in; }
  .iv-foot svg { width: 24px; height: 24px; }
  .iv-foot div { font-size: 12px; }
}
