.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-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-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%;
  }
}

html[data-bs-theme="dark"] .qr-logo-picker {
  background: rgba(255, 255, 255, 0.04);
}

html[data-bs-theme="dark"] .qr-preview {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(130, 146, 166, 0.18);
}

/* Modern UI coordination pass */
.qr-tool-card,
.qr-logo-picker,
.qr-preview,
.qr-result-dialog,
.qr-result-image-button,
.qr-result-close {
  border-radius: var(--holxn-radius, 8px);
}

.qr-tool-card,
.qr-preview,
.qr-result-dialog,
.qr-result-image-button {
  border: 1px solid var(--holxn-border-soft, rgba(108, 117, 125, 0.18));
  background: var(--holxn-surface, rgba(255, 255, 255, 0.82));
  box-shadow: var(--holxn-shadow-sm, 0 0.35rem 1rem rgba(15, 23, 42, 0.055));
}

.qr-logo-picker {
  background: var(--holxn-surface-muted, rgba(248, 250, 252, 0.88));
}

.qr-result-modal {
  backdrop-filter: blur(8px);
}

