/* ─── BASE ─── */
.db-body {
  background: #F7F4EE;
  min-height: 100vh;
  font-family: 'Poppins', system-ui, sans-serif;
}

/* ─── NAV SUPERIOR ─── */
.db-nav {
  background: #fff;
  border-bottom: 0.5px solid #E6E0D2;
  position: sticky;
  top: 0;
  z-index: 100;
}
.db-nav-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.db-brand-link {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}
.db-brand-icon {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #EAF0E7;
  border: 0.5px solid #C8D8C6;
  display: flex;
  align-items: center;
  justify-content: center;
}
.db-brand-name {
  font-size: 15px;
  font-weight: 500;
  color: #1a1a1a;
  letter-spacing: -0.2px;
}
.db-nav-links {
  display: flex;
  gap: 4px;
}
.db-nav-link {
  font-size: 13px;
  color: #666;
  padding: 6px 12px;
  border-radius: 8px;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: background 0.15s, color 0.15s;
}
.db-nav-link:hover {
  background: #F7F4EE;
  color: #1a1a1a;
}
.db-nav-link.active {
  background: #EAF0E7;
  color: #1F2A23;
}
.db-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1F2A23, #C9A94B);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 500;
  color: #fff;
  cursor: pointer;
}

/* ─── CONTENIDO ─── */
.db-main {
  padding-bottom: 2rem;
}
.db-content {
  max-width: 960px;
  margin: 0 auto;
  padding: 2rem 1.5rem 5rem;
}

/* ─── SALUDO ─── */
.db-greeting {
  margin-bottom: 2rem;
}
.db-greeting h1 {
  font-size: 22px;
  font-weight: 500;
  color: #1a1a1a;
  margin: 0 0 4px;
}
.db-greeting p {
  font-size: 14px;
  color: #888;
  margin: 0;
}

/* ─── STATS ─── */
.db-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 2rem;
}
.db-stat {
  background: #fff;
  border: 0.5px solid #E6E0D2;
  border-radius: 12px;
  padding: 1rem 1.25rem;
}
.db-stat-label {
  font-size: 12px;
  color: #888;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.db-stat-value {
  font-size: 24px;
  font-weight: 500;
  color: #1a1a1a;
}
.db-stat-sub {
  font-size: 12px;
  color: #bbb;
  margin-top: 2px;
}

/* ─── SECCIÓN ─── */
.db-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.db-section-title {
  font-size: 12px;
  font-weight: 500;
  color: #aaa;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0;
}
.db-section-action {
  font-size: 13px;
  color: #1F2A23;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 8px;
  border: 0.5px solid #C8D8C6;
  background: #EAF0E7;
  transition: background 0.15s;
}
.db-section-action:hover {
  background: #F3E9D2;
}

/* ─── EVENTOS ─── */
.db-events {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 2rem;
}
.db-event-card {
  background: #fff;
  border: 0.5px solid #E6E0D2;
  border-radius: 12px;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
  transition: border-color 0.15s;
}
.db-event-card:hover {
  border-color: #C9A94B;
}
.db-event-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.db-event-dot.active  { background: #1D9E75; }
.db-event-dot.draft   { background: #EF9F27; }
.db-event-dot.closed  { background: #ccc; }
.db-event-info {
  flex: 1;
  min-width: 0;
}
.db-event-name {
  font-size: 14px;
  font-weight: 500;
  color: #1a1a1a;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.db-event-meta {
  font-size: 12px;
  color: #aaa;
  display: flex;
  gap: 10px;
}
.db-event-badge {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 99px;
  flex-shrink: 0;
}
.db-event-badge.active { background: #E1F5EE; color: #0F6E56; }
.db-event-badge.draft  { background: #FAEEDA; color: #854F0B; }
.db-event-badge.closed { background: #F0EFEE; color: #888; }
.db-event-arrow {
  color: #ccc;
  flex-shrink: 0;
}

/* ─── VACÍO ─── */
.db-empty {
  background: #fff;
  border: 0.5px dashed #C8D8C6;
  border-radius: 12px;
  padding: 2.5rem;
  text-align: center;
  color: #aaa;
  margin-bottom: 2rem;
}
.db-empty svg {
  margin: 0 auto 1rem;
  opacity: 0.4;
  display: block;
}
.db-empty p {
  font-size: 14px;
  margin: 0 0 12px;
}
.db-empty-link {
  font-size: 13px;
  color: #1F2A23;
  text-decoration: none;
  border: 0.5px solid #C8D8C6;
  background: #EAF0E7;
  padding: 6px 16px;
  border-radius: 8px;
}

/* ─── PLAN ─── */
.db-plan-card {
  background: #fff;
  border: 0.5px solid #E6E0D2;
  border-radius: 12px;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.db-plan-name {
  font-size: 14px;
  font-weight: 500;
  color: #1a1a1a;
  margin: 0 0 2px;
}
.db-plan-desc {
  font-size: 12px;
  color: #aaa;
  margin: 0;
}
.db-plan-btn {
  font-size: 13px;
  color: #1F2A23;
  border: 0.5px solid #C8D8C6;
  background: #EAF0E7;
  padding: 6px 14px;
  border-radius: 8px;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s;
}
.db-plan-btn:hover {
  background: #F3E9D2;
}

/* ─── BARRA INFERIOR MÓVIL ─── */
.db-bottomnav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #fff;
  border-top: 0.5px solid #E6E0D2;
  padding: 8px 0 env(safe-area-inset-bottom, 12px);
  z-index: 100;
  padding-bottom: env(safe-area-inset-bottom);
}
.db-bottomnav-items {
  display: flex;
  justify-content: space-around;
}
.db-bottomnav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 4px 16px;
  color: #aaa;
  font-size: 11px;
  text-decoration: none;
  transition: color 0.15s;
}
.db-bottomnav-item.active {
  color: #1F2A23;
}
.db-bottomnav-item svg {
  display: block;
}

/* ─── RESPONSIVE ─── */
@media (max-width: 640px) {
  .db-nav-links { display: none; }
  .db-bottomnav { display: block; }
  .db-stats { grid-template-columns: repeat(2, 1fr); }
  .db-content { padding: 1.25rem 1rem 6rem; }
  .db-stat:last-child { grid-column: span 2; }
}

/* ─── PÁGINAS INTERIORES ─── */
.db-page-title {
  font-size: 20px;
  font-weight: 500;
  color: #1a1a1a;
  margin: 0 0 2px;
}
.db-page-subtitle {
  font-size: 13px;
  color: #aaa;
  margin: 0;
}

/* ─── BOTONES ─── */
.db-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #1F2A23;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s;
}
.db-btn-primary:hover { background: #16201A; }
.db-btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  color: #444;
  border: 0.5px solid #E6E0D2;
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 13px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s;
}
.db-btn-ghost:hover { background: #F7F4EE; }
.db-btn-danger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  color: #A32D2D;
  border: 0.5px solid #F0C0C0;
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 13px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s;
}
.db-btn-danger:hover { background: #FFF0F0; }
.db-btn-disabled {
  font-size: 13px;
  color: #bbb;
  padding: 8px 14px;
  border: 0.5px dashed #ddd;
  border-radius: 8px;
}

/* ─── FORMULARIO ─── */
.db-form-card {
  background: #fff;
  border: 0.5px solid #E6E0D2;
  border-radius: 12px;
  padding: 1.5rem;
}
.db-form-group {
  margin-bottom: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.db-form-group label {
  font-size: 13px;
  font-weight: 500;
  color: #444;
}
.db-input {
  border: 0.5px solid #DDD8DA;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 14px;
  color: #1a1a1a;
  background: #fff;
  width: 100%;
  outline: none;
  transition: border-color 0.15s;
}
.db-input:focus { border-color: #1F2A23; }
.db-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.db-form-hint {
  font-size: 12px;
  color: #bbb;
}
.db-form-actions {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 0.5px solid #E6E0D2;
}
.db-form-errors {
  background: #FFF0F0;
  border: 0.5px solid #F0C0C0;
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 1.25rem;
  font-size: 13px;
  color: #A32D2D;
}

/* ─── SHOW GRID ─── */
.db-show-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1.5rem;
}
.db-card {
  background: #fff;
  border: 0.5px solid #E6E0D2;
  border-radius: 12px;
  padding: 1.25rem;
}
.db-card-title {
  font-size: 12px;
  font-weight: 500;
  color: #aaa;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0 0 1rem;
}

/* ─── QR ─── */
.db-qr-preview {
  display: flex;
  justify-content: center;
  margin-bottom: 1rem;
}
.db-qr-img {
  width: auto;
  height: 180px;
  border-radius: 8px;
  border: 0.5px solid #E6E0D2;
}
.db-qr-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 1rem;
}
.db-qr-url {
  text-align: center;
}
.db-qr-link {
  font-size: 11px;
  color: #1F2A23;
  word-break: break-all;
  display: block;
  margin-top: 4px;
}

/* ─── STAT LIST ─── */
.db-stat-list { display: flex; flex-direction: column; gap: 12px; }
.db-stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  padding-bottom: 12px;
  border-bottom: 0.5px solid #F5F2F3;
}
.db-stat-row:last-child { border-bottom: none; padding-bottom: 0; }
.db-stat-row-label { color: #888; }
.db-stat-row-value { font-weight: 500; color: #1a1a1a; }

/* ─── FOTO GRID ─── */
.db-photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 8px;
}
.db-photo-thumb {
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  background: #F5F2F3;
}
.db-photo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ─── RESPONSIVE INTERIOR ─── */
@media (max-width: 640px) {
  .db-show-grid { grid-template-columns: 1fr; }
  .db-form-row { grid-template-columns: 1fr; }
}

/* ─── AVATAR DROPDOWN ─── */
.db-avatar-wrapper {
  position: relative;
  cursor: pointer;
}
.db-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: #fff;
  border: 0.5px solid #E6E0D2;
  border-radius: 12px;
  min-width: 200px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  z-index: 200;
  overflow: hidden;
}
.db-dropdown.open { display: block; }
.db-dropdown-header { padding: 12px 14px; }
.db-dropdown-name {
  font-size: 13px;
  font-weight: 500;
  color: #1a1a1a;
  margin: 0 0 2px;
}
.db-dropdown-email {
  font-size: 12px;
  color: #aaa;
  margin: 0;
}
.db-dropdown-divider {
  height: 0.5px;
  background: #E6E0D2;
}
.db-dropdown-item {
  display: block;
  width: 100%;
  padding: 10px 14px;
  font-size: 13px;
  color: #1a1a1a;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s;
}
.db-dropdown-item:hover { background: #F7F4EE; }
.db-dropdown-logout { color: #1F2A23; }

/* ─── FOTOS ─── */
.db-filter-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}
.db-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #444;
  background: #fff;
  border: 0.5px solid #E6E0D2;
  border-radius: 99px;
  padding: 4px 12px;
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s;
}
.db-filter-chip:hover {
  border-color: #C8D8C6;
  background: #EAF0E7;
  color: #1F2A23;
}
.db-filter-count {
  font-size: 11px;
  background: #F0EFEE;
  color: #888;
  padding: 1px 6px;
  border-radius: 99px;
}
.db-photos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}
.db-photo-card {
  background: #fff;
  border: 0.5px solid #E6E0D2;
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.15s;
}
.db-photo-card:hover { border-color: #C9A94B; }
.db-photo-wrap {
  position: relative;
  aspect-ratio: 1;
  cursor: pointer;
  overflow: hidden;
  background: #F5F2F3;
}
.db-photo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.2s;
}
.db-photo-card:hover .db-photo-img { transform: scale(1.03); }
.db-photo-overlay {
  position: absolute;
  inset: 0;
  background: rgba(31, 42, 35, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s;
}
.db-photo-card:hover .db-photo-overlay { opacity: 1; }
.db-photo-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
}
.db-photo-date {
  font-size: 11px;
  color: #aaa;
}
.db-photo-actions {
  display: flex;
  gap: 4px;
  align-items: center;
}
.db-photo-action {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: none;
  border: none;
  color: #888;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.db-photo-action:hover { background: #F5F2F3; color: #1a1a1a; }
.db-photo-action--danger:hover { background: #FFF0F0; color: #A32D2D; }

/* ─── LIGHTBOX ─── */
.db-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.db-lightbox-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(255,255,255,0.1);
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s;
}
.db-lightbox-close:hover { background: rgba(255,255,255,0.2); }
.db-lightbox-img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 8px;
}

@media (max-width: 640px) {

  .items-start {
    flex-direction: column;

    .event-actions {
      width: 100%;
      justify-content: end;
    }
  }

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

  .db-section-header {
    flex-direction: column;
    align-items: start;
    gap: 8px;
  }
}

/* ─── QR BUILDER ─── */

.qr-builder-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: start;
  margin-top: 1.5rem;
}

.qr-builder-form {
  display: flex;
  flex-direction: column;
}

/* Swatch de estilos */
.qr-style-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.qr-style-grid--wide {
  grid-template-columns: repeat(5, 1fr);
}

.qr-style-option {
  cursor: pointer;
}

.qr-style-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.qr-style-swatch {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 58px;
  border-radius: 10px;
  border: 2px solid transparent;
  transition: border-color 0.15s, transform 0.12s, box-shadow 0.15s;
  gap: 3px;
  cursor: pointer;
  user-select: none;
}

.qr-style-swatch:hover {
  transform: scale(1.03);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.qr-style-check {
  display: none;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
}

.qr-style-name {
  font-size: 11px;
  font-weight: 600;
  text-align: center;
  line-height: 1.2;
}

.qr-style-option input:checked + .qr-style-swatch {
  border-color: rgba(0,0,0,0.3);
  transform: scale(1.05);
  box-shadow: 0 3px 10px rgba(0,0,0,0.15);
}

.qr-style-option input:checked + .qr-style-swatch .qr-style-check {
  display: block;
}

/* Modal de vista ampliada */
.qr-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10, 6, 8, 0.72);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 24px;
  backdrop-filter: blur(4px);
}
.qr-modal-overlay.is-open {
  display: flex;
}
.qr-modal-box {
  position: relative;
  background: #fff;
  border-radius: 16px;
  padding: 20px;
  max-width: min(92vw, 1100px);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.35);
  animation: qr-modal-in 0.18s ease;
}
@keyframes qr-modal-in {
  from { opacity: 0; transform: scale(0.96) translateY(8px); }
  to   { opacity: 1; transform: scale(1)    translateY(0);   }
}
.qr-modal-img {
  width: 100%;
  height: auto;
  max-height: calc(90vh - 100px);
  object-fit: contain;
  border-radius: 8px;
  display: block;
}
.qr-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: #f0eaed;
  color: #666;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}
.qr-modal-close:hover { background: #e2d8dc; color: #333; }
.qr-modal-actions {
  display: flex;
  justify-content: center;
}

/* Botón "Ver en grande" sobre el preview */
.qr-zoom-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  display: none;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 500;
  color: #666;
  background: rgba(255,255,255,0.88);
  border: 1px solid #ddd;
  border-radius: 20px;
  cursor: pointer;
  backdrop-filter: blur(4px);
  transition: background 0.15s, color 0.15s;
  z-index: 2;
}
.qr-zoom-btn:hover { background: #fff; color: #1F2A23; border-color: #c8a0b4; }

/* Selector de plantilla */
.qr-template-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.qr-template-option { cursor: pointer; }
.qr-template-option input[type="radio"] { position: absolute; opacity: 0; pointer-events: none; }
.qr-template-swatch {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 10px;
  border-radius: 10px;
  border: 1.5px solid #E6E0D2;
  background: #fafafa;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.1s;
  min-height: 80px;
  color: #aaa;
  height: 100%;
}
.qr-template-swatch:hover { background: #f5f1f3; border-color: #d4c0c8; }
.qr-template-label { font-size: 11px; color: #999; font-weight: 500; text-align: center; }
.qr-template-option input:checked + .qr-template-swatch {
  border-color: #1F2A23;
  background: #fdf5f8;
  transform: scale(1.02);
  color: #1F2A23;
}
.qr-template-option input:checked + .qr-template-swatch .qr-template-label { color: #1F2A23; }

/* Selector de decoración */
.qr-dec-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 4px;
}

.qr-dec-option {
  cursor: pointer;
}

.qr-dec-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.qr-dec-swatch {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 10px 6px;
  border-radius: 10px;
  border: 1.5px solid #E6E0D2;
  background: #fafafa;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.1s;
  min-height: 68px;
}

.qr-dec-swatch:hover {
  background: #f5f1f3;
  border-color: #d4c0c8;
}

.qr-dec-label {
  font-size: 10px;
  color: #999;
  font-weight: 500;
  text-align: center;
}

.qr-dec-option input:checked + .qr-dec-swatch {
  border-color: #1F2A23;
  background: #fdf5f8;
  transform: scale(1.03);
}

.qr-dec-option input:checked + .qr-dec-swatch .qr-dec-label {
  color: #1F2A23;
}

/* Selector de fuentes */
.qr-font-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.qr-font-option {
  cursor: pointer;
}

.qr-font-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.qr-font-swatch {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 12px 8px;
  border-radius: 10px;
  border: 1.5px solid #E6E0D2;
  background: #fafafa;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.1s;
}

.qr-font-swatch:hover {
  background: #f5f1f3;
  border-color: #d4c0c8;
}

.qr-font-muestra {
  font-size: 20px;
  color: #333;
  line-height: 1.2;
}

.qr-font-nombre {
  font-size: 10px;
  color: #999;
  font-weight: 500;
  text-align: center;
  line-height: 1.3;
}

.qr-font-option input:checked + .qr-font-swatch {
  border-color: #1F2A23;
  background: #fdf5f8;
  transform: scale(1.03);
}

.qr-font-option input:checked + .qr-font-swatch .qr-font-muestra {
  color: #1F2A23;
}

/* Toggles */
.qr-toggles-divider {
  border-top: 0.5px solid #E6E0D2;
  margin: 1rem 0 0.75rem;
}

.qr-toggle-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 13px;
  color: #444;
  font-weight: 500;
  user-select: none;
}

.qr-toggle-label input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.qr-toggle-track {
  width: 36px;
  height: 20px;
  background: #ddd;
  border-radius: 10px;
  position: relative;
  flex-shrink: 0;
  transition: background 0.2s;
}

.qr-toggle-track::after {
  content: '';
  position: absolute;
  width: 14px;
  height: 14px;
  background: #fff;
  border-radius: 50%;
  top: 3px;
  left: 3px;
  transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.qr-toggle-label input:checked + .qr-toggle-track {
  background: #1F2A23;
}

.qr-toggle-label input:checked + .qr-toggle-track::after {
  transform: translateX(16px);
}

/* File input */
.qr-file-input {
  padding: 6px 10px;
  cursor: pointer;
}

/* Panel de preview */
.qr-builder-preview {
  position: sticky;
  top: 1rem;
}

.qr-preview-panel {
  background: #f9f7f8;
  border: 0.5px solid #E6E0D2;
  border-radius: 16px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 280px;
}

.qr-preview-label {
  font-size: 12px;
  font-weight: 500;
  color: #aaa;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 1rem;
  align-self: flex-start;
}

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

.qr-preview-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  color: #ccc;
  font-size: 13px;
  padding: 2rem 0;
}

.qr-preview-img {
  width: 100%;
  max-width: 360px;
  border-radius: 12px;
  transition: opacity 0.2s;
}

.qr-preview-spinner {
  display: none;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(255,255,255,0.92);
  border-radius: 8px;
  padding: 10px 16px;
  font-size: 12px;
  color: #888;
  gap: 6px;
  align-items: center;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

@keyframes qr-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.qr-spin {
  animation: qr-spin 1s linear infinite;
}

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

  .qr-builder-preview {
    position: static;
    order: -1;
  }
}
/* ── Font Picker ──────────────────────────────────────────── */
.fp-wrap {
  position: relative;
  margin-top: 6px;
}

.fp-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 8px 12px;
  border: 1.5px solid #e2ddd8;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.fp-trigger:hover {
  border-color: #C9A94B;
  box-shadow: 0 0 0 3px rgba(201,168,76,0.1);
}

.fp-preview {
  font-size: 15px;
  color: #2d2d2d;
  line-height: 1;
}

.fp-chevron {
  opacity: 0.45;
  flex-shrink: 0;
  transition: transform 0.15s;
}

.fp-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1.5px solid #e2ddd8;
  border-radius: 10px;
  box-shadow: 0 8px 28px rgba(0,0,0,0.13);
  z-index: 200;
  overflow: hidden;
}

.fp-dropdown.fp-open {
  display: block;
}

.fp-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 10px 14px;
  border: none;
  background: none;
  cursor: pointer;
  text-align: left;
  transition: background 0.1s;
  border-bottom: 1px solid #f0ece6;
}

.fp-option:last-child {
  border-bottom: none;
}

.fp-option:hover {
  background: #fdf8f0;
}

.fp-option--active {
  background: #fef9ee;
}

.fp-option--active::after {
  content: "✓";
  color: #C9A94B;
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
}

.fp-option-name {
  font-size: 15px;
  color: #2d2d2d;
  flex: 1;
}

.fp-option-sample {
  font-size: 13px;
  color: #aaa;
}

/* ── Premium lock ─────────────────────────────────────────── */
.plan-lock-wrap {
  position: relative;
}

.plan-lock-overlay {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: rgba(250,246,241,0.72);
  backdrop-filter: blur(1.5px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  z-index: 10;
  cursor: default;
  border-radius: 10px;
}

.plan-lock-icon {
  width: 20px;
  height: 20px;
  color: #C9A94B;
}

.plan-lock-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #C9A94B;
  text-transform: uppercase;
}

.plan-lock-wrap .qr-template-swatch,
.plan-lock-wrap .qr-dec-swatch {
  opacity: 0.45;
}

.plan-upgrade-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 10px 14px;
  background: #fef9ee;
  border: 1px solid #f0e0a0;
  border-radius: 8px;
  font-size: 13px;
  color: #7a5c14;
}

.plan-upgrade-hint svg {
  flex-shrink: 0;
  color: #C9A94B;
}

.plan-upgrade-hint strong {
  font-weight: 700;
}

.qr-save-locked {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.qr-save-locked .db-btn-primary {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}
