/* =========================================================
   ADMIN SISTEMA DE INVITACIONES — v4 2026
   Diseño: refinado, editorial, funcional
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&family=DM+Mono:wght@400;500&family=Fraunces:ital,wght@0,300;0,600;1,300&display=swap');

*, *::before, *::after { box-sizing: border-box; }

:root {
  /* Palette principal */
  --navy:         #0d2137;
  --navy-2:       #163552;
  --navy-3:       #1e4570;
  --accent:       #c5854a;
  --accent-2:     #e6a96b;
  --accent-soft:  #fdf3ea;

  /* Neutrales */
  --bg:           #f0f4f9;
  --surface:      #ffffff;
  --surface-2:    #f7f9fc;
  --border:       #dde5ef;
  --border-2:     #c8d6e6;
  --text:         #0d2137;
  --text-2:       #4a6078;
  --text-3:       #879bad;
  --muted:        #8ca0b4;

  /* Estados */
  --ok-bg:        #edfaf3;
  --ok-border:    #7dd9a8;
  --ok-text:      #1a7045;
  --err-bg:       #fff1f1;
  --err-border:   #f4a9a9;
  --err-text:     #991b1b;

  /* Tipografía */
  --font-ui:      'DM Sans', system-ui, sans-serif;
  --font-mono:    'DM Mono', 'Courier New', monospace;
  --font-display: 'Fraunces', Georgia, serif;

  /* Espaciado */
  --r-sm:    8px;
  --r-md:    12px;
  --r-lg:    18px;
  --r-xl:    24px;

  /* Sombras */
  --sh-sm:   0 1px 4px rgba(13,33,55,.07);
  --sh-md:   0 4px 16px rgba(13,33,55,.09);
  --sh-lg:   0 12px 36px rgba(13,33,55,.13);
  --sh-nav:  0 20px 60px rgba(13,33,55,.28);
}

/* ── Body & shell ──────────────────────────────────────── */

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 14.5px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.admin-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
}

/* ── Sidebar ───────────────────────────────────────────── */

.admin-sidebar {
  background: var(--navy);
  color: #fff;
  padding: 24px 16px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.15) transparent;
}

.admin-brand {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255,255,255,.12);
}

.admin-brand strong {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -.01em;
  color: #fff;
}

.admin-brand span {
  font-size: 12px;
  color: rgba(255,255,255,.5);
  text-transform: uppercase;
  letter-spacing: .1em;
}

.admin-nav { display: grid; gap: 4px; }

.admin-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 14px;
  color: rgba(255,255,255,.78);
  text-decoration: none;
  border-radius: var(--r-md);
  font-size: 13.5px;
  font-weight: 500;
  transition: background .15s, color .15s;
  letter-spacing: .01em;
}

.admin-nav a:hover,
.admin-nav a.active {
  background: rgba(255,255,255,.11);
  color: #fff;
}

.admin-nav a.active {
  background: var(--accent);
  color: #fff;
}

/* ── Main area ─────────────────────────────────────────── */

.admin-main {
  min-width: 0;
  padding: 32px 36px;
}

.admin-main h1 {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -.02em;
  color: var(--navy);
}

.admin-page { max-width: 1440px; margin: 0 auto; }

/* ── Alertas ───────────────────────────────────────────── */

.ok, .error {
  padding: 12px 16px;
  border-radius: var(--r-md);
  margin-bottom: 18px;
  font-weight: 500;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.ok {
  background: var(--ok-bg);
  border: 1px solid var(--ok-border);
  color: var(--ok-text);
}

.error {
  background: var(--err-bg);
  border: 1px solid var(--err-border);
  color: var(--err-text);
}

.ok::before  { content: '✓'; font-weight: 700; }
.error::before { content: '!'; font-weight: 700; }

/* ── Admin actions bar ─────────────────────────────────── */

.admin-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 24px;
  padding: 14px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-sm);
}

.admin-actions a, .inline-link {
  color: var(--navy-2);
  font-weight: 600;
  text-decoration: none;
  font-size: 13.5px;
  padding: 6px 14px;
  border-radius: var(--r-sm);
  background: var(--accent-soft);
  transition: background .15s;
}

.admin-actions a:hover { background: #f5e1cc; }

/* ── Login ─────────────────────────────────────────────── */

.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--bg);
}

.login-card {
  width: min(420px, 100%);
  background: var(--surface);
  border-radius: var(--r-xl);
  padding: 36px;
  box-shadow: var(--sh-lg);
}

.login-card h1 {
  margin: 0 0 22px;
  font-family: var(--font-display);
  font-size: 28px;
  letter-spacing: -.02em;
}

.login-card input,
.login-card button { width: 100%; }

/* ── Botones genéricos ─────────────────────────────────── */

.login-card button,
.panel button,
.admin-main button:not(.save-btn):not(.toolbar-btn):not(.copy-btn) {
  min-height: 44px;
  border: 0;
  border-radius: var(--r-md);
  background: var(--navy);
  color: #fff;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: background .15s, transform .1s;
}

.login-card button:hover,
.panel button:hover {
  background: var(--navy-2);
}

/* ── Cards / panel / editor-block ──────────────────────── */

.cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.card, .panel, .editor-block {
  background: var(--surface);
  border-radius: var(--r-xl);
  padding: 24px;
  box-shadow: var(--sh-md);
  border: 1px solid rgba(221,229,239,.8);
}

.card strong {
  display: block;
  font-size: 36px;
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--navy);
  letter-spacing: -.02em;
}

.card span { color: var(--text-2); font-size: 13px; }

.panel { margin-bottom: 22px; }

.grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  gap: 12px;
  align-items: end;
}
.grid.two { grid-template-columns: repeat(2, minmax(200px, 1fr)); }

/* ── Tablas ─────────────────────────────────────────────── */

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border-radius: var(--r-xl);
  overflow: hidden;
  box-shadow: var(--sh-md);
}

th, td {
  padding: 13px 16px;
  border-bottom: 1px solid #edf2f7;
  text-align: left;
  vertical-align: top;
}

th {
  background: var(--surface-2);
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-2);
  font-weight: 600;
}

td a {
  color: var(--navy-2);
  font-weight: 600;
  text-decoration: none;
}

td a:hover { text-decoration: underline; }

/* ── Block editor (formulario) ─────────────────────────── */

.block-editor { display: grid; gap: 20px; }

.editor-block {
  position: relative;
  overflow: hidden;
}

.editor-block::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 4px; height: 100%;
  background: linear-gradient(180deg, var(--accent) 0%, var(--accent-2) 100%);
  border-radius: 0 2px 2px 0;
}

.editor-block h2 {
  margin: 0 0 18px;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -.01em;
  color: var(--navy);
  display: flex;
  align-items: center;
  gap: 10px;
}

.editor-block h2::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
  margin-left: 4px;
}

.editor-block h3 {
  margin: 22px 0 12px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .09em;
  color: var(--text-2);
  font-weight: 600;
}

.help {
  font-size: 12.5px;
  color: var(--text-3);
  margin: -6px 0 14px;
  padding: 8px 12px;
  background: var(--surface-2);
  border-left: 3px solid var(--border-2);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  line-height: 1.5;
}

/* ── Grids de campos ───────────────────────────────────── */

.grid-2, .grid-3, .grid-4, .grid-5, .grid-6 {
  display: grid;
  gap: 14px;
  align-items: start;
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-5 { grid-template-columns: repeat(5, 1fr); }
.grid-6 { grid-template-columns: repeat(6, 1fr); }

.span-2 { grid-column: span 2; }
.span-3 { grid-column: span 3; }
.span-4 { grid-column: span 4; }
.span-5 { grid-column: span 5; }

/* ── Labels & inputs ───────────────────────────────────── */

label {
  display: flex;
  flex-direction: column;
  font-size: 12.5px;
  font-weight: 600;
  gap: 6px;
  color: var(--text-2);
  letter-spacing: .015em;
}

label.check {
  flex-direction: row;
  align-items: center;
  gap: 9px;
  cursor: pointer;
}

label.check:hover { color: var(--navy); }

input, select, textarea {
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  padding: 9px 12px;
  min-height: 42px;
  font: inherit;
  font-size: 14px;
  background: var(--surface);
  color: var(--text);
  transition: border-color .15s, box-shadow .15s;
  width: 100%;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--navy-3);
  box-shadow: 0 0 0 3px rgba(22, 53, 82, .1);
}

input:hover, select:hover, textarea:hover {
  border-color: var(--border-2);
}

textarea {
  min-height: 88px;
  resize: vertical;
  line-height: 1.55;
}

input[type="color"] {
  padding: 3px 5px;
  min-height: 40px;
  height: 40px;
  cursor: pointer;
  border-radius: var(--r-sm);
}

input[type="file"] {
  padding: 6px 10px;
  font-size: 13px;
  background: var(--surface-2);
  cursor: pointer;
  color: var(--text-2);
}

input[type="checkbox"] {
  width: 17px;
  height: 17px;
  min-height: auto;
  accent-color: var(--navy);
  cursor: pointer;
  flex-shrink: 0;
}

/* ── Segment settings (details) ────────────────────────── */

.segment-settings {
  border: 1.5px solid var(--border);
  border-radius: var(--r-lg);
  margin: 8px 0;
  overflow: hidden;
  transition: border-color .15s;
}

.segment-settings:hover { border-color: var(--border-2); }

.segment-settings[open] { border-color: var(--navy-3); }

.segment-settings summary {
  cursor: pointer;
  padding: 13px 18px;
  background: var(--surface-2);
  font-weight: 600;
  font-size: 13.5px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
  transition: background .15s;
  user-select: none;
}

.segment-settings summary::-webkit-details-marker { display: none; }

.segment-settings summary::before {
  content: '›';
  font-size: 18px;
  color: var(--accent);
  transition: transform .2s;
  line-height: 1;
}

.segment-settings[open] summary::before { transform: rotate(90deg); }

.segment-settings summary:hover { background: #eff3f8; }

.segment-settings .grid-4,
.segment-settings .grid-5,
.segment-settings .grid-6 {
  padding: 16px;
  background: var(--surface);
}

/* ── Repeater rows ─────────────────────────────────────── */

.repeater-row {
  display: grid;
  grid-template-columns: 90px 1fr 1.4fr 1.1fr 1.4fr;
  gap: 12px;
  align-items: end;
  padding: 14px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--r-lg);
  margin-bottom: 10px;
  background: var(--surface-2);
  transition: border-color .15s, box-shadow .15s;
}

.repeater-row:hover {
  border-color: var(--border-2);
  box-shadow: var(--sh-sm);
}

.repeater-row.gifts-row {
  grid-template-columns: 1fr 1fr 2fr 1.4fr;
}

/* ── Thumbs / galería ──────────────────────────────────── */

.thumbs, .collage-admin-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 14px;
  align-items: flex-start;
}

.thumb-card, .thumbs label {
  width: 138px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--r-lg);
  padding: 8px;
  box-shadow: var(--sh-sm);
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
}

.thumb-card:hover, .thumbs label:hover {
  border-color: var(--border-2);
  box-shadow: var(--sh-md);
}

.thumb-card img, .thumbs label img {
  width: 100%;
  height: 95px;
  object-fit: cover;
  display: block;
  border-radius: 9px;
}

.thumb-card span {
  display: block;
  margin-top: 7px;
  font-size: 11.5px;
  word-break: break-word;
  color: var(--text-2);
}

.thumbs img, .current-preview {
  max-width: 100%;
  max-height: 110px;
  object-fit: cover;
  border-radius: var(--r-sm);
  border: 1.5px solid var(--border);
  background: var(--surface-2);
  padding: 3px;
  display: block;
}

.preview-box { min-height: 20px; margin-top: 8px; }

/* ── Copy line ─────────────────────────────────────────── */

.copy-line {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.copy-line input {
  flex: 1;
  font-family: var(--font-mono);
  font-size: 12.5px;
  background: var(--surface-2);
  color: var(--text-2);
}

.copy-btn {
  border: 0;
  border-radius: var(--r-sm);
  background: var(--accent-soft);
  color: var(--navy);
  padding: 8px 14px;
  font-weight: 700;
  font-size: 12.5px;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s;
  flex-shrink: 0;
}

.copy-btn:hover { background: #f5e1cc; }

/* ── Botón guardar ─────────────────────────────────────── */

.save-btn {
  position: sticky;
  bottom: 20px;
  justify-self: end;
  min-width: 220px;
  min-height: 54px;
  border: 0;
  border-radius: var(--r-xl);
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-3) 100%);
  color: #fff;
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  box-shadow: 0 8px 32px rgba(13,33,55,.35);
  z-index: 10;
  transition: transform .15s, box-shadow .15s;
  letter-spacing: .02em;
}

.save-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 40px rgba(13,33,55,.42);
}

.save-btn:active { transform: translateY(0); }

/* ── Rich editor toolbar ───────────────────────────────── */

.rich-toolbar, .editor-toolbar {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
  margin: 8px 0;
  padding: 8px 10px;
  background: var(--surface-2);
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
}

.toolbar-btn, .rich-toolbar select, .editor-toolbar button, .editor-toolbar select {
  min-height: 34px;
  border: 1.5px solid var(--border) !important;
  border-radius: var(--r-sm);
  background: var(--surface) !important;
  color: var(--text) !important;
  padding: 5px 10px;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}

.toolbar-btn:hover, .rich-toolbar select:hover, .editor-toolbar button:hover {
  border-color: var(--border-2) !important;
  background: #eff3f8 !important;
}

.rich-editor {
  min-height: 190px;
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  padding: 16px;
  background: var(--surface);
  outline: none;
  line-height: 1.65;
  font-size: 14.5px;
  transition: border-color .15s, box-shadow .15s;
}

.rich-editor:focus {
  border-color: var(--navy-3);
  box-shadow: 0 0 0 3px rgba(22,53,82,.1);
}

/* ── Links especiales ──────────────────────────────────── */

.special-url-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.small-note {
  font-size: 12px;
  color: var(--text-3);
  font-style: italic;
  margin-top: 6px;
}

/* ── Eliminar imágenes ─────────────────────────────────── */

/* La caja solo muestra el checkbox + texto, sin imagen duplicada */
.delete-image-box {
  margin-top: 6px;
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 7px;
  padding: 6px 10px;
  border: 1.5px solid #fecaca;
  border-radius: var(--r-sm);
  background: #fff5f5;
}

/* Ocultamos la img dentro del delete-box — la imagen ya se ve en el preview */
.delete-image-box img { display: none; }

.delete-image-box label {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 7px;
  color: #b91c1c;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
}

.delete-image-box input[type="checkbox"] { min-height: auto; accent-color: #b91c1c; }

/* ── Preview thumb ─────────────────────────────────────── */

.preview-thumb {
  display: block;
  width: 90px;
  height: 70px;
  object-fit: cover;
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  margin-top: 6px;
}

/* ── Icon options ──────────────────────────────────────── */

.icon-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.icon-options label {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--surface);
  cursor: pointer;
  transition: border-color .15s;
}

.icon-options label:hover { border-color: var(--accent); }

/* ── Regalos: fila uniforme para sobre y banco ─────────── */

.gifts-uniform-row {
  display: grid;
  grid-template-columns: 1fr 1fr 2fr 1.4fr;
  gap: 12px;
  align-items: end;
  padding: 14px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--r-lg);
  margin-bottom: 10px;
  background: var(--surface-2);
  transition: border-color .15s;
}

.gifts-uniform-row:hover { border-color: var(--border-2); }

/* Botón agregar fila */
.add-row-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 18px;
  border: 2px dashed var(--border-2);
  border-radius: var(--r-lg);
  background: transparent;
  color: var(--text-2);
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color .15s, color .15s, background .15s;
  margin-top: 8px;
}

.add-row-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

.add-row-btn::before { content: '＋'; font-size: 16px; }

/* Botón quitar fila dentro de repeater */
.remove-row-btn {
  align-self: end;
  padding: 9px 10px;
  border: 1.5px solid #fecaca;
  border-radius: var(--r-sm);
  background: #fff5f5;
  color: #b91c1c;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  transition: background .15s;
  min-height: 42px;
}

.remove-row-btn:hover { background: #fee2e2; }

/* ── Timeline mejorado ─────────────────────────────────── */

/* Estilos del timeline en la invitación pública */
.inv-timeline {
  display: flex;
  flex-direction: column;
  position: relative;
  padding: 0 0 0 52px;
}

.inv-timeline::before {
  content: '';
  position: absolute;
  left: 19px;
  top: 24px;
  bottom: 24px;
  width: 2px;
  background: var(--tl-line, #ebe8e3);
}

.inv-timeline-item {
  position: relative;
  padding: 0 0 36px 24px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.inv-timeline-item:last-child { padding-bottom: 0; }

/* Círculo alineado al centro del bloque hora+titulo */
.inv-timeline-dot {
  position: absolute;
  left: -33px;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--tl-dot, #062f4f);
  color: var(--tl-icon, #fff);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  z-index: 1;
  flex-shrink: 0;
}

.inv-timeline-titulo {
  font-size: 18px;
  font-weight: 600;
  color: inherit;
  line-height: 1.2;
}

/* Hora DEBAJO del título */
.inv-timeline-hora {
  font-size: 12px;
  letter-spacing: .08em;
  color: var(--accent, #c5854a);
  text-transform: uppercase;
  order: 1; /* después del título */
}

.inv-timeline-imagen {
  margin-top: 10px;
  max-width: 180px;
  border-radius: 10px;
}

/* ── Animaciones de texto por segmento ─────────────────── */

[data-anim="fade"] { animation: anim-fade .7s ease both; }
[data-anim="up"]   { animation: anim-up   .6s ease both; }
[data-anim="zoom"] { animation: anim-zoom .55s ease both; }

@keyframes anim-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes anim-up {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes anim-zoom {
  from { opacity: 0; transform: scale(.93); }
  to   { opacity: 1; transform: scale(1); }
}

.client-panel { max-width: 980px; margin: 30px auto; padding: 24px; }

/* ── Confetti palette picker ───────────────────────────── */

.confetti-palettes {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 10px 0 14px;
}

.palette-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 12px;
  border: 2px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--surface);
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s, transform .1s;
  min-width: 90px;
  font-family: var(--font-ui);
}

.palette-btn:hover {
  border-color: var(--border-2);
  box-shadow: var(--sh-sm);
  transform: translateY(-2px);
}

.palette-btn--active {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(197,133,74,.18);
}

.palette-swatches { display: flex; gap: 3px; }

.swatch {
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 1.5px solid rgba(0,0,0,.12);
  display: block;
}

.swatch--custom {
  background: linear-gradient(135deg,#f0f,#ff0,#0ff);
  font-size: 11px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; border: none;
}

.palette-label {
  font-size: 11.5px; font-weight: 600;
  color: var(--text-2); text-align: center; line-height: 1.2;
}

.confetti-picker-row {
  display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px;
}

.color-pill-label {
  display: flex !important;
  flex-direction: column !important;
  align-items: center; gap: 4px;
  font-size: 11px; color: var(--text-2); font-weight: 600;
}

.color-pill-label input[type="color"] {
  width: 44px; height: 44px;
  border-radius: 50%; padding: 2px;
  border: 2px solid var(--border); cursor: pointer;
}

/* ── Extra animation keyframes ─────────────────────────── */

[data-anim="left"]  { animation: anim-left   .6s ease both; }
[data-anim="right"] { animation: anim-right  .6s ease both; }
[data-anim="bounce"]{ animation: anim-bounce .7s ease both; }
[data-anim="flip"]  { animation: anim-flip   .6s ease both; }
[data-anim="glow"]  { animation: anim-glow   1.2s ease both; }

@keyframes anim-left  { from{opacity:0;transform:translateX(-28px)} to{opacity:1;transform:translateX(0)} }
@keyframes anim-right { from{opacity:0;transform:translateX(28px)}  to{opacity:1;transform:translateX(0)} }
@keyframes anim-bounce{
  0%{opacity:0;transform:translateY(30px)} 60%{transform:translateY(-10px)}
  80%{transform:translateY(5px)}           100%{opacity:1;transform:translateY(0)}
}
@keyframes anim-flip  { from{opacity:0;transform:perspective(400px) rotateY(90deg)} to{opacity:1;transform:perspective(400px) rotateY(0)} }
@keyframes anim-glow  {
  0%{opacity:0;text-shadow:0 0 0 rgba(197,133,74,0)}
  50%{opacity:.8;text-shadow:0 0 22px rgba(197,133,74,.7)}
  100%{opacity:1;text-shadow:none}
}

/* Typewriter cursor */
.typewriter-cursor::after { content:'|'; animation:blink .75s step-end infinite; margin-left:2px; }
@keyframes blink { from,to{opacity:1} 50%{opacity:0} }

/* Image effects (invitación pública) */
.img-effect-zoom-in  { animation: imgZoomIn  .8s ease both; }
.img-effect-zoom-out { animation: imgZoomOut .8s ease both; }
.img-effect-left     { animation: anim-left  .7s ease both; }
.img-effect-right    { animation: anim-right .7s ease both; }
.img-effect-up       { animation: anim-up    .7s ease both; }
.img-effect-rotate   { animation: imgRotate  .7s ease both; }
.img-effect-flip     { animation: anim-flip  .7s ease both; }
.img-effect-bounce   { animation: anim-bounce .8s ease both; }

@keyframes imgZoomIn  { from{opacity:0;transform:scale(.7)}  to{opacity:1;transform:scale(1)} }
@keyframes imgZoomOut { from{opacity:0;transform:scale(1.3)} to{opacity:1;transform:scale(1)} }
@keyframes imgRotate  { from{opacity:0;transform:rotate(-8deg) scale(.9)} to{opacity:1;transform:rotate(0) scale(1)} }

/* Gift button hover effects */
.gift-btn-zoom-in:hover  { transform: scale(1.06); }
.gift-btn-zoom-out:hover { transform: scale(.95); }
.gift-btn-lift:hover     { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(0,0,0,.18); }
.gift-btn-glow:hover     { box-shadow: 0 0 20px rgba(197,133,74,.5); }
.gift-btn-shake:hover    { animation: shake .4s ease; }
.gift-btn-pulse          { animation: pulse 2s ease infinite; }
.gift-btn-bounce:hover   { animation: imgBounce .5s ease; }
.gift-btn-flip:hover     { transform: perspective(400px) rotateY(10deg); }
.gift-btn-color:hover    { filter: hue-rotate(20deg) brightness(1.1); }

@keyframes shake    { 0%,100%{transform:translateX(0)} 25%{transform:translateX(-5px)} 75%{transform:translateX(5px)} }
@keyframes pulse    { 0%,100%{box-shadow:0 0 0 0 rgba(197,133,74,.4)} 50%{box-shadow:0 0 0 8px rgba(197,133,74,0)} }
@keyframes imgBounce{ 0%,100%{transform:translateY(0)} 50%{transform:translateY(-8px)} }

/* Rich toolbar color picker */
.rich-toolbar input[type="color"] {
  width:34px; min-height:34px; height:34px;
  padding:2px; border-radius:var(--r-sm); cursor:pointer;
}



.editor-jumper {
  position: sticky;
  top: 0;
  z-index: 8;
  background: rgba(240, 244, 249, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  padding: 10px 0;
  margin-bottom: 20px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.editor-jumper a {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
  text-decoration: none;
  padding: 5px 11px;
  border-radius: 20px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  transition: all .15s;
  white-space: nowrap;
}

.editor-jumper a:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ── Tabla mejorada de invitaciones ────────────────────── */

.inv-status {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: capitalize;
}

.inv-status.publicada  { background: #d1fae5; color: #065f46; }
.inv-status.borrador   { background: #e5e7eb; color: #374151; }
.inv-status.revision   { background: #fef3c7; color: #92400e; }
.inv-status.pausada    { background: #fee2e2; color: #991b1b; }
.inv-status.archivada  { background: #ede9fe; color: #4c1d95; }

/* ── Responsive ────────────────────────────────────────── */

@media (max-width: 1100px) {
  .admin-shell { display: block; }

  .admin-sidebar {
    position: relative;
    height: auto;
    padding: 18px 14px;
  }

  .admin-nav { grid-template-columns: repeat(2, 1fr); }

  .admin-main { padding: 20px 18px; }

  .cards,
  .grid, .grid.two,
  .grid-2, .grid-3, .grid-4, .grid-5, .grid-6,
  .repeater-row, .repeater-row.gifts-row {
    grid-template-columns: 1fr;
  }

  .span-2, .span-3, .span-4, .span-5 { grid-column: auto; }

  .admin-page { padding: 0; }

  .save-btn {
    width: 100%;
    justify-self: stretch;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    border-radius: 0;
    min-height: 58px;
    margin: 0;
  }

  .block-editor { padding-bottom: 70px; }

  .editor-jumper { display: none; }
}

@media (max-width: 600px) {
  .admin-main { padding: 14px 12px; }
  .editor-block { padding: 18px 16px; }
  .admin-main h1 { font-size: 26px; }
}

/* =========================================================
   Extras: modal modelo, token cliente y sitio web
   ========================================================= */

.model-save-btn { border: 0; cursor: pointer; }

.model-modal-backdrop[hidden] { display: none !important; }

.model-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(13,33,55,.45);
  display: grid;
  place-items: center;
  z-index: 99999;
  padding: 20px;
}

.model-modal {
  width: min(760px, 100%);
  max-height: 92vh;
  overflow: auto;
  background: var(--surface, #fff);
  border-radius: 24px;
  padding: 28px;
  box-shadow: 0 24px 70px rgba(0,0,0,.30);
  border: 1px solid var(--border, #dde5ef);
  position: relative;
}

.model-modal h2 {
  margin-top: 0;
  font-family: var(--font-display, Georgia, serif);
}

.model-modal-close {
  position: absolute;
  right: 18px;
  top: 14px;
  border: 0;
  background: transparent;
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
  color: var(--text-2, #4a6078);
}

.modal-save {
  position: static !important;
  margin-top: 18px;
}

.client-token-block { border-left-color: #4f8cff; }
.token-form { margin: 0; }

.inline-link.model-save-btn {
  font-family: var(--font-ui);
  min-height: auto;
  display: inline-flex;
  align-items: center;
}
