.qr-tool {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Main Two-Column Layout */
.qr-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 1.5rem;
}

@media (max-width: 860px) {
  .qr-layout {
    grid-template-columns: 1fr;
  }
}

/* Left Form Box */
.qr-config-box {
  background: #141720;
  border: 1px solid #2A2D3A;
  border-radius: 12px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.type-nav {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  padding-bottom: 0.25rem;
}

.type-tab {
  background: #1A1D27;
  border: 1px solid #2A2D3A;
  color: #6B7280;
  padding: 0.45rem 0.85rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.type-tab.active {
  background: #4F8EF7;
  border-color: #4F8EF7;
  color: #FFFFFF;
}

.type-tab:hover:not(.active) {
  border-color: #4F8EF7;
  color: #F0F2F8;
}

/* Dynamic Payload Forms */
.payload-fields {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.field-label {
  font-size: 0.8rem;
  font-weight: 500;
  color: #F0F2F8;
}

.field-input {
  background: #0F1117;
  border: 1px solid #2A2D3A;
  color: #F0F2F8;
  font-size: 0.875rem;
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  transition: border-color 0.15s;
}

.field-input:focus {
  outline: none;
  border-color: #4F8EF7;
}

.field-select {
  background: #0F1117;
  border: 1px solid #2A2D3A;
  color: #F0F2F8;
  font-size: 0.875rem;
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  cursor: pointer;
}

.field-select:focus {
  outline: none;
  border-color: #4F8EF7;
}

/* Customization Options Accordion / Grid */
.customize-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  border-top: 1px solid #2A2D3A;
  padding-top: 1rem;
}

@media (max-width: 500px) {
  .customize-grid {
    grid-template-columns: 1fr;
  }
}

.color-picker-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.native-color-btn {
  width: 34px;
  height: 34px;
  border-radius: 6px;
  border: 1px solid #2A2D3A;
  cursor: pointer;
  padding: 0;
  background: transparent;
}

.color-hex-val {
  width: 85px;
  background: #0F1117;
  border: 1px solid #2A2D3A;
  color: #F0F2F8;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  padding: 0.4rem 0.5rem;
  border-radius: 6px;
}

/* Right: Preview & Download Card */
.qr-preview-box {
  background: #141720;
  border: 1px solid #2A2D3A;
  border-radius: 12px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  height: fit-content;
}

.qr-canvas-wrap {
  width: 240px;
  height: 240px;
  background: #FFFFFF;
  border-radius: 12px;
  padding: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}

#qr-canvas {
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
}

.download-stack {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.btn-primary {
  width: 100%;
  background: #4F8EF7;
  color: #FFFFFF;
  border: none;
  border-radius: 8px;
  padding: 0.65rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  transition: opacity 0.2s;
}

.btn-primary:hover {
  opacity: 0.9;
}

.btn-secondary {
  width: 100%;
  background: #1A1D27;
  color: #F0F2F8;
  border: 1px solid #2A2D3A;
  border-radius: 8px;
  padding: 0.6rem 1rem;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  transition: all 0.2s;
}

.btn-secondary:hover {
  border-color: #4F8EF7;
  color: #4F8EF7;
}
