/* ==========================================================================
   OmniTools — Master Design System
   Direction: Linear / Vercel / Stripe. Crisp slate light surfaces, obsidian
   dark studios, indigo-to-blue brand accent with restrained luminous glow.

   Type:   Plus Jakarta Sans (headlines) · Inter (body) · JetBrains Mono (numbers, codes, IDs)
   Fonts are loaded by the <link> tags in each page <head>:
   https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@600;700;800&family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@400;500;600&display=swap

   Sections
     1. Tokens            6. Ads & badges            11. Invoice
     2. Base              7. Page heads & home       12. Admin (WordPress-style)
     3. Header & footer   8. QR Studio               13. Blog, SEO, modal
     4. Buttons           9. Switches & swatches     14. Responsive, motion, print
     5. Forms            10. Barcode studio
   ========================================================================== */


/* ==========================================================================
   1. TOKENS
   Legacy variable names are kept on purpose: existing inline styles and the
   page-level <style> blocks reference them (var(--primary), var(--shadow-lg)…).
   ========================================================================== */
:root {
  /* Brand */
  --brand-50:  #eef2ff;
  --brand-100: #e0e7ff;
  --brand-200: #c7d2fe;
  --brand-300: #a5b4fc;
  --brand-400: #818cf8;
  --brand-500: #6366f1;
  --brand-600: #4f46e5;
  --brand-700: #4338ca;
  --accent:    #3b82f6;
  --royal:     #2563eb;
  --sky:       #38bdf8;
  --zinc-900:  #18181b;

  --primary:        #4f46e5;
  --primary-hover:  #4338ca;
  --primary-light:  #eef2ff;
  --primary-border: #c7d2fe;

  /* Obsidian (dark surfaces) */
  --obsidian-950: #090d16;
  --obsidian-900: #0f172a;
  --obsidian-800: #1e293b;
  --dark-bg:      #090d16;
  --dark-surface: #0f172a;
  --dark-card:    #1e293b;
  --dark-border:  rgba(255, 255, 255, 0.08);
  --dark-text:    #f8fafc;
  --dark-muted:   #94a3b8;

  /* Light surfaces & ink */
  --bg-page:     #f8fafc;
  --bg-subtle:   #f1f5f9;
  --bg-surface:  #ffffff;
  --text-main:   #0f172a;
  --text-soft:   #334155;
  --text-muted:  #64748b;
  --text-faint:  #94a3b8;
  --border-color:  #e2e8f0;
  --border-strong: #cbd5e1;
  --border-hover:  #cbd5e1;

  /* Status */
  --success:       #059669;
  --success-light: #ecfdf5;
  --warning:       #d97706;
  --warning-light: #fffbeb;
  --danger:        #e11d48;
  --danger-light:  #fff1f2;

  /* Radii */
  --radius-xs: 4px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Elevation: layered ambient shadows, never one heavy drop */
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04), 0 2px 8px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 2px 4px rgba(15, 23, 42, 0.04), 0 16px 40px rgba(15, 23, 42, 0.08);
  --shadow-xl: 0 4px 8px rgba(15, 23, 42, 0.05), 0 32px 64px -12px rgba(15, 23, 42, 0.2);
  --glow-brand: 0 0 20px rgba(59, 130, 246, 0.15);
  --ring: 0 0 0 3px rgba(59, 130, 246, 0.18);

  /* Motion */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --t: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);

  /* Type */
  --font-heading: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
}


/* ==========================================================================
   2. BASE
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 400;
  letter-spacing: -0.011em;
  line-height: 1.6;
  color: var(--text-main);
  background-color: var(--bg-page);
  /* Micro-texture: a barely-there dot grid */
  background-image: radial-gradient(rgba(15, 23, 42, 0.05) 1px, transparent 1px);
  background-size: 24px 24px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
/* One soft brand light from the top edge, fixed so it never scrolls */
body::before {
  content: '';
  position: fixed;
  inset: 0 0 auto 0;
  height: 520px;
  background: radial-gradient(60% 100% at 50% 0%, rgba(79, 70, 229, 0.07), transparent 72%);
  pointer-events: none;
  z-index: -1;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.2;
  letter-spacing: -0.025em;
}
h1, h2 { font-weight: 800; letter-spacing: -0.03em; }

p { color: inherit; }
a { color: var(--primary); text-decoration-color: rgba(79, 70, 229, 0.35); text-underline-offset: 3px; }
::selection { background: rgba(99, 102, 241, 0.22); }

/* Numbers, codes and IDs always render in the mono face with fixed-width digits */
code, kbd, samp, .mono, .inv-num,
input[type="number"], #invNumber, #invPo, #bcDataInput {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

:focus-visible {
  outline: 2px solid var(--brand-500);
  outline-offset: 2px;
  border-radius: 6px;
}
button:focus-visible, .btn:focus-visible, a:focus-visible { outline-offset: 3px; }

/* Quiet, modern scrollbars */
* { scrollbar-width: thin; scrollbar-color: #cbd5e1 transparent; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 8px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; background-clip: padding-box; border: 2px solid transparent; }


/* ==========================================================================
   3. HEADER, SHELL & FOOTER
   ========================================================================== */
header.site-header {
  background: rgba(255, 255, 255, 0.78);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 1000;
}
.header-container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0.7rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand-wrapper { display: flex; align-items: center; gap: 0.7rem; text-decoration: none; flex-shrink: 0; }
.brand-logo-icon {
  width: 34px;
  height: 34px;
  background: linear-gradient(140deg, #6366f1 0%, #4f46e5 55%, #3b82f6 130%);
  color: #fff;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), 0 1px 2px rgba(49, 46, 129, 0.4), 0 6px 16px rgba(79, 70, 229, 0.28);
}
.brand-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.035em;
  color: var(--text-main);
}
.brand-tag {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  background: var(--brand-50);
  color: var(--brand-600);
  padding: 0.12rem 0.45rem;
  border-radius: var(--radius-full);
  margin-left: 0.15rem;
  border: 1px solid var(--brand-200);
}

nav.main-nav { display: flex; align-items: center; gap: 0.15rem; overflow-x: auto; scrollbar-width: none; }
nav.main-nav::-webkit-scrollbar { display: none; }
nav.main-nav a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  padding: 0.45rem 0.8rem;
  border-radius: 8px;
  white-space: nowrap;
  transition: var(--t);
}
nav.main-nav a:hover { color: var(--text-main); background: rgba(15, 23, 42, 0.05); }
nav.main-nav a.active { color: var(--brand-700); background: var(--brand-50); font-weight: 600; box-shadow: inset 0 0 0 1px rgba(99, 102, 241, 0.14); }

.admin-nav-btn {
  background: var(--warning-light) !important;
  color: #92400e !important;
  font-weight: 600 !important;
  box-shadow: inset 0 0 0 1px #fde68a;
  margin-left: 0.35rem;
}
.admin-nav-btn:hover { background: #fef3c7 !important; }

.page-shell {
  max-width: 1320px;
  width: 100%;
  margin: 0 auto;
  padding: 2rem 1.5rem 4.5rem;
  flex: 1;
}
.tool-grid-wrapper { display: grid; grid-template-columns: 1fr 300px; gap: 2rem; align-items: start; }
.tool-stage-main { min-width: 0; width: 100%; }

/* Invoice: 2 columns — sheet left, settings + ad in one right column */
.invoice-page-grid { display: grid; grid-template-columns: 1fr 320px; gap: 2rem; align-items: start; }
.invoice-sidebar-col { display: flex; flex-direction: column; gap: 1.25rem; }

/* Footer (obsidian) */
footer.site-footer {
  position: relative;
  background: var(--obsidian-950);
  color: #e2e8f0;
  padding: 4.5rem 1.5rem 2.25rem;
  margin-top: auto;
}
footer.site-footer::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(129, 140, 248, 0.5), transparent);
}
.footer-grid {
  max-width: 1320px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr) 1.1fr;
  gap: 2.5rem;
  margin-bottom: 3.5rem;
}
.footer-col h4 { font-size: 0.95rem; font-weight: 700; color: #fff; margin-bottom: 1.1rem; letter-spacing: -0.02em; }
.footer-links { list-style: none; display: flex; flex-direction: column; gap: 0.65rem; }
.footer-links a {
  text-decoration: none;
  color: #94a3b8;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: var(--t);
}
.footer-links a:hover { color: #c7d2fe; transform: translateX(2px); }
.footer-pill-tag {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 600;
  background: rgba(99, 102, 241, 0.14);
  color: #a5b4fc;
  padding: 0.12rem 0.5rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(129, 140, 248, 0.25);
}
.footer-trust-badge { display: flex; align-items: center; gap: 0.5rem; font-size: 0.85rem; color: #94a3b8; margin-bottom: 0.4rem; }
.footer-trust-badge span { color: #34d399; font-weight: 700; }
.footer-bottom {
  max-width: 1320px;
  margin: 0 auto;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  padding-top: 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #64748b;
  font-size: 0.825rem;
}


/* ==========================================================================
   4. BUTTONS
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem 1.15rem;
  font-size: 0.875rem;
  font-weight: 600;
  font-family: inherit;
  letter-spacing: -0.011em;
  line-height: 1.25;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: var(--t);
}
.btn:active:not(:disabled) { transform: translateY(0) scale(0.98); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn svg { flex-shrink: 0; }

.btn-primary {
  background: linear-gradient(180deg, #5b54f0 0%, #4f46e5 100%);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(49, 46, 129, 0.35), 0 4px 12px rgba(79, 70, 229, 0.22);
}
.btn-primary:hover {
  background: linear-gradient(180deg, #6760f3 0%, #4f46e5 100%);
  transform: translateY(-1px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24), 0 1px 2px rgba(49, 46, 129, 0.35), 0 8px 22px rgba(79, 70, 229, 0.34), 0 0 20px rgba(59, 130, 246, 0.15);
}
.btn-secondary {
  background: #fff;
  color: var(--text-main);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-xs);
}
.btn-secondary:hover { background: #f8fafc; border-color: #94a3b8; transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn-dark {
  background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 1px 2px rgba(9, 13, 22, 0.3);
}
.btn-dark:hover { background: linear-gradient(180deg, #273449 0%, #111c33 100%); transform: translateY(-1px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 8px 20px rgba(9, 13, 22, 0.25); }
.btn-success {
  background: linear-gradient(180deg, #10b981 0%, #059669 100%);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(6, 95, 70, 0.35), 0 4px 12px rgba(5, 150, 105, 0.2);
}
.btn-success:hover { transform: translateY(-1px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24), 0 8px 20px rgba(5, 150, 105, 0.3); }
.btn-sm { padding: 0.4rem 0.8rem; font-size: 0.8rem; border-radius: 8px; }
.btn-lg { padding: 0.85rem 1.75rem; font-size: 1rem; border-radius: 12px; }


/* ==========================================================================
   5. FORMS
   ========================================================================== */
.form-group { margin-bottom: 1.15rem; }
.form-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-soft);
  letter-spacing: -0.006em;
  margin-bottom: 0.4rem;
}
.form-control, .form-select {
  width: 100%;
  padding: 0.65rem 0.95rem;
  font-size: 0.9rem;
  font-family: inherit;
  letter-spacing: -0.011em;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: #fff;
  color: var(--text-main);
  box-shadow: var(--shadow-xs);
  outline: none;
  transition: var(--t);
}
.form-control::placeholder, .inv-field-compact::placeholder, textarea::placeholder { color: #94a3b8; }
.form-control:hover, .form-select:hover { border-color: #94a3b8; }
.form-control:focus, .form-select:focus {
  border-color: var(--accent);
  box-shadow: var(--ring);
}
select.form-control, .form-select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 2.25rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.8rem center;
}
textarea.form-control { resize: vertical; line-height: 1.5; }


/* ==========================================================================
   6. ADS, BADGES & TRUST BAR
   ========================================================================== */
.ad-sidebar-box, .ad-banner-top, .ad-banner-bottom {
  background:
    repeating-linear-gradient(135deg, rgba(148, 163, 184, 0.07) 0 8px, transparent 8px 16px),
    rgba(255, 255, 255, 0.6);
  border: 1px dashed #cbd5e1;
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--text-faint);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0;
}
.ad-sidebar-box { width: 100%; min-height: 480px; padding: 1.25rem; }
.ad-banner-top { min-height: 90px; margin: 1.25rem 0 2rem; }
.ad-banner-bottom { min-height: 95px; margin: 2.5rem 0 2rem; }
.ad-badge {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 500;
  color: #64748b;
  background: #e2e8f0;
  padding: 0.1rem 0.5rem;
  border-radius: var(--radius-full);
  margin-bottom: 0.5rem;
}

/* Pill badges — sentence case, tinted, hairline ring */
.pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  padding: 0.25rem 0.7rem;
  border-radius: var(--radius-full);
  background: var(--brand-50);
  color: var(--brand-700);
  box-shadow: inset 0 0 0 1px rgba(99, 102, 241, 0.2);
}
.pill-badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: 0.7; }
.pill-badge--green  { background: var(--success-light); color: #047857; box-shadow: inset 0 0 0 1px rgba(16, 185, 129, 0.25); }
.pill-badge--amber  { background: var(--warning-light); color: #b45309; box-shadow: inset 0 0 0 1px rgba(245, 158, 11, 0.3); }
.pill-badge--violet { background: #f5f3ff; color: #6d28d9; box-shadow: inset 0 0 0 1px rgba(139, 92, 246, 0.25); }

.trust-badges-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem 2rem;
  margin: 3.5rem 0;
  box-shadow: var(--shadow-sm);
}
.trust-item { display: flex; align-items: center; gap: 1rem; }
.trust-icon { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.25rem; color: #fff; background: linear-gradient(160deg, #1e293b, #090d16); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 4px 12px rgba(9, 13, 22, 0.15); }
.trust-text h4 { font-size: 0.9rem; font-weight: 700; margin-bottom: 0.1rem; }
.trust-text p { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 0; }


/* ==========================================================================
   7. PAGE HEADS & HOME
   ========================================================================== */
.page-head { margin-bottom: 1.25rem; }
.page-head--center { text-align: center; max-width: 820px; margin: 0 auto 1.25rem; }
.page-head h1, .page-head-row h1 {
  font-size: clamp(1.9rem, 3.4vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.1;
  margin: 0.65rem 0 0.5rem;
}
.page-head h1 { text-wrap: balance; }
.page-head-row > div:first-child { flex: 1 1 460px; min-width: 0; }
.page-head-row .page-actions { flex: 0 0 auto; }
.page-head p, .page-head-row p { color: var(--text-muted); font-size: 1rem; line-height: 1.6; max-width: 64ch; }
.page-head--center p { margin-inline: auto; font-size: 0.95rem; }
.page-head--center h1 { margin-top: 0; }
.page-head-row { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 1rem; margin-bottom: 1.25rem; }
.page-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }
.page-actions .btn svg { margin: 0 !important; }

/* Home hero */
.hero { position: relative; text-align: center; padding: 2.5rem 1rem 1.25rem; max-width: 980px; margin: 0 auto; }
.hero-title {
  font-size: clamp(2.3rem, 5.4vw, 3.6rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.06;
  margin: 1rem 0 1.1rem;
  text-wrap: balance;
}
.hero-title span {
  background: linear-gradient(100deg, #4f46e5 10%, #3b82f6 90%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent !important;
}
.hero-sub { color: var(--text-muted); font-size: 1.1rem; max-width: 640px; margin: 0 auto 2rem; line-height: 1.65; text-wrap: pretty; }
.hero-search {
  max-width: 640px;
  margin: 0 auto 1.35rem;
  display: flex;
  gap: 0.5rem;
  background: #fff;
  padding: 0.4rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-md);
  transition: var(--t);
}
.hero-search:focus-within { border-color: var(--accent); box-shadow: var(--ring), var(--shadow-md); }
.hero-search input { flex: 1; min-width: 0; border: none; outline: none; background: transparent; padding: 0.6rem 1.1rem; font-size: 0.95rem; font-family: inherit; letter-spacing: -0.011em; color: var(--text-main); }
.hero-search .btn { border-radius: var(--radius-full); padding: 0.6rem 1.6rem; }
.hero-pills { display: flex; justify-content: center; align-items: center; gap: 0.45rem; flex-wrap: wrap; font-size: 0.825rem; color: var(--text-muted); }
.hero-pills strong { color: var(--text-soft); font-weight: 600; margin-right: 0.15rem; }
.pill-link {
  text-decoration: none;
  color: var(--text-soft);
  background: #fff;
  border: 1px solid var(--border-strong);
  padding: 0.2rem 0.75rem;
  border-radius: var(--radius-full);
  font-weight: 500;
  box-shadow: var(--shadow-xs);
  transition: var(--t);
}
.pill-link:hover { color: var(--brand-700); border-color: var(--brand-300); background: var(--brand-50); transform: translateY(-1px); }

/* Tool cards (home) */
.tool-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1.5rem; margin-bottom: 1.5rem; }
.tool-card {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 2rem;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: var(--t);
}
.tool-card:hover { transform: translateY(-3px); border-color: var(--brand-200); box-shadow: var(--shadow-lg), var(--glow-brand); }
.mono-card-icon {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  background: linear-gradient(160deg, #1e293b, #090d16);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 6px 16px rgba(9, 13, 22, 0.18);
}
.tool-card-title { font-size: 1.35rem; font-weight: 800; letter-spacing: -0.03em; margin-bottom: 0.4rem; }
.tool-card-desc { color: var(--text-muted); font-size: 0.9rem; line-height: 1.6; margin-bottom: 1.35rem; }
.tool-card-subhead { font-size: 0.8rem; font-weight: 600; color: var(--text-muted); letter-spacing: 0; margin: 1.25rem 0 0.65rem; }
.tool-card-list { list-style: none; display: flex; flex-direction: column; gap: 0.55rem; font-size: 0.9rem; }
.tool-card-link { text-decoration: none; color: var(--text-soft); display: flex; justify-content: space-between; align-items: center; padding: 0.1rem 0; transition: var(--t); }
.tool-card-link:hover { color: var(--brand-700); transform: translateX(2px); }
.tool-card-chev { color: #cbd5e1; transition: var(--t); }
.tool-card-link:hover .tool-card-chev { color: var(--brand-500); }
.tool-card-foot { margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid #f1f5f9; }
.tool-card-more { font-size: 0.875rem; font-weight: 600; color: var(--brand-600); text-decoration: none; }
.tool-card-more:hover { color: var(--brand-700); text-decoration: underline; }
.chip { display: inline-block; background: #f1f5f9; color: var(--text-soft); padding: 0.15rem 0.5rem; border-radius: 6px; font-family: var(--font-mono); font-weight: 500; font-size: 0.72rem; letter-spacing: -0.02em; }

/* Home: how-it-works + latest posts */
.panel-section { background: #fff; border: 1px solid var(--border-color); border-radius: var(--radius-xl); padding: 2.25rem 2rem; margin-bottom: 1.5rem; box-shadow: var(--shadow-sm); }
.section-title { font-size: 1.85rem; font-weight: 800; text-align: center; margin-bottom: 0.5rem; letter-spacing: -0.03em; }
.section-sub { text-align: center; color: var(--text-muted); margin-bottom: 2.5rem; font-size: 1rem; }
.steps-grid { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; gap: 1.5rem; align-items: center; }
.step { display: flex; gap: 1rem; align-items: center; }
.step-num {
  width: 44px; height: 44px; border-radius: 50%;
  background: linear-gradient(160deg, #1e293b, #090d16); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-weight: 600; font-size: 1.05rem; flex-shrink: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 4px 12px rgba(9, 13, 22, 0.18);
}
.step-title { font-size: 1.05rem; font-weight: 700; margin-bottom: 0.2rem; }
.step-desc { color: var(--text-muted); font-size: 0.875rem; }
.step-arrow { font-size: 1.5rem; color: #cbd5e1; font-weight: 700; }
.post-thumb { height: 160px; background: linear-gradient(150deg, #1e293b, #090d16); color: #fff; display: flex; align-items: center; justify-content: center; }
.post-title { font-size: 1.125rem; font-weight: 700; margin-bottom: 0.5rem; line-height: 1.35; letter-spacing: -0.025em; }
.post-excerpt { color: var(--text-muted); font-size: 0.875rem; line-height: 1.55; margin-bottom: 1.15rem; }
.post-meta { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid #f1f5f9; padding-top: 0.85rem; font-size: 0.8rem; color: var(--text-faint); margin-top: auto; }
.post-link { color: var(--brand-600); font-weight: 600; text-decoration: none; }
.post-link:hover { color: var(--brand-700); }

.mono-icon { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }


/* ==========================================================================
   8. QR STUDIO — "Pro studio" obsidian workspace
   Single-window layout preserved: tab bar → [form | QR stage + slider + actions].
   Several inputs are re-rendered by qrStudio.setMode() with inline styles, so the
   dynamic form (#qrDynamicForm) is themed with scoped !important overrides.
   ========================================================================== */
.page-qr { background-color: #eef2f9; }

.page-shell--studio { max-width: 1160px; padding: 1.5rem 1rem 3.5rem; }

.tqrcg-onescreen-box,
.tqrcg-box {
  position: relative;
  isolation: isolate;
  color: var(--dark-text);
  background:
    radial-gradient(90% 70% at 88% -10%, rgba(79, 70, 229, 0.2), transparent 60%),
    radial-gradient(60% 50% at 0% 110%, rgba(59, 130, 246, 0.08), transparent 60%),
    linear-gradient(180deg, #0e1424 0%, #090d16 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 26px;
  padding: 1.6rem 2rem 2rem;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 1px 2px rgba(9, 13, 22, 0.3),
    0 28px 56px -16px rgba(9, 13, 22, 0.5);
}
/* Hairline top highlight — the "machined edge" */
.tqrcg-onescreen-box::before,
.tqrcg-box::before {
  content: '';
  position: absolute;
  top: 0; left: 12%; right: 12%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.28), transparent);
  z-index: 1;
}

/* Mode tabs → segmented control */
.tqrcg-tabbar,
.tqrcg-tabs {
  display: flex;
  gap: 0.3rem;
  padding: 0.35rem;
  margin-bottom: 1.5rem;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 18px;
  overflow-x: auto;
  scrollbar-width: none;
}
.tqrcg-tabbar::-webkit-scrollbar, .tqrcg-tabs::-webkit-scrollbar { display: none; }

.tqrcg-stacked-tab,
.tqrcg-tab-btn {
  flex: 1 0 auto;
  min-width: 62px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  padding: 0.6rem 0.8rem;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 13px;
  color: #94a3b8;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: -0.005em;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--t);
}
.tqrcg-stacked-tab:hover, .tqrcg-tab-btn:hover { color: #f1f5f9; background: rgba(255, 255, 255, 0.05); }
.tqrcg-stacked-tab:active { transform: scale(0.97); }
.tqrcg-stacked-tab.active,
.tqrcg-tab-btn.active {
  color: #fff;
  font-weight: 600;
  background: linear-gradient(180deg, rgba(99, 102, 241, 0.3), rgba(79, 70, 229, 0.14));
  border-color: rgba(129, 140, 248, 0.38);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 0 22px rgba(79, 70, 229, 0.28);
}
.tqrcg-stacked-tab svg {
  width: 18px; height: 18px;
  stroke: currentColor; stroke-width: 2; fill: none;
  stroke-linecap: round; stroke-linejoin: round;
}

/* Social brand picker (shown in "Social" mode; JS toggles display) */
.social-icons-strip { display: flex; gap: 0.6rem; margin-bottom: 1.25rem; flex-wrap: wrap; }
.soc-btn {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 2px solid transparent;
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: 0.8rem; font-weight: 700;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 4px 10px rgba(0, 0, 0, 0.35);
  transition: var(--t);
}
.soc-btn:hover { transform: translateY(-2px) scale(1.08); }
.soc-btn.active { border-color: #fff; box-shadow: 0 0 0 3px rgba(129, 140, 248, 0.5), 0 0 18px rgba(99, 102, 241, 0.5); }
.soc-fb { background: #1877f2; }
.soc-ig { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%); }
.soc-li { background: #0a66c2; }
.soc-wa { background: #25d366; }
.soc-yt { background: #ff0000; }
.soc-sp { background: #1db954; }
.soc-gg { background: #4285f4; }
.soc-wc { background: #07c160; }
.soc-tg { background: #229ed9; }
.soc-dc { background: #5865f2; }
.soc-sc { background: #fffc00; color: #000; }
.soc-tt { background: #000; border-color: rgba(255, 255, 255, 0.18); }

/* 13 official brand buttons (img SVGs) — JS toggles display on #socialStrip */
.soc-strip { gap: 0.6rem; padding: 0.7rem 0.8rem 1rem; margin: -0.7rem -0.8rem 0.4rem; overflow-x: auto; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.18) transparent; }
.soc-strip::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.16); background-clip: padding-box; }
.soc-btn-svg {
  flex-shrink: 0;
  width: 44px; height: 44px;
  padding: 9px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 2px 8px rgba(0, 0, 0, 0.3);
  transition: var(--t);
}
.soc-btn-svg img { width: 24px; height: 24px; display: block; object-fit: contain; transition: transform 0.18s var(--ease); }
.soc-btn-svg:hover { transform: translateY(-2px) scale(1.12); background: rgba(255, 255, 255, 0.09); border-color: rgba(56, 189, 248, 0.55); box-shadow: 0 8px 18px rgba(0, 0, 0, 0.4), 0 0 18px rgba(56, 189, 248, 0.22); }
.soc-btn-svg:active { transform: scale(0.96); }
.soc-btn-svg.active {
  transform: scale(1.08);
  background: rgba(56, 189, 248, 0.12);
  border-color: var(--sky);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.28), 0 0 24px rgba(56, 189, 248, 0.38);
}

/* Two-zone workspace */
.studio-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 3rem; align-items: start; }
.studio-prompt {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: #f8fafc;
  margin-bottom: 0.85rem;
}
.studio-hint { font-size: 0.8rem; color: #64748b; margin-bottom: 1.5rem; padding-left: 0.5rem; }
.studio-toggles { display: flex; flex-wrap: wrap; gap: 1.75rem; align-items: center; margin-top: 2rem; font-size: 0.85rem; color: #cbd5e1; }
.studio-toggle { display: flex; align-items: center; gap: 0.65rem; cursor: pointer; }

/* Dynamic form — also covers markup injected by qrStudio.setMode() */
.tqrcg-onescreen-box #qrDynamicForm .form-group { margin-bottom: 0.5rem; }
.tqrcg-onescreen-box #qrDynamicForm :is(input:not([type="color"]):not([type="file"]):not([type="checkbox"]):not(.tqrcg-underline-field), textarea, select) {
  width: 100%;
  background: rgba(255, 255, 255, 0.05) !important;
  color: #f1f5f9 !important;
  border: 1px solid rgba(255, 255, 255, 0.11) !important;
  border-radius: 12px !important;
  padding: 0.75rem 1rem !important;
  font-family: var(--font-body);
  font-size: 0.92rem !important;
  letter-spacing: -0.011em;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.25) !important;
  outline: none;
  transition: var(--t);
}
.tqrcg-onescreen-box #qrDynamicForm #qrTargetInput { border-radius: 9999px !important; padding: 0.9rem 1.4rem !important; font-size: 0.95rem !important; }
.tqrcg-onescreen-box #qrDynamicForm textarea { border-radius: 16px !important; resize: vertical; }
.tqrcg-onescreen-box #qrDynamicForm :is(input:not(.tqrcg-underline-field), textarea, select):hover { border-color: rgba(255, 255, 255, 0.2) !important; }
.tqrcg-onescreen-box #qrDynamicForm :is(input:not(.tqrcg-underline-field), textarea, select):focus {
  border-color: rgba(129, 140, 248, 0.8) !important;
  background: rgba(255, 255, 255, 0.07) !important;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.28), 0 0 24px rgba(79, 70, 229, 0.18) !important;
}
.tqrcg-onescreen-box #qrDynamicForm ::placeholder { color: #64748b; }
.tqrcg-onescreen-box #qrDynamicForm select option { background: #0f172a; color: #f1f5f9; }
.tqrcg-onescreen-box #qrDynamicForm label { color: #cbd5e1; }

/* Underline fields — contact, email, SMS, phone. The sky underline draws in from the
   centre on focus (background-size animation), so there is no layout shift. */
.tqrcg-field-label {
  display: block;
  margin-bottom: 0.1rem;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0;
  color: #94a3b8;
  transition: color 0.18s var(--ease);
}
.tqrcg-underline-field {
  width: 100%;
  padding: 0.5rem 0.15rem 0.55rem;
  font-family: var(--font-body);
  font-size: 0.925rem;
  letter-spacing: -0.011em;
  color: #f8fafc;
  background: transparent linear-gradient(var(--sky), var(--sky)) no-repeat center bottom / 0 2px;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 0;
  outline: none;
  box-shadow: none;
  transition: background-size 0.28s var(--ease), border-color 0.18s var(--ease);
}
.tqrcg-underline-field::placeholder { color: #475569; }
.tqrcg-underline-field:hover { border-bottom-color: rgba(255, 255, 255, 0.34); }
.tqrcg-underline-field:focus { border-bottom: 2px solid var(--sky); padding-bottom: calc(0.55rem - 1px); background-size: 100% 2px; }
div:focus-within > .tqrcg-field-label { color: var(--sky); }
.tqrcg-underline-field[type="tel"], .tqrcg-underline-field[type="email"] { font-variant-numeric: tabular-nums; }
.tqrcg-underline-field:-webkit-autofill { -webkit-text-fill-color: #f8fafc; box-shadow: 0 0 0 40px #0e1424 inset; }

/* Palette & logo drawer (JS toggles display) */
.palette-drawer {
  background: var(--zinc-900);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 1.1rem 1.15rem;
  margin-bottom: 1.25rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.palette-drawer-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.85rem; font-size: 0.85rem; font-weight: 600; color: #f1f5f9; }
.palette-drawer-head button { background: none; border: none; color: #94a3b8; font-size: 1.15rem; cursor: pointer; line-height: 1; border-radius: 6px; padding: 0.1rem 0.4rem; transition: var(--t); }
.palette-drawer-head button:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }

/* QR stage: white "display" tile + vertical template rail */
.studio-aside { display: flex; flex-direction: column; gap: 0.85rem; }
.studio-track-hint { font-size: 0.75rem; color: #94a3b8; text-align: right; }
.studio-track-hint a { color: #93c5fd; text-decoration-color: rgba(147, 197, 253, 0.4); }
.qr-stage { display: flex; gap: 0.85rem; align-items: stretch; }
.qr-card {
  position: relative;
  width: 280px; height: 280px;
  padding: 1.25rem;
  display: flex; align-items: center; justify-content: center;
  background: #fff;
  border-radius: 22px;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.12),
    0 24px 44px -10px rgba(0, 0, 0, 0.6),
    0 0 90px -12px rgba(79, 70, 229, 0.45);
}
.qr-card canvas { border-radius: 4px; }
.qr-card-mark {
  position: absolute; bottom: 10px; right: 14px;
  display: flex; align-items: center; gap: 4px;
  font-family: var(--font-mono);
  font-size: 0.6rem; font-weight: 600;
  letter-spacing: 0.04em;
  color: #0f172a; opacity: 0.55;
}
.qr-card-mark i { display: inline-block; width: 5px; height: 5px; background: #0f172a; }

/* Vertical template slider — a capsule rail matching the QR tile height */
.qr-vertical-slider-wrap {
  width: 72px;
  height: 280px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
  padding: 0.3rem 0.3rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.slider-arrow-btn {
  flex-shrink: 0;
  width: 34px; height: 26px;
  display: flex; align-items: center; justify-content: center;
  background: transparent;
  border: none;
  border-radius: var(--radius-full);
  color: #7c8aa0;
  cursor: pointer;
  transition: var(--t);
}
.slider-arrow-btn svg { width: 14px; height: 14px; stroke-width: 2.75; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.18s var(--ease); }
.slider-arrow-btn:hover { color: var(--sky); background: rgba(56, 189, 248, 0.1); box-shadow: inset 0 0 0 1px rgba(56, 189, 248, 0.3); }
.slider-arrow-btn:hover:first-child svg { transform: translateY(-1px); }
.slider-arrow-btn:hover:last-child svg { transform: translateY(1px); }
.slider-arrow-btn:active { transform: scale(0.92); background: rgba(56, 189, 248, 0.2); }

.qr-slider-track {
  flex: 1;
  min-height: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 12px 2px;
  overflow-y: auto;
  scroll-snap-type: y proximity;
  scroll-behavior: smooth;
  scrollbar-width: none;
  /* Soft fade at both ends signals "more above / below" */
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 14px, #000 calc(100% - 14px), transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 14px, #000 calc(100% - 14px), transparent 100%);
}
.qr-slider-track::-webkit-scrollbar { display: none; }

/* 10 template thumbnails — each carries its own preview tint inline */
.qr-thumb-card {
  position: relative;
  width: 52px; height: 52px;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: #fff;
  border: 2px solid transparent;
  border-radius: 13px;
  overflow: hidden;
  cursor: pointer;
  scroll-snap-align: center;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06), 0 2px 8px rgba(0, 0, 0, 0.4);
  transition: var(--t);
}
.qr-thumb-card svg { width: 40px; height: 40px; }
.qr-thumb-card:hover { transform: translateY(-1px) scale(1.06); border-color: rgba(56, 189, 248, 0.6); }
.qr-thumb-card.active {
  border-color: var(--sky);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.3), 0 0 20px rgba(56, 189, 248, 0.45);
}

/* Action bar under the QR tile: Save pill + SVG + Copy + Palette */
.studio-actions { display: flex; gap: 0.45rem; width: 280px; }
.studio-actions .btn { height: 44px; }
.studio-btn-save {
  flex: 1;
  border-radius: var(--radius-full);
  background: linear-gradient(180deg, #6760f3 0%, #4f46e5 100%);
  color: #fff;
  border: 1px solid rgba(165, 180, 252, 0.4);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24), 0 6px 20px rgba(79, 70, 229, 0.42);
}
.studio-btn-save:hover {
  background: linear-gradient(180deg, #7872f6 0%, #5249e8 100%);
  transform: translateY(-1px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), 0 10px 28px rgba(79, 70, 229, 0.55), 0 0 24px rgba(56, 189, 248, 0.22);
}
.studio-btn-icon {
  width: 44px; padding: 0 !important;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.studio-btn-icon:hover { background: rgba(56, 189, 248, 0.1); border-color: rgba(56, 189, 248, 0.5); color: var(--sky); transform: translateY(-1px); box-shadow: 0 0 18px rgba(56, 189, 248, 0.18); }

/* Legacy swatches / preset chips kept for any remaining markup */
.color-swatches { display: flex; gap: 0.5rem; margin-top: 0.5rem; flex-wrap: wrap; }
.color-swatch { width: 26px; height: 26px; border-radius: 8px; cursor: pointer; border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.12), 0 2px 6px rgba(15, 23, 42, 0.18); transition: var(--t); }
.color-swatch:hover { transform: scale(1.12); }
.preset-carousel-container { display: flex; gap: 0.6rem; overflow-x: auto; padding: 0.5rem 0.2rem; }
.preset-chip { flex-shrink: 0; padding: 0.4rem 0.75rem; border-radius: 10px; border: 1px solid rgba(255, 255, 255, 0.1); background: rgba(255, 255, 255, 0.05); color: #f8fafc; font-size: 0.775rem; font-weight: 600; cursor: pointer; display: flex; align-items: center; gap: 0.5rem; transition: var(--t); }
.preset-chip:hover, .preset-chip.active { border-color: #818cf8; transform: translateY(-1px); box-shadow: 0 4px 14px rgba(79, 70, 229, 0.35); }
.preset-swatch-circle { width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid #fff; flex-shrink: 0; }


/* ==========================================================================
   9. SWITCHES & COLOR INPUTS
   ========================================================================== */
.bm-switch-label { display: flex; justify-content: space-between; align-items: center; font-size: 0.8125rem; font-weight: 600; color: var(--text-soft); cursor: pointer; margin-bottom: 0.75rem; }
.bm-switch { position: relative; display: inline-block; width: 38px; height: 22px; flex-shrink: 0; }
.bm-switch input { opacity: 0; width: 0; height: 0; }
.bm-slider {
  position: absolute; inset: 0;
  cursor: pointer;
  background: #cbd5e1;
  border-radius: 22px;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.15);
  transition: var(--t);
}
.bm-slider::before {
  content: '';
  position: absolute;
  height: 16px; width: 16px;
  left: 3px; bottom: 3px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.3);
  transition: var(--t);
}
.bm-switch input:checked + .bm-slider { background: var(--brand-600); box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.2), 0 0 14px rgba(79, 70, 229, 0.4); }
.bm-switch input:checked + .bm-slider::before { transform: translateX(16px); }
.bm-switch input:focus-visible + .bm-slider { outline: 2px solid var(--brand-400); outline-offset: 2px; }
.tqrcg-onescreen-box .bm-slider { background: rgba(255, 255, 255, 0.16); }
.tqrcg-onescreen-box .bm-switch input:checked + .bm-slider { background: var(--brand-500); }

/* Native color wells → rounded swatches */
input[type="color"] {
  -webkit-appearance: none;
  appearance: none;
  padding: 0 !important;
  border: 2px solid #fff !important;
  border-radius: 9px;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.18), 0 2px 6px rgba(15, 23, 42, 0.12);
  overflow: hidden;
  cursor: pointer;
  transition: var(--t);
}
input[type="color"]:hover { transform: scale(1.08); }
input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
input[type="color"]::-webkit-color-swatch { border: none; border-radius: 6px; }
input[type="color"]::-moz-color-swatch { border: none; border-radius: 6px; }
.tqrcg-onescreen-box input[type="color"] { border-color: rgba(255, 255, 255, 0.85) !important; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12), 0 2px 8px rgba(0, 0, 0, 0.4); }


/* ==========================================================================
   10. BARCODE STUDIO — 3-column app (formats | workspace | options)
   ========================================================================== */
.bm-app-card {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr) 240px;
  min-height: 540px;
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 20px;
  box-shadow: var(--shadow-md);
  overflow: hidden;
  margin-bottom: 1.5rem;
}
.bm-col-left, .bm-col-right { display: flex; flex-direction: column; padding: 1.1rem; background: #f8fafc; }
.bm-col-left { border-right: 1px solid var(--border-color); }
.bm-col-right { border-left: 1px solid var(--border-color); padding: 1.1rem 1.15rem; }
.bm-col-mid { display: flex; flex-direction: column; padding: 1.15rem 1.35rem; background: #fff; min-width: 0; }

.bm-section-title { font-family: var(--font-heading); font-size: 0.875rem; font-weight: 700; letter-spacing: -0.02em; color: var(--text-main); margin-bottom: 0.45rem; }
.bm-subtle-label { font-size: 0.75rem; font-weight: 600; color: var(--text-muted); margin-bottom: 0.5rem; }
.bm-search { position: relative; margin-bottom: 0.7rem; }

/* Format list */
.bm-types-list { overflow-y: auto; max-height: 400px; display: flex; flex-direction: column; gap: 0.45rem; padding: 2px 4px 2px 2px; }
.bm-type-card {
  position: relative;
  padding: 0.55rem 0.5rem 0.5rem;
  text-align: center;
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: var(--shadow-xs);
  cursor: pointer;
  transition: var(--t);
}
.bm-type-card:hover { border-color: var(--brand-300); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.bm-type-card:active { transform: translateY(0) scale(0.985); }
.bm-type-card.active {
  background: var(--brand-50);
  border-color: var(--brand-500);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.14), var(--shadow-xs);
}
/* Selected check badge */
.bm-type-card.active::after {
  content: '';
  position: absolute; top: 6px; right: 6px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--brand-600) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='5 12.5 10 17.5 19 7'/%3E%3C/svg%3E") center / 10px no-repeat;
  box-shadow: 0 0 10px rgba(79, 70, 229, 0.45);
  animation: popIn 0.22s var(--ease);
}
.bm-type-card svg { display: block; max-width: 100%; height: 30px; margin: 0 auto 4px; }
.bm-type-name { font-size: 0.775rem; font-weight: 600; letter-spacing: -0.01em; color: var(--text-main); }
.bm-type-card.active .bm-type-name { color: var(--brand-700); }
.bm-type-card small { font-family: var(--font-mono); color: var(--text-muted); }

/* Middle workspace */
.bm-head-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.45rem; gap: 0.75rem; }
.bm-link, .bm-link:visited { display: inline-flex; align-items: center; gap: 4px; color: var(--brand-600); font-weight: 600; font-size: 0.8rem; text-decoration: none; cursor: pointer; margin-bottom: 0; border-radius: 6px; padding: 0.15rem 0.35rem; transition: var(--t); }
.bm-link:hover { background: var(--brand-50); color: var(--brand-700); }
.bm-note {
  display: inline-block;
  align-self: flex-start;
  font-size: 0.75rem; font-weight: 600;
  color: var(--brand-700);
  background: var(--brand-50);
  padding: 0.15rem 0.6rem;
  border-radius: var(--radius-full);
  box-shadow: inset 0 0 0 1px rgba(99, 102, 241, 0.18);
  margin-bottom: 0.6rem;
}
.bm-note:empty { display: none; }
.bm-canvas {
  flex: 1;
  min-height: 220px;
  display: flex; align-items: center; justify-content: center;
  padding: 1.5rem;
  overflow: hidden;
  background-color: #f8fafc;
  background-image: radial-gradient(#dbe3ee 1px, transparent 1px);
  background-size: 14px 14px;
  border: 1px solid var(--border-color);
  border-radius: 14px;
  box-shadow: inset 0 1px 3px rgba(15, 23, 42, 0.04);
}
.bm-canvas svg { filter: drop-shadow(0 6px 16px rgba(15, 23, 42, 0.1)); border-radius: 4px; }
.bm-count { font-family: var(--font-mono); font-size: 0.7rem; color: var(--text-faint); text-align: center; margin-top: 0.5rem; }

/* Right options */
.bm-color-row { display: flex; justify-content: space-between; align-items: center; background: #fff; border: 1px solid var(--border-strong); border-radius: 10px; padding: 0.35rem 0.6rem; box-shadow: var(--shadow-xs); font-size: 0.72rem; color: var(--text-muted); }

/* Shared compact field (barcode + invoice) */
.inv-field-compact {
  width: 100%;
  padding: 0.42rem 0.65rem;
  font-size: 0.85rem;
  font-family: inherit;
  letter-spacing: -0.011em;
  line-height: 1.4;
  color: var(--text-main);
  background: #fff;
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  box-shadow: var(--shadow-xs);
  outline: none;
  transition: var(--t);
}
.inv-field-compact:hover { border-color: #94a3b8; }
.inv-field-compact:focus { border-color: var(--accent); box-shadow: var(--ring); background: #fff; }
textarea.inv-field-compact { resize: vertical; }
#bcDataInput { font-size: 0.85rem; }


/* ==========================================================================
   11. INVOICE — paper sheet + settings column
   ========================================================================== */
.inv-compact-container {
  width: 100%;
  max-width: 940px;
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 2.5rem 2.75rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 2px 6px rgba(15, 23, 42, 0.03), 0 20px 40px -12px rgba(15, 23, 42, 0.1);
}
.inv-head-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-bottom: 1.5rem; align-items: start; }
.inv-logo-drop {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  width: 180px; height: 88px;
  margin-bottom: 0.9rem;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  transition: var(--t);
}
.inv-logo-drop:hover { border-color: var(--brand-400); background: var(--brand-50); }
.inv-logo-drop #promptLogo { font-size: 0.8rem; font-weight: 600; color: var(--text-muted); }
.inv-logo-drop:hover #promptLogo { color: var(--brand-700); }
.inv-title {
  font-family: var(--font-heading);
  font-size: 2.4rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--text-main);
  margin-bottom: 0.85rem;
  text-align: right;
}
.inv-meta-grid { display: inline-grid; grid-template-columns: 110px 140px; gap: 0.4rem; text-align: left; font-size: 0.8rem; align-items: center; }
.inv-meta-label { font-weight: 500; color: var(--text-muted); text-align: right; padding-right: 6px; }
.inv-party-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; margin-bottom: 1.5rem; }
.inv-label { display: block; font-size: 0.775rem; font-weight: 600; color: var(--text-muted); margin-bottom: 0.3rem; }

/* Line items */
.inv-items-table { width: 100%; border-collapse: separate; border-spacing: 0; margin: 0.5rem 0 0.75rem; }
.inv-table-header { background: transparent; color: #fff; }
.inv-table-header th {
  padding: 0.55rem 0.7rem;
  font-size: 0.775rem;
  font-weight: 600;
  letter-spacing: 0;
  text-align: left;
  color: #e2e8f0;
  background: linear-gradient(180deg, #1e293b, #0f172a);
  border: none;
}
.inv-table-header th:first-child { border-radius: 8px 0 0 8px; }
.inv-table-header th:last-child { border-radius: 0 8px 8px 0; }
.inv-table-header th:nth-child(2), .inv-table-header th:nth-child(3) { text-align: right; padding-right: 1rem; }
.inv-items-table td { padding: 0.3rem 0.25rem; border-bottom: 1px solid #f1f5f9; vertical-align: middle; }
.inv-line-row .inv-field-compact { background: transparent; border-color: transparent; box-shadow: none; }
.inv-line-row .inv-field-compact:hover { border-color: var(--border-strong); background: #fff; }
.inv-line-row .inv-field-compact:focus { border-color: var(--accent); background: #fff; box-shadow: var(--ring); }
.inv-line-row input[type="number"] { text-align: right; }

.btn-danger-sm {
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  background: transparent;
  color: #94a3b8;
  border: 1px solid transparent;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--t);
}
.btn-danger-sm:hover { background: var(--danger-light); color: var(--danger); border-color: #fecdd3; }

.inv-foot-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 1.75rem; border-top: 1px solid #f1f5f9; padding-top: 1.5rem; }
.inv-totals { display: flex; flex-direction: column; gap: 0.5rem; font-size: 0.875rem; }
.inv-row { display: flex; justify-content: space-between; align-items: center; padding: 0.2rem 0; color: var(--text-muted); }
.inv-row--total { border-top: 1px solid var(--border-strong); padding-top: 0.7rem; font-family: var(--font-heading); font-size: 1.1rem; font-weight: 800; letter-spacing: -0.025em; color: var(--text-main); }
.inv-row--total span:last-child { font-family: var(--font-mono); letter-spacing: -0.03em; }
.inv-row--balance {
  margin-top: 0.3rem;
  padding: 0.65rem 0.9rem;
  background: var(--brand-50);
  border: 1px solid var(--brand-200);
  border-radius: 10px;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--brand-700);
}
.inv-row--balance span:last-child { font-family: var(--font-mono); letter-spacing: -0.03em; }
.inv-num { color: var(--text-main); font-weight: 600; }
.inv-remove { background: none; border: none; color: #fb7185; cursor: pointer; font-weight: 700; font-size: 1rem; line-height: 1; border-radius: 6px; padding: 0.1rem 0.35rem; transition: var(--t); }
.inv-remove:hover { color: var(--danger); background: var(--danger-light); }

/* "+ Discount / + Tax / + Shipping" — quiet chips that light up on hover */
.add-calc-trigger {
  display: inline-flex; align-items: center; gap: 0.3rem;
  padding: 0.22rem 0.7rem 0.22rem 0.6rem;
  font-size: 0.775rem; font-weight: 600;
  letter-spacing: -0.005em;
  color: var(--text-muted);
  text-decoration: none;
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-xs);
  cursor: pointer;
  transition: var(--t);
}
.add-calc-trigger:hover { color: var(--royal); background: var(--brand-50); border-color: var(--brand-200); box-shadow: 0 2px 8px rgba(79, 70, 229, 0.12); transform: translateY(-1px); }
.add-calc-trigger:active { transform: translateY(0) scale(0.97); }

/* Legacy summary box (kept for completeness) */
.inv-summary-wrap { background: #f8fafc; border: 1px solid var(--border-color); border-radius: var(--radius-md); padding: 1.25rem; }
.inv-sum-row { display: flex; justify-content: space-between; padding: 0.35rem 0; font-size: 0.9rem; color: var(--text-muted); }
.inv-sum-row.total-row { border-top: 1px solid var(--border-strong); margin-top: 0.5rem; padding-top: 0.65rem; font-size: 1.15rem; font-weight: 800; color: var(--text-main); }
.inv-sum-row.balance-row { background: var(--brand-50); margin: 0.5rem -1.25rem -1.25rem; padding: 0.85rem 1.25rem; border-radius: 0 0 var(--radius-md) var(--radius-md); font-size: 1.05rem; font-weight: 800; color: var(--brand-700); border-top: 1px solid var(--brand-200); }

/* Settings card */
.inv-settings-card { background: #fff; border: 1px solid var(--border-color); border-radius: 14px; padding: 1.15rem; box-shadow: var(--shadow-sm); }
.inv-settings-title { font-size: 0.875rem; font-weight: 700; letter-spacing: -0.02em; color: var(--text-main); border-bottom: 1px solid #f1f5f9; padding-bottom: 0.65rem; margin-bottom: 0.95rem; }

/* Bulk carousel bar */
.bulk-carousel-box {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 0.75rem;
  margin-bottom: 1.25rem;
  padding: 0.8rem 1.15rem;
  color: #fff;
  background: linear-gradient(180deg, #111a2e, #090d16);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 12px 28px -8px rgba(9, 13, 22, 0.35);
}
#carouselCounter { font-family: var(--font-mono); letter-spacing: -0.02em; }
.carousel-nav-btn {
  display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.38rem 0.8rem;
  font-family: inherit; font-size: 0.8rem; font-weight: 600;
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 9px;
  cursor: pointer;
  transition: var(--t);
}
.carousel-nav-btn:hover:not(:disabled) { background: var(--brand-600); border-color: var(--brand-500); color: #fff; box-shadow: 0 0 18px rgba(79, 70, 229, 0.4); }
.carousel-nav-btn:disabled { opacity: 0.35; cursor: not-allowed; }


/* Symbology chips (barcode carousel, kept for pages that still use it) */
.symbology-carousel-track { display: flex; gap: 0.5rem; overflow-x: auto; padding-bottom: 0.4rem; }
.symbology-chip { flex-shrink: 0; padding: 0.5rem 0.85rem; background: #fff; border: 1px solid var(--border-color); border-radius: 10px; box-shadow: var(--shadow-xs); cursor: pointer; text-align: center; transition: var(--t); }
.symbology-chip:hover, .symbology-chip.active { border-color: var(--brand-500); background: var(--brand-50); color: var(--brand-700); box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.14); }
.symbology-chip strong { display: block; font-size: 0.85rem; }
.symbology-chip small { font-size: 0.7rem; color: var(--text-muted); font-family: var(--font-mono); }

/* Legacy barcode gallery */
.barcode-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 0.75rem; max-height: 260px; overflow-y: auto; border: 1px solid var(--border-color); border-radius: var(--radius-sm); padding: 0.75rem; background: #f8fafc; margin-bottom: 1.25rem; }
.barcode-card-item { border: 1px solid var(--border-color); background: #fff; border-radius: var(--radius-sm); padding: 0.65rem; text-align: center; cursor: pointer; transition: var(--t); }
.barcode-card-item:hover, .barcode-card-item.active { border-color: var(--brand-500); background: var(--brand-50); box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.14); }
.barcode-card-item strong { display: block; font-size: 0.9rem; }
.barcode-card-item span { font-family: var(--font-mono); font-size: 0.72rem; color: var(--text-muted); }


/* ==========================================================================
   12. ADMIN — WordPress-style portal, modernised
   Replaces the old per-page <style> block in admin/index.html.
   ========================================================================== */
.wp-admin-body { background: #f1f5f9; background-image: none; margin: 0; padding: 0; min-height: 100vh; display: block; }
.wp-admin-body::before { display: none; }

#loginScreenWrapper {
  position: fixed; inset: 0; z-index: 99999;
  display: flex; align-items: center; justify-content: center;
  padding: 1.5rem;
  background:
    radial-gradient(60% 50% at 50% 0%, rgba(79, 70, 229, 0.3), transparent 70%),
    linear-gradient(180deg, #0f172a, #090d16);
}
.login-modal-card {
  width: 100%; max-width: 420px;
  padding: 2.5rem 2.25rem;
  background: #fff;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 22px;
  box-shadow: 0 0 0 1px rgba(9, 13, 22, 0.4), 0 32px 64px -12px rgba(0, 0, 0, 0.6), 0 0 80px -20px rgba(79, 70, 229, 0.5);
}
.login-brand-icon {
  width: 48px; height: 48px; margin: 0 auto 1.25rem;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  background: linear-gradient(160deg, #6366f1, #4338ca);
  border-radius: 14px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), 0 8px 20px rgba(79, 70, 229, 0.4);
}
.login-title { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.035em; text-align: center; margin-bottom: 0.35rem; }
.login-subtitle { font-size: 0.875rem; color: var(--text-muted); text-align: center; margin-bottom: 1.75rem; }

.wp-admin-bar {
  position: sticky; top: 0; z-index: 1000;
  height: 42px; padding: 0 1.5rem;
  display: flex; align-items: center; justify-content: space-between;
  font-size: 0.8rem;
  color: #94a3b8;
  background: var(--obsidian-950);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.wp-admin-bar a { color: #cbd5e1; text-decoration: none; display: flex; align-items: center; gap: 0.5rem; transition: var(--t); }
.wp-admin-bar a:hover { color: #a5b4fc; }

.wp-admin-container { display: grid; grid-template-columns: 248px 1fr; min-height: calc(100vh - 42px); }
.wp-admin-sidebar { padding: 1.1rem 0.7rem; color: #94a3b8; background: var(--obsidian-900); border-right: 1px solid rgba(255, 255, 255, 0.08); }
.wp-menu-svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.wp-menu-item {
  display: flex; align-items: center; gap: 0.8rem;
  margin: 1px 0;
  padding: 0.65rem 0.85rem;
  color: #94a3b8;
  font-size: 0.85rem; font-weight: 500; letter-spacing: -0.01em;
  text-decoration: none;
  border-radius: 10px;
  border-left: none;
  cursor: pointer;
  transition: var(--t);
}
.wp-menu-item:hover { background: rgba(255, 255, 255, 0.05); color: #f8fafc; }
.wp-menu-item.active {
  background: linear-gradient(180deg, rgba(99, 102, 241, 0.26), rgba(79, 70, 229, 0.12));
  color: #fff; font-weight: 600;
  box-shadow: inset 0 0 0 1px rgba(129, 140, 248, 0.3), 0 0 20px rgba(79, 70, 229, 0.15);
}
.wp-menu-icon { font-size: 1.05rem; width: 20px; text-align: center; }

.wp-admin-content { padding: 2rem 2.5rem 3rem; background: transparent; overflow-y: auto; }
.wp-page-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.75rem; }
.wp-page-header h1 { font-size: 1.7rem; font-weight: 800; letter-spacing: -0.035em; }

.wp-stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 1.75rem; }
.wp-stat-card { background: #fff; border: 1px solid var(--border-color); border-radius: 14px; padding: 1.15rem 1.35rem; box-shadow: var(--shadow-sm); transition: var(--t); }
.wp-stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.wp-stat-card .stat-title { font-size: 0.775rem; font-weight: 500; color: var(--text-muted); }
.wp-stat-card .stat-val { font-family: var(--font-heading); font-size: 1.55rem; font-weight: 800; line-height: 1.2; color: var(--text-main); margin-top: 0.35rem; letter-spacing: -0.035em; font-variant-numeric: tabular-nums; }

.wp-postbox { background: #fff; border: 1px solid var(--border-color); border-radius: 16px; box-shadow: var(--shadow-sm); margin-bottom: 1.5rem; overflow: hidden; }
.wp-postbox-header { display: flex; justify-content: space-between; align-items: center; padding: 0.95rem 1.5rem; font-family: var(--font-heading); font-size: 0.975rem; font-weight: 700; letter-spacing: -0.02em; color: var(--text-main); background: #fbfcfe; border-bottom: 1px solid var(--border-color); }
.wp-postbox-body { padding: 1.5rem; }
.wp-admin-body .form-label { font-size: 0.8125rem; }
.wp-admin-body table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.wp-admin-body table th { text-align: left; padding: 0.65rem 0.85rem; font-size: 0.775rem; font-weight: 600; color: var(--text-muted); background: #f8fafc; border-bottom: 1px solid var(--border-color); }
.wp-admin-body table td { padding: 0.75rem 0.85rem; border-bottom: 1px solid #f1f5f9; }
.wp-admin-body table tr:hover td { background: #fafbff; }


/* ==========================================================================
   13. BLOG, SEO ARTICLE, MODAL
   ========================================================================== */
.seo-article-card {
  margin-top: 2.5rem;
  padding: 2.5rem 2.75rem;
  color: var(--text-soft);
  line-height: 1.75;
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
}
.seo-article-card h2 { font-size: 1.65rem; font-weight: 800; letter-spacing: -0.035em; margin-bottom: 1rem; }
.seo-article-card h3 { font-size: 1.25rem; font-weight: 700; margin: 1.75rem 0 0.6rem; }
.seo-article-card p, .seo-article-card ul, .seo-article-card ol { max-width: 72ch; }
.seo-article-card p { margin-bottom: 1rem; }
.seo-article-card ul, .seo-article-card ol { padding-left: 1.4rem; margin-bottom: 1.25rem; }
.seo-article-card li { margin-bottom: 0.5rem; }
.seo-article-card li::marker { color: var(--brand-400); }
.seo-article-card strong { color: var(--text-main); font-weight: 600; }
.faq-accordion-item { border: 1px solid var(--border-color); border-radius: var(--radius-md); padding: 1.15rem 1.25rem; margin-bottom: 0.85rem; background: #f8fafc; transition: var(--t); }
.faq-accordion-item:hover { border-color: var(--brand-200); background: #fff; }
.faq-accordion-item h4 { font-size: 1rem; font-weight: 700; margin-bottom: 0.35rem; }
.faq-accordion-item p { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 0; }

.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 1.75rem; }
.blog-card {
  display: flex; flex-direction: column; overflow: hidden;
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: var(--t);
}
.blog-card:hover { transform: translateY(-3px); border-color: var(--brand-200); box-shadow: var(--shadow-lg), var(--glow-brand); }
.blog-card-body { display: flex; flex-direction: column; flex: 1; padding: 1.6rem; }
.blog-badge { display: inline-block; width: fit-content; margin-bottom: 0.75rem; padding: 0.2rem 0.65rem; font-size: 0.75rem; font-weight: 600; border-radius: var(--radius-full); }
.blog-badge.qr { background: #eff6ff; color: #1d4ed8; box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.25); }
.blog-badge.barcode { background: var(--success-light); color: #047857; box-shadow: inset 0 0 0 1px rgba(16, 185, 129, 0.25); }
.blog-badge.invoice { background: var(--warning-light); color: #b45309; box-shadow: inset 0 0 0 1px rgba(245, 158, 11, 0.3); }
.blog-badge.general { background: #f5f3ff; color: #6d28d9; box-shadow: inset 0 0 0 1px rgba(139, 92, 246, 0.25); }

.modal-overlay {
  position: fixed; inset: 0; z-index: 999999;
  display: flex; align-items: center; justify-content: center;
  padding: 1.5rem;
  background: rgba(9, 13, 22, 0.6);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.warning-modal-box {
  width: 100%; max-width: 480px;
  padding: 1.75rem;
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 20px;
  box-shadow: 0 0 0 1px rgba(9, 13, 22, 0.05), 0 32px 64px -12px rgba(9, 13, 22, 0.45);
  animation: popIn 0.24s var(--ease);
}
@keyframes popIn { from { opacity: 0; transform: scale(0.94) translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes modalPop { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }


/* ==========================================================================
   14. RESPONSIVE, MOTION, PRINT
   ========================================================================== */
@media (max-width: 1100px) {
  .bm-app-card { grid-template-columns: 220px minmax(0, 1fr) 220px; }
  .studio-grid { gap: 2rem; }
}
@media (max-width: 1024px) {
  .invoice-page-grid { grid-template-columns: 1fr !important; }
  .tool-grid-wrapper { grid-template-columns: 1fr; }
  .ad-sidebar-box { display: none !important; }
  .trust-badges-bar { grid-template-columns: 1fr 1fr; }
  .wp-admin-container { grid-template-columns: 76px 1fr; }
  .wp-menu-title { display: none; }
  .wp-menu-item { justify-content: center; }
  .wp-stats-grid { grid-template-columns: 1fr 1fr; }
  .bm-app-card { grid-template-columns: 1fr; }
  .bm-col-left, .bm-col-right { border: none; }
  .bm-col-left { border-bottom: 1px solid var(--border-color); }
  .bm-col-right { border-top: 1px solid var(--border-color); }
  .bm-types-list { flex-direction: row; max-height: none; overflow-x: auto; overflow-y: hidden; padding-bottom: 0.5rem; }
  .bm-type-card { min-width: 130px; }
  .steps-grid { grid-template-columns: 1fr; }
  .step-arrow { display: none; }
}
@media (max-width: 860px) {
  .studio-grid { grid-template-columns: minmax(0, 1fr); }
  #qrDynamicForm input, #qrDynamicForm textarea, #qrDynamicForm select { min-width: 0; }
  #qrDynamicForm > div { min-width: 0; }
  .studio-aside { align-items: center; }
  .studio-track-hint { text-align: center; }
  .inv-head-grid, .inv-party-grid, .inv-foot-grid { grid-template-columns: 1fr; }
  .inv-title, .inv-head-grid > div:last-child { text-align: left !important; }
  .inv-compact-container { padding: 1.5rem 1.25rem; }
}
@media (max-width: 640px) {
  .header-container { padding: 0.6rem 1rem; flex-wrap: wrap; }
  nav.main-nav { width: 100%; }
  .page-shell { padding: 1.25rem 1rem 3rem; }
  .tqrcg-onescreen-box { padding: 1.15rem 1rem 1.5rem; border-radius: 20px; }
  .qr-stage { flex-direction: column; align-items: center; }
  .qr-vertical-slider-wrap { width: 100%; height: 76px; flex-direction: row; padding: 0.25rem 0.4rem; }
  .qr-slider-track { flex-direction: row; padding: 2px 12px; overflow-x: auto; overflow-y: hidden; -webkit-mask-image: linear-gradient(to right, transparent 0, #000 14px, #000 calc(100% - 14px), transparent 100%); mask-image: linear-gradient(to right, transparent 0, #000 14px, #000 calc(100% - 14px), transparent 100%); }
  .slider-arrow-btn { width: 26px; height: 100%; }
  .slider-arrow-btn svg { transform: rotate(-90deg); }
  .qr-card, .studio-actions { width: min(280px, 100%); }
  .trust-badges-bar { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 0.75rem; text-align: center; }
  .wp-admin-container { grid-template-columns: 1fr; }
  .wp-admin-sidebar { display: flex; overflow-x: auto; padding: 0.5rem; }
  .wp-admin-content { padding: 1.25rem 1rem 2rem; }
  .hero-search { flex-direction: column; border-radius: 20px; }
  .hero-search .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

@media print {
  body { background: #fff !important; }
  body::before { display: none; }
  header.site-header, footer.site-footer, .ad-sidebar-box, .ad-banner-top, .ad-banner-bottom,
  .invoice-sidebar-col, .bulk-carousel-box, .page-head-row, .seo-article-card, .add-calc-trigger, .btn-danger-sm { display: none !important; }
  .page-shell { padding: 0; max-width: none; }
  .invoice-page-grid { display: block !important; }
  .inv-compact-container { max-width: none; border: none; box-shadow: none; padding: 0; border-radius: 0; }
  .inv-line-row .inv-field-compact, .inv-field-compact { border-color: transparent; box-shadow: none; background: transparent; }
  .inv-table-header th { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}


/* ==========================================================================
   15. BARCODE MODALS — Sequence generator · Copy barcode · Label print studio
   JS toggles `display` on the .modal-overlay roots; everything inside is class-driven.
   ========================================================================== */
.warning-modal-box { max-height: calc(100vh - 3rem); overflow-y: auto; scroll-behavior: smooth; }
.modal-card--sm { max-width: 440px; }
.modal-card--md { max-width: 540px; }

.modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 1.15rem; padding-bottom: 1rem; border-bottom: 1px solid #f1f5f9; }
.modal-title { font-family: var(--font-heading); font-size: 1.1rem; font-weight: 800; letter-spacing: -0.03em; color: var(--text-main); margin: 0; line-height: 1.25; }
.modal-sub { margin: 0.1rem 0 0; font-size: 0.775rem; line-height: 1.45; color: var(--text-muted); }
.modal-sub strong { color: var(--text-main); font-family: var(--font-mono); font-weight: 500; font-size: 0.72rem; background: #f1f5f9; padding: 0.05rem 0.4rem; border-radius: 5px; }
.modal-icon {
  flex-shrink: 0;
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  color: var(--royal);
  background: linear-gradient(160deg, #eff6ff, #e0e7ff);
  border-radius: 10px;
  box-shadow: inset 0 0 0 1px rgba(99, 102, 241, 0.18);
}
.modal-close {
  flex-shrink: 0;
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; line-height: 1;
  color: #94a3b8;
  background: transparent;
  border: none;
  border-radius: 9px;
  cursor: pointer;
  transition: var(--t);
}
.modal-close:hover { color: var(--text-main); background: #f1f5f9; }
.modal-close:active { transform: scale(0.92); }

.modal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; margin-bottom: 0.75rem; }
.modal-grid--tight { gap: 0.5rem; margin-bottom: 0.5rem; }
.modal-label { margin-bottom: 0.45rem; font-size: 0.775rem; font-weight: 600; color: var(--text-soft); }
.modal-note { margin-bottom: 1rem; font-size: 0.72rem; line-height: 1.5; color: var(--text-faint); }
.modal-section-top { padding-top: 0.85rem; border-top: 1px solid #f1f5f9; }
.modal-actions { display: flex; justify-content: flex-end; gap: 0.5rem; }
.hint { display: block; margin-top: 0.25rem; font-size: 0.68rem; color: var(--text-muted); }
.hint--mono { font-family: var(--font-mono); letter-spacing: -0.02em; }
.warning-modal-box .form-label { font-size: 0.72rem; margin-bottom: 0.3rem; }

/* Segmented "By quantity / By end value" switch.
   JS writes inline background + color on the two buttons, so only geometry lives here. */
.seg-control { display: flex; margin-bottom: 0.35rem; padding: 2px; gap: 2px; background: #f1f5f9; border: 1px solid var(--border-color); border-radius: 10px; }
.seg-control .seg-btn { flex: 1; padding: 0.3rem 0.4rem; font-size: 0.72rem; font-weight: 600; border: none; border-radius: 8px; box-shadow: none; transform: none; }
.seg-control .seg-btn:hover { transform: none; filter: brightness(0.97); }

/* Live preview well */
.preview-box { margin-bottom: 0.85rem; padding: 0.8rem; background: #f8fafc; border: 1px solid var(--border-color); border-radius: 12px; box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.03); }
.preview-box-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.4rem; font-size: 0.775rem; font-weight: 600; color: var(--text-main); }
.preview-meta { margin-bottom: 0.45rem; font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: -0.02em; color: var(--text-muted); }
.preview-meta span { color: var(--text-main); font-weight: 500; }
.preview-box textarea { background: #fff; }
.copy-preview { display: flex; align-items: center; justify-content: center; min-height: 140px; margin-bottom: 1rem; padding: 1.25rem; background-color: #fff; background-image: radial-gradient(#e8edf4 1px, transparent 1px); background-size: 14px 14px; border: 1px solid var(--border-color); border-radius: 14px; box-shadow: inset 0 1px 3px rgba(15, 23, 42, 0.04); }

/* Sharp summary badges */
.sum-badge {
  display: inline-flex; align-items: center;
  padding: 0.12rem 0.55rem;
  font-family: var(--font-mono); font-size: 0.7rem; font-weight: 500; letter-spacing: -0.02em;
  color: #1d4ed8;
  background: #eff6ff;
  border-radius: var(--radius-full);
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.22);
}
.sum-badge--slate { color: var(--text-soft); background: #f1f5f9; box-shadow: inset 0 0 0 1px rgba(100, 116, 139, 0.22); }

/* ---- Label Print Layout Studio ---- */
.bm-modal-card-lg {
  display: flex; flex-direction: column;
  width: 95vw; max-width: 1080px; max-height: 90vh;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 20px;
  box-shadow: 0 0 0 1px rgba(9, 13, 22, 0.05), 0 40px 80px -20px rgba(9, 13, 22, 0.5);
  animation: popIn 0.24s var(--ease);
}
.bm-modal-header { display: flex; justify-content: space-between; align-items: center; padding: 0.95rem 1.5rem; background: #fff; border-bottom: 1px solid var(--border-color); }
.bm-modal-header h3 { font-family: var(--font-heading); font-size: 1.1rem; font-weight: 800; letter-spacing: -0.03em; margin: 0; }
.bm-modal-header p { color: var(--text-muted); }
.bm-modal-header > button { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; line-height: 1; border-radius: 9px !important; transition: var(--t); }
.bm-modal-header > button:hover { background: #f1f5f9 !important; color: var(--text-main) !important; }
.bm-modal-body-scroll { flex: 1; min-height: 0; display: grid; grid-template-columns: 310px minmax(0, 1fr) 250px; grid-template-rows: minmax(0, 1fr); overflow: hidden; background: #f1f5f9; }
.bm-modal-body-scroll > div { scroll-behavior: smooth; }
.bm-modal-footer { display: flex; justify-content: flex-end; align-items: center; gap: 0.6rem; padding: 0.8rem 1.5rem; background: #fff; border-top: 1px solid var(--border-color); }

.pl-col { min-height: 0; scrollbar-gutter: stable; }
.pl-col--controls { padding: 1.1rem 1.15rem; overflow-y: auto; font-size: 0.8rem; background: #fff; border-right: 1px solid var(--border-color); }
.pl-step-title { display: flex; align-items: center; gap: 0.45rem; margin-bottom: 0.45rem; font-weight: 700; letter-spacing: -0.01em; color: var(--text-main); }
.pl-step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 19px; height: 19px;
  font-family: var(--font-mono); font-size: 0.625rem; font-weight: 600;
  color: #fff;
  background: linear-gradient(160deg, #1e293b, #090d16);
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(9, 13, 22, 0.3);
}
.pl-section { margin-bottom: 1rem; }
.pl-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0.4rem; }
.pl-field-label { display: block; margin-bottom: 0.15rem; font-size: 0.68rem; font-weight: 500; color: var(--text-muted); }
.pl-type { padding: 0.5rem 0.6rem !important; text-align: left !important; }
.pl-type .pl-type-name { font-size: 0.75rem; font-weight: 700; letter-spacing: -0.01em; color: var(--text-main); }
.pl-type small { display: block; font-size: 0.65rem; color: var(--text-muted); }
.pl-type.active .pl-type-name { color: var(--brand-700); }
.pl-type.active small { color: var(--brand-600); }
.pl-type.active::after { top: 7px; right: 7px; }
.pl-check-row { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; margin-top: 0.15rem; font-size: 0.75rem; color: var(--text-soft); cursor: pointer; }
.pl-check-row input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--brand-600); cursor: pointer; }
.pl-check-title { font-weight: 700; color: var(--text-main); }
.pl-hint { font-size: 0.65rem; color: var(--text-faint); }
.pl-col--preview { display: flex; flex-direction: column; align-items: center; padding: 1.1rem 1.25rem; overflow-y: auto; background-color: #eef2f7; background-image: radial-gradient(#d9e0ea 1px, transparent 1px); background-size: 16px 16px; }
.pl-preview-head { display: flex; justify-content: space-between; align-items: center; width: 100%; margin-bottom: 0.5rem; font-size: 0.8rem; font-weight: 600; color: var(--text-main); }
.pl-preview-head span:last-child { font-family: var(--font-mono); font-size: 0.72rem; font-weight: 500; color: var(--text-muted); }
.pl-col--summary { padding: 1.25rem 1.35rem; overflow-y: auto; background: #fff; border-left: 1px solid var(--border-color); }
.pl-summary-title { margin-bottom: 0.75rem; padding-bottom: 0.5rem; font-family: var(--font-heading); font-size: 0.9rem; font-weight: 700; letter-spacing: -0.02em; color: var(--text-main); border-bottom: 1px solid #f1f5f9; }

/* Summary rows: label left, mono value right, dotted leader between */
.sum-list { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 1.5rem; font-size: 0.775rem; color: var(--text-muted); }
.sum-row { display: flex; justify-content: space-between; align-items: baseline; gap: 0.5rem; }
.sum-row strong { font-family: var(--font-mono); font-size: 0.72rem; font-weight: 500; letter-spacing: -0.02em; color: var(--text-main); text-align: right; }

.tips-card { padding: 0.9rem; font-size: 0.75rem; line-height: 1.5; color: #92400e; background: linear-gradient(180deg, #fffbeb, #fef9e7); border: 1px solid #fde68a; border-radius: 12px; }
.tips-title { display: flex; align-items: center; gap: 0.35rem; margin-bottom: 0.4rem; font-weight: 700; color: #b45309; }
.tips-list { display: flex; flex-direction: column; gap: 0.3rem; }

/* Sheet preview — JS fills .sheet-label-cell nodes and sets gridTemplateColumns */
.sheet-preview-paper {
  display: grid;
  box-sizing: border-box;
  width: 320px; min-height: 450px;
  margin: 1.25rem auto;
  padding: 18px 10px; gap: 4px;
  background: #fff;
  border: 1px solid #dbe2ec;
  border-radius: 2px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06), 0 12px 32px -6px rgba(15, 23, 42, 0.18);
}
.sheet-label-cell { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 38px; padding: 2px; overflow: hidden; font-family: var(--font-mono); font-size: 0.6rem; color: #94a3b8; border: 1px dashed #cbd5e1; border-radius: 3px; transition: background 0.15s ease, border-color 0.15s ease; }
.sheet-label-cell svg { max-width: 100%; max-height: 28px; }
.sheet-label-cell.empty { background: #fafbfc; }
.sheet-label-cell.filled { color: var(--text-main); background: #fff; border-style: solid; border-color: #93c5fd; }

/* Start-position grid */
.pos-btn-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.35rem; max-height: 120px; padding: 2px; overflow-y: auto; scroll-behavior: smooth; }
.pos-btn { padding: 0.32rem; font-family: var(--font-mono); font-size: 0.72rem; font-weight: 500; text-align: center; color: var(--text-soft); background: #f8fafc; border: 1px solid var(--border-strong); border-radius: 8px; cursor: pointer; transition: var(--t); }
.pos-btn:hover { background: var(--brand-50); border-color: var(--brand-300); color: var(--brand-700); }
.pos-btn.active { color: #fff; background: linear-gradient(180deg, #3b82f6, #2563eb); border-color: #2563eb; box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35); }

@media (max-width: 900px) {
  .bm-modal-body-scroll { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto; overflow-y: auto; }
  .bm-modal-body-scroll > div { border: none !important; border-bottom: 1px solid var(--border-color) !important; }
  .sheet-preview-paper { width: min(320px, 100%); }
}
@media (max-width: 480px) {
  .modal-grid { grid-template-columns: minmax(0, 1fr); }
  .modal-overlay { padding: 0.75rem; }
}
