/* ===========================================
   QR Code Generator — Tool Styles
   Large-screen-first design
   =========================================== */

/* ── 1. Main Layout ── */
.qr-main {
  padding-top: 0;
  min-height: 100vh;
  background: var(--bg-primary);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  margin-bottom: 18px;
  transition: color var(--transition-fast);
}

.back-link:hover { color: var(--purple-500); }
.back-icon { color: var(--text-secondary); }

.gradient-text {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── 3. Type Tabs Bar ── */
.qr-type-tabs-wrapper {
  background: var(--bg-secondary);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 8px;
  margin-bottom: 28px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.qr-type-tabs-wrapper::-webkit-scrollbar { display: none; }

.qr-type-tabs {
  display: flex;
  gap: 4px;
  white-space: nowrap;
  min-width: max-content;
}

.qr-type-tab {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 16px;
  background: none;
  border: 1.5px solid transparent;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
  flex-shrink: 0;
}

.qr-type-tab:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border-color: var(--border-hover);
}

.qr-type-tab.active {
  background: var(--gradient-primary);
  color: #ffffff;
  border-color: transparent;
  box-shadow: var(--shadow-sm);
}

.qr-type-tab .icon { transition: transform var(--transition-fast); }
.qr-type-tab.active .icon { color: #ffffff; }
.qr-type-tab:hover .icon { transform: scale(1.1); }

/* ── 4. Main Two-Column Layout ── */
.qr-generator-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  grid-template-rows: auto auto;
  grid-template-areas:
    "step1 preview"
    "step2 preview";
  column-gap: 14px;
  row-gap: 18px;
  align-items: start;
  padding-bottom: 0;
  margin-bottom: 0;
}

.qr-generator-layout > .step-block:nth-of-type(1) {
  grid-area: step1;
  min-width: 0;
  margin-bottom: 0;
}

.qr-generator-layout > .step-block:nth-of-type(2) {
  grid-area: step2;
  min-width: 0;
  margin-bottom: 0;
}

/* ── 5. Step Blocks ── */
.step-block {
  background: var(--bg-secondary);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 0;
}

.step-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 24px;
  border-bottom: 1.5px solid var(--border);
  background: var(--bg-card);
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: var(--gradient-primary);
  color: #ffffff;
  border-radius: 8px;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 800;
  flex-shrink: 0;
}

.step-header-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.step-body {
  padding: 24px;
}

/* ── 6. Form Fields ── */
.form-panel { display: none; }
.form-panel.active { display: block; }

.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 7px;
  letter-spacing: 0.01em;
}

.form-control {
  width: 100%;
  padding: 11px 14px;
  background: var(--bg-primary);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.92rem;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  outline: none;
  -webkit-appearance: none;
}

.form-control:focus {
  border-color: var(--purple-500);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.12);
}

.form-control::placeholder { color: var(--text-muted); }

textarea.form-control {
  resize: vertical;
  min-height: 90px;
  line-height: 1.55;
}

select.form-control {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239485b5' stroke-width='2' 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 12px center;
  padding-right: 36px;
  cursor: pointer;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.form-row.three { grid-template-columns: 1fr 1fr 1fr; }
.form-row.wide { grid-template-columns: 2fr 1fr; }

.form-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 5px;
  line-height: 1.4;
}

/* Toggle Switch */
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
}

.toggle-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.toggle-switch {
  position: relative;
  width: 44px;
  height: 24px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.toggle-track {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--border);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.toggle-track::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  top: 3px;
  background: white;
  border-radius: 50%;
  transition: transform var(--transition-fast);
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

.toggle-switch input:checked + .toggle-track {
  background: var(--purple-500);
}

.toggle-switch input:checked + .toggle-track::before {
  transform: translateX(20px);
}

/* ── 7. Design Sub-tabs ── */
.design-tabs-bar {
  display: flex;
  gap: 4px;
  padding: 16px 24px 0;
  border-bottom: 1.5px solid var(--border);
}

.design-tab {
  padding: 9px 18px;
  background: none;
  border: none;
  border-bottom: 2.5px solid transparent;
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  margin-bottom: -1.5px;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

.design-tab:hover { color: var(--text-primary); }

.design-tab.active {
  color: var(--purple-500);
  border-bottom-color: var(--purple-500);
}

.design-panel { display: none; }
.design-panel.active { display: block; }

.design-panel-body {
  padding: 20px 24px 24px;
}

/* ── 8. Frame Grid ── */
.frame-grid {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  margin-bottom: 20px;
  overflow-x: auto;
  padding: 4px 2px 10px;
  scrollbar-width: thin;
  scrollbar-color: var(--border-hover) var(--bg-primary);
  -webkit-overflow-scrolling: touch;
}

.frame-grid::-webkit-scrollbar {
  height: 6px;
}

.frame-grid::-webkit-scrollbar-track {
  background: var(--bg-primary);
  border-radius: var(--radius-full);
}

.frame-grid::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: var(--radius-full);
}

.frame-grid::-webkit-scrollbar-thumb:hover {
  background: var(--purple-500);
}

.frame-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  padding: 10px 6px;
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  background: #eaedf2;
  transition: all var(--transition-fast);
  flex-shrink: 0;
  width: 72px;
}

.frame-option:hover {
  border-color: var(--purple-400);
  background: #e2e5ed;
}

.frame-option.selected {
  border-color: var(--purple-500);
  background: #eaedf2;
  box-shadow: 0 0 0 3px rgba(139,92,246,0.15);
}

.frame-preview-wrapper {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.frame-thumb-svg {
  width: 100%;
  height: 100%;
  max-width: 56px;
  max-height: 56px;
  object-fit: contain;
  display: block;
}

.frame-name {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.2;
}

.frame-option.selected .frame-name { color: var(--purple-500); }

/* Frame text customization */
.frame-text-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;
  align-items: end;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.color-input-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.color-input-group .form-label { margin-bottom: 0; }

#fg-color-group,
#bg-color-group,
#qr-global-fg-color-group,
#frame-solid-color-group {
  max-width: 220px;
  width: 100%;
}

.color-pair {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: var(--bg-primary);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color var(--transition-fast);
}

.color-pair:hover { border-color: var(--border-hover); }

.color-pair.disabled {
  opacity: 0.45;
  cursor: not-allowed !important;
  pointer-events: none;
}
.color-pair.disabled input,
.color-pair.disabled .color-swatch {
  pointer-events: none;
}

.color-swatch {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  border: 1px solid rgba(0,0,0,0.15);
  flex-shrink: 0;
  cursor: pointer;
}

.color-hex-input {
  background: none;
  border: none;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 500;
  flex: 1;
  min-width: 0;
  width: 100%;
  outline: none;
  cursor: text;
  text-transform: uppercase;
}

input[type="color"] {
  width: 0;
  height: 0;
  padding: 0;
  border: 0;
  visibility: hidden;
  position: absolute;
}

/* ── 9. Dot Style Grid ── */
.style-grid {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  margin-bottom: 24px;
  overflow-x: auto;
  padding: 12px 2px 10px;
  scrollbar-width: thin;
  scrollbar-color: var(--border-hover) var(--bg-primary);
  -webkit-overflow-scrolling: touch;
}

.style-grid::-webkit-scrollbar {
  height: 6px;
}

.style-grid::-webkit-scrollbar-track {
  background: var(--bg-primary);
  border-radius: var(--radius-full);
}

.style-grid::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: var(--radius-full);
}

.style-grid::-webkit-scrollbar-thumb:hover {
  background: var(--purple-500);
}

.style-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  padding: 10px 6px;
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  background: #eaedf2;
  transition: all var(--transition-fast);
  flex-shrink: 0;
  width: 72px;
  position: relative;
}

/* Rounded top bar for the last clicked style option card */
.style-option.last-clicked::before {
  content: '';
  position: absolute;
  top: -8px;
  left: 8px;
  right: 8px;
  height: 4px;
  background: var(--purple-500);
  border-radius: var(--radius-full);
}

.style-option:hover {
  border-color: var(--purple-400);
  background: #e2e5ed;
}

.style-option.selected {
  border-color: var(--purple-500);
  background: #eaedf2;
  box-shadow: 0 0 0 3px rgba(139,92,246,0.15);
}

.style-preview-wrapper {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.style-preview {
  width: 40px;
  height: 40px;
  display: block;
}

.style-name {
  font-size: 0.66rem;
  font-weight: 600;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.2;
}

.style-option.selected .style-name { color: var(--purple-500); }

.style-section-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
  margin-top: 16px;
}

.style-section-label:first-child { margin-top: 0; }

/* Color options in shape panel */
.color-options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.color-option-full { grid-column: 1 / -1; }

.color-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

/* Gradient */
.gradient-section {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.gradient-type-pills {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
}

.pill-btn {
  padding: 6px 14px;
  background: var(--bg-primary);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.pill-btn:hover { border-color: var(--purple-400); color: var(--text-primary); }
.pill-btn.active {
  background: var(--purple-500);
  color: #ffffff;
  border-color: var(--purple-500);
}

.gradient-colors-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.gradient-dir-row {
  display: flex;
  gap: 6px;
  margin-top: 10px;
}

/* ── 10. Logo Panel ── */
.style-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
  margin-bottom: 14px;
}

.btn-upload-logo-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  background: var(--bg-primary);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-upload-logo-inline:hover {
  border-color: var(--purple-500);
  background: rgba(139, 92, 246, 0.05);
  color: var(--purple-500);
}

#panel-logo {
  position: relative;
}

.panel-drop-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(124, 58, 237, 0.93); /* Vibrant purple overlay */
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 50;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  color: #ffffff;
  border: 2px dashed rgba(255, 255, 255, 0.6);
  margin: -1.5px; /* Alignment adjustment for overlay border */
}

#panel-logo.drag-active .panel-drop-overlay {
  display: flex;
}

.drop-overlay-content {
  text-align: center;
  pointer-events: none;
}

.drop-overlay-content p {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  margin-top: 8px;
  color: #ffffff;
}

.drop-overlay-content .icon {
  color: #ffffff;
}

.logo-presets {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  margin-bottom: 20px;
  overflow-x: auto;
  padding: 4px 2px 10px;
  scrollbar-width: thin;
  scrollbar-color: var(--border-hover) var(--bg-primary);
  -webkit-overflow-scrolling: touch;
}

.logo-presets::-webkit-scrollbar {
  height: 6px;
}

.logo-presets::-webkit-scrollbar-track {
  background: var(--bg-primary);
  border-radius: var(--radius-full);
}

.logo-presets::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: var(--radius-full);
}

.logo-presets::-webkit-scrollbar-thumb:hover {
  background: var(--purple-500);
}

.logo-preset {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  padding: 10px 6px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-primary);
  transition: all var(--transition-fast);
  flex-shrink: 0;
  width: 72px;
}

.logo-preset.badge-type {
  width: 90px;
}

.logo-preset:hover { border-color: var(--purple-400); background: var(--bg-tertiary); }
.logo-preset.selected { border-color: var(--purple-500); background: rgba(139,92,246,0.08); }

.logo-preset-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: transparent;
}

.logo-preset-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 6px;
  display: block;
}

.logo-preset-icon.badge-type {
  width: 54px;
  background: transparent;
}

.logo-preset-icon.badge-type img {
  border-radius: 4px;
  object-fit: contain;
}

.logo-preset-none {
  background: var(--bg-tertiary);
  border-radius: 8px;
}

.logo-preset-none svg {
  width: 22px;
  height: 22px;
}

.logo-preset-name {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-muted);
  text-align: center;
}

.logo-none-btn {
  width: 32px;
  height: 32px;
  border: 2px solid var(--border);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--text-muted);
}

.logo-size-row {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.range-group {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}

.range-slider {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-full);
  outline: none;
  cursor: pointer;
}

.range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  background: var(--purple-500);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(124,58,237,0.3);
}

.range-val {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--purple-500);
  width: 40px;
  text-align: right;
}

/* ── 11. Level Panel ── */
.level-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.level-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  padding: 10px 8px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-primary);
  transition: all var(--transition-fast);
  text-align: center;
}

.level-option:hover { border-color: var(--purple-400); background: var(--bg-tertiary); }
.level-option.selected { border-color: var(--purple-500); background: rgba(139,92,246,0.08); }

.level-letter {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.1;
}

.level-pct {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--purple-500);
  line-height: 1.1;
}

.level-desc {
  font-size: 0.68rem;
  color: var(--text-muted);
  line-height: 1.25;
}

.level-option.selected .level-letter { color: var(--purple-600); }

#qr-size-preset,
#logo-shape,
#logo-size-preset {
  max-width: 260px;
  width: 100%;
}

/* Size & Margin */
.tech-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

/* ── 12. Right Panel (Preview + Download) ── */
.qr-preview-card {
  grid-area: preview;
  position: -webkit-sticky;
  position: sticky;
  top: 88px;
  align-self: start;
  z-index: 10;
  background: var(--bg-secondary);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.preview-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1.5px solid var(--border);
  background: var(--bg-card);
}

.preview-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  background: var(--gradient-primary);
  color: #ffffff;
  border-radius: 7px;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 800;
}

.preview-header-title {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
}

.qr-canvas-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: #eaedf2;
  min-height: 240px;
  position: relative;
}

#qr-canvas {
  border-radius: var(--radius-md);
  display: block;
  width: 200px;
  height: auto;
  box-shadow: none;
}

.qr-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
  font-size: 0.9rem;
  text-align: center;
}

.qr-empty-icon {
  font-size: 3rem;
  opacity: 0.35;
}

.qr-type-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3px 10px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--purple-500);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1.15;
  white-space: normal;
  margin-left: auto;
  flex-shrink: 0;
  max-width: 100px;
}

.qr-type-badge.long-badge {
  font-size: 0.65rem;
  padding: 4px 8px;
  max-width: 85px;
}

/* ── 13. Download Options ── */
.download-section {
  padding: 18px 20px;
  border-top: 1.5px solid var(--border);
}

.action-buttons-row {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 10px;
  margin-top: 14px;
}

.btn-download-main {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px 14px;
  background: var(--gradient-primary);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font-heading);
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-sm);
}

.btn-download-main:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  filter: brightness(1.05);
}

.btn-download-main:active { transform: translateY(0); }

.btn-copy-qr {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  padding: 10.5px 14px; /* 10.5px + 1.5px border = 12px height equivalent */
  background: var(--bg-primary);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-heading);
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-copy-qr:hover {
  border-color: var(--purple-400);
  color: var(--purple-500);
  background: rgba(139,92,246,0.05);
}

.btn-copy-qr.copied {
  background: rgba(16,185,129,0.08);
  border-color: #10b981;
  color: #10b981;
}

/* Toast */
.qr-toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-lg);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  z-index: 9999;
  opacity: 0;
  animation: toastIn 0.3s ease forwards, toastOut 0.3s ease 1.7s forwards;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  max-width: calc(100% - 32px);
  width: max-content;
  box-sizing: border-box;
}

.qr-toast span {
  flex-shrink: 0;
}

@keyframes toastIn {
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}
@keyframes toastOut {
  to { opacity: 0; transform: translateX(-50%) translateY(10px); }
}

/* ── 14. Preview type badge row ── */
.preview-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px 0;
}

.preview-data-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--font-mono);
}

/* ── 15. Vertical divider ── */
.section-divider {
  height: 1px;
  background: var(--border);
  margin: 4px 0;
}

/* Frame Customization (Dynamic Layouts) */
.frame-custom-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: end;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.frame-color-section {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--border);
}
.frame-gradient-flex,
.gradient-controls-flex {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-end;
  width: 100%;
}
.frame-gradient-flex > *,
.gradient-controls-flex > * {
  flex: 1 1 calc(50% - 6px);
  min-width: 110px;
  margin-bottom: 0 !important;
  box-sizing: border-box;
}
@media (min-width: 600px) {
  .frame-gradient-flex > *,
  .gradient-controls-flex > * {
    flex: 1 1 calc(25% - 8px);
  }
}
.frame-gradient-flex select.form-control,
.gradient-controls-flex select.form-control {
  height: 41px;
  width: 100%;
  box-sizing: border-box;
}
.angle-picker-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--bg-primary);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 2px 10px;
  height: 41px;
  width: 100%;
  box-sizing: border-box;
}
.angle-dial {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--bg-secondary);
  border: 1.5px solid var(--border);
  position: relative;
  cursor: pointer;
  flex-shrink: 0;
  touch-action: none;
}
.angle-dial:hover {
  border-color: var(--purple-400);
}
.angle-dial-needle {
  position: absolute;
  width: 2px;
  height: 9px;
  background: var(--purple-500);
  bottom: 50%;
  left: calc(50% - 1px);
  transform-origin: bottom center;
  transform: rotate(90deg);
  border-radius: var(--radius-full);
}
.angle-input {
  width: 48px;
  padding: 2px 4px;
  text-align: center;
  font-size: 0.88rem;
  background: none !important;
  border: none !important;
  color: var(--text-primary);
  font-family: var(--font-mono);
  outline: none;
  -moz-appearance: textfield;
}
.angle-input::-webkit-outer-spin-button,
.angle-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.angle-deg-symbol {
  font-size: 0.88rem;
  color: var(--text-secondary);
  font-weight: 600;
  margin-left: -2px;
}

/* ── 16. Responsive — Tablet ── */
@media (max-width: 1200px) {
  .qr-generator-layout {
    grid-template-columns: 1fr 280px;
    grid-template-areas:
      "step1 preview"
      "step2 preview";
    column-gap: 12px;
    row-gap: 16px;
  }
}

@media (max-width: 960px) {
  .qr-generator-layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    grid-template-areas:
      "step1"
      "preview"
      "step2";
    gap: 14px;
  }
  .qr-preview-card {
    position: static;
    top: unset;
  }

  .design-tabs-bar {
    display: flex;
    padding: 12px 16px 0;
    gap: 0;
    overflow-x: visible;
  }
  .design-tab {
    flex: 1;
    text-align: center;
    padding: 8px 4px;
    font-size: 0.82rem;
    white-space: normal;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    line-height: 1.2;
  }
  .step-num,
  .preview-step-num {
    display: none !important;
  }
}

/* ── 17. Responsive — Mobile ── */
@media (max-width: 640px) {
  .qr-main { padding-top: 0; }

  .qr-type-tabs-wrapper { padding: 6px; border-radius: var(--radius-md); }
  .qr-type-tab { padding: 8px 12px; font-size: 0.82rem; gap: 5px; }

  .step-header { padding: 14px 16px; }
  .step-body { padding: 16px; }
  .design-panel-body { padding: 14px 16px 16px; }

  .form-row,
  .form-row.three,
  .form-row.wide { grid-template-columns: 1fr; gap: 12px; }

  .frame-preview-wrapper { width: 44px; height: 44px; }
  .frame-thumb-svg { max-width: 44px; max-height: 44px; }
  .frame-name { font-size: 0.62rem; }

  .style-preview-wrapper { width: 36px; height: 36px; }
  .style-preview { width: 36px; height: 36px; }

  /* Fallback to baseline horizontal scrolling for logo presets */

  .level-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }

  .tech-options { grid-template-columns: 1fr; gap: 14px; }

  .color-options-grid { grid-template-columns: 1fr; }

  .frame-custom-grid { grid-template-columns: 1fr 1fr; gap: 8px; }

  .qr-canvas-wrapper { padding: 16px; min-height: 240px; }

  .download-format-row { grid-template-columns: repeat(4, 1fr); gap: 6px; }
  .download-fmt-btn { font-size: 0.75rem; padding: 8px 4px; }

  /* Removed duplicate mobile overrides to preserve the 960px responsive equal-width tab styles */

  .qr-toast { bottom: 16px; padding: 10px 18px; font-size: 0.85rem; max-width: calc(100% - 32px); }

  .gradient-colors-row { grid-template-columns: 1fr; }
  .gradient-dir-row { flex-wrap: wrap; }

  .btn-download-main { font-size: 0.92rem; padding: 12px 16px; line-height: 1.2; }
  .btn-copy-qr { font-size: 0.92rem; padding: 10.5px 16px; line-height: 1.2; }
}

@media (max-width: 400px) {
.qr-type-tab { padding: 7px 10px; font-size: 0.78rem; }
}

/* ═══════════════════════════════════════════════════
   BULK QR CODE GENERATOR — UI Styles
   ═══════════════════════════════════════════════════ */

/* ── Mode Switcher (Manual / Bulk) ── */
.mode-switcher {
  display: flex;
  gap: 6px;
  background: var(--bg-secondary) !important;
  border: 1px solid var(--border) !important;
  border-radius: 12px !important;
  padding: 6px !important;
  margin-bottom: 18px !important;
}

.mode-tab {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px !important;
  border: none !important;
  border-radius: 8px !important;
  background: transparent !important;
  color: var(--text-secondary) !important;
  font-size: 0.875rem !important;
  font-weight: 600 !important;
  font-family: inherit !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  white-space: nowrap !important;
  box-shadow: none !important;
}

.mode-tab:hover {
  color: var(--text-primary) !important;
  background: var(--bg-primary) !important;
}

.mode-tab.active {
  background: var(--purple-600) !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.25) !important;
}

/* ── Bulk Dropzone ── */
.bulk-dropzone {
  border: 2px dashed var(--border);
  border-radius: 14px;
  padding: 36px 24px;
  text-align: center;
  background: var(--bg-secondary);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
  position: relative;
}

.bulk-dropzone:hover,
.bulk-dropzone.drag-over {
  border-color: var(--accent);
  background: rgba(124, 58, 237, 0.06);
  transform: scale(1.01);
}

.bulk-dropzone-icon {
  font-size: 2.4rem;
  margin-bottom: 12px;
  line-height: 1;
  user-select: none;
}

.btn-bulk-sample {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px !important;
  border: 1px dashed var(--purple-400) !important;
  border-radius: 4px !important;
  background: var(--bg-primary) !important;
  color: var(--purple-600) !important;
  font-size: 0.78rem !important;
  font-weight: 600 !important;
  font-family: inherit !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  margin-top: 14px !important;
  box-shadow: none !important;
}

.btn-bulk-sample:hover {
  background: var(--bg-tertiary) !important;
  border-color: var(--purple-600) !important;
  color: var(--purple-600) !important;
}

.bulk-desktop-prompt {
  display: block;
}

.bulk-mobile-prompt {
  display: none;
  margin-bottom: 12px;
}

.btn-bulk-browse-mobile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  background: var(--gradient-brand, linear-gradient(135deg, #7c3aed, #a855f7));
  color: #ffffff !important;
  border: none;
  border-radius: 4px;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(124, 58, 237, 0.25);
  transition: all 0.2s ease;
}

.btn-bulk-browse-mobile:hover,
.btn-bulk-browse-mobile:active {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(124, 58, 237, 0.35);
}

.bulk-dropzone-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 6px;
}

.bulk-dropzone-sub {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin: 0 0 8px;
}

.bulk-browse-btn {
  background: none;
  border: none;
  color: var(--accent);
  font-weight: 600;
  font-size: inherit;
  font-family: inherit;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
}

.bulk-browse-btn:hover { opacity: 0.8; }

.bulk-dropzone-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin: 0;
  opacity: 0.75;
}

@media (max-width: 960px) {
  .bulk-desktop-prompt {
    display: none;
  }
  .bulk-mobile-prompt {
    display: block;
  }
  .bulk-dropzone {
    padding: 24px 16px;
  }
}

/* ── Bulk Mapping Panel ── */
.bulk-mapping-panel {
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  background: var(--bg-secondary);
}

.bulk-mapping-header {
  padding: 16px 18px 12px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-tertiary, rgba(255,255,255,0.03));
}

.bulk-mapping-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}

.bulk-mapping-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
}

.bulk-row-count {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
  background: rgba(124, 58, 237, 0.12);
  padding: 2px 10px;
  border-radius: 20px;
}

.bulk-mapping-subtitle {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 0;
}

/* ── Mapping rows table ── */
.bulk-mapping-table {
  padding: 12px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 320px;
  overflow-y: auto;
}

.bulk-map-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  transition: border-color 0.15s;
}

.bulk-map-row:hover { border-color: var(--accent); }

.bulk-map-label-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.bulk-map-label {
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--text-primary);
}

.bulk-map-badge {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 1px 6px;
  border-radius: 4px;
  width: fit-content;
}

.bulk-map-badge.required {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
}

.bulk-map-badge.optional {
  background: rgba(100, 116, 139, 0.12);
  color: var(--text-muted);
}

.bulk-map-select {
  width: 100%;
  padding: 7px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 0.83rem;
  font-family: inherit;
  cursor: pointer;
  outline: none;
  transition: border-color 0.15s;
}

.bulk-map-select:focus { border-color: var(--accent); }

.bulk-map-select.unmatched {
  border-color: rgba(251, 191, 36, 0.5);
  color: #fbbf24;
}

/* ── Preview hint ── */
.bulk-preview-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0;
  padding: 8px 18px 0;
  opacity: 0.85;
}

/* ── Progress bar ── */
.bulk-progress-wrap,
.single-progress-wrap {
  padding: 8px 0 0 0;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.bulk-progress-bar,
.single-progress-bar {
  flex: 1;
  height: 5px;
  border-radius: 999px;
  background: var(--bg-tertiary, #ede9f8);
  overflow: hidden;
}

.bulk-progress-fill,
.single-progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: var(--gradient-brand, linear-gradient(135deg, #7c3aed, #a855f7));
  transition: width 0.2s ease;
}

.bulk-progress-label,
.single-progress-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
  min-width: 52px;
  text-align: right;
}

/* ── Canvas Live Loader ── */
.qr-canvas-loader {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(234, 237, 242, 0.65);
  backdrop-filter: blur(2px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  z-index: 5;
  border-radius: inherit;
  transition: opacity 0.2s ease;
}

.qr-spinner {
  width: 26px;
  height: 26px;
  border: 2.5px solid rgba(124, 58, 237, 0.2);
  border-top-color: var(--accent, #7c3aed);
  border-radius: 50%;
  animation: qrSpin 0.65s linear infinite;
}

.qr-loader-text {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
}

@keyframes qrSpin {
  to { transform: rotate(360deg); }
}

/* ── Bulk Stop Button ── */
.btn-bulk-stop {
  border-color: rgba(239, 68, 68, 0.35) !important;
  color: var(--danger, #ef4444) !important;
  background: var(--bg-card) !important;
}

.btn-bulk-stop:hover:not(:disabled) {
  background: rgba(239, 68, 68, 0.08) !important;
  border-color: var(--danger, #ef4444) !important;
}

.stop-square-icon {
  display: inline-block;
  width: 13px;
  height: 13px;
  background-color: var(--danger, #ef4444);
  border-radius: 2.5px;
  transition: transform 0.15s ease;
}

.btn-bulk-stop:hover:not(:disabled) .stop-square-icon {
  transform: scale(1.15);
}

/* ── Bulk Action Buttons ── */
.bulk-actions {
  display: flex;
  gap: 10px;
  padding: 14px 18px;
  border-top: 1px solid var(--border);
}

.btn-bulk-reset {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px !important;
  border: 1px solid var(--border) !important;
  border-radius: 8px !important;
  background: var(--bg-secondary) !important;
  color: var(--text-secondary) !important;
  font-size: 0.82rem !important;
  font-weight: 600 !important;
  font-family: inherit !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  box-shadow: var(--shadow-sm) !important;
}

.btn-bulk-reset:hover {
  border-color: var(--purple-400) !important;
  color: var(--text-primary) !important;
  background: var(--bg-primary) !important;
}

.btn-bulk-generate {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px !important;
  border: none !important;
  border-radius: 10px !important;
  background: linear-gradient(135deg, var(--purple-600), var(--lavender-300)) !important;
  color: #ffffff !important;
  font-size: 0.875rem !important;
  font-weight: 700 !important;
  font-family: inherit !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  box-shadow: 0 4px 15px rgba(124, 58, 237, 0.3) !important;
  letter-spacing: 0.2px !important;
}

.btn-bulk-generate:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 20px rgba(124, 58, 237, 0.45) !important;
  filter: brightness(1.05) !important;
}

.btn-bulk-generate:active { transform: translateY(0) !important; }

.btn-bulk-generate:disabled {
  background: var(--bg-tertiary) !important;
  color: var(--text-muted) !important;
  box-shadow: none !important;
  cursor: not-allowed !important;
  transform: none !important;
}

/* ── Mobile adjustments ── */
@media (max-width: 600px) {
.bulk-map-row { grid-template-columns: 1fr; gap: 6px; }
  .bulk-actions { flex-direction: column; }
  .btn-bulk-reset { order: 2; }
  .btn-bulk-generate { order: 1; }
}

/* Dark theme adjustments for option card selected borders */
[data-theme="dark"] .frame-option.selected,
[data-theme="dark"] .style-option.selected {
  border-width: 3px;
  padding: 9px 5px;
}

/* ==========================================================================
   Custom Bottom Sheet Color Picker Card (Mobile & Tablet)
   ========================================================================== */

/* By default, hide it on desktop */
.custom-picker-sheet {
  display: none;
}

@media (max-width: 960px) {
.custom-picker-sheet {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 99999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.28s ease;
  }
  
  .custom-picker-sheet.active {
    opacity: 1;
    pointer-events: auto;
  }

  .custom-picker-overlay {
    position: fixed;
    inset: 0;
    background: transparent;
    z-index: 100000;
  }

  .custom-picker-handle {
    width: 36px;
    height: 4px;
    background: var(--border);
    border-radius: var(--radius-full);
    margin: 0 auto 16px;
    opacity: 0.5;
  }

  .custom-picker-card {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    padding: 14px 24px 24px;
    z-index: 100001;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.3);
    border-top: 1.5px solid var(--border);
    max-width: 100%;
    box-sizing: border-box;
  }

  .custom-picker-sheet.active .custom-picker-card {
    transform: translateY(0);
  }

  .custom-picker-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
  }

  .custom-picker-title {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
  }

  .custom-picker-close-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.8rem;
    cursor: pointer;
    line-height: 1;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color var(--transition-fast);
  }

  .custom-picker-close-btn:hover {
    color: var(--text-primary);
  }

  /* Saturation/Value Canvas Container */
  .custom-picker-sv-container {
    position: relative;
    width: 100%;
    height: 150px;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 20px;
    cursor: crosshair;
    touch-action: none;
    box-shadow: inset 0 2px 8px rgba(0,0,0,0.2);
  }

  #custom-picker-sv-canvas {
    width: 100%;
    height: 100%;
    display: block;
  }

  .custom-picker-sv-marker {
    position: absolute;
    width: 20px;
    height: 20px;
    border: 3px solid #ffffff;
    border-radius: 50%;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.4);
    transform: translate(-50%, -50%);
    pointer-events: none;
    background: transparent;
  }

  /* Slider Group */
  .custom-picker-slider-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
  }

  /* Hue Slider customization */
  input[type="range"].hue-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 12px;
    border-radius: var(--radius-full);
    background: linear-gradient(to right, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%);
    outline: none;
    margin: 0;
  }

  input[type="range"].hue-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #ffffff;
    border: 3px solid var(--purple-500);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    transition: transform 0.1s ease;
  }

  input[type="range"].hue-slider::-webkit-slider-thumb:active {
    transform: scale(1.15);
  }

  /* Output Row & Inputs */
  .custom-picker-output-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 0;
  }

  .custom-picker-preview {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.15);
    box-shadow: var(--shadow-sm);
    flex-shrink: 0;
  }

  #custom-picker-hex {
    flex: 1;
    font-family: var(--font-heading), var(--font-sans);
    font-weight: 700;
    font-size: 1rem;
    height: 48px;
    padding: 8px 16px;
    box-sizing: border-box;
    border: 1.5px solid var(--purple-500);
    border-radius: 8px;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    text-transform: uppercase;
    outline: none;
    transition: border-color var(--transition-fast);
  }

  #custom-picker-hex:focus {
    border-color: var(--purple-600);
  }
}


/* Neutralize legacy tool toast classes to defer to global toast system */
.copy-toast, .qr-toast, .dt-toast, .toast-msg { display: none !important; }
