/* PrintQR shared styles: customer order page, landing page, shop dashboard. */
:root {
  --bg: #f4f6fb; --card: #fff; --ink: #0f172a; --ink-2: #334155; --muted: #64748b; --line: #e2e8f0; --line-2: #eef2f7;
  --brand: #4f46e5; --brand-2: #7c3aed; --brand-soft: #eef2ff; --brand-ink: #fff;
  --ok: #15803d; --ok-soft: #dcfce7; --warn: #b45309; --warn-soft: #fef3c7; --bad: #b91c1c; --bad-soft: #fee2e2;
  --radius: 16px; --shadow: 0 1px 2px rgba(15,23,42,.04), 0 8px 24px rgba(15,23,42,.06);
  --grad: linear-gradient(135deg, #4f46e5 0%, #7c3aed 55%, #c026d3 100%);
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.5 var(--font); background: var(--bg); color: var(--ink); }
a { color: var(--brand); }
img { max-width: 100%; }
.wrap { max-width: 600px; margin: 0 auto; padding: 16px; }
.wide { max-width: 1240px; }

/* ---------- header used on customer + dashboard pages ---------- */
header.top { background: var(--grad); color: #fff; padding: 20px 16px 22px; }
header.top h1 { margin: 0; font-size: 21px; font-weight: 800; letter-spacing: -.01em; }
header.top p { margin: 4px 0 0; opacity: .88; font-size: 14px; }
header.top a { color: #fff; }
.brandmark { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; color: inherit; text-decoration: none; letter-spacing: -.02em; }
.brandmark .logo { width: 30px; height: 30px; border-radius: 9px; background: #fff; display: grid; place-items: center; box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.brandmark .logo svg { width: 18px; height: 18px; }

/* ---------- cards & text ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin: 14px 0; box-shadow: var(--shadow); }
.card h2 { margin: 0 0 12px; font-size: 17px; font-weight: 700; letter-spacing: -.01em; }
.card h3 { margin: 0 0 10px; font-size: 15px; font-weight: 700; }
.muted { color: var(--muted); font-size: 14px; }
.small-text { font-size: 13px; }
label { display: block; font-size: 14px; font-weight: 600; margin: 14px 0 6px; color: var(--ink-2); }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=tel], input[type=date], input[type=search], select {
  width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 11px; font: inherit; font-size: 16px; background: #fff; color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(79,70,229,.15); }
input[type=checkbox] { width: 17px; height: 17px; accent-color: var(--brand); vertical-align: -3px; }

/* ---------- buttons ---------- */
button, .btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 11px; padding: 12px 18px; font: inherit; font-size: 15px; font-weight: 700; cursor: pointer;
  background: var(--brand); color: var(--brand-ink); text-decoration: none; text-align: center; transition: transform .08s, box-shadow .15s, background .15s; }
button:hover, .btn:hover { box-shadow: 0 6px 16px rgba(79,70,229,.25); }
button:active, .btn:active { transform: translateY(1px); }
button.secondary, .btn.secondary { background: var(--brand-soft); color: var(--brand); }
button.secondary:hover, .btn.secondary:hover { box-shadow: none; background: #e0e7ff; }
button.ghost, .btn.ghost { background: transparent; color: var(--brand); padding: 8px 10px; }
button.ghost:hover { box-shadow: none; background: var(--brand-soft); }
button.danger { background: var(--bad-soft); color: var(--bad); }
button.danger:hover { box-shadow: none; }
button.small, .btn.small { padding: 7px 11px; font-size: 13px; border-radius: 9px; }
button:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }
.block { display: flex; width: 100%; }

/* ---------- order form controls ---------- */
.seg { display: flex; gap: 8px; }
.seg button { flex: 1; flex-direction: column; gap: 0; background: #fff; color: var(--ink); border: 2px solid var(--line); padding: 11px 6px; font-weight: 600; }
.seg button:hover { box-shadow: none; border-color: #c7d2fe; }
.seg button.on { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); }
.seg button .sub { display: block; font-weight: 500; font-size: 12px; color: var(--muted); }
.stepper { display: flex; align-items: center; gap: 10px; }
.stepper button { width: 46px; height: 46px; padding: 0; font-size: 22px; }
.stepper input { width: 84px; text-align: center; font-weight: 700; }
.drop { border: 2px dashed #c7d2fe; border-radius: var(--radius); padding: 28px 16px; text-align: center; background: linear-gradient(180deg, #f8faff, #f3f0ff); cursor: pointer; transition: border-color .15s, background .15s; }
.drop:hover { border-color: var(--brand); }
.drop strong { color: var(--brand); }
.drop .ico { width: 44px; height: 44px; margin: 0 auto 8px; border-radius: 12px; background: #fff; display: grid; place-items: center; box-shadow: var(--shadow); color: var(--brand); }
.price { display: flex; justify-content: space-between; align-items: baseline; }
.price .amt { font-size: 32px; font-weight: 800; letter-spacing: -.02em; }
.err { color: var(--bad); font-size: 14px; margin-top: 8px; }
.ok { color: var(--ok); }
.hidden { display: none !important; }
.code { font-size: 46px; font-weight: 800; letter-spacing: 8px; text-align: center; margin: 8px 0; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.steps { list-style: none; padding: 0; margin: 0; }
.steps li { padding: 10px 0 10px 34px; position: relative; color: var(--muted); }
.steps li::before { content: ""; position: absolute; left: 6px; top: 13px; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line); background: #fff; }
.steps li.done { color: var(--ink); } .steps li.done::before { background: var(--ok); border-color: var(--ok); }
.steps li.now { color: var(--ink); font-weight: 700; } .steps li.now::before { border-color: var(--brand); background: #c7d2fe; }

/* printer picker on the customer page */
.printers { display: grid; gap: 8px; }
.pcard { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: #fff; color: var(--ink); border: 2px solid var(--line); border-radius: 13px; padding: 11px 12px; font-weight: 600; }
.pcard:hover { box-shadow: none; border-color: #c7d2fe; }
.pcard.on { border-color: var(--brand); background: var(--brand-soft); }
.pcard[disabled] { opacity: .5; }
.pcard .pic { width: 38px; height: 38px; flex: none; border-radius: 10px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; }
.pcard.on .pic { background: var(--brand); color: #fff; }
.pcard .pname { display: block; }
.pcard .pmeta { display: block; font-size: 12px; font-weight: 500; color: var(--muted); }
.pcard .pstate { margin-left: auto; font-size: 12px; white-space: nowrap; }

/* ---------- pills & tables ---------- */
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 700; background: var(--brand-soft); color: var(--brand); white-space: nowrap; }
.pill.queued, .pill.printing { background: var(--warn-soft); color: var(--warn); }
.pill.printed, .pill.collected { background: var(--ok-soft); color: var(--ok); }
.pill.failed, .pill.cancelled { background: var(--bad-soft); color: var(--bad); }
.pill.awaiting_confirmation { background: #ffedd5; color: #c2410c; }
.pill.pending_payment { background: #f1f5f9; color: var(--muted); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tbody tr:hover { background: #fafbff; }
.rates input { width: 84px; padding: 8px; }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin-top: 10px; }
.tabs button { background: transparent; color: var(--muted); border-radius: 10px 10px 0 0; padding: 10px 14px; }
.tabs button.on { color: var(--brand); background: #fff; border: 1px solid var(--line); border-bottom-color: #fff; margin-bottom: -1px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.grow { flex: 1; min-width: 0; }
pre.cmd { background: #0f172a; color: #e2e8f0; padding: 14px; border-radius: 12px; overflow: auto; font-size: 13px; white-space: pre-wrap; word-break: break-all; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #94a3b8; margin-right: 6px; flex: none; }
.dot.on { background: #16a34a; box-shadow: 0 0 0 3px rgba(22,163,74,.18); }
.sheet { position: fixed; inset: 0; background: rgba(15,23,42,.5); display: flex; align-items: flex-end; justify-content: center; z-index: 50; backdrop-filter: blur(2px); }
.sheet .card { width: 100%; max-width: 560px; margin: 0; border-radius: 20px 20px 0 0; }
.modal { position: fixed; inset: 0; background: rgba(15,23,42,.55); display: flex; align-items: center; justify-content: center; z-index: 60; padding: 16px; backdrop-filter: blur(3px); }
.modal .card { width: 100%; max-width: 520px; margin: 0; max-height: calc(100vh - 32px); overflow: auto; }
footer { text-align: center; color: var(--muted); font-size: 12px; padding: 24px; }
