/*! Easy Business Card (https://univa.my/easybusinesscard) © 2026 UNIVA. All rights reserved. */
@font-face { font-family: "Inter"; src: url("/fonts/inter-var.woff2") format("woff2-variations"); font-weight: 100 900; font-display: swap; }

:root {
  --blue: #0054ff;
  --blue-ink: #0041c7;
  --blue-soft: #eef3ff;
  --ink: #0b1220;
  --muted: #566074;
  --line: #e2e7f0;
  --bg: #f5f7fb;
  --card: #fff;
  --ok: #0f7a4f;
  --warn: #9a5b00;
  --bad: #c0262d;
  --r: 14px;
  --shadow: 0 1px 2px rgba(11, 18, 32, .05), 0 8px 24px -12px rgba(11, 18, 32, .12);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; }
a { color: var(--blue-ink); }
h1, h2, p { margin: 0; }
button, input, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 10px; text-decoration: none; }
.skip:focus { top: 12px; }
svg { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.wrap { width: min(1080px, 100% - 32px); margin-inline: auto; }

/* top bar */
.top { position: sticky; top: 0; z-index: 20; background: rgba(255, 255, 255, .9); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; gap: 12px; height: 60px; }
.brand { display: inline-flex; border-radius: 8px; }
.brand img { height: 26px; width: auto; display: block; }
.product { font-weight: 650; letter-spacing: -.01em; padding-left: 12px; border-left: 1px solid var(--line); white-space: nowrap; }
.lang { margin-left: auto; display: inline-flex; padding: 3px; background: var(--bg); border: 1px solid var(--line); border-radius: 999px; }
.lang button { border: 0; background: none; padding: 5px 12px; min-width: 44px; min-height: 32px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; }
.lang button[aria-pressed="true"] { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(11, 18, 32, .12); }

/* hero */
.hero { padding: 44px 0 24px; }
.eyebrow { display: inline-block; font-size: 13px; font-weight: 600; color: var(--blue-ink); background: var(--blue-soft); padding: 4px 10px; border-radius: 999px; margin-bottom: 16px; }
.hero h1 { font-size: clamp(30px, 6vw, 52px); line-height: 1.08; letter-spacing: -.03em; font-weight: 750; max-width: 16ch; }
.hero h1 span { color: var(--blue); }
.lede { margin-top: 16px; max-width: 62ch; color: var(--muted); font-size: 17px; }
.assure { list-style: none; padding: 0; margin: 22px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.assure li { display: inline-flex; align-items: center; gap: 8px; background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px 7px 10px; font-size: 14px; }
.assure li:first-child { border-color: #b9ccff; background: var(--blue-soft); font-weight: 600; }
.assure svg { width: 18px; height: 18px; color: var(--blue); }

/* drop zone */
#add { outline: none; }
.zone { position: relative; text-align: center; background: var(--card); border: 2px dashed #c8d3e6; border-radius: 22px; padding: 30px 20px 24px; transition: border-color .15s, background-color .15s; }
.zone.over { border-color: var(--blue); background: var(--blue-soft); }
.zone-art { width: 120px; height: 80px; margin: 0 auto 6px; display: block; stroke-width: 2; }
.zone-art .c1 { fill: #fff; stroke: var(--blue); }
.zone-art .c2 { fill: var(--blue-soft); stroke: #b9ccff; }
.zone-art .ln { stroke: #9fb3d9; }
.zone-art .dot { fill: var(--blue); stroke: none; }
.zone-title { font-weight: 650; font-size: 18px; }
.zone-sub { color: var(--muted); font-size: 14px; margin-top: 4px; }
.zone-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.engine { margin-top: 14px; font-size: 14px; color: var(--muted); min-height: 1.55em; }
.engine.busy::before { content: ""; display: inline-block; width: 12px; height: 12px; margin-right: 8px; vertical-align: -1px; border: 2px solid var(--blue); border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; }
.engine.ok { color: var(--ok); }
.engine.bad { color: var(--bad); font-weight: 600; }
@keyframes spin { to { transform: rotate(360deg); } }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 18px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font-weight: 600; font-size: 15px; cursor: pointer; text-decoration: none; transition: background-color .15s, border-color .15s, transform .05s; }
.btn:hover { border-color: #c3cede; background: #fafbfe; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--blue); border-color: var(--blue); color: #fff; box-shadow: 0 8px 20px -10px rgba(0, 84, 255, .7); }
.btn-primary:hover { background: var(--blue-ink); border-color: var(--blue-ink); }
.btn-small { min-height: 40px; padding: 0 14px; font-size: 14px; }
.btn-quiet { border-color: transparent; background: none; color: var(--muted); }
.link { border: 0; background: none; padding: 6px 0; font-size: 14px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; color: var(--muted); }
.link.danger { color: var(--bad); }

/* sections */
.block { margin-top: 36px; }
.sec-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.sec-head h2, .how h2 { font-size: 22px; letter-spacing: -.02em; font-weight: 700; }
.count { color: var(--muted); font-weight: 500; }
.exports { display: flex; flex-wrap: wrap; gap: 8px; }

/* scan queue */
.queue { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.q-item { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; box-shadow: var(--shadow); }
.q-item.failed { border-color: #f1c4c6; }
.q-head { display: flex; gap: 12px; align-items: center; }
.q-thumb { width: 72px; height: 46px; object-fit: cover; border-radius: 8px; background: var(--bg); border: 1px solid var(--line); flex: none; }
.q-thumb:not([src]) { visibility: hidden; }
.q-meta { min-width: 0; flex: 1; }
.q-file { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.q-status { font-size: 14px; color: var(--muted); }
.q-status.ok { color: var(--ok); }
.q-status.warn { color: var(--warn); }
.q-status.bad { color: var(--bad); }
progress { -webkit-appearance: none; appearance: none; width: 100%; height: 6px; border: 0; border-radius: 999px; background: var(--bg); overflow: hidden; margin-top: 6px; display: block; }
progress::-webkit-progress-bar { background: #e9eef7; border-radius: 999px; }
progress::-webkit-progress-value { background: var(--blue); border-radius: 999px; transition: width .2s; }
progress::-moz-progress-bar { background: var(--blue); border-radius: 999px; }
.q-body:empty { display: none; }
.q-body { margin-top: 14px; }
.q-grid { display: grid; gap: 14px; }
.q-raw { border: 1px solid var(--line); border-radius: 12px; background: #fbfcfe; padding: 0 12px; align-self: start; }
.q-raw summary { cursor: pointer; font-weight: 600; font-size: 14px; padding: 12px 0; }
.q-photo { display: block; width: 100%; height: auto; border-radius: 8px; border: 1px solid var(--line); margin-bottom: 10px; }
.q-raw pre { margin: 0 0 12px; white-space: pre-wrap; word-break: break-word; font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: #2a3346; max-height: 320px; overflow: auto; }
.q-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.q-actions svg { width: 18px; height: 18px; }

/* fields */
.fields { display: grid; gap: 12px; }
.field { display: grid; gap: 4px; }
.field label { font-size: 13px; font-weight: 600; color: #2b3447; }
.fields-hint { grid-column: 1 / -1; font-size: 12px; color: var(--muted); }
.field input, .field textarea { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid #cfd7e4; border-radius: 10px; background: #fff; font-size: 16px; }
.field textarea { resize: vertical; min-height: 66px; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(0, 84, 255, .18); }

/* saved cards */
.search { position: relative; margin-bottom: 12px; }
.search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search input { width: 100%; min-height: 48px; padding: 0 14px 0 44px; border: 1px solid #cfd7e4; border-radius: 12px; background: var(--card); font-size: 16px; }
.search input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(0, 84, 255, .18); }
.dupes { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; background: #fff8eb; border: 1px solid #f3d9a4; color: #6b4300; border-radius: 12px; padding: 10px 12px 10px 14px; margin-bottom: 12px; font-size: 14px; }
.groups { display: grid; gap: 10px; }
.group { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; }
.group summary { list-style: none; display: flex; align-items: center; gap: 10px; padding: 14px 16px; cursor: pointer; min-height: 56px; }
.group summary::-webkit-details-marker { display: none; }
.group summary::after { content: ""; width: 9px; height: 9px; margin-left: 4px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(-45deg); transition: transform .15s; flex: none; }
.group[open] summary::after { transform: rotate(45deg); }
.group summary:focus-visible { outline-offset: -3px; }
.g-name { font-weight: 700; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.g-none .g-name { color: var(--muted); font-style: italic; font-weight: 600; }
.g-count { font-size: 13px; color: var(--muted); background: var(--bg); border-radius: 999px; padding: 2px 10px; white-space: nowrap; }
.cards { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.card { display: grid; grid-template-columns: 64px 1fr; gap: 4px 12px; padding: 12px 16px; align-items: start; }
.card + .card { border-top: 1px solid var(--line); }
.c-thumb { width: 64px; height: 40px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); background: var(--bg); }
.c-blank { display: grid; place-items: center; font-weight: 700; color: var(--blue-ink); background: var(--blue-soft); }
.c-main { min-width: 0; }
.c-name { font-weight: 650; overflow-wrap: anywhere; }
.c-title { font-size: 14px; color: var(--muted); }
.c-links { font-size: 14px; display: flex; flex-wrap: wrap; gap: 2px 14px; overflow-wrap: anywhere; }
.c-addr { font-size: 13px; color: var(--muted); margin-top: 2px; }
.c-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.act { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; min-width: 44px; justify-content: center; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); font-size: 13px; font-weight: 600; cursor: pointer; }
.act:hover { background: #fafbfe; border-color: #c3cede; }
.act svg { width: 17px; height: 17px; }
.act.danger { color: var(--bad); }
.empty { color: var(--muted); background: var(--card); border: 1px dashed #c8d3e6; border-radius: var(--r); padding: 22px; text-align: center; }
.saved-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 16px; margin-top: 14px; }
.note { font-size: 13px; color: var(--muted); }
.note.warn { color: var(--warn); font-weight: 600; }

/* how it works */
.how { padding-bottom: 12px; }
.steps { list-style: none; counter-reset: s; padding: 0; margin: 14px 0 0; display: grid; gap: 12px; }
.steps li { counter-increment: s; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 16px 16px 58px; position: relative; display: grid; gap: 2px; }
.steps li::before { content: counter(s); position: absolute; left: 16px; top: 16px; width: 28px; height: 28px; border-radius: 50%; background: var(--blue); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 14px; }
.steps span { color: var(--muted); font-size: 15px; }
.fine { margin-top: 14px; font-size: 14px; color: var(--muted); }

.foot { margin-top: 44px; border-top: 1px solid var(--line); background: var(--card); }
.foot-in { display: flex; align-items: center; gap: 14px; padding: 22px 0 calc(22px + env(safe-area-inset-bottom)); font-size: 14px; color: var(--muted); }
.foot-brand img { height: 22px; width: auto; display: block; }

/* dialog */
dialog { width: min(640px, 100% - 24px); max-height: calc(100dvh - 24px); border: 0; border-radius: 18px; padding: 0; box-shadow: 0 30px 80px -20px rgba(11, 18, 32, .45); color: var(--ink); }
dialog::backdrop { background: rgba(11, 18, 32, .45); }
dialog form { display: flex; flex-direction: column; max-height: calc(100dvh - 24px); }
.dlg-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.dlg-head h2 { font-size: 18px; }
#edit-body { padding: 16px 18px; overflow: auto; }
.dlg-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 18px; border-top: 1px solid var(--line); }
.icon-btn { border: 0; background: none; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 10px; cursor: pointer; }
.icon-btn:hover { background: var(--bg); }

.toast { position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); background: var(--ink); color: #fff; padding: 11px 16px; border-radius: 12px; font-size: 14px; max-width: calc(100% - 32px); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 60; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

@media (min-width: 560px) {
  .fields { grid-template-columns: 1fr 1fr; }
  .f-name, .f-address { grid-column: 1 / -1; }
  .card { grid-template-columns: 64px 1fr auto; }
  .c-actions { grid-column: auto; margin-top: 0; justify-content: flex-end; }
}
@media (min-width: 860px) {
  .hero { padding: 64px 0 30px; }
  .zone { padding: 40px 24px 30px; }
  .q-grid { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .act span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .act { padding: 0 10px; }
}
@media (max-width: 420px) {
  .product { font-size: 15px; padding-left: 10px; }
  .brand img { height: 22px; }
  .zone-actions .btn { flex: 1 1 100%; }
  .act { flex: 1 1 0; padding: 0 6px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
