/* Customer system: cards, QR, portal, status chips. Uses the tokens from style.css. */
.akqr { display: block; width: 100%; height: auto; }

/* status chips */
.st { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px;
  background: var(--sunk); color: var(--text); white-space: nowrap; }
.st::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .7; }
.st.pending, .st.registered { color: #6E6F75; }
.st.in_progress, .st.received, .st.inspection, .st.preparation, .st.quality_check { background: #FFF4E0; color: #9a5b00; }
.st.completed { background: #E8F0FF; color: #1d4fb8; }
.st.approved, .st.ready, .st.valid, .st.sent { background: #E7F7EC; color: #157a3e; }
.st.delivered { background: var(--sunk); color: #3f4046; }
.st.expired, .st.opened { background: #FFF4E0; color: #9a5b00; }
.st.void, .st.failed { background: #FDE8EA; color: #b3121f; }

/* customer card / vehicle sticker */
.akcard { width: 340px; max-width: 100%; background: var(--dark); color: #fff; border-radius: 22px; padding: 18px; display: grid; gap: 14px;
  box-shadow: var(--shadow-lg); position: relative; overflow: hidden; }
.akcard::after { content: ""; position: absolute; inset: auto -40px -60px auto; width: 180px; height: 180px; border-radius: 50%;
  background: radial-gradient(circle, rgba(226,29,43,.35), transparent 70%); pointer-events: none; }
.akcard-top { display: flex; gap: 10px; align-items: center; }
.akcard-top img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; }
.akcard-top b { display: block; letter-spacing: .14em; font-size: 15px; }
.akcard-top small { color: rgba(255,255,255,.65); font-size: 11px; }
.akcard-body { display: grid; grid-template-columns: 132px 1fr; gap: 14px; align-items: center; }
.akcard-qr { background: #fff; border-radius: 14px; padding: 6px; position: relative; z-index: 1; } /* above the red glow */
.akcard-info { display: grid; gap: 4px; position: relative; z-index: 1; }
.akcard-name { font-weight: 700; font-size: 16px; }
.akcard-code { font-weight: 700; letter-spacing: .06em; color: #ff5a66; font-size: 14px; text-align: right; }
.akcard-info p { margin: 2px 0 0; font-size: 11.5px; color: rgba(255,255,255,.75); line-height: 1.5; }
.akcard-info .akcard-warn { color: #ffb3b9; }
.aksticker { width: 220px; text-align: center; }
.aksticker .akcard-top { justify-content: center; }
.aksticker .akcard-qr { width: 150px; margin: 0 auto; }
.aksticker .akcard-code { text-align: center; }

/* JOIN poster (A4) */
.akposter { width: 100%; max-width: 560px; margin: 0 auto; text-align: center; background: var(--surface); border-radius: 28px;
  padding: 36px 28px; box-shadow: var(--shadow-lg); border: 1px solid var(--line); }
.akposter-logo { width: 74px; height: 74px; border-radius: 50%; object-fit: cover; }
.akposter h1 { font-size: 40px; letter-spacing: .06em; margin: 12px 0 4px; }
.akposter h1 em { color: var(--red); font-style: normal; }
.akposter-sub { font-size: 18px; margin: 0 0 18px; }
.akposter-qr { width: 280px; max-width: 80%; margin: 0 auto; padding: 10px; border-radius: 20px; border: 3px solid var(--dark); }
.akposter ol { text-align: right; display: inline-grid; gap: 4px; margin: 20px auto 8px; padding-inline-start: 22px; }
.akposter-foot { color: var(--muted); font-size: 12px; margin: 10px 0 0; }

/* printing one block */
#ak-print { display: none; }
@media print {
  @page { margin: 12mm; }
  body.ak-printing > *:not(#ak-print) { display: none !important; }
  body.ak-printing #ak-print { display: flex; justify-content: center; }
  body.ak-printing { background: #fff !important; padding: 0 !important; }
  .akcard, .akposter { box-shadow: none; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .akposter { border: 0; max-width: none; }
  .akposter-qr { width: 110mm; max-width: none; }
}

/* ---------- public pages (portal / join / vehicle / warranty) ---------- */
.pp { max-width: 640px; margin: 0 auto; padding-block: 18px 110px; display: grid; gap: 14px; }
.pp-hero { background: var(--dark); color: #fff; border-radius: var(--r-lg); padding: 22px; position: relative; overflow: hidden; box-shadow: var(--shadow-lg); }
.pp-hero::after { content: ""; position: absolute; inset: auto -60px -80px auto; width: 240px; height: 240px; border-radius: 50%;
  background: radial-gradient(circle, rgba(226,29,43,.4), transparent 70%); }
.pp-hero small { color: rgba(255,255,255,.7); letter-spacing: .12em; font-size: 11px; }
.pp-hero h1 { font-size: calc(24px * var(--hs, 1)); margin: 4px 0 2px; color: #fff; }
.pp-hero .code { color: #ff5a66; font-weight: 700; letter-spacing: .05em; }
.pp-card { background: var(--surface); border-radius: var(--r); padding: 18px; box-shadow: var(--shadow); border: 1px solid var(--line); display: grid; gap: 10px; }
.pp-card h2 { font-size: 17px; margin: 0; display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.pp-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 14px; }
.pp-row:first-of-type { border-top: 0; }
.pp-row small { color: var(--muted); display: block; font-size: 12px; }
.pp-car { display: flex; gap: 12px; align-items: center; }
.pp-car .ic { width: 48px; height: 48px; border-radius: 14px; background: var(--sunk); display: grid; place-items: center; font-size: 24px; flex: none; }
.pp-car b { font-size: 18px; display: block; }
.steps { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-top: 4px; }
.steps i { height: 6px; border-radius: 4px; background: var(--sunk); }
.steps i.on { background: var(--green); }
.steps i.now { background: var(--red); }
.pp-empty { color: var(--muted); font-size: 14px; text-align: center; padding: 10px; }
.pp-note { font-size: 14px; padding: 10px 0; border-top: 1px solid var(--line); }
.pp-note small { color: var(--muted); display: block; font-size: 12px; }
.pp-foot { text-align: center; color: var(--muted); font-size: 12px; }
.verify-badge { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: 20px; padding: 10px 18px; border-radius: 999px; }
.verify-badge.valid { background: #E7F7EC; color: #157a3e; }
.verify-badge.expired { background: #FFF4E0; color: #9a5b00; }
.verify-badge.void, .verify-badge.bad { background: #FDE8EA; color: #b3121f; }
.pp form { display: grid; gap: 10px; }
.pp form .two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pp label { display: grid; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
.pp input, .pp select, .pp textarea { width: 100%; font: inherit; font-size: 16px; color: var(--text); background: var(--surface-2);
  border: 1px solid var(--line-2); border-radius: 12px; padding: 11px 12px; }
.pp input:focus, .pp select:focus { outline: 2px solid var(--red); border-color: transparent; }
.ref-box { font-size: 34px; font-weight: 800; letter-spacing: .2em; text-align: center; background: var(--sunk); border-radius: 16px; padding: 14px; direction: ltr; }

/* ---------- warranty document (A4) ---------- */
.wdoc { width: 100%; max-width: 800px; margin: 0 auto; background: #fff; border-radius: 18px; box-shadow: var(--shadow-lg); overflow: hidden; border: 1px solid var(--line); }
.wdoc-head { background: var(--dark); color: #fff; padding: 22px 26px; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.wdoc-head .brand { display: flex; gap: 12px; align-items: center; }
.wdoc-head img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; }
.wdoc-head b { display: block; letter-spacing: .16em; font-size: 20px; }
.wdoc-head small { color: rgba(255,255,255,.7); letter-spacing: .2em; font-size: 11px; }
.wdoc-head .no { text-align: left; direction: ltr; }
.wdoc-head .no span { display: block; font-size: 11px; color: rgba(255,255,255,.6); letter-spacing: .14em; }
.wdoc-head .no strong { color: #ff5a66; font-size: 18px; letter-spacing: .04em; }
.wdoc-title { text-align: center; padding: 16px 20px 6px; }
.wdoc-title h1 { margin: 0; font-size: 22px; letter-spacing: .12em; }
.wdoc-title p { margin: 2px 0 0; color: var(--muted); }
.wdoc-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0; margin: 12px 24px; border: 1px solid var(--line-2); border-radius: 14px; overflow: hidden; }
.wdoc-grid div { padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: 14px; }
.wdoc-grid div:nth-child(odd) { border-inline-end: 1px solid var(--line); }
.wdoc-grid span { display: block; color: var(--muted); font-size: 11.5px; }
.wdoc-terms { margin: 0 24px 12px; font-size: 13px; line-height: 1.8; white-space: pre-line; }
.wdoc-foot { display: grid; grid-template-columns: 1fr 130px; gap: 18px; align-items: end; padding: 14px 24px 24px; border-top: 3px solid var(--red); }
.wdoc-foot .qr { border: 1px solid var(--line-2); border-radius: 12px; padding: 4px; }
.wdoc-foot small { color: var(--muted); }
.wdoc-void { margin: 0 24px; padding: 10px; border-radius: 12px; background: #FDE8EA; color: #b3121f; font-weight: 700; text-align: center; }
@media print {
  .wdoc { box-shadow: none; border: 0; border-radius: 0; max-width: none; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .no-print, .top, .tabbar, .fab, .login-corner { display: none !important; }
}
@media (max-width: 560px) {
  .akcard-body { grid-template-columns: 110px 1fr; }
  .wdoc-grid { grid-template-columns: 1fr; margin-inline: 14px; }
  .wdoc-grid div:nth-child(odd) { border-inline-end: 0; }
  .wdoc-terms { margin-inline: 14px; }
  .wdoc-foot { grid-template-columns: 1fr 100px; padding-inline: 14px; }
  .pp form .two { grid-template-columns: 1fr; }
}

/* ---------- dashboard: operations ---------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; box-shadow: var(--shadow); display: grid; gap: 4px; }
.tile b { font-size: 26px; line-height: 1.1; }
.tile span { color: var(--muted); font-size: 13px; }
.tile.hot { border-color: var(--red); }
.tile.hot b { color: var(--red); }
.vlist { display: grid; gap: 12px; }
.vcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; box-shadow: var(--shadow); display: grid; gap: 8px; }
.vcard > header { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.vcard > header b { font-size: 17px; display: block; }
.vcard > header small { color: var(--muted); font-size: 12px; display: block; }
.vcard > header select { width: auto; max-width: 200px; }
.vfoot { display: flex; gap: 6px; flex-wrap: wrap; }
.svc-row { display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.svc-row:first-child { border-top: 0; }
.svc-main { display: grid; gap: 2px; min-width: 0; }
.svc-main small { color: var(--muted); font-size: 12px; }
.svc-notes { white-space: pre-line; }
.svc-row > .acts, .svc-row > .svc-slot { grid-column: 1 / -1; justify-content: flex-start; }
.svc-slot:empty, .vslot:empty, .w-slot:empty { display: none; }
.panel.mini { padding: 14px; margin-top: 8px; box-shadow: none; background: var(--surface-2); }
.qr-preview { display: flex; gap: 16px; flex-wrap: wrap; align-items: flex-start; margin-top: 12px; }
.cust-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: flex-start; }
.cust-head > div:first-child { display: grid; gap: 4px; }
.ref { font-weight: 800; letter-spacing: .12em; }
pre.msg { white-space: pre-wrap; font: inherit; font-size: 13px; background: var(--sunk); padding: 10px; border-radius: 10px; margin: 6px 0 0; }
.tpl { display: grid; gap: 6px; margin-top: 12px; }
.tpl textarea { width: 100%; }
@media (max-width: 560px) { .row3 { grid-template-columns: 1fr; } .vcard > header select { max-width: 100%; width: 100%; } }

/* red counter on a dashboard section (new registrations) */
.side button .nbadge { margin-inline-start: auto; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--red);
  color: #fff; font-style: normal; font-size: 12px; font-weight: 700; display: inline-grid; place-items: center; }

/* ---------- dashboard: orders ---------- */
.oseg { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0 12px; }
.oseg label { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; background: var(--surface-2); border: 1px solid var(--line-2);
  border-radius: 999px; padding: 7px 14px; cursor: pointer; }
.oseg label:has(input:checked) { background: var(--dark); color: #fff; border-color: var(--dark); }
.oseg input { accent-color: var(--red); margin: 0; width: auto; }
.oseg.tabs button { font: inherit; font-size: 14px; font-weight: 600; background: var(--surface); border: 1px solid var(--line-2); color: var(--text);
  border-radius: 999px; padding: 8px 18px; cursor: pointer; }
.oseg.tabs button[aria-selected="true"] { background: var(--dark); border-color: var(--dark); color: #fff; }
.opick { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0; }
.opick:empty { display: none; }
.opick .chip { box-shadow: none; }
.opick .chip.on { background: var(--dark); border-color: var(--dark); color: #fff; }
.ogroup { margin-bottom: 18px; }
.ogroup h2 { font-size: 16px; margin: 0 0 8px; display: flex; align-items: center; gap: 8px; }
.ogroup h2 small { background: var(--sunk); border-radius: 999px; padding: 1px 9px; font-size: 12px; color: var(--muted); }
.ogrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.ocard { text-align: right; font: inherit; color: inherit; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  padding: 12px 14px; box-shadow: var(--shadow); display: grid; gap: 5px; cursor: pointer; transition: border-color .15s, transform .15s; }
.ocard:hover, .ocard:focus-visible { border-color: var(--line-2); transform: translateY(-1px); }
.ocard.mine { border-inline-start: 4px solid var(--red); }
.ocard small { color: var(--muted); font-size: 12px; }
.ocard-top, .ocard-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.ocard-top b { font-size: 16px; }
.ocard .ohold { color: #9a5b00; }
.obar { height: 5px; border-radius: 4px; background: var(--sunk); overflow: hidden; }
.obar i { display: block; height: 100%; background: var(--green); border-radius: 4px; }
.onext { font-size: 12.5px; font-weight: 600; color: var(--red); }
.ohead { display: grid; gap: 12px; }
.ohead-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; flex-wrap: wrap; }
.ohead-top > div { display: grid; gap: 3px; }
.ostep { display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; }
.ostep span { display: grid; gap: 5px; font-size: 11px; color: var(--muted); text-align: center; line-height: 1.25; }
.ostep i { height: 6px; border-radius: 4px; background: var(--sunk); }
.ostep .done i { background: var(--green); }
.ostep .now i { background: var(--red); }
.ostep .now { color: var(--text); font-weight: 700; }
.ostep.off i { background: var(--sunk) !important; }
.oacts { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.oacts > .btn:not(.sm) { font-size: 16px; padding-inline: 22px; }
.oblock { display: inline-grid; gap: 4px; }
.oblock small { color: #9a5b00; font-size: 12px; }
.oassign { grid-column: 1 / -1; color: var(--muted); font-size: 12px; display: flex; align-items: center; gap: 6px; }
.oassign select { width: auto; max-width: 220px; padding: 4px 8px; font-size: 13px; }
.otime { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.otime li { position: relative; padding: 6px 18px 10px 0; border-inline-start: 2px solid var(--sunk); margin-inline-start: 5px; display: grid; gap: 2px; font-size: 14px; }
.otime li::before { content: ""; position: absolute; inset-inline-start: -7px; top: 10px; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 2px solid var(--red); }
.otime small { color: var(--muted); font-size: 12px; }
.otime .onote { color: var(--text); background: var(--surface-2); border-radius: 8px; padding: 4px 8px; }
@media (max-width: 700px) {
  .ostep { grid-template-columns: repeat(5, 1fr); row-gap: 10px; }
  .oacts > .btn:not(.sm) { flex: 1 1 100%; }
  .ogrid { grid-template-columns: 1fr; }
}
.oblock .btn:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }

/* customer page menus (v10) */
.pp-tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; position: sticky; top: 8px; z-index: 5; background: var(--bg, transparent); padding: 4px 0; }
.pp-tabs button { font: inherit; font-size: 13px; font-weight: 600; background: var(--surface); border: 1px solid var(--line); color: var(--text); border-radius: 12px;
  padding: 10px 4px; cursor: pointer; position: relative; line-height: 1.3; }
.pp-tabs button[aria-selected="true"] { background: var(--dark); border-color: var(--dark); color: #fff; }
.pp-dot { position: absolute; top: 6px; left: 6px; width: 8px; height: 8px; border-radius: 50%; background: #E21D2B; }
.pp-pane { display: grid; gap: 14px; }
.pp-pane[hidden] { display: none; }
.pp-upd { padding: 12px 0; border-top: 1px solid var(--line); display: grid; gap: 8px; }
.pp-upd:first-child { border-top: 0; }
.pp-upd small { color: var(--muted); font-size: 12px; }
.pp-upd p { margin: 0; font-size: 15px; white-space: pre-line; }
.pp-upd-pics { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 6px; }
.pp-upd-pics img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; display: block; }
@media (max-width: 380px) { .pp-tabs button { font-size: 12px; } }

/* dashboard: updates for the customer (v10) */
.upd-form { display: grid; gap: 8px; margin-top: 10px; }
.upd-form textarea { width: 100%; font: inherit; }
.upd-pics { display: flex; flex-wrap: wrap; gap: 6px; }
.upd-pics:empty { display: none; }
.upd-pics figure { margin: 0; position: relative; }
.upd-pics img { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; display: block; }
.upd-pics figure button { position: absolute; top: -6px; left: -6px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: #000; color: #fff; cursor: pointer; font-size: 12px; }
.upd-list { display: grid; gap: 0; margin-top: 10px; }
.upd { padding: 10px 0; border-top: 1px solid var(--line); display: grid; gap: 6px; }
.upd:first-child { border-top: 0; }
.upd-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.upd-top small { color: var(--muted); }
.upd p { margin: 0; white-space: pre-line; }
