:root {
  --bg: #f3f4f6;
  --surface: #ffffff;
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --primary: #ea580c;
  --primary-dark: #c2410c;
  --primary-soft: #fff7ed;
  --green: #16a34a;
  --green-dark: #15803d;
  --green-soft: #f0fdf4;
  --red: #dc2626;
  --red-soft: #fef2f2;
  --blue: #2563eb;
  --blue-soft: #eff6ff;
  --violet: #7c3aed;
  --violet-soft: #f5f3ff;
  --dark: #0f172a;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 4px 12px rgba(15, 23, 42, .05);
  --mono: ui-monospace, "Cascadia Mono", Consolas, "SF Mono", Menlo, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
h1, h2, h3 { margin: 0; line-height: 1.25; }
h1 { font-size: 22px; }
h2 { font-size: 16px; }
h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
p { margin: 0; }
a { color: inherit; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.right { text-align: right; }
.hidden { display: none !important; }
.pre { white-space: pre-wrap; overflow-wrap: anywhere; }

/* ── Botones ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 8px 16px;
  border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface); color: var(--ink);
  font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
  transition: background .15s, border-color .15s, transform .05s;
}
.btn:hover { background: #f9fafb; border-color: #d1d5db; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.btn-green { background: var(--green); border-color: var(--green); color: #fff; }
.btn-green:hover { background: var(--green-dark); border-color: var(--green-dark); }
.btn-wa { background: #25d366; border-color: #25d366; color: #fff; }
.btn-wa:hover { background: #1ebe5a; border-color: #1ebe5a; }
.btn-danger { color: var(--red); }
.btn-danger:hover { background: var(--red-soft); border-color: #fecaca; }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-sm { min-height: 32px; padding: 4px 10px; font-size: 13px; border-radius: 8px; }
.btn-block { width: 100%; }
.btn-lg { min-height: 52px; font-size: 16px; }
.icon-btn { width: 34px; min-height: 34px; padding: 0; }

/* ── Formularios ── */
.field { display: flex; flex-direction: column; gap: 5px; }
.field > span { font-size: 13px; font-weight: 600; color: #374151; }
.field > span em { color: var(--red); font-style: normal; }
input, select, textarea {
  width: 100%; padding: 9px 11px;
  border: 1px solid #d1d5db; border-radius: 9px;
  background: #fff; color: var(--ink); font: inherit;
}
textarea { resize: vertical; min-height: 84px; }
input:focus, select:focus, textarea:focus, .btn:focus-visible {
  outline: 2px solid var(--primary); outline-offset: 1px; border-color: var(--primary);
}
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }

/* ── Tarjetas, badges ── */
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px;
}
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 700; white-space: nowrap;
  background: #f1f5f9; color: #475569;
}
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.st-recibido { background: #f1f5f9; color: #475569; }
.st-en_diagnostico { background: #fef9c3; color: #a16207; }
.st-presupuesto_pendiente { background: #ffedd5; color: #c2410c; }
.st-en_reparacion { background: #dbeafe; color: #1d4ed8; }
.st-pruebas { background: #ede9fe; color: #6d28d9; }
.st-listo_retiro { background: #dcfce7; color: #15803d; }
.st-entregado { background: #e2e8f0; color: #1e293b; }
.st-rechazado { background: #fee2e2; color: #b91c1c; }

.notice { padding: 12px 14px; border-radius: 10px; font-size: 14px; border: 1px solid; }
.notice-info { background: var(--blue-soft); border-color: #bfdbfe; color: #1e40af; }
.notice-ok { background: var(--green-soft); border-color: #bbf7d0; color: #166534; }
.notice-bad { background: var(--red-soft); border-color: #fecaca; color: #991b1b; }
.notice-warn { background: var(--primary-soft); border-color: #fed7aa; color: #9a3412; }

/* ── Diálogos y toasts ── */
dialog.modal {
  border: none; border-radius: 16px; padding: 0;
  width: min(560px, calc(100vw - 24px)); max-height: calc(100dvh - 24px);
  box-shadow: 0 24px 60px rgba(15, 23, 42, .3);
  color: var(--ink);
}
dialog.modal[open] { display: flex; flex-direction: column; }
dialog.modal::backdrop { background: rgba(15, 23, 42, .55); }
dialog.modal.wide { width: min(720px, calc(100vw - 24px)); }
.modal-head { padding: 16px 20px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.modal-body { padding: 20px; overflow-y: auto; }
.modal-foot { padding: 14px 20px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.toast-wrap { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 100; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: var(--dark); color: #fff; padding: 10px 16px; border-radius: 10px; font-size: 14px; font-weight: 500; box-shadow: var(--shadow); animation: toast-in .2s ease-out; max-width: calc(100vw - 32px); }
.toast.error { background: var(--red); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

/* ════════════ Panel de administración ════════════ */
.topbar { background: var(--dark); color: #fff; position: sticky; top: 0; z-index: 20; }
.topbar-in { max-width: 1400px; margin: 0 auto; padding: 10px 20px; display: flex; align-items: center; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; text-decoration: none; min-width: 0; }
.brand span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand img, .brand .logo-ph { width: 36px; height: 36px; border-radius: 9px; object-fit: contain; background: #fff; flex: none; }
.logo-ph { display: grid; place-items: center; background: var(--primary) !important; font-size: 18px; }
.conn { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: #cbd5e1; white-space: nowrap; }
.conn i { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; }
.conn.off i { background: #ef4444; }
.topnav { margin-left: auto; display: flex; gap: 4px; }
.topnav a, .topnav button {
  color: #cbd5e1; background: none; border: none; font: inherit; font-weight: 600; font-size: 14px;
  padding: 8px 12px; border-radius: 8px; text-decoration: none; cursor: pointer;
}
.topnav a:hover, .topnav button:hover, .topnav a.on { background: rgba(255, 255, 255, .1); color: #fff; }

.page { max-width: 1400px; margin: 0 auto; padding: 20px; }
.metrics { display: grid; grid-template-columns: repeat(3, 1fr) auto; gap: 12px; align-items: stretch; }
.metric { padding: 14px 16px; }
.metric b { display: block; font-size: 30px; line-height: 1.1; }
.metric span { font-size: 13px; color: var(--muted); font-weight: 600; }
.metric.m-warn b { color: var(--primary); }
.metric.m-ok b { color: var(--green); }
.metrics .btn { height: 100%; padding: 0 24px; font-size: 16px; }

.toolbar { margin: 16px 0 12px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.toolbar .search { flex: 1 1 280px; }
.toolbar select { width: auto; }
.seg { display: inline-flex; border: 1px solid #d1d5db; border-radius: 9px; overflow: hidden; background: #fff; }
.seg button { border: none; background: none; font: inherit; font-weight: 600; font-size: 13px; padding: 9px 14px; cursor: pointer; color: var(--muted); }
.seg button.on { background: var(--dark); color: #fff; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.chip {
  border: 1px solid #d1d5db; background: #fff; border-radius: 999px;
  padding: 6px 14px; font: inherit; font-size: 13px; font-weight: 600; color: #374151; cursor: pointer;
}
.chip.on { background: var(--primary); border-color: var(--primary); color: #fff; }

.table-wrap { overflow-x: auto; padding: 0; }
table.orders { width: 100%; border-collapse: collapse; min-width: 880px; }
table.orders th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 12px 14px; border-bottom: 1px solid var(--line); background: #f9fafb; }
table.orders td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.orders td:nth-child(1), table.orders td:nth-child(2), table.orders td:nth-child(7) { white-space: nowrap; }
table.orders tbody tr { cursor: pointer; }
table.orders tbody tr:hover { background: #fafafa; }
table.orders tbody tr:last-child td { border-bottom: none; }
.empty { padding: 48px 20px; text-align: center; color: var(--muted); }

.kanban { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 12px; align-items: flex-start; }
.kcol { flex: 0 0 250px; background: #e9ebef; border-radius: var(--radius); padding: 10px; min-height: 160px; }
.kcol.over { outline: 2px dashed var(--primary); outline-offset: -2px; }
.kcol-head { display: flex; justify-content: space-between; align-items: center; padding: 2px 4px 10px; font-size: 13px; font-weight: 700; }
.kcol-head i { font-style: normal; background: #fff; border-radius: 999px; padding: 0 8px; font-size: 12px; color: var(--muted); }
.kcard { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; cursor: grab; box-shadow: 0 1px 2px rgba(15, 23, 42, .05); }
.kcard:hover { border-color: #cbd5e1; }
.kcard.late { border-left: 4px solid var(--red); }
.kcard .late-tag { color: var(--red); font-size: 12px; font-weight: 700; margin-top: 4px; }

/* Detalle de orden */
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-weight: 600; text-decoration: none; margin-bottom: 12px; font-size: 14px; }
.back:hover { color: var(--ink); }
.detail { display: grid; grid-template-columns: 300px minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
.detail > div { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.order-no { font-family: var(--mono); font-size: 28px; font-weight: 700; }
.dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; font-size: 14px; margin: 0; }
.dl dt { color: var(--muted); }
.dl dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }

.items-head, .item-row { display: grid; grid-template-columns: 150px minmax(0, 1fr) 68px 124px 116px 36px; gap: 8px; align-items: center; }
.items-head { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 0 0 6px; border-bottom: 1px solid var(--line); }
.item-row { padding: 8px 0; border-bottom: 1px solid var(--line); }
.item-row .sub { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.item-row input, .item-row select { padding: 7px 9px; }
.item-row input[type=number] { text-align: right; }
select.pill { border-radius: 999px; font-weight: 700; font-size: 13px; border-color: transparent; }
.tc-azul { background: #eff6ff; color: #1d4ed8; }
.tc-violeta { background: #f5f3ff; color: #6d28d9; }
.tc-verde { background: #f0fdf4; color: #15803d; }
.tc-naranja { background: #fff7ed; color: #c2410c; }
.tc-rojo { background: #fef2f2; color: #b91c1c; }
.tc-celeste { background: #ecfeff; color: #0e7490; }
.tc-rosa { background: #fdf2f8; color: #be185d; }
.tc-gris { background: #f1f5f9; color: #475569; }

/* Fotos de ingreso */
.fotos { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.foto { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: #f1f5f9; border: 1px solid var(--line); }
.foto img { width: 100%; height: 100%; object-fit: cover; display: block; }
.foto-x { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; border-radius: 50%; border: none; background: rgba(15, 23, 42, .75); color: #fff; font-size: 12px; cursor: pointer; }
.foto-x:hover { background: var(--red); }

/* Pagos, historial de clientes */
.pay-sum { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pay-sum > div { background: #f9fafb; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; min-width: 0; }
.pay-sum span { display: block; font-size: 12px; color: var(--muted); font-weight: 600; }
.pay-sum b { font-size: 17px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pay-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.pay-row small, .hist-row small { display: block; }
.pay-row > b { white-space: nowrap; font-variant-numeric: tabular-nums; }
.pay-form { display: grid; grid-template-columns: 150px 160px minmax(0, 1fr) auto; gap: 10px; align-items: end; }
.hist-row { display: flex; align-items: center; gap: 10px; padding: 8px 6px; border-bottom: 1px solid var(--line); text-decoration: none; border-radius: 8px; font-size: 14px; }
.hist-row:hover { background: #f9fafb; }
.hist-row:last-child { border-bottom: none; }
.tag { display: inline-block; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: var(--primary-soft); color: var(--primary-dark); }
.chip-ro { display: inline-block; border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; font-size: 13px; margin: 0 4px 6px 0; background: #f9fafb; }

/* Reportes */
.rep-sel { margin-bottom: 10px; }
.kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.kpi { padding: 14px 16px; }
.kpi span { display: block; font-size: 12px; font-weight: 600; color: var(--muted); }
.kpi b { display: block; font-size: 22px; line-height: 1.3; font-variant-numeric: tabular-nums; }
.kpi small { color: var(--muted); font-size: 12px; }
.rep-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
.chart { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 8px; margin-top: 14px; }
.chart-y { display: flex; flex-direction: column; justify-content: space-between; height: 180px; font-size: 11px; color: var(--muted); text-align: right; }
.chart-y span:first-child { transform: translateY(-50%); }
.chart-y span:nth-child(2) { transform: translateY(0); }
.chart-y span:last-child { transform: translateY(50%); }
.chart-plot {
  display: flex; align-items: stretch; height: 180px;
  border-bottom: 1px solid #cbd5e1;
  background: linear-gradient(var(--line), var(--line)) 0 0 / 100% 1px no-repeat, linear-gradient(var(--line), var(--line)) 0 50% / 100% 1px no-repeat;
}
.bar-slot { flex: 1; min-width: 0; display: flex; align-items: flex-end; justify-content: center; padding: 0 1px; border: none; background: none; cursor: pointer; }
.bar-slot i { display: block; width: 100%; max-width: 28px; min-height: 0; background: #60a5fa; border-radius: 4px 4px 0 0; }
.bar-slot:hover { background: rgba(37, 99, 235, .07); }
.bar-slot:hover i { background: #3b82f6; }
.bar-slot.on i { background: #1d4ed8; }
.bar-slot.on { background: rgba(37, 99, 235, .09); }
.bar-slot:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.chart-x { grid-column: 2; display: flex; margin-top: 6px; font-size: 11px; color: var(--muted); }
.chart-x span { flex: 1; min-width: 0; text-align: center; white-space: nowrap; overflow: visible; }
.chart-tip { position: fixed; z-index: 50; background: var(--dark); color: #fff; padding: 6px 10px; border-radius: 8px; font-size: 12px; pointer-events: none; white-space: nowrap; }
.chart-tip span { display: block; opacity: .75; }
.chart-tip b { font-size: 14px; }
.hbar { display: grid; grid-template-columns: minmax(90px, 34%) minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 6px 0; font-size: 14px; }
.hbar-l { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar-t { height: 14px; }
.hbar-t i { display: block; height: 100%; min-width: 2px; background: #60a5fa; border-radius: 0 4px 4px 0; }
.hbar b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.rep-table tbody tr.on { background: var(--blue-soft); }
.rep-table tbody tr.on td:first-child { box-shadow: inset 3px 0 0 #1d4ed8; font-weight: 700; }
.rep-table tfoot td { padding: 12px 14px; font-weight: 800; border-top: 2px solid var(--ink); white-space: nowrap; }
@media (max-width: 1000px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rep-grid { grid-template-columns: 1fr; }
  .pay-form { grid-template-columns: 1fr 1fr; }
  .pay-form .btn { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  .topnav { overflow-x: auto; }
  .topnav a, .topnav button { padding: 8px 9px; font-size: 13px; }
  .topbar .brand span { display: none; }
  .pay-sum b { font-size: 14px; }
}

/* Listas editables de Configuración */
.cfg-row { display: grid; gap: 8px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line); }
.cfg-row:last-child { border-bottom: none; }
.cfg-cat { grid-template-columns: 74px minmax(0, 1.4fr) minmax(0, 1fr) 36px; }
.cfg-tipo { grid-template-columns: minmax(90px, auto) minmax(0, 1fr) 120px 36px; }
.cfg-tipo .pill-ro { text-align: center; overflow: hidden; text-overflow: ellipsis; max-width: 150px; }
.cfg-user { grid-template-columns: 1fr auto; }
.save-bar { position: sticky; bottom: 0; padding: 10px 0; background: linear-gradient(transparent, var(--bg) 35%); z-index: 5; }
.pill-ro { display: inline-block; padding: 3px 10px; border-radius: 999px; font-weight: 700; font-size: 12px; white-space: nowrap; }
.totals { margin-top: 14px; margin-left: auto; width: min(340px, 100%); display: grid; grid-template-columns: 1fr auto; gap: 6px 16px; font-variant-numeric: tabular-nums; }
.totals .grand { border-top: 2px solid var(--ink); padding-top: 8px; margin-top: 4px; font-size: 22px; font-weight: 800; }
.totals span:nth-child(even) { text-align: right; }
.savestate { font-size: 12px; color: var(--muted); }

.cat-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.cat-pick label { cursor: pointer; }
.cat-pick input { position: absolute; opacity: 0; pointer-events: none; }
.cat-pick span { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 6px; border: 1px solid #d1d5db; border-radius: 10px; font-size: 12px; font-weight: 600; text-align: center; background: #fff; }
.cat-pick span b { font-size: 22px; font-weight: 400; }
.cat-pick input:checked + span { border-color: var(--primary); background: var(--primary-soft); color: var(--primary-dark); box-shadow: 0 0 0 1px var(--primary); }
.cat-pick input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: 1px; }

.config { max-width: 760px; display: flex; flex-direction: column; gap: 16px; }
.logo-prev { width: 64px; height: 64px; border-radius: 12px; border: 1px solid var(--line); object-fit: contain; background: #fff; }

/* Login */
.login-wrap { min-height: 100dvh; display: grid; place-items: center; padding: 20px; background: var(--dark); }
.login-card { width: min(400px, 100%); padding: 28px; }

@media (max-width: 1100px) {
  .detail { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .page { padding: 14px; }
  .topbar-in { padding: 10px 14px; gap: 10px; }
  .conn span { display: none; }
  .metrics { grid-template-columns: repeat(3, 1fr); }
  .metrics .btn { grid-column: 1 / -1; min-height: 48px; }
  .metric { padding: 10px 12px; }
  .metric b { font-size: 24px; }
  .metric span { font-size: 11px; }
  .grid-2 { grid-template-columns: 1fr; }
  .items-head { display: none; }
  .item-row { grid-template-columns: 1fr 1fr 1fr 36px; grid-template-areas: "tipo tipo tipo del" "desc desc desc desc" "qty price sub sub"; }
  .item-row > :nth-child(1) { grid-area: tipo; }
  .item-row > :nth-child(2) { grid-area: desc; }
  .item-row > :nth-child(3) { grid-area: qty; }
  .item-row > :nth-child(4) { grid-area: price; }
  .item-row > :nth-child(5) { grid-area: sub; }
  .item-row > :nth-child(6) { grid-area: del; }
}

/* ════════════ Portal del cliente ════════════ */
.t-body { background: #eef0f3; }
.t-wrap { max-width: 560px; margin: 0 auto; padding: 0 14px 110px; }
.t-head { background: var(--dark); color: #fff; position: sticky; top: 0; z-index: 10; }
.t-head-in { max-width: 560px; margin: 0 auto; padding: 12px 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.t-head .order-no { font-size: 20px; }
.t-section { margin-top: 14px; }
.vehicle { display: flex; gap: 14px; align-items: center; background: var(--primary-soft); border-color: #fed7aa; }
.vehicle .ico { font-size: 34px; width: 58px; height: 58px; border-radius: 14px; background: #fff; display: grid; place-items: center; flex: none; }
.vehicle b { font-size: 18px; display: block; }

.stepper { list-style: none; margin: 12px 0 0; padding: 0; }
.stepper li { position: relative; display: flex; gap: 14px; padding-bottom: 18px; }
.stepper li:last-child { padding-bottom: 0; }
.stepper li::before { content: ""; position: absolute; left: 13px; top: 28px; bottom: 0; width: 2px; background: var(--line); }
.stepper li:last-child::before { display: none; }
.stepper li.done::before { background: var(--green); }
.node { width: 28px; height: 28px; border-radius: 50%; flex: none; border: 2px solid #d1d5db; background: #fff; display: grid; place-items: center; font-size: 14px; font-weight: 800; color: #fff; z-index: 1; }
.stepper .txt b { display: block; font-weight: 600; color: #9ca3af; }
.stepper .txt span { font-size: 13px; color: #9ca3af; }
.stepper li.done .node { background: var(--green); border-color: var(--green); }
.stepper li.done .txt b { color: var(--ink); }
.stepper li.done .txt span { color: var(--muted); }
.stepper li.now .node { border: 4px solid var(--primary); animation: pulse 1.8s infinite; }
.stepper li.now .txt b { color: var(--ink); font-weight: 800; }
.stepper li.now .txt span { color: #374151; }
.stepper li.bad .node { border-color: var(--red); background: var(--red); animation: none; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(234, 88, 12, .45); }
  70% { box-shadow: 0 0 0 10px rgba(234, 88, 12, 0); }
  100% { box-shadow: 0 0 0 0 rgba(234, 88, 12, 0); }
}
@media (prefers-reduced-motion: reduce) { .stepper li.now .node { animation: none; } }

.quote { border-left: 4px solid var(--primary); background: #fafafa; padding: 12px 14px; border-radius: 0 10px 10px 0; }
.b-group { margin-top: 14px; }
.b-line { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.b-line small { display: block; color: var(--muted); }
.b-line > span:last-child { white-space: nowrap; font-weight: 600; font-variant-numeric: tabular-nums; }
.b-total { display: flex; justify-content: space-between; align-items: baseline; margin-top: 14px; padding-top: 12px; border-top: 2px solid var(--ink); }
.b-total b { font-size: 26px; font-weight: 800; }
.ready-banner { background: var(--green); color: #fff; border: none; text-align: center; padding: 22px 16px; }
.ready-banner .ico { font-size: 40px; line-height: 1; }
.ready-banner b { display: block; font-size: 20px; margin-top: 6px; }
.pay { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.pay + .pay { margin-top: 10px; }
details.card > summary { cursor: pointer; font-weight: 700; list-style-position: inside; }
details.card[open] > summary { margin-bottom: 10px; }
.fab {
  position: fixed; right: 16px; bottom: 16px; z-index: 30;
  width: 60px; height: 60px; border-radius: 50%;
  background: #25d366; display: grid; place-items: center;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .28);
}
.fab svg { width: 32px; height: 32px; fill: #fff; }
.t-foot { text-align: center; color: var(--muted); font-size: 12px; margin-top: 22px; }
