/* GarageOS Pro, powered by Engine Care Solutions: black, gold, silver. Light pages for readability. */
:root {
  --ink: #0d0d0f;          /* brand black */
  --ink-2: #1b1b1f;
  --gold: #c9971f;         /* brand gold (fills, accents), one shade everywhere */
  --gold-2: #e3b341;
  --gold-text: #7a5a08;    /* gold dark enough for text on white (AA) */
  --gold-soft: #fbf4e1;
  --silver: #c9ccd2;
  --bg: #f6f6f3;
  --card: #ffffff;
  --line: #e7e5df;
  --line-2: #f1efea;
  --text: #17171a;
  --muted: #64646b;
  --green: #15803d; --green-soft: #e7f6ec;
  --red: #c42b2b;   --red-soft: #fdecec;
  --amber: #a15c07; --amber-soft: #fff4e0;
  --blue: #1d4ed8;  --blue-soft: #e8efff;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 16, 20, .04), 0 2px 10px rgba(16, 16, 20, .04);
  --side-w: 248px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text);
       font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; }
a { color: var(--gold-text); text-decoration: none; font-weight: 500; }
a:hover { text-decoration: underline; }
h1 { font-size: 22px; line-height: 1.25; margin: 0; letter-spacing: -.01em; }
h2 { font-size: 16px; margin: 0 0 12px; }
p { margin: 0 0 10px; }
h2.with-icon { display: flex; align-items: center; gap: 8px; }
h2.with-icon svg { width: 19px; height: 19px; color: var(--gold); }
img { max-width: 100%; }
:focus-visible { outline: 3px solid rgba(212, 166, 42, .55); outline-offset: 2px; border-radius: 6px; }

.muted { color: var(--muted); } .small { font-size: 13px; } .tiny { font-size: 12px; }
.red { color: var(--red); } .green { color: var(--green); } .amber { color: var(--amber); } .gold { color: var(--gold-text); }
.right { text-align: right; } .nowrap { white-space: nowrap; } .mono { font-family: ui-monospace, Menlo, Consolas, monospace; }
.plate { font-family: ui-monospace, Menlo, monospace; font-weight: 700; letter-spacing: .04em; background: #fff;
         border: 1.5px solid var(--ink); border-radius: 6px; padding: 1px 7px; color: var(--ink); font-size: 13px; white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ── layout ───────────────────────────────────────────── */
.side { display: none; }
.topbar { position: sticky; top: 0; z-index: 20; background: var(--ink); color: #fff; border-bottom: 2px solid var(--gold); }
.topbar .in { display: flex; align-items: center; gap: 12px; padding: 10px 16px; max-width: 1180px; margin: 0 auto; }
.topbar .emblem { height: 34px; width: 34px; display: block; }
.topbar .who { flex: 1; min-width: 0; }
.topbar .who .g { font-weight: 700; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #fff; }
.topbar .who .p { font-size: 11px; color: var(--gold-2); letter-spacing: .06em; text-transform: uppercase; }
.topbar a.out { color: var(--silver); font-size: 13px; font-weight: 500; }
main { max-width: 1180px; margin: 0 auto; padding: 18px 16px 104px; }

nav.bottom { position: fixed; bottom: 0; left: 0; right: 0; z-index: 20; background: #fff; border-top: 1px solid var(--line);
             padding-bottom: env(safe-area-inset-bottom); box-shadow: 0 -4px 16px rgba(0,0,0,.05); }
nav.bottom .in { display: grid; grid-template-columns: repeat(5, 1fr); max-width: 640px; margin: 0 auto; }
nav.bottom a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 2px 7px;
               font-size: 11px; font-weight: 600; color: var(--muted); text-decoration: none; }
nav.bottom a svg { width: 22px; height: 22px; }
nav.bottom a.on { color: var(--ink); }
nav.bottom a.on svg { color: var(--gold); }
nav.bottom a.ecc img { height: 22px; width: auto; }

@media (min-width: 960px) {
  .side { display: flex; flex-direction: column; position: fixed; top: 0; bottom: 0; left: 0; width: var(--side-w);
          background: var(--ink); color: #fff; z-index: 30; border-right: 1px solid #000; }
  .side .gos-brand { display: flex; align-items: center; gap: 11px; padding: 18px 18px 0; text-decoration: none; }
  .side .gos-brand .mark { width: 42px; height: 42px; flex: none; }
  .side .gos-name { font-size: 22px; color: #fff; }
  .side .powered { margin: 10px 18px 0; padding: 9px 0 12px; border-top: 1px solid #2a2a30; font-size: 11px; color: #a9acb3; }
  .side .gname { margin: 0 18px; padding: 12px 0 6px; border-top: 1px solid #26262b; font-weight: 700; font-size: 15px; color: #fff; }
  .side nav { flex: 1; overflow-y: auto; padding: 6px 10px; }
  .side nav a { display: flex; align-items: center; gap: 11px; padding: 8px 12px; margin: 2px 0; border-radius: 10px;
                color: #d8d8dc; font-weight: 500; font-size: 14px; text-decoration: none; }
  .side nav a svg { width: 19px; height: 19px; color: #9a9aa2; }
  .side nav a:hover { background: #1f1f24; color: #fff; }
  .side nav a.on { background: rgba(201,151,31,.18); box-shadow: inset 3px 0 0 var(--gold-2); color: #fff; }
  .side nav a.on svg { color: var(--gold-2); }
  .side .clock { margin: 0 10px 8px; padding: 12px 14px; border-radius: 12px; background: #17171b; border: 1px solid #26262b; text-align: center; }
  .side .clock .t { color: #fff; font: 700 22px/1.1 ui-monospace, Menlo, monospace; letter-spacing: .04em; }
  .side .clock .d { color: #c9c9cf; font-size: 12px; margin-top: 4px; }
  .side .clock .z { color: var(--gold-2); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; margin-top: 3px; }
  .side .foot { padding: 14px 18px; border-top: 1px solid #26262b; font-size: 12px; color: #9a9aa2; }
  .side .foot a { color: var(--silver); }
  .topbar, nav.bottom { display: none; }
  main { margin-left: var(--side-w); max-width: none; padding: 28px 36px 48px; }
  main > .wrap { max-width: 1120px; margin: 0 auto; }
}

/* ── page head ───────────────────────────────────────── */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head .sub { color: var(--muted); font-size: 14px; margin-top: 4px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.crumb { font-size: 13px; margin-bottom: 6px; display: inline-block; }

/* ── cards & stats ───────────────────────────────────── */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 16px; box-shadow: var(--shadow); }
.card.flush { padding: 0; overflow: hidden; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 16px 18px 12px; }
.card-head h2 { margin: 0; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow);
        color: inherit; text-decoration: none; display: block; }
a.stat:hover { border-color: var(--gold); text-decoration: none; }
.stat .l { display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 600; color: var(--muted); }
.stat .l svg { width: 16px; height: 16px; color: var(--gold); }
.stat .v { font-size: 24px; font-weight: 750; margin-top: 6px; letter-spacing: -.01em; }
.stat .s { font-size: 12.5px; color: var(--muted); margin-top: 2px; }

.ecc-card { background: var(--ink); color: #fff; border: 0; border-radius: var(--radius); padding: 18px; margin-bottom: 16px;
            display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: center;
            background-image: linear-gradient(120deg, #0d0d0f 60%, #2a2110); box-shadow: 0 6px 24px rgba(0,0,0,.18); }
.ecc-card img { height: 54px; width: auto; }
.ecc-card .t { color: var(--gold-2); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.ecc-card .v { font-size: 26px; font-weight: 750; }
.ecc-card .s { color: #c9c9cf; font-size: 13px; }
.ecc-card a:not(.btn) { color: var(--gold-2); }
.ecc-card .ecc-facts { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 10px; font-size: 13px; color: #cfcfd6; }
.ecc-card .ecc-facts b { color: #fff; font-weight: 600; margin-right: 4px; }
.ecc-card .ecc-facts .warn b { color: var(--gold-2); }
.btn-ghost-dark { background: transparent; color: #fff; border-color: #55555c; }
.btn-ghost-dark:hover { border-color: var(--gold-2); }
@media (max-width: 600px) { .ecc-card { grid-template-columns: auto 1fr; } .ecc-card .actions { grid-column: 1 / -1; } }

.announce { display: flex; gap: 12px; align-items: flex-start; background: var(--gold-soft); border: 1px solid #efd78f;
            border-left: 5px solid var(--gold); border-radius: 12px; padding: 12px 14px; margin-bottom: 16px; }
.announce svg { width: 20px; height: 20px; color: var(--gold-text); flex: none; margin-top: 2px; }
.announce .t { font-size: 11px; font-weight: 700; color: var(--gold-text); letter-spacing: .06em; text-transform: uppercase; }

/* ── lists & tables ──────────────────────────────────── */
.list .row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 13px 18px;
             border-top: 1px solid var(--line-2); color: inherit; text-decoration: none; }
.list .row:first-child { border-top: 0; }
.list a.row:hover { background: #faf9f6; text-decoration: none; }
.row .t { font-weight: 600; } .row .sub { font-size: 13px; color: var(--muted); }
.row .chev { color: #b9b9bf; font-size: 20px; line-height: 1; }
.empty { padding: 34px 18px; text-align: center; color: var(--muted); }
.empty .big { font-size: 15px; color: var(--text); font-weight: 600; margin-bottom: 4px; }

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted);
     font-weight: 650; padding: 10px 14px; border-bottom: 1px solid var(--line); background: #fbfaf7; white-space: nowrap; }
td { padding: 12px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
tbody tr.link { cursor: pointer; }
tbody tr.link:hover td { background: #faf9f6; }
th.right, td.right { text-align: right; }
tfoot td { border-bottom: 0; background: #fbfaf7; }
tr.total td { font-weight: 750; font-size: 16px; }

/* ── forms ───────────────────────────────────────────── */
label { display: block; font-size: 13px; font-weight: 600; color: #34343a; margin-bottom: 5px; }
input, select, textarea { width: 100%; font: inherit; font-size: 16px; padding: 10px 12px; border: 1px solid #d7d5cf;
                          border-radius: 10px; background: #fff; color: var(--text); min-height: 44px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(212,166,42,.25); }
input[type=checkbox], input[type=radio] { width: 20px; height: 20px; min-height: 0; accent-color: var(--gold); margin: 0; }
textarea { min-height: 80px; }
.field { margin-bottom: 14px; }
.hint { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 14px; }
.inline-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.inline-form > * { flex: 1 1 140px; }
.inline-form > .btn, .inline-form > button { flex: 0 0 auto; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; font-size: 14px; cursor: pointer; }
.choice { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.choice label { display: flex; align-items: center; gap: 8px; border: 1px solid #d7d5cf; border-radius: 10px; padding: 10px 12px;
                margin: 0; cursor: pointer; font-weight: 600; background: #fff; }
.choice label:has(input:checked) { border-color: var(--gold); background: var(--gold-soft); }
details.card > summary { cursor: pointer; font-weight: 650; list-style: none; display: flex; justify-content: space-between; align-items: center; }
details.card > summary::after { content: "+"; font-size: 20px; color: var(--gold-text); }
details.card[open] > summary::after { content: "–"; }
details.card[open] > summary { margin-bottom: 14px; }
@media (max-width: 600px) {
  .grid2, .grid3, .choice { grid-template-columns: 1fr; }
  .hide-sm { display: none; }
  .stat .v { font-size: 20px; }
  h1 { font-size: 20px; }
}

/* ── buttons & badges ────────────────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; padding: 10px 18px;
       border-radius: 10px; border: 1px solid transparent; font: inherit; font-size: 14.5px; font-weight: 650; cursor: pointer;
       white-space: nowrap; text-decoration: none; transition: background .15s, border-color .15s, transform .05s; }
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn svg { width: 18px; height: 18px; }
.btn-primary { background: var(--gold); color: #111; border-color: #b3861a; }
.btn-primary:hover { background: var(--gold-2); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #2a2a30; }
.btn-secondary { background: #fff; color: var(--text); border-color: #d7d5cf; }
.btn-secondary:hover { border-color: var(--gold); }
.btn-green { background: var(--green); color: #fff; }
.btn-green:hover { background: #12692f; }
.btn-danger { background: #fff; color: var(--red); border-color: #f1c4c4; }
.btn-danger:hover { background: var(--red-soft); }
.btn-sm { min-height: 36px; padding: 6px 12px; font-size: 13.5px; }
.btn-block { width: 100%; }
.btn-link { background: none; border: 0; color: var(--red); cursor: pointer; font: inherit; font-size: 13px; padding: 6px; min-height: 0; }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 650; white-space: nowrap; }
.b-green { background: var(--green-soft); color: #166534; } .b-amber { background: var(--amber-soft); color: #8a4b05; }
.b-blue { background: var(--blue-soft); color: #1e40af; } .b-gray { background: #f0efeb; color: #4b4b52; }
.b-red { background: var(--red-soft); color: #9f1d1d; } .b-ecc { background: var(--ink); color: var(--gold-2); }

.flash { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; margin-bottom: 16px; font-size: 14.5px; border: 1px solid; }
.flash.success { background: var(--green-soft); color: #14532d; border-color: #bfe5cb; }
.flash.error { background: var(--red-soft); color: #7f1d1d; border-color: #f3c2c2; }
.flash.warning { background: var(--amber-soft); color: #7a3e04; border-color: #f4d6a3; }

.tabs { display: flex; gap: 6px; margin-bottom: 14px; flex-wrap: wrap; }
.tabs a { padding: 7px 14px; border-radius: 999px; background: #fff; border: 1px solid var(--line); color: var(--text); font-size: 13.5px; font-weight: 600; text-decoration: none; }
.tabs a.on { background: var(--ink); border-color: var(--ink); color: var(--gold-2); }

.quick { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 16px; }
.quick a { display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--line); border-radius: 12px;
           padding: 13px 14px; color: var(--text); font-weight: 600; text-decoration: none; box-shadow: var(--shadow); }
.quick a:hover { border-color: var(--gold); }
.quick a svg { width: 22px; height: 22px; color: var(--gold); flex: none; }

/* ── login ───────────────────────────────────────────── */
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 20px 16px;
              background: radial-gradient(1200px 600px at 50% -10%, #2a2110, #0d0d0f 60%); }
.login-card { width: 100%; max-width: 400px; background: #fff; border-radius: 18px; padding: 26px 24px; box-shadow: 0 20px 60px rgba(0,0,0,.45); }
.login-logo { display: block; width: 100%; max-width: 360px; margin: 0 auto 18px; border-radius: 12px; }
.login-card h1 { font-size: 20px; text-align: center; margin-bottom: 4px; }
.login-card .sub { text-align: center; color: var(--muted); font-size: 14px; margin-bottom: 18px; }

@media print { .side, .topbar, nav.bottom, .actions, form { display: none !important; } main { margin: 0; padding: 0; } }

/* ── phone: tables become stacked cards ──────────────── */
@media (max-width: 600px) {
  table.stack-sm thead { display: none; }
  table.stack-sm tbody tr { display: block; padding: 12px 16px; border-bottom: 1px solid var(--line-2); }
  table.stack-sm td { display: flex; justify-content: space-between; gap: 12px; border: 0; padding: 3px 0; text-align: right; }
  table.stack-sm td::before { content: attr(data-label); color: var(--muted); font-size: 12.5px; font-weight: 600; text-align: left; flex: none; }
  table.stack-sm td.lead { display: block; text-align: left; font-size: 15px; padding-bottom: 4px; }
  table.stack-sm td.lead::before, table.stack-sm td.bare::before { content: none; }
  table.stack-sm td:empty { display: none; }
  table.stack-sm tfoot tr { display: flex; justify-content: space-between; padding: 12px 16px; }
  table.stack-sm tfoot td { padding: 0; }
  table.stack-sm tfoot td:empty, table.stack-sm tfoot td.pad { display: none; }

  /* purchase lines: item on its own row, then qty / cost / amount */
  #lines thead { display: none; }
  #lines tbody tr { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; padding: 12px 0; border-bottom: 1px solid var(--line-2); }
  #lines tbody td { padding: 0; border: 0; }
  #lines tbody td:first-child { grid-column: 1 / -1; }
  #lines tbody td.amt { align-self: center; font-weight: 650; }
  #lines tbody td:last-child { display: none; }
  #lines tbody input[name=qty]::placeholder, #lines tbody input[name=unit_cost]::placeholder { color: #9a9aa2; }
  #lines tfoot tr { display: flex; justify-content: space-between; padding: 10px 0; }
  #lines tfoot td { padding: 0; background: none; }
  #lines tfoot td:empty { display: none; }
}

/* Engine Care: salesman contact and running-low strip */
.ecc-card .ecc-sales { grid-column: 2 / -1; font-size: 13.5px; color: #cfcfd6; margin-top: -4px; }
.ecc-card .ecc-sales b { color: #fff; }
.ecc-card .ecc-sales a { margin-left: 10px; font-weight: 600; }
.low-ecc { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; background: #fff; border: 1px solid #efd78f;
           border-left: 5px solid var(--gold); border-radius: 12px; padding: 12px 14px; margin-bottom: 16px; }
.low-ecc > svg { width: 22px; height: 22px; color: var(--gold-text); flex: none; }
.low-ecc .t { font-size: 11px; font-weight: 700; color: var(--gold-text); letter-spacing: .06em; text-transform: uppercase; margin-bottom: 6px; }
.chip-low { display: inline-block; background: var(--gold-soft); border-radius: 999px; padding: 3px 10px; margin: 0 6px 6px 0; font-size: 13.5px; }
.chip-low b { color: #a15c07; }

/* on/off switch */
.switch { display: flex; align-items: center; gap: 12px; cursor: pointer; font-weight: 500; margin: 0; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .slider { width: 46px; height: 26px; border-radius: 999px; background: #d4d2cc; position: relative; flex: none; transition: background .15s; }
.switch .slider::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: left .15s; }
.switch input:checked + .slider { background: var(--green); }
.switch input:checked + .slider::after { left: 23px; }
.switch input:focus-visible + .slider { outline: 3px solid rgba(201,151,31,.5); outline-offset: 2px; }
.vat-state { font-weight: 700; color: var(--muted); margin-left: 4px; }

/* GarageOS Pro logo */
.gos-name { display: inline-flex; align-items: center; gap: 7px; font-weight: 800; letter-spacing: -.01em; line-height: 1.1; white-space: nowrap; }
.gos-name b { color: var(--gold-2); font-weight: 800; }
.pro-pill { font-size: 10.5px; font-weight: 800; letter-spacing: .12em; background: var(--gold); color: var(--ink); padding: 3px 7px 2px; border-radius: 5px; line-height: 1.2; }
.powered { white-space: nowrap; }
.powered img { height: 15px; width: auto; vertical-align: -3px; margin-right: 5px; }
.powered strong { color: var(--gold-2); font-weight: 700; }
.login-brand { text-align: center; margin-bottom: 18px; }
.login-mark { width: 64px; height: 64px; display: block; margin: 0 auto 10px; }
.login-card .login-brand h1 { font-size: 28px; margin: 0 0 6px; }
.login-brand .gos-name b { color: var(--gold-text); }
.login-brand .powered { font-size: 12px; color: var(--muted); }
.login-brand .powered strong { color: var(--gold-text); }

/* searchable part picker (job card) */
.picker { position: relative; }
.picker-list { position: absolute; left: 0; right: 0; top: 100%; margin: 4px 0 0; padding: 4px; list-style: none; z-index: 40;
               background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 32px rgba(0,0,0,.16);
               max-height: 340px; overflow-y: auto; min-width: min(460px, 92vw); }
.pk-row { display: flex; justify-content: space-between; gap: 12px; padding: 8px 10px; border-radius: 7px; cursor: pointer; }
.pk-row.on, .pk-row:hover { background: var(--gold-soft); }
.pk-row.pk-off { opacity: .55; cursor: not-allowed; }
.pk-name { font-weight: 600; }
.pk-sub { font-size: 12.5px; color: var(--muted); }
.pk-side { text-align: right; white-space: nowrap; }
.pk-free { font-weight: 700; color: var(--green); font-size: 13.5px; }
.pk-none { font-weight: 700; color: var(--red); font-size: 13.5px; }
.pk-empty { padding: 10px; font-size: 13px; color: var(--muted); }

/* duplicate items to merge (stock) */
.dupe-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap;
            padding: 8px 0; border-top: 1px solid #efd78f; font-size: 14px; }

/* home: cars in the garage first, then one money card */
.btn-big { min-height: 50px; padding: 12px 22px; font-size: 16px; }
.stage-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 18px 12px; }
.stage-chip { font-size: 13px; padding: 4px 10px; border-radius: 999px; background: #f0efeb; color: #4b4b52; }
.stage-chip b { font-size: 14px; }
.st-waiting { background: #f0efeb; color: #4b4b52; }
.st-in_progress { background: var(--blue-soft); color: #1e40af; }
.st-waiting_parts { background: var(--amber-soft); color: #8a4b05; }
.st-ready { background: var(--green-soft); color: #166534; }
.money-card { display: block; color: inherit; text-decoration: none; }
a.money-card:hover { border-color: var(--gold); text-decoration: none; }
.mc-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 12px; }
.mc-head .with-icon { display: inline-flex; align-items: center; gap: 8px; }
.mc-head svg { width: 19px; height: 19px; color: var(--gold); }
.mc-sum { display: grid; grid-template-columns: 1fr 1fr auto 1fr auto 1fr; gap: 10px; align-items: start; }
.mc-sum .l { font-size: 12px; font-weight: 600; color: var(--muted); }
.mc-sum .v { font-size: 21px; font-weight: 750; letter-spacing: -.01em; white-space: nowrap; }
.mc-sum .s { font-size: 12px; color: var(--muted); }
.mc-sum .op { font-size: 22px; color: var(--muted); padding-top: 14px; }
.mc-sum .net { border-radius: 10px; padding: 6px 10px; margin: -6px 0; }
.mc-sum .net.pos { background: var(--green-soft); } .mc-sum .net.pos .v { color: var(--green); }
.mc-sum .net.neg { background: var(--red-soft); } .mc-sum .net.neg .v { color: var(--red); }
@media (max-width: 700px) {
  /* phone: Sales on its own line, then profit − expenses = what's left as a sum */
  .mc-sum { grid-template-columns: 1fr auto 1fr; row-gap: 12px; }
  .mc-sum > div:first-child { grid-column: 1 / -1; }
  .mc-sum > div:first-child .v { font-size: 24px; }
  .mc-sum .eq { display: none; }
  .mc-sum .net { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; margin: 0; }
  .mc-sum .v { font-size: 19px; }
}

/* Car in: plate letters + number pad, then one-tap start */
.plate-letters { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 10px; }
.pl-chip { min-width: 48px; min-height: 48px; border-radius: 10px; border: 1.5px solid var(--ink); background: #fff;
           font: 700 18px/1 ui-monospace, Menlo, monospace; color: var(--ink); cursor: pointer; }
.pl-chip[aria-pressed="true"] { background: var(--ink); color: var(--gold-2); }
.plate-row { display: flex; gap: 8px; }
.plate-row input { flex: 1; min-width: 0; font: 700 24px/1.2 ui-monospace, Menlo, monospace; letter-spacing: .06em; min-height: 54px; }
.plate-row .btn { min-height: 54px; }
#ci-abc[aria-pressed="true"] { background: var(--ink); color: var(--gold-2); }
.ci-car { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
          padding: 12px 18px; border-top: 1px solid var(--line-2); }
.ci-who { flex: 1 1 240px; min-width: 0; }
.ci-who .t { font-weight: 600; } .ci-who .sub { font-size: 13px; color: var(--muted); }
.ci-start { display: flex; gap: 8px; flex: 1 1 260px; max-width: 380px; }
.ci-start input { flex: 1; min-width: 0; }
span.label { display: block; font-size: 13px; font-weight: 600; color: #34343a; margin-bottom: 5px; }
.seg { display: flex; gap: 6px; }
.seg label { flex: 1; display: flex; align-items: center; gap: 6px; border: 1px solid #d7d5cf; border-radius: 10px; padding: 0 10px;
             min-height: 44px; margin: 0; cursor: pointer; font-weight: 600; background: #fff; }
.seg label:has(input:checked) { border-color: var(--gold); background: var(--gold-soft); }
@media (max-width: 600px) { .ci-start { max-width: none; } #ci-go { display: none; } }
.plate-sm { font-size: 12px; padding: 0 5px; border-width: 1px; }
td .plate, .sub .plate { white-space: nowrap; }

/* service packages */
.pkg-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; flex-wrap: wrap; }
.pkg-lines { margin: 10px 0 0; padding-left: 18px; font-size: 14px; }
.pkg-off { opacity: .65; }
.pk-row-edit { display: grid; grid-template-columns: 1fr 110px auto; gap: 0 12px; align-items: end; border-top: 1px solid var(--line-2); padding-top: 10px; }
.pk-swap { margin-bottom: 26px; white-space: nowrap; }
@media (max-width: 600px) { .pk-row-edit { grid-template-columns: 1fr 1fr; } .pk-row-edit .field:first-child { grid-column: 1 / -1; } .pk-swap { margin-bottom: 14px; } }
.quick-pkgs { display: flex; flex-wrap: wrap; gap: 8px; }
.quick-pkgs details { flex: 1 1 100%; }
.pkg-btn { list-style: none; display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 10px 16px; border-radius: 12px;
           border: 1.5px solid var(--gold); background: var(--gold-soft); font-weight: 700; cursor: pointer; }
.pkg-btn::-webkit-details-marker { display: none; }
.pkg-btn .tiny { font-weight: 500; }
details[open] > .pkg-btn { background: var(--gold); color: #111; }
.pkg-apply { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-top: 8px; background: #fff; }
.pkg-apply .pa-row { display: grid; grid-template-columns: 1fr 100px; gap: 10px; align-items: end; margin-bottom: 8px; }
.quick-pkgs:has(details[open]) details:not([open]) { flex: 0 1 auto; }
.quick-pkgs details:not([open]) { flex: 0 1 auto; }

/* offline */
.offline-bar { position: sticky; top: 0; z-index: 25; display: flex; gap: 10px; align-items: flex-start; padding: 10px 16px;
               background: var(--amber-soft); color: #7a3e04; border-bottom: 1px solid #f4d6a3; font-size: 14px; }
.offline-bar[hidden] { display: none; }
.offline-bar svg { width: 20px; height: 20px; flex: none; margin-top: 1px; }
@media (min-width: 960px) { .offline-bar { margin-left: var(--side-w); } }
@media (max-width: 600px) { #ci-new .grid3 > .field { grid-column: auto !important; } }

/* estimates */
.est-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.est-card .badge svg { width: 13px; height: 13px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.est-page { background: var(--bg); }
.est-top { background: var(--ink); color: #fff; border-bottom: 2px solid var(--gold); }
.est-top .in { max-width: 640px; margin: 0 auto; padding: 14px 16px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.est-top .g { font-weight: 700; font-size: 17px; } .est-top a { color: var(--gold-2); }
.est-main { max-width: 640px; margin: 0 auto; padding: 18px 16px 40px; }
.est-main .sub { color: var(--muted); margin: 4px 0 14px; }
.est-total { text-align: right; padding: 14px 18px; background: #fbfaf7; border-top: 1px solid var(--line); }
.est-total .big { font-size: 22px; font-weight: 750; }
.est-actions { display: grid; gap: 10px; margin: 16px 0 8px; }
.est-actions .btn-link { color: var(--muted); font-size: 14px; }
.est-foot { text-align: center; font-size: 12px; color: var(--muted); margin-top: 30px; }
.est-foot strong { color: var(--gold-text); }

/* inspection */
.chk-row { display: grid; grid-template-columns: 110px auto 1fr; gap: 8px 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line-2); }
.chk-name { font-weight: 600; }
.chk-seg label { flex: 0 0 auto; min-height: 40px; padding: 0 10px; font-size: 14px; }
.chk-seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chk-seg label:has(input:focus-visible) { outline: 3px solid rgba(201,151,31,.5); }
.chk-seg .chk-ok:has(input:checked) { background: var(--green-soft); border-color: var(--green); color: #166534; }
.chk-seg .chk-soon:has(input:checked) { background: var(--amber-soft); border-color: var(--amber); color: #8a4b05; }
.chk-seg .chk-now:has(input:checked) { background: var(--red-soft); border-color: var(--red); color: #9f1d1d; }
.chk-seg .chk-none { color: var(--muted); }
.chk-seg .chk-none:has(input:checked) { background: #f0efeb; border-color: #d7d5cf; }
@media (max-width: 600px) { .chk-row { grid-template-columns: 1fr; gap: 6px; } .chk-seg label { flex: 1; justify-content: center; } }

/* bookings */
.bk-time { font: 700 14px ui-monospace, Menlo, monospace; background: var(--ink); color: var(--gold-2); border-radius: 6px; padding: 1px 6px; }
.bk-day { padding: 8px 18px; font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); background: #fbfaf7; border-top: 1px solid var(--line); }

/* ECC rewards */
.ecc-rewards { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; padding: 4px 10px; border-radius: 999px;
               background: rgba(227,179,65,.16); color: var(--gold-2) !important; font-size: 13.5px; font-weight: 500; }
.ecc-rewards svg { width: 15px; height: 15px; } .ecc-rewards b { color: #fff; }
.rw-hero { background: linear-gradient(120deg, #0d0d0f 55%, #2a2110); color: #fff; border-radius: var(--radius); padding: 20px; margin-bottom: 16px;
           box-shadow: 0 6px 24px rgba(0,0,0,.18); border-top: 4px solid var(--silver); }
.rw-hero.lvl-gold, .rw-hero.lvl-platinum { border-top-color: var(--gold-2); } .rw-hero.lvl-member { border-top-color: #55555c; }
.rw-level { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--gold-2); }
.rw-level svg { width: 16px; height: 16px; }
.rw-points { font-size: 40px; font-weight: 750; letter-spacing: -.02em; line-height: 1.15; margin-top: 4px; }
.rw-points span { font-size: 16px; font-weight: 500; color: #c9c9cf; letter-spacing: 0; }
.rw-worth { color: #c9c9cf; font-size: 14px; }
.rw-bar { height: 8px; border-radius: 999px; background: #2c2c33; margin: 14px 0 6px; overflow: hidden; }
.rw-bar i { display: block; height: 100%; background: var(--gold-2); border-radius: 999px; }
.rw-next { font-size: 13px; color: #c9c9cf; } .rw-next b { color: #fff; }
.rw-of { font-size: 15px; font-weight: 500; color: var(--muted); }

/* activity log */
.act-row { align-items: flex-start; }
.act-more summary { cursor: pointer; font-size: 12.5px; color: var(--gold-text); margin-top: 4px; }
.act-more pre { white-space: pre-wrap; word-break: break-word; font-size: 11.5px; background: var(--bg); border: 1px solid var(--line);
                border-radius: 8px; padding: 8px; max-height: 260px; overflow: auto; margin: 6px 0 0; }

/* phone touch targets and wrapping (QA audit) */
@media (max-width: 600px) {
  .btn-link { min-height: 44px; min-width: 44px; }
  .ecc-rewards { display: flex; flex-wrap: wrap; white-space: normal; line-height: 1.35; border-radius: 12px; }
}

/* ── job: complaint and work, car check-in sheet ─────── */
.sum-note { flex: 1; margin: 0 12px 0 10px; font-weight: 400; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
details.card[open] > summary .sum-note { display: none; }
.story-read > div { padding: 3px 0; white-space: pre-line; }
.pick-seg { flex-wrap: wrap; }
.pick-seg label { flex: 0 0 auto; justify-content: center; min-width: 56px; }
.pick-seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pick-seg label:has(input:focus-visible), .chip-pick:has(input:focus-visible) { outline: 3px solid rgba(201,151,31,.5); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-pick { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px; margin: 0; border: 1px solid #d7d5cf;
             border-radius: 999px; background: #fff; font-weight: 600; font-size: 14px; cursor: pointer; }
.chip-pick input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip-pick:has(input:checked) { border-color: var(--gold); background: var(--gold-soft); }
.chip-pick:has(input:checked)::before { content: "✓"; color: var(--gold-text); }
.chip-pick.warn:has(input:checked) { border-color: var(--red); background: var(--red-soft); color: #9f1d1d; }
.chip-pick.warn:has(input:checked)::before { content: "!"; color: var(--red); font-weight: 800; }
.dmg-types label:has(input:checked) { border-color: var(--red); background: var(--red-soft); color: #9f1d1d; }
.dmg-wrap { max-width: 560px; margin: 10px 0 6px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); padding: 6px; }
.dmg-wrap.read { max-width: 420px; margin-top: 12px; }
.car-diagram { display: block; width: 100%; height: auto; color: #8a8a92; }
.car-diagram.editable { cursor: crosshair; touch-action: manipulation; }
.car-labels { color: var(--muted); }
.dmg-mark circle { fill: var(--red); stroke: #fff; stroke-width: 1.5; }
.dmg-mark text { fill: #fff; font-family: inherit; pointer-events: none; }
.car-diagram.editable .dmg-mark { cursor: pointer; }
.actions-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

/* ── printable check-in sheet ────────────────────────── */
.sheet-page { background: var(--bg); }
.sheet-tools { max-width: 800px; margin: 16px auto 0; padding: 0 16px; display: flex; justify-content: space-between; gap: 10px; }
.sheet { max-width: 800px; margin: 12px auto 24px; padding: 28px 32px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.sheet-head { display: flex; justify-content: space-between; gap: 16px; border-bottom: 2px solid var(--gold); padding-bottom: 12px; margin-bottom: 14px; }
.sheet-head h1 { margin: 0; font-size: 22px; }
.sheet-garage { font-size: 20px; font-weight: 750; }
.sheet h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--gold-text); margin: 18px 0 6px; }
.sheet .pre { white-space: pre-line; margin: 0; }
.sheet-facts { width: 100%; border-collapse: collapse; font-size: 14px; }
.sheet-facts th, .sheet-facts td { text-align: left; padding: 6px 8px; border: 1px solid var(--line); vertical-align: top; }
.sheet-facts th { width: 16%; background: #faf9f6; color: var(--muted); font-weight: 600; }
.sheet-dmg { max-width: 520px; }
.sheet-terms { margin-top: 22px; }
.sheet-sigs { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-top: 34px; font-size: 13px; color: var(--muted); }
.sig-line { border-bottom: 1px solid #9a9aa0; height: 36px; margin-bottom: 4px; }
.sheet-foot { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 28px; padding-top: 10px;
              border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.sheet-foot .mark { width: 18px; height: 18px; }
.sheet-foot .powered { margin: 0; }
@media (max-width: 600px) { .sheet { padding: 18px 16px; border-radius: 0; } .sheet-head { flex-direction: column; } .sheet-facts th { width: 30%; } }
@media print {
  .no-print { display: none !important; }
  .sheet-page { background: #fff; }
  .sheet { border: 0; margin: 0; padding: 0; max-width: none; }
  .dmg-mark circle { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
