/* Cars Excel — calm and plain: warm stone background, white panels, charcoal text, deep green accent. Phone first. */
:root {
  --bg: #f3f2ee; --surface: #ffffff; --surface-2: #f8f7f4; --ink: #1d2125; --ink-2: #464d55; --muted: #7b828a; --line: #e3e1dc; --line-2: #d3d0c9;
  --accent: #1f4f46; --accent-2: #2b6a5e; --accent-soft: #e7efec;
  --warn-bg: #fbf4e2; --warn-ink: #7a5300; --bad: #a3392e; --bad-bg: #f9e9e6; --ok-bg: #e6f2ea; --ok-ink: #24613a;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; font: 15px/1.5 "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", sans-serif; background: var(--bg); color: var(--ink); min-height: 100vh; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); }
h1 { font-size: 1.55rem; font-weight: 600; letter-spacing: -.01em; margin: 0 0 .2rem; }
h2 { font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-2); margin: 0; }
h2.sub { margin: 22px 0 8px; } h2.inline { display: inline; }
.muted { color: var(--muted); } .small { font-size: .84rem; } .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; } .inline { display: inline; }
.stack > * + * { margin-top: 14px; }
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; align-items: end; }
label { display: block; font-weight: 500; font-size: .86rem; color: var(--ink-2); }
label .hint { font-weight: 400; color: var(--muted); font-size: .8rem; margin-left: 4px; }
input, select, textarea { display: block; width: 100%; margin-top: 5px; padding: 9px 11px; border-radius: 6px; border: 1px solid var(--line-2); font: inherit; background: #fff; color: var(--ink); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(31, 79, 70, .14); }
input[type=checkbox] { width: 18px; height: 18px; display: inline-block; margin: 0; accent-color: var(--accent); }
textarea { resize: vertical; }

.btn { display: inline-block; padding: 9px 16px; border-radius: 6px; border: 1px solid var(--line-2); font: inherit; font-weight: 600; font-size: .92rem; cursor: pointer; text-decoration: none; background: var(--surface); color: var(--ink); text-align: center; }
.btn:hover { border-color: var(--ink-2); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; } .btn-primary:hover { background: var(--accent-2); border-color: var(--accent-2); }
.btn-secondary { background: var(--surface); border-color: var(--accent); color: var(--accent); }
.btn-ghost { background: transparent; } .btn-danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn-lg { padding: 12px 20px; font-size: 1rem; } .btn-sm { padding: 5px 10px; font-size: .82rem; }
button.link { background: none; border: 0; color: var(--accent); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; font: inherit; padding: 0; } .danger, button.link.danger { color: var(--bad) !important; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 16px; }

.flash { padding: 11px 14px; border-radius: 6px; margin: 0 0 16px; border: 1px solid; font-size: .92rem; }
.flash-success { background: var(--ok-bg); color: var(--ok-ink); border-color: #bfdcc9; } .flash-error { background: var(--bad-bg); color: #7c241b; border-color: #ecc4bd; }
.flash-info { background: #eef2f6; color: #2d4459; border-color: #cfdae4; }
.warn { color: var(--warn-ink); font-size: .82rem; margin-top: 4px; }
.flag { display: inline-block; background: var(--warn-bg); color: var(--warn-ink); border: 1px solid #ecdcae; border-radius: 4px; padding: 1px 7px; font-size: .78rem; font-weight: 600; white-space: nowrap; }

.pill { display: inline-block; padding: 2px 9px; border-radius: 4px; font-size: .76rem; font-weight: 600; letter-spacing: .02em; white-space: nowrap; vertical-align: middle; }
.pill-in_stock { background: #eceae5; color: #4a4f55; } .pill-awaiting_prep { background: #f3ece2; color: #7a5a2e; } .pill-in_prep { background: var(--warn-bg); color: var(--warn-ink); }
.pill-advertised { background: #e8eef6; color: #2a4c73; } .pill-reserved { background: #efe9f4; color: #5a3d78; } .pill-sold { background: var(--ok-bg); color: var(--ok-ink); }
.pill-wait { background: #eef2f6; color: #2d4459; }
.pill-mail-sent { background: var(--ok-bg); color: var(--ok-ink); } .pill-mail-failed { background: var(--bad-bg); color: var(--bad); } .pill-mail-practice { background: #eceae5; color: #4a4f55; }

/* number plate — understated */
.reg { display: inline-block; background: #fff; color: var(--ink); border: 1.5px solid var(--ink); font-weight: 700; padding: 0 7px; border-radius: 3px; letter-spacing: .06em; font-family: Consolas, ui-monospace, monospace; font-size: .9rem; white-space: nowrap; text-decoration: none; }
.reg.big { font-size: 1.15rem; padding: 2px 10px; }
.reg-in { text-transform: uppercase; font-weight: 600; letter-spacing: .05em; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); background: var(--surface-2); }
th.num { text-align: right; }
table.edit td { padding: 6px 4px; } table.edit input, table.edit select { margin: 0; padding: 6px 8px; min-width: 70px; font-size: .9rem; }
table.edit tr.doubt td { background: #fdf8ea; }

/* header */
.top { display: flex; flex-wrap: wrap; gap: 10px 24px; align-items: center; justify-content: space-between; padding: 14px 24px; background: var(--ink); color: #f2f1ed; }
.brand { color: #fff; text-decoration: none; font-weight: 600; font-size: 1.05rem; letter-spacing: .01em; display: flex; align-items: baseline; gap: 12px; }
.brand-sub { font-weight: 400; font-size: .8rem; color: #a7acb1; }
.top nav { display: flex; flex-wrap: wrap; gap: 22px; align-items: center; font-size: .9rem; }
.top nav a, .top nav button.link { color: #d9dbdd; text-decoration: none; } .top nav a:hover, .top nav button.link:hover { color: #fff; }
main { max-width: 1180px; margin: 0 auto; padding: 28px 24px 70px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 20px; margin: 0 0 18px; }
.card-head { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: baseline; justify-content: space-between; margin-bottom: 14px; }
.narrow { max-width: 400px; margin: 60px auto; } .narrowish { max-width: 520px; }
.pagehead { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; justify-content: space-between; margin-bottom: 20px; }
.crumbs { color: var(--muted); font-size: .85rem; margin-bottom: 10px; } .crumbs a { color: var(--muted); text-decoration: none; } .crumbs a:hover { color: var(--accent); }

/* stock list */
.search { display: flex; gap: 8px; margin-bottom: 14px; max-width: 560px; } .search input { margin: 0; } .search .btn { flex: 0 0 auto; }
.tabs { display: flex; overflow-x: auto; border-bottom: 1px solid var(--line-2); margin-bottom: 18px; }
.tabs a { flex: 0 0 auto; text-decoration: none; padding: 9px 14px; font-size: .88rem; color: var(--ink-2); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a:hover { color: var(--ink); } .tabs a.on { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }
table.stock { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; border-collapse: separate; border-spacing: 0; overflow: hidden; }
table.stock tbody tr { cursor: pointer; } table.stock tbody tr:hover td { background: #faf9f6; }
table.stock tbody tr:last-child td { border-bottom: 0; }
table.stock td { vertical-align: middle; }
.car-name { color: var(--ink); font-weight: 600; text-decoration: none; }

/* car folder */
.car-head h1 { margin-top: 10px; }
.status-bar { display: flex; flex-wrap: wrap; margin-bottom: 20px; border: 1px solid var(--line-2); border-radius: 6px; overflow: hidden; background: var(--surface); width: fit-content; max-width: 100%; }
.status-bar button { flex: 1 1 auto; padding: 9px 16px; border: 0; border-right: 1px solid var(--line-2); background: transparent; color: var(--ink-2); font: inherit; font-size: .88rem; font-weight: 500; cursor: pointer; }
.status-bar button:last-child { border-right: 0; } .status-bar button:hover { background: var(--surface-2); }
.status-bar button.on { background: var(--accent); color: #fff; }
.upload { border-left: 3px solid var(--accent); }
.upload-btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; align-items: center; } .upload-btns .btn { flex: 1 1 220px; } .upload-btns select { flex: 0 1 200px; margin: 0; }
.upload details { margin-top: 14px; } .upload summary { cursor: pointer; color: var(--ink-2); font-size: .86rem; }
.upload p { margin: 6px 0 0; }
.progress { margin-top: 14px; font-size: .88rem; border-top: 1px solid var(--line); padding-top: 10px; } .progress > div { padding: 3px 0; }
.check { border-left: 3px solid #c89a2a; }
.docs { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
.doc { border: 1px solid var(--line); border-radius: 6px; padding: 8px; background: var(--surface-2); }
.doc img, .pdf-icon { display: block; width: 100%; height: 150px; object-fit: cover; border-radius: 4px; background: #fff; border: 1px solid var(--line); }
.pdf-icon { display: flex; align-items: center; justify-content: center; color: var(--muted); font-weight: 600; letter-spacing: .1em; }
.kind-form select { margin-top: 8px; padding: 6px 8px; font-size: .86rem; }
.doc-actions { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 6px; font-size: .82rem; }
.doc-link { font-size: .78rem; margin-left: 6px; color: var(--muted); }
.row-menu summary { list-style: none; cursor: pointer; color: var(--accent); text-decoration: underline; text-underline-offset: 2px; } .row-menu summary::-webkit-details-marker { display: none; }
.row-menu .menu { background: var(--surface); border: 1px solid var(--line-2); border-radius: 6px; padding: 12px; width: min(300px, 80vw); text-align: left; margin-top: 6px; box-shadow: 0 6px 20px rgba(0,0,0,.08); }
.row-menu .menu form + form { margin-top: 8px; }
.add-hist { margin-top: 16px; } .add-hist summary { list-style: none; } .add-hist summary::-webkit-details-marker { display: none; } .add-hist form { margin-top: 14px; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px 20px; }
.facts .l { display: block; font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 2px; }
.notes { margin: 16px 0 0; padding: 12px 14px; background: var(--surface-2); border-radius: 6px; border: 1px solid var(--line); }
.audit td { font-size: .85rem; } details > summary { cursor: pointer; }
pre.mail { white-space: pre-wrap; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink); padding: 14px; border-radius: 6px; font: .9rem/1.5 "Segoe UI", system-ui, sans-serif; }

table.stock td:nth-child(2) { min-width: 190px; }
@media (min-width: 701px) and (max-width: 1000px) {
  table.stock:not(.orders-table) th:nth-child(4), table.stock:not(.orders-table) td:nth-child(4), table.stock:not(.orders-table) th:nth-child(8), table.stock:not(.orders-table) td:nth-child(8), table.stock:not(.orders-table) th:nth-child(9), table.stock:not(.orders-table) td:nth-child(9) { display: none; }
  .orders-table th:nth-child(5), .orders-table td:nth-child(5), .orders-table th:nth-child(7), .orders-table td:nth-child(7) { display: none; }
}
@media (max-width: 700px) {
  .top { padding: 12px 16px; } .brand-sub { display: none; } .top nav { gap: 16px; font-size: .88rem; }
  main { padding: 18px 14px 60px; }
  .card { padding: 16px; }
  .status-bar { width: 100%; } .status-bar button { flex: 1 1 33%; padding: 10px 6px; font-size: .84rem; border-bottom: 1px solid var(--line-2); }
  /* the stock table becomes one block per car */
  table.stock, table.stock tbody, table.stock td { display: block; width: 100%; }
  table.stock thead { display: none; }
  table.stock { border: 0; background: transparent; overflow: visible; }
  table.stock tr { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; margin-bottom: 10px; display: grid; grid-template-columns: 1fr 1fr; gap: 2px 12px; }
  table.stock td { border: 0; padding: 3px 0; text-align: left; }
  table.stock td[data-l="Reg"] { order: -3; } table.stock td[data-l="Status"] { order: -2; text-align: right; }
  table.stock td[data-l="Vehicle"] { grid-column: 1 / -1; order: -1; padding-bottom: 6px; }
  table.stock td[data-l]:not([data-l=""]):not([data-l="Reg"]):not([data-l="Vehicle"]):not([data-l="Status"])::before { content: attr(data-l) " "; color: var(--muted); font-size: .78rem; margin-right: 4px; }
  table.stock td[data-l=""]:empty { display: none; }
}

/* money */
.money-top { display: flex; flex-wrap: wrap; gap: 14px 32px; align-items: flex-end; padding-bottom: 16px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.money-top .l, .tile .l { display: block; font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 500; margin-bottom: 2px; }
.headline { font-size: 1.7rem; font-weight: 600; color: var(--ok-ink); font-variant-numeric: tabular-nums; } .headline.loss { color: var(--bad); } .headline.muted { color: var(--muted); font-size: 1rem; font-weight: 400; }
.kv { font-size: 1.05rem; font-weight: 600; font-variant-numeric: tabular-nums; }
table.sums { width: auto; min-width: min(460px, 100%); margin-bottom: 6px; } table.sums td { padding: 6px 12px 6px 0; border-bottom: 1px solid var(--line); } table.sums td.num { padding-left: 24px; }
tr.sub td { font-weight: 600; } tr.total td { font-weight: 700; border-top: 2px solid var(--ink); border-bottom: 0; } tr.total.loss td.num, td.neg { color: var(--bad); }
label.check { display: flex; gap: 8px; align-items: center; font-weight: 400; color: var(--ink); align-self: center; } label.check input { flex: 0 0 auto; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 18px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; font-size: 1.35rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.tile.good { color: var(--ok-ink); } .tile.loss { color: var(--bad); }
.small-tiles .tile { font-size: 1.1rem; background: var(--surface-2); }
.two { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 0 18px; }
.month-nav { display: flex; gap: 12px; align-items: center; } .month-nav strong { min-width: 130px; text-align: center; }
table.acc tbody tr[data-href] { cursor: pointer; } table.acc tbody tr[data-href]:hover td { background: #faf9f6; } table.acc tr.on td { background: var(--accent-soft); }

/* invoices */
.count { display: inline-block; background: #c89a2a; color: #1d2125; border-radius: 3px; padding: 0 6px; font-size: .75rem; font-weight: 700; margin-left: 4px; }
.inv-row { display: grid; grid-template-columns: 120px 1fr; gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); }
.inv-row:first-of-type { border-top: 0; padding-top: 0; }
.inv-thumb img, .inv-thumb .pdf-icon { display: flex; width: 120px; height: 150px; object-fit: cover; border: 1px solid var(--line); border-radius: 4px; background: #fff; }
.inv-body .warn { margin: 0 0 10px; font-weight: 600; }
.inv-on-car { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; margin-bottom: 12px; } .inv-on-car .upload-btns { margin-top: 0; }
.upload-inv .upload-btns { margin-top: 10px; }
ul.plain { margin: 8px 0 0; padding-left: 18px; }
@media (max-width: 700px) { .inv-row { grid-template-columns: 1fr; } .inv-thumb img { width: 100%; height: 180px; } }

/* orders */
.pill-order-open { background: #e8eef6; color: #2a4c73; } .pill-order-completed { background: var(--ok-bg); color: var(--ok-ink); } .pill-order-cancelled { background: #eceae5; color: #6b7178; }
.balance-line { display: flex; justify-content: space-between; align-items: baseline; border-top: 1px solid var(--line); padding-top: 12px; }
.balance-line .l { font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); } .balance-line strong { font-size: 1.4rem; font-variant-numeric: tabular-nums; }
ul.jobs { list-style: none; margin: 0; padding: 0; } ul.jobs li { display: flex; gap: 12px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
ul.jobs li.done .job-text { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--line-2); }
.tick { min-width: 64px; padding: 4px 8px; border-radius: 4px; border: 1px solid var(--line-2); background: var(--surface); font: inherit; font-size: .78rem; font-weight: 600; cursor: pointer; color: var(--ink-2); text-align: center; }
li.done .tick { background: var(--ok-bg); border-color: #bfdcc9; color: var(--ok-ink); }
.job-text { flex: 1; }
.inline-add { display: flex; gap: 8px; margin-top: 12px; align-items: center; flex-wrap: wrap; } .inline-add input { margin: 0; flex: 1 1 240px; }
.locked { background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: 12px 14px; } .locked > span { display: block; margin-top: 4px; } .locked details { margin-top: 10px; }
.complete { border-left: 3px solid var(--accent); }

/* website photos */
.web-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-top: 12px; }
.wp { border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: var(--surface-2); } .wp.main { border: 2px solid var(--accent); }
.wp img { width: 100%; height: 110px; object-fit: cover; display: block; }
.wp-bar { display: flex; justify-content: space-between; align-items: center; padding: 4px 8px; } .wp-move { display: flex; gap: 10px; } .wp-move button { text-decoration: none; font-size: 1.1rem; }
.enq-card.is-done { opacity: .65; }

/* stock board */
.board-help { margin: -8px 0 14px; }
.board { display: grid; grid-template-columns: repeat(6, minmax(165px, 1fr)); gap: 12px; align-items: start; overflow-x: auto; padding-bottom: 12px; }
.kcol { background: #e9e7e1; border-radius: 8px; padding: 10px; min-height: 260px; transition: background .15s, box-shadow .15s; }
.kcol.over { background: var(--accent-soft); box-shadow: inset 0 0 0 2px var(--accent); }
.kcol-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; padding: 2px 4px 10px; }
.kcol-head h2 { color: var(--ink); } .kcol-head .muted { display: block; margin-top: 2px; font-size: .74rem; }
.kcol-n { text-align: right; } .kcol-n strong { display: block; font-size: 1.15rem; } .kcol-n span { font-size: .72rem; }
.kcol-cards { display: flex; flex-direction: column; gap: 8px; min-height: 60px; }
.kempty { color: var(--muted); font-size: .82rem; text-align: center; padding: 18px 0; margin: 0; border: 1px dashed var(--line-2); border-radius: 6px; }
.kcard { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; cursor: grab; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.kcard:hover { border-color: var(--line-2); box-shadow: 0 3px 10px rgba(0,0,0,.07); }
.kcard.dragging { opacity: .45; } .kcard.moving { opacity: .7; }
.kc-link { display: block; color: inherit; text-decoration: none; }
.kc-img { display: block; width: 100%; height: 110px; object-fit: cover; background: #f1efea; }
.kc-noimg { display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: .78rem; }
.kc-body { padding: 8px 10px 6px; }
.kc-top { display: flex; justify-content: space-between; align-items: center; gap: 6px; } .kc-top .reg { font-size: .78rem; }
.kc-days { font-size: .74rem; color: var(--muted); font-variant-numeric: tabular-nums; } .kc-days.old { color: var(--bad); font-weight: 600; }
.kc-title { font-weight: 600; font-size: .9rem; margin-top: 6px; line-height: 1.3; } .kc-price { font-size: .88rem; color: var(--ink-2); margin-top: 2px; font-variant-numeric: tabular-nums; }
.kc-flags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; } .kc-flags .flag { font-size: .7rem; padding: 0 5px; }
.tag { display: inline-block; background: #e8eef6; color: #2a4c73; border-radius: 4px; padding: 0 6px; font-size: .7rem; font-weight: 600; }
.kc-move { display: flex; align-items: center; gap: 6px; padding: 0 10px 8px; font-size: .74rem; color: var(--muted); font-weight: 400; }
.kc-move select { margin: 0; padding: 3px 6px; font-size: .78rem; }
.toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 11px 18px; border-radius: 6px; font-size: .9rem; box-shadow: 0 8px 24px rgba(0,0,0,.25); z-index: 50; max-width: min(560px, 92vw); }
.toast.bad { background: var(--bad); }
@media (hover: hover) and (pointer: fine) { .kc-move { display: none; } .kcard:hover .kc-move { display: flex; } }
/* every column fits across the screen (no hidden columns to drag to); cards get more compact as it narrows */
@media (min-width: 701px) { .board:not(.jboard) { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; overflow-x: visible; } }
@media (min-width: 701px) and (max-width: 1100px) {
  .board:not(.jboard) .kcol { padding: 6px; } .board:not(.jboard) .kc-img { height: 70px; }
  .board:not(.jboard) .kcol-head { flex-direction: column; gap: 2px; } .board:not(.jboard) .kcol-head .muted { display: none; } .board:not(.jboard) .kcol-n { text-align: left; }
  .board:not(.jboard) .kc-title { font-size: .8rem; } .board:not(.jboard) .kc-price, .board:not(.jboard) .kc-top .reg { font-size: .72rem; } .board:not(.jboard) .kc-days { display: none; }
  .board:not(.jboard) .kcol-head h2 { font-size: .68rem; letter-spacing: .04em; }
}
@media (max-width: 700px) { .board { grid-template-columns: repeat(6, 84vw); scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; } .kcol { scroll-snap-align: start; } .kc-img { height: 150px; } }

.tag-job { background: var(--warn-bg); color: var(--warn-ink); }

/* jobs */
.count-soft { background: #d9d6cf; color: var(--ink); }
.jboard { grid-template-columns: repeat(3, minmax(260px, 1fr)); }
.jcard { cursor: grab; }
.jc-car { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-bottom: 1px solid var(--line); text-decoration: none; color: inherit; background: var(--surface-2); flex-wrap: wrap; }
.jc-car img { width: 44px; height: 33px; object-fit: cover; border-radius: 3px; } .jc-car .reg { font-size: .76rem; }
.jc-text { font-weight: 600; font-size: .95rem; margin-bottom: 2px; }
.jcard .kc-move { justify-content: space-between; }
.flag-bad { background: var(--bad-bg); color: var(--bad); border-color: #ecc4bd; }
.job-form { margin-top: 12px; }
.tick-doing { background: #e8eef6; border-color: #cfdae4; color: #2a4c73; }
@media (min-width: 701px) { .jboard { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 700px) { .jboard { grid-template-columns: repeat(3, 84vw); } }

/* cards: the whole card is what you grab */
.kcard { cursor: grab; user-select: none; -webkit-user-select: none; } .kcard:active { cursor: grabbing; }
.kcard img, .kcard a { -webkit-user-drag: none; }
.kc-title { display: block; color: var(--ink); text-decoration: none; } .kc-title:hover { text-decoration: underline; }

/* columns run the full height of the board, so every column is a big target */
.board { align-items: stretch; }

/* digital order form (customer's view) */
body.cust { background: #f3f2ee; }
.cust-head { background: var(--surface); border-bottom: 1px solid var(--line); padding: 14px 20px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; align-items: baseline; }
.cust-brand { font-weight: 700; font-size: 1.15rem; letter-spacing: .02em; }
.cust-main { max-width: 760px; margin: 0 auto; padding: 18px 14px 60px; }
.odoc { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 24px; margin-bottom: 16px; }
.odoc h1 { font-size: 1.4rem; } .odoc h2 { margin: 22px 0 8px; } .odoc p { margin: 0 0 8px; }
.odoc-head { display: flex; justify-content: space-between; gap: 12px; border-bottom: 2px solid var(--ink); padding-bottom: 12px; }
.odoc-ref { text-align: right; } .odoc-ref strong { font-size: 1.1rem; }
.odoc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.odoc-sums { width: 100%; } .odoc-terms { font-size: .86rem; color: var(--ink-2); background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: 12px; max-height: 260px; overflow: auto; }
.sign-box { background: var(--surface); border: 2px solid var(--accent); border-radius: 10px; padding: 24px; display: grid; gap: 16px; }
.sign-box h2 { margin: 0; } .sig-label { display: block; font-weight: 500; font-size: .86rem; color: var(--ink-2); margin-bottom: 6px; }
.sig-pad { display: block; width: 100%; height: 190px; background: #fff; border: 2px dashed var(--line-2); border-radius: 10px; touch-action: none; cursor: crosshair; }
.sign-btn { width: 100%; }
.done-box { text-align: center; padding: 40px 24px; }
.signed-row { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; } .sig-img { background: #fff; border: 1px solid var(--line); border-radius: 6px; width: 240px; height: auto; }
.signed-card { border-left: 3px solid var(--ok-ink); }
.sign-options { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; } .sign-options h3 { margin: 0 0 4px; font-size: .95rem; }
@media (max-width: 640px) { .odoc-grid, .sign-options { grid-template-columns: 1fr; } .odoc { padding: 18px; } }

/* orders list: signing from the list */
.sign-cell { min-width: 180px; } .sign-cell .pill { margin-bottom: 4px; }
.sign-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 6px; }
.inline-add.mini { margin-top: 0; gap: 4px; } .inline-add.mini input { padding: 5px 8px; font-size: .82rem; flex: 1 1 140px; min-width: 120px; }

/* car photos folded away until clicked */
.photo-fold { margin-top: 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-2); }
.photo-fold > summary { display: flex; align-items: center; gap: 12px; padding: 8px 10px; cursor: pointer; list-style: none; }
.photo-fold > summary::-webkit-details-marker { display: none; }
.photo-fold > summary img { width: 64px; height: 48px; object-fit: cover; border-radius: 4px; border: 1px solid var(--line); }
.photo-fold > summary > span { display: flex; flex-direction: column; }
.photo-fold > summary::after { content: "Show"; margin-left: auto; font-size: .82rem; font-weight: 600; color: var(--accent); }
.photo-fold[open] > summary::after { content: "Hide"; }
.photo-fold > p, .photo-fold > .web-photos { margin: 0 10px 10px; }
.photo-note { margin: 0 0 10px; }
