:root {
  --navy: #16324f;
  --blue-border: #8fb0d4;
  --ink: #1c2733;
  --muted: #000;
  --bg: #f5f7fa;
  --amber-bg: #fff7e6;
  --amber-border: #e3b341;
}
* { box-sizing: border-box; }
/* Never let page content widen the layout past the screen: on mobile that
   drags the fixed menu bar's right edge (and the Menu button) off-screen
   and leaves the slide-in sidebar anchored to the widened layout. Wide
   blocks scroll inside themselves instead (tables below, board, tiles).
   "clip" (not "hidden") so position:sticky keeps working. */
html, body { overflow-x: clip; }
body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
}
/* ---------- left sidebar layout ---------- */
.sidebar {
  position: fixed; left: 0; top: 0; bottom: 0; width: 232px; z-index: 40;
  background: var(--navy); color: #fff;
  display: flex; flex-direction: column; padding: 20px 16px;
}
.side-brand { font-weight: 700; font-size: 1.1rem; padding: 2px 8px 18px; }
.side-brand span { display: block; font-weight: 400; opacity: .8; font-size: .85rem; margin-top: 2px; }
.side-nav { display: flex; flex-direction: column; gap: 6px; }
.side-nav a {
  color: #fff; text-decoration: none; font-weight: 600; font-size: .98rem;
  padding: 10px 12px; border-radius: 8px;
}
.side-nav a:hover { background: rgba(255,255,255,.14); text-decoration: none; }
.side-nav a.active { background: #fff; color: var(--navy); font-weight: 700; }
.side-nav a.book-btn {
  background: var(--amber-border); color: var(--navy); font-weight: 700;
  text-align: center; margin-top: 14px;
}
.side-nav a.book-btn:hover { background: #eec96a; }
.side-foot { margin-top: auto; padding: 14px 8px 2px; }
.side-foot .signed-in { font-size: .82rem; opacity: .75; margin-bottom: 8px; }
.side-foot a { color: #fff; font-weight: 600; text-decoration: none; font-size: .95rem; }
.side-foot a:hover { text-decoration: underline; }
body.has-sidebar { padding-left: 232px; }
/* ---------- shop staff host (shop.aukesgroup.com): no sidebar, one slim
   top strip instead — brand links back to the staff index, Log Out on the
   right. The customer portal host keeps the sidebar exactly as before. */
.staffbar {
  display: flex; justify-content: space-between; align-items: center;
  background: #fff; border-bottom: 1px solid var(--blue-border);
  padding: 12px 18px;
}
.staffbar-brand { font-weight: 700; font-size: 1.05rem; color: var(--navy); text-decoration: none; }
.staffbar-brand span { font-weight: 400; opacity: .75; font-size: .88rem; margin-left: 6px; }
.staffbar-right { display: flex; align-items: center; gap: 16px; font-size: .9rem; }
.staffbar-right a { color: var(--navy); font-weight: 600; text-decoration: none; }
.staffbar-right a:hover { text-decoration: underline; }
.mobilebar { display: none; }
.scrim { display: none; }

@media (max-width: 860px) {
  body.has-sidebar { padding-left: 0; padding-top: 54px; }
  .mobilebar {
    display: flex; justify-content: space-between; align-items: center;
    position: fixed; top: 0; left: 0; right: 0; height: 54px; z-index: 45;
    background: var(--navy); color: #fff; padding: 0 14px;
  }
  .mobilebar .brand { font-weight: 700; font-size: 1rem; }
  .mobilebar .brand span { font-weight: 400; opacity: .8; margin-left: 6px; font-size: .85rem; }
  .menu-btn {
    background: #fff; color: var(--navy); border: none; font-weight: 700;
    padding: 7px 13px; border-radius: 8px; font-size: .92rem; cursor: pointer;
  }
  .sidebar {
    top: 54px; width: 248px; box-shadow: 2px 0 14px rgba(0,0,0,.3);
    transform: translateX(-105%); transition: transform .22s ease;
  }
  .sidebar.open { transform: none; }
  .scrim.show {
    display: block; position: fixed; left: 0; right: 0; bottom: 0; top: 54px;
    background: rgba(10,20,32,.45); z-index: 39;
  }
  /* Wide tables scroll inside their own box whenever the mobile layout is
     on, instead of widening the page (this used to start only at 640px,
     leaving 641-860px screens — e.g. an unfolded phone — overflowing). */
  table.grid { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .wrap { min-width: 0; }
  .panel, .unit-card { min-width: 0; }
}
.wrap { max-width: 1020px; margin: 0 auto; padding: 26px 18px 40px; }
.foot {
  text-align: center; color: var(--muted); font-size: .82rem;
  padding: 18px 10px 26px;
}
.flash {
  background: #fdecec; border: 1px solid #e5a3a3; color: #7a1f1f;
  padding: 10px 14px; border-radius: 8px; margin-bottom: 16px;
}
/* Admin "View as" banner (Nov 28, 2026): renders only in an admin
   session carrying a customer scope — never for real customers.
   Sticky so the Exit view action stays on screen while scrolling. */
.view-as-banner {
  background: #ffe9a8; border: 1px solid #d9a514; color: #4a3600;
  padding: 10px 14px; border-radius: 8px; margin-bottom: 16px;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  position: sticky; top: 8px; z-index: 5;
}
.view-as-banner form { margin: 0 0 0 auto; }
.page-head .eyebrow {
  text-transform: uppercase; letter-spacing: .12em; font-size: .75rem;
  color: var(--navy); font-weight: 700;
}
.page-head h1 { margin: 4px 0 6px; font-size: 1.7rem; }
.meta { color: var(--muted); margin: 2px 0; font-size: .93rem; }
.note { color: var(--muted); font-size: .9rem; }
.note-dark { color: #000; font-size: .95rem; font-weight: 600; }
.statbar {
  display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 22px;
}
.stat {
  background: var(--navy); color: #fff; border-radius: 10px;
  padding: 12px 18px; min-width: 150px; flex: 1;
}
.stat .k { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; opacity: .85; }
.stat .v { display: block; font-size: 1.25rem; font-weight: 700; margin-top: 3px; }
.panel {
  background: #fff; border: 1px solid #dde5ec; border-radius: 12px;
  padding: 18px 20px; margin-bottom: 22px;
}
.panel h2 { margin-top: 0; font-size: 1.15rem; }
table.grid { width: 100%; border-collapse: collapse; background: #fff; }
table.grid th, table.grid td { padding: 8px 10px; border-bottom: 1px solid #e3eaf1; text-align: left; font-size: .94rem; }
table.grid th { background: #eef3f8; color: var(--navy); }
td.r, th.r { text-align: right; }
table.kv { border-collapse: collapse; }
table.kv th { text-align: left; padding: 5px 14px 5px 0; color: var(--navy); font-size: .93rem; }
table.kv td { padding: 5px 0; font-size: .93rem; }
.unit-card {
  background: #fff; border: 3px solid var(--navy); border-radius: 12px;
  padding: 16px 20px; margin-bottom: 16px;
}
.unit-card .meta { color: #20262b; }
.visit-line { display: flex; justify-content: space-between; align-items: baseline; gap: 8px 16px; flex-wrap: wrap; }
.oil-due { font-weight: 800; font-size: 1.3rem; color: var(--navy); white-space: nowrap; }
.due-now { display: inline-block; background: #c1272d; color: #fff; font-weight: 800; font-size: 1.05rem; letter-spacing: .04em; padding: 3px 12px; border-radius: 4px; margin-left: 10px; vertical-align: middle; white-space: nowrap; }
.outside-line { display: flex; justify-content: space-between; align-items: center; gap: 12px; background: var(--surface-muted, #eef3f8); border-left: 4px solid var(--navy); border-radius: 6px; padding: 8px 12px; margin: 10px 0 4px; font-size: .92rem; color: var(--ink); }
.inline-form { display: inline; margin: 0; }
.link-btn { background: none; border: none; padding: 0; color: var(--navy); font: inherit; font-size: .85rem; text-decoration: underline; cursor: pointer; white-space: nowrap; }
.outside-actions { display: flex; gap: 12px; align-items: center; flex-shrink: 0; }
.outside-actions a.link-btn { font-weight: 600; }
.attach-form { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 0 0 8px; font-size: .85rem; font-weight: 600; color: var(--ink); }
.attach-form input[type="file"] { font-size: .85rem; font-weight: 400; max-width: 250px; }
.attach-form input[type="number"] { width: 110px; padding: 5px 8px; border: 1px solid #c3d0dd; border-radius: 8px; font-size: .9rem; }
.report-box { margin: 10px 0 4px; text-align: right; }
.report-form { text-align: left; }
.report-box summary { cursor: pointer; display: inline-block; list-style: none; }
.report-box summary::-webkit-details-marker { display: none; }
.report-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; margin-top: 10px; padding: 12px; border: 1px solid #c3d0dd; border-radius: 8px; }
.report-form .note { flex-basis: 100%; margin: 0; }
.report-form label { display: flex; flex-direction: column; gap: 4px; font-size: .85rem; font-weight: 600; color: var(--ink); }
.report-form input { padding: 8px 10px; border: 1px solid #c3d0dd; border-radius: 8px; font-size: .95rem; }
.unit-top { display: flex; justify-content: space-between; align-items: baseline; }
.unit-label { font-size: .8rem; font-weight: 700; color: var(--navy); text-transform: uppercase; letter-spacing: .05em; }
.unit-label.warn { color: #8a6d00; background: var(--amber-bg); border: 1px solid var(--amber-border); padding: 2px 8px; border-radius: 20px; text-transform: none; letter-spacing: 0; }
.unit-spend { font-weight: 700; display: flex; flex-direction: column; text-align: right; line-height: 1.35; }
.unit-spend .spend-line { white-space: nowrap; }
.unit-card h3 { margin: 6px 0 4px; font-size: 1.15rem; }
.rec-box {
  background: var(--amber-bg); border: 1px solid var(--amber-border);
  border-radius: 10px; padding: 12px 14px; margin-top: 12px;
}
.rec-head { font-weight: 700; margin-bottom: 6px; }
.rec-group { font-weight: 700; color: var(--navy); margin: 10px 0 4px; font-size: .92rem; }
table.rec-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
table.rec-table td { padding: 4px 6px; border-bottom: 1px dotted #d8c690; vertical-align: top; }
table.rec-table td.r { text-align: right; white-space: nowrap; }
table.rec-table tr.subtotal td { font-weight: 700; border-bottom: none; }
.rec-total { font-weight: 700; margin-top: 10px; }
.btn {
  display: inline-block; background: var(--navy); color: #fff; text-decoration: none;
  padding: 8px 14px; border-radius: 8px; font-size: .92rem; border: none; cursor: pointer;
}
.btn.small { padding: 4px 10px; font-size: .83rem; }
.btn.ghost { background: #fff; color: var(--navy); border: 1px solid var(--navy); }
.btn.back-btn {
  background: var(--navy); color: #fff; border: 1px solid var(--navy);
  padding: 13px 24px; font-size: 1.08rem; border-radius: 10px;
}
.search { display: flex; gap: 8px; margin-bottom: 14px; }
.search input { flex: 1; padding: 9px 12px; border: 1px solid #c3d0dd; border-radius: 8px; font-size: .95rem; }
.search button { background: var(--navy); color: #fff; border: none; border-radius: 8px; padding: 9px 16px; cursor: pointer; }
.search .clear { align-self: center; }
.invite-url { width: 100%; min-width: 240px; padding: 5px 8px; border: 1px solid #c3d0dd; border-radius: 6px; font-size: .78rem; color: var(--muted); }
.unit-card h3 a { color: inherit; text-decoration: none; }
.unit-card h3 a:hover { color: var(--navy); text-decoration: underline; }
.unit-name-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.tag { background: #dcefe2; border: 1px solid #7fb98d; color: #205c31; padding: 3px 10px; border-radius: 20px; font-size: .82rem; }
.tag.muted { background: #eef1f4; border-color: #b9c4cf; color: #5a6a78; }
#customer-filter { width: 100%; max-width: 420px; padding: 7px 10px; border: 1px solid #c3d0dd; border-radius: 6px; font-size: .9rem; }
.login-card {
  max-width: 420px; margin: 60px auto; background: #fff; border: 1px solid #dde5ec;
  border-radius: 14px; padding: 28px 30px;
}
.pw-form { display: flex; gap: 6px; align-items: center; }
.pw-form input {
  padding: 6px 9px; border: 1px solid #c3d0dd; border-radius: 6px; font-size: .9rem;
}
.login-logo {
  display: block; margin: 0 auto 16px; max-width: 280px; width: 100%; height: auto;
}
.login-card h1 { margin: 0 0 4px; color: var(--navy); text-align: center; }
.login-card .sub { text-align: center; }
.login-card .sub { color: var(--muted); margin-top: 0; }
.login-card label { display: block; margin: 14px 0 4px; font-size: .92rem; font-weight: 600; }
.login-card input {
  width: 100%; padding: 10px 12px; border: 1px solid #c3d0dd; border-radius: 8px; font-size: 1rem;
}
.login-card button {
  width: 100%; margin-top: 18px; background: var(--navy); color: #fff; border: none;
  padding: 11px; border-radius: 8px; font-size: 1rem; cursor: pointer;
}

/* ---------- mobile ---------- */
@media (max-width: 640px) {
  .wrap { padding: 18px 12px 32px; }
  .page-head h1 { font-size: 1.4rem; }
  .stat { min-width: 128px; padding: 10px 14px; }
  .unit-card { padding: 14px; }
  .oil-due { white-space: normal; font-size: 1.15rem; }
  table.grid { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .login-card { margin: 24px auto; padding: 22px 18px; }
  .invite-url { min-width: 0; }
}

.rec-insp { margin: 6px 0 2px; }

/* Oil Call List (admin) */
.nowrap { white-space: nowrap; }
.oil-tile .oil-facts { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.oil-tile.oil-done { opacity: .55; }
.oil-due-soon { font-weight: 700; color: var(--navy); white-space: nowrap; }
form.oil-form { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
form.oil-form select, form.oil-form input[type="text"] { padding: 5px 8px; border: 1px solid #c3d0dd; border-radius: 8px; font-size: .9rem; }
form.oil-form input[type="text"] { width: 150px; }

/* Loaner Vehicle (Nov 29, 2026) */
.loaner-form label { display: block; margin: 12px 0; font-weight: 600; }
.loaner-form input[type="text"], .loaner-form input[type="date"], .loaner-form select {
  display: block; width: 100%; max-width: 520px; margin-top: 4px;
  padding: 9px 10px; border: 1px solid #c3d0dd; border-radius: 8px;
  font-size: .95rem; font-weight: 400; background: #fff;
}
.loaner-form input[type="file"] { display: block; margin-top: 6px; font-size: 1rem; }
.loaner-facts span { margin-right: 14px; }
.loaner-warn { color: #9c2b2b; font-weight: 600; }
.loaner-error { background: #fdecec; border: 1px solid #e5a3a3; color: #7c1d1d; }
.linkbox { display: flex; gap: 8px; align-items: center; }
.linkbox input { flex: 1; padding: 8px 10px; border: 1px solid #c3d0dd; border-radius: 8px; font-size: .9rem; }
.sigpad-wrap { display: block; max-width: 520px; }
canvas.sigpad {
  width: 100%; height: 180px; display: block; background: #fff;
  border: 1.5px solid #7d8ea0; border-radius: 8px; touch-action: none;
}
.loaner-photos { display: flex; flex-wrap: wrap; gap: 16px; }
.loaner-photos figure { margin: 0; max-width: 300px; }
.loaner-photos img { max-width: 100%; border: 1px solid #c3d0dd; border-radius: 8px; }
.loaner-photos img.sig-img { background: #fff; padding: 6px; }
.loaner-photos figcaption { font-size: .85rem; color: #5a6a78; margin-top: 4px; }
.loaner-agreement-text p { font-size: .92rem; line-height: 1.45; text-align: justify; }
.loaner-initial-row { display: flex; gap: 10px; align-items: flex-start; margin: 12px 0; }
.loaner-initial-row .initials-input {
  flex: 0 0 74px; width: 74px; padding: 9px 8px; font-size: 1rem;
  border: 1px solid #c3d0dd; border-radius: 8px; text-transform: uppercase;
}
.loaner-agree { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
.loaner-agree input[type="checkbox"] { width: 22px; height: 22px; flex: 0 0 22px; margin-top: 2px; }
.loaner-submit { width: 100%; padding: 14px; font-size: 1.05rem; margin-top: 10px; }
.loaner-sign-form label { font-size: 1rem; }
.loaner-sign-form input[type="text"] { max-width: none; font-size: 1.05rem; padding: 12px; }

/* Shop staff hub (shop.aukesgroup.com root, Dec 3, 2026): three big
   entry cards for the daily staff tools. */
.hub-grid {
  display: grid; gap: 14px; margin: 18px 0 22px;
  grid-template-columns: repeat(3, 1fr);
}
.hub-card {
  display: flex; flex-direction: column; gap: 6px;
  background: #fff; border: 1px solid var(--blue-border); border-radius: 12px;
  padding: 20px 18px; text-decoration: none; color: var(--ink);
}
.hub-card:hover { border-color: var(--navy); box-shadow: 0 2px 10px rgba(22,50,79,.15); text-decoration: none; }
.hub-name { font-size: 1.25rem; font-weight: 700; color: var(--navy); }
.hub-desc { font-size: .93rem; }
.hub-go { margin-top: auto; font-weight: 700; color: var(--navy); font-size: .92rem; }
@media (max-width: 860px) {
  .hub-grid { grid-template-columns: 1fr; }
}
