:root {
    color-scheme: light;
    --ink: #1c2126;
    --muted: #5c6770;
    --header: #2a2e33;
    --header-2: #32373d;
    --red: #d01218;
    --red-dark: #b10e13;
    --section: #5c656e;
    --line: #d8dee4;
    --bg: #e6eaee;
    --card: #ffffff;
    --blue: #1d6fe8;
    --blue-dark: #165ecc;
    --green: #157a3a;
    --green-bg: #e5f6ec;
    --amber: #8a5a00;
    --amber-bg: #fff4d6;
    --danger: #b42318;
    --danger-bg: #fdecea;
    --shadow: 0 10px 30px rgba(22, 27, 32, 0.08);
  }
  * { box-sizing: border-box; }
  html, body { margin: 0; padding: 0; }
  body {
    min-height: 100vh;
    background: var(--bg);
    color: var(--ink);
    font: 14px/1.4 "Segoe UI", "Liberation Sans", "Helvetica Neue", Arial, sans-serif;
  }
  button, input, select, textarea { font: inherit; color: inherit; }
  button { cursor: pointer; }
  .hidden { display: none !important; }

  .preview-banner {
    background: #1c2126;
    color: #f4f1e6;
    text-align: center;
    font-size: 12.5px;
    letter-spacing: 0.01em;
    padding: 7px 12px;
  }
  .preview-banner strong { color: #ffd36a; font-weight: 700; }

  .loading, .fatal, .pin-gate {
    max-width: 1180px;
    margin: 18px auto;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 10px;
    box-shadow: var(--shadow);
  }
  .loading, .fatal { padding: 28px; }
  .fatal h2 { margin: 0 0 8px; }
  .pin-gate { padding: 0; overflow: hidden; }
  .pin-card { max-width: 420px; margin: 0 auto; padding: 36px 28px 42px; text-align: left; }
  .pin-card h2 { margin: 8px 0; font-size: 22px; }
  .pin-card p { margin: 0 0 14px; color: var(--muted); }
  .pin-card input { width: 180px; height: 40px; letter-spacing: 0.18em; font-size: 18px; }
  .pin-error { color: var(--danger); min-height: 1.2em; margin-top: 8px; }

  .sheet {
    position: relative;
    max-width: 1180px;
    margin: 16px auto 28px;
    background: var(--card);
    border: 1px solid #cfd6dd;
    border-radius: 10px;
    box-shadow: var(--shadow);
  }
  .sheet-header {
    display: flex;
    align-items: center;
    gap: 18px;
    background: linear-gradient(180deg, var(--header-2), var(--header));
    color: #fff;
    padding: 12px 16px;
    border-radius: 10px 10px 0 0;
  }
  .brand { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
  .brand h1 { margin: 0; font-size: 22px; line-height: 1.1; font-weight: 750; letter-spacing: -0.02em; }
  .brand p { margin: 3px 0 0; color: #c8cdd2; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .doc-toggle { display: flex; flex: none; border-radius: 6px; overflow: hidden; }
  .doc-toggle button {
    appearance: none;
    border: 0;
    background: #3c4248;
    color: #fff;
    font-weight: 750;
    font-size: 13px;
    letter-spacing: 0.05em;
    padding: 11px 16px;
  }
  .doc-toggle button[aria-pressed="true"] { background: var(--red); }
  .doc-toggle button:hover { filter: brightness(1.08); }
  .doc-id { text-align: right; min-width: 150px; flex: none; }
  .doc-id-num { font-size: 18px; font-weight: 750; letter-spacing: -0.01em; }
  .doc-id-num span { font-weight: 650; color: #d5d8dc; margin-right: 2px; }
  .doc-id-date { color: #c5c9ce; font-size: 13px; margin-top: 1px; }

  .search-row {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 10px 12px;
    border-bottom: 1px solid var(--line);
    background: #f7f8f9;
  }
  .search-wrap { position: relative; flex: 1; }
  .search-wrap input {
    width: 100%;
    height: 36px;
    border: 1px solid #cfd6dd;
    border-radius: 6px;
    padding: 0 12px 0 34px;
    background: #fff url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235c6770' stroke-width='2'><circle cx='11' cy='11' r='6.5'/><path d='M16 16l5 5'/></svg>") 10px 50% no-repeat;
  }
  .search-results {
    position: absolute;
    z-index: 30;
    left: 0; right: 0; top: calc(100% + 4px);
    background: #fff;
    border: 1px solid #d5dbe2;
    border-radius: 8px;
    box-shadow: 0 14px 36px rgba(20, 24, 28, 0.16);
    max-height: 360px;
    overflow: auto;
    padding: 4px;
  }
  .search-hit {
    display: block;
    width: 100%;
    text-align: left;
    border: 0;
    background: transparent;
    border-radius: 6px;
    padding: 8px 10px;
  }
  .search-hit:hover, .search-hit.is-active { background: #f3f6fb; }
  .hit-top, .hit-bot { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
  .hit-top strong { font-size: 14px; }
  .hit-mid { color: var(--muted); font-size: 13px; margin: 1px 0; }
  .hit-bot { color: #3d4750; font-size: 12.5px; }
  .badge { font-size: 11px; font-weight: 750; letter-spacing: 0.04em; text-transform: uppercase; border-radius: 999px; padding: 2px 7px; }
  .badge.estimate { background: #fde8ea; color: #9f1239; }
  .badge.work { background: #e7eefc; color: #1e3a8a; }
  .search-empty, .search-status { padding: 12px; color: var(--muted); }

  .banner { margin: 0; padding: 8px 14px; font-weight: 650; font-size: 13px; }
  .banner.warn { background: #fff6e8; color: #7a4b00; }
  .banner.bad { background: var(--danger-bg); color: var(--danger); }
  .banner.ok { background: var(--green-bg); color: var(--green); }

  .block-h {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--section);
    color: #fff;
    font-weight: 700;
    font-size: 13.5px;
    padding: 6px 12px;
  }
  .block-h svg { flex: none; }
  .grid { display: grid; gap: 10px 12px; padding: 10px 12px 12px; }
  .grid-customer { grid-template-columns: 1.4fr 0.8fr 1fr; }
  .grid-vehicle { grid-template-columns: 78px 1fr 1.1fr 1.25fr 0.9fr 0.75fr; }
  .field { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 700; color: #3e4851; }
  .field input, .field select, .field textarea, .lines input {
    width: 100%;
    border: 1px solid #cfd6dd;
    border-radius: 4px;
    background: #fff;
    font-weight: 450;
    color: var(--ink);
  }
  .field input, .field select { height: 34px; padding: 0 8px; }
  .field textarea, .wo-extra textarea { padding: 8px; resize: vertical; min-height: 58px; }
  .field input:focus, .field select:focus, .field textarea:focus, .lines input:focus, .search-wrap input:focus, .pin-card input:focus {
    outline: 2px solid var(--blue);
    border-color: var(--blue);
  }
  .field input.invalid, .field select.invalid, .field textarea.invalid { border-color: var(--danger); background: #fff8f7; }
  .bed-hint { margin: -4px 12px 10px; color: var(--amber); font-size: 12px; font-weight: 700; }

  .table-scroll { overflow-x: auto; }
  table.lines { width: 100%; border-collapse: collapse; min-width: 860px; }
  table.lines th {
    text-align: left;
    font-size: 12px;
    font-weight: 700;
    color: #5c6770;
    padding: 7px 8px 6px;
    border-bottom: 1px solid var(--line);
    background: #fbfcfd;
  }
  table.lines td { padding: 5px 6px; border-bottom: 1px solid #eef1f4; vertical-align: middle; }
  table.lines tr.is-asking td { background: #fff6d4; }
  table.lines input { height: 32px; padding: 0 8px; }
  table.lines td.num input { text-align: right; }
  .col-desc { width: 28%; }
  .col-part { width: 13%; }
  .col-qty { width: 72px; }
  .col-price, .col-total { width: 110px; }
  .col-stock { width: 128px; }
  .col-status { width: 108px; }
  .col-x { width: 36px; }
  .line-total { text-align: right; font-variant-numeric: tabular-nums; font-weight: 650; padding-right: 10px !important; white-space: nowrap; }
  .line-sub { display: block; margin-top: 3px; font-size: 11.5px; font-weight: 650; color: var(--amber); }
  .line-sub.bad { color: var(--danger); }
  .icon-btn {
    width: 28px; height: 28px; border-radius: 6px; border: 1px solid transparent;
    background: transparent; color: #7b868f; font-size: 18px; line-height: 1;
  }
  .icon-btn:hover { background: #f3f4f6; color: var(--danger); border-color: var(--line); }

  .pill, .stock-btn {
    display: inline-flex; align-items: center; gap: 4px; justify-content: center;
    min-width: 92px; border-radius: 999px; padding: 4px 8px; font-size: 12px; font-weight: 750;
    line-height: 1.2; white-space: nowrap;
  }
  .stock-btn {
    border: 1px solid #d5dbe2; background: #f3f5f7; color: #4d5862; border-radius: 7px; min-width: 102px;
  }
  .stock-btn:hover { background: #e7ebef; }
  .pill.in_stock, .pill.filled { background: var(--green-bg); color: var(--green); }
  .pill.low, .pill.pending { background: var(--amber-bg); color: var(--amber); }
  .pill.out, .pill.needs_more_info { background: var(--danger-bg); color: var(--danger); }
  .pill.special_order { background: #e8f1fd; color: #1857b5; }
  .tick { font-weight: 800; }

  .add-line {
    margin: 6px 12px 0;
    background: transparent;
    border: 0;
    color: var(--blue);
    font-weight: 750;
    padding: 4px 2px;
  }
  .add-line:hover { text-decoration: underline; }
  .notes-row, .wo-extra { padding: 8px 12px 0; }
  .notes-row textarea { width: 100%; }
  .wo-grid { display: grid; grid-template-columns: 1fr 220px; gap: 12px; margin-top: 8px; }
  .totals-row { display: flex; justify-content: flex-end; padding: 8px 12px 12px; }
  .totals { width: 300px; border: 1px solid #e1e6eb; border-radius: 8px; background: #fff; }
  .totals div { display: flex; justify-content: space-between; gap: 16px; padding: 7px 12px; font-variant-numeric: tabular-nums; }
  .totals .grand { border-top: 1px solid #e1e6eb; font-size: 16px; font-weight: 800; }
  .unpriced { margin: 6px 12px 0; text-align: right; color: var(--amber); font-size: 12px; font-weight: 700; }

  .sheet-footer {
    display: flex; justify-content: space-between; align-items: center; gap: 12px;
    padding: 10px 12px 12px; border-top: 1px solid #e6ebf0;
  }
  .footer-actions { display: flex; gap: 8px; flex-wrap: wrap; }
  .btn {
    display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px;
    border-radius: 8px; border: 1px solid #cfd6dd; background: #fff; font-weight: 750;
  }
  .btn:hover { background: #f6f8fa; }
  .btn:disabled { opacity: 0.6; cursor: default; }
  .btn-primary { background: var(--blue); border-color: var(--blue); color: #fff; }
  .btn-primary:hover { background: var(--blue-dark); }
  .btn-quiet { background: #fff; }
  .lookup-chip {
    display: inline-flex; align-items: center; gap: 8px;
    background: #f4f7fb; border: 1px solid #d5deea; color: #3d4c5f;
    border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 650;
  }
  .lookup-chip.is-ok { background: var(--green-bg); border-color: #b7e4c7; color: var(--green); }
  .lookup-chip.is-warn { background: var(--amber-bg); border-color: #f0ddaa; color: var(--amber); }
  .spinner {
    width: 14px; height: 14px; border-radius: 50%;
    border: 2px solid #c5d0de; border-top-color: var(--blue);
    animation: spin 0.7s linear infinite;
  }
  @keyframes spin { to { transform: rotate(360deg); } }

  .send-dialog {
    position: fixed; inset: 0; z-index: 80;
    background: rgba(20, 24, 28, 0.46);
    display: flex; align-items: center; justify-content: center; padding: 24px;
  }
  .send-dialog-card {
    width: min(560px, 100%);
    background: #fff; border-radius: 12px;
    box-shadow: 0 18px 50px rgba(20, 24, 28, 0.28);
    padding: 18px 20px 16px;
  }
  .send-dialog-card h2 { margin: 0 0 10px; font-size: 20px; }
  .send-kicker { margin: 8px 0 2px; font-size: 11px; font-weight: 750; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
  .send-to, .send-subject { margin: 0; font-weight: 700; }
  .send-preview {
    white-space: pre-wrap; background: #f6f8fa; border: 1px solid var(--line);
    border-radius: 8px; padding: 12px; max-height: 260px; overflow: auto;
    font: 13px/1.45 "Segoe UI", "Liberation Sans", Arial, sans-serif; margin: 6px 0 8px;
  }
  .send-note, .send-already { margin: 0 0 8px; color: #3e4851; font-size: 13px; }
  .send-already { background: #fff6e8; color: #7a4b00; border-radius: 6px; padding: 8px 10px; font-weight: 650; }
  .send-dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
  .view-toggle { display: flex; border: 1px solid #cfd6dd; border-radius: 8px; overflow: hidden; background: #fff; }
  .view-toggle button { border: 0; background: #fff; padding: 8px 12px; font-weight: 750; }
  .view-toggle button[aria-pressed="true"] { background: #1c2126; color: #fff; }
  .grid-vin { grid-template-columns: 1.1fr 0.8fr 1fr 0.9fr 1fr; padding-top: 0; }
  .line-toggle { margin-left: auto; background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.45); border-radius: 6px; padding: 4px 8px; font-size: 12px; font-weight: 700; }
  .pickup-switch { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-weight: 750; }
  .install-slot { display: contents; }
  .install-slot.hidden { display: none !important; }
  .recv-ind { display: inline-block; margin-top: 4px; font-size: 11px; font-weight: 750; color: #8a5a00; background: #fff4d6; border-radius: 999px; padding: 2px 7px; }
  .recv-ind.is-in { color: #157a3a; background: #e5f6ec; }
  table.lines.is-checklist .col-price,
  table.lines.is-checklist .col-total,
  table.lines.is-checklist .price-cell,
  table.lines.is-checklist .line-total { display: none; }
  .pickup-badge { display: inline-block; margin-left: 6px; background: #1d6fe8; color: #fff; border-radius: 999px; padding: 1px 6px; font-size: 10px; letter-spacing: 0.06em; font-style: normal; }
  .part-track { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 6px; font-size: 12px; font-weight: 650; color: #3e4851; }
  .part-track label { display: inline-flex; align-items: center; gap: 6px; }
  .part-track span { color: var(--muted); font-weight: 600; }
  .ready-banner {
    display: flex; justify-content: space-between; align-items: center; gap: 12px;
    margin: 8px 12px 0; padding: 10px 12px; border-radius: 8px; background: #e5f6ec; color: #0f6b32;
  }
  .order-status { margin-top: 4px; font-size: 12px; font-weight: 750; color: #d7f5e3; }
  .photo-section { border-top: 1px solid var(--line); }
  .photo-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; padding: 12px; }
  .photo-card { margin: 0; cursor: pointer; }
  .photo-card img, .phone-queue img { width: 100%; height: 110px; object-fit: cover; border-radius: 8px; background: #e6eaee; display: block; }
  .photo-card figcaption { font-size: 12px; color: #3e4851; margin-top: 4px; }
  .photo-lightbox-card img { width: 100%; max-height: 70vh; object-fit: contain; background: #111; border-radius: 8px; }
  .board { padding: 12px; }
  .board-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; color: var(--muted); font-size: 13px; }
  .board-cols { display: grid; grid-template-columns: repeat(5, minmax(200px, 1fr)); gap: 10px; }
  .board-col { background: #f4f6f8; border-radius: 10px; padding: 8px; min-height: 240px; }
  .board-col h2 { margin: 4px 6px 8px; font-size: 13px; letter-spacing: 0.04em; text-transform: uppercase; color: #3e4851; }
  .board-card { display: block; width: 100%; text-align: left; background: #fff; border: 1px solid #e1e6eb; border-radius: 8px; padding: 10px; margin-bottom: 8px; }
  .board-card strong { display: block; }
  .board-card span, .board-card em { display: block; font-style: normal; color: #3e4851; font-size: 13px; }
  .board-card { cursor: pointer; font: inherit; color: inherit; }
  .follow-draft { display: block; width: 100%; margin-top: 8px; }
  .follow-status { display: block; margin-top: 4px; font-style: normal; font-weight: 750; color: #1d4e89; }
  .inactive-banner { background: #f4f1ea; color: #3e4851; }
  .board-card.is-old { border-color: #e3b15a; background: #fff8ea; }
  .board-card.is-past, .board-card.is-wait-late { border-color: #d64545; background: #fde8e8; }
  .board-card.is-wait-warn { border-color: #e3b15a; background: #fff6d8; }
  .board-card .alert { margin-top: 4px; font-weight: 750; color: #9b1c1c; }
  .board-card.is-wait-warn .alert { color: #8a5a00; }
  .board-card .age { color: var(--muted); font-size: 12px; }
  body.is-phone .sheet { display: none !important; }
  body.is-phone .phone-app { display: block; }
  .phone-app { display: none; max-width: 520px; margin: 0 auto 24px; }
  .phone-bar { display: flex; align-items: center; gap: 10px; background: #2a2e33; color: #fff; padding: 14px 12px; border-radius: 0 0 12px 12px; }
  .phone-bar strong, .phone-bar span { display: block; }
  .phone-bar span { color: #c5c9ce; font-size: 13px; }
  .phone-back { background: transparent; color: #fff; border: 0; font-weight: 750; padding: 6px; }
  .phone-date { margin: 12px 12px 0; color: var(--muted); font-weight: 700; }
  .phone-list { display: flex; flex-direction: column; gap: 8px; padding: 12px; }
  .phone-card { text-align: left; background: #fff; border: 1px solid #d5dbe2; border-radius: 12px; padding: 12px; }
  .phone-card strong, .phone-card span, .phone-card em { display: block; font-style: normal; }
  .phone-card span { color: #3e4851; }
  .phone-card em { color: var(--muted); font-size: 12px; margin-top: 4px; }
  .phone-actions { display: flex; flex-direction: column; gap: 8px; padding: 0 12px 12px; }
  .phone-wide { width: 100%; justify-content: center; min-height: 46px; }
  .phone-lead, .phone-status, .phone-empty { margin: 8px 12px; color: #3e4851; }
  .phone-app .field { margin: 0 12px 8px; }
  .vin-reader { min-height: 180px; margin: 8px 12px; background: #1c2126; border-radius: 12px; overflow: hidden; }
  .vin-result { margin: 8px 12px 16px; background: #fff; border: 1px solid #d5dbe2; border-radius: 12px; padding: 12px; }
  .vin-result h2 { margin: 0 0 8px; font-size: 16px; letter-spacing: 0.04em; }
  .vin-result p { margin: 0 0 4px; }
  .vin-result span { color: var(--muted); display: inline-block; width: 72px; }
  .phone-check { display: flex; gap: 8px; align-items: center; margin: 10px 0; font-weight: 650; }
  .phone-file { position: relative; overflow: hidden; }
  .phone-file input { position: absolute; inset: 0; opacity: 0; }
  .phone-queue { display: flex; gap: 8px; padding: 0 12px 8px; }
  .phone-queue img { width: 72px; height: 72px; }
  @media (max-width: 1100px) { .board-cols { grid-template-columns: 1fr 1fr; } .grid-vin { grid-template-columns: 1fr 1fr; } }
  .q-card {
    position: absolute;
    width: 232px;
    background: #fff;
    border: 1px solid #d5dbe3;
    border-radius: 10px;
    box-shadow: 0 16px 40px rgba(20, 24, 28, 0.2);
    padding: 12px;
    z-index: 40;
  }
  .q-card h3 {
    margin: 0 0 4px; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted);
  }
  .q-card p { margin: 0 0 8px; font-size: 15px; font-weight: 750; line-height: 1.3; }
  .q-card button {
    display: block; width: 100%; margin-top: 6px; text-align: left;
    background: #fff; border: 1px solid #cfd6dd; border-radius: 6px; padding: 8px 10px; font-weight: 750;
  }
  .q-card button:hover, .q-card button:focus { background: var(--blue); color: #fff; border-color: var(--blue); outline: none; }
  .q-hint { display: block; margin-top: 8px; color: var(--muted); font-size: 11px; }

  .print-only { display: none; }
  .doc { color: #1c2126; font-family: "Segoe UI", "Liberation Sans", "Helvetica Neue", Arial, sans-serif; }
  .doc-head { display: flex; justify-content: space-between; gap: 24px; border-bottom: 3px solid var(--red); padding-bottom: 10px; }
  .doc-shop { font-size: 20px; font-weight: 800; letter-spacing: -0.02em; }
  .doc-addr { color: #333; font-size: 12px; margin-top: 2px; }
  .doc-kind { text-align: right; font-size: 13px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--red); }
  .doc-num { text-align: right; font-size: 20px; font-weight: 800; margin-top: 2px; }
  .doc-date, .doc-valid { text-align: right; font-size: 12px; margin-top: 2px; }
  .doc-valid { font-weight: 800; }
  .doc-parties { display: flex; gap: 28px; margin: 14px 0 12px; }
  .doc-parties > div { flex: 1; }
  .doc-parties h2 { margin: 0 0 4px; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: #5c6770; }
  .doc-parties p { margin: 0; }
  .doc table { width: 100%; border-collapse: collapse; }
  .doc th { text-align: left; font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase; border-bottom: 1.5px solid #1c2126; padding: 6px 4px; }
  .doc td { border-bottom: 1px solid #e1e5ea; padding: 7px 4px; vertical-align: top; }
  .doc td.num, .doc th.num { text-align: right; white-space: nowrap; }
  .doc-totals { width: 240px; margin: 8px 0 0 auto; }
  .doc-totals div { display: flex; justify-content: space-between; padding: 3px 0; }
  .doc-totals .grand { border-top: 1.5px solid #1c2126; margin-top: 4px; padding-top: 6px; font-size: 16px; font-weight: 800; }
  .doc-note { margin: 12px 0 0; }
  .doc-note h2 { margin: 0 0 4px; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; }
  .doc-foot { margin-top: 18px; border-top: 1px solid #1c2126; padding-top: 8px; font-size: 11px; color: #333; }
  .doc-foot p { margin: 0 0 4px; }
  .wo-box {
    min-height: 2.15in;
    border: 1px solid #1c2126;
    margin-top: 6px;
    padding: 8px 10px;
    line-height: 28px;
    background-image: repeating-linear-gradient(to bottom, transparent, transparent 27px, #e3e3e3 28px);
    white-space: pre-wrap;
  }
  .signoff { margin-top: 16px; }
  .sign-row { display: flex; gap: 18px; align-items: flex-end; margin: 10px 0; }
  .sign-row span { font-size: 12px; white-space: nowrap; }
  .sign-line { flex: 1; border-bottom: 1px solid #1c2126; min-height: 22px; }
  .sign-line.short { flex: 0.6; }

  @media print {
    html, body { min-height: 0 !important; height: auto !important; background: #fff !important; }
    .screen-only { display: none !important; }
    .print-only { display: block !important; }
    .doc { width: 100%; }
    * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  }
  @page { size: letter; margin: 0.5in; }

  @media (max-width: 1100px) {
    .grid-vehicle { grid-template-columns: repeat(3, 1fr); }
    .brand p { white-space: normal; }
  }
  @media (max-width: 800px) {
    .sheet { margin: 0; border-radius: 0; }
    .sheet-header { flex-wrap: wrap; border-radius: 0; }
    .doc-id { margin-left: auto; }
    .grid-customer, .grid-vehicle, .wo-grid { grid-template-columns: 1fr; }
    .sheet-footer { flex-direction: column; align-items: stretch; }
    .totals { width: 100%; }
  }
