/* ── tokens ─────────────────────────────────────────────────────────────── */
:root {
  --ink: #15171c;
  --ink-2: #3b404b;
  --muted: #6b7180;
  --line: #e7e3db;
  --line-2: #d6d0c4;
  --bg: #f6f4ef;
  --surface: #ffffff;
  --surface-2: #faf9f6;
  --accent: #dd1a6c;
  --accent-ink: #ad0f50;
  --accent-soft: #fde8f1;
  --cyan: #00a7e1;
  --yellow: #ffcb05;
  --ok: #11804a;
  --ok-soft: #e2f4ea;
  --warn: #a85700;
  --warn-soft: #fff0d9;
  --err: #bf2430;
  --err-soft: #fde8e9;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(21, 23, 28, 0.05), 0 8px 28px rgba(21, 23, 28, 0.06);
  --shadow-lg: 0 24px 64px rgba(21, 23, 28, 0.22);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --serif: 'Instrument Serif', Georgia, 'Times New Roman', serif;
}

*,
*::before,
*::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 15px/1.5 var(--font);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { margin: 0; line-height: 1.2; letter-spacing: -0.01em; }
p { margin: 0; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
img, canvas { display: block; max-width: 100%; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 2px; }

/* ── brand ─────────────────────────────────────────────────────────────── */
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; text-decoration: none; letter-spacing: -0.02em; }
.brand-mark { position: relative; width: 26px; height: 26px; flex: none; }
.brand-mark i { position: absolute; width: 14px; height: 14px; border-radius: 50%; mix-blend-mode: multiply; }
.brand-mark i:nth-child(1) { left: 0; top: 0; background: var(--cyan); }
.brand-mark i:nth-child(2) { right: 0; top: 0; background: var(--accent); }
.brand-mark i:nth-child(3) { left: 0; bottom: 0; background: var(--yellow); }
.brand-mark i:nth-child(4) { right: 0; bottom: 0; background: var(--ink); }

/* ── buttons & inputs ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 0 18px; border-radius: 999px; border: 1px solid transparent;
  font-weight: 600; font-size: 14px; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.05s;
}
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--accent); }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover:not(:disabled) { background: var(--accent-ink); }
.btn-ghost { background: var(--surface); border-color: var(--line-2); color: var(--ink); }
.btn-ghost:hover:not(:disabled) { border-color: var(--ink); }
.btn-danger { background: var(--surface); border-color: color-mix(in srgb, var(--err) 35%, var(--line)); color: var(--err); }
.btn-danger:hover:not(:disabled) { background: var(--err-soft); }
.btn-sm { min-height: 34px; padding: 0 14px; font-size: 13px; }
.btn-lg { min-height: 50px; padding: 0 24px; font-size: 15px; }
.btn-block { width: 100%; }
.btn.is-busy { position: relative; color: transparent !important; }
.btn.is-busy::after { content: ''; position: absolute; width: 18px; height: 18px; border: 2px solid rgba(255, 255, 255, 0.4); border-top-color: #fff; border-radius: 50%; animation: spin 0.7s linear infinite; }
.btn .icon { display: inline-flex; }

.icon-btn {
  display: inline-grid; place-items: center; width: 30px; height: 30px; padding: 0;
  border: 0; border-radius: 8px; background: transparent; color: var(--ink-2); cursor: pointer;
}
.icon-btn:hover { background: rgba(21, 23, 28, 0.07); color: var(--ink); }

.input, .field input, .field textarea, .field select {
  width: 100%; min-height: 42px; padding: 9px 12px; border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  background: var(--surface); transition: border-color 0.15s, box-shadow 0.15s;
}
.field textarea { resize: vertical; min-height: 64px; }
.input:focus, .field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(21, 23, 28, 0.08); }
.input-sm { min-height: 34px; padding: 5px 10px; font-size: 13px; }
.field { display: grid; gap: 6px; align-content: start; }
.field > span { font-weight: 600; font-size: 13px; }
.field em { font-style: normal; color: var(--muted); font-weight: 400; }
.field small { color: var(--muted); font-size: 12px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ── header / footer ───────────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 24px;
  padding: 14px clamp(16px, 4vw, 40px); background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid transparent;
}
.has-docs .site-header { border-bottom-color: var(--line); }
.site-nav { display: flex; gap: 22px; margin-left: auto; font-size: 14px; }
.site-nav a { text-decoration: none; color: var(--ink-2); }
.site-nav a:hover { color: var(--accent); }

.site-footer {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr auto; gap: 32px; align-items: start;
  padding: 40px clamp(16px, 4vw, 40px) 56px; border-top: 1px solid var(--line); font-size: 14px;
}
.site-footer h4 { font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 8px; }
.site-footer .brand { margin-bottom: 8px; }
.footer-staff a { color: var(--muted); font-size: 13px; }

/* ── hero ──────────────────────────────────────────────────────────────── */
.hero {
  display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(24px, 5vw, 72px); align-items: center;
  max-width: 1240px; margin: 0 auto; padding: clamp(32px, 6vw, 80px) clamp(16px, 4vw, 40px) clamp(40px, 6vw, 88px);
}
.eyebrow { font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); margin-bottom: 16px; }
.hero h1 { font-size: clamp(40px, 6vw, 72px); font-weight: 700; letter-spacing: -0.035em; line-height: 1.02; }
.hero h1 em { font-family: var(--serif); font-weight: 400; font-style: italic; letter-spacing: -0.01em; color: var(--accent); }
.lead { font-size: clamp(16px, 1.6vw, 19px); color: var(--ink-2); margin-top: 20px; max-width: 34em; }
.hero-points { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 28px 0 0; }
.hero-points li { padding: 6px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 13px; font-weight: 500; }

.dropzone {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center;
  min-height: 380px; padding: 32px; border-radius: 24px; cursor: pointer;
  background: var(--surface); border: 2px dashed var(--line-2); box-shadow: var(--shadow);
  transition: border-color 0.2s, transform 0.2s, background 0.2s;
}
.dropzone:hover, .dropzone:focus-within { border-color: var(--accent); background: #fffdfd; }
.dropzone:hover .sheet-3 { transform: translate(18px, -8px) rotate(9deg); }
.dropzone:hover .sheet-1 { transform: translate(-18px, -4px) rotate(-11deg); }
.dropzone strong { font-size: 20px; margin-top: 20px; }
.dz-sub { color: var(--ink-2); }
.dz-sub .link { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.dropzone small { color: var(--muted); margin-top: 6px; }
.dz-art { position: relative; width: 120px; height: 120px; }
.sheet { position: absolute; inset: 8px 22px; border-radius: 6px; background: #fff; border: 1px solid var(--line-2); box-shadow: 0 6px 18px rgba(21, 23, 28, 0.08); transition: transform 0.3s ease; }
.sheet-1 { transform: translate(-12px, 0) rotate(-7deg); background: linear-gradient(#fff 0 0) padding-box, var(--cyan); }
.sheet-1::after, .sheet-2::after, .sheet-3::after { content: ''; position: absolute; left: 12px; right: 12px; top: 14px; height: 40px; border-radius: 3px; }
.sheet-1::after { background: color-mix(in srgb, var(--cyan) 30%, #fff); }
.sheet-2::after { background: color-mix(in srgb, var(--yellow) 45%, #fff); }
.sheet-3 { transform: translate(12px, -4px) rotate(6deg); }
.sheet-3::after { background: color-mix(in srgb, var(--accent) 28%, #fff); }
.sheet-3::before { content: ''; position: absolute; left: 12px; right: 26px; top: 64px; height: 6px; border-radius: 3px; background: var(--line); box-shadow: 0 12px 0 var(--line), 0 24px 0 var(--line); }

/* ── workspace ─────────────────────────────────────────────────────────── */
.workspace {
  display: grid; grid-template-columns: 300px minmax(0, 1fr) 320px; gap: 20px; align-items: start;
  max-width: 1480px; margin: 0 auto; padding: 24px clamp(16px, 3vw, 32px) 48px; scroll-margin-top: 70px;
}
.ws-col { min-width: 0; }
.ws-files, .ws-options { position: sticky; top: 78px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.panel-head h2, .panel-title { font-size: 16px; font-weight: 700; }
.panel-title { margin-bottom: 14px; }

.doc-list { list-style: none; margin: 0 -8px; padding: 0; display: grid; gap: 2px; max-height: 46vh; overflow: auto; }
.doc-item { position: relative; display: flex; align-items: center; border-radius: 12px; }
.doc-item.is-active { background: var(--accent-soft); }
.doc-item:not(.is-active):hover { background: var(--surface-2); }
.doc-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 8px 4px 8px 8px; border: 0; background: none; text-align: left; cursor: pointer; border-radius: 12px; }
.doc-thumb { flex: none; display: grid; place-items: center; width: 40px; height: 48px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; color: var(--muted); }
.doc-thumb img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.doc-thumb.is-bw img { filter: grayscale(1); }
.doc-text { flex: 1; min-width: 0; display: grid; }
.doc-text strong { font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc-text small { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.has-error .doc-text small { color: var(--err); }
.doc-price { font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.doc-remove { flex: none; margin-right: 4px; width: 26px; height: 26px; color: var(--muted); opacity: 0.55; }
.doc-item:hover .doc-remove, .doc-remove:focus-visible, .doc-item.is-active .doc-remove { opacity: 1; }

.summary { border-top: 1px solid var(--line); margin-top: 12px; padding-top: 12px; display: grid; gap: 6px; margin-bottom: 14px; }
.sum-row { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.sum-row.is-total { color: var(--ink); font-weight: 700; font-size: 17px; padding-top: 6px; }

/* editor */
.editor { padding: 0; overflow: hidden; min-height: 420px; }
.editor-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.editor-title { min-width: 0; flex: 1 1 220px; }
.editor-title h2 { font-size: 17px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.editor-title p { font-size: 13px; margin-top: 2px; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.tool-btn {
  display: inline-flex; align-items: center; gap: 6px; height: 36px; min-width: 36px; padding: 0 9px; justify-content: center;
  border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface); cursor: pointer; font-size: 13px; font-weight: 600;
}
.tool-btn:hover { border-color: var(--ink); }
.tool-btn.has-text { padding: 0 12px 0 10px; }
.range-form { display: flex; align-items: center; gap: 6px; margin-left: 6px; }
.range-label { font-size: 13px; color: var(--muted); white-space: nowrap; }
.range-form .input { width: 120px; }
.editor-empty { display: grid; place-items: center; align-content: center; gap: 12px; min-height: 420px; text-align: center; padding: 32px; color: var(--muted); }
.editor-empty.is-error h2 { color: var(--ink); font-size: 18px; }
.hint { font-size: 12.5px; color: var(--muted); text-align: center; padding: 0 18px 18px; }

.page-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; padding: 18px; background: var(--surface-2); }
.page-tile { display: grid; gap: 6px; border-radius: 12px; padding: 6px; border: 2px solid transparent; position: relative; transition: opacity 0.15s; }
.page-tile[draggable='true'] { cursor: grab; }
.page-tile.is-dragging { opacity: 0.35; }
.page-tile.drop-before { box-shadow: -4px 0 0 0 var(--accent); }
.page-tile.drop-after { box-shadow: 4px 0 0 0 var(--accent); }
.page-thumb { position: relative; display: grid; place-items: center; aspect-ratio: 1 / 1.25; padding: 8px; border: 0; border-radius: 8px; background: transparent; cursor: zoom-in; }
.page-thumb img { max-width: 100%; max-height: 100%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08), 0 4px 14px rgba(21, 23, 28, 0.1); border-radius: 2px; }
.page-tile.is-loading .page-thumb img { width: 76%; height: 92%; background: linear-gradient(100deg, #f1efea 30%, #fbfaf7 50%, #f1efea 70%) 0 0 / 300% 100%; animation: shimmer 1.4s infinite linear; }
.is-bw .page-thumb img, .preview-canvas.is-bw { filter: grayscale(1); }
.page-tile.is-off .page-thumb img { opacity: 0.3; }
.off-label { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); padding: 3px 10px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 12px; font-weight: 600; }
.page-bar { display: flex; align-items: center; justify-content: center; gap: 2px; }
.page-num { min-width: 28px; font-size: 12px; font-weight: 600; color: var(--muted); text-align: center; font-variant-numeric: tabular-nums; }

/* image stage */
.stage { display: grid; place-items: center; padding: 28px 20px; min-height: 360px; background: var(--surface-2) radial-gradient(circle at 1px 1px, rgba(21, 23, 28, 0.07) 1px, transparent 0) 0 0 / 18px 18px; }
.paper { box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1), 0 12px 32px rgba(21, 23, 28, 0.16); border-radius: 2px; background: #fff; }
.adjust { display: grid; gap: 16px; padding: 16px 18px 20px; border-top: 1px solid var(--line); }
.adjust-row { display: flex; flex-wrap: wrap; gap: 16px 28px; }
.adjust-group { display: grid; gap: 6px; }
.adjust-label, .opt-label { font-size: 12px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.sliders { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px 24px; }
.slider { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center; font-size: 13px; font-weight: 600; }
.slider input { grid-column: 1 / -1; grid-row: 2; width: 100%; accent-color: var(--accent); }
.slider output { font-variant-numeric: tabular-nums; color: var(--muted); font-weight: 500; }

.crop-wrap { position: relative; display: inline-block; line-height: 0; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; }
.crop-img { max-width: 100%; max-height: 62vh; width: auto; height: auto; }
.crop-box { position: absolute; border: 2px solid #fff; box-shadow: 0 0 0 9999px rgba(21, 23, 28, 0.55); cursor: move; touch-action: none; }
.crop-grid { position: absolute; inset: 0; pointer-events: none; background:
  linear-gradient(to right, transparent 33.1%, rgba(255,255,255,.5) 33.3%, transparent 33.6%, transparent 66.4%, rgba(255,255,255,.5) 66.6%, transparent 66.9%),
  linear-gradient(to bottom, transparent 33.1%, rgba(255,255,255,.5) 33.3%, transparent 33.6%, transparent 66.4%, rgba(255,255,255,.5) 66.6%, transparent 66.9%); }
.crop-handle { position: absolute; width: 22px; height: 22px; border: 4px solid #fff; touch-action: none; }
.h-nw { left: -4px; top: -4px; border-right: 0; border-bottom: 0; cursor: nwse-resize; }
.h-ne { right: -4px; top: -4px; border-left: 0; border-bottom: 0; cursor: nesw-resize; }
.h-sw { left: -4px; bottom: -4px; border-right: 0; border-top: 0; cursor: nesw-resize; }
.h-se { right: -4px; bottom: -4px; border-left: 0; border-top: 0; cursor: nwse-resize; }

/* options */
.opt { display: grid; gap: 8px; margin-bottom: 18px; }
.segmented { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.segmented button {
  flex: 1 1 auto; min-height: 34px; padding: 0 10px; border: 0; border-radius: 8px; background: transparent;
  font-size: 13px; font-weight: 600; color: var(--ink-2); cursor: pointer; white-space: nowrap;
}
.segmented button:hover { color: var(--ink); }
.segmented button[aria-pressed='true'] { background: var(--ink); color: #fff; }
.choice-list { display: grid; gap: 6px; }
.choice-btn, .choice {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; text-align: left; cursor: pointer;
  border: 1px solid var(--line-2); border-radius: 12px; background: var(--surface); transition: border-color 0.15s, background 0.15s;
}
.choice-btn:hover, .choice:hover { border-color: var(--ink-2); }
.choice-btn[aria-pressed='true'], .choice:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.choice input { accent-color: var(--accent); margin: 0; }
.choice-body { flex: 1; display: grid; }
.choice-body strong { font-size: 14px; }
.choice-body small { font-size: 12px; color: var(--muted); }
.choice-extra { font-size: 13px; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.stepper { display: flex; align-items: center; width: max-content; border: 1px solid var(--line-2); border-radius: 12px; overflow: hidden; background: var(--surface); }
.stepper button { width: 40px; height: 40px; border: 0; background: transparent; cursor: pointer; display: grid; place-items: center; }
.stepper button:hover { background: var(--surface-2); }
.stepper input { width: 64px; height: 40px; border: 0; border-left: 1px solid var(--line); border-right: 1px solid var(--line); text-align: center; font-weight: 700; font-size: 15px; -moz-appearance: textfield; appearance: textfield; }
.stepper input::-webkit-inner-spin-button, .stepper input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.stepper input:focus { outline: none; background: var(--surface-2); }
.item-price { display: grid; gap: 6px; padding: 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.item-price .sum-row { font-size: 13px; }
.item-price .sum-row.is-total { font-size: 15px; padding-top: 4px; border-top: 1px dashed var(--line-2); margin-top: 2px; }

.mobile-bar { display: none; }

/* ── marketing sections ────────────────────────────────────────────────── */
.section { max-width: 1240px; margin: 0 auto; padding: clamp(48px, 7vw, 88px) clamp(16px, 4vw, 40px); }
.section-title { font-size: clamp(28px, 3.4vw, 40px); letter-spacing: -0.03em; }
.section-lead { color: var(--muted); margin-top: 8px; }
.how { border-top: 1px solid var(--line); }
.steps { list-style: none; padding: 0; margin: 32px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.steps li { padding: 24px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.steps h3 { font-size: 18px; margin: 14px 0 6px; }
.steps p { color: var(--ink-2); font-size: 14px; }
.step-n { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; font-weight: 700; color: #fff; }
.steps li:nth-child(1) .step-n { background: var(--cyan); }
.steps li:nth-child(2) .step-n { background: var(--accent); }
.steps li:nth-child(3) .step-n { background: var(--yellow); color: var(--ink); }
.steps li:nth-child(4) .step-n { background: var(--ink); }
.prices { padding-top: 0; }
.price-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-top: 28px; }
.price-card { padding: 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); display: grid; gap: 14px; align-content: start; }
.price-size { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.price-size strong { font-size: 22px; }
.price-size small { color: var(--muted); }
.price-card dl { margin: 0; display: grid; gap: 8px; }
.price-card dl div { display: flex; justify-content: space-between; border-top: 1px solid var(--line); padding-top: 8px; }
.price-card dt { color: var(--ink-2); }
.price-card dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; }
.price-extras ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 14px; }
.price-extras li { display: flex; justify-content: space-between; gap: 12px; }
.price-extras li span:last-child { font-weight: 600; white-space: nowrap; }
.track { padding-top: 0; }
.track-card { display: grid; grid-template-columns: 1fr 1.4fr; gap: 24px 40px; align-items: end; padding: clamp(24px, 4vw, 40px); border-radius: 24px; background: var(--ink); color: #fff; }
.track-card .section-lead { color: rgba(255, 255, 255, 0.65); }
.track-form { display: grid; grid-template-columns: 1fr 1.3fr auto; gap: 12px; align-items: end; }
.track-form .field input { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.2); color: #fff; }
.track-form .field input::placeholder { color: rgba(255, 255, 255, 0.4); }
.track-form .field input:focus { border-color: #fff; box-shadow: none; }
.track-form .btn-primary { background: var(--accent); }
.track-form .btn-primary:hover { background: #fff; color: var(--ink); }

/* ── dialogs ───────────────────────────────────────────────────────────── */
.dialog {
  width: min(920px, calc(100vw - 24px)); max-height: calc(100vh - 32px); padding: 0; border: 0; border-radius: 20px;
  background: var(--surface); color: var(--ink); box-shadow: var(--shadow-lg);
}
.dialog::backdrop { background: rgba(21, 23, 28, 0.5); backdrop-filter: blur(3px); }
.dialog[open] { display: flex; flex-direction: column; animation: pop 0.18s ease-out; }
.dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.dialog-head h2 { font-size: 19px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.checkout { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.checkout-body { display: grid; grid-template-columns: 1.25fr 1fr; overflow: auto; flex: 1; min-height: 0; }
.checkout-main { display: grid; gap: 22px; padding: 22px; align-content: start; }
.checkout-main fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 12px; }
.checkout-main legend { font-weight: 700; font-size: 15px; margin-bottom: 12px; padding: 0; }
.checkout-side { padding: 22px; background: var(--surface-2); border-left: 1px solid var(--line); display: grid; gap: 8px; align-content: start; }
.checkout-side h3 { font-size: 15px; margin-bottom: 4px; }
.co-items { display: grid; gap: 10px; padding-bottom: 12px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }
.co-item { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.co-item > div { min-width: 0; display: grid; }
.co-item strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.co-item small { color: var(--muted); font-size: 12px; }
.co-item > span { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pay-note { margin-top: 14px; font-size: 13px; color: var(--muted); }
.demo-note { display: block; padding: 10px 12px; border-radius: 10px; background: var(--warn-soft); color: var(--warn); }
.dialog-foot { display: flex; align-items: center; justify-content: flex-end; gap: 16px; padding: 16px 22px; border-top: 1px solid var(--line); }
.progress-text { flex: 1; font-size: 13px; color: var(--ink-2); }
.progress-text.is-error { color: var(--err); font-weight: 500; }
.dialog-preview { width: auto; max-width: calc(100vw - 24px); }
.preview-body { display: grid; place-items: center; padding: 20px; min-width: min(420px, calc(100vw - 24px)); min-height: 300px; overflow: auto; background: var(--surface-2); }
.preview-canvas { height: auto; box-shadow: 0 8px 28px rgba(21, 23, 28, 0.15); }

/* ── feedback ──────────────────────────────────────────────────────────── */
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 100; max-width: calc(100vw - 32px); padding: 12px 18px; border-radius: 12px;
  background: var(--ink); color: #fff; font-size: 14px; box-shadow: var(--shadow-lg);
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none; transition: opacity 0.2s, transform 0.2s;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.toast.is-error { background: var(--err); }
.toast.is-success { background: var(--ok); }
.spinner { width: 28px; height: 28px; border: 3px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.8s linear infinite; }
.drop-overlay { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; pointer-events: none; background: color-mix(in srgb, var(--accent) 12%, rgba(255, 255, 255, 0.75)); border: 4px dashed var(--accent); }
.drop-overlay div { padding: 16px 28px; border-radius: 999px; background: var(--accent); color: #fff; font-weight: 700; font-size: 18px; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { to { background-position: -300% 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(0.98); } }

/* ── order status page ─────────────────────────────────────────────────── */
.narrow { max-width: 820px; margin: 0 auto; padding: clamp(24px, 5vw, 56px) clamp(16px, 4vw, 32px) 72px; }
.order-hero { display: grid; gap: 10px; margin-bottom: 24px; }
.order-hero h1 { font-size: clamp(28px, 4vw, 40px); letter-spacing: -0.03em; }
.order-hero h1 em { font-family: var(--serif); font-style: italic; font-weight: 400; color: var(--accent); }
.pill { display: inline-flex; align-items: center; gap: 6px; width: max-content; padding: 4px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 600; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-2); }
.pill::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.s-pending_payment { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.pill.s-paid { background: #e5f4fc; color: #006a90; border-color: transparent; }
.pill.s-printing { background: var(--accent-soft); color: var(--accent-ink); border-color: transparent; }
.pill.s-ready { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.pill.s-completed { background: var(--surface-2); color: var(--muted); }
.pill.s-cancelled { background: var(--err-soft); color: var(--err); border-color: transparent; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: clamp(18px, 3vw, 26px); }
.card + .card { margin-top: 16px; }
.card h2 { font-size: 16px; margin-bottom: 14px; }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.timeline li { position: relative; display: grid; gap: 8px; font-size: 13px; color: var(--muted); }
.timeline li::before { content: ''; height: 6px; border-radius: 3px; background: var(--line); }
.timeline li.is-done { color: var(--ink); }
.timeline li.is-done::before { background: var(--ink); }
.timeline li.is-current { color: var(--ink); font-weight: 700; }
.timeline li.is-current::before { background: linear-gradient(90deg, var(--accent), var(--yellow)); }
.timeline small { display: block; font-weight: 400; color: var(--muted); font-size: 12px; }
.pay-panel { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.pay-panel p { color: var(--ink-2); max-width: 36em; }
.order-items { display: grid; gap: 12px; }
.order-item { display: flex; align-items: center; gap: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.order-item:last-child { border-bottom: 0; padding-bottom: 0; }
.order-item .oi-text { flex: 1; min-width: 0; display: grid; }
.order-item strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.order-item small { color: var(--muted); font-size: 12.5px; }
.order-item .oi-price { font-weight: 600; font-variant-numeric: tabular-nums; }
.totals { display: grid; gap: 6px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 32px; font-size: 14px; }
.info-grid h3 { font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-bottom: 4px; }
.link-btn { display: inline-flex; align-items: center; gap: 6px; padding: 0; border: 0; background: none; color: var(--accent); font-weight: 600; font-size: 13px; cursor: pointer; text-decoration: none; }
.link-btn:hover { text-decoration: underline; }
.banner { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 12px; font-size: 14px; margin-bottom: 16px; }
.banner.is-ok { background: var(--ok-soft); color: #0b5c35; }
.banner.is-warn { background: var(--warn-soft); color: #7a4100; }

/* ── staff dashboard ───────────────────────────────────────────────────── */
.page-admin { background: #f1efea; }
.admin-bar { position: sticky; top: 0; z-index: 20; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; padding: 12px clamp(16px, 3vw, 28px); background: var(--ink); color: #fff; }
.admin-bar .brand { font-size: 16px; }
.admin-bar .brand small { font-weight: 500; color: rgba(255, 255, 255, 0.6); margin-left: 4px; }
.admin-bar .brand-mark i { mix-blend-mode: normal; opacity: 0.92; }
.admin-bar .brand-mark i:nth-child(4) { background: #fff; }
.admin-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-left: auto; font-size: 13px; }
.admin-tools select { min-height: 34px; padding: 0 10px; border-radius: 8px; border: 1px solid rgba(255, 255, 255, 0.25); background: rgba(255, 255, 255, 0.08); color: #fff; }
.admin-tools select option { color: var(--ink); }
.admin-tools .btn-ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.3); }
.admin-tools .btn-ghost:hover { border-color: #fff; }
.live-dot { display: inline-flex; align-items: center; gap: 6px; color: rgba(255, 255, 255, 0.7); }
.live-dot::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #3ddc84; box-shadow: 0 0 0 3px rgba(61, 220, 132, 0.25); }
.admin-main { max-width: 1320px; margin: 0 auto; padding: 20px clamp(16px, 3vw, 28px) 64px; }
.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.tab { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); font-size: 13px; font-weight: 600; cursor: pointer; }
.tab[aria-pressed='true'] { background: var(--ink); border-color: var(--ink); color: #fff; }
.tab .count { min-width: 20px; padding: 0 6px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); font-size: 12px; text-align: center; }
.tab[aria-pressed='true'] .count { background: rgba(255, 255, 255, 0.18); color: #fff; }
.tab.has-new .count { background: var(--accent); color: #fff; }
.orders { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 16px; }
.order-card { display: grid; gap: 14px; padding: 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); align-content: start; }
.order-card.is-new { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft), var(--shadow); }
.oc-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.oc-head h3 { font-size: 18px; letter-spacing: -0.02em; }
.oc-head small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.oc-total { text-align: right; font-weight: 700; font-size: 17px; font-variant-numeric: tabular-nums; }
.oc-total small { font-weight: 500; }
.oc-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; font-size: 13px; padding: 12px; border-radius: 12px; background: var(--surface-2); }
.oc-meta h4 { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-bottom: 2px; }
.oc-meta a { color: var(--ink); }
.oc-notes { grid-column: 1 / -1; }
.oc-items { display: grid; gap: 8px; }
.oc-item { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; }
.oc-item strong { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.oc-item .specs { grid-column: 1; display: flex; flex-wrap: wrap; gap: 4px; }
.tag { padding: 2px 8px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--line); font-size: 12px; font-weight: 500; color: var(--ink-2); }
.tag.is-strong { background: var(--ink); border-color: var(--ink); color: #fff; }
.tag.is-color { background: linear-gradient(90deg, #e5f6fd, #fde8f1, #fff7d6); border-color: transparent; color: var(--ink); }
.oc-item .oc-item-actions { grid-column: 2; grid-row: 1 / span 3; display: flex; gap: 4px; }
.oc-item .jobs { grid-column: 1; font-size: 12px; color: var(--ok); }
.oc-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.oc-actions .spacer { flex: 1; }
.empty { padding: 56px 24px; text-align: center; color: var(--muted); background: var(--surface); border: 1px dashed var(--line-2); border-radius: var(--radius); }
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login { width: min(380px, 100%); display: grid; gap: 16px; }
.login .brand { justify-content: center; margin-bottom: 4px; }
.login p.muted { text-align: center; margin-top: -8px; }
.printer-note { font-size: 12.5px; color: rgba(255, 255, 255, 0.6); }

/* ── responsive ────────────────────────────────────────────────────────── */
@media (max-width: 1080px) {
  .workspace { grid-template-columns: 1fr 300px; }
  .ws-files { grid-column: 1 / -1; position: static; }
  .ws-files #checkout-btn { display: none; }
  .doc-list { max-height: none; }
  .ws-options { top: 78px; }
  .mobile-bar {
    position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 10px 10px 10px 18px; border-radius: 18px; background: var(--ink); color: #fff; box-shadow: var(--shadow-lg);
  }
  .mobile-bar small { display: block; font-size: 11px; color: rgba(255, 255, 255, 0.6); text-transform: uppercase; letter-spacing: 0.06em; }
  .mobile-bar strong { font-size: 18px; font-variant-numeric: tabular-nums; }
  .mobile-bar .btn-primary { background: var(--accent); }
  .has-docs .site-footer { padding-bottom: 110px; }
  .steps { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 820px) {
  .site-nav { display: none; }
  .hero { grid-template-columns: 1fr; padding-top: 28px; }
  .dropzone { min-height: 260px; }
  .workspace { grid-template-columns: 1fr; padding-top: 16px; }
  .ws-options { position: static; }
  .checkout-body { grid-template-columns: 1fr; }
  .checkout-side { border-left: 0; border-top: 1px solid var(--line); }
  .track-card, .track-form { grid-template-columns: 1fr; }
  .site-footer { grid-template-columns: 1fr 1fr; }
  .orders { grid-template-columns: 1fr; }
  .info-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  body { font-size: 14.5px; }
  .field-row, .choice-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .page-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 12px; }
  .range-form { margin-left: 0; width: 100%; }
  .range-form .input { flex: 1; width: auto; }
  .dialog { width: 100vw; max-width: 100vw; max-height: 100dvh; height: 100dvh; border-radius: 0; }
  .dialog-foot { flex-direction: column; align-items: stretch; }
  .dialog-foot .btn { width: 100%; }
  .timeline { grid-template-columns: 1fr 1fr; row-gap: 16px; }
  .oc-meta { grid-template-columns: 1fr; }
  .site-footer { grid-template-columns: 1fr; gap: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ── QRIS payment ─────────────────────────────────────────────────────────── */
.pay-note .demo-note { margin-top: 10px; }
.pay-grid { display: grid; grid-template-columns: minmax(250px, 300px) 1fr; gap: clamp(18px, 4vw, 36px); align-items: start; }
.qr-ticket { display: grid; gap: 12px; padding: 16px; border-radius: 14px; background: #fff; border: 1px solid var(--line-2); box-shadow: 0 10px 30px rgba(21, 23, 28, 0.08); }
.qr-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.qris-badge { font-weight: 800; letter-spacing: 0.08em; font-size: 14px; padding: 3px 10px; border-radius: 6px; background: var(--ink); color: #fff; }
.qr-box { position: relative; aspect-ratio: 1; display: grid; place-items: center; border-radius: 10px; background: #fff; overflow: hidden; }
.qr-img { display: block; width: 100%; height: 100%; image-rendering: pixelated; transition: opacity 0.2s, filter 0.2s; }
.qr-box.is-expired .qr-img { opacity: 0.1; filter: blur(3px); }
.qr-msg { border: 1px dashed var(--line-2); text-align: center; padding: 20px; gap: 12px; align-content: center; font-size: 14px; }
.qr-expired { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 12px; text-align: center; padding: 16px; }
.qr-amount { display: grid; text-align: center; border-top: 1px dashed var(--line-2); padding-top: 12px; }
.qr-amount small { color: var(--muted); font-size: 12px; }
.qr-amount strong { font-size: 26px; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.qr-meta { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.qr-timer { display: inline-flex; align-items: center; gap: 5px; }
.qr-timer.is-warn { color: var(--err); font-weight: 600; }
.pay-help { display: grid; gap: 16px; align-content: start; }
.pay-steps { margin: 0; padding: 0; list-style: none; counter-reset: step; display: grid; gap: 12px; font-size: 14px; color: var(--ink-2); }
.pay-steps li { counter-increment: step; display: grid; grid-template-columns: 26px 1fr; gap: 10px; align-items: start; }
.pay-steps li::before { content: counter(step); width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--line-2); font-size: 12px; font-weight: 700; color: var(--ink); }
.pay-steps strong { color: var(--ink); }
.pay-status { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; background: var(--warn-soft); color: #7a4100; font-size: 13.5px; font-weight: 600; }
.pulse { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--warn); box-shadow: 0 0 0 0 color-mix(in srgb, var(--warn) 55%, transparent); animation: pulse 1.6s ease-out infinite; }
@keyframes pulse { to { box-shadow: 0 0 0 10px transparent; } }
.pay-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.sandbox-note { padding: 10px 12px; border-radius: 10px; background: #e5f4fc; color: #00506d; font-size: 13px; line-height: 1.6; }
.sandbox-note a { color: inherit; font-weight: 600; }
.sandbox-note .link-btn { color: #006a90; margin-left: 2px; }
.pay-card .demo-note { font-size: 13px; }
@media (max-width: 640px) {
  .pay-grid { grid-template-columns: 1fr; }
  .qr-ticket { width: 100%; max-width: 340px; margin: 0 auto; }
  .pay-actions .btn { flex: 1 1 auto; }
}

/* ── print queue (staff) ──────────────────────────────────────────────────── */
.print-queue { margin-bottom: 20px; padding: 16px 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.print-queue:empty { display: none; }
.pq-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px 20px; }
.pq-title h2 { display: flex; align-items: center; gap: 10px; font-size: 17px; }
.pq-title small { display: block; margin-top: 3px; color: var(--muted); font-size: 13px; }
.pq-mode { padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line); }
.pq-mode.is-auto { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.pq-mode.is-paused { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.pq-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pq-printer { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); font-size: 12.5px; font-weight: 600; max-width: 100%; }
.pq-printer small { font-weight: 500; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 260px; }
.pq-printer.is-printing small { color: var(--accent-ink); }
.pq-printer.is-disabled { background: var(--err-soft); border-color: transparent; color: var(--err); }
.pq-printer.is-disabled small { color: var(--err); }
.pq-list { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 6px; }
.pq-job { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto auto; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); }
.pq-job.is-printing, .pq-job.is-sending { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); background: var(--accent-soft); }
.pq-job.is-held { border-color: color-mix(in srgb, var(--warn) 45%, var(--line)); background: var(--warn-soft); }
.pq-job.is-failed { border-color: color-mix(in srgb, var(--err) 40%, var(--line)); background: var(--err-soft); }
.pq-job.is-done, .pq-job.is-cancelled { background: var(--surface-2); }
.pq-pos { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--ink); color: #fff; font-size: 12px; font-weight: 700; }
.pq-job:not(.is-printing):not(.is-sending):not(.is-queued) .pq-pos { background: var(--surface-2); color: var(--muted); border: 1px solid var(--line-2); }
.pq-job.is-done .pq-pos { color: var(--ok); }
.pq-main { display: grid; min-width: 0; }
.pq-main strong { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pq-code { font-variant-numeric: tabular-nums; margin-right: 2px; }
.pq-main small { font-size: 12px; color: var(--muted); }
.pq-main .pq-note { color: var(--ink-2); font-weight: 600; }
.pq-job.is-failed .pq-note { color: var(--err); }
.pq-status { font-size: 12px; font-weight: 700; white-space: nowrap; color: var(--ink-2); }
.pq-status.s-printing, .pq-status.s-sending { color: var(--accent-ink); }
.pq-status.s-held { color: var(--warn); }
.pq-status.s-failed, .pq-status.is-retrying { color: var(--err); }
.pq-status.s-done { color: var(--ok); }
.pq-status.s-cancelled { color: var(--muted); }
.pq-acts { display: flex; align-items: center; gap: 4px; }
.pq-empty { margin-top: 12px; padding: 14px; border-radius: 10px; border: 1px dashed var(--line-2); color: var(--muted); font-size: 13.5px; text-align: center; }
.pq-recent { margin-top: 12px; }
.pq-recent summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.pq-recent .pq-list { margin-top: 8px; }
.oc-item .jobs.s-queued, .oc-item .jobs.s-sending, .oc-item .jobs.s-printing { color: var(--accent-ink); }
.oc-item .jobs.s-held { color: var(--warn); font-weight: 600; }
.oc-item .jobs.s-failed { color: var(--err); font-weight: 600; }
.oc-item .jobs.s-cancelled { color: var(--muted); }
.oc-hint { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 10px; background: var(--ok-soft); color: #0b5c35; font-size: 13px; font-weight: 600; }
.timeline-note { margin-top: 14px; }
@media (max-width: 640px) {
  .pq-job { gap: 6px 8px; align-items: start; }
  /* A text button (Mulai cetak, Coba lagi) gets its own row so the file name keeps the width. */
  .pq-acts:has(.btn) { grid-column: 2 / -1; grid-row: 2; justify-content: flex-end; }
}

/* ── shared: shop health ──────────────────────────────────────────────────── */
.banner.is-error { background: var(--err-soft); color: #8a1820; }
.banner a, .banner .link-btn { color: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.health-dot { display: inline-block; flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--line-2); }
.health-dot.is-online { background: #19a35b; box-shadow: 0 0 0 3px color-mix(in srgb, #19a35b 22%, transparent); }
.health-dot.is-closed { background: var(--warn); }
.health-dot.is-offline { background: #a3a8b3; }
.shop-status { display: inline-flex; align-items: center; gap: 7px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.shop-status.is-online { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.shop-status.is-closed { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.check { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; cursor: pointer; }
.check input { margin: 3px 0 0; width: 16px; height: 16px; flex: none; accent-color: var(--accent); }
.center { text-align: center; }

/* ── shop page ────────────────────────────────────────────────────────────── */
.shop-eyebrow { display: inline-flex; align-items: center; gap: 9px; color: var(--ink-2); text-transform: none; letter-spacing: 0; font-size: 14px; }
.shop-title { overflow-wrap: anywhere; }
.shop-facts { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 8px; font-size: 14px; }
.shop-facts li { display: grid; grid-template-columns: 84px 1fr; gap: 12px; }
.shop-facts li:has(span:last-child:empty) { display: none; }
.fact-label { font-size: 12px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); padding-top: 2px; }
.shop-closed { margin: 20px 0 0; }
.section.narrow { max-width: 820px; }

/* ── shop dashboard (/toko) ───────────────────────────────────────────────── */
.page-toko .admin-bar .brand { min-width: 0; }
.page-toko .admin-bar .brand > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-bar .shop-status { background: rgba(255, 255, 255, 0.1); color: #fff; border-color: rgba(255, 255, 255, 0.15); }
.admin-bar .shop-status.is-online { background: rgba(61, 220, 132, 0.16); color: #8ff0b8; }
.admin-bar .shop-status.is-closed { background: rgba(255, 176, 64, 0.16); color: #ffcf8a; }
.admin-bar .shop-status.is-offline { color: #ff9aa2; background: rgba(255, 90, 100, 0.14); }
.admin-bar .health-dot.is-offline { background: #ff6b76; }
.admin-bar .signout { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.3); }
.admin-bar .signout:hover:not(:disabled) { border-color: #fff; }
.switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 600; white-space: nowrap; }
.switch input { appearance: none; -webkit-appearance: none; position: relative; width: 38px; height: 22px; margin: 0; border-radius: 999px; background: rgba(255, 255, 255, 0.25); cursor: pointer; transition: background 0.15s; }
.switch input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform 0.15s; }
.switch input:checked { background: #19a35b; }
.switch input:checked::after { transform: translateX(16px); }
.dash-nav { position: sticky; top: var(--bar-h, 58px); z-index: 15; display: flex; gap: 4px; padding: 8px clamp(16px, 3vw, 28px); overflow-x: auto; background: color-mix(in srgb, #f1efea 92%, transparent); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); scrollbar-width: none; }
.dash-nav::-webkit-scrollbar { display: none; }
.dash-link { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 14px; border: 0; border-radius: 999px; background: transparent; font-size: 14px; font-weight: 600; color: var(--ink-2); cursor: pointer; white-space: nowrap; }
.dash-link:hover { background: rgba(21, 23, 28, 0.06); color: var(--ink); }
.dash-link[aria-pressed='true'] { background: var(--ink); color: #fff; }
.dash-badge:empty { display: none; }
.dash-badge { min-width: 18px; padding: 0 5px; border-radius: 999px; background: var(--surface); color: var(--ink); border: 1px solid var(--line-2); font-size: 11px; line-height: 16px; text-align: center; }
.dash-badge.is-warn { background: var(--accent); border-color: var(--accent); color: #fff; }
.dash-card { margin-bottom: 16px; }
.card.dash-card + .card.dash-card { margin-top: 0; }
.dash-card h2 { font-size: 17px; }
.dash-card h3 { font-size: 14px; margin: 22px 0 10px; }
.dash-card-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px 20px; margin-bottom: 16px; }
.dash-card-head h2 { margin-bottom: 4px; }
.dash-card-head p { max-width: 46em; font-size: 14px; }
.dash-card > .field, .dash-card > .field-row { margin-bottom: 14px; }
.dash-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 16px; }
.field-row.three { grid-template-columns: 1fr 1.2fr 1.4fr; }
.setup-banner ul { margin: 10px 0 0; }
.setup-list { list-style: none; padding: 0; display: grid; gap: 6px; }
.setup-list li { display: flex; align-items: center; gap: 8px; }
.setup-list li.is-done { color: var(--ok); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--ok) 40%, transparent); }
.step-dot { width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; opacity: 0.6; }
.plain-list { margin: 0; padding-left: 18px; display: grid; gap: 8px; font-size: 14px; color: var(--ink-2); }
.plain-list strong { color: var(--ink); }
.oc-hint.is-warn { background: var(--warn-soft); color: #7a4100; }
.pq-job.is-sent { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); background: var(--accent-soft); }
.pq-job.is-sent .pq-pos { background: var(--ink) !important; color: #fff !important; border: 0 !important; }
.pq-status.s-sent, .oc-item .jobs.s-sent { color: var(--accent-ink); }

/* devices */
.device-list { display: grid; gap: 12px; }
.device { padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface-2); }
.device.is-online { background: var(--surface); border-color: color-mix(in srgb, var(--ok) 30%, var(--line)); }
.device-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.device-head > div { flex: 1 1 200px; min-width: 0; display: grid; }
.device-head strong { font-size: 15px; overflow-wrap: anywhere; }
.device-head small { font-size: 12.5px; }
.printer-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 6px; }
.printer-row { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto; align-items: center; gap: 8px 14px; padding: 8px 10px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); font-size: 13.5px; }
.printer-name { display: flex; align-items: center; gap: 8px; min-width: 0; font-weight: 600; }
.printer-name > span { overflow: hidden; text-overflow: ellipsis; }
.printer-name > :first-child, .pq-printer > :first-child { flex: none; }
.printer-state { display: grid; color: var(--ink-2); font-size: 13px; }
.printer-state small { color: var(--warn); font-size: 12px; }
.printer-row.is-disabled .printer-state, .printer-row.is-missing .printer-state { color: var(--err); }
.printer-row select { min-height: 34px; padding: 0 8px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--surface); font-size: 13px; }
.pair-card { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft), var(--shadow); scroll-margin-top: calc(var(--bar-h, 58px) + 64px); }
.pair-code { display: grid; justify-items: center; gap: 4px; padding: 18px; border-radius: 14px; background: var(--ink); color: #fff; text-align: center; }
.pair-code small { font-size: 12px; color: rgba(255, 255, 255, 0.65); }
.pair-code small:first-child { text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; }
.pair-code strong { font-size: clamp(30px, 6vw, 44px); letter-spacing: 0.14em; font-variant-numeric: tabular-nums; font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; }
.pair-code .muted { color: rgba(255, 255, 255, 0.65); }
.pair-steps { margin: 18px 0 12px; padding-left: 20px; display: grid; gap: 12px; font-size: 14px; color: var(--ink-2); }
.pair-steps a:not(.btn) { color: var(--accent-ink); font-weight: 600; }
.pair-steps .btn { margin-left: 4px; vertical-align: middle; }
.pair-steps .cmd { display: flex; width: max-content; }
.cmd { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; margin-top: 6px; padding: 4px 4px 4px 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); font-size: 13px; }
.cmd code, .cmd a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-card-head .cmd { margin-top: 0; }
code { font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-size: 0.92em; }
.pair-steps li > code { padding: 1px 6px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--line); }

/* prices */
.big-check { padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); }
.table-wrap { overflow-x: auto; margin: 0 -4px; padding: 0 4px; }
.price-table, .ledger { width: 100%; border-collapse: collapse; font-size: 14px; }
.price-table th, .ledger th { text-align: left; font-size: 12px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); padding: 0 10px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.price-table td, .ledger td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.price-table th:first-child, .price-table td:first-child { padding-left: 0; width: 46%; }
.price-table input[type='number'] { width: 120px; min-height: 38px; padding: 6px 10px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--surface); font-variant-numeric: tabular-nums; }
.price-table input[type='number']:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(21, 23, 28, 0.08); }
.price-table .check { align-items: center; }
.price-table .check input { margin: 0; }
.min-order { max-width: 260px; margin-top: 20px; }
.price-example { margin-top: 16px; padding: 12px 14px; border-radius: 10px; background: #e5f4fc; color: #00506d; font-size: 14px; }

/* balance */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.stat { display: grid; gap: 4px; padding: 14px 16px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.stat small { font-size: 12.5px; color: var(--muted); }
.stat strong { font-size: 20px; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.stat.is-main { background: var(--ink); border-color: var(--ink); color: #fff; }
.stat.is-main small { color: rgba(255, 255, 255, 0.65); }
.stat.is-main strong { font-size: 26px; }
.ledger .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ledger td.pos { color: var(--ok); font-weight: 600; }
.ledger td.neg { color: var(--err); font-weight: 600; }
.ledger th:first-child, .ledger td:first-child { padding-left: 0; white-space: nowrap; }
.ledger th:last-child, .ledger td:last-child { padding-right: 0; }

@media (max-width: 820px) {
  .field-row.three { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .page-toko .admin-bar { gap: 10px; }
  .page-toko .admin-bar .brand { flex: 1 1 0; }
  .page-toko .admin-bar .brand small { display: none; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat.is-main { grid-column: 1 / -1; }
  .stat strong { font-size: 17px; }
  .page-toko .admin-tools { order: 3; width: 100%; margin-left: 0; justify-content: space-between; }
  .printer-row { grid-template-columns: 1fr auto; }
  .printer-row .printer-state { grid-column: 1; grid-row: 2; }
  .printer-row select { grid-column: 2; grid-row: 1 / span 2; }
  .price-table thead { display: none; }
  .price-table, .price-table tbody, .price-table tr, .price-table td { display: block; width: auto !important; }
  .price-table tr { padding: 10px 0; border-bottom: 1px solid var(--line); }
  .price-table td { border: 0; padding: 4px 0; }
  .price-table td[data-label] { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-left: 26px; }
  .price-table td[data-label]::before { content: attr(data-label); font-size: 12.5px; color: var(--muted); }
  .price-table td[hidden] { display: none; }
  .ledger thead { display: none; }
  .ledger, .ledger tbody, .ledger tr, .ledger td { display: block; }
  .ledger tr { padding: 10px 0; border-bottom: 1px solid var(--line); }
  .ledger td { border: 0; padding: 2px 0; text-align: left !important; }
  .ledger td[data-label]:not(:first-child):not(:nth-child(2)) { display: flex; justify-content: space-between; }
  .ledger td[data-label]:not(:first-child):not(:nth-child(2))::before { content: attr(data-label); color: var(--muted); font-weight: 400; }
  .ledger td:first-child { font-size: 12.5px; color: var(--muted); }
  .orders { grid-template-columns: minmax(0, 1fr); }
}
