/* QR generator page — glass-admin style */
.qr-page {
  padding: 0 0 2rem;
  min-height: 60vh;
}

.qr-container {
  max-width: 1400px;
  margin: 0 auto;
}

.qr-card {
  padding: 1.5rem;
  text-align: left;
  min-height: auto;
}

.qr-card:hover {
  transform: none;
}

.qr-card-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

/* Type tabs */
.qr-type-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.qr-type-tab {
  padding: 0.5rem 0.75rem;
  font-size: 0.85rem;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  color: var(--text-secondary);
  border-radius: 8px;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-family: inherit;
}

.qr-type-tab:hover {
  border-color: var(--emerald-light);
  color: var(--emerald-light);
  background: var(--glass-hover);
}

.qr-type-tab.active {
  background: rgba(52, 211, 153, 0.15);
  border-color: var(--emerald-light);
  color: var(--emerald-light);
  box-shadow: 0 0 12px rgba(52, 211, 153, 0.2);
}

/* Form fields */
.qr-form-fields .form-label {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 13px;
  margin-bottom: 0.35rem;
}

.qr-page .form-select.form-control-dark,
.qr-page select.form-control-dark,
.qr-form-fields .form-select.form-control-dark {
  background-color: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  border-radius: 10px;
  padding: 0.6rem 2rem 0.6rem 0.75rem;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%2334d399' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.6rem center;
  background-size: 1rem;
}

.qr-page .form-select.form-control-dark:hover,
.qr-page select.form-control-dark:hover,
.qr-form-fields .form-select.form-control-dark:hover {
  border-color: var(--emerald-light);
  box-shadow: 0 0 16px rgba(52, 211, 153, 0.15);
}

.qr-page .form-select.form-control-dark:focus,
.qr-page select.form-control-dark:focus {
  border-color: var(--emerald-light);
  box-shadow: 0 0 0 2px rgba(52, 211, 153, 0.15), 0 0 16px rgba(52, 211, 153, 0.1);
  outline: none;
}

.qr-form-fields .form-control-dark {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  border-radius: 10px;
  padding: 0.6rem 0.75rem;
  font-family: inherit;
}

.qr-form-fields .form-control-dark:focus,
.qr-form-fields .form-select.form-control-dark:focus {
  border-color: var(--emerald-light);
  box-shadow: 0 0 0 2px rgba(52, 211, 153, 0.15), 0 0 16px rgba(52, 211, 153, 0.1);
  outline: none;
}

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

.qr-form-fields .form-check-input {
  accent-color: var(--emerald);
}

.qr-form-fields .form-check-label {
  color: var(--text-secondary);
}

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

/* Size value display */
.qr-size-value {
  min-width: 2.5rem;
  font-weight: 600;
  font-family: 'Space Mono', monospace;
  color: var(--emerald-light);
}

/* Color pickers */
.qr-color-picker {
  width: 36px;
  height: 36px;
  padding: 2px;
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  background: var(--glass-bg);
  cursor: pointer;
}

.qr-preset-btn {
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid var(--glass-border);
  border-radius: 6px;
  background: transparent;
  color: inherit;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  transition: border-color var(--transition-fast);
}

.qr-preset-btn:hover {
  border-color: var(--emerald-light);
}

/* Range input */
.form-range.form-range-dark {
  accent-color: var(--emerald);
}

/* Preview — sticky */
.qr-preview-col {
  align-self: flex-start;
  position: sticky;
  top: 105px;
}

.qr-preview-sticky {
  position: sticky;
  top: 1rem;
}

.qr-preview-wrap {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.qr-preview-bg {
  padding: 1rem;
  border-radius: var(--border-radius);
  background: rgba(15, 25, 20, 0.85);
  border: 1px solid var(--glass-border);
  box-shadow: 0 8px 32px rgba(5, 150, 105, 0.15);
  max-width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qr-preview-bg.qr-preview-transparent {
  background: repeating-conic-gradient(rgba(15, 25, 20, 0.85) 0% 25%, rgba(30, 50, 40, 0.85) 0% 50%) 50% / 20px 20px;
}

.qr-preview-bg canvas {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Action buttons — glass style */
.qr-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

.qr-actions .btn {
  border-radius: 12px;
  font-family: inherit;
  font-weight: 500;
  font-size: 14px;
  padding: 10px 20px;
  transition: all var(--transition-fast);
}

.qr-actions .btn-neon {
  background: linear-gradient(135deg, var(--emerald), var(--emerald-light));
  color: #fff;
  border: none;
  box-shadow: 0 4px 16px rgba(5, 150, 105, 0.3);
}

.qr-actions .btn-neon:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(5, 150, 105, 0.4);
}

.qr-actions .btn-outline-neon {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
}

.qr-actions .btn-outline-neon:hover {
  background: var(--glass-hover);
  border-color: var(--emerald-light);
}

/* History */
.qr-history-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  min-height: 60px;
}

.qr-history-item {
  width: 80px;
  height: 80px;
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: all var(--transition-fast);
  background: var(--glass-bg);
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qr-history-item:hover {
  border-color: var(--emerald-light);
  box-shadow: 0 4px 16px rgba(52, 211, 153, 0.2);
}

.qr-history-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Style preset buttons */
.qr-card .btn-outline-neon {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
  border-radius: 8px;
  font-family: inherit;
}

.qr-card .btn-outline-neon:hover {
  background: var(--glass-hover);
  border-color: var(--emerald-light);
  color: var(--text-primary);
}

/* Responsive */
@media (max-width: 991px) {
  .qr-preview-bg {
    min-width: 320px;
    min-height: 320px;
  }

  .qr-preview-bg canvas {
    max-width: 280px;
    max-height: 280px;
  }

  .qr-preview-col {
    position: static;
    display: flex;
    flex-direction: column;
    align-items: center;
  }
}

@media (max-width: 576px) {
  .qr-page {
    padding: 0 0 1rem;
  }

  .qr-type-tabs {
    gap: 0.35rem;
  }

  .qr-type-tab {
    padding: 0.4rem 0.5rem;
    font-size: 0.75rem;
  }

  .qr-preview-bg {
    min-width: 280px;
    min-height: 280px;
    padding: 0.75rem;
  }

  .qr-actions {
    flex-direction: column;
  }

  .qr-actions .btn {
    width: 100%;
  }
}
