/* =====================================================================
   Shree Balaji Automobile — all styles (website + staff panel)
   1) Shared  2) Customer website  3) Staff / owner panel
   Colours and fonts are set once here. Change them in :root.
   ===================================================================== */
:root {
  --ink: #13203a;          /* workshop navy */
  --ink-2: #1f2f50;
  --marigold: #f4a51c;     /* brand accent */
  --marigold-deep: #c98200;
  --marigold-soft: #fff3da;
  --paper: #f4f6f9;
  --white: #ffffff;
  --line: #dde2ea;
  --text: #1b2433;
  --muted: #5d6878;
  --green: #1b8a4b;
  --green-soft: #e4f5ea;
  --red: #c33a2c;
  --red-soft: #fdecea;
  --blue: #1f3fa6;
  --blue-soft: #e8edfb;
  --radius-s: 6px;
  --radius-m: 10px;
  --radius-l: 16px;
  --shadow: 0 1px 2px rgba(19, 32, 58, 0.06), 0 6px 20px rgba(19, 32, 58, 0.07);
  --font-head: 'Archivo', 'Segoe UI', system-ui, sans-serif;
  --font-body: 'Hind', 'Segoe UI', system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  color: var(--text);
  background: var(--paper);
}
img {
  max-width: 100%;
  display: block;
}
h1,
h2,
h3,
h4 {
  font-family: var(--font-head);
  line-height: 1.15;
  margin: 0 0 0.4em;
  color: var(--ink);
  letter-spacing: -0.01em;
}
p {
  margin: 0 0 1em;
}
a {
  color: var(--blue);
}
:focus-visible {
  outline: 3px solid var(--marigold);
  outline-offset: 2px;
}
.wrap {
  width: min(1160px, 100% - 32px);
  margin-inline: auto;
}
.muted {
  color: var(--muted);
}
.small {
  font-size: 14px;
}
.hidden {
  display: none !important;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.num {
  font-variant-numeric: tabular-nums;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 10px 20px;
  border: 2px solid transparent;
  border-radius: var(--radius-m);
  font: 600 16px/1 var(--font-head);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  white-space: nowrap;
}
.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.btn-primary {
  background: var(--marigold);
  color: var(--ink);
}
.btn-primary:hover:not(:disabled) {
  background: #ffb52e;
}
.btn-dark {
  background: var(--ink);
  color: #fff;
}
.btn-dark:hover:not(:disabled) {
  background: var(--ink-2);
}
.btn-line {
  background: var(--white);
  border-color: var(--line);
  color: var(--ink);
}
.btn-line:hover:not(:disabled) {
  border-color: var(--ink);
}
.btn-wa {
  background: var(--green);
  color: #fff;
}
.btn-wa:hover:not(:disabled) {
  background: #167a41;
}
.btn-danger {
  background: var(--white);
  border-color: #efc2bd;
  color: var(--red);
}
.btn-danger:hover:not(:disabled) {
  background: var(--red-soft);
}
.btn-sm {
  min-height: 36px;
  padding: 6px 12px;
  font-size: 14px;
  border-radius: var(--radius-s);
}
.btn-block {
  width: 100%;
}
.icon {
  width: 20px;
  height: 20px;
  flex: none;
}

/* ---------- Forms ---------- */
.field {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
}
.field label,
.label {
  font-weight: 600;
  font-size: 15px;
  color: var(--ink);
}
.field .hint {
  font-size: 13px;
  color: var(--muted);
}
input[type='text'],
input[type='tel'],
input[type='email'],
input[type='number'],
input[type='date'],
input[type='time'],
input[type='password'],
input[type='url'],
input[type='month'],
input[type='search'],
select,
textarea {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-m);
  background: var(--white);
  font: inherit;
  font-size: 16px;
  color: var(--text);
}
textarea {
  min-height: 80px;
  resize: vertical;
}
input:focus,
select:focus,
textarea:focus {
  border-color: var(--ink);
  outline: none;
  box-shadow: 0 0 0 3px rgba(244, 165, 28, 0.35);
}
.row {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}
.check {
  display: flex;
  gap: 10px;
  align-items: center;
  cursor: pointer;
}
.check input {
  width: 20px;
  height: 20px;
  accent-color: var(--ink);
}

/* ---------- Alerts & badges ---------- */
.alert {
  padding: 12px 14px;
  border-radius: var(--radius-m);
  margin: 0 0 14px;
  font-size: 15px;
  border-left: 4px solid;
}
.alert-error {
  background: var(--red-soft);
  border-color: var(--red);
  color: #7a1f16;
}
.alert-ok {
  background: var(--green-soft);
  border-color: var(--green);
  color: #0f5530;
}
.alert-info {
  background: var(--marigold-soft);
  border-color: var(--marigold);
  color: #6b4700;
}
.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  background: #eceff4;
  color: var(--ink);
}
.b-booked { background: var(--blue-soft); color: var(--blue); }
.b-checked-in, .b-in-progress, .b-waiting-for-parts { background: var(--marigold-soft); color: #7a5200; }
.b-ready-for-pickup { background: #e2f4f7; color: #0d6a7a; }
.b-delivered, .b-paid { background: var(--green-soft); color: var(--green); }
.b-cancelled, .b-unpaid, .b-refunded { background: var(--red-soft); color: var(--red); }
.b-partly-paid { background: var(--marigold-soft); color: #7a5200; }

/* ---------- Dialog ---------- */
dialog {
  width: min(720px, 100% - 24px);
  max-height: calc(100dvh - 24px);
  padding: 0;
  border: 0;
  border-radius: var(--radius-l);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  color: var(--text);
  overflow: auto;
}
dialog::backdrop {
  background: rgba(19, 32, 58, 0.6);
}
.dlg-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}
.dlg-head h2 {
  font-size: 21px;
  margin: 0;
}
.dlg-body {
  padding: 20px;
}
.dlg-foot {
  position: sticky;
  bottom: 0;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  padding: 14px 20px;
  background: var(--white);
  border-top: 1px solid var(--line);
}
.x-btn {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: var(--radius-s);
  background: #eef1f5;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  color: var(--ink);
}
.x-btn:hover {
  background: #e1e6ee;
}

/* ---------- Toast ---------- */
.toast-box {
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  z-index: 100;
  display: grid;
  gap: 8px;
  width: min(420px, 100% - 24px);
}
.toast {
  padding: 12px 16px;
  border-radius: var(--radius-m);
  background: var(--ink);
  color: #fff;
  box-shadow: var(--shadow);
  font-size: 15px;
  animation: toast-in 0.2s ease-out;
}
.toast.err {
  background: var(--red);
}
@keyframes toast-in {
  from { opacity: 0; transform: translateY(8px); }
}

/* ---------- Tables ---------- */
.table-wrap {
  overflow-x: auto;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}
th,
td {
  padding: 11px 12px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
th {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 13px;
  color: var(--muted);
  background: #f8f9fb;
  white-space: nowrap;
}
tr:last-child td {
  border-bottom: 0;
}
td.right,
th.right {
  text-align: right;
}
.empty {
  padding: 36px 16px;
  text-align: center;
  color: var(--muted);
}

/* ---------- Number plate (Indian HSRP style) ---------- */
.plate {
  display: inline-flex;
  align-items: stretch;
  border: 3px solid #111;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
  font-family: var(--font-head);
  font-weight: 800;
  font-stretch: 85%;
  letter-spacing: 0.04em;
  color: #111;
}
.plate .ind {
  display: grid;
  place-items: center;
  padding: 0 6px;
  background: var(--blue);
  color: #fff;
  font-size: 0.42em;
  letter-spacing: 0.05em;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}
.plate .reg {
  padding: 0.1em 0.45em;
  white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- Print: only the document ---------- */
.print-area {
  display: none;
}
@media print {
  @page {
    margin: 12mm;
  }
  body {
    background: #fff !important;
  }
  body.printing > *:not(.print-area) {
    display: none !important;
  }
  body.printing .print-area {
    display: block !important;
  }
}


/* =====================================================================
   Customer website styles
   ===================================================================== */

/* ---------- Header ---------- */
.top {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--ink);
  color: #fff;
  border-bottom: 3px solid var(--marigold);
}
.top-in {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 68px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  text-decoration: none;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--marigold);
  color: var(--ink);
}
.brand-name {
  display: grid;
  font-family: var(--font-head);
  font-weight: 800;
  font-stretch: 110%;
  font-size: 19px;
  line-height: 1.05;
}
.brand-name small {
  font-size: 12px;
  font-weight: 600;
  color: var(--marigold);
  font-stretch: 100%;
}
.nav {
  display: flex;
  gap: 22px;
  margin-left: auto;
}
.nav a {
  color: #d6dcea;
  text-decoration: none;
  font-weight: 500;
}
.nav a:hover {
  color: #fff;
}
.top-actions {
  display: flex;
  gap: 10px;
}
.top .btn-line {
  background: transparent;
  color: #fff;
  border-color: #3a4a6d;
}
.top .btn-line:hover {
  border-color: #fff;
}

/* ---------- Hero ---------- */
.hero {
  background: var(--ink);
  color: #fff;
  padding: 56px 0 72px;
}
.hero-in {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 48px;
  align-items: center;
}
.hero-hi {
  color: var(--marigold);
  font-size: 19px;
  font-weight: 600;
  margin-bottom: 10px;
}
.hero h1 {
  color: #fff;
  font-size: clamp(36px, 5.4vw, 62px);
  font-weight: 900;
  font-stretch: 112%;
  line-height: 1.02;
  letter-spacing: -0.025em;
  margin-bottom: 18px;
  max-width: 14ch;
}
.hero-sub {
  color: #c9d1e2;
  font-size: 19px;
  max-width: 46ch;
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 24px 0;
}
.hero-facts {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  color: #c9d1e2;
  font-size: 15px;
}
.hero-facts li {
  display: flex;
  align-items: center;
  gap: 6px;
}
.hero-facts .icon {
  color: var(--marigold);
  width: 18px;
  height: 18px;
}

/* Tracker card with number-plate input */
.tracker {
  background: var(--white);
  color: var(--text);
  border-radius: var(--radius-l);
  padding: 26px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  transform: rotate(-1.2deg);
}
.tracker h2 {
  font-size: 26px;
  font-stretch: 105%;
  margin-bottom: 2px;
}
.plate-input {
  display: flex;
  width: 100%;
  margin: 14px 0 16px;
  font-size: 30px;
}
.plate-input input.reg {
  flex: 1;
  min-width: 0;
  border: 0;
  border-radius: 0;
  min-height: 64px;
  padding: 6px 14px;
  font: inherit;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #111;
  background: #fff;
  box-shadow: none;
}
.plate-input input.reg::placeholder {
  color: #b9bfca;
}
.plate-input:focus-within {
  box-shadow: 0 0 0 4px rgba(244, 165, 28, 0.6);
}
#trackMsg:not(:empty) {
  margin-top: 14px;
}

/* ---------- Sections ---------- */
.section {
  padding: 72px 0;
  scroll-margin-top: 70px;
}
.sec-head {
  max-width: 640px;
  margin-bottom: 28px;
}
.sec-head h2 {
  font-size: clamp(28px, 3.6vw, 40px);
  font-weight: 800;
  font-stretch: 108%;
}

/* ---------- Rate card ---------- */
.ratecard {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  overflow: hidden;
}
.rate {
  display: grid;
  grid-template-columns: 1fr auto 110px auto;
  gap: 8px 24px;
  align-items: center;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
}
.rate:last-child {
  border-bottom: 0;
}
.rate h3 {
  font-size: 19px;
  margin: 0 0 2px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.rate p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  max-width: 62ch;
}
.rate .time {
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
}
.rate .price {
  text-align: right;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 22px;
  color: var(--ink);
  white-space: nowrap;
}
.rate .price small {
  display: block;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 12px;
  color: var(--muted);
}
.tag-pop {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--marigold-soft);
  color: #7a5200;
}

/* ---------- Steps (real sequence) ---------- */
.how {
  background: var(--white);
  border-block: 1px solid var(--line);
}
.steps {
  list-style: none;
  counter-reset: step;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
}
.steps li {
  counter-increment: step;
  position: relative;
  padding-top: 58px;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  top: 0;
  left: 0;
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 52px;
  line-height: 1;
  color: var(--marigold);
}
.steps li:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 26px;
  left: 44px;
  right: -14px;
  height: 2px;
  background: repeating-linear-gradient(90deg, var(--line) 0 8px, transparent 8px 14px);
}
.steps h3 {
  font-size: 20px;
}
.steps p {
  color: var(--muted);
  margin: 0;
}

/* ---------- My bookings ---------- */
.bk {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  padding: 20px 22px;
  margin-bottom: 16px;
}
.bk-top {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  align-items: center;
  justify-content: space-between;
}
.bk .plate {
  font-size: 20px;
}
.bk-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  color: var(--muted);
  font-size: 15px;
  margin-top: 10px;
}
.bk-meta strong {
  color: var(--text);
  font-weight: 600;
}
.progress {
  list-style: none;
  padding: 0;
  margin: 18px 0 6px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
}
.progress li {
  font-size: 13px;
  color: var(--muted);
  padding-top: 10px;
  border-top: 5px solid #e3e7ee;
}
.progress li.done {
  border-color: var(--green);
  color: var(--text);
}
.progress li.now {
  border-color: var(--marigold);
  color: var(--ink);
  font-weight: 600;
}
.bk-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}
.empty-box {
  background: var(--white);
  border: 2px dashed var(--line);
  border-radius: var(--radius-l);
  padding: 32px;
  text-align: center;
}
.empty-box p {
  color: var(--muted);
}

/* ---------- Why ---------- */
.why {
  background: var(--marigold-soft);
}
.why-in {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 40px;
}
.why-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 16px;
}
.why-list li {
  padding-left: 30px;
  position: relative;
}
.why-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 7px;
  width: 16px;
  height: 16px;
  border-radius: 4px;
  background: var(--marigold);
}

/* ---------- Contact & footer ---------- */
.contact {
  background: var(--ink);
  color: #fff;
}
.contact h2 {
  color: #fff;
}
.contact .muted {
  color: #b9c3d8;
}
.contact-in {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 40px;
  align-items: center;
}
.addr {
  font-size: 20px;
}
.contact .btn-line {
  background: transparent;
  color: #fff;
  border-color: #3a4a6d;
}
.contact-card {
  background: var(--ink-2);
  border-radius: var(--radius-l);
  padding: 24px;
}
.contact-card dl {
  margin: 0;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px 18px;
}
.contact-card dt {
  color: #b9c3d8;
}
.contact-card dd {
  margin: 0;
  font-weight: 600;
  word-break: break-word;
}
.foot {
  background: #0d1729;
  color: #8f9bb3;
  padding: 18px 0 90px;
  font-size: 14px;
}
.foot-in {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.foot a {
  color: #8f9bb3;
}
.mobile-bar {
  display: none;
}

/* ---------- Booking dialog ---------- */
.stepper {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}
.stepper i {
  width: 36px;
  height: 5px;
  border-radius: 3px;
  background: #e3e7ee;
}
.stepper i.on {
  background: var(--marigold);
}
.pick {
  display: grid;
  gap: 10px;
}
.pick label {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 2px solid var(--line);
  border-radius: var(--radius-m);
  cursor: pointer;
}
.pick label:has(input:checked) {
  border-color: var(--marigold);
  background: var(--marigold-soft);
}
.pick input {
  width: 22px;
  height: 22px;
  accent-color: var(--ink);
}
.pick .p-name {
  font-weight: 600;
}
.pick .p-sub {
  font-size: 14px;
  color: var(--muted);
}
.pick .p-price {
  font-family: var(--font-head);
  font-weight: 800;
  white-space: nowrap;
}
.days {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
  margin-bottom: 14px;
}
.day {
  flex: none;
  min-width: 72px;
  padding: 8px 10px;
  border: 2px solid var(--line);
  border-radius: var(--radius-m);
  background: var(--white);
  font: inherit;
  text-align: center;
  cursor: pointer;
  line-height: 1.2;
}
.day b {
  display: block;
  font-family: var(--font-head);
  font-size: 22px;
}
.day small {
  color: var(--muted);
  font-size: 13px;
}
.day[aria-pressed='true'] {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}
.day[aria-pressed='true'] small {
  color: #c9d1e2;
}
.day:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.slots {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 10px;
}
.slot {
  padding: 12px;
  border: 2px solid var(--line);
  border-radius: var(--radius-m);
  background: var(--white);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.slot b {
  display: block;
  font-weight: 600;
}
.slot small {
  color: var(--green);
  font-size: 13px;
}
.slot[aria-pressed='true'] {
  border-color: var(--marigold);
  background: var(--marigold-soft);
}
.slot:disabled {
  cursor: not-allowed;
  background: #f3f4f6;
  color: #9aa3b1;
}
.slot:disabled small {
  color: #9aa3b1;
}
.summary {
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  overflow: hidden;
}
.summary div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}
.summary div:last-child {
  border-bottom: 0;
}
.summary .total {
  background: var(--ink);
  color: #fff;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 19px;
}
.total-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: var(--radius-m);
  background: var(--paper);
  font-weight: 600;
}
.done {
  text-align: center;
  padding: 10px 0;
}
.done .plate {
  font-size: 34px;
  margin: 14px 0 18px;
}
.done .btn {
  margin: 6px;
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .nav {
    display: none;
  }
  .top-actions {
    margin-left: auto;
  }
  .hero-in,
  .why-in,
  .contact-in {
    grid-template-columns: 1fr;
  }
  .tracker {
    transform: none;
  }
  .steps {
    grid-template-columns: 1fr 1fr;
  }
  .steps li::after {
    display: none;
  }
}
@media (max-width: 640px) {
  body {
    font-size: 16px;
  }
  .top-actions .call-btn span {
    display: none;
  }
  .top-actions [data-book] {
    display: none;
  }
  .hero {
    padding: 36px 0 48px;
  }
  .section {
    padding: 52px 0;
  }
  .rate {
    grid-template-columns: 1fr auto;
    padding: 16px;
  }
  .rate .time {
    grid-row: 2;
    grid-column: 1;
  }
  .rate .btn {
    grid-column: 2;
    grid-row: 2;
  }
  .steps {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .progress {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
  .progress li {
    font-size: 11px;
  }
  .mobile-bar {
    display: flex;
    gap: 8px;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 30;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    background: var(--white);
    border-top: 1px solid var(--line);
    box-shadow: 0 -6px 20px rgba(19, 32, 58, 0.08);
  }
  .mobile-bar .btn-primary {
    flex: 1;
  }
  .dlg-foot .btn {
    flex: 1;
  }
}

/* ---------- Pay a bill ---------- */
#payDlg {
  width: min(460px, 100% - 24px);
}
.pay-amount {
  text-align: center;
  margin-bottom: 16px;
}
.pay-amount span {
  display: block;
  color: var(--muted);
  font-size: 15px;
}
.pay-amount b {
  display: block;
  font-family: var(--font-head);
  font-size: 40px;
  font-weight: 900;
  color: var(--ink);
  line-height: 1.1;
}
.pay-btn {
  min-height: 54px;
  font-size: 18px;
}
.pay-qr {
  text-align: center;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}
.pay-qr svg {
  display: inline-block;
}
#payFoot .btn {
  white-space: normal;
}


/* =====================================================================
   Workshop panel (admin.html) styles
   ===================================================================== */
body.admin-mode {
  font-size: 16px;
}

/* ---------- Login ---------- */
.login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px 16px;
  background: var(--ink);
}
.login-card {
  width: min(430px, 100%);
  background: var(--white);
  border-radius: var(--radius-l);
  padding: 28px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}
.login-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
}
.login-brand strong {
  display: block;
  font-family: var(--font-head);
  font-size: 19px;
  color: var(--ink);
}
.role-pick {
  border: 0;
  padding: 0;
  margin: 0 0 16px;
  display: grid;
  gap: 8px;
}
.role-pick legend {
  margin-bottom: 8px;
}
.role-pick label {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border: 2px solid var(--line);
  border-radius: var(--radius-m);
  cursor: pointer;
}
.role-pick label:has(input:checked) {
  border-color: var(--marigold);
  background: var(--marigold-soft);
}
.role-pick input {
  width: 20px;
  height: 20px;
  accent-color: var(--ink);
}
.role-pick b {
  display: block;
}
.role-pick small {
  color: var(--muted);
  font-size: 13px;
}
#pin {
  font-size: 24px;
  letter-spacing: 0.3em;
  text-align: center;
}

/* ---------- Shell ---------- */
.app {
  display: grid;
  grid-template-columns: 248px 1fr;
  min-height: 100vh;
}
.side {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--ink);
  color: #d6dcea;
  padding: 18px 14px;
}
.side-brand {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 0 6px 18px;
  border-bottom: 1px solid #2c3b5c;
}
.side-brand strong {
  display: block;
  color: #fff;
  font-family: var(--font-head);
  font-size: 16px;
}
.side-brand div span {
  font-size: 13px;
  color: var(--marigold);
}
.side-nav {
  display: grid;
  gap: 2px;
  margin-top: 14px;
  overflow-y: auto;
}
.side-nav button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 11px 12px;
  border: 0;
  border-radius: var(--radius-s);
  background: transparent;
  color: #d6dcea;
  font: 500 16px var(--font-body);
  text-align: left;
  cursor: pointer;
}
.side-nav button:hover {
  background: #22314f;
  color: #fff;
}
.side-nav button[aria-current='page'] {
  background: var(--marigold);
  color: var(--ink);
  font-weight: 600;
}
.side-nav .count {
  min-width: 24px;
  padding: 0 7px;
  border-radius: 999px;
  background: #e14d3d;
  color: #fff;
  font-size: 13px;
  text-align: center;
}
.side-nav .group {
  margin: 12px 12px 4px;
  font-size: 13px;
  color: #8291ad;
}
.side-foot {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid #2c3b5c;
  display: flex;
  justify-content: space-between;
  font-size: 14px;
}
.side-foot a,
.link-btn {
  color: #b9c3d8;
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  cursor: pointer;
  text-decoration: underline;
}
.main {
  min-width: 0;
}
.bar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 66px;
  padding: 10px 28px;
  background: rgba(244, 246, 249, 0.94);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.bar h1 {
  font-size: 24px;
  margin: 0;
}
.bar-actions {
  margin-left: auto;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.menu-btn {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  background: var(--white);
  font-size: 20px;
  cursor: pointer;
}
.scrim {
  display: none;
}
.view {
  padding: 24px 28px 60px;
}

/* ---------- Building blocks ---------- */
.kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}
.kpi {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  padding: 14px 16px;
}
.kpi span {
  display: block;
  color: var(--muted);
  font-size: 14px;
}
.kpi b {
  display: block;
  font-family: var(--font-head);
  font-size: 28px;
  font-weight: 800;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.kpi.warn b {
  color: var(--red);
}
.kpi.good b {
  color: var(--green);
}
button.kpi {
  font: inherit;
  text-align: left;
  cursor: pointer;
}
button.kpi:hover {
  border-color: var(--ink);
}
.panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  padding: 18px;
  margin-bottom: 20px;
}
.panel > h2,
.sec-title {
  font-size: 19px;
  margin-bottom: 12px;
}
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
}
.toolbar input[type='search'] {
  flex: 1 1 220px;
  max-width: 340px;
}
.toolbar select {
  width: auto;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.chip {
  padding: 7px 14px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  font: 500 15px var(--font-body);
  cursor: pointer;
}
.chip[aria-pressed='true'] {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}
.chip:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
tr.click {
  cursor: pointer;
}
tr.click:hover td {
  background: #fafbfc;
}
.app .reg,
#dlg .reg {
  font-family: var(--font-head);
  font-weight: 700;
  letter-spacing: 0.03em;
  white-space: nowrap;
}
td b {
  white-space: nowrap;
}
.cell-sub {
  display: block;
  font-size: 13px;
  color: var(--muted);
}
.actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 16px;
  margin: 0 0 14px;
}
.dl dt {
  color: var(--muted);
}
.dl dd {
  margin: 0;
  font-weight: 500;
}
.timeline {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 14px;
}
.timeline li {
  padding: 6px 0 6px 18px;
  border-left: 2px solid var(--line);
  position: relative;
}
.timeline li::before {
  content: '';
  position: absolute;
  left: -6px;
  top: 12px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--marigold);
}
.checklist label {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-s);
  margin-bottom: 6px;
  cursor: pointer;
}
.checklist label:has(input:checked) {
  background: var(--green-soft);
  border-color: #a9dcbc;
}
.checklist label:has(input:checked) span {
  text-decoration: line-through;
  color: var(--muted);
}
.checklist input {
  width: 20px;
  height: 20px;
  accent-color: var(--green);
}
.inline-add {
  display: grid;
  grid-template-columns: 1fr 80px 110px auto;
  gap: 8px;
}
.method-pick {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.method-pick label {
  display: grid;
  place-items: center;
  padding: 12px;
  border: 2px solid var(--line);
  border-radius: var(--radius-m);
  font-weight: 600;
  cursor: pointer;
}
.method-pick label:has(input:checked) {
  border-color: var(--marigold);
  background: var(--marigold-soft);
}
.method-pick input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.msg {
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  padding: 14px;
  margin-bottom: 10px;
  background: var(--white);
}
.msg pre {
  white-space: pre-wrap;
  font: 15px/1.5 var(--font-body);
  margin: 8px 0 10px;
  padding: 10px 12px;
  background: #e9f7ee;
  border-radius: var(--radius-s);
}
.msg-head {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

/* Simple bar chart */
.bars {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 180px;
  padding-top: 10px;
}
.bars div {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  height: 100%;
}
.bars i {
  display: block;
  width: 100%;
  max-width: 34px;
  min-height: 2px;
  background: var(--marigold);
  border-radius: 4px 4px 0 0;
}
.bars small {
  margin-top: 4px;
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
}
.hbar {
  display: grid;
  grid-template-columns: 150px 1fr 110px;
  gap: 10px;
  align-items: center;
  margin-bottom: 8px;
  font-size: 15px;
}
.hbar .track {
  height: 12px;
  background: #edf0f4;
  border-radius: 6px;
  overflow: hidden;
}
.hbar .track i {
  display: block;
  height: 100%;
  background: var(--ink);
}
.hbar .v {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* ---------- Printable invoice / receipt ---------- */
.doc {
  font-family: var(--font-body);
  color: #111;
  font-size: 14px;
  max-width: 760px;
  margin: 0 auto;
}
.doc-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 2px solid #111;
  padding-bottom: 12px;
  margin-bottom: 14px;
}
.doc-head h2 {
  font-size: 22px;
  margin: 0;
  color: #111;
}
.doc table {
  font-size: 14px;
}
.doc th {
  background: #f1f1f1;
  color: #111;
}
.doc .tot td {
  font-weight: 700;
  font-size: 16px;
  border-top: 2px solid #111;
}
.doc-foot {
  display: flex;
  justify-content: space-between;
  margin-top: 40px;
  font-size: 13px;
}
.receipt {
  max-width: 320px;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .app {
    grid-template-columns: 1fr;
  }
  .side {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 270px;
    z-index: 50;
    transform: translateX(-100%);
    transition: transform 0.2s;
  }
  .side.open {
    transform: none;
  }
  .scrim.open {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 40;
    background: rgba(19, 32, 58, 0.5);
  }
  .menu-btn {
    display: block;
  }
  .bar {
    padding: 10px 16px;
  }
  .bar h1 {
    font-size: 20px;
  }
  .view {
    padding: 16px 16px 60px;
  }
  .grid-2 {
    grid-template-columns: 1fr;
  }
  .hbar {
    grid-template-columns: 110px 1fr 90px;
    font-size: 14px;
  }
  .inline-add {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 640px) {
  .bar-actions .btn span.long {
    display: none;
  }
  .hide-sm {
    display: none;
  }
}

/* ---------- Photos ---------- */
.photos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}
.thumb {
  position: relative;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  overflow: hidden;
  background: #000;
  cursor: pointer;
  aspect-ratio: 4 / 3;
}
.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.thumb span {
  position: absolute;
  left: 4px;
  bottom: 4px;
  padding: 0 6px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  font-size: 12px;
}
.photo-big {
  margin-bottom: 12px;
}
.photo-big img {
  width: 100%;
  max-height: 60vh;
  object-fit: contain;
  background: #000;
  border-radius: var(--radius-s);
  margin-bottom: 8px;
}
.photo-big .actions {
  justify-content: flex-start;
  align-items: center;
}
.photo-add {
  display: flex;
  gap: 8px;
  align-items: center;
}
.photo-add select {
  width: auto;
}

/* ---------- Sync badge & misc ---------- */
.sync {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  align-self: center;
}
.sync::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}
.sync.on {
  background: var(--green-soft);
  color: var(--green);
}
.sync.off {
  background: var(--red-soft);
  color: var(--red);
}
.txt-red {
  color: var(--red);
}
.b-waiting, .b-sent { background: var(--marigold-soft); color: #7a5200; }
.b-approved { background: var(--green-soft); color: var(--green); }
.b-rejected, .b-skipped { background: #eceff4; color: var(--muted); }
@media (max-width: 640px) {
  .sync {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

/* ---------- Bill editor: work done, parts, oil, per-line GST ---------- */
.bill-edit {
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  padding: 14px;
  margin-bottom: 16px;
  background: var(--paper);
}
.bill-edit-head {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  align-items: baseline;
  margin-bottom: 10px;
}
.bill-edit-head h3 {
  margin: 0;
  font-size: 17px;
}
.bi-row {
  display: grid;
  grid-template-columns: 22px minmax(150px, 1fr) 118px 62px 88px 64px 84px 92px 34px;
  gap: 6px;
  align-items: center;
  margin-bottom: 6px;
}
.bi-f {
  display: block;
  min-width: 0;
  margin: 0;
}
.bi-f small {
  display: none;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 2px;
}
.bi-row input,
.bi-row select {
  width: 100%;
  min-width: 0;
  padding: 7px 8px;
  font-size: 14px;
}
.bi-head {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .03em;
}
.bi-n {
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}
.bi-amt {
  text-align: right;
  font-weight: 600;
}
.bi-del {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  color: var(--red);
  cursor: pointer;
  font-size: 14px;
}
.bi-del:hover {
  background: var(--red-soft);
}
.bi-stock {
  grid-column: 2 / -1;
  margin-top: -4px;
  font-size: 12px;
  color: var(--green);
}
.bi-add {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 14px;
}
.bill-foot-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 28px;
  justify-content: space-between;
  align-items: flex-start;
}
.bill-side {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
}
.bill-side .field {
  margin: 0;
}
.bill-side #billDisc {
  width: 120px;
}
.bill-totals {
  min-width: 260px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  padding: 10px 14px;
  font-size: 14px;
}
.bill-totals > div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 3px 0;
}
.bill-totals .bt-total {
  border-top: 1px solid var(--line);
  margin-top: 4px;
  padding-top: 7px;
  font-size: 17px;
  font-weight: 700;
}
.bill-save {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  align-items: center;
  margin-top: 12px;
}
.bill-save .alert {
  margin: 0;
  padding: 7px 10px;
}
.bill-save .alert[hidden] {
  display: none;
}
@media (max-width: 760px) {
  .bi-head,
  .bi-n {
    display: none;
  }
  .bi-row {
    grid-template-columns: 1fr 1fr 1fr 34px;
    gap: 8px;
    padding: 10px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius-m);
    margin-bottom: 8px;
  }
  .bi-f small {
    display: block;
  }
  .f-desc { grid-column: 1 / 4; grid-row: 1; }
  .bi-del { grid-column: 4; grid-row: 1; align-self: end; }
  .f-type { grid-column: 1 / 3; grid-row: 2; }
  .f-qty { grid-column: 3 / 5; grid-row: 2; }
  .f-rate { grid-column: 1; grid-row: 3; }
  .f-gst { grid-column: 2; grid-row: 3; }
  .f-hsn { grid-column: 3 / 5; grid-row: 3; }
  .bi-amt { grid-column: 1 / 5; grid-row: 4; font-size: 16px; }
  .bi-stock { grid-row: 5; margin: 0; }
  .bill-totals {
    width: 100%;
  }
}

/* ---------- Bill: GST edit, pay QR, print choice ---------- */
.bill-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 28px;
  align-items: flex-start;
  margin-bottom: 16px;
}
.bill-tools .field {
  margin: 0;
}
.inline-row {
  display: flex;
  gap: 8px;
}
.inline-row input {
  width: 110px;
}
.pay-box {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 8px 12px 8px 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  background: var(--white);
}
.pay-box b,
.pay-box span {
  display: block;
}
.doc-preview {
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  padding: 18px;
  background: #fff;
}
.print-choice {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.choice {
  border: 2px solid var(--line);
  border-radius: var(--radius-m);
  padding: 16px;
}
.choice h3 {
  font-size: 18px;
}
.qr-pay {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 12px;
  font-size: 13px;
}
@media (max-width: 640px) {
  .print-choice {
    grid-template-columns: 1fr;
  }
}

/* ---------- 80 mm thermal bill ---------- */
.thermal {
  width: 72mm;
  margin: 0 auto;
  font: 12px/1.35 'Segoe UI', Arial, sans-serif;
  color: #000;
}
.thermal .t-center {
  text-align: center;
}
.thermal .t-center svg {
  display: inline-block;
  margin: 4px 0;
}
.thermal .t-big {
  font-size: 15px;
}
.thermal .t-sep {
  border-top: 1px dashed #000;
  margin: 6px 0;
}
.thermal .t-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-variant-numeric: tabular-nums;
}
.thermal .t-strong {
  font-weight: 700;
  font-size: 14px;
}
.thermal .t-item {
  margin-top: 3px;
}
.doc-head > div:last-child {
  flex: none;
  white-space: nowrap;
}


/* ---------- Website / panel switch ---------- */
[hidden] {
  display: none !important;
}
