/* The real shop app. Base look: shop.css (copied from the portal's clickable demo). This file adds the font,
   the pieces the demo didn't have, and the sharper finish Hunter asked for (Nov 20): tighter corners,
   hairline borders, barely-there depth, heavier tighter headings, a solid active nav, one short fade.
   Colors keep their meaning: neutral for everything, red only for bad, green only for good, yellow only
   for warnings. No inline styles (CSP). */
@font-face {
  font-family: "Inter Tight";
  src: url("/assets/inter-tight-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
html, body { margin: 0; background: #f5f5f4; }
@media (prefers-color-scheme: dark) { html, body { background: #121214; } }

/* ---------- tokens ---------- */
.shop {
  --g: #f5f5f4; --l: #e4e4e1; --l2: #d3d3cf; --i3: #5f6168;
  --r-s: 5px; --r: 7px; --r-l: 10px;
  --lift: 0 1px 2px rgba(12, 12, 13, .05);
  --pop: 0 1px 2px rgba(12, 12, 13, .06), 0 16px 40px -12px rgba(12, 12, 13, .28);
  font-feature-settings: "cv11", "ss03";
  caret-color: var(--k);
}
.shop.dark { --l: #2b2b30; --l2: #3b3b42; --i3: #9d9da4; --lift: 0 1px 2px rgba(0, 0, 0, .4); --pop: 0 1px 2px rgba(0,0,0,.5), 0 18px 44px -12px rgba(0, 0, 0, .7); }
.shop .num { font-family: var(--f); } /* numbers stay in the main face, with even digit widths */
.shop .num, .shop td, .sp-pin-dots { font-variant-numeric: tabular-nums; }
.shop :focus-visible { outline: 2px solid var(--k); outline-offset: 2px; border-radius: var(--r-s); }
.shop .sp-main:focus-visible, .shop .sp-pin:focus-visible { outline: none; } /* focus moves here for screen readers; no ring on the whole area */
.shop * { scrollbar-width: thin; scrollbar-color: var(--l2) transparent; }

/* ---------- shell ---------- */
.sp-side { padding: 14px 10px; gap: 14px; }
.sp-brand { font-size: 14.5px; letter-spacing: -.01em; padding: 4px 8px 6px; }
.sp-mark { border-radius: var(--r-s); width: 26px; height: 26px; font-size: 10.5px; letter-spacing: .02em; }
.sp-nav { gap: 1px; }
.sp-nav-a { height: 36px; border-radius: var(--r); padding: 0 10px; gap: 10px; font-size: 14px; transition: background .12s, color .12s; }
.sp-nav-a:hover { background: var(--g); color: var(--i); }
.sp-nav-a.on, .sp-nav-a.on:hover { background: var(--k); color: var(--onk); font-weight: 600; }
.sp-nav-a.on .si { color: var(--onk); }
.sp-main { padding: 28px 36px 56px; }
.sp-view.enter { animation: sp-fade .16s cubic-bezier(.16, 1, .3, 1) both; }
.sp-view.enter .sp-card, .sp-role { animation: none; }

/* ---------- page head ---------- */
.sp-stack { display: grid; gap: 16px; max-width: 1040px; }
.sp-head { padding-bottom: 4px; }
.sp-h1 { font-size: 28px; line-height: 1.1; font-weight: 650; letter-spacing: -.028em; }
.sp-sub { margin: 6px 0 0; color: var(--i3); font-size: 14px; }

/* ---------- surfaces ---------- */
.sp-card { border-radius: var(--r-l); box-shadow: var(--lift); padding: 18px 20px; }
.sp-card.flush { padding: 0; }
.sp-card-head { align-items: center; }
.sp-card h2 { font-size: 15px; font-weight: 620; letter-spacing: -.01em; }
.sp-note { border-radius: var(--r); padding: 10px 14px; font-size: 13.5px; }
.sp-pill { height: 22px; border-radius: var(--r-s); padding: 0 8px; font-size: 12px; font-weight: 600; letter-spacing: .005em; }
.sp-dot { width: 6px; height: 6px; }

/* ---------- controls ---------- */
.sp-btn { height: 38px; border-radius: var(--r); padding: 0 14px; font-size: 14px; letter-spacing: -.005em; transition: background .12s, border-color .12s, color .12s, transform .1s; }
.sp-btn:hover { border-color: var(--i3); background: var(--s); }
.sp-btn.primary:hover { border-color: var(--khover); }
.sp-btn.ghost:hover { background: var(--g); border-color: transparent; }
.sp-btn.sm { height: 30px; padding: 0 10px; font-size: 13px; border-radius: var(--r-s); }
.sp-btn.sm .si { width: 15px; height: 15px; }
.sp-btn.xl { height: 48px; font-size: 15px; border-radius: var(--r); }
.sp-btn.bad:hover { background: var(--bad); border-color: var(--bad); filter: brightness(.94); }
.shop.shop .sp-input { min-height: 38px; border-radius: var(--r); padding: 8px 11px; font-size: 14px; transition: border-color .12s, box-shadow .12s; }
.shop.shop .sp-input:hover:not(:focus):not(:disabled) { border-color: var(--i3); }
.shop.shop .sp-input:focus { border-color: var(--k); box-shadow: 0 0 0 3px rgba(12, 12, 13, .09); }
.shop.dark.shop .sp-input:focus { box-shadow: 0 0 0 3px rgba(242, 242, 240, .14); }
.shop.shop .sp-input:disabled { background: var(--g); color: var(--i3); }
.sp-form { display: grid; grid-template-columns: 2fr 2fr 1fr auto; gap: 10px; align-items: end; }
.sp-form label, .sp-lbl { display: grid; gap: 6px; font-size: 12.5px; color: var(--i2); font-weight: 550; }
.shop.shop .sp-form .sp-input.sel { min-width: 0; width: 100%; }

/* ---------- people table ---------- */
.sp-table th { font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--i3); padding: 10px 14px; background: var(--sunk); }
.sp-table td { padding: 12px 14px; }
.sp-table tbody tr { transition: background .1s; }
.sp-table tbody tr:hover td { background: var(--sunk); }
.sp-table td b { font-weight: 600; }
.sp-table td .sp-row { justify-content: flex-start; }
.sp-table.people th { text-align: left; }
.sp-table.people td { vertical-align: middle; }
.shop.shop .sp-table.people .sp-input.sel { min-width: 0; width: 160px; min-height: 34px; padding: 5px 10px; }
.sp-table td.act .sp-row { justify-content: flex-end; flex-wrap: wrap; gap: 6px; }
.sp-table tr.off td { color: var(--i3); }
.sp-table tr.off td b { font-weight: 500; }

/* ---------- home: one list of actions ---------- */
.sp-actions { list-style: none; margin: 0; padding: 0; }
.sp-actions li + li { border-top: 1px solid var(--l); }
.sp-action { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; padding: 16px 20px; transition: background .12s; }
.sp-action:hover { background: var(--sunk); }
.sp-action .tile { width: 36px; height: 36px; border-radius: var(--r); border: 1px solid var(--l); display: grid; place-items: center; background: var(--s); }
.sp-action b { display: block; font-weight: 600; letter-spacing: -.01em; }
.sp-action span { color: var(--i3); font-size: 13.5px; }
.sp-action .go { color: var(--i3); transition: transform .15s cubic-bezier(.16, 1, .3, 1), color .12s; }
.sp-action:hover .go { transform: translateX(3px); color: var(--i); }

/* ---------- sign in ---------- */
.sp-signin-side { padding: 36px; }
.sp-signin-copy h1 { font-size: 40px; line-height: 1.04; letter-spacing: -.035em; font-weight: 650; }
.sp-signin-main { padding: 32px 48px; }
.sp-signin-main .sp-stack { max-width: 400px; margin-top: 12vh; gap: 14px; }
.sp-lead { color: var(--i2); margin: 0; max-width: 52ch; line-height: 1.5; }

/* ---------- dialogs and PIN pad ---------- */
.sp-modal { background: rgba(12, 12, 13, .42); }
.sp-dialog { width: 420px; max-width: 100%; background: var(--s); border-radius: var(--r-l); border: 1px solid var(--l); padding: 22px; box-shadow: var(--pop); display: grid; gap: 12px; }
.sp-dialog h2 { margin: 0; font-size: 17px; font-weight: 650; letter-spacing: -.015em; }
.sp-dialog p { margin: 0; color: var(--i2); }
.sp-copy { display: flex; gap: 8px; }
.sp-copy .sp-input { font-family: var(--fm); font-size: 13px; }
.sp-pin { border-radius: var(--r-l); border: 1px solid var(--l); box-shadow: var(--pop); padding: 24px; }
.sp-pin h2 { font-size: 17px; font-weight: 650; letter-spacing: -.015em; }
.sp-pin-dots { gap: 12px; }
.sp-pin-dots i { width: 12px; height: 12px; border-width: 1.5px; }
.sp-pin-dots i.ghost { opacity: .22; }
.sp-keys { gap: 8px; }
.sp-key { height: 58px; border-radius: var(--r); font-size: 21px; background: var(--g); transition: background .1s, transform .08s; }
.sp-key:hover { background: var(--track); }
.sp-key.go { grid-column: span 3; height: 52px; margin-top: 4px; background: var(--k); color: var(--onk); font: 600 15px var(--f); }
.sp-key.go:hover { background: var(--khover); }
.sp-key.go:disabled { background: var(--track); color: #8d8f94; cursor: not-allowed; }
.sp-toast { border-radius: var(--r); }

/* ---------- shop computer ---------- */
.sp-techs { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.sp-techs .sp-role { grid-template-columns: auto 1fr; padding: 18px 16px; border-radius: var(--r-l); box-shadow: var(--lift); }
.sp-techs .sp-role:hover { border-color: var(--k); box-shadow: var(--lift); transform: none; }
.sp-hello { display: grid; gap: 18px; justify-items: start; padding: 28px; }
.sp-hello .sp-av { width: 60px; height: 60px; font-size: 19px; border-radius: var(--r-l); }
.sp-av { border-radius: var(--r); }

/* ---------- repair orders and customers ---------- */
.sp-stack.narrow { max-width: 760px; }
.sp-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.sp-back { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--i3); margin-bottom: 6px; }
.sp-back:hover { color: var(--i); }
.sp-back .si { width: 15px; height: 15px; }
.sp-h1-sub { font-weight: 450; color: var(--i3); margin-left: 10px; letter-spacing: -.02em; }
.sp-lbl.inline { grid-template-columns: auto 200px; align-items: center; gap: 10px; }
.shop.shop .sp-lbl.inline .sp-input.sel { min-width: 0; width: 100%; }
.sp-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.sp-chip { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 11px; border: 1px solid var(--l); border-radius: var(--r); background: var(--s); font-size: 13px; font-weight: 500; color: var(--i2); transition: border-color .12s, background .12s, color .12s; }
.sp-chip:hover { border-color: var(--i3); color: var(--i); }
.sp-chip.on { background: var(--k); border-color: var(--k); color: var(--onk); }
.sp-chip .n { font-size: 11.5px; font-variant-numeric: tabular-nums; color: var(--i3); }
.sp-chip.on .n { color: var(--onk2); }
.sp-tag { margin-left: 8px; font-size: 11px; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; color: var(--i2); border: 1px solid var(--l2); border-radius: var(--r-s); padding: 1px 5px; vertical-align: 1px; }
.sp-table tr.link { cursor: pointer; }
.sp-table td a { font-weight: 600; text-decoration: underline; text-decoration-color: var(--l2); text-underline-offset: 3px; }
.shop .sp-table th.right, .shop .sp-table td.right { text-align: right; }
.sp-table.ros th, .sp-table.customers th, .sp-table.lines th { text-align: left; }
.sp-table.ros td, .sp-table.lines td { vertical-align: middle; }
.sp-empty { justify-items: start; gap: 4px; padding: 28px 20px; }
.sp-searchbox { position: relative; display: flex; align-items: center; }
.sp-searchbox .si { position: absolute; left: 12px; color: var(--i3); pointer-events: none; }
.shop.shop .sp-searchbox .sp-input { padding-left: 38px; }
.sp-picks { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.sp-pick { width: 100%; display: grid; gap: 2px; text-align: left; padding: 10px 12px; border: 1px solid var(--l); border-radius: var(--r); background: var(--s); cursor: pointer; transition: border-color .12s, background .12s; }
.sp-pick:hover { border-color: var(--k); }
.sp-pick span { font-size: 13px; }
.sp-or { font-size: 12px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--i3); margin-top: 4px; }
.sp-grid-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 12px; align-items: end; }
.sp-grid-form.veh { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.sp-grid-form.checkin { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.sp-grid-form .wide { grid-column: 1 / -1; }
.sp-grid-form > .sp-btn { justify-self: start; }
.sp-grid-form .sp-row .sp-input { flex: 1; }
.sp-input.mono, .mono { font-family: var(--fm); font-size: 13px; letter-spacing: .02em; }
.sp-dim { color: var(--i3); font-weight: 500; }
.sp-check { display: flex; align-items: center; gap: 9px; font-size: 14px; cursor: pointer; }
.sp-check input { width: 17px; height: 17px; accent-color: var(--k); }
.sp-ro-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(240px, 1fr); gap: 16px; align-items: start; }
.sp-facts { display: grid; grid-template-columns: 110px 1fr; gap: 8px 14px; margin: 0; font-size: 14px; }
.sp-facts dt { color: var(--i3); font-size: 13px; }
.sp-facts dd { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.sp-facts.totals { grid-template-columns: 1fr auto; align-items: baseline; }
.sp-facts.totals dd { text-align: right; }
.sp-facts .big { font-size: 22px; font-weight: 650; letter-spacing: -.02em; }
.sp-card .pad, .sp-card-head.pad { padding: 16px 20px; }
.sp-card .pad.top { border-top: 1px solid var(--l); }
.sp-lineform { display: grid; grid-template-columns: 120px minmax(0, 1fr) 80px 100px 150px auto; gap: 10px; align-items: end; }
.shop.shop .sp-lineform .sp-input.sel { min-width: 0; width: 100%; }
.shop.shop .sp-table.lines .sp-input.sel { min-width: 0; width: 140px; min-height: 32px; padding: 4px 9px; font-size: 13.5px; }
.shop.shop .sp-table.lines .sp-input.status-approved, .shop.shop .sp-table.lines .sp-input.status-done { border-color: var(--good-l); color: var(--good); }
.shop.shop .sp-table.lines .sp-input.status-declined { color: var(--i3); }
.sp-timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 14px; }
.sp-timeline li { padding-left: 16px; position: relative; }
.sp-timeline li::before { content: ""; position: absolute; left: 0; top: .55em; width: 6px; height: 6px; border-radius: 50%; background: var(--l2); }
.sp-timeline li:first-child::before { background: var(--k); }

/* ---------- time clock (shop computer: big targets, clear states) ---------- */
.sp-clockhead { grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 18px 24px; padding: 22px 24px; }
.sp-clockhead .who { display: flex; align-items: center; gap: 14px; }
.sp-clockhead .sp-av { width: 52px; height: 52px; font-size: 17px; border-radius: var(--r-l); }
.sp-clockhead .sp-h1 { font-size: 26px; margin-bottom: 6px; }
.sp-clockhead .btns { grid-column: 1 / -1; gap: 10px; }
.sp-clockhead .btns .sp-btn.xl { min-width: 168px; }
.sp-today { display: flex; gap: 28px; margin: 0; }
.sp-today dt { font-size: 12px; color: var(--i3); font-weight: 550; }
.sp-today dd { margin: 2px 0 0; font-size: 22px; font-weight: 650; letter-spacing: -.02em; }
.sp-jobs { list-style: none; margin: 0; padding: 0; }
.sp-jobcard { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 16px; align-items: center; padding: 16px 20px; border-top: 1px solid var(--l); }
.sp-jobcard.on { background: var(--sunk); }
.sp-jobmain { display: grid; gap: 4px; min-width: 0; }
.sp-jobmain .ro { font-weight: 650; }
.sp-jobmain .desc { font-size: 16px; font-weight: 600; letter-spacing: -.01em; }
.sp-jobtime { text-align: right; display: grid; gap: 2px; }
.sp-jobtime .num { font-size: 18px; font-weight: 650; }
.shop .num.bad { color: var(--bad); }
.sp-jobcard .sp-btn.xl { min-width: 140px; }
.sp-table.team th { text-align: left; }
.sp-table.team td { vertical-align: middle; }
@media (max-width: 900px) {
  .sp-clockhead, .sp-jobcard { grid-template-columns: 1fr; }
  .sp-jobtime { text-align: left; }
}

.sp-loading { min-height: 240px; height: 100%; display: grid; place-items: center; color: var(--i3); font-size: 13.5px; }

/* Desktop-only shell sizes (phones keep shop.css's stacked layout). */
@media (min-width: 901px) {
  .sp-app.with-side { grid-template-columns: 232px minmax(0, 1fr); }
  .sp-side-foot { border-top: 1px solid var(--l); padding-top: 12px; }
  .sp-signin { grid-template-columns: minmax(300px, 440px) 1fr; }
}
@media (max-width: 900px) {
  .sp-form { grid-template-columns: 1fr; }
  .sp-signin-main .sp-stack { margin-top: 4vh; }
  .sp-main { padding: 18px 16px 40px; }
  .sp-ro-grid, .sp-grid-form, .sp-grid-form.veh, .sp-grid-form.checkin, .sp-lineform { grid-template-columns: 1fr; }
  .sp-lbl.inline { grid-template-columns: auto 1fr; }
  .sp-nav-a { height: 34px; }
}
/* Phones: each row of a table becomes a stacked card instead of a wide row. */
@media (max-width: 600px) {
  .sp-table.stack thead { display: none; }
  .sp-table.stack, .sp-table.stack tbody, .sp-table.stack tr, .sp-table.stack td { display: block; width: 100%; }
  .sp-table.stack tr { padding: 14px 16px; border-bottom: 1px solid var(--l); display: grid; gap: 6px; }
  .sp-table.stack tr:last-child { border-bottom: 0; }
  .shop .sp-table.stack td, .shop .sp-table.stack td.right { border: 0; padding: 0; text-align: left; }
  .sp-table tbody tr:hover td { background: transparent; }
  .shop.shop .sp-table.stack .sp-input.sel { width: 100%; }
  .sp-table td.act .sp-row { justify-content: flex-start; }
  .sp-action { padding: 14px 16px; }
}
