.qr-tool-shell {
  max-width: 1080px;
}

.qr-tool-pagehead {
  margin-bottom: 1.25rem;
}

.qr-tool-card {
  overflow: hidden;
}

.qr-content {
  min-height: 180px;
  resize: vertical;
}

.qr-logo-row {
  align-items: center;
}

.qr-action-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.28fr) minmax(0, .72fr);
  gap: .75rem;
}

.qr-logo-picker {
  width: 74px;
  height: 74px;
  border: 1px dashed rgba(108, 117, 125, 0.45);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.55);
  color: var(--bs-secondary-color);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.qr-logo-picker:hover {
  border-color: rgba(var(--bs-primary-rgb), 0.65);
  color: var(--bs-primary);
  transform: translateY(-1px);
}

.qr-logo-picker img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.qr-preview {
  position: relative;
  width: min(100%, 320px);
  aspect-ratio: 1;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  border: 1px solid rgba(108, 117, 125, 0.16);
}

.qr-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  cursor: pointer;
}

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

.qr-empty-preview {
  max-width: 12rem;
  color: var(--bs-secondary-color);
  font-size: .9rem;
  line-height: 1.6;
  text-align: center;
}

.qr-client-preview canvas,
.qr-client-preview img,
.qr-preview > img#qrImage {
  display: block;
  object-fit: contain;
}

.qr-client-preview canvas,
.qr-client-preview img {
  width: min(100%, 320px);
  height: auto;
  max-height: 100%;
}

.qr-logo-overlay {
  position: absolute;
  width: 20%;
  height: 20%;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  border-radius: 0.75rem;
  background: #fff;
  padding: 4px;
  object-fit: cover;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

.qr-result-modal {
  position: fixed;
  inset: 0;
  z-index: 1080;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(15, 23, 42, 0.56);
}

.qr-result-dialog {
  width: min(100%, 420px);
  border-radius: 1rem;
  background: var(--bs-body-bg);
  color: var(--bs-body-color);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.28);
  padding: 18px;
}

.qr-result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.qr-result-header h2 {
  font-size: 1.1rem;
  line-height: 1.3;
  margin: 0;
}

.qr-result-close {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 0.8rem;
  background: var(--bs-tertiary-bg);
  color: var(--bs-body-color);
  font-size: 1.45rem;
  line-height: 1;
}

.qr-result-image-button {
  width: 100%;
  aspect-ratio: 1;
  border: 1px solid rgba(108, 117, 125, 0.2);
  border-radius: 1rem;
  background: #fff;
  padding: 16px;
}

.qr-result-image-button img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.qr-result-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}

@media (max-width: 575.98px) {
  .qr-preview {
    width: min(100%, 272px);
  }

  .qr-logo-row {
    align-items: flex-start;
  }

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

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

  .qr-action-grid {
    grid-template-columns: 1.35fr 1fr;
  }
}

.qr-tool-shell .btn-check:checked + .btn-outline-primary,
.qr-tool-shell .btn-check:active + .btn-outline-primary,
.qr-tool-shell .btn-outline-primary.active,
.qr-tool-shell .btn-outline-primary:active {
  color: #fff !important;
  background: var(--holxn-brand) !important;
  border-color: var(--holxn-brand) !important;
  box-shadow: none !important;
}

.qr-tool-shell .btn-check:focus-visible + .btn-outline-primary {
  box-shadow: var(--holxn-focus) !important;
}

/* Keep the QR tool neutral: green is reserved for primary actions. */
.qr-tool-shell .business-admin-panel,
.qr-tool-shell .qr-tool-card {
  color: var(--holxn-text);
  background: var(--holxn-surface) !important;
  background-image: none !important;
  border-color: var(--holxn-border) !important;
  border-radius: var(--holxn-radius) !important;
  box-shadow: var(--holxn-shadow-sm) !important;
}

.qr-tool-shell .qr-logo-picker,
.qr-tool-shell .qr-preview {
  color: var(--holxn-muted);
  background: var(--holxn-surface-muted) !important;
  border-color: var(--holxn-border) !important;
  border-radius: var(--holxn-radius-sm) !important;
}

.qr-tool-shell .business-admin-label,
.qr-tool-shell .text-body-secondary,
.qr-tool-shell .text-secondary {
  color: var(--holxn-muted) !important;
}

.qr-result-dialog {
  border: 1px solid var(--holxn-border) !important;
  border-radius: var(--holxn-radius) !important;
  background: var(--holxn-surface) !important;
  color: var(--holxn-text);
  box-shadow: var(--holxn-shadow-md) !important;
}

.qr-result-close {
  border-radius: var(--holxn-radius-sm);
  background: var(--holxn-surface-muted);
  color: var(--holxn-text);
}

.qr-result-image-button {
  border-color: var(--holxn-border);
  border-radius: var(--holxn-radius-sm);
  background: #fff;
}

.qr-result-modal {
  background: rgba(15, 23, 42, .48);
  backdrop-filter: blur(8px);
}

