@font-face { font-family: "Saira"; font-style: normal; font-weight: 100 900; font-display: swap; src: url(/assets/fonts/saira.woff2) format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url(/assets/fonts/inter.woff2) format("woff2"); }
:root {
  --ink: #16181d; --ink-2: #23262e; --ink-3: #343842; --bg: #eeece8; --card: #fff; --red: #e3262f; --red-2: #b81d25; --amber: #f2a531;
  --text: #1d2027; --muted: #6a6f7a; --line: rgba(22, 24, 29, .11); --ok: #2e8b57; --warn: #c27a12; --bad: #c0392b; --blue: #2f6fb5;
  --head: "Saira", "Arial Narrow", system-ui, sans-serif; --body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --tabs-h: 64px; --safe-b: env(safe-area-inset-bottom, 0px);
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 14.5px/1.5 var(--body); }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; font-family: var(--head); line-height: 1.1; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; border-radius: 6px; }
.ic { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.boot { min-height: 100dvh; display: grid; place-items: center; background: var(--ink); }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.err { color: var(--bad); font-size: .9rem; min-height: 1.2em; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }

/* buttons & forms */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 40px; padding: 0 16px; border-radius: 9px; border: 1.5px solid transparent;
  font: 600 .92rem/1 var(--body); text-decoration: none; cursor: pointer; white-space: nowrap; background: none; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { background: var(--red-2); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: var(--ink-3); }
.btn-ok { background: var(--ok); color: #fff; }
.btn-line { border-color: var(--line); background: var(--card); }
.btn-line:hover { border-color: var(--ink); }
.btn-danger { color: var(--bad); border-color: rgba(192, 57, 43, .3); background: var(--card); }
.btn-small { min-height: 32px; padding: 0 11px; font-size: .84rem; }
.btn-big { min-height: 56px; font-size: 1.05rem; padding: 0 22px; border-radius: 12px; }
.btn-block { width: 100%; }
.link { background: none; border: 0; padding: 0; color: var(--red-2); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font-weight: 500; }
.icon-btn { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 9px; border: 1.5px solid var(--line); background: var(--card); cursor: pointer; }
label.f { display: grid; gap: 5px; font-size: .84rem; font-weight: 600; }
label.f small, .hint { font-weight: 400; color: var(--muted); font-size: .8rem; }
input, select, textarea { width: 100%; min-height: 40px; padding: 8px 11px; border: 1.5px solid var(--line); border-radius: 9px; background: #fff; font: 400 .95rem var(--body); color: var(--text); }
input[type=checkbox] { width: 18px; min-height: 18px; accent-color: var(--red); }
input[type=color] { padding: 2px; width: 60px; }
textarea { min-height: 76px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ink); }
input:disabled, textarea:disabled { background: #f2f1ee; color: var(--muted); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.row4 { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 10px; }
.check { display: flex; align-items: center; gap: 8px; font-size: .9rem; font-weight: 500; }
.seg { display: inline-flex; background: rgba(22, 24, 29, .06); border-radius: 10px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: none; padding: 7px 12px; border-radius: 8px; cursor: pointer; font-weight: 600; font-size: .85rem; color: var(--muted); }
.seg button.on { background: var(--card); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, .1); }
.search { position: relative; flex: 1; min-width: 200px; max-width: 380px; }
.search input { padding-left: 36px; }
.search .ic { position: absolute; left: 11px; top: 10px; color: var(--muted); }

/* login */
.login { min-height: 100dvh; display: grid; place-items: center; padding: 20px; background: var(--ink) url(/assets/img/hero.jpg) center / cover; position: relative; }
.login::before { content: ""; position: absolute; inset: 0; background: rgba(22, 24, 29, .86); }
.login-card { position: relative; width: min(430px, 100%); background: #fff; border-radius: 20px; padding: 28px 24px; display: grid; gap: 15px; }
.login-card .brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.login-card .brand b { font: 700 1.3rem/1 var(--head); text-transform: uppercase; }
.login-card h1 { font-size: 1.8rem; }
.demo-box { display: grid; gap: 10px; padding: 14px; border-radius: 12px; border: 1.5px dashed rgba(22, 24, 29, .25); background: #faf9f7; font-size: .86rem; }
.demo-box code { background: #eeece8; padding: 1px 6px; border-radius: 5px; }
.demo-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }

/* shell */
.shell { display: grid; grid-template-columns: 220px 1fr; min-height: 100dvh; }
.side { position: sticky; top: 0; height: 100dvh; background: var(--ink); color: #fff; display: flex; flex-direction: column; padding: 16px 10px; }
.side-brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 20px; text-decoration: none; }
.side-brand b { font: 700 1.15rem/1 var(--head); display: block; text-transform: uppercase; }
.side-brand small { font-size: .64rem; letter-spacing: .2em; text-transform: uppercase; color: rgba(255, 255, 255, .5); }
.side-nav { display: grid; gap: 2px; }
.side-nav a { display: flex; align-items: center; gap: 11px; padding: 9px 11px; border-radius: 9px; text-decoration: none; color: rgba(255, 255, 255, .75); font-weight: 500; }
.side-nav a:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.side-nav a.on { background: var(--red); color: #fff; }
.side-nav .badge { margin-left: auto; background: var(--amber); color: var(--ink); font-size: .72rem; font-weight: 700; border-radius: 99px; padding: 1px 7px; }
.side-foot { margin-top: auto; padding: 12px 8px 0; border-top: 1px solid rgba(255, 255, 255, .12); font-size: .84rem; display: grid; gap: 5px; }
.side-foot span { color: rgba(255, 255, 255, .55); overflow: hidden; text-overflow: ellipsis; }
.side-foot .link { color: #fff; justify-self: start; }
.main { min-width: 0; }
.demo-bar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 14px; padding: 7px 20px; background: var(--amber); font-size: .84rem; }
.demo-bar .link { color: var(--ink); }
.bar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 13px 22px; background: rgba(238, 236, 232, .94); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.bar h1 { font-size: 1.6rem; margin-right: auto; text-transform: uppercase; letter-spacing: .01em; }
.view { padding: 20px 22px 40px; }
.tabs { display: none; }
.empty { padding: 40px 20px; text-align: center; color: var(--muted); }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 18px; display: grid; gap: 14px; align-content: start; }
.card h2 { font-size: 1.15rem; display: flex; align-items: center; gap: 10px; }
.card h2 .act { margin-left: auto; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.stack { display: grid; gap: 16px; align-content: start; }

/* plates & tags */
.plate { display: inline-flex; align-items: center; gap: 5px; padding: 3px 7px; border-radius: 6px; background: #fff; border: 1.5px solid var(--ink); font: 700 .86rem/1 var(--head); letter-spacing: .07em; white-space: nowrap; }
.plate.big { font-size: 1.15rem; padding: 6px 10px; border-width: 2px; }
.tag { display: inline-block; font-size: .72rem; font-weight: 700; padding: 3px 8px; border-radius: 99px; white-space: nowrap; background: rgba(22, 24, 29, .07); }
.t-booked { background: rgba(47, 111, 181, .12); color: var(--blue); }
.t-checked_in { background: rgba(22, 24, 29, .08); }
.t-in_progress { background: rgba(227, 38, 47, .12); color: var(--red-2); }
.t-waiting_approval { background: rgba(242, 165, 49, .22); color: #8a5a0c; }
.t-waiting_parts { background: rgba(138, 90, 12, .12); color: #7a4e06; }
.t-ready { background: rgba(46, 139, 87, .14); color: var(--ok); }
.t-collected { background: rgba(22, 24, 29, .06); color: var(--muted); }
.t-cancelled, .t-no_show { background: rgba(192, 57, 43, .1); color: var(--bad); }
.t-pending { background: rgba(242, 165, 49, .22); color: #8a5a0c; }
.t-approved, .t-included { background: rgba(46, 139, 87, .12); color: var(--ok); }
.t-declined { background: rgba(192, 57, 43, .1); color: var(--bad); }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; background: var(--c, #999); flex: none; }

/* board */
.board-filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; align-items: center; }
.chipf { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 99px; border: 1.5px solid var(--line); background: var(--card); cursor: pointer; font-weight: 600; font-size: .84rem; }
.chipf.on { border-color: var(--ink); background: var(--ink); color: #fff; }
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(230px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 10px; align-items: start; }
.col { background: rgba(22, 24, 29, .045); border-radius: 14px; padding: 10px; display: grid; gap: 8px; align-content: start; min-height: 200px; }
.col-head { display: flex; justify-content: space-between; align-items: center; padding: 2px 4px 6px; font: 700 .82rem/1 var(--head); text-transform: uppercase; letter-spacing: .06em; }
.col-head span { background: var(--card); border-radius: 99px; padding: 2px 8px; font-size: .78rem; }
.jc { background: var(--card); border-radius: 11px; padding: 11px 12px; border: 1px solid var(--line); border-left: 4px solid var(--c, #ccc); display: grid; gap: 6px; text-decoration: none; cursor: pointer; text-align: left; width: 100%; }
.jc:hover { border-color: rgba(22, 24, 29, .3); border-left-color: var(--c, #ccc); box-shadow: 0 4px 14px rgba(0, 0, 0, .06); }
.jc-top { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.jc b { font-weight: 600; }
.jc .meta { display: flex; flex-wrap: wrap; gap: 5px 10px; font-size: .8rem; color: var(--muted); align-items: center; }
.flag { display: inline-flex; align-items: center; gap: 4px; font-size: .74rem; font-weight: 700; padding: 2px 7px; border-radius: 6px; }
.flag .ic { width: 13px; height: 13px; }
.f-clock { background: rgba(227, 38, 47, .12); color: var(--red-2); }
.f-wait { background: rgba(242, 165, 49, .25); color: #7a4e06; }
.f-owe { background: rgba(192, 57, 43, .1); color: var(--bad); }
.f-paid { background: rgba(46, 139, 87, .13); color: var(--ok); }
.pulse { animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { opacity: .45; } }

/* tables */
.tbl-wrap { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: 14px; }
table.tbl { width: 100%; border-collapse: collapse; font-size: .9rem; }
.tbl th { text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); padding: 11px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; font-weight: 600; }
.tbl td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tr.click { cursor: pointer; }
.tbl tr.click:hover td { background: #faf9f7; }
.tbl .r { text-align: right; white-space: nowrap; }
.tbl tr.low td { background: #fff6f5; }
.tbl tr.declined td { color: var(--muted); }
.tbl tr.declined td.d { text-decoration: line-through; }
.tbl tfoot td { font-weight: 700; border-top: 1px solid var(--line); border-bottom: 0; }

/* job card */
.job-head { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.job-head h2 { font-size: 1.5rem; }
.job-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; align-items: start; }
.status-row { display: flex; flex-wrap: wrap; gap: 6px; }
.status-row button { border: 1.5px solid var(--line); background: var(--card); border-radius: 99px; padding: 6px 12px; font-weight: 600; font-size: .82rem; cursor: pointer; }
.status-row button.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.status-row button:disabled { opacity: .35; cursor: not-allowed; }
.kv { display: grid; gap: 7px; font-size: .9rem; }
.kv > div { display: flex; justify-content: space-between; gap: 10px; }
.kv span { color: var(--muted); }
.add-line { display: grid; gap: 10px; padding: 14px; border-radius: 12px; background: #faf9f7; border: 1px dashed rgba(22, 24, 29, .2); }
.tot { display: grid; gap: 4px; justify-content: end; text-align: right; font-size: .92rem; }
.tot b { font: 700 1.35rem/1.2 var(--head); }
.clock-box { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 12px; background: var(--ink); color: #fff; }
.clock-box b { font: 700 1.6rem/1 var(--head); font-variant-numeric: tabular-nums; }
.clock-box.off { background: #faf9f7; color: var(--text); border: 1px solid var(--line); }
.timeline { display: grid; }
.tl { display: grid; grid-template-columns: 14px 1fr; gap: 10px; padding-bottom: 14px; position: relative; }
.tl::before { content: ""; position: absolute; left: 6px; top: 12px; bottom: 0; width: 2px; background: var(--line); }
.tl:last-child::before { display: none; }
.tl i { width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 3px solid var(--ink); margin-top: 3px; }
.tl.private i { border-color: var(--amber); }
.tl small { color: var(--muted); font-size: .78rem; }
.tl img { margin-top: 6px; border-radius: 10px; max-height: 180px; max-width: 100%; object-fit: cover; cursor: zoom-in; }
.photo-prev { max-height: 140px; border-radius: 10px; }
.hist { display: grid; gap: 8px; }
.hist a { display: grid; gap: 2px; padding: 10px 12px; border-radius: 10px; background: #faf9f7; text-decoration: none; font-size: .86rem; }
.hist a:hover { background: #f2f0ec; }

/* mechanic app */
.my-grid { display: grid; gap: 14px; max-width: 720px; }
.my-job { background: var(--card); border: 1px solid var(--line); border-left: 6px solid var(--c, var(--red)); border-radius: 14px; padding: 16px; display: grid; gap: 10px; }
.my-job .top { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.my-job .acts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.on-clock { background: var(--red); color: #fff; border-radius: 16px; padding: 18px; display: grid; gap: 10px; }
.on-clock b.t { font: 700 2.6rem/1 var(--head); font-variant-numeric: tabular-nums; }

/* day view */
.slots { display: grid; gap: 12px; }
.slot { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px; display: grid; grid-template-columns: 90px 1fr; gap: 14px; }
.slot-t { display: grid; gap: 6px; align-content: start; }
.slot-t b { font: 700 1.3rem/1 var(--head); }
.cap { height: 6px; border-radius: 99px; background: rgba(22, 24, 29, .08); overflow: hidden; }
.cap i { display: block; height: 100%; background: var(--ok); border-radius: inherit; }
.cap.full i { background: var(--red); }
.slot-jobs { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.daynav { display: flex; gap: 6px; align-items: center; }
.daynav input { width: auto; }

/* reports */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px; display: grid; gap: 4px; }
.kpi span { color: var(--muted); font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.kpi b { font: 700 1.7rem/1.1 var(--head); }
.kpi small { color: var(--muted); }
.bars { display: flex; align-items: flex-end; gap: 6px; height: 180px; padding-top: 10px; }
.bars div { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; gap: 6px; height: 100%; text-align: center; font-size: .7rem; color: var(--muted); min-width: 0; }
.bars i { display: block; background: var(--ink); border-radius: 5px 5px 0 0; min-height: 2px; }
.bars div:last-child i { background: var(--red); }
.hbar { display: grid; grid-template-columns: 150px 1fr 120px; gap: 10px; align-items: center; font-size: .88rem; }
.hbar .track { height: 10px; background: rgba(22, 24, 29, .07); border-radius: 99px; overflow: hidden; }
.hbar .track i { display: block; height: 100%; background: var(--c, var(--ink)); border-radius: inherit; }
.split-bar { display: flex; height: 16px; border-radius: 99px; overflow: hidden; }
.split-bar i { display: block; height: 100%; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .84rem; }
.legend span { display: inline-flex; gap: 6px; align-items: center; }

/* sheet (modal) */
.sheet-bg { position: fixed; inset: 0; background: rgba(15, 16, 20, .55); z-index: 60; display: grid; place-items: center; padding: 16px; }
.sheet { background: var(--bg); width: min(560px, 100%); max-height: calc(100dvh - 32px); overflow: auto; border-radius: 18px; display: grid; gap: 14px; padding: 20px; }
.sheet-head { display: flex; align-items: center; gap: 10px; }
.sheet-head h2 { font-size: 1.3rem; margin-right: auto; }
.sheet .acts { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.msg-box { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px; font-size: .92rem; white-space: pre-wrap; }
.lightbox { position: fixed; inset: 0; background: rgba(0, 0, 0, .85); display: grid; place-items: center; z-index: 90; padding: 20px; cursor: zoom-out; }
.lightbox img { max-height: 90vh; max-width: 100%; border-radius: 12px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 160%); z-index: 100; background: var(--ink); color: #fff; padding: 11px 18px; border-radius: 12px; max-width: calc(100% - 32px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, .25); transition: transform .25s; }
.toast.show { transform: translate(-50%, 0); }
.toast.bad { background: var(--bad); }

@media (max-width: 1100px) {
  .job-grid { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .grid3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 820px) {
  .shell { grid-template-columns: 1fr; }
  .side { display: none; }
  .main { padding-bottom: calc(var(--tabs-h) + var(--safe-b)); }
  .tabs { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--ink); padding-bottom: var(--safe-b); overflow-x: auto; }
  .tabs a { flex: 1 0 64px; display: grid; justify-items: center; gap: 2px; padding: 9px 4px; text-decoration: none; color: rgba(255, 255, 255, .65); font-size: .66rem; font-weight: 600; }
  .tabs a.on { color: #fff; box-shadow: inset 0 3px 0 var(--red); }
  .bar { padding: 11px 14px; }
  .bar h1 { font-size: 1.3rem; }
  .view { padding: 14px 14px 30px; }
  .grid2, .grid3, .row3, .row4 { grid-template-columns: 1fr; }
  .row2 { grid-template-columns: 1fr 1fr; }
  .slot { grid-template-columns: 1fr; }
  .hbar { grid-template-columns: 100px 1fr 76px; }
  .demo-bar { padding: 7px 14px; }
  .sheet-bg { place-items: end center; padding: 0; }
  .sheet { border-radius: 18px 18px 0 0; max-height: 92dvh; padding-bottom: calc(20px + var(--safe-b)); }
}
@media print {
  .side, .tabs, .bar, .demo-bar, .no-print { display: none !important; }
  .shell { display: block; }
  body { background: #fff; }
  .job-grid { grid-template-columns: 1fr; }
}
