/* Scan & Print: the customer tool (.sp, /tools/scan-and-print) and the print station (.ps, /print-station). */

/* --- Customer --------------------------------------------------------------------------------------------- */
.sp h2 { font-size: 1.25rem; margin: 0 0 6px; }
.sp-steps { display: flex; gap: 6px; list-style: none; padding: 0; margin: 0 0 20px; counter-reset: none; }
.sp-steps li { flex: 1; display: flex; align-items: center; gap: 6px; font-size: .82rem; font-weight: 600; color: var(--muted); min-width: 0; }
.sp-steps li span { flex-shrink: 0; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: .75rem; background: var(--surface-2); border: 1px solid var(--border); }
.sp-steps li.now { color: var(--text); }
.sp-steps li.now span { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.sp-steps li.done span { background: var(--success-soft); border-color: transparent; color: var(--success); }

.sp-intro { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 16px; }
.sp-intro > i { font-size: 2.6rem; color: var(--brand); }
.sp-intro p { margin: 0; }
.sp-how { margin: 0 0 18px; padding-left: 22px; display: grid; gap: 6px; color: var(--text-2); }

.sp-prices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.sp-prices div { padding: 12px 14px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--border); }
.sp-prices strong { display: block; font-size: 1.3rem; }
.sp-prices span { font-size: .85rem; color: var(--muted); }

.sp-busy { padding: 26px 0; }
.sp-busy p { font-weight: 600; margin: 0 0 12px; }

.sp-file { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--border); margin-bottom: 18px; }
.sp-file > i { font-size: 1.8rem; color: var(--brand); }
.sp-file div { min-width: 0; }
.sp-file strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-file span { font-size: .85rem; color: var(--muted); }

.sp .sp-tabs { display: flex; flex-wrap: wrap; width: 100%; }
.sp .sp-tabs .btn { flex: 1 1 auto; min-height: 42px; }
.sp-stepper { display: flex; gap: 8px; align-items: stretch; max-width: 220px; }
.sp-stepper .input { text-align: center; font-weight: 700; font-size: 1.05rem; -moz-appearance: textfield; }
.sp-stepper .input::-webkit-inner-spin-button, .sp-stepper .input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.sp-stepper .btn { min-width: 46px; justify-content: center; }
.sp-paper { font-size: .85rem; margin: -4px 0 16px; }

.sp-total, .sp-amount { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; padding: 14px 16px; border-radius: var(--radius-sm); background: var(--brand-soft); border: 1px solid var(--brand-soft-2); margin-bottom: 16px; }
.sp-total span, .sp-amount span { color: var(--text-2); font-size: .9rem; }
.sp-total strong { font-size: 1.5rem; }
.sp-amount { flex-direction: column; align-items: center; text-align: center; }
.sp-amount strong { font-size: 2.4rem; line-height: 1.1; }

.sp-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.sp-pay { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; margin-bottom: 18px; }
.sp-pay .btn-lg { width: 100%; max-width: 360px; justify-content: center; }
.sp-pay p { margin: 0; font-size: .88rem; }
.sp-qr { width: 220px; height: 220px; border-radius: 10px; background: #fff; border: 1px solid var(--border); }
.sp-upi { color: var(--text-2); word-break: break-all; }

.sp-status { text-align: center; padding: 22px 12px; border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--border); margin-bottom: 16px; }
.sp-status > i { font-size: 2.6rem; color: var(--brand); margin-bottom: 10px; }
.sp-status.ok > i { color: var(--success); }
.sp-status.err > i { color: var(--danger); }
.sp-status p { margin: 0 0 12px; color: var(--text-2); }
.sp-job { display: inline-block; font-size: .9rem; padding: 6px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); }

@media (max-width: 560px) {
  .sp-steps li { font-size: 0; gap: 0; justify-content: center; }
  .sp-steps li span { font-size: .75rem; }
  .sp-steps li.now { font-size: .82rem; gap: 6px; flex: 2; }
  .sp-actions .btn-lg { width: 100%; justify-content: center; }
}

/* --- Print station ---------------------------------------------------------------------------------------- */
.ps { min-height: 100vh; box-sizing: border-box; padding: 20px clamp(16px, 3vw, 36px); background: var(--bg); color: var(--text); font-family: var(--font-sans); }
.ps-center { display: grid; place-items: center; }
.ps h1 { font-size: 1.5rem; margin: 0; display: flex; gap: 10px; align-items: center; }
.ps h1 i { color: var(--brand); }
.ps-key { width: min(420px, 100%); }
.ps-key h1 { margin-bottom: 8px; }
.ps-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.ps-head-actions { display: flex; gap: 8px; }
.ps-grid { display: grid; grid-template-columns: minmax(300px, 400px) minmax(0, 1fr); gap: 24px; align-items: start; }

.ps-join { text-align: center; position: sticky; top: 20px; }
.ps-join h2 { font-size: 1.6rem; margin: 0 0 12px; }
.ps-qr { width: 100%; max-width: 320px; height: auto; aspect-ratio: 1; background: #fff; border-radius: 12px; border: 1px solid var(--border); }
.ps-url { font-size: .85rem; margin: 8px 0 0; word-break: break-all; }
.ps-err { color: var(--danger); font-size: .9rem; }
.ps-how { text-align: left; margin: 16px 0 0; padding-left: 22px; display: grid; gap: 4px; color: var(--text-2); }

.ps-queue h2 { font-size: 1.05rem; margin: 0 0 10px; display: flex; align-items: center; gap: 8px; }
.ps-queue h2 + * { margin-bottom: 22px; }
.ps-count { font-size: .8rem; min-width: 24px; padding: 2px 8px; border-radius: 999px; background: var(--brand); color: var(--on-brand); text-align: center; }
.ps-empty { padding: 18px; border: 1px dashed var(--border-strong); border-radius: var(--radius-sm); text-align: center; }
.ps-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ps-job { display: flex; gap: 14px; align-items: center; justify-content: space-between; padding: 14px 16px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--border); }
.ps-job.payment_claimed { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 30%, transparent); }
.ps-job.printed { opacity: .8; }
.ps-job-main { min-width: 0; flex: 1; }
.ps-job-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ps-num { font-size: 1.25rem; }
.ps-amount { margin-left: auto; font-size: 1.25rem; font-weight: 800; }
.ps-file { font-weight: 600; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ps-meta { font-size: .85rem; }
.ps-job-actions { display: flex; flex-direction: column; gap: 6px; align-items: stretch; flex-shrink: 0; }
.ps-badge { font-size: .75rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.ps-badge.warn { background: color-mix(in srgb, var(--accent) 22%, transparent); color: var(--text); }
.ps-badge.ok { background: var(--success-soft); color: var(--success); }
.ps-badge.err { background: var(--danger-soft); color: var(--danger); }
.ps-tips { margin-top: 26px; font-size: .9rem; color: var(--text-2); }
.ps-tips summary { cursor: pointer; font-weight: 600; }
.ps-tips code { word-break: break-all; }

@media (max-width: 860px) {
  .ps-grid { grid-template-columns: 1fr; }
  .ps-join { position: static; }
  .ps-job { flex-direction: column; align-items: stretch; }
  .ps-job-actions { flex-direction: row; }
}

/* --- Shop card on the customer's phone ---------------------------------------------------------------------- */
.sp-shop-box { container-type: inline-size; }
.sp-shop { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px 14px; align-items: center; padding: 14px; margin: -4px 0 18px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--border); }
.sp-shop-logo { width: 56px; height: 56px; border-radius: 12px; object-fit: cover; background: #fff; border: 1px solid var(--border); flex-shrink: 0; }
.sp-shop-logo.blank { display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); font-size: 1.4rem; }
.sp-shop-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sp-shop-info strong { font-size: 1.1rem; line-height: 1.3; overflow-wrap: anywhere; }
.sp-shop-info > span { display: flex; gap: 8px; align-items: baseline; font-size: .85rem; line-height: 1.45; color: var(--text-2); min-width: 0; }
.sp-shop-info > span > span { min-width: 0; overflow-wrap: anywhere; }
.sp-shop-info i { width: 14px; flex-shrink: 0; text-align: center; color: var(--muted); }
.sp-nowrap { white-space: nowrap; }
.sp-shop-actions { grid-column: 1 / -1; display: flex; gap: 8px; flex-wrap: wrap; }
.sp-shop-actions .btn { flex: 1 1 auto; justify-content: center; }
.sp-shop-actions .fa-whatsapp { color: #25d366; }
@container (min-width: 520px) {
  .sp-shop { grid-template-columns: auto minmax(0, 1fr) auto; }
  .sp-shop-actions { grid-column: auto; flex-direction: column; }
}

.sp-owner { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin-top: 18px; padding: 14px 16px; border-radius: var(--radius-sm); border: 1px dashed var(--border-strong); }
.sp-owner > i { font-size: 1.6rem; color: var(--brand); }
.sp-owner > div { flex: 1 1 220px; }
.sp-owner p { margin: 2px 0 0; font-size: .88rem; }

/* --- Shop pages: register and settings ---------------------------------------------------------------------- */
.sp-shell { max-width: 780px; margin: 0 auto; padding-bottom: 40px; }
.sp-shell-title { font-size: clamp(1.5rem, 4vw, 2rem); margin: 10px 0 6px; display: flex; gap: 10px; align-items: center; }
.sp-shell-title i { color: var(--brand); }
.sp-shell-intro { margin: 0 0 18px; }
.sp-back { display: inline-flex; gap: 8px; align-items: center; font-size: .9rem; font-weight: 600; color: var(--brand-ink); text-decoration: none; }
.sp-shop-how { margin: 0 0 20px; padding: 14px 16px 14px 36px; display: grid; gap: 6px; border-radius: var(--radius-sm); background: var(--brand-soft); border: 1px solid var(--brand-soft-2); color: var(--text-2); }

.sf fieldset { border: 0; padding: 0; margin: 0 0 22px; min-width: 0; }
.sf legend { font-size: 1.1rem; font-weight: 700; padding: 0; margin-bottom: 6px; }
.sf-lead { margin: 0 0 14px; font-size: .9rem; }
.sf-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.sf .req { color: var(--danger); }
.sf .field small { display: block; font-size: .8rem; margin-top: 2px; }
.sf-err { color: var(--danger); }
.sf .input.is-invalid { border-color: var(--danger); }
.sf-prefixed { display: flex; align-items: stretch; }
.sf-prefixed > span { display: grid; place-items: center; padding: 0 12px; border: 1px solid var(--border-strong); border-right: 0; border-radius: 10px 0 0 10px; background: var(--surface-2); font-weight: 700; color: var(--text-2); }
.sf-prefixed .input { border-top-left-radius: 0; border-bottom-left-radius: 0; min-width: 0; }
.sf-check { justify-content: center; }
.sf-check label { display: flex; gap: 8px; align-items: center; font-weight: 600; cursor: pointer; }
.sf-check input { width: 18px; height: 18px; accent-color: var(--brand); }
.sf-logo { display: flex; gap: 16px; align-items: center; margin-bottom: 16px; }
.sf-logo > div { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.sf-logo > div small { flex-basis: 100%; }
.sf-logo-img { width: 72px; height: 72px; flex-shrink: 0; border-radius: 14px; overflow: hidden; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); font-size: 1.6rem; border: 1px solid var(--border); }
.sf-logo-img img { width: 100%; height: 100%; object-fit: cover; background: #fff; }
.sf .btn-lg { width: 100%; justify-content: center; }
.captcha-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.captcha-img { background: #f2f2f2; border-radius: 10px; border: 1px solid var(--border); height: 50px; overflow: hidden; display: flex; align-items: center; }
.captcha-img svg { display: block; height: 50px; width: auto; }
@media (max-width: 640px) {
  .sf-grid { grid-template-columns: 1fr; }
}

/* --- Station: shop header and sign-in ------------------------------------------------------------------------ */
.ps-key { width: min(440px, 100%); display: grid; gap: 16px; }
.ps-new h2 { font-size: 1.1rem; margin: 0 0 4px; }
.ps-new p { margin: 0 0 12px; font-size: .9rem; }
.ps-brand { display: flex; gap: 12px; align-items: center; min-width: 0; }
.ps-brand p { margin: 0; font-size: .85rem; }
.ps-logo { width: 48px; height: 48px; border-radius: 12px; object-fit: cover; background: #fff; border: 1px solid var(--border); flex-shrink: 0; }
.ps-logo-blank { display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); font-size: 1.2rem; }
.ps-head-actions { flex-wrap: wrap; }
.ps-join-shop { margin: 0 0 2px; font-weight: 700; color: var(--brand-ink); }
.ps-prices { margin: 14px 0 0; font-size: .9rem; font-weight: 600; }

/* Station: editing prices under the QR code */
.ps-prices { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; }
.ps-price-form { margin-top: 14px; display: grid; grid-template-columns: auto minmax(0, 120px); gap: 8px 10px; align-items: center; justify-content: center; text-align: left; }
.ps-price-form label { font-weight: 600; font-size: .9rem; }
.ps-price-form .ps-err, .ps-price-form small, .ps-price-actions { grid-column: 1 / -1; margin: 0; text-align: center; }
.ps-price-actions { display: flex; gap: 8px; justify-content: center; }

/* Station: job search, reprint form, failures, queue */
.ps-search { position: relative; margin-bottom: 16px; }
.ps-search i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.ps-search .input { padding-left: 40px; }
.ps-job { flex-direction: column; align-items: stretch; }
.ps-job-row { display: flex; gap: 14px; align-items: center; justify-content: space-between; }
.ps-job.failed { border-color: var(--danger); }
.ps-job-error { margin: 6px 0 0; font-size: .85rem; color: var(--danger); }
.ps-progress { font-weight: 600; }
.ps-reprint { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--border); display: grid; grid-template-columns: auto minmax(0, 1fr) auto minmax(0, 90px); gap: 8px 10px; align-items: center; }
.ps-reprint label { font-size: .85rem; font-weight: 600; }
.ps-reprint .ps-err, .ps-reprint small, .ps-reprint-actions { grid-column: 1 / -1; margin: 0; }
.ps-reprint-actions { display: flex; gap: 8px; }
@media (max-width: 860px) {
  .ps-job-row { flex-direction: column; align-items: stretch; }
  .ps-reprint { grid-template-columns: auto minmax(0, 1fr); }
}

/* Customer: slow print hint */
.sp-slow { margin: 0 0 12px !important; font-size: .9rem; color: var(--text); }

/* History */
.sp-shell-wide { max-width: 1180px; }
.ph-filters { display: grid; gap: 12px; margin-bottom: 16px; }
.ph-filters .segmented { display: flex; flex-wrap: wrap; }
.ph-dates { display: flex; gap: 12px; flex-wrap: wrap; }
.ph-dates label { display: flex; gap: 8px; align-items: center; font-weight: 600; font-size: .9rem; }
.ph-row { display: grid; grid-template-columns: minmax(0, 240px) minmax(0, 1fr) auto; gap: 10px; }
.ph-totals { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.ph-totals > div { padding: 14px 16px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--border); display: flex; flex-direction: column; gap: 2px; }
.ph-totals > div.warn { border-color: var(--accent); }
.ph-totals span { font-size: .8rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.ph-totals strong { font-size: 1.5rem; }
.ph-totals small { font-size: .8rem; color: var(--muted); }
.ph-table-wrap { overflow-x: auto; padding: 0; }
.ph-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.ph-table th, .ph-table td { padding: 10px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); }
.ph-table th { font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); background: var(--surface-2); white-space: nowrap; }
.ph-table td { white-space: nowrap; }
.ph-file, .ph-notes { white-space: normal !important; min-width: 160px; max-width: 280px; word-break: break-word; }
.ph-table-wrap .ps-empty { margin: 16px; }
.ph-pager { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 14px; font-size: .9rem; }
@media (max-width: 860px) {
  .ph-totals { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ph-row { grid-template-columns: 1fr; }
}

/* --- Toasts and confirmation pop-ups (feedback.js) ----------------------------------------------------------- */
.sp-toasts { z-index: 1200; max-width: min(420px, calc(100vw - 32px)); }
.sp-toasts .toast { align-items: flex-start; }
.sp-toasts .toast > span { flex: 1; line-height: 1.4; }
.sp-toasts .toast.info i:first-child { color: var(--brand); }
.sp-toasts .toast.warn { border-color: var(--accent); }
.sp-toasts .toast.warn i:first-child { color: var(--accent); }
.sp-toasts .toast.err { border-color: var(--danger); }
.sp-toast-x { border: 0; background: none; color: var(--muted); cursor: pointer; padding: 0 2px; font-size: .9rem; }
.ps-toasts { top: 16px; }
@media (max-width: 640px) { .sp-toasts { left: 16px; right: 16px; max-width: none; } }

.sp-modal-backdrop { position: fixed; inset: 0; z-index: 1100; background: rgba(20, 14, 8, .55); display: grid; place-items: center; padding: 16px; animation: sp-fade .15s ease; }
@keyframes sp-fade { from { opacity: 0; } }
@keyframes sp-rise { from { opacity: 0; transform: translateY(8px) scale(.98); } }
.sp-confirm { width: min(440px, 100%); background: var(--surface); color: var(--text); border: 1px solid var(--border-strong); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 22px; animation: sp-rise .18s ease; }
.sp-confirm-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-size: 1.2rem; background: var(--brand-soft); color: var(--brand); margin-bottom: 12px; }
.sp-confirm.danger .sp-confirm-icon { background: var(--danger-soft); color: var(--danger); }
.sp-confirm h2 { font-size: 1.2rem; margin: 0 0 6px; }
.sp-confirm-text { color: var(--text-2); font-size: .95rem; }
.sp-confirm-details { margin: 14px 0 0; padding: 10px 14px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--border); display: grid; gap: 4px; }
.sp-confirm-details div { display: flex; justify-content: space-between; gap: 12px; font-size: .9rem; }
.sp-confirm-details dt { color: var(--muted); }
.sp-confirm-details dd { margin: 0; font-weight: 700; text-align: right; }
.sp-confirm-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.sp-confirm-actions .btn { min-width: 110px; justify-content: center; }
.sp-confirm .btn-danger { background: var(--danger); color: #fff; }

/* --- Station v3: header, stats, toolbar --------------------------------------------------------------------- */
.ps-live { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 3px var(--success-soft); vertical-align: middle; margin-right: 2px; }
.ps-live.off { background: var(--danger); box-shadow: 0 0 0 3px var(--danger-soft); }
.ps-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.ps-stat { text-align: left; font: inherit; color: inherit; text-decoration: none; cursor: pointer; padding: 14px 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); display: flex; flex-direction: column; gap: 2px; transition: border-color .15s, transform .15s; }
.ps-stat:hover { border-color: var(--brand); transform: translateY(-1px); }
.ps-stat span { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.ps-stat strong { font-size: 1.7rem; line-height: 1.15; }
.ps-stat small { font-size: .8rem; color: var(--muted); }
.ps-stat.hot { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, var(--surface)); }
.ps-toolbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.ps-toolbar .ps-tabs { display: flex; flex-wrap: wrap; }
.ps-toolbar .ps-search { flex: 1 1 260px; margin: 0; }
.ps-tab-count { display: inline-block; min-width: 20px; padding: 0 6px; margin-left: 4px; border-radius: 999px; font-size: .75rem; background: color-mix(in srgb, currentColor 14%, transparent); }

.ps-progress { margin-bottom: 14px; padding: 12px 16px; border-radius: var(--radius-sm); background: var(--brand-soft); border: 1px solid var(--brand-soft-2); font-weight: 400; }
.ps-progress-text { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: .95rem; }
.ps-progress-text i { color: var(--brand); }
.ps-progress-more { margin-left: auto; font-weight: 700; font-size: .85rem; }
.ps-progress-bar { margin-top: 8px; height: 6px; border-radius: 999px; background: color-mix(in srgb, var(--brand) 18%, transparent); overflow: hidden; }
.ps-progress-bar span { display: block; height: 100%; background: var(--brand); border-radius: inherit; transition: width .25s ease; }

/* --- Station v3: job cards ---------------------------------------------------------------------------------- */
.ps-job { padding: 12px 14px; gap: 0; }
.ps-job-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; }
.ps-job-no { width: 66px; padding: 8px 4px; border-radius: 12px; text-align: center; background: var(--surface-2); border: 1px solid var(--border); display: flex; flex-direction: column; line-height: 1.1; }
.ps-job-no span { font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.ps-job-no strong { font-size: 1.35rem; }
.ps-job.payment_claimed .ps-job-no { background: color-mix(in srgb, var(--accent) 22%, var(--surface)); border-color: var(--accent); }
.ps-job.paid .ps-job-no { background: var(--success-soft); border-color: transparent; }
.ps-job.queued { border-style: dashed; }
.ps-job-file { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ps-job-file i { color: var(--brand); margin-right: 4px; }
.ps-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; align-items: center; }
.ps-chip { font-size: .78rem; font-weight: 600; padding: 2px 9px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2); }
.ps-chip.colour { background: linear-gradient(90deg, rgba(220, 38, 38, .14), rgba(234, 179, 8, .14), rgba(37, 99, 235, .14)); }
.ps-chip.ghost { background: none; border-color: transparent; color: var(--muted); font-weight: 500; }
.ps-claim { margin: 8px 0 0; padding: 6px 10px; border-radius: 8px; font-size: .88rem; background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--text); display: inline-flex; gap: 8px; align-items: center; }
.ps-claim i { color: var(--accent); }
.ps-ref { margin: 6px 0 0; font-size: .82rem; color: var(--muted); }
.ps-job-side { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.ps-job-side .ps-amount { margin: 0; font-size: 1.35rem; }
.ps-job-actions { flex-direction: row; flex-wrap: wrap; justify-content: flex-end; align-items: center; }
.ps-danger { color: var(--danger); }
.ps-danger:hover:not(:disabled) { border-color: var(--danger); background: var(--danger-soft); }
@media (max-width: 860px) {
  .ps-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ps-job-row { grid-template-columns: auto minmax(0, 1fr); }
  .ps-job-side { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; align-items: center; }
}

/* --- Preview ----------------------------------------------------------------------------------------------- */
.ps-preview { width: min(1100px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column; background: var(--surface); color: var(--text); border: 1px solid var(--border-strong); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); animation: sp-rise .18s ease; overflow: hidden; }
.ps-preview-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.ps-preview-head h2 { margin: 0; font-size: 1.2rem; }
.ps-preview-head h2 span { font-weight: 500; color: var(--text-2); word-break: break-all; }
.ps-preview-head p { margin: 4px 0 0; font-size: .88rem; }
.ps-preview-body { flex: 1; overflow: auto; padding: 20px; background: var(--surface-2); }
.ps-sheets { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 18px; }
.ps-sheets li { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: .82rem; color: var(--muted); }
.ps-sheet { width: 100%; aspect-ratio: 210 / 297; padding: 6px; box-sizing: border-box; background: #fff; border: 1px solid var(--border); border-radius: 4px; box-shadow: var(--shadow-sm); display: grid; place-items: center; cursor: zoom-in; transition: transform .15s, box-shadow .15s; }
.ps-sheet:hover, .ps-sheet:focus-visible { transform: translateY(-2px); box-shadow: var(--shadow); }
.ps-sheet img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.ps-sheet-wait { cursor: default; color: #999; font-size: 1.2rem; }
.ps-big { display: flex; flex-direction: column; gap: 12px; height: 100%; }
.ps-big-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; font-size: .9rem; font-weight: 600; }
.ps-big-nav { display: flex; gap: 6px; }
.ps-big-sheet { margin: 0 auto; width: min(100%, 620px); aspect-ratio: 210 / 297; background: #fff; padding: 12px; box-sizing: border-box; border-radius: 4px; box-shadow: var(--shadow); display: grid; place-items: center; }
.ps-big-sheet img { max-width: 100%; max-height: 100%; object-fit: contain; }
.ps-preview-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 20px; border-top: 1px solid var(--border); }
.ps-preview-foot > span { font-size: .85rem; }
.ps-preview-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* toasts sit at the top on the shop pages (no site header there) */
.ps .sp-toasts { top: 16px; }
.sp-pay-tools { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }

/* ============================================================================================================
   Dashboard shell (ShopNav.js): one fixed top bar holds every menu; pages scroll underneath it.
   ============================================================================================================ */
.pd { min-height: 100vh; background: var(--bg); color: var(--text); font-family: var(--font-sans); }
.pd-top { position: fixed; top: 0; left: 0; right: 0; z-index: 1000; height: 64px; background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--border); box-shadow: 0 1px 0 rgba(0, 0, 0, .02), 0 6px 18px -14px rgba(0, 0, 0, .35); }
.pd-top-inner { max-width: 1440px; height: 100%; margin: 0 auto; padding: 0 clamp(16px, 3vw, 32px); display: flex; align-items: center; gap: 20px; }
.pd-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; min-width: 0; }
.pd-brand-logo { width: 38px; height: 38px; border-radius: 10px; object-fit: cover; background: #fff; border: 1px solid var(--border); flex-shrink: 0; }
.pd-brand-logo.blank { display: grid; place-items: center; background: var(--brand); color: var(--on-brand); border-color: transparent; font-size: 1rem; }
.pd-brand-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.pd-brand-text strong { font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 260px; }
.pd-brand-text small { font-size: .75rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pd-nav-wrap { flex: 1; display: flex; justify-content: center; }
.pd-nav { display: flex; gap: 4px; }
.pd-nav a { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 10px; font-weight: 600; font-size: .92rem; color: var(--text-2); text-decoration: none; position: relative; transition: background .15s, color .15s; }
.pd-nav a:hover { background: var(--surface-2); color: var(--text); }
.pd-nav a.active { background: var(--brand-soft); color: var(--brand-ink); }
.pd-nav a.active::after { content: ''; position: absolute; left: 14px; right: 14px; bottom: -13px; height: 3px; border-radius: 3px 3px 0 0; background: var(--brand); }
.pd-badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: #1b1713; font-size: .72rem; font-weight: 800; display: inline-grid; place-items: center; }
.pd-nav-signout, .pd-burger { display: none; }
.pd-account { position: relative; flex-shrink: 0; }
.pd-account-btn { display: flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; font: inherit; font-weight: 600; font-size: .9rem; }
.pd-account-btn:hover, .pd-account-btn[aria-expanded='true'] { border-color: var(--brand); }
.pd-account-btn .fa-chevron-down { font-size: .7rem; color: var(--muted); }
.pd-avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: var(--on-brand); font-size: .8rem; font-weight: 800; letter-spacing: .02em; }
.pd-account-name { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pd-menu { position: absolute; right: 0; top: calc(100% + 10px); width: 270px; background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 6px; display: flex; flex-direction: column; animation: sp-rise .15s ease; }
.pd-menu-head { padding: 10px 12px 12px; border-bottom: 1px solid var(--border); margin-bottom: 4px; display: flex; flex-direction: column; gap: 2px; }
.pd-menu-head span { font-size: .82rem; color: var(--muted); word-break: break-all; }
.pd-menu a, .pd-menu button { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 8px; color: var(--text); text-decoration: none; font: inherit; font-size: .9rem; border: 0; background: none; cursor: pointer; text-align: left; }
.pd-menu a:hover, .pd-menu button:hover { background: var(--surface-2); }
.pd-menu i { width: 16px; text-align: center; color: var(--muted); }
.pd-menu .pd-menu-danger, .pd-menu .pd-menu-danger i { color: var(--danger); }
.pd-public-actions { margin-left: auto; display: flex; align-items: center; gap: 16px; }
.pd-link { font-weight: 600; font-size: .9rem; color: var(--text-2); text-decoration: none; }
.pd-link:hover { color: var(--brand-ink); }

.pd-main { max-width: 1440px; margin: 0 auto; padding: 88px clamp(16px, 3vw, 32px) 48px; }
.pd-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.pd-head h1 { margin: 0; font-size: clamp(1.5rem, 3vw, 1.9rem); line-height: 1.15; }
.pd-head p { margin: 4px 0 0; font-size: .92rem; }
.pd-head-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.pd-loading { padding: 48px 0; text-align: center; }
.pd .sp-toasts { top: 76px; }
.ps-dash .ps-join { top: 84px; }
.pd-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: clamp(16px, 2.5vw, 26px); box-shadow: var(--shadow-sm); }
.pd-settings { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 390px); gap: 20px; align-items: start; }
.pd-aside { display: grid; gap: 20px; position: sticky; top: 84px; }
.pd-aside .sf-grid { grid-template-columns: 1fr; }
.ph-row { grid-template-columns: minmax(0, 240px) minmax(0, 1fr); }

@media (max-width: 900px) {
  .pd-top-inner { gap: 10px; }
  .pd-brand { flex: 1; }
  .pd-nav-wrap { flex: 0; order: 3; }
  .pd-burger { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; position: relative; font-size: 1.05rem; }
  .pd-dot { position: absolute; top: 6px; right: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
  .pd-nav { display: none; position: fixed; top: 64px; left: 0; right: 0; flex-direction: column; gap: 2px; padding: 10px 16px 16px; background: var(--surface); border-bottom: 1px solid var(--border); box-shadow: var(--shadow-lg); }
  .pd-nav.open { display: flex; }
  .pd-nav a { padding: 12px 14px; }
  .pd-nav a.active::after { display: none; }
  .pd-nav-signout { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border: 0; border-top: 1px solid var(--border); margin-top: 6px; background: none; color: var(--danger); font: inherit; font-weight: 600; cursor: pointer; text-align: left; }
  .pd-account-name, .pd-account-btn .fa-chevron-down { display: none; }
  .pd-account-btn { padding: 3px; }
  .pd-link { display: none; }
  .pd-settings { grid-template-columns: 1fr; }
  .pd-aside { position: static; }
}

/* ============================================================================================================
   Register and sign-in (ShopPages.js, PrintStation.js signed out)
   ============================================================================================================ */
.pr { padding-top: 104px; }
.pr-hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 64px); align-items: start; }
.pr-hero-signin { align-items: center; min-height: calc(100vh - 220px); }
.pr-copy { position: sticky; top: 96px; }
.pr-hero-signin .pr-copy { position: static; }
.pr-eyebrow { display: inline-flex; gap: 8px; align-items: center; padding: 6px 12px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-ink); font-weight: 700; font-size: .82rem; border: 1px solid var(--brand-soft-2); }
.pr-copy h1 { font-family: var(--font-display); font-size: clamp(1.9rem, 3.6vw, 3rem); line-height: 1.08; letter-spacing: -.02em; margin: 16px 0 14px; }
.pr-lead { font-size: 1.06rem; line-height: 1.6; color: var(--text-2); margin: 0 0 24px; max-width: 580px; }
.pr-benefits { list-style: none; padding: 0; margin: 0 0 24px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.pr-benefits li { display: flex; gap: 12px; padding: 14px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.pr-benefit-icon { width: 38px; height: 38px; flex-shrink: 0; border-radius: 10px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); }
.pr-benefits strong { display: block; font-size: .95rem; }
.pr-benefits p { margin: 3px 0 0; font-size: .85rem; line-height: 1.45; color: var(--muted); }
.pr-checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.pr-checks li { display: flex; gap: 10px; align-items: center; font-weight: 500; }
.pr-checks i { color: var(--success); }
.pr-form-card { background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: clamp(18px, 3vw, 32px); }
.pr-form-head h2 { margin: 0; font-size: 1.45rem; }
.pr-form-head p { margin: 4px 0 20px; font-size: .92rem; }
.pr-signin-card { max-width: 460px; margin: 0 auto; }
.pr-submit { width: 100%; justify-content: center; }
.pr-signin { text-align: center; margin: 16px 0 0; font-size: .92rem; color: var(--text-2); }
.pr-signin a { font-weight: 700; color: var(--brand-ink); }

.pr-preview { border-radius: var(--radius-lg); border: 1px dashed var(--border-strong); padding: 16px; background: var(--surface-2); }
.pr-preview-head { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: 12px; display: flex; gap: 8px; align-items: center; }
.pr-phone { max-width: 380px; margin: 0 auto; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 28px; padding: 14px 14px 16px; box-shadow: var(--shadow); }
.pr-phone-bar { display: flex; justify-content: center; gap: 5px; margin-bottom: 12px; }
.pr-phone-bar span { width: 6px; height: 6px; border-radius: 50%; background: var(--border-strong); }
.pr-phone-bar span:first-child { width: 44px; border-radius: 6px; }
.pr-phone .sp-shop { margin: 0 0 10px; }
.pr-phone-pay strong { margin-left: 2px; }
.pr-phone .sp-prices { margin-top: 0; }
.pr-phone-pay { margin-top: 10px; padding: 11px 12px; border-radius: 12px; background: var(--brand); color: var(--on-brand); font-weight: 600; font-size: .9rem; display: flex; gap: 8px; align-items: center; justify-content: center; text-align: center; }

.pr-how { margin-top: 64px; }
.pr-how h2 { text-align: center; font-family: var(--font-display); font-size: clamp(1.5rem, 2.6vw, 2.1rem); margin: 0 0 22px; }
.pr-how ol { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.pr-how li { padding: 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.pr-how li span { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: var(--on-brand); font-weight: 800; margin-bottom: 12px; }
.pr-how li strong { display: block; font-size: 1rem; }
.pr-how li p { margin: 4px 0 0; color: var(--muted); font-size: .9rem; line-height: 1.5; }
.pr-foot { margin-top: 56px; padding-top: 20px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: .88rem; color: var(--muted); }
.pr-foot nav { display: flex; gap: 18px; }
.pr-foot a { color: var(--muted); text-decoration: none; }
.pr-foot a:hover { color: var(--brand-ink); }

/* numbered steps and password reveal in the shop form */
.sf-steps { counter-reset: sfstep; }
.sf-steps fieldset { padding-bottom: 22px; border-bottom: 1px solid var(--border); }
.sf-steps fieldset:last-of-type { border-bottom: 0; padding-bottom: 0; }
.sf-steps legend::before { counter-increment: sfstep; content: counter(sfstep); display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--brand); color: var(--on-brand); font-size: .82rem; margin-right: 10px; vertical-align: 1px; }
.sf-reveal { position: relative; }
.sf-reveal .input { padding-right: 46px; }
.sf-reveal-btn { position: absolute; right: 5px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border: 0; border-radius: 8px; background: none; color: var(--muted); cursor: pointer; }
.sf-reveal-btn:hover { background: var(--surface-2); color: var(--text); }
.sf-terms { font-size: .82rem; color: var(--muted); margin: 14px 0 0; text-align: center; line-height: 1.5; }

@media (max-width: 980px) {
  .pr { padding-top: 88px; }
  .pr-hero { grid-template-columns: 1fr; }
  .pr-hero-signin { min-height: 0; }
  .pr-copy { position: static; }
  .pr-form-col { order: -1; }
  .pr-hero-signin .pr-form-col { order: 0; }
  .pr-how ol { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .pr-benefits, .pr-how ol { grid-template-columns: 1fr; }
}
