/* Smart NFC & QR Studio — design system on top of Bootstrap 5.3 (light + dark via data-bs-theme). */
:root {
  --nq-primary: #4f46e5;
  --nq-primary-2: #7c3aed;
  --nq-grad: linear-gradient(135deg, #4f46e5 0%, #7c3aed 55%, #db2777 100%);
  --nq-radius: 14px;
  --nq-sidebar-w: 264px;
  --bs-primary: #4f46e5;
  --bs-primary-rgb: 79, 70, 229;
  --bs-link-color: #4f46e5;
  --bs-link-color-rgb: 79, 70, 229;
  --bs-link-hover-color-rgb: 67, 56, 202;
  --bs-link-hover-color: #4338ca;
  --bs-body-font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --bs-border-radius: 10px;
}
[data-bs-theme="light"] { --nq-bg: #f4f6fb; --nq-surface: #ffffff; --nq-line: #e6e8f0; --nq-sidebar: #ffffff; --nq-muted: #6b7280; --nq-hover: #f1f3f9; }
[data-bs-theme="dark"] { --nq-bg: #0b1020; --nq-surface: #121831; --nq-line: #232a45; --nq-sidebar: #0f1529; --nq-muted: #94a3b8; --nq-hover: #1a2140;
  --bs-body-bg: #0b1020; --bs-tertiary-bg: #121831; --bs-border-color: #232a45; --bs-link-color: #a5b4fc; --bs-link-hover-color: #c7d2fe; --bs-link-color-rgb: 165, 180, 252; --bs-link-hover-color-rgb: 199, 210, 254; }
a { text-underline-offset: 2px; }
body { font-family: var(--bs-body-font-family); background: var(--nq-bg); -webkit-font-smoothing: antialiased; }
.btn-primary { --bs-btn-bg: #4f46e5; --bs-btn-border-color: #4f46e5; --bs-btn-hover-bg: #4338ca; --bs-btn-hover-border-color: #4338ca; --bs-btn-active-bg: #3730a3; --bs-btn-disabled-bg: #4f46e5; }
.btn-outline-primary { --bs-btn-color: #4f46e5; --bs-btn-border-color: #4f46e5; --bs-btn-hover-bg: #4f46e5; --bs-btn-hover-border-color: #4f46e5; --bs-btn-active-bg: #4338ca; }
[data-bs-theme="dark"] .btn-outline-primary { --bs-btn-color: #a5b4fc; --bs-btn-border-color: #6366f1; }
.text-primary { color: #4f46e5 !important; }
[data-bs-theme="dark"] .text-primary { color: #a5b4fc !important; }
.form-control, .form-select { border-radius: 10px; }
.form-control:focus, .form-select:focus { border-color: #818cf8; box-shadow: 0 0 0 .2rem rgba(79, 70, 229, .15); }
.nq-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }

/* ------------------------------------------------------------ brand */
.nq-brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; font-weight: 800; }
.nq-logo { width: 36px; height: 36px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; color: #fff; background: var(--nq-grad); box-shadow: 0 6px 16px -6px rgba(79,70,229,.7); flex: none; }
.nq-brand-name { font-size: 15px; line-height: 1.15; letter-spacing: -.01em; }
.nq-brand-light { color: #fff; }

/* ------------------------------------------------------------ app shell */
.nq-shell { display: flex; min-height: 100vh; }
.nq-sidebar { position: fixed; inset: 0 auto 0 0; width: var(--nq-sidebar-w); background: var(--nq-sidebar); border-right: 1px solid var(--nq-line); display: flex; flex-direction: column; padding: 18px 14px; z-index: 1040; transition: transform .25s ease; }
.nq-sidebar .nq-brand { padding: 4px 8px 18px; }
.nq-nav { flex: 1; overflow-y: auto; }
.nq-nav-group { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--nq-muted); padding: 14px 10px 6px; }
.nq-nav-link { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: var(--bs-body-color); text-decoration: none; font-weight: 500; font-size: 14.5px; margin-bottom: 2px; }
.nq-nav-link i { color: var(--nq-muted); width: 18px; }
.nq-nav-link:hover { background: var(--nq-hover); color: var(--bs-body-color); }
.nq-nav-link.active { background: rgba(79,70,229,.1); color: #4f46e5; font-weight: 600; }
.nq-nav-link.active i { color: #4f46e5; }
[data-bs-theme="dark"] .nq-nav-link.active, [data-bs-theme="dark"] .nq-nav-link.active i { color: #a5b4fc; background: rgba(99,102,241,.18); }
.nq-sidebar-foot { border-top: 1px solid var(--nq-line); padding: 14px 8px 2px; }
.nq-plan-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; padding: 5px 10px; border-radius: 999px; color: #92400e; background: #fef3c7; }
[data-bs-theme="dark"] .nq-plan-chip { color: #fcd34d; background: rgba(245, 158, 11, .15); }
.nq-main { flex: 1; min-width: 0; margin-left: var(--nq-sidebar-w); display: flex; flex-direction: column; }
.nq-topbar { position: sticky; top: 0; z-index: 1020; display: flex; align-items: center; gap: 12px; height: 64px; padding: 0 28px; background: color-mix(in srgb, var(--nq-bg) 85%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--nq-line); }
.nq-page-title { font-size: 18px; font-weight: 700; margin: 0; }
.nq-content { padding: 28px; flex: 1; max-width: 1440px; width: 100%; }
.nq-icon-btn { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--nq-line); background: var(--nq-surface); display: inline-flex; align-items: center; justify-content: center; color: var(--bs-body-color); }
.nq-user-btn { display: inline-flex; align-items: center; gap: 10px; border: 1px solid var(--nq-line); background: var(--nq-surface); border-radius: 999px; padding: 4px 12px 4px 4px; }
.nq-avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; flex: none; }
.nq-avatar-initials { display: inline-flex; align-items: center; justify-content: center; background: var(--nq-grad); color: #fff; font-size: 12px; font-weight: 700; }
.nq-backdrop { display: none; }
@media (max-width: 991.98px) {
  .nq-sidebar { transform: translateX(-100%); }
  body.nq-sidebar-open .nq-sidebar { transform: none; box-shadow: 0 0 60px rgba(0,0,0,.25); }
  body.nq-sidebar-open .nq-backdrop { display: block; position: fixed; inset: 0; background: rgba(15,23,42,.45); z-index: 1035; }
  .nq-main { margin-left: 0; }
  .nq-topbar { padding: 0 16px; }
  .nq-content { padding: 18px 16px; }
}

/* ------------------------------------------------------------ cards & widgets */
.nq-card { border: 1px solid var(--nq-line); border-radius: var(--nq-radius); background: var(--nq-surface); box-shadow: 0 1px 2px rgba(15,23,42,.04); }
.nq-card > .card-header, .nq-card > .card-footer { background: transparent; border-color: var(--nq-line); padding: 14px 18px; }
.nq-card > .card-body { padding: 18px; }
.nq-card .list-group-item { background: transparent; border-color: var(--nq-line); padding-left: 18px; padding-right: 18px; }
.nq-kpi .card-body { position: relative; }
.nq-kpi-icon { position: absolute; top: 16px; right: 16px; width: 38px; height: 38px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; }
.nq-kpi-label { font-size: 13px; color: var(--nq-muted); font-weight: 500; }
.nq-kpi-value { font-size: 28px; font-weight: 800; letter-spacing: -.02em; margin-top: 4px; }
.nq-kpi-sub { font-size: 12px; color: var(--nq-muted); }
.nq-tone-indigo { background: rgba(79,70,229,.12); color: #4f46e5; } .nq-tone-green { background: rgba(22,163,74,.12); color: #16a34a; }
.nq-tone-blue { background: rgba(37,99,235,.12); color: #2563eb; } .nq-tone-violet { background: rgba(124,58,237,.12); color: #7c3aed; }
.nq-tone-teal { background: rgba(13,148,136,.12); color: #0d9488; } .nq-tone-orange { background: rgba(234,88,12,.12); color: #ea580c; }
.nq-tone-pink { background: rgba(219,39,119,.12); color: #db2777; } .nq-tone-slate { background: rgba(71,85,105,.14); color: #64748b; }
.nq-chart { position: relative; height: 290px; }
.nq-chart-sm { height: 240px; }
.nq-progress { height: 7px; border-radius: 99px; background: var(--nq-hover); }
.nq-progress .progress-bar { background: var(--nq-grad); border-radius: 99px; }
.nq-empty { text-align: center; color: var(--nq-muted); padding: 34px 12px; }
.nq-empty i { font-size: 30px; opacity: .55; margin-bottom: 10px; display: block; }
.nq-empty p { margin: 0; }
.nq-empty-sm { padding: 18px 8px; }
.nq-empty-sm i { font-size: 22px; }
.nq-activity-dot { width: 30px; height: 30px; border-radius: 50%; background: rgba(79,70,229,.12); color: #4f46e5; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; flex: none; }
.nq-getting-started { background: linear-gradient(120deg, rgba(79,70,229,.08), rgba(219,39,119,.06)); }
.nq-check { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--nq-line); background: var(--nq-surface); color: var(--bs-body-color); text-decoration: none; font-size: 13.5px; font-weight: 500; }
.nq-check i { color: var(--nq-muted); }
.nq-check.is-done { color: var(--nq-muted); text-decoration: line-through; }
.nq-check.is-done i { color: #16a34a; }
.nq-tabs { gap: 6px; border-bottom: 1px solid var(--nq-line); }
.nq-tabs .nav-link { border: 0; border-bottom: 2px solid transparent; border-radius: 0; color: var(--nq-muted); font-weight: 600; padding: 10px 6px; margin-right: 14px; }
.nq-tabs .nav-link.active { color: #4f46e5; border-bottom-color: #4f46e5; }
[data-bs-theme="dark"] .nq-tabs .nav-link.active { color: #a5b4fc; border-bottom-color: #a5b4fc; }
.nq-avatar-xl { width: 112px; height: 112px; border-radius: 50%; overflow: hidden; background: var(--nq-grad); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 36px; font-weight: 800; box-shadow: 0 10px 24px -12px rgba(79,70,229,.8); }
.nq-avatar-xl img { width: 100%; height: 100%; object-fit: cover; }
.nq-device-icon { width: 40px; height: 40px; border-radius: 10px; background: var(--nq-hover); display: inline-flex; align-items: center; justify-content: center; color: var(--nq-muted); flex: none; }
.nq-choice-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.nq-choice input { position: absolute; opacity: 0; }
.nq-choice span { display: flex; flex-direction: column; gap: 2px; padding: 14px; border-radius: 12px; border: 2px solid var(--nq-line); cursor: pointer; }
.nq-choice span i { font-size: 20px; color: var(--nq-muted); margin-bottom: 6px; }
.nq-choice small { color: var(--nq-muted); }
.nq-choice input:checked + span { border-color: #4f46e5; background: rgba(79,70,229,.06); }
.nq-choice input:checked + span i { color: #4f46e5; }
.nq-choice input:focus-visible + span { outline: 3px solid rgba(79,70,229,.35); }
.nq-meter { height: 5px; border-radius: 99px; background: var(--nq-hover); overflow: hidden; }
.nq-meter span { display: block; height: 100%; width: 0; background: #ef4444; transition: width .25s, background .25s; }

/* ------------------------------------------------------------ auth */
.nq-auth-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: 100vh; }
.nq-auth-art { position: relative; overflow: hidden; color: #fff; padding: 40px 48px; display: flex; flex-direction: column; background: radial-gradient(circle at 20% 15%, #6366f1 0, transparent 45%), radial-gradient(circle at 85% 80%, #db2777 0, transparent 40%), #1e1b4b; }
.nq-auth-pitch { margin-top: auto; }
.nq-auth-pitch h2 { font-size: clamp(28px, 3vw, 40px); font-weight: 800; line-height: 1.15; margin-bottom: 24px; }
.nq-auth-pitch ul { list-style: none; padding: 0; margin: 0 0 28px; display: grid; gap: 12px; font-size: 15.5px; color: #e0e7ff; }
.nq-auth-pitch li i { width: 26px; color: #a5b4fc; }
.nq-auth-card-art { margin-bottom: 8px; }
.nq-mini-card { width: 300px; border-radius: 16px; overflow: hidden; background: #fff; color: #0f172a; box-shadow: 0 30px 60px -20px rgba(0,0,0,.6); transform: rotate(-4deg); }
.nq-mini-head { background: linear-gradient(135deg, #1a65e6, #0d43a8); color: #fff; font-weight: 800; font-size: 12px; letter-spacing: .06em; text-align: center; padding: 22px 10px; }
.nq-mini-body { display: flex; align-items: center; justify-content: space-evenly; padding: 22px 10px; font-size: 34px; color: #1d4ed8; }
.nq-mini-body span { font-size: 11px; font-weight: 700; color: #94a3b8; }
.nq-auth-main { display: flex; align-items: center; justify-content: center; padding: 40px 20px; background: var(--nq-surface); }
.nq-auth-box { width: 100%; max-width: 440px; }
.nq-auth-title { font-size: 28px; font-weight: 800; letter-spacing: -.02em; margin-bottom: 6px; }
.nq-hero-icon { width: 76px; height: 76px; margin: 0 auto; border-radius: 22px; display: flex; align-items: center; justify-content: center; font-size: 32px; color: #fff; background: var(--nq-grad); }
@media (max-width: 991.98px) { .nq-auth-wrap { grid-template-columns: 1fr; } .nq-auth-art { display: none; } }

/* ------------------------------------------------------------ public pages */
.nq-public { background: var(--nq-surface); }
.nq-public-nav { position: sticky; top: 0; z-index: 1020; padding: 14px 0; background: color-mix(in srgb, var(--nq-surface) 85%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--nq-line); }
.nq-hero { padding: 72px 0 56px; background: radial-gradient(circle at 85% 10%, rgba(124,58,237,.12), transparent 45%), radial-gradient(circle at 10% 90%, rgba(219,39,119,.08), transparent 40%); }
.nq-pill { display: inline-flex; align-items: center; padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; background: rgba(79,70,229,.1); color: #4f46e5; margin-bottom: 18px; }
.nq-hero-title { font-size: clamp(40px, 6vw, 64px); font-weight: 800; letter-spacing: -.03em; line-height: 1.04; }
.nq-hero-title span { background: var(--nq-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nq-hero-lead { font-size: 18px; color: var(--nq-muted); margin: 18px 0 28px; max-width: 34em; }
.nq-hero-points { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 22px; font-size: 14px; color: var(--nq-muted); }
.nq-hero-points i { color: #16a34a; margin-right: 4px; }
.nq-hero-visual { position: relative; display: flex; justify-content: center; padding: 30px 0; }
.nq-demo-card { width: min(380px, 100%); border-radius: 20px; overflow: hidden; background: #fff; color: #0f172a; box-shadow: 0 40px 80px -30px rgba(30,27,75,.55); transform: perspective(900px) rotateY(-10deg) rotateX(4deg); }
.nq-demo-head { background: linear-gradient(135deg, #1a65e6, #0d43a8); color: #fff; font-weight: 800; font-size: 13px; letter-spacing: .05em; text-align: center; padding: 24px 16px 30px; }
.nq-stars { color: #fbbf24; font-size: 18px; letter-spacing: 4px; }
.nq-demo-body { display: flex; align-items: center; justify-content: space-evenly; padding: 28px 12px 20px; }
.nq-demo-body div { display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 40px; color: #1d4ed8; }
.nq-demo-body b { font-size: 11px; color: #0f172a; letter-spacing: .05em; }
.nq-demo-or { font-size: 11px; font-weight: 700; color: #94a3b8; }
.nq-demo-foot { text-align: center; font-size: 11px; font-weight: 700; color: #475569; border-top: 1px solid #f1f5f9; padding: 10px; letter-spacing: .06em; }
.nq-float { position: absolute; padding: 10px 14px; border-radius: 12px; background: var(--nq-surface); border: 1px solid var(--nq-line); box-shadow: 0 16px 30px -16px rgba(0,0,0,.35); font-size: 13px; font-weight: 700; }
.nq-float i { color: #4f46e5; margin-right: 6px; }
.nq-float-1 { top: 10px; right: 6%; } .nq-float-2 { bottom: 14px; left: 4%; }
.nq-feature-icon { width: 48px; height: 48px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center; color: #fff; background: var(--nq-grad); font-size: 20px; }
.nq-pricing { background: var(--nq-bg); }
.nq-plan.is-featured { border: 2px solid #4f46e5; box-shadow: 0 24px 50px -28px rgba(79,70,229,.7); }
.nq-price { font-size: 34px; font-weight: 800; letter-spacing: -.02em; }
.nq-price small { font-size: 14px; color: var(--nq-muted); font-weight: 600; }
.nq-plan-list { list-style: none; padding: 0; margin: 12px 0 20px; display: grid; gap: 8px; font-size: 14px; }
.nq-plan-list li::before { content: "\f00c"; font-family: "Font Awesome 6 Free"; font-weight: 900; color: #16a34a; margin-right: 8px; }
.nq-public-foot { border-top: 1px solid var(--nq-line); padding: 24px 0; }
.nq-error { padding: 90px 0; }
.nq-error-code { font-size: 96px; font-weight: 800; letter-spacing: -.04em; background: var(--nq-grad); -webkit-background-clip: text; background-clip: text; color: transparent; line-height: 1; }

/* SweetAlert2 in dark mode */
[data-bs-theme="dark"] .swal2-popup { background: #121831; color: #e5e7eb; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

/* ------------------------------------------------------------ QR module (phase 2) */
.min-w-0 { min-width: 0; }
.nq-type-card { transition: transform .15s, box-shadow .15s, border-color .15s; }
.nq-type-card:hover { transform: translateY(-2px); border-color: #a5b4fc; box-shadow: 0 14px 30px -20px rgba(79,70,229,.6); }
.nq-type-icon { width: 44px; height: 44px; flex: none; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; font-size: 20px; background: rgba(79,70,229,.1); color: #4f46e5; }
[data-bs-theme="dark"] .nq-type-icon { color: #a5b4fc; }
.nq-sticky { position: sticky; top: 84px; }
.nq-qr-preview-wrap { background: repeating-conic-gradient(var(--nq-hover) 0 25%, transparent 0 50%) 50% / 18px 18px; border-radius: 12px; padding: 18px; }
.nq-qr-preview, .nq-qr-art { max-width: 300px; margin: 0 auto; min-height: 120px; }
.nq-qr-preview svg, .nq-qr-art svg, [data-qr] svg { width: 100%; height: auto; display: block; }
.nq-templates { display: flex; flex-wrap: wrap; gap: 6px; }
.nq-template { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--nq-line); background: var(--nq-surface); color: var(--bs-body-color); border-radius: 999px; padding: 4px 10px; font-size: 12.5px; }
.nq-template span { width: 12px; height: 12px; border-radius: 3px; display: inline-block; border: 1px solid rgba(0,0,0,.15); }
.nq-template.active, .nq-template:hover { border-color: #4f46e5; }
.nq-template-add { border-style: dashed; color: #4f46e5; }
.nq-seg { display: flex; flex-wrap: wrap; gap: 4px; }
.nq-seg .btn { font-size: 12px; padding: 3px 9px; }
.nq-file-current { display: flex; align-items: center; gap: 10px; border: 1px solid var(--nq-line); border-radius: 10px; padding: 6px 10px; margin-bottom: 8px; }
.nq-file-current img { width: 36px; height: 36px; object-fit: cover; border-radius: 6px; }
.nq-thumbs { display: flex; flex-wrap: wrap; gap: 8px; }
.nq-thumb { width: 84px; font-size: 11px; text-align: center; }
.nq-thumb img { width: 84px; height: 84px; object-fit: cover; border-radius: 8px; display: block; margin-bottom: 2px; }
.nq-qr-card .card-body { align-items: flex-start; }
.nq-qr-thumb { position: relative; width: 96px; flex: none; }
.nq-qr-thumb [data-qr] { width: 96px; min-height: 96px; border-radius: 8px; background: var(--nq-hover); }
.nq-qr-check { position: absolute; top: -6px; left: -6px; z-index: 2; width: 1.2em; height: 1.2em; box-shadow: 0 0 0 3px var(--nq-surface); }
.nq-qr-art { max-width: 280px; }
.nq-pre { white-space: pre-wrap; word-break: break-all; background: var(--nq-hover); border-radius: 10px; padding: 10px 12px; font-size: 13px; max-height: 220px; overflow: auto; }
.nq-bulk-bar { position: sticky; top: 72px; z-index: 5; border-color: #a5b4fc; }
.nq-folders .list-group-item { border: 0; padding: 8px 18px; }
.nq-folders .list-group-item.active { background: rgba(79,70,229,.1); color: #4f46e5; font-weight: 600; }
.nq-rep-row .form-select { max-width: 150px; }
@media (max-width: 991.98px) { .nq-sticky { position: static; } }

/* ------------------------------------------------------------ NFC (phase 3) */
.nq-compat { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.nq-compat li { display: flex; gap: 10px; align-items: flex-start; }
.nq-compat li i { margin-top: 3px; }
.nq-compat li.is-ok i { color: #16a34a; } .nq-compat li.is-bad i { color: #dc2626; }
.nq-compat b { display: block; font-size: 14px; } .nq-compat span { font-size: 13px; color: var(--nq-muted); }
.nq-kind-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.nq-kind { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 10px; text-align: center; border-radius: 12px; border: 2px solid var(--nq-line); background: var(--nq-surface); color: var(--bs-body-color); text-decoration: none; font-size: 13.5px; font-weight: 600; }
.nq-kind i { font-size: 22px; color: var(--nq-muted); }
.nq-kind.active, .nq-kind:hover { border-color: #4f46e5; } .nq-kind.active i { color: #4f46e5; }
.nq-steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.nq-steps li { display: flex; gap: 12px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--nq-line); }
.nq-steps li i { margin-top: 3px; color: var(--nq-muted); }
.nq-steps li b { display: block; } .nq-steps li small { color: var(--nq-muted); }
.nq-steps li.is-ok { border-color: #86efac; } .nq-steps li.is-ok i { color: #16a34a; }
.nq-steps li.is-bad { border-color: #fca5a5; } .nq-steps li.is-bad i { color: #dc2626; }
.nq-steps li.is-run { border-color: #a5b4fc; } .nq-steps li.is-run i { color: #4f46e5; }

/* ------------------------------------------------------------ profiles & media (phase 4) */
.nq-theme-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.nq-theme-opt input { position: absolute; opacity: 0; }
.nq-theme-opt span { display: flex; align-items: center; gap: 8px; padding: 9px 10px; border: 2px solid var(--nq-line); border-radius: 10px; cursor: pointer; font-size: 13.5px; font-weight: 600; }
.nq-theme-opt span i { width: 22px; height: 22px; border-radius: 6px; flex: none; }
.nq-theme-opt input:checked + span { border-color: #4f46e5; background: rgba(79,70,229,.06); }
.nq-theme-opt input:focus-visible + span { outline: 3px solid rgba(79,70,229,.35); }
.nq-sections { display: grid; gap: 8px; }
.nq-section-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--nq-line); border-radius: 10px; background: var(--nq-surface); }
.nq-section-row > .form-control { flex: 1; min-width: 160px; }
.nq-section-settings { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 8px; padding-left: 28px; }
.nq-section-settings .form-control { flex: 1; min-width: 200px; }
.nq-media-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.nq-media-item { border: 1px solid var(--nq-line); border-radius: 10px; padding: 6px; display: grid; gap: 6px; justify-items: center; }
.nq-media-item img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; }
.nq-media-item.is-hidden img { opacity: .35; }
.nq-media-item .btn { padding: 2px 6px; }
.nq-library { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.nq-lib-item { border: 1px solid var(--nq-line); border-radius: 12px; padding: 8px; background: var(--nq-surface); display: grid; gap: 6px; }
.nq-lib-thumb { display: flex; align-items: center; justify-content: center; aspect-ratio: 4/3; border-radius: 8px; overflow: hidden; background: var(--nq-hover); color: #dc2626; font-size: 32px; }
.nq-lib-thumb img { width: 100%; height: 100%; object-fit: cover; }
.nq-gal-thumb { width: 52px; height: 52px; border-radius: 10px; overflow: hidden; background: var(--nq-hover); display: flex; align-items: center; justify-content: center; flex: none; color: var(--nq-muted); }
.nq-gal-thumb img { width: 100%; height: 100%; object-fit: cover; }
.nq-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 6px; max-height: 220px; overflow: auto; }
.nq-pick label { position: relative; cursor: pointer; }
.nq-pick input { position: absolute; top: 4px; left: 4px; }
.nq-pick img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; border: 2px solid transparent; }
.nq-pick input:checked + img { border-color: #4f46e5; }

/* ------------------------------------------------------------ themes (phase 5) */
.nq-theme-card.is-current { border: 2px solid #16a34a; }
.nq-theme-mock { position: relative; height: 190px; overflow: hidden; border-radius: var(--nq-radius) var(--nq-radius) 0 0; background: var(--bg); border-bottom: 1px solid var(--nq-line); }
.nq-theme-mock > div, .nq-theme-mock i { position: absolute; display: block; }
.nq-theme-mock .m-head { inset: 0 0 auto 0; height: 64px; background: linear-gradient(135deg, var(--p), var(--s)); }
.nq-theme-mock .m-av { width: 46px; height: 46px; border-radius: 50%; left: calc(50% - 23px); top: 40px; background: #fff; border: 3px solid var(--bg); box-shadow: 0 4px 10px rgba(0,0,0,.15); }
.nq-theme-mock .m-l1 { width: 46%; height: 9px; left: 27%; top: 96px; border-radius: 6px; background: currentColor; opacity: .75; }
.nq-theme-mock .m-l2 { width: 30%; height: 7px; left: 35%; top: 111px; border-radius: 6px; background: currentColor; opacity: .35; }
.nq-theme-mock .m-btns { left: 0; right: 0; top: 126px; display: flex; justify-content: center; gap: 8px; }
.nq-theme-mock .m-btns i { position: static; width: 20px; height: 20px; border-radius: 50%; background: var(--p); }
.nq-theme-mock .m-card { left: 12%; right: 12%; top: 154px; height: 46px; border-radius: var(--r); background: rgba(255,255,255,.9); box-shadow: 0 4px 14px rgba(0,0,0,.08); }
.nq-theme-mock .m-card2 { display: none; }
.nq-theme-mock { color: #0f172a; }
.nq-mock-black-luxury, .nq-mock-glassmorphism { color: #f5e6b3; }
.nq-mock-black-luxury .m-head { background: none; border-bottom: 1px solid var(--p); height: 30px; }
.nq-mock-black-luxury .m-av { top: 26px; background: transparent; border: 1px solid var(--p); box-shadow: 0 0 0 4px var(--bg), 0 0 0 5px var(--p); }
.nq-mock-black-luxury .m-btns i, .nq-mock-black-luxury .m-card { border-radius: 0; background: transparent; border: 1px solid var(--p); box-shadow: none; }
.nq-mock-minimal-white .m-head { display: none; } .nq-mock-minimal-white .m-av { left: 12%; top: 26px; width: 30px; height: 30px; border: 0; background: #d4d4d8; box-shadow: none; }
.nq-mock-minimal-white .m-l1 { left: 12%; width: 60%; top: 72px; height: 14px; } .nq-mock-minimal-white .m-l2 { left: 12%; top: 94px; }
.nq-mock-minimal-white .m-btns { justify-content: flex-start; left: 12%; top: 118px; } .nq-mock-minimal-white .m-btns i { width: 34px; height: 4px; border-radius: 0; background: #111827; }
.nq-mock-minimal-white .m-card { border-radius: 0; background: none; box-shadow: none; border-top: 1px solid #111827; }
.nq-mock-gradient-modern .m-head { height: 92px; border-radius: 0 0 50% 50% / 0 0 22px 22px; } .nq-mock-gradient-modern .m-btns i { background: #fff; box-shadow: 0 3px 8px rgba(0,0,0,.2); }
.nq-mock-glassmorphism .m-head { height: 100%; background: radial-gradient(circle at 20% 20%, var(--p), transparent 45%), radial-gradient(circle at 80% 70%, var(--s), transparent 45%), var(--bg); }
.nq-mock-glassmorphism .m-card { background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.3); backdrop-filter: blur(6px); }
.nq-mock-creative-portfolio .m-head { display: none; } .nq-mock-creative-portfolio .m-av { border-radius: 0; left: auto; right: 12%; top: 18px; width: 26px; height: 26px; box-shadow: 4px 4px 0 var(--p); border: 0; background: #444; }
.nq-mock-creative-portfolio .m-l1 { left: 10%; top: 58px; width: 70%; height: 26px; border-radius: 0; opacity: .9; } .nq-mock-creative-portfolio .m-l2 { left: 10%; top: 92px; background: var(--p); opacity: 1; }
.nq-mock-creative-portfolio .m-btns { justify-content: flex-start; left: 10%; } .nq-mock-creative-portfolio .m-btns i { border-radius: 0; background: none; border: 2px solid #111; width: 30px; height: 14px; }
.nq-mock-creative-portfolio .m-card { border-radius: 0; left: 10%; right: 10%; background: repeating-linear-gradient(90deg, #ddd 0 48%, transparent 48% 52%); box-shadow: none; }
.nq-mock-restaurant-cafe .m-head { height: 104px; background: linear-gradient(180deg, color-mix(in srgb, var(--p) 70%, #000), #2b1608); } .nq-mock-restaurant-cafe .m-av { left: 10%; top: 30px; }
.nq-mock-restaurant-cafe .m-l1 { left: 10%; top: 82px; background: #fff; } .nq-mock-restaurant-cafe .m-l2 { display: none; }
.nq-mock-restaurant-cafe .m-btns { top: 116px; gap: 6px; } .nq-mock-restaurant-cafe .m-btns i { width: 44px; height: 26px; border-radius: 8px; background: #fff; box-shadow: 0 3px 8px rgba(0,0,0,.12); }
.nq-mock-real-estate .m-head { height: 82px; background: linear-gradient(135deg, color-mix(in srgb, var(--p) 60%, #94a3b8), var(--s)); } .nq-mock-real-estate .m-av { left: 14%; top: 66px; }
.nq-mock-real-estate .m-l1 { left: 34%; top: 98px; width: 40%; } .nq-mock-real-estate .m-l2 { left: 34%; top: 113px; } .nq-mock-real-estate .m-btns { top: 134px; } .nq-mock-real-estate .m-btns i { width: 60px; border-radius: 6px; }
.nq-mock-personal-influencer .m-head { display: none; } .nq-mock-personal-influencer .m-av { top: 16px; box-shadow: 0 0 0 3px var(--p); }
.nq-mock-personal-influencer .m-l1 { top: 72px; } .nq-mock-personal-influencer .m-l2 { top: 88px; background: var(--p); opacity: 1; }
.nq-mock-personal-influencer .m-btns { flex-direction: column; align-items: center; top: 106px; gap: 6px; } .nq-mock-personal-influencer .m-btns i { width: 70%; height: 16px; border-radius: 999px; background: #fff; border: 2px solid #111; }
.nq-mock-personal-influencer .m-card { display: none; }
.nq-mock-professional-corporate .m-head { height: 22px; background: var(--p); } .nq-mock-professional-corporate .m-av { left: 10%; top: 40px; }
.nq-mock-professional-corporate .m-l1 { left: 6%; width: 32%; top: 96px; } .nq-mock-professional-corporate .m-l2 { left: 8%; width: 24%; } .nq-mock-professional-corporate .m-btns { left: 6%; right: auto; width: 32%; flex-direction: column; top: 126px; gap: 4px; }
.nq-mock-professional-corporate .m-btns i { width: 100%; height: 10px; border-radius: 2px; } .nq-mock-professional-corporate .m-card { left: 44%; right: 6%; top: 36px; height: 60px; border-radius: 4px; }
.nq-mock-professional-corporate .m-card2 { display: block; top: 104px; height: 70px; }
.nq-device-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.nq-device { max-width: 390px; margin: 0 auto; height: 760px; border-radius: 34px; border: 10px solid #0f172a; overflow: hidden; background: #0f172a; box-shadow: 0 30px 60px -30px rgba(15,23,42,.6); transition: max-width .25s; }
.nq-device.is-desktop { border-radius: 14px; border-width: 8px; height: 720px; }
.nq-device iframe { width: 100%; height: 100%; border: 0; background: #fff; display: block; }

/* ------------------------------------------------------------ card designer (phase 6) — the card itself is laid out in real millimetres */
.nq-title-input { border: 0; background: transparent; padding: 0; font-size: 1.35rem; box-shadow: none !important; }
.nq-cd-panel .accordion-button { font-weight: 700; font-size: 14px; }
.nq-cd-panel .accordion-item { background: var(--nq-surface); }
.nq-cd-presets { display: flex; flex-wrap: wrap; gap: 6px; }
.nq-cd-presets .active, .nq-seg .btn.active { background: #4f46e5; border-color: #4f46e5; color: #fff; }
.nq-cd-toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.nq-cd-stage { position: relative; display: flex; align-items: center; justify-content: center; min-height: 320px; border-radius: var(--nq-radius); overflow: hidden; perspective: 1400px;
  background: radial-gradient(circle at 50% 40%, var(--nq-surface), var(--nq-hover)); border: 1px solid var(--nq-line); }
.nq-cd-scale { transform-origin: center center; flex: none; }
.nq-cd-tilt { position: relative; transform-style: preserve-3d; transition: transform .25s ease-out; }
#card-designer.is-3d .nq-cd-tilt { transform: rotateY(-12deg) rotateX(8deg); }
#card-designer.is-3d .cd-card { box-shadow: 18px 24px 30px -12px rgba(0,0,0,.45); }
.cd-stand { display: none; }
#card-designer.is-3d .cd-stand { display: block; position: absolute; left: -6%; right: -6%; bottom: -9mm; height: 9mm; border-radius: 2mm; transform: rotateX(70deg); transform-origin: top;
  background: linear-gradient(180deg, rgba(255,255,255,.75), rgba(200,215,235,.35)); box-shadow: 0 6mm 8mm -4mm rgba(0,0,0,.35); border: .4mm solid rgba(255,255,255,.8); }
.nq-card-thumb { display: flex; align-items: center; justify-content: center; height: 150px; background: var(--nq-hover); border-radius: var(--nq-radius) var(--nq-radius) 0 0; color: var(--nq-muted); font-size: 34px; }
.nq-card-thumb img { max-width: 88%; max-height: 120px; border-radius: 6px; box-shadow: 0 8px 18px -10px rgba(0,0,0,.5); }

.cd-card { position: relative; width: var(--w); height: var(--h); border-radius: var(--r); overflow: hidden; color: var(--text); display: flex; flex-direction: column; box-shadow: 0 10px 30px -12px rgba(0,0,0,.4);
  -webkit-font-smoothing: antialiased; line-height: 1.15; text-align: center; }
.cd-card.is-export { box-shadow: none; }
.cd-bg { position: absolute; inset: 0; background: var(--bg); z-index: 0; }
.cd-banner .cd-bg { background: var(--panel); }
.cd-card > *:not(.cd-bg):not(.cd-guides) { position: relative; z-index: 1; }
.cd-head { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: calc(.5mm * var(--k)); padding: calc(3.2mm * var(--k)) calc(3.5mm * var(--k)) calc(1mm * var(--k)); flex: none; }
.cd-banner .cd-head { background: linear-gradient(135deg, var(--b1), var(--b2)); color: var(--text); padding-bottom: calc(1.8mm * var(--k)); }
.cd-logo { position: absolute; top: calc(2mm * var(--k)); left: calc(2.4mm * var(--k)); max-height: calc(6mm * var(--k)); max-width: calc(16mm * var(--k)); object-fit: contain; }
.cd-emblem { width: calc(5.4mm * var(--k)); height: calc(5.4mm * var(--k)); object-fit: contain; }
.cd-stars { color: var(--accent); font-size: calc(2.7mm * var(--k)); line-height: 1; letter-spacing: calc(.6mm * var(--k)); }
.cd-header { font-weight: 800; font-size: calc(2.3mm * var(--k)); letter-spacing: .04em; line-height: 1.1; }
.cd-body { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: space-evenly; gap: calc(.5mm * var(--k)); padding: calc(.6mm * var(--k)) calc(3.5mm * var(--k)); min-height: 0; }
.cd-banner .cd-body, .cd-banner .cd-footer { color: var(--ptext); }
.cd-name { font-weight: 800; font-size: calc(2.1mm * var(--k)); letter-spacing: .03em; }
.cd-headline { font-size: calc(1.7mm * var(--k)); opacity: .9; }
.cd-zones { display: flex; align-items: center; justify-content: center; gap: calc(2mm * var(--k)); }
.cd-zone { display: flex; flex-direction: column; align-items: center; gap: calc(.5mm * var(--k)); padding: calc(1mm * var(--k)); border-radius: calc(var(--r) * .8); background: var(--panel); color: var(--ptext); }
.cd-banner .cd-zone { padding: calc(.6mm * var(--k)); }
.cd-zone b { font-size: calc(1.55mm * var(--k)); font-weight: 800; letter-spacing: .05em; white-space: nowrap; }
.cd-zone small { font-size: calc(1.3mm * var(--k)); opacity: .75; max-width: calc(24mm * var(--k)); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cd-qr-img { width: calc(min(var(--h) * .30, var(--w) * .26)); height: calc(min(var(--h) * .30, var(--w) * .26)); display: block; }
.cd-nfc-icon { width: calc(min(var(--h) * .2, var(--w) * .17)); height: calc(min(var(--h) * .2, var(--w) * .17)); margin: calc(min(var(--h) * .05, var(--w) * .045)) 0; }
.cd-qr-missing { width: calc(min(var(--h) * .30, var(--w) * .26)); height: calc(min(var(--h) * .30, var(--w) * .26)); display: flex; align-items: center; justify-content: center; font-size: calc(1.5mm * var(--k)); border: .3mm dashed currentColor; }
.cd-or { font-size: calc(1.6mm * var(--k)); font-weight: 800; opacity: .7; }
.cd-footer { font-size: calc(1.5mm * var(--k)); font-weight: 700; letter-spacing: .06em; padding: calc(.4mm * var(--k)) 0 0; margin: 0 calc(3.5mm * var(--k)) calc(3.4mm * var(--k)); opacity: .9; flex: none; }
.cd-portrait .cd-zones { flex-direction: column; gap: calc(1.4mm * var(--k)); }
.cd-portrait .cd-qr-img, .cd-portrait .cd-qr-missing { width: calc(min(var(--h) * .24, var(--w) * .42)); height: calc(min(var(--h) * .24, var(--w) * .42)); }
.cd-portrait .cd-nfc-icon { width: calc(var(--w) * .2); height: calc(var(--w) * .2); margin: 0; }
.cd-lay-nfc_only .cd-nfc-icon, .cd-lay-qr_only .cd-qr-img { transform: scale(1.12); margin: calc(1mm * var(--k)); }
.cd-style-gold .cd-header, .cd-style-gold .cd-name { letter-spacing: .18em; color: var(--accent); }
.cd-style-gold .cd-zone { border: .25mm solid var(--accent); }
.cd-style-white .cd-zone { border: .25mm solid rgba(15,23,42,.12); }
.cd-guides { position: absolute; inset: 0; z-index: 5; pointer-events: none; }
.cd-guides .cd-cut { position: absolute; inset: 0; border: .25mm dashed #e11d48; border-radius: var(--r); }
.cd-guides .cd-safe { position: absolute; inset: 3mm; border: .25mm dashed #06b6d4; border-radius: calc(var(--r) * .6); }
.cd-card.no-guides .cd-guides { display: none; }

/* ------------------------------------------------------------ smart cards */
.nq-activate-card { background: linear-gradient(135deg, #4f46e5, #db2777); color: #fff; border: 0; }
.nq-code-input { text-transform: uppercase; letter-spacing: .3em; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 800; text-align: center; }
.nq-code-big { font: 800 40px/1.1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .18em; margin: 4px 0 8px; }
.nq-code { font: 700 14px ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .12em; background: var(--nq-hover); border-radius: 6px; padding: 2px 7px; }
.nq-steps-h { list-style: none; counter-reset: s; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.nq-steps-h li { counter-increment: s; font-size: 13px; }
.nq-steps-h li::before { content: counter(s); display: inline-flex; width: 24px; height: 24px; border-radius: 50%; align-items: center; justify-content: center; background: rgba(79,70,229,.12); color: #4f46e5; font-weight: 800; margin-bottom: 6px; }
.nq-steps-h b { display: block; } .nq-steps-h span { color: var(--nq-muted); }
.nq-step-no { display: inline-flex; width: 26px; height: 26px; border-radius: 50%; align-items: center; justify-content: center; background: #4f46e5; color: #fff; font-size: 13px; margin-right: 8px; }
.nq-mode-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.nq-mode input, .nq-dest input { position: absolute; opacity: 0; }
.nq-mode span { display: flex; flex-direction: column; gap: 4px; height: 100%; padding: 16px; border: 2px solid var(--nq-line); border-radius: 14px; cursor: pointer; }
.nq-mode i { font-size: 22px; color: #4f46e5; } .nq-mode small { color: var(--nq-muted); }
.nq-mode input:checked + span { border-color: #4f46e5; background: rgba(79,70,229,.06); }
.nq-dest-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 8px; }
.nq-dest span { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border: 2px solid var(--nq-line); border-radius: 12px; cursor: pointer; font-size: 13.5px; font-weight: 600; }
.nq-dest i { font-size: 18px; width: 20px; text-align: center; }
.nq-dest input:checked + span { border-color: #4f46e5; background: rgba(79,70,229,.06); }
.nq-mode input:focus-visible + span, .nq-dest input:focus-visible + span { outline: 3px solid rgba(79,70,229,.35); }
.nq-station-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(108px, 1fr)); gap: 6px; padding: 12px; max-height: 520px; overflow: auto; }
.nq-st-item { display: flex; align-items: center; gap: 6px; padding: 6px 8px; border: 1px solid var(--nq-line); border-radius: 8px; background: var(--nq-surface); color: var(--bs-body-color); font-size: 12px; }
.nq-st-item b { font-family: ui-monospace, Menlo, monospace; letter-spacing: .06em; } .nq-st-item span { color: var(--nq-muted); } .nq-st-item i { margin-left: auto; font-size: 10px; color: var(--nq-muted); }
.nq-st-item.is-written i { color: #0ea5e9; } .nq-st-item.is-locked i { color: #16a34a; } .nq-st-item.is-current { border: 2px solid #4f46e5; }
.nq-batch-box { background: rgba(79,70,229,.06); border: 1px solid rgba(79,70,229,.25); }
.cd-codeline { font-size: calc(1.25mm * var(--k)) !important; letter-spacing: .08em; opacity: .85 !important; }
.cd-codeline b { font-family: ui-monospace, Menlo, Consolas, monospace; letter-spacing: .14em; }
@media (max-width: 575.98px) { .nq-mode-grid { grid-template-columns: 1fr; } .nq-code-big { font-size: 32px; } }

/* ---------------------------------------------------------------- sidebar: folding "More tools" */
.nq-nav-fold > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; }
.nq-nav-fold > summary::-webkit-details-marker { display: none; }
.nq-nav-fold > summary i { font-size: 10px; transition: transform .2s; }
.nq-nav-fold:not([open]) > summary i { transform: rotate(-90deg); }

/* ---------------------------------------------------------------- shop owner portal (phone-first) */
.nq-shop-wrap { max-width: 720px; margin: 0 auto; }
.nq-shop-wide { max-width: 1180px; }
.nq-shop-hello { padding: 8px 2px 18px; }
.nq-shop-card { border-radius: 18px; }
.nq-shop-ic { width: 54px; height: 54px; flex: none; border-radius: 16px; display: flex; align-items: center; justify-content: center; font-size: 24px; color: var(--c); background: color-mix(in srgb, var(--c) 13%, transparent); }
.nq-shop-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 16px 0; }
.nq-shop-stats > div { background: var(--bs-tertiary-bg); border-radius: 14px; padding: 12px 14px; }
.nq-shop-stats b { display: block; font-size: 24px; line-height: 1.1; }
.nq-shop-stats span { font-size: 12.5px; color: var(--bs-secondary-color); }
.nq-shop-actions { display: grid; gap: 10px; }
@media (min-width: 640px) { .nq-shop-actions { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); } .nq-shop-actions .btn-lg { font-size: 1rem; } }
.nq-shop-tip { background: linear-gradient(135deg, #4f46e5, #db2777); color: #fff; border: 0; }
.nq-shop-h { font-size: 15px; font-weight: 700; margin: 0 0 14px; display: flex; align-items: center; gap: 10px; }
.nq-shop-h > span { width: 26px; height: 26px; border-radius: 50%; background: var(--bs-primary); color: #fff; font-size: 13px; display: inline-flex; align-items: center; justify-content: center; }
.nq-shop-images { position: relative; padding-bottom: 34px; }
.nq-shop-cover { display: flex; align-items: center; justify-content: center; height: 140px; border-radius: 14px; cursor: pointer; background: linear-gradient(135deg, #e0e7ff, #fce7f3) center/cover; border: 1px dashed rgba(0,0,0,.15); margin: 0; }
.nq-shop-cover span { background: rgba(255,255,255,.85); color: #111827; border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 600; }
.nq-shop-logo { position: absolute; left: 18px; bottom: 0; width: 84px; height: 84px; border-radius: 50%; cursor: pointer; margin: 0; display: flex; align-items: center; justify-content: center;
  background: #fff center/cover; border: 4px solid var(--bs-body-bg); box-shadow: 0 6px 18px -8px rgba(0,0,0,.35); color: #64748b; }
.nq-shop-logo span { display: flex; flex-direction: column; align-items: center; font-size: 18px; }
.nq-shop-logo small { font-size: 11px; }
.nq-shop-logo[style*="url"] span, .nq-shop-logo.has-img span { opacity: 0; }
.nq-svc-list { display: grid; gap: 8px; }
.nq-svc-row { display: grid; grid-template-columns: 1fr 100px 40px; gap: 6px; }
.nq-svc-row .nq-svc-desc { grid-column: 1 / 3; grid-row: 2; }
@media (min-width: 768px) { .nq-svc-row { grid-template-columns: 1.2fr 110px 1.6fr 40px; } .nq-svc-row .nq-svc-desc { grid-column: auto; grid-row: auto; } }
.nq-hours { display: grid; gap: 6px; }
.nq-hours-row { display: grid; grid-template-columns: 40px 1fr 10px 1fr auto; gap: 6px; align-items: center; }
.nq-shop-savebar { position: sticky; bottom: 0; z-index: 5; padding: 12px 0; background: linear-gradient(transparent, var(--bs-body-bg) 35%); }
.nq-shop-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.nq-shop-photo { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--bs-tertiary-bg); }
.nq-shop-photo img { width: 100%; height: 100%; object-fit: cover; }
.nq-shop-photo form { position: absolute; top: 6px; right: 6px; }
.nq-shop-photo-add { position: relative; border: 2px dashed var(--bs-border-color); background: transparent; }
.nq-shop-photo-add label { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; cursor: pointer; color: var(--bs-primary); margin: 0; }
.nq-phone { width: 340px; height: 680px; margin: 0 auto; border-radius: 42px; border: 10px solid #111827; overflow: hidden; background: #fff; box-shadow: 0 30px 60px -30px rgba(15,23,42,.45); }
.nq-phone iframe { width: 100%; height: 100%; border: 0; display: block; }
.nq-hours-row { grid-template-columns: 34px minmax(0, 1fr) 8px minmax(0, 1fr) 46px; }
.nq-hours-row .form-control { min-width: 0; padding-left: 6px; padding-right: 4px; }
.nq-hours-head { font-size: 11px; color: var(--bs-secondary-color); text-transform: uppercase; letter-spacing: .04em; }
.nq-hours-head span:last-child, .nq-hours-off { text-align: center; }
.nq-hours-off { display: flex; justify-content: center; margin: 0; }
.nq-shop-wrap .nq-theme-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }

/* ---------------------------------------------------------------- card templates (card-templates.js); all sizes come in mm from JS */
.cd-card > .ct { position: absolute !important; inset: 0; z-index: 1; }
.ct { overflow: hidden; border-radius: var(--r); color: #0f172a; line-height: 1.15; }
.ct img { display: block; max-width: none; }
.ct-qrbox { display: inline-flex; align-items: stretch; background: #fff; box-shadow: 0 .5mm 1.6mm rgba(15, 23, 42, .22); }
.ct-qr { display: block; }
.ct-qr-wait { background: repeating-linear-gradient(45deg, #e2e8f0 0 1mm, #f8fafc 1mm 2mm); }
.ct-vcode { position: relative; flex: none; }
.ct-vcode i { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) rotate(-90deg); white-space: nowrap; font-style: normal; font-weight: 700;
  font-family: ui-monospace, Menlo, Consolas, monospace; letter-spacing: .14em; color: #475569; }
.ct-emb { flex: none; border-radius: 50%; background: #fff; box-shadow: 0 .8mm 2.4mm rgba(0, 0, 0, .28); display: flex; align-items: center; justify-content: center; box-sizing: border-box; }
.ct-emb img { width: 100%; height: 100%; object-fit: contain; }
.ct-stars { line-height: 1; letter-spacing: .08em; }
.ct-script { font-family: 'Pacifico', cursive; line-height: 1.15; }

/* 1. Review wave */
.ct-wave { background: #fff; }
.ctw-band { position: absolute; left: 0; top: 0; right: 0; }
.ctw-wave { position: absolute; left: 0; width: 100%; }
.ctw-wave-v { position: absolute; top: 0; height: 100%; }
.ctw-white { position: absolute; left: 0; right: 0; bottom: 0; background: #fff; }
.ctw-logo { position: absolute; object-fit: contain; }
.ctw-top { position: absolute; left: 0; right: 0; text-align: center; color: #fff; display: flex; flex-direction: column; align-items: center; gap: 1.2mm; }
.ctw-head { font-weight: 800; text-transform: uppercase; letter-spacing: .02em; }
.ctw-embwrap { position: absolute; left: 0; right: 0; display: flex; justify-content: center; }
.ctw-row { position: absolute; left: 0; right: 0; display: flex; align-items: center; justify-content: space-between; box-sizing: border-box; }
.ctw-nfc { display: flex; flex-direction: column; align-items: center; gap: .6mm; }
.ctw-nfclabel, .ctw-qrlabel { font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #0f172a; }
.ctw-qr { display: flex; flex-direction: column; align-items: center; gap: .8mm; }
.ctw-foot { position: absolute; left: 0; right: 0; text-align: center; color: #475569; }
.ct-wave.is-land .ctw-band { bottom: 0; right: auto; }
.ct-wave.is-land .ctw-white { top: 0; }
.ctw-left { position: absolute; top: 0; bottom: 0; left: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.6mm; color: #fff; text-align: center; box-sizing: border-box; }
.ctw-right { position: absolute; top: 0; bottom: 0; right: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1mm; box-sizing: border-box; }
.ctw-right .ctw-foot { position: static; }
.ctw-tap { display: flex; align-items: center; gap: 1mm; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }

/* 2. Black & gold */
.ct-gold { color: #fff; }
.ctg-frame { position: absolute; border: .45mm solid; }
.ctg-col { position: absolute; top: 0; bottom: 0; display: flex; flex-direction: column; align-items: center; justify-content: space-evenly; text-align: center; }
.ctg-head { font-weight: 600; letter-spacing: .18em; text-transform: uppercase; }
.ctg-name { font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.ctg-code { font-family: ui-monospace, Menlo, Consolas, monospace; letter-spacing: .16em; }
.ctg-ring { position: relative; flex: none; border-radius: 50%; border-style: solid; display: flex; align-items: center; justify-content: center; box-sizing: border-box; }
.ctg-nfc { position: absolute; left: 50%; transform: translateX(-50%); }
.ctg-ringwrap { position: absolute; top: 0; bottom: 0; display: flex; align-items: center; }
.ctg-qrbox { box-shadow: none; }

/* 3. Follow us */
.ct-follow { background: #fff; color: #262626; }
.cti-sp { position: absolute; }
.cti-col { position: absolute; top: 0; bottom: 0; left: 0; right: 0; display: flex; flex-direction: column; align-items: center; justify-content: space-evenly; text-align: center; }
.cti-head { font-weight: 700; letter-spacing: .03em; }
.cti-label { font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.cti-foot { color: #525252; font-weight: 500; }
.cti-grad { background: linear-gradient(45deg, #feda75, #fa7e1e 30%, #d62976 60%, #962fbf 80%, #4f5bd5); }
.cti-grad > .ct-qrbox { box-shadow: none; }
.cti-tap { display: flex; align-items: center; gap: 1mm; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.cti-qrwrap { position: absolute; top: 0; bottom: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.2mm; }

/* 4. Clean white */
.ct-minimal { background: #fff; color: #0f172a; }
.ctm-stripe { position: absolute; top: 0; bottom: 0; display: flex; flex-direction: column; }
.ctm-stripe i { flex: 1; }
.ctm-col { position: absolute; top: 0; bottom: 0; display: flex; flex-direction: column; align-items: center; justify-content: space-evenly; text-align: center; }
.ctm-logo { object-fit: contain; }
.ctm-head { font-weight: 800; letter-spacing: .01em; }
.ctm-sub { color: #475569; font-weight: 600; }
.ctm-label { font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.ctm-qrbox { background: #f1f5f9; box-shadow: none; }
.ctm-tap { display: flex; align-items: center; gap: 1mm; color: #334155; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.ctm-qrwrap { position: absolute; top: 0; bottom: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1mm; }
.ctm-foot { position: absolute; left: 0; right: 0; bottom: 2.6mm; text-align: center; color: #64748b; }
.ctm-col .ctm-foot { position: static; }

/* designer UI: template tiles + swatches */
.nq-tpl-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.nq-tpl { border: 2px solid var(--bs-border-color); border-radius: 12px; padding: 8px; background: var(--bs-body-bg); text-align: left; cursor: pointer; }
.nq-tpl.active { border-color: #4f46e5; box-shadow: 0 0 0 3px rgba(79, 70, 229, .15); }
.nq-tpl i { display: block; height: 46px; border-radius: 8px; margin-bottom: 6px; }
.nq-tpl b { display: block; font-size: 13px; }
.nq-tpl small { color: var(--bs-secondary-color); font-size: 11.5px; }
.nq-swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.nq-swatch { width: 32px; height: 32px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--bs-border-color); cursor: pointer; padding: 0; }
.nq-swatch.active { box-shadow: 0 0 0 2px #4f46e5; }
.cti-gwrap { position: relative; display: inline-flex; }
.cti-gbg { position: absolute; inset: 0; background: linear-gradient(45deg, #feda75, #fa7e1e 30%, #d62976 60%, #962fbf 80%, #4f5bd5); }
.cti-gwrap > .ct-qrbox { position: relative; box-shadow: none; }
.ctw-foot, .ctm-foot { left: 4mm; right: 4mm; }
.ctm-foot { bottom: 3.6mm; }
