/* ─── 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: #1a2e1f;
  color: #fff;
  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: #C9A94B; }
.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;
}

.db-hero-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px;
  margin-bottom: 8px;
  background: #F7F4EE;
  border: 0.5px solid #E6E0D2;
  border-radius: 10px;
}
.db-hero-preview-thumb {
  width: 96px;
  height: 54px;
  object-fit: cover;
  border-radius: 6px;
  background: #fff;
  border: 0.5px solid #E6E0D2;
  flex-shrink: 0;
}
.db-hero-preview-remove {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: #A32D2D;
  white-space: nowrap;
  cursor: pointer;
}

.hero-crop {
  margin-top: 10px;
}

.hero-crop-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 10px;
  background: #EFEBE0;
  border: 0.5px solid #E6E0D2;
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.hero-crop-frame:active {
  cursor: grabbing;
}

.hero-crop-frame img {
  position: absolute;
  max-width: none;
  pointer-events: none;
  user-select: none;
}

.hero-crop-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  color: #aaa;
}

.hero-crop-zoom {
  flex: 1;
  accent-color: #1F2A23;
}

/* ─── 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: 20px;
  right: 25px;
  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;
}

/* Logo ya guardado */
.qr-saved-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  margin-bottom: 0.75rem;
  background: #F7F4EE;
  border: 0.5px solid #E6E0D2;
  border-radius: 10px;
}

.qr-saved-logo-thumb {
  width: 36px;
  height: 36px;
  object-fit: contain;
  border-radius: 6px;
  background: #fff;
  border: 0.5px solid #E6E0D2;
  flex-shrink: 0;
}

.qr-saved-logo .db-form-hint {
  flex: 1;
  margin: 0;
}

.qr-saved-logo-remove {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: #A32D2D;
  white-space: nowrap;
  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;
}

/* ─── SUBIDA DE FOTOS (invitados) ─── */
.db-upload-shell {
  max-width: 600px;
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.db-upload-shell .db-form-card {
  padding: 2.5rem 2rem;
  border-radius: 20px;
  box-shadow: 0 12px 32px rgba(31, 42, 35, 0.06);
}

.db-upload-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  margin-bottom: 2rem;
}

.db-upload-logo {
  height: 42px;
  width: auto;
}

.db-upload-header .db-page-title {
  font-size: 24px;
}

.db-upload-header .db-page-subtitle {
  font-size: 14px;
}

.db-upload-icon {
  width: 44px;
  height: 44px;
  color: var(--brand, #1F2A23);
}

.db-dropzone {
  border: 2px dashed #1F2A23;
  border-radius: 16px;
  padding: 3.5rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.db-dropzone:hover,
.db-dropzone.is-dragover {
  border-color: #C9A94B;
  background: #FBF0DA;
}

.db-dropzone-icon {
  margin: 0 auto 16px;
  display: block;
  color: #1F2A23;
  opacity: 0.85;
}

.db-dropzone-title {
  font-size: 17px;
  font-weight: 500;
  color: #1a1a1a;
  margin: 0 0 6px;
}

.db-dropzone-hint {
  font-size: 14px;
  color: #888;
  margin: 0 0 12px;
}

.db-upload-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 1rem;
}

.db-upload-thumb {
  position: relative;
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  background: #F5F2F3;
}

.db-upload-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.db-upload-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: none;
  background: rgba(31, 42, 35, 0.7);
  color: #fff;
  font-size: 12px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.db-upload-submit {
  width: 100%;
  justify-content: center;
  padding: 13px 16px;
  border-radius: 10px;
  font-size: 15px;

  &:hover {
    background: #C9A94B;
    color: #fff;
  }
}

.db-upload-progress {
  margin-top: 1rem;
}

.db-progress-track {
  width: 100%;
  background: #EAF0E7;
  border-radius: 99px;
  height: 8px;
  overflow: hidden;
}

.db-progress-bar {
  background: #1F2A23;
  height: 100%;
  border-radius: 99px;
  transition: width 0.2s;
}

.db-upload-result {
  margin-top: 1rem;
  text-align: center;
}

.db-upload-result-icon {
  margin: 0 auto 10px;
  display: block;
}

.db-upload-result-icon.is-success { color: #1F2A23; }
.db-upload-result-icon.is-error { color: #A32D2D; }

.db-upload-result-title {
  font-size: 16px;
  font-weight: 500;
  color: #1a1a1a;
  margin: 0 0 4px;
}

.db-upload-error-text {
  font-size: 13px;
  color: #A32D2D;
  margin: 0 0 4px;
}

.db-upload-footer {
  display: flex;
  justify-content: center;
  margin-top: 1.5rem;
}

.db-upload-state-title {
  font-size: 18px;
  font-weight: 500;
  color: #1a1a1a;
  margin: 0 0 6px;
}

/* ─── GALERÍA DE INVITADOS ─── */
.gallery-page {
  min-height: 100vh;
  background: #FBFAF7;
}

.gallery-hero {
  position: relative;
  overflow: hidden;
  height: 500px;
  background: radial-gradient(120% 160% at 50% -20%, #2C3B32 0%, #1F2A23 55%, #171F1B 100%);
  color: #fff;
  text-align: center;
  /* padding: 3.25rem 1.5rem 3.75rem; */
}

.gallery-hero.has-photo-bg {
  background-image: linear-gradient(180deg, rgba(15, 20, 17, 0.45) 0%, rgba(15, 20, 17, 0.82) 100%), var(--hero-photo);
  background-size: cover;
  background-position: center;
}

.gallery-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(201, 169, 75, 0.16) 1px, transparent 1px);
  background-size: 22px 22px;
  opacity: 0.5;
  pointer-events: none;
}

.gallery-hero.has-photo-bg::before {
  display: none;
}

.gallery-hero::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 56px;
  height: 2px;
  background: var(--brand-mid, #C9A94B);
}

.gallery-hero-inner {
  position: relative;
  max-width: 640px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-bottom: 1em;
}

.gallery-hero-logo {
  height: 100px;
  width: auto;
  margin: 0 auto 1.75rem;
  display: block;
  opacity: 0.95;
}

.gallery-eyebrow {
  font-size: 11px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--brand-mid, #C9A94B);
  font-weight: 600;
  margin: auto 0 12px;
}

.gallery-title {
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(28px, 5vw, 40px);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 12px;
  color: #fff;
}

.gallery-subtitle {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.62);
  margin: 0 0 1.25rem;
}

.gallery-count {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.5);
  margin: 0 0 1.75rem;
}

.gallery-count::before,
.gallery-count::after {
  content: "";
  width: 20px;
  height: 1px;
  background: rgba(255, 255, 255, 0.2);
}

.gallery-back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  padding: 10px 22px;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
}

.gallery-back-link:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-1px);
}

.gallery-body {
  max-width: 1120px;
  margin: 0 auto;
  padding: 2.75rem 1.5rem 5rem;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

@media (min-width: 640px) {
  .gallery-grid { grid-template-columns: repeat(3, 1fr); gap: 18px; }
}

@media (min-width: 900px) {
  .gallery-grid { grid-template-columns: repeat(4, 1fr); }
}

.gallery-card {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 1px 2px rgba(31, 42, 35, 0.08);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.gallery-card:hover {
  box-shadow: 0 20px 40px -12px rgba(31, 42, 35, 0.28);
  transform: translateY(-3px);
}

.gallery-card-media {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  cursor: pointer;
  background: #EFEBE0;
}

.gallery-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.gallery-card:hover .gallery-card-media img {
  transform: scale(1.07);
}

.gallery-card-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #B8AF98;
}

.gallery-card-scrim {
  position: absolute;
  inset: 0;
  background: rgba(15, 20, 17, 0.22);
  opacity: 0;
  transition: opacity 0.25s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  pointer-events: none;
}

.gallery-card:hover .gallery-card-scrim {
  opacity: 1;
}

.gallery-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 12px;
  border-top: 1px solid #F1EEE4;
}

.gallery-card-date {
  font-size: 11px;
  font-weight: 500;
  color: #A39C8A;
  letter-spacing: 0.01em;
}

.gallery-card-download {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  flex-shrink: 0;
  background: #F5F2E9;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6B6455;
  transition: background 0.15s, color 0.15s;
}

.gallery-card-download:hover {
  background: var(--brand-mid, #C9A94B);
  color: #1F2A23;
}

.gallery-empty {
  text-align: center;
  padding: 4.5rem 1.5rem;
  color: #9C9587;
  border: 1px dashed var(--brand-border, #C8D8C6);
  border-radius: 18px;
  background: #fff;
}

.gallery-empty svg {
  margin: 0 auto 16px;
  display: block;
  color: var(--brand-mid, #C9A94B);
  opacity: 0.7;
}

.gallery-empty p {
  font-size: 14px;
  margin: 0;
}
