/* ============================================
   QR Code Generator — style.css
   Theme: Clean · Modern · Teal-Indigo · Responsive
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;600&display=swap');

/* ── Variables ── */
:root {
  --primary:       #0ea5e9;
  --primary-dark:  #0284c7;
  --accent:        #6366f1;
  --accent-dark:   #4f46e5;
  --success:       #10b981;
  --warning:       #f59e0b;
  --danger:        #ef4444;

  --bg:            #f0f4f8;
  --bg-card:       #ffffff;
  --bg-sidebar:    #1e293b;
  --bg-header:     #0f172a;

  --text-primary:  #0f172a;
  --text-secondary:#475569;
  --text-muted:    #94a3b8;
  --text-light:    #f8fafc;

  --border:        #e2e8f0;
  --border-focus:  var(--primary);

  --radius-sm:     6px;
  --radius:        12px;
  --radius-lg:     18px;
  --radius-xl:     24px;

  --shadow-sm:     0 1px 3px rgba(0,0,0,.08);
  --shadow:        0 4px 16px rgba(0,0,0,.10);
  --shadow-lg:     0 8px 32px rgba(0,0,0,.14);
  --shadow-colored:0 8px 24px rgba(14,165,233,.25);

  --transition:    all .22s cubic-bezier(.4,0,.2,1);
  --font-main:     'Outfit', sans-serif;
  --font-mono:     'JetBrains Mono', monospace;
  --header-h:      64px;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-tap-highlight-color: transparent; }
body {
  font-family: var(--font-main);
  background: var(--bg);
  color: var(--text-primary);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button, input, select, textarea { font-family: inherit; font-size: inherit; }
input, select, textarea { outline: none; border: none; background: none; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ─────────────────────────────────────────────
   HEADER
───────────────────────────────────────────── */
#site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: var(--bg-header);
  display: flex;
  align-items: center;
  padding: 0 20px;
  gap: 16px;
  box-shadow: 0 2px 12px rgba(0,0,0,.3);
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.header-logo .logo-icon {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  font-size: 18px;
  color: #fff;
  box-shadow: 0 2px 8px rgba(14,165,233,.4);
}
.header-logo .logo-text {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -.3px;
}
.header-logo .logo-text span { color: var(--primary); }

.header-tagline {
  font-size: .78rem;
  color: var(--text-muted);
  flex: 1;
  display: none;
}
@media(min-width:600px){ .header-tagline { display: block; } }

.header-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }

.btn-header {
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: none;
}
.btn-header-outline {
  background: transparent;
  border: 1.5px solid rgba(255,255,255,.18);
  color: #fff;
}
.btn-header-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-header-primary {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
}
.btn-header-primary:hover { opacity: .9; transform: translateY(-1px); }

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
}
.hamburger span {
  display: block;
  width: 22px; height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: var(--transition);
}
@media(max-width:767px){ .hamburger { display: flex; } }

/* ─────────────────────────────────────────────
   LAYOUT
───────────────────────────────────────────── */
.app-layout {
  display: flex;
  min-height: calc(100vh - var(--header-h));
}

/* ─────────────────────────────────────────────
   SIDEBAR
───────────────────────────────────────────── */
#sidebar {
  width: 260px;
  flex-shrink: 0;
  background: var(--bg-sidebar);
  min-height: calc(100vh - var(--header-h));
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  transition: transform .28s cubic-bezier(.4,0,.2,1), width .22s;
  position: relative;
  z-index: 50;
}

.sidebar-search {
  padding: 14px 14px 8px;
}
.sidebar-search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,.07);
  border: 1.5px solid rgba(255,255,255,.10);
  border-radius: var(--radius-sm);
  padding: 7px 10px;
  transition: var(--transition);
}
.sidebar-search-box:focus-within {
  border-color: var(--primary);
  background: rgba(14,165,233,.08);
}
.sidebar-search-box i { color: var(--text-muted); font-size: .85rem; }
.sidebar-search-box input {
  color: #fff;
  font-size: .84rem;
  width: 100%;
}
.sidebar-search-box input::placeholder { color: var(--text-muted); }

.sidebar-section { padding: 6px 0; }
.sidebar-section-label {
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 10px 16px 4px;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px;
  cursor: pointer;
  border-radius: 0;
  transition: var(--transition);
  color: #94a3b8;
  font-size: .87rem;
  font-weight: 500;
  border-left: 3px solid transparent;
  position: relative;
}
.sidebar-item:hover {
  background: rgba(255,255,255,.06);
  color: #fff;
}
.sidebar-item.active {
  background: rgba(14,165,233,.12);
  color: var(--primary);
  border-left-color: var(--primary);
}
.sidebar-item .si-icon {
  width: 28px; height: 28px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  font-size: .88rem;
  background: rgba(255,255,255,.05);
  flex-shrink: 0;
  transition: var(--transition);
}
.sidebar-item.active .si-icon {
  background: rgba(14,165,233,.20);
}
.sidebar-item .si-badge {
  margin-left: auto;
  font-size: .65rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 99px;
  background: var(--accent);
  color: #fff;
}

/* Mobile sidebar overlay */
@media(max-width:767px){
  #sidebar {
    position: fixed;
    top: var(--header-h);
    left: 0;
    height: calc(100vh - var(--header-h));
    transform: translateX(-100%);
    width: 260px;
    box-shadow: 4px 0 24px rgba(0,0,0,.4);
  }
  #sidebar.open { transform: translateX(0); }
  .sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    top: var(--header-h);
    background: rgba(0,0,0,.5);
    z-index: 49;
  }
  .sidebar-overlay.show { display: block; }
}

/* ─────────────────────────────────────────────
   MAIN CONTENT
───────────────────────────────────────────── */
#main-content {
  flex: 1;
  overflow: hidden;
  padding: 24px 20px;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
}
@media(max-width:767px){ #main-content { padding: 16px 12px; } }

/* Page title bar */
.page-title-bar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.page-title-bar h1 {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -.5px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-primary);
}
.page-title-bar h1 .title-icon {
  font-size: 1.3rem;
}
.page-subtitle {
  font-size: .84rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* Breadcrumb */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .78rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.breadcrumb span { display: flex; align-items: center; gap: 4px; }
.breadcrumb .sep { color: var(--border); }
.breadcrumb .active { color: var(--primary); }

/* ─────────────────────────────────────────────
   PANELS (two-column generator layout)
───────────────────────────────────────────── */
.generator-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 20px;
  align-items: start;
}
@media(max-width:900px){
  .generator-grid { grid-template-columns: 1fr; }
}

/* Card */
.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  overflow: hidden;
}
.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.card-header h2 {
  font-size: .98rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}
.card-header h2 i { color: var(--primary); }
.card-body { padding: 20px; }

/* ─────────────────────────────────────────────
   FORM ELEMENTS
───────────────────────────────────────────── */
.form-group { margin-bottom: 16px; }
.form-label {
  display: block;
  font-size: .8rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
  letter-spacing: .02em;
  text-transform: uppercase;
}
.form-label .req { color: var(--danger); margin-left: 2px; }

.form-control {
  width: 100%;
  padding: 9px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .9rem;
  color: var(--text-primary);
  background: #fff;
  transition: var(--transition);
}
.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(14,165,233,.12);
}
.form-control::placeholder { color: var(--text-muted); }

textarea.form-control { resize: vertical; min-height: 80px; }

select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2394a3b8' stroke-width='1.8' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media(max-width:480px){ .form-row { grid-template-columns: 1fr; } }

.form-hint {
  font-size: .75rem;
  color: var(--text-muted);
  margin-top: 4px;
}
.form-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 18px 0;
}

/* Toggle switch */
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
}
.toggle-label { font-size: .88rem; font-weight: 500; color: var(--text-primary); }
.toggle {
  position: relative;
  width: 42px; height: 24px;
}
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--border);
  border-radius: 99px;
  cursor: pointer;
  transition: var(--transition);
}
.toggle-slider::before {
  content: '';
  position: absolute;
  left: 3px; top: 3px;
  width: 18px; height: 18px;
  background: #fff;
  border-radius: 50%;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}
.toggle input:checked + .toggle-slider { background: var(--primary); }
.toggle input:checked + .toggle-slider::before { transform: translateX(18px); }

/* Color row */
.color-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.color-row input[type="color"] {
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  cursor: pointer;
  padding: 2px;
  background: none;
}
.color-row .form-control { flex: 1; font-family: var(--font-mono); font-size: .82rem; }

/* Range slider */
.range-wrap { display: flex; align-items: center; gap: 10px; }
.range-wrap input[type="range"] {
  flex: 1;
  accent-color: var(--primary);
  height: 4px;
  cursor: pointer;
}
.range-val {
  font-size: .82rem;
  font-weight: 600;
  font-family: var(--font-mono);
  color: var(--primary);
  min-width: 30px;
  text-align: right;
}

/* ─────────────────────────────────────────────
   BUTTONS
───────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  box-shadow: var(--shadow-colored);
}
.btn-primary:hover { opacity: .92; transform: translateY(-1px); box-shadow: 0 10px 28px rgba(14,165,233,.35); }
.btn-primary:active { transform: translateY(0); }
.btn-secondary {
  background: var(--bg);
  color: var(--text-secondary);
  border: 1.5px solid var(--border);
}
.btn-secondary:hover { border-color: var(--primary); color: var(--primary); background: rgba(14,165,233,.05); }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { opacity: .88; transform: translateY(-1px); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { opacity: .88; }
.btn-sm { padding: 6px 12px; font-size: .8rem; }
.btn-lg { padding: 13px 28px; font-size: 1rem; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; pointer-events: none; }

.btn-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* ─────────────────────────────────────────────
   QR PREVIEW PANEL
───────────────────────────────────────────── */
.qr-preview-card {
  position: sticky;
  top: calc(var(--header-h) + 16px);
}
.qr-canvas-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 20px 16px;
  gap: 12px;
}
#qr-output {
  width: 200px; height: 200px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}
#qr-output canvas { display: block !important; }
#qr-output img { display: block; width: 100%; height: 100%; object-fit: contain; }

.qr-placeholder {
  text-align: center;
  color: var(--text-muted);
}
.qr-placeholder i { font-size: 2.5rem; display: block; margin-bottom: 8px; opacity: .4; }
.qr-placeholder p { font-size: .8rem; }

.qr-size-label {
  font-size: .78rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* Download buttons */
.qr-download-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 0 16px 16px;
}

/* QR type badge */
.qr-type-badge {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 99px;
  background: rgba(14,165,233,.1);
  color: var(--primary);
  border: 1px solid rgba(14,165,233,.2);
}

/* ─────────────────────────────────────────────
   TAB SECTIONS (category selector at top of forms)
───────────────────────────────────────────── */
.category-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 20px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 99px;
  font-size: .78rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: 1.5px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
}
.chip:hover { border-color: var(--primary); color: var(--primary); }
.chip.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(14,165,233,.25);
}

/* ─────────────────────────────────────────────
   FORM SECTIONS (hidden/shown by JS)
───────────────────────────────────────────── */
.qr-form-section { display: none; }
.qr-form-section.active { display: block; animation: fadeIn .2s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ─────────────────────────────────────────────
   HISTORY / RECENT
───────────────────────────────────────────── */
.history-list { display: flex; flex-direction: column; gap: 8px; }
.history-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-card);
  cursor: pointer;
  transition: var(--transition);
}
.history-item:hover { border-color: var(--primary); transform: translateX(2px); }
.history-thumb {
  width: 40px; height: 40px;
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
}
.history-thumb img { width: 100%; height: 100%; object-fit: contain; }
.history-info { flex: 1; min-width: 0; }
.history-type { font-size: .72rem; font-weight: 700; color: var(--primary); text-transform: uppercase; letter-spacing: .05em; }
.history-val { font-size: .82rem; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.history-time { font-size: .72rem; color: var(--text-muted); flex-shrink: 0; }
.history-del {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 2px 4px;
  font-size: .8rem;
  transition: var(--transition);
  border-radius: 4px;
}
.history-del:hover { color: var(--danger); background: rgba(239,68,68,.08); }

/* Empty state */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}
.empty-state i { font-size: 2.5rem; margin-bottom: 12px; opacity: .35; display: block; }
.empty-state p { font-size: .88rem; }

/* ─────────────────────────────────────────────
   TOAST
───────────────────────────────────────────── */
#toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--bg-header);
  color: #fff;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  font-size: .86rem;
  font-weight: 500;
  animation: slideUp .28s ease;
  min-width: 220px;
  border-left: 3px solid var(--success);
}
.toast.error { border-left-color: var(--danger); }
.toast.warning { border-left-color: var(--warning); }
.toast i { font-size: 1rem; }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
@keyframes slideDown { to { opacity: 0; transform: translateY(20px); } }
.toast.hide { animation: slideDown .25s ease forwards; }

/* ─────────────────────────────────────────────
   MODAL
───────────────────────────────────────────── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  backdrop-filter: blur(4px);
  animation: fadeIn .2s ease;
}
.modal-backdrop.hidden { display: none; }
.modal {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 480px;
  overflow: hidden;
}
.modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-header h3 { font-size: 1rem; font-weight: 700; }
.modal-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 1rem;
  padding: 4px;
  transition: var(--transition);
  border-radius: 4px;
}
.modal-close:hover { color: var(--text-primary); background: var(--bg); }
.modal-body { padding: 20px; }
.modal-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

/* ─────────────────────────────────────────────
   STATS / COUNTERS (top of main area)
───────────────────────────────────────────── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.stat-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: var(--transition);
}
.stat-card:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.stat-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 1rem;
  flex-shrink: 0;
}
.stat-icon.blue { background: rgba(14,165,233,.12); color: var(--primary); }
.stat-icon.indigo { background: rgba(99,102,241,.12); color: var(--accent); }
.stat-icon.green { background: rgba(16,185,129,.12); color: var(--success); }
.stat-icon.amber { background: rgba(245,158,11,.12); color: var(--warning); }
.stat-val { font-size: 1.3rem; font-weight: 800; letter-spacing: -.5px; }
.stat-lbl { font-size: .74rem; color: var(--text-muted); font-weight: 500; }

/* ─────────────────────────────────────────────
   FOOTER
───────────────────────────────────────────── */
#site-footer {
  background: var(--bg-header);
  color: var(--text-muted);
  padding: 20px;
  font-size: .8rem;
  text-align: center;
  margin-top: auto;
}
#site-footer a { color: var(--primary); transition: var(--transition); }
#site-footer a:hover { color: var(--primary-dark); }
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  max-width: 900px;
  margin: 0 auto 16px;
  text-align: left;
}
.footer-col h4 {
  font-size: .82rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
}
.footer-col ul li { margin-bottom: 4px; }
.footer-col ul li a:hover { color: var(--primary); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); padding-top: 14px; margin-top: 8px; }
.footer-bottom .brand { color: var(--primary); font-weight: 700; }

/* ─────────────────────────────────────────────
   HELPERS / UTILITIES
───────────────────────────────────────────── */
.hidden { display: none !important; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-0 { margin-top: 0 !important; }
.mt-4 { margin-top: 4px; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mb-0 { margin-bottom: 0 !important; }
.mb-4 { margin-bottom: 4px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.flex { display: flex; }
.items-center { align-items: center; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.w-full { width: 100%; }

/* Pulse animation for live generate button */
@keyframes pulse {
  0%,100% { box-shadow: 0 8px 24px rgba(14,165,233,.25); }
  50%      { box-shadow: 0 8px 30px rgba(14,165,233,.55); }
}
.btn-pulse { animation: pulse 2.2s ease infinite; }

/* ── Responsive tweaks ── */
@media(max-width:480px){
  .stats-row { grid-template-columns: 1fr 1fr; }
  .qr-download-row { grid-template-columns: 1fr; }
  .page-title-bar h1 { font-size: 1.15rem; }
}

/* Shake animation for validation */
@keyframes shake {
  0%,100% { transform: translateX(0); }
  15%,45%,75% { transform: translateX(-5px); }
  30%,60%,90% { transform: translateX(5px); }
}
.shake-anim { animation: shake .45s ease !important; }

/* Details/summary arrow */
details > summary::-webkit-details-marker { display: none; }
details > summary::before {
  content: '▶';
  font-size: .7rem;
  margin-right: 4px;
  transition: transform .2s;
  display: inline-block;
}
details[open] > summary::before { transform: rotate(90deg); }
