/* ============================================================
   admin-pro.css — piel profesional del Panel Admin (SaaS)
   Modo claro/oscuro vía body[data-ui="light|dark"].
   Reemplaza a admin.css en Admin.html.
   ============================================================ */
.admin-body {
  --sa-bg: #faf8f3;
  --sa-card: #ffffff;
  --sa-soft: #f1ece2;
  --sa-border: #e7e0d2;
  --sa-text: #221c14;
  --sa-text2: #6f6556;
  --sa-accent: #8a6b2d;
  --sa-accent-soft: rgba(168, 133, 60, 0.13);
  --sa-green: #1f7a45;
  --sa-green-soft: rgba(31, 122, 69, 0.1);
  --sa-red: #b3372e;
  --sa-red-soft: rgba(179, 55, 46, 0.09);
  --sa-warn: #96702a;
  --sa-warn-soft: rgba(150, 112, 42, 0.12);
  --sa-shadow: 0 1px 2px rgba(34, 28, 20, 0.05), 0 4px 14px rgba(34, 28, 20, 0.05);
  --sa-shadow-lg: 0 12px 40px rgba(34, 28, 20, 0.16);
  --sa-radius: 10px;
  --sa-font: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --sa-serif: "Cormorant Garamond", Georgia, serif;
  --sa-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
body[data-ui="dark"].admin-body {
  --sa-bg: #14110b;
  --sa-card: #1d1912;
  --sa-soft: #262117;
  --sa-border: #352e20;
  --sa-text: #efe9dc;
  --sa-text2: #a49882;
  --sa-accent: #c9a45a;
  --sa-accent-soft: rgba(201, 164, 90, 0.16);
  --sa-green: #4cae77;
  --sa-green-soft: rgba(76, 174, 119, 0.13);
  --sa-red: #e0695f;
  --sa-red-soft: rgba(224, 105, 95, 0.13);
  --sa-warn: #cda35a;
  --sa-warn-soft: rgba(205, 163, 90, 0.14);
  --sa-shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 4px 14px rgba(0, 0, 0, 0.3);
  --sa-shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.5);
}
body[data-ui="dark"] .btn-add, body[data-ui="dark"] .btn-primary,
body[data-ui="dark"] .gate-btn, body[data-ui="dark"] .ci-scan-fab,
body[data-ui="dark"] .gal-upload-btn, body[data-ui="dark"] .v-quote-btn { color: #1d1305; }

.admin-body {
  margin: 0;
  min-height: 100vh;
  background: var(--sa-bg);
  color: var(--sa-text);
  font-family: var(--sa-font);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  transition: background 0.25s, color 0.25s;
}
.admin-body #dust { display: none; }
.admin-body .dash, .admin-body .gate { position: relative; z-index: 2; }

/* ---------- LOGIN ---------- */
.gate { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 2rem 1rem; }
.gate-card {
  width: min(92vw, 400px);
  background: var(--sa-card);
  border: 1px solid var(--sa-border);
  border-radius: 14px;
  box-shadow: var(--sa-shadow-lg);
  padding: 2.4rem 2.2rem 2rem;
  text-align: center;
}
.gate-seal { display: flex; justify-content: center; margin-bottom: 1rem; transform: scale(0.85); }
.gate-eyebrow {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sa-accent);
  margin: 0 0 0.4rem;
}
.gate-title { font-family: var(--sa-serif); font-size: 1.9rem; font-weight: 600; letter-spacing: 0; margin: 0 0 0.3rem; color: var(--sa-text); }
.gate-sub { color: var(--sa-text2); font-size: 0.92rem; margin: 0 0 1.6rem; }
.gate-input {
  width: 100%;
  box-sizing: border-box;
  padding: 0.8rem 1rem;
  border: 1px solid var(--sa-border);
  border-radius: 8px;
  background: var(--sa-bg);
  color: var(--sa-text);
  font-family: var(--sa-font);
  font-size: 1rem;
  text-align: center;
  letter-spacing: 0.08em;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.gate-input:focus { border-color: var(--sa-accent); box-shadow: 0 0 0 3px var(--sa-accent-soft); }
.gate-btn {
  width: 100%;
  margin-top: 0.9rem;
  padding: 0.85rem;
  border: none;
  border-radius: 8px;
  background: var(--sa-accent);
  color: #fff;
  font-family: var(--sa-font);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: filter 0.2s;
}
.gate-btn:hover { filter: brightness(1.08); }
.gate-error { margin-top: 0.9rem; color: var(--sa-red); min-height: 1.3em; font-size: 0.88rem; }
.gate-hint { margin-top: 1rem; font-size: 0.78rem; color: var(--sa-text2); }

/* ---------- SHELL ---------- */
.dash { max-width: 1240px; margin: 0 auto; padding: 1.6rem clamp(1rem, 3vw, 2.2rem) 4rem; }
.dash-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.9rem 1.5rem;
  margin-bottom: 1.1rem;
}
.dash-head-titles { min-width: 0; }
.dash-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }
.dash-kicker {
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--sa-accent);
  margin: 0 0 0.15rem;
}
.dash-title { font-family: var(--sa-serif); font-size: 1.75rem; font-weight: 600; letter-spacing: 0; color: var(--sa-text); line-height: 1.1; margin: 0; }

.nav-tabs { display: flex; gap: 0.25rem; flex-wrap: wrap; justify-content: flex-start; }
.nav-tab {
  padding: 0.5rem 0.85rem;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--sa-text2);
  font-family: var(--sa-font);
  font-size: 0.86rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}
.nav-tab:hover { background: var(--sa-soft); color: var(--sa-text); }
.nav-tab.active { background: var(--sa-accent-soft); color: var(--sa-accent); font-weight: 600; }

/* botón modo claro/oscuro */
.ui-mode-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 0.85rem;
  border: 1px solid var(--sa-border);
  border-radius: 8px;
  background: var(--sa-card);
  color: var(--sa-text2);
  font-family: var(--sa-font);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.18s;
}
.ui-mode-btn:hover { color: var(--sa-text); border-color: var(--sa-text2); }

/* ---------- STATS ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(135px, 1fr)); gap: 0.7rem; margin-bottom: 1.4rem; }
.stat {
  background: var(--sa-card);
  border: 1px solid var(--sa-border);
  border-radius: var(--sa-radius);
  box-shadow: var(--sa-shadow);
  padding: 0.95rem 1.1rem;
}
.stat-num { font-size: 1.65rem; font-weight: 700; letter-spacing: -0.02em; color: var(--sa-text); line-height: 1.1; }
.stat-num.gold { color: var(--sa-accent); }
.stat-num.muted { color: var(--sa-text2); }
.stat-label {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sa-text2);
  margin-top: 0.3rem;
}

/* ---------- TOOLBAR ---------- */
.toolbar { display: flex; gap: 0.55rem; flex-wrap: wrap; align-items: center; margin-bottom: 1rem; }
.search, .ci-search {
  flex: 1;
  min-width: 200px;
  padding: 0.65rem 0.95rem;
  border: 1px solid var(--sa-border);
  border-radius: 8px;
  background: var(--sa-card);
  font-family: var(--sa-font);
  font-size: 0.95rem;
  color: var(--sa-text);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.search:focus, .ci-search:focus { border-color: var(--sa-accent); box-shadow: 0 0 0 3px var(--sa-accent-soft); }
.chip {
  padding: 0.5rem 0.9rem;
  border: 1px solid var(--sa-border);
  border-radius: 999px;
  background: var(--sa-card);
  color: var(--sa-text2);
  font-family: var(--sa-font);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.18s;
}
.chip:hover { color: var(--sa-text); border-color: var(--sa-text2); }
.chip.active { background: var(--sa-text); color: var(--sa-card); border-color: var(--sa-text); }
.toolbar-actions { display: flex; gap: 0.5rem; margin-left: auto; flex-wrap: wrap; }

/* ---------- BOTONES ---------- */
.btn-add, .btn-export, .btn-primary, .btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border-radius: 8px;
  font-family: var(--sa-font);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s;
}
.btn-add {
  padding: 0.65rem 1.1rem;
  border: none;
  background: var(--sa-accent);
  color: #fff;
  font-size: 0.88rem;
}
.btn-add:hover { filter: brightness(1.08); }
.btn-add.small { padding: 0.45rem 0.8rem; font-size: 0.8rem; margin-top: 0.6rem; }
.btn-export {
  padding: 0.65rem 1.1rem;
  border: 1px solid var(--sa-border);
  background: var(--sa-card);
  color: var(--sa-text);
  font-size: 0.88rem;
}
.btn-export:hover { border-color: var(--sa-text2); }
.btn-primary {
  padding: 0.65rem 1.2rem;
  border: 1px solid var(--sa-accent);
  background: var(--sa-accent);
  color: #fff;
  font-size: 0.88rem;
}
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost {
  padding: 0.65rem 1.1rem;
  border: 1px solid var(--sa-border);
  background: transparent;
  color: var(--sa-text2);
  font-size: 0.88rem;
}
.btn-ghost:hover { color: var(--sa-text); border-color: var(--sa-text2); }
.btn-ghost.small { padding: 0.4rem 0.7rem; font-size: 0.78rem; }
.icon-btn {
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  border: 1px solid var(--sa-border);
  border-radius: 7px;
  background: var(--sa-card);
  color: var(--sa-text2);
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.15s;
}
.icon-btn:hover { border-color: var(--sa-accent); color: var(--sa-accent); }
.icon-btn.danger:hover { border-color: var(--sa-red); color: var(--sa-red); }
.icon-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.row-actions { display: flex; gap: 0.35rem; justify-content: center; }

/* ---------- TABLA ---------- */
.table-wrap {
  background: var(--sa-card);
  border: 1px solid var(--sa-border);
  border-radius: var(--sa-radius);
  box-shadow: var(--sa-shadow);
  overflow-x: auto;
}
table.guests { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.guests thead th {
  text-align: left;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sa-text2);
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--sa-border);
  white-space: nowrap;
  background: var(--sa-soft);
}
.guests tbody td { padding: 0.8rem 1rem; border-bottom: 1px solid var(--sa-border); vertical-align: middle; }
.guests tbody tr:last-child td { border-bottom: 0; }
.guests tbody tr:hover { background: var(--sa-soft); }
.g-family { font-weight: 600; font-size: 0.98rem; color: var(--sa-text); }
.g-guests { font-size: 0.82rem; color: var(--sa-text2); max-width: 260px; display: inline-block; }
.g-passes { font-weight: 700; font-size: 1rem; color: var(--sa-accent); text-align: center; }
.g-url {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--sa-mono);
  font-size: 0.76rem;
  color: var(--sa-text2);
  cursor: pointer;
  border: 1px solid var(--sa-border);
  border-radius: 6px;
  padding: 0.3rem 0.55rem;
  background: var(--sa-bg);
  white-space: nowrap;
  transition: all 0.15s;
}
.g-url:hover { border-color: var(--sa-accent); color: var(--sa-accent); }
.g-mesa {
  display: inline-block;
  margin-left: 0.5rem;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--sa-accent);
  background: var(--sa-accent-soft);
  border-radius: 5px;
  padding: 0.12rem 0.45rem;
  vertical-align: middle;
}
.rsvp-reply { display: flex; flex-direction: column; gap: 0.12rem; margin-top: 0.35rem; }
.rsvp-reply-names { font-size: 0.78rem; color: var(--sa-text2); }
.rsvp-reply-msg { font-size: 0.8rem; font-style: italic; color: var(--sa-accent); }

.badge {
  display: inline-block;
  padding: 0.28rem 0.6rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  border: none;
  white-space: nowrap;
}
.badge.si { color: var(--sa-green); background: var(--sa-green-soft); }
.badge.no { color: var(--sa-red); background: var(--sa-red-soft); }
.badge.pendiente { color: var(--sa-text2); background: var(--sa-soft); }

/* stepper */
.stepper { display: inline-flex; align-items: center; gap: 0.45rem; }
.stepper button {
  width: 1.7rem;
  height: 1.7rem;
  border: 1px solid var(--sa-border);
  border-radius: 7px;
  background: var(--sa-card);
  color: var(--sa-text);
  font-size: 0.95rem;
  line-height: 1;
  cursor: pointer;
  transition: all 0.15s;
}
.stepper button:hover { border-color: var(--sa-accent); color: var(--sa-accent); }
.stepper button:disabled { opacity: 0.3; cursor: not-allowed; }
.stepper .count { font-size: 0.9rem; min-width: 2.6rem; text-align: center; color: var(--sa-text2); }
.stepper .count b { color: var(--sa-text); font-weight: 700; }

.copy-toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--sa-text);
  color: var(--sa-bg);
  padding: 0.65rem 1.2rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  z-index: 50;
  box-shadow: var(--sa-shadow-lg);
}
.dash-note { margin-top: 1.5rem; font-size: 0.82rem; color: var(--sa-text2); text-align: center; }

/* ---------- MODAL ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(10, 12, 18, 0.55);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 5vh 1rem;
  overflow-y: auto;
}
.modal {
  width: min(94vw, 480px);
  background: var(--sa-card);
  border: 1px solid var(--sa-border);
  border-radius: 14px;
  box-shadow: var(--sa-shadow-lg);
  padding: 1.7rem 1.6rem 1.4rem;
}
.modal-title { font-size: 1.25rem; font-weight: 700; letter-spacing: -0.01em; color: var(--sa-text); margin: 0 0 1.2rem; }
.modal-err { color: var(--sa-red); font-size: 0.88rem; margin: 0 0 0.8rem; }
.modal-actions { display: flex; gap: 0.6rem; justify-content: flex-end; margin-top: 0.5rem; }

/* ---------- CAMPOS ---------- */
.field { display: block; margin-bottom: 1.1rem; }
.field-label {
  display: block;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--sa-text2);
  margin-bottom: 0.4rem;
}
.field-input {
  width: 100%;
  box-sizing: border-box;
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--sa-border);
  border-radius: 8px;
  background: var(--sa-card);
  font-family: var(--sa-font);
  font-size: 0.94rem;
  color: var(--sa-text);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field-input:focus { border-color: var(--sa-accent); box-shadow: 0 0 0 3px var(--sa-accent-soft); }
.field-hint { display: block; margin-top: 0.35rem; font-size: 0.8rem; color: var(--sa-text2); }
.field-hint code { font-family: var(--sa-mono); color: var(--sa-accent); }
.name-list { display: flex; flex-direction: column; gap: 0.45rem; }
.name-row { display: flex; gap: 0.45rem; align-items: center; }
.name-row .field-input { flex: 1; }
select.field-input { cursor: pointer; }

/* ---------- SWITCHES / SECCIONES ---------- */
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.switch-label { font-size: 0.92rem; color: var(--sa-text); }
.switch {
  flex-shrink: 0;
  width: 44px;
  height: 25px;
  border-radius: 999px;
  border: none;
  background: var(--sa-border);
  position: relative;
  cursor: pointer;
  transition: background 0.2s;
}
.switch.on { background: var(--sa-green); }
.switch-knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s;
}
.switch.on .switch-knob { transform: translateX(19px); }
.vis-inline {
  background: var(--sa-card);
  border: 1px solid var(--sa-border);
  border-radius: var(--sa-radius);
  padding: 0.75rem 1rem;
  margin-bottom: 1.1rem;
}
.sections-grid { display: grid; gap: 0.7rem; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.section-toggle-card {
  background: var(--sa-card);
  border: 1px solid var(--sa-border);
  border-radius: var(--sa-radius);
  box-shadow: var(--sa-shadow);
  padding: 0.85rem 1.1rem;
}

/* ---------- CONTENIDO / TEXTOS ---------- */
.photos-intro { color: var(--sa-text2); font-size: 0.92rem; margin: 0 0 1.4rem; }
.sub-h {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--sa-text);
  margin: 0 0 0.8rem;
}
.texts-grid { display: grid; gap: 1.1rem; }
@media (min-width: 760px) { .texts-grid { grid-template-columns: 1fr 1fr; } }
.text-field { display: flex; flex-direction: column; }
.text-field-head { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.35rem; }
.font-mini {
  font-family: var(--sa-font);
  font-size: 0.78rem;
  padding: 0.28rem 0.4rem;
  border: 1px solid var(--sa-border);
  border-radius: 6px;
  background: var(--sa-card);
  color: var(--sa-text2);
  max-width: 48%;
  cursor: pointer;
}
.custom-text-edit .ctitle { flex: 1; font-weight: 600; }

.rt { border: 1px solid var(--sa-border); border-radius: 8px; background: var(--sa-card); overflow: hidden; }
.rt-toolbar {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.35rem 0.45rem;
  border-bottom: 1px solid var(--sa-border);
  background: var(--sa-soft);
}
.rt-btn {
  min-width: 1.8rem;
  height: 1.7rem;
  padding: 0 0.45rem;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  color: var(--sa-text2);
  font-size: 0.82rem;
  cursor: pointer;
}
.rt-btn:hover { background: var(--sa-card); color: var(--sa-text); border-color: var(--sa-border); }
.rt-sep { flex: 1; }
.rt-area { padding: 0.6rem 0.8rem; min-height: 2.4rem; font-size: 0.94rem; color: var(--sa-text); line-height: 1.5; outline: none; }
.rt-area.single { min-height: 1.5rem; }
.rt-area:empty::before { content: attr(data-ph); color: var(--sa-text2); opacity: 0.7; }

/* ---------- LISTAS EDITABLES ---------- */
.edit-list { display: flex; flex-direction: column; gap: 0.5rem; }
.edit-row { display: flex; gap: 0.45rem; align-items: center; }
.edit-row .field-input { flex: 1; }
.edit-row .field-input.narrow { flex: 0 0 7rem; }
@media (max-width: 640px) {
  .edit-row { flex-wrap: wrap; }
  .edit-row .field-input.narrow { flex: 1 1 100%; }
}
.drag-row { cursor: grab; }
.drag-row:active { cursor: grabbing; }
.drag-grip, .order-grip { color: var(--sa-text2); font-size: 1rem; cursor: grab; opacity: 0.7; }

/* ---------- FOTOS / MULTIMEDIA ---------- */
.photos-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.1rem; }
.gallery-edit-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.photo-manage {
  background: var(--sa-card);
  border: 1px solid var(--sa-border);
  border-radius: var(--sa-radius);
  box-shadow: var(--sa-shadow);
  padding: 1rem;
}
.photo-manage h3 { font-size: 0.92rem; font-weight: 700; color: var(--sa-text); margin: 0 0 0.15rem; }
.photo-manage p { font-size: 0.82rem; color: var(--sa-text2); margin: 0 0 0.8rem; }
.photo-manage image-slot { display: block; width: 100%; height: 200px; border: 1px solid var(--sa-border); border-radius: 8px; overflow: hidden; }
.photo-manage.tall image-slot { height: 250px; }
.photo-manage-head { display: flex; align-items: center; justify-content: space-between; }
.reframe-hint { display: block; margin-top: 0.4rem; font-size: 0.72rem; color: var(--sa-text2); }
.cap-row { display: flex; gap: 0.4rem; margin-top: 0.5rem; }
.cap-row .field-input { flex: 1; }
.upload-field { display: flex; flex-direction: column; margin-top: 0.6rem; }
.upload-row { display: flex; align-items: center; gap: 0.6rem; margin-top: 0.4rem; }
.upload-input {
  flex: 1;
  font-family: var(--sa-font);
  font-size: 0.88rem;
  color: var(--sa-text);
  padding: 0.5rem;
  border: 1px dashed var(--sa-border);
  border-radius: 8px;
  background: var(--sa-bg);
}
.upload-preview { width: 100%; margin-top: 0.7rem; border-radius: 8px; }
audio.upload-preview { height: 40px; }
video.upload-preview { max-height: 220px; background: #000; }

/* ---------- APARIENCIA ---------- */
.couple-grid { display: grid; gap: 0.8rem; grid-template-columns: 1fr 1fr; }
@media (max-width: 560px) { .couple-grid { grid-template-columns: 1fr; } }
.theme-grid { display: grid; gap: 0.7rem; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.theme-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  padding: 0.85rem;
  border: 1px solid var(--sa-border);
  border-radius: var(--sa-radius);
  background: var(--sa-card);
  box-shadow: var(--sa-shadow);
  cursor: pointer;
  text-align: left;
  font-family: var(--sa-font);
  transition: border-color 0.18s, transform 0.18s;
}
.theme-card:hover { transform: translateY(-2px); }
.theme-card.active { border-color: var(--sa-accent); box-shadow: 0 0 0 3px var(--sa-accent-soft); }
.theme-swatches { display: flex; gap: 0.3rem; }
.theme-swatches span { width: 22px; height: 22px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12); }
.theme-name { font-weight: 600; font-size: 0.94rem; color: var(--sa-text); }
.theme-tag { font-size: 0.7rem; font-weight: 500; letter-spacing: 0.05em; text-transform: uppercase; color: var(--sa-text2); }
.theme-card-wrap { position: relative; }
.theme-card-wrap .theme-card { width: 100%; }
.theme-del {
  position: absolute;
  top: -7px;
  right: -7px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: none;
  background: var(--sa-text);
  color: var(--sa-card);
  font-size: 0.78rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--sa-shadow);
}
.theme-del:hover { background: var(--sa-red); color: #fff; }
.color-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 0.9rem; }
.color-grid { display: grid; gap: 0.8rem; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.color-field { display: flex; flex-direction: column; }
.color-row { display: flex; align-items: center; gap: 0.4rem; margin-top: 0.3rem; }
.color-pick {
  width: 40px;
  height: 38px;
  flex-shrink: 0;
  border: 1px solid var(--sa-border);
  border-radius: 7px;
  background: var(--sa-card);
  padding: 2px;
  cursor: pointer;
}
.color-hex { flex: 1; font-family: var(--sa-mono); font-size: 0.85rem; }
.palette-edit { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin-top: 0.4rem; }
.palette-chip { position: relative; }
.palette-chip .color-pick { width: 42px; height: 42px; border-radius: 50%; }
.chip-x {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: none;
  background: var(--sa-text);
  color: var(--sa-card);
  font-size: 0.68rem;
  line-height: 1;
  cursor: pointer;
}

/* tipografías (grid con preview) */
.font-grid { display: grid; gap: 0.7rem; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.font-card {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.8rem 0.95rem;
  border: 1px solid var(--sa-border);
  border-radius: var(--sa-radius);
  background: var(--sa-card);
  box-shadow: var(--sa-shadow);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.18s, transform 0.18s;
}
.font-card:hover { transform: translateY(-2px); }
.font-card.active { border-color: var(--sa-accent); box-shadow: 0 0 0 3px var(--sa-accent-soft); }
.font-card-preview { font-size: 1.55rem; line-height: 1.25; color: var(--sa-text); white-space: nowrap; overflow: hidden; }
.font-card-name { font-family: var(--sa-font); font-size: 0.78rem; font-weight: 600; color: var(--sa-text2); }

/* efectos */
.effect-grid { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.effect-card {
  padding: 0.5rem 0.95rem;
  border: 1px solid var(--sa-border);
  border-radius: 999px;
  background: var(--sa-card);
  color: var(--sa-text2);
  font-family: var(--sa-font);
  font-size: 0.84rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.18s;
}
.effect-card:hover { color: var(--sa-text); border-color: var(--sa-text2); }
.effect-card.active { background: var(--sa-text); color: var(--sa-card); border-color: var(--sa-text); }
.effect-intensity { margin-top: 1rem; max-width: 560px; }
.ei-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 0.4rem; }
.range { width: 100%; accent-color: var(--sa-accent); }
.perf-pill {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  border: none;
  white-space: nowrap;
}
.perf-pill.ok { color: var(--sa-green); background: var(--sa-green-soft); }
.perf-pill.warn { color: var(--sa-warn); background: var(--sa-warn-soft); }
.perf-pill.max { color: var(--sa-red); background: var(--sa-red-soft); }
.effect-hint { font-size: 0.82rem; color: var(--sa-text2); margin: 0.5rem 0 0; }

/* ---------- ORDEN / MODOS ---------- */
.mode-grid { display: grid; gap: 0.7rem; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.mode-card {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.95rem 1.05rem;
  border: 1px solid var(--sa-border);
  border-radius: var(--sa-radius);
  background: var(--sa-card);
  box-shadow: var(--sa-shadow);
  cursor: pointer;
  text-align: left;
  font-family: var(--sa-font);
  transition: border-color 0.18s, transform 0.18s;
}
.mode-card:hover { transform: translateY(-2px); }
.mode-card.active { border-color: var(--sa-accent); box-shadow: 0 0 0 3px var(--sa-accent-soft); }
.mode-name { font-weight: 600; font-size: 0.96rem; color: var(--sa-text); }
.mode-desc { font-size: 0.82rem; color: var(--sa-text2); }
.order-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.45rem; max-width: 520px; }
.order-item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.7rem 0.95rem;
  border: 1px solid var(--sa-border);
  border-radius: var(--sa-radius);
  background: var(--sa-card);
  box-shadow: var(--sa-shadow);
  cursor: grab;
}
.order-item:active { cursor: grabbing; }
.order-num {
  width: 1.55rem;
  height: 1.55rem;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--sa-text2);
  border: 1px solid var(--sa-border);
  border-radius: 50%;
}
.order-label { flex: 1; font-weight: 600; font-size: 0.92rem; color: var(--sa-text); }
.order-vis { font-size: 0.7rem; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--sa-green); }
.order-vis.off { color: var(--sa-text2); opacity: 0.8; }

/* ---------- CORTEJO ---------- */
.cortejo-admin { display: grid; gap: 1.1rem; margin-top: 0.2rem; }
@media (min-width: 680px) { .cortejo-admin { grid-template-columns: 1fr 1fr; } }
.cortejo-admin-col {
  background: var(--sa-card);
  border: 1px solid var(--sa-border);
  border-radius: var(--sa-radius);
  box-shadow: var(--sa-shadow);
  padding: 1.2rem 1.2rem 1.4rem;
}
.cortejo-admin-col.damas, .cortejo-admin-col.caballeros { border-top-width: 3px; border-top-style: solid; }
.cortejo-admin-col.damas { border-top-color: #a4472d; }
.cortejo-admin-col.caballeros { border-top-color: #2f547a; }
.cortejo-admin-head { text-align: center; margin-bottom: 1rem; }
.cortejo-admin-title { font-size: 1.2rem; font-weight: 700; margin: 0; }
.cortejo-admin .name-idx { width: 1.5rem; flex-shrink: 0; text-align: center; font-size: 0.82rem; font-weight: 600; color: var(--sa-text2); }

/* ---------- PASES QR (nueva pestaña) ---------- */
.pass-grid { display: grid; gap: 0.9rem; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.pass-admin-card {
  background: var(--sa-card);
  border: 1px solid var(--sa-border);
  border-radius: var(--sa-radius);
  box-shadow: var(--sa-shadow);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  text-align: center;
}
.pass-admin-card .qr-box { background: #fff; padding: 8px; border-radius: 8px; border: 1px solid var(--sa-border); }
.pass-admin-family { font-weight: 700; font-size: 0.95rem; color: var(--sa-text); line-height: 1.2; }
.pass-admin-meta { font-size: 0.8rem; color: var(--sa-text2); }
.qr-tools { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.2rem; align-items: center; }

@media (max-width: 720px) {
  .g-guests, .col-guests { display: none; }
  .nav-tabs { justify-content: flex-start; }
}

/* impresión de pases */
@media print {
  .dash-head, .qr-tools, .dash-note, .dash-nav, .nav-tabs, .ui-mode-btn { display: none !important; }
  .admin-body { background: #fff; }
  .pass-grid { grid-template-columns: repeat(3, 1fr); }
  .pass-admin-card { break-inside: avoid; box-shadow: none; }
}

/* preview de siluetas mágicas en Apariencia */
.magic-preview { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: 0.9rem; }
.magic-preview-item {
  width: 56px; height: 56px; display: block; color: var(--sa-text2);
  background: var(--sa-card); border: 1px solid var(--sa-border);
  border-radius: 10px; padding: 8px; box-sizing: border-box;
}
.magic-preview-item svg { width: 100%; height: 100%; display: block; }

.show-more { margin-top: 0.8rem; }

.rt-btn.on { background: var(--sa-accent-soft); color: var(--sa-accent); border-color: transparent; }
.rt-divider { width: 1px; height: 1.1rem; background: var(--sa-border); margin: 0 0.2rem; }

/* checklist + presupuesto */
.tpl-row { display: grid; gap: 0.7rem; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.check-progress { margin: 1.2rem 0 0.4rem; max-width: 540px; }
.check-phase { margin-top: 1.3rem; }
.check-list { display: flex; flex-direction: column; gap: 0.4rem; max-width: 640px; }
.check-item {
  display: flex; align-items: center; gap: 0.7rem;
  background: var(--sa-card); border: 1px solid var(--sa-border);
  border-radius: 10px; padding: 0.55rem 0.7rem;
}
.check-item.done .check-label { text-decoration: line-through; opacity: 0.55; }
.check-box {
  width: 1.55rem; height: 1.55rem; flex-shrink: 0;
  border: 2px solid var(--sa-border); border-radius: 7px;
  background: var(--sa-card); color: #fff; font-size: 0.9rem; line-height: 1;
  cursor: pointer; display: grid; place-items: center; transition: all 0.15s;
}
.check-item.done .check-box { background: var(--sa-green); border-color: var(--sa-green); }
.check-label { flex: 1; font-size: 0.92rem; color: var(--sa-text); }
.budget-table input.slim { padding: 0.4rem 0.55rem; font-size: 0.88rem; }
.budget-table input.num { max-width: 7.5rem; }
.budget-table td { padding: 0.45rem 0.6rem; }

/* cuenta + ayuda */
.gate-hint a { color: var(--sa-accent); text-decoration: none; font-weight: 600; }
.gate-hint a:hover { text-decoration: underline; }
.card-row { background: var(--sa-card); border: 1px solid var(--sa-border); border-radius: 10px; padding: 0.6rem 0.8rem; }
.card-brand { font-weight: 800; font-size: 0.8rem; letter-spacing: 0.04em; color: var(--sa-text); }
.card-num { font-family: var(--sa-mono); font-size: 0.9rem; color: var(--sa-text); flex: 1; }
.card-exp { font-size: 0.8rem; color: var(--sa-text2); }
.faq-list { display: flex; flex-direction: column; gap: 0.5rem; max-width: 640px; }
.faq { background: var(--sa-card); border: 1px solid var(--sa-border); border-radius: 10px; overflow: hidden; }
.faq-q {
  width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: 0.85rem 1rem; border: none; background: transparent; cursor: pointer;
  font-family: var(--sa-font); font-size: 0.92rem; font-weight: 600; color: var(--sa-text); text-align: left;
}
.faq-q span { color: var(--sa-text2); font-size: 1.1rem; }
.faq.open { border-color: var(--sa-accent); }
.faq-a { margin: 0; padding: 0 1rem 0.9rem; font-size: 0.88rem; color: var(--sa-text2); line-height: 1.6; }

/* barra de progreso reutilizable (checklist) */
.admin-body .ci-progress { height: 6px; border-radius: 999px; background: var(--sa-soft); overflow: hidden; }
.admin-body .ci-progress-fill { height: 100%; border-radius: 999px; background: var(--sa-green); transition: width 0.4s ease; }

/* etiquetas reutilizadas (cuenta/regalos/mesas) */
.admin-body .v-tag { font-size: 0.7rem; font-weight: 600; color: var(--sa-text2); background: var(--sa-soft); padding: 0.2rem 0.55rem; border-radius: 6px; white-space: nowrap; }
.admin-body .v-badge { font-size: 0.62rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; padding: 0.22rem 0.55rem; border-radius: 999px; white-space: nowrap; }
.admin-body .v-badge.vf { color: var(--sa-green); background: var(--sa-green-soft); }

/* plano del salón */
.plano-wrap { margin-top: 0.4rem; }
.plano {
  position: relative;
  width: 100%;
  max-width: 1100px;
  aspect-ratio: 16 / 9;
  margin: 0 auto;
  background: var(--sa-card);
  border: 1px solid var(--sa-border);
  border-radius: 14px;
  box-shadow: var(--sa-shadow);
  overflow: hidden;
  touch-action: none;
}
.plano-pista {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: 26%; height: 30%;
  border: 2px dashed var(--sa-border);
  border-radius: 10px;
  display: grid; place-items: center;
  font-size: 0.7rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--sa-text2);
}
.plano-presidium {
  position: absolute;
  left: 50%; top: 4%;
  transform: translateX(-50%);
  width: 34%; padding: 0.35rem 0;
  background: var(--sa-accent-soft);
  border-radius: 8px;
  text-align: center;
  font-size: 0.66rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--sa-accent);
}
.plano-mesa {
  position: absolute;
  transform: translate(-50%, -50%);
  width: clamp(46px, 9vw, 74px);
  aspect-ratio: 1;
  border-radius: 50%;
  border: 2px solid var(--sa-border);
  background: var(--sa-bg);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 0.05rem;
  cursor: grab;
  font-family: var(--sa-font);
  transition: border-color 0.15s, box-shadow 0.15s;
  touch-action: none;
}
.plano-mesa:active { cursor: grabbing; }
.plano-mesa.sel { border-color: var(--sa-accent); box-shadow: 0 0 0 4px var(--sa-accent-soft); }
.plano-mesa.full { border-color: var(--sa-green); }
.plano-mesa.over { border-color: var(--sa-red); background: var(--sa-red-soft); }
.pm-name { font-weight: 800; font-size: 0.95rem; color: var(--sa-text); line-height: 1; }
.pm-occ { font-size: 0.62rem; font-weight: 600; color: var(--sa-text2); }
.pm-names {
  position: absolute;
  top: 100%; left: 50%;
  transform: translateX(-50%);
  margin-top: 3px;
  max-width: 120px;
  font-size: 0.56rem; font-weight: 600; line-height: 1.2;
  color: var(--sa-text2);
  text-align: center;
  background: var(--sa-card);
  padding: 1px 4px;
  border-radius: 5px;
  pointer-events: none;
  white-space: normal;
}
.mesa-panel {
  margin-top: 1.2rem;
  max-width: 560px;
  background: var(--sa-card);
  border: 1px solid var(--sa-border);
  border-radius: 14px;
  box-shadow: var(--sa-shadow);
  padding: 1.1rem 1.2rem 1.3rem;
}
.mesa-panel-head { display: flex; gap: 0.7rem; align-items: flex-start; flex-wrap: wrap; }
.mesa-panel-head .field { flex: 1; min-width: 150px; }

/* portal Mi Evento */
.portal-grid { display: grid; gap: 0.9rem; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.portal-card {
  display: flex; flex-direction: column; gap: 0.3rem; text-align: left;
  background: var(--sa-card); border: 1px solid var(--sa-border); border-radius: 14px;
  box-shadow: var(--sa-shadow); padding: 1.15rem 1.2rem 1.05rem;
  text-decoration: none; cursor: pointer; font-family: var(--sa-font);
  transition: transform 0.15s, border-color 0.15s;
}
.portal-card:hover { transform: translateY(-2px); border-color: var(--sa-accent); }
.portal-card.locked { opacity: 0.72; }
.portal-card.locked:hover { border-color: var(--sa-warn); }
.portal-ico {
  width: 2.4rem; height: 2.4rem; display: grid; place-items: center;
  border-radius: 10px; background: var(--sa-accent-soft); color: var(--sa-accent);
  font-size: 1.1rem; margin-bottom: 0.3rem;
}
.portal-card.locked .portal-ico { background: var(--sa-soft); color: var(--sa-text2); }
.portal-name { font-weight: 700; font-size: 0.98rem; color: var(--sa-text); }
.portal-lock { font-size: 0.8rem; }
.portal-desc { font-size: 0.8rem; color: var(--sa-text2); }
.portal-go { margin-top: 0.35rem; font-size: 0.78rem; font-weight: 700; color: var(--sa-accent); }
.portal-plan { margin-top: 0.35rem; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--sa-warn); }

/* ---------- barra de marca compartida ---------- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.6rem clamp(1rem, 3vw, 2rem);
  background: color-mix(in srgb, var(--sa-bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--sa-border);
}
.site-nav-logo {
  font-family: var(--sa-serif);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--sa-text);
  text-decoration: none;
  white-space: nowrap;
}
.site-nav-logo em { font-style: italic; color: var(--sa-accent); }
.site-nav-links { display: flex; align-items: center; gap: 1rem; }
.site-nav-links a {
  font-family: var(--sa-font);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--sa-text2);
  text-decoration: none;
  white-space: nowrap;
}
.site-nav-links a:hover { color: var(--sa-text); }
.site-nav-mode {
  width: 2rem; height: 2rem;
  display: grid; place-items: center;
  border: 1px solid var(--sa-border);
  border-radius: 8px;
  background: var(--sa-card);
  color: var(--sa-text2);
  font-size: 0.95rem;
  cursor: pointer;
}
.site-nav-mode:hover { color: var(--sa-text); border-color: var(--sa-text2); }
/* el gate centrado debe descontar la barra */
.site-nav ~ #root .gate, .site-nav ~ .gate { min-height: calc(100vh - 56px); }

/* encabezado del admin: barra de navegación a todo lo ancho */
.dash-autosave { margin: 0.35rem 0 0; font-size: 0.74rem; color: var(--sa-green); font-weight: 500; }
.dash-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.6rem;
  padding-bottom: 1rem;
  margin-bottom: 1.6rem;
  border-bottom: 1px solid var(--sa-border);
}
.nav-group { display: flex; align-items: center; gap: 0.7rem; flex-wrap: wrap; }
.nav-group + .nav-group { position: relative; }
.nav-group-label {
  font-size: 0.6rem; font-weight: 700; letter-spacing: 0.13em; text-transform: uppercase;
  color: var(--sa-text2); opacity: 0.65; white-space: nowrap;
}
@media (max-width: 900px) {
  .dash-head { flex-direction: column; align-items: stretch; }
  .dash-actions { flex-wrap: wrap; }
  .dash-actions .btn-primary { text-align: center; }
  .nav-group { width: 100%; }
}
/* editor de textos: la letra real necesita más aire */
.rt-area { line-height: 1.6; }
.texts-grid .field-input { line-height: 1.5; }

/* ---------- vista previa en vivo ---------- */
.dash.dash-wide { max-width: 1500px; }
.admin-cols { display: flex; gap: 1.4rem; align-items: flex-start; }
.admin-main { flex: 1; min-width: 0; }
.preview-pane {
  width: 400px;
  flex-shrink: 0;
  position: sticky;
  top: 64px;
}
@media (max-width: 1279px) { .preview-pane { display: none; } }
.preview-bar { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.55rem; }
.preview-title { font-size: 0.74rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--sa-text2); }
.preview-actions { display: flex; gap: 0.35rem; align-items: center; }
.preview-actions .chip { padding: 0.32rem 0.7rem; font-size: 0.74rem; }
.preview-frame-clip {
  border: 1px solid var(--sa-border);
  border-radius: 16px;
  overflow: hidden;
  background: #1d1712;
  box-shadow: var(--sa-shadow-lg);
}
.preview-scaler { width: 100%; overflow: hidden; }
.preview-scaler iframe { border: 0; transform-origin: top left; display: block; }
.preview-hint { margin: 0.5rem 0 0; font-size: 0.72rem; color: var(--sa-text2); text-align: center; }
.preview-toggle.on { border-color: var(--sa-accent); color: var(--sa-accent); }
.icon-btn.wa { text-decoration: none; }
.icon-btn.wa:hover { border-color: #1da851; color: #1da851; }

.ap-index {
  position: sticky;
  top: 52px;
  z-index: 10;
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  padding: 0.55rem 0;
  margin-bottom: 0.8rem;
  background: color-mix(in srgb, var(--sa-bg) 92%, transparent);
  backdrop-filter: blur(8px);
}
.ap-index .chip { padding: 0.4rem 0.8rem; font-size: 0.78rem; }

/* ---------- asistente IA ---------- */
.as-wrap { max-width: 720px; }
.as-chat {
  min-height: 280px;
  max-height: 48vh;
  overflow-y: auto;
  background: var(--sa-card);
  border: 1px solid var(--sa-border);
  border-radius: 14px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}
.as-empty { text-align: center; color: var(--sa-text2); margin: auto; padding: 1.5rem 1rem; }
.as-empty-ico { display: block; font-size: 1.6rem; color: var(--sa-accent); margin-bottom: 0.4rem; }
.as-empty p { margin: 0; font-size: 0.9rem; max-width: 38ch; margin-inline: auto; }
.as-msg { display: flex; gap: 0.55rem; align-items: flex-end; }
.as-msg.user { justify-content: flex-end; }
.as-avatar {
  width: 1.7rem; height: 1.7rem; flex-shrink: 0;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--sa-accent-soft);
  color: var(--sa-accent);
  font-size: 0.8rem;
}
.as-bubble {
  max-width: 78%;
  padding: 0.6rem 0.85rem;
  border-radius: 14px;
  font-size: 0.9rem;
  line-height: 1.55;
  white-space: pre-wrap;
}
.as-msg.ai .as-bubble { background: var(--sa-soft); color: var(--sa-text); border-bottom-left-radius: 4px; }
.as-msg.user .as-bubble { background: var(--sa-accent); color: #fff; border-bottom-right-radius: 4px; }
body[data-ui="dark"] .as-msg.user .as-bubble { color: #1d1305; }
.as-typing { display: flex; gap: 0.3rem; align-items: center; min-width: 2.6rem; }
.as-typing span {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--sa-text2);
  animation: as-blink 1.2s infinite;
}
.as-typing span:nth-child(2) { animation-delay: 0.2s; }
.as-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes as-blink { 0%, 80%, 100% { opacity: 0.25; } 40% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .as-typing span { animation: none; } }
.as-sugs { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.8rem 0; }
.as-inputrow { display: flex; gap: 0.5rem; }
.as-inputrow .field-input { flex: 1; }

.as-portal { margin-top: 1.8rem; }
.as-portal-head { display: flex; align-items: center; gap: 0.7rem; margin-bottom: 0.8rem; }
.as-locked { width: 100%; text-align: left; }

/* ---------- selector de color del cortejo ---------- */
.palette-chip { display: flex; flex-direction: column; align-items: center; gap: 0.25rem; }
.swatch-btn {
  width: 46px; height: 46px;
  border-radius: 50%;
  border: 2px solid var(--sa-card);
  box-shadow: 0 0 0 1px var(--sa-border), var(--sa-shadow);
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}
.swatch-btn:hover { transform: scale(1.08); }
.swatch-btn.open { box-shadow: 0 0 0 3px var(--sa-accent-soft), 0 0 0 1px var(--sa-accent); }
.swatch-name { font-size: 0.64rem; font-weight: 600; color: var(--sa-text2); max-width: 64px; text-align: center; line-height: 1.2; }
.swatch-add {
  width: 46px; height: 46px;
  border-radius: 50%;
  border: 2px dashed var(--sa-border);
  background: transparent;
  color: var(--sa-text2);
  font-size: 1.1rem;
  cursor: pointer;
  align-self: flex-start;
  transition: all 0.15s;
}
.swatch-add:hover { border-color: var(--sa-accent); color: var(--sa-accent); }
.swatch-veil { position: fixed; inset: 0; z-index: 44; }
.swatch-pop {
  position: absolute;
  top: 54px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 45;
  width: 252px;
  background: var(--sa-card);
  border: 1px solid var(--sa-border);
  border-radius: 12px;
  box-shadow: var(--sa-shadow-lg);
  padding: 0.7rem;
}
.swatch-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 0.35rem; margin-bottom: 0.6rem; }
.swatch {
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.12);
  cursor: pointer;
  transition: transform 0.12s;
}
.swatch:hover { transform: scale(1.15); }
.swatch.on { outline: 2px solid var(--sa-accent); outline-offset: 2px; }
.swatch-custom { display: flex; gap: 0.4rem; align-items: center; }
.swatch-custom .color-pick { width: 38px; height: 34px; }
.swatch-custom .color-hex { flex: 1; min-width: 0; }
.preset-row { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.preset-pal {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.7rem;
  border: 1px solid var(--sa-border);
  border-radius: 999px;
  background: var(--sa-card);
  cursor: pointer;
  transition: border-color 0.15s, transform 0.15s;
}
.preset-pal:hover { border-color: var(--sa-accent); transform: translateY(-1px); }
.preset-dots { display: flex; }
.preset-dots span {
  width: 16px; height: 16px;
  border-radius: 50%;
  border: 1.5px solid var(--sa-card);
  margin-left: -5px;
}
.preset-dots span:first-child { margin-left: 0; }
.preset-name { font-family: var(--sa-font); font-size: 0.76rem; font-weight: 600; color: var(--sa-text2); }
.preset-pal:hover .preset-name { color: var(--sa-text); }

/* ---------- importador de invitados ---------- */
.imp-modal { width: min(96vw, 720px); }
.imp-modal .photos-intro a { color: var(--sa-accent); font-weight: 600; }
.imp-drop {
  border: 2px dashed var(--sa-border);
  border-radius: 12px;
  padding: 1.3rem 1rem;
  text-align: center;
  font-size: 0.9rem;
  color: var(--sa-text2);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.imp-drop:hover, .imp-drop.over { border-color: var(--sa-accent); background: var(--sa-accent-soft); color: var(--sa-text); }
.imp-drop b { color: var(--sa-accent); }
.imp-summary { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.9rem 0 0.6rem; }
.imp-pill { font-size: 0.76rem; font-weight: 700; padding: 0.3rem 0.7rem; border-radius: 999px; }
.imp-pill.ok { color: var(--sa-green); background: var(--sa-green-soft); }
.imp-pill.warn { color: var(--sa-warn); background: var(--sa-warn-soft); }
.imp-pill.skip { color: var(--sa-text2); background: var(--sa-soft); }
.imp-pill.error { color: var(--sa-red); background: var(--sa-red-soft); }
.imp-tablewrap { max-height: 40vh; overflow: auto; border: 1px solid var(--sa-border); border-radius: 10px; }
.imp-table { font-size: 0.84rem; }
.imp-table td, .imp-table th { padding: 0.5rem 0.65rem; }
.imp-table .imp-guests { max-width: 200px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.imp-table .imp-msg { font-size: 0.76rem; color: var(--sa-text2); }
.imp-table tr.imp-error td { color: var(--sa-red); opacity: 0.85; }
.imp-table tr.imp-error .imp-msg { color: var(--sa-red); }
.imp-table tr.imp-skip td { opacity: 0.55; }
.imp-table tr.imp-warn .imp-msg { color: var(--sa-warn); }

/* ---------- lugares por mesa ---------- */
.mesa-caps { margin-top: 1.3rem; }
.mesa-caps-grid { display: grid; gap: 0.45rem; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); max-width: 760px; }
.mesa-cap-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--sa-card);
  border: 1px solid var(--sa-border);
  border-radius: 9px;
  padding: 0.4rem 0.55rem;
}
.mesa-cap-row.over { border-color: var(--sa-red); }
.mesa-cap-row.over .mesa-cap-occ { color: var(--sa-red); font-weight: 700; }
.mesa-cap-name {
  flex: 1;
  border: none;
  background: none;
  font-family: var(--sa-font);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--sa-text);
  text-align: left;
  cursor: pointer;
  padding: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mesa-cap-name:hover { color: var(--sa-accent); }
.mesa-cap-input { width: 3.6rem; padding: 0.3rem 0.4rem; font-size: 0.85rem; text-align: center; }
.mesa-cap-occ { font-size: 0.74rem; color: var(--sa-text2); min-width: 2.6rem; text-align: right; }

.mesa-defcap { display: inline-flex; align-items: center; gap: 0.45rem; }
.mesa-defcap span { font-size: 0.78rem; font-weight: 600; color: var(--sa-text2); }
.mesa-defcap .field-input { width: 4rem; padding: 0.4rem 0.5rem; text-align: center; }

/* ---------- panel del sitio: solicitudes ---------- */
.req-list { display: flex; flex-direction: column; gap: 0.55rem; max-width: 720px; }
.req-card {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  background: var(--sa-card);
  border: 1px solid var(--sa-border);
  border-radius: 12px;
  padding: 0.85rem 1rem;
}
.req-card.done { opacity: 0.6; }
.req-ico {
  width: 2rem; height: 2rem; flex-shrink: 0;
  display: grid; place-items: center;
  border-radius: 8px;
  background: var(--sa-accent-soft);
  color: var(--sa-accent);
}
.req-body { flex: 1; min-width: 0; }
.req-top { display: flex; justify-content: space-between; gap: 0.6rem; align-items: baseline; }
.req-top b { font-size: 0.92rem; color: var(--sa-text); }
.req-when { font-size: 0.72rem; color: var(--sa-text2); flex-shrink: 0; }
.req-from { margin: 0.1rem 0 0.2rem; font-size: 0.8rem; font-weight: 600; color: var(--sa-accent); }
.req-detail { margin: 0; font-size: 0.86rem; color: var(--sa-text2); line-height: 1.5; }
.req-actions { display: flex; flex-direction: column; gap: 0.4rem; align-items: flex-end; flex-shrink: 0; }

.g-seen { margin-left: 0.4rem; font-size: 0.78rem; opacity: 0.7; }
.deadline-bar {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
  background: var(--sa-card);
  border: 1px solid var(--sa-border);
  border-radius: 10px;
  padding: 0.6rem 0.9rem;
  margin-bottom: 0.9rem;
}
.deadline-field { display: inline-flex; align-items: center; gap: 0.5rem; }
.deadline-field span { font-size: 0.78rem; font-weight: 600; color: var(--sa-text2); }
.deadline-field .field-input { width: auto; padding: 0.4rem 0.6rem; }
.hosp-edit { background: var(--sa-card); border: 1px solid var(--sa-border); border-radius: 10px; padding: 0.7rem; }
.thanks-ctl { margin-bottom: 1.1rem; }

/* ---------- registro de proveedores ---------- */
.vreg-card { width: min(94vw, 560px); text-align: left; }
.vreg-card .gate-title, .vreg-card .gate-eyebrow, .vreg-card .gate-sub { text-align: center; }
.vreg-social { display: flex; flex-direction: column; gap: 0.45rem; margin-bottom: 0.9rem; }
.vreg-social-btn {
  display: flex; align-items: center; justify-content: center; gap: 0.6rem;
  width: 100%; padding: 0.65rem;
  border: 1px solid var(--sa-border); border-radius: 8px;
  background: var(--sa-card); color: var(--sa-text);
  font-family: var(--sa-font); font-size: 0.9rem; font-weight: 600;
  cursor: pointer; transition: border-color 0.15s;
}
.vreg-social-btn:hover { border-color: var(--sa-text2); }
.vreg-ico {
  width: 1.5rem; height: 1.5rem; flex-shrink: 0;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--sa-soft); color: var(--sa-accent);
  font-size: 0.78rem; font-weight: 800;
}
.vreg-divider { display: flex; align-items: center; gap: 0.7rem; margin: 0.9rem 0; color: var(--sa-text2); font-size: 0.78rem; }
.vreg-divider::before, .vreg-divider::after { content: ""; flex: 1; height: 1px; background: var(--sa-border); }
.vreg-grid { display: grid; gap: 0 0.8rem; grid-template-columns: 1fr 1fr; }
@media (max-width: 560px) { .vreg-grid { grid-template-columns: 1fr; } }
.vreg-plans { display: grid; gap: 0.6rem; grid-template-columns: 1fr 1fr; }
@media (max-width: 560px) { .vreg-plans { grid-template-columns: 1fr; } }

.v-badge.rev { color: var(--sa-warn); background: var(--sa-warn-soft); }

.legal-check {
  display: flex;
  gap: 0.55rem;
  align-items: flex-start;
  text-align: left;
  font-size: 0.8rem;
  color: var(--sa-text2);
  line-height: 1.5;
  margin: 0.4rem 0 0.8rem;
  cursor: pointer;
}
.legal-check input { margin-top: 0.2rem; accent-color: var(--sa-accent); }
.legal-check a { color: var(--sa-accent); font-weight: 600; text-decoration: none; }
.legal-check a:hover { text-decoration: underline; }

/* ---------- muro digital ---------- */
.muro-form { display: flex; gap: 0.5rem; flex-wrap: wrap; justify-content: center; max-width: 720px; margin: 0 auto 1.6rem; }
.muro-form .field-input { flex: 0 1 180px; }
.muro-form .muro-text { flex: 1 1 280px; }
.muro-grid { columns: 3 240px; column-gap: 0.9rem; max-width: 1080px; margin: 0 auto; }
.muro-card {
  break-inside: avoid;
  margin: 0 0 0.9rem;
  background: var(--sa-card);
  border: 1px solid var(--sa-border);
  border-radius: 12px;
  padding: 1rem 1.1rem;
  box-shadow: var(--sa-shadow);
}
.muro-card blockquote { margin: 0 0 0.5rem; font-size: 0.95rem; line-height: 1.55; color: var(--sa-text); }
.muro-card figcaption { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; font-size: 0.8rem; font-weight: 600; color: var(--sa-accent); }
.muro-screen {
  position: fixed; inset: 0; z-index: 80;
  background: #14110b;
  color: #efe9dc;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 6vmin; cursor: pointer;
}
.muro-screen-kicker { font-size: clamp(0.8rem, 1.6vw, 1.1rem); letter-spacing: 0.22em; text-transform: uppercase; color: #c9a45a; margin: 0 0 3vmin; }
.muro-screen-quote {
  font-family: var(--sa-serif);
  font-size: clamp(1.6rem, 5vw, 3.4rem);
  font-weight: 500; line-height: 1.3; max-width: 28ch; margin: 0;
  animation: muroIn 0.8s ease;
}
@keyframes muroIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .muro-screen-quote { animation: none; } }
.muro-screen-author { font-size: clamp(1rem, 2.4vw, 1.5rem); color: #c9a45a; margin: 2.5vmin 0 0; }
.muro-screen-hint { position: absolute; bottom: 3vmin; font-size: 0.85rem; color: rgba(239,233,220,0.55); margin: 0; }

/* ---------- whatsapp demo ---------- */
.wa-page { max-width: 640px; margin: 0 auto; padding: 2rem 1rem 3rem; }
.wa-phone {
  max-width: 380px; margin: 0 auto;
  border: 1px solid var(--sa-border); border-radius: 22px;
  overflow: hidden; box-shadow: var(--sa-shadow-lg);
  background: #e5ddd5;
}
body[data-ui="dark"] .wa-phone { background: #0b141a; }
.wa-top { display: flex; align-items: center; gap: 0.6rem; background: #075e54; color: #fff; padding: 0.7rem 0.9rem; }
.wa-avatar { width: 2.1rem; height: 2.1rem; border-radius: 50%; background: #fff; display: grid; place-items: center; font-size: 1.05rem; }
.wa-name { margin: 0; font-size: 0.92rem; font-weight: 700; }
.wa-status { margin: 0; font-size: 0.72rem; opacity: 0.85; }
.wa-chat { height: 360px; overflow-y: auto; padding: 0.9rem 0.8rem; display: flex; flex-direction: column; gap: 0.5rem; }
.wa-msg {
  max-width: 82%; padding: 0.5rem 0.7rem; border-radius: 9px;
  font-size: 0.86rem; line-height: 1.45; white-space: pre-wrap;
  box-shadow: 0 1px 1px rgba(0,0,0,0.12);
}
.wa-msg.bot { background: #fff; color: #111; align-self: flex-start; border-top-left-radius: 2px; }
.wa-msg.user { background: #dcf8c6; color: #111; align-self: flex-end; border-top-right-radius: 2px; }
body[data-ui="dark"] .wa-msg.bot { background: #202c33; color: #e9edef; }
body[data-ui="dark"] .wa-msg.user { background: #005c4b; color: #e9edef; }
.wa-typing { letter-spacing: 0.3em; }
.wa-quick { display: flex; flex-wrap: wrap; gap: 0.4rem; padding: 0.7rem 0.8rem; background: rgba(0,0,0,0.04); }
.wa-chip {
  border: 1px solid #075e54; border-radius: 999px;
  background: transparent; color: #075e54;
  font-family: var(--sa-font); font-size: 0.78rem; font-weight: 600;
  padding: 0.4rem 0.75rem; cursor: pointer;
}
body[data-ui="dark"] .wa-chip { border-color: #00a884; color: #00a884; }
.wa-chip:disabled { opacity: 0.5; }

/* ---------- checkout ---------- */
.ck-page {
  max-width: 880px; margin: 0 auto; padding: 2.4rem clamp(1rem, 3vw, 2rem) 3.5rem;
  display: grid; gap: 1.4rem; grid-template-columns: 1fr 1.2fr; align-items: start;
}
@media (max-width: 760px) { .ck-page { grid-template-columns: 1fr; } }
.ck-summary { background: var(--sa-card); border: 1px solid var(--sa-border); border-radius: 16px; padding: 1.6rem; box-shadow: var(--sa-shadow); }
.ck-plan { font-family: var(--sa-serif); font-size: 2.1rem; font-weight: 600; margin: 0.2rem 0; color: var(--sa-text); }
.ck-desc { color: var(--sa-text2); font-size: 0.9rem; margin: 0 0 0.8rem; }
.ck-price { font-size: 1.6rem; font-weight: 700; color: var(--sa-accent); margin: 0 0 0.9rem; }
.ck-price small { font-size: 0.72rem; font-weight: 500; color: var(--sa-text2); }
.ck-bullets { margin: 0; padding-left: 1.1rem; display: flex; flex-direction: column; gap: 0.35rem; font-size: 0.85rem; color: var(--sa-text2); }
.ck-legal { font-size: 0.76rem; color: var(--sa-text2); margin: 1rem 0 0; }
.ck-legal a { color: var(--sa-accent); font-weight: 600; text-decoration: none; }
.ck-pay { background: var(--sa-card); border: 1px solid var(--sa-border); border-radius: 16px; padding: 1.6rem; box-shadow: var(--sa-shadow); }
.ck-methods { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-bottom: 1.1rem; }
.ck-card .gate-btn { margin-top: 0.4rem; }
.ck-msi { font-size: 0.76rem; color: var(--sa-text2); text-align: center; margin: 0.6rem 0 0; }
.ck-secure {
  margin: 1.1rem 0 0; font-size: 0.76rem; line-height: 1.55; color: var(--sa-text2);
  border-top: 1px solid var(--sa-border); padding-top: 0.8rem;
}
.ck-alt { text-align: center; padding: 1rem 0; }
.ck-alt p { color: var(--sa-text2); font-size: 0.9rem; }
.ck-oxxo p { color: var(--sa-text2); font-size: 0.9rem; }
.ck-voucher { border: 1px dashed var(--sa-border); border-radius: 12px; padding: 1rem; text-align: center; margin: 0.9rem 0; }
.ck-voucher-label { font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--sa-text2); margin: 0 0 0.3rem; }
.ck-voucher-ref { font-family: var(--sa-mono); font-size: 1.25rem; font-weight: 700; color: var(--sa-text); margin: 0 0 0.7rem; }
.ck-barcode { display: flex; gap: 2px; justify-content: center; align-items: stretch; height: 46px; margin-bottom: 0.7rem; }
.ck-barcode span { background: var(--sa-text); display: block; }
.ck-voucher-amount { font-size: 0.82rem; color: var(--sa-text2); margin: 0; }

/* ---------- chat cliente-proveedor ---------- */
.vchat { margin-top: 0.4rem; border: 1px solid var(--sa-border); border-radius: 12px; overflow: hidden; }
.vchat-notice { background: var(--sa-warn-soft); padding: 0.6rem 0.8rem; font-size: 0.76rem; line-height: 1.5; color: var(--sa-text2); }
.vchat-notice p { margin: 0; }
.vchat-notice b { color: var(--sa-text); }
.vchat-tips-btn { border: none; background: none; color: var(--sa-accent); font-family: var(--sa-font); font-size: 0.76rem; font-weight: 700; cursor: pointer; padding: 0; text-decoration: underline; }
.vchat-tips { margin: 0.5rem 0 0; padding-left: 1.1rem; display: flex; flex-direction: column; gap: 0.3rem; }
.vchat-list { max-height: 220px; overflow-y: auto; padding: 0.8rem; display: flex; flex-direction: column; gap: 0.45rem; background: var(--sa-bg); }
.vchat-empty { font-size: 0.82rem; color: var(--sa-text2); text-align: center; margin: 0.6rem 0; }
.vchat-msg { max-width: 84%; padding: 0.5rem 0.75rem; border-radius: 10px; font-size: 0.86rem; line-height: 1.45; }
.vchat-msg.me { align-self: flex-end; background: var(--sa-accent); color: #fff; border-bottom-right-radius: 3px; }
.vchat-msg.vendor { align-self: flex-start; background: var(--sa-card); border: 1px solid var(--sa-border); color: var(--sa-text); border-bottom-left-radius: 3px; }
.vchat-form { display: flex; gap: 0.4rem; padding: 0.6rem; border-top: 1px solid var(--sa-border); background: var(--sa-card); }
.vchat-form .field-input { flex: 1; }
.vchat-open { width: 100%; margin-top: 0.5rem; justify-content: center; }

/* selector de idioma (banderita + iniciales) — barra compartida */
.langpick { position: relative; flex: 0 0 auto; font-family: var(--sa-font); }
.langpick-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  border: 1px solid var(--sa-border);
  border-radius: 999px;
  background: var(--sa-card);
  color: var(--sa-text2);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.32rem 0.6rem;
  cursor: pointer;
  line-height: 1;
}
.langpick-btn:hover { color: var(--sa-text); border-color: var(--sa-text2); }
.langpick-flag { width: 22px; height: 15px; border-radius: 3px; object-fit: cover; display: block; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12); }
.langpick-caret { font-size: 0.55rem; color: var(--sa-text2); transition: transform 0.18s; }
.langpick[data-open="true"] .langpick-caret { transform: rotate(180deg); }
.langpick-menu {
  position: absolute;
  top: calc(100% + 0.4rem);
  right: 0;
  min-width: 11rem;
  margin: 0;
  padding: 0.3rem;
  list-style: none;
  background: var(--sa-card);
  border: 1px solid var(--sa-border);
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.18);
  z-index: 80;
  display: none;
}
.langpick[data-open="true"] .langpick-menu { display: block; }
.langpick-menu li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.55rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--sa-text);
}
.langpick-menu li:hover { background: color-mix(in srgb, var(--sa-accent) 12%, transparent); }
.langpick-menu li .flag { width: 22px; height: 15px; border-radius: 3px; object-fit: cover; display: block; flex: 0 0 auto; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12); }
.langpick-menu li .code {
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--sa-accent);
  border: 1px solid var(--sa-border);
  border-radius: 5px;
  padding: 0.1rem 0.3rem;
  min-width: 1.9rem;
  text-align: center;
}
.langpick-menu li .name { color: var(--sa-text2); }
.langpick-menu li[aria-selected="true"] { background: color-mix(in srgb, var(--sa-accent) 12%, transparent); }
.langpick-menu li[aria-selected="true"] .name { color: var(--sa-text); font-weight: 600; }

@media (max-width: 560px) {
  .site-nav { padding: 0.55rem 0.9rem; }
  .site-nav-links { gap: 0.6rem; }
  .site-nav-links a { font-size: 0.82rem; }
  .langpick-btn { padding: 0.3rem 0.5rem; }
  .langpick-menu { right: 0; min-width: 10rem; }
}


/* ============================================================
   NUEVO · finanzas, mini-editor de mesas, paginación e iconos
   ============================================================ */

/* sub-pestañas del presupuesto */
.subtab-row { display: flex; gap: 0.45rem; flex-wrap: wrap; margin-bottom: 1.1rem; }
.chip.subtab { font-weight: 600; }

/* píldora de "por pagar" / estados */
.diff-pill {
  display: inline-block;
  padding: 0.26rem 0.6rem;
  border-radius: 99px;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}
.diff-pill.ok { background: var(--sa-green-soft); color: var(--sa-green); }
.diff-pill.due { background: var(--sa-warn-soft); color: var(--sa-warn); }
.diff-pill.late { background: var(--sa-red-soft); color: var(--sa-red); }
.diff-pill.none { background: var(--sa-soft); color: var(--sa-text2); }
.budget-table tfoot td { font-weight: 800; border-top: 2px solid var(--sa-border); padding: 0.7rem 0.8rem; }

/* checklist amigable */
.phase-count { font-size: 0.74rem; font-weight: 700; color: var(--sa-text2); margin-left: 0.45rem; }
.check-item .check-label { cursor: pointer; }
.check-item.editing {
  display: flex; gap: 0.45rem; align-items: center;
  padding: 0.5rem 0.6rem;
  border: 1px dashed var(--sa-accent);
  border-radius: 8px;
  background: var(--sa-accent-soft);
}
.check-item.editing .field-input { flex: 1; }
.check-item.editing .field-input.narrow { flex: 0 0 130px; }
.icon-btn.ok { color: var(--sa-green); border-color: var(--sa-green); }

/* cotizaciones */
.quote-card {
  border: 1px solid var(--sa-border);
  border-radius: var(--sa-radius);
  background: var(--sa-card);
  box-shadow: var(--sa-shadow);
  padding: 0.9rem 1rem 1rem;
  margin-bottom: 1.1rem;
}
.quote-head { display: flex; gap: 0.5rem; align-items: center; margin-bottom: 0.6rem; }
.quote-title { font-weight: 700; font-size: 0.95rem; flex: 1; }
.quote-table .field-input.slim { min-width: 110px; }
.quote-table .field-input.slim.num { min-width: 86px; max-width: 110px; }
.quote-empty { text-align: center; padding: 1.2rem; font-style: italic; color: var(--sa-text2); }
.quote-foot { display: flex; gap: 0.6rem; align-items: center; flex-wrap: wrap; margin-top: 0.6rem; }
.chosen-row td { background: var(--sa-green-soft); }
.pick-dot {
  width: 26px; height: 26px;
  border-radius: 50%;
  border: 2px solid var(--sa-border);
  background: var(--sa-card);
  color: var(--sa-card);
  font-size: 0.85rem; font-weight: 800;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: all 0.15s;
}
.pick-dot:hover { border-color: var(--sa-green); }
.pick-dot.on { background: var(--sa-green); border-color: var(--sa-green); color: #fff; }
.cost-cell { display: flex; flex-direction: column; gap: 0.2rem; align-items: flex-start; }
.best-tag {
  font-size: 0.62rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--sa-green); background: var(--sa-green-soft);
  padding: 0.12rem 0.45rem; border-radius: 99px;
}

/* recordatorios de pago */
.alert-card {
  display: flex; gap: 1rem;
  border: 1px solid var(--sa-border);
  border-radius: var(--sa-radius);
  background: var(--sa-card);
  box-shadow: var(--sa-shadow);
  padding: 0.9rem 1rem;
  margin-bottom: 0.8rem;
}
.alert-card.done { opacity: 0.62; }
.alert-main { flex: 1; min-width: 0; }
.alert-row { display: flex; gap: 0.45rem; flex-wrap: wrap; }
.alert-row .field-input { flex: 2 1 220px; }
.alert-row .field-input.narrow { flex: 1 1 120px; }
.alert-channels { display: flex; gap: 0.4rem; align-items: center; flex-wrap: wrap; margin-top: 0.55rem; }
.chip.canal { padding: 0.35rem 0.7rem; font-size: 0.78rem; }
.chip.canal.active { background: var(--sa-accent); border-color: var(--sa-accent); color: #fff; }
.alert-side {
  display: flex; flex-direction: column; gap: 0.4rem;
  align-items: flex-end; justify-content: flex-start;
  flex: 0 0 auto;
}
.alert-monto { font-weight: 800; font-size: 1.02rem; }
@media (max-width: 640px) {
  .alert-card { flex-direction: column; }
  .alert-side { flex-direction: row; align-items: center; flex-wrap: wrap; }
}

/* mini editor del plano */
.plano-toolbar {
  display: flex; gap: 0.4rem; align-items: center; flex-wrap: wrap;
  margin: 0.9rem 0 0.5rem;
}
.chip.elem-add { padding: 0.38rem 0.7rem; font-size: 0.77rem; }
.chip.elem-add.tone-accent { border-color: var(--sa-accent); color: var(--sa-accent); }
.chip.elem-add.tone-green { border-color: var(--sa-green); color: var(--sa-green); }
.chip.elem-add.tone-warn { border-color: var(--sa-warn); color: var(--sa-warn); }
.chip.elem-add.tone-dark { border-color: var(--sa-text); color: var(--sa-text); }
.chip.elem-add.tone-wall { border-style: dashed; }

/* barra de forma del salón */
.plano-roombar {
  display: flex; gap: 0.6rem; align-items: center; flex-wrap: wrap;
  margin-bottom: 0.7rem;
  padding: 0.55rem 0.7rem;
  background: var(--sa-soft);
  border-radius: 10px;
}
.room-dim { display: flex; align-items: center; gap: 0.35rem; font-size: 0.78rem; font-weight: 600; color: var(--sa-text2); }
.room-dim .field-input { width: 64px; padding: 0.3rem 0.4rem; }
.room-x { font-weight: 700; color: var(--sa-text2); }
.room-hint { flex: 1 1 200px; font-size: 0.72rem; color: var(--sa-text2); font-style: italic; }
.names-toggle { display: flex; align-items: center; gap: 0.4rem; font-size: 0.8rem; font-weight: 600; cursor: pointer; }
.names-toggle input { width: 16px; height: 16px; accent-color: var(--sa-accent); }

.plano.dragging { cursor: grabbing; }
/* contorno del salón dibujado a mano */
.plano-floor { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.plano-floor polygon { fill: var(--sa-accent-soft); stroke: var(--sa-accent); stroke-width: 2px; stroke-linejoin: round; }
.plano-draw-layer { position: absolute; inset: 0; z-index: 30; cursor: crosshair; }
.room-point {
  position: absolute;
  width: 20px; height: 20px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: var(--sa-accent);
  border: 2px solid var(--sa-card);
  color: #fff;
  font-size: 0.62rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  cursor: grab; touch-action: none;
  box-shadow: 0 1px 4px rgba(0,0,0,0.25);
}
.room-point:active { cursor: grabbing; }
.plano-el {
  position: absolute;
  transform: translate(-50%, -50%);
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  border: 1.5px solid var(--sa-border);
  background: var(--sa-soft);
  color: var(--sa-text2);
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.04em;
  cursor: grab;
  user-select: none;
  touch-action: none;
  padding: 0.15rem 0.3rem;
  min-width: 22px; min-height: 18px;
}
.plano-el:active { cursor: grabbing; }
.plano-el.sel { box-shadow: 0 0 0 2px var(--sa-card), 0 0 0 4px var(--sa-accent); z-index: 4; }
.plano-el .el-label { pointer-events: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
/* tirador de tamaño (esquina inferior derecha) */
.el-resize {
  position: absolute;
  right: -7px; bottom: -7px;
  width: 15px; height: 15px;
  border-radius: 4px;
  background: var(--sa-accent);
  border: 2px solid var(--sa-card);
  cursor: nwse-resize;
  touch-action: none;
  z-index: 6;
}
/* formas */
.shape-rect { border-radius: 4px; }
.shape-rounded { border-radius: 12px; }
.shape-circle { border-radius: 50%; }
.shape-pill { border-radius: 999px; }
.shape-text {
  border: none; background: transparent; padding: 0;
  color: var(--sa-text); font-size: 0.82rem; letter-spacing: 0;
}
.shape-text.sel { box-shadow: none; outline: 1.5px dashed var(--sa-accent); outline-offset: 3px; }
/* colores (tonos) */
.tone-neutral { background: var(--sa-soft); border-style: dashed; border-color: var(--sa-border); color: var(--sa-text2); }
.tone-accent { background: var(--sa-accent-soft); border-color: var(--sa-accent); color: var(--sa-accent); }
.tone-green { background: var(--sa-green-soft); border-color: var(--sa-green); color: var(--sa-green); }
.tone-warn { background: var(--sa-warn-soft); border-color: var(--sa-warn); color: var(--sa-warn); }
.tone-dark { background: var(--sa-text); border-color: var(--sa-text); color: var(--sa-card); }
.tone-wall {
  background: repeating-linear-gradient(45deg, var(--sa-border) 0 5px, transparent 5px 10px);
  border: 1.5px solid var(--sa-text2); color: var(--sa-text2);
}
.shape-text.tone-accent { background: transparent; color: var(--sa-accent); }
.shape-text.tone-green { background: transparent; color: var(--sa-green); }
.shape-text.tone-warn { background: transparent; color: var(--sa-warn); }
.shape-text.tone-dark { background: transparent; color: var(--sa-text); }
.plano-trash {
  position: absolute;
  right: 10px; bottom: 10px;
  display: flex; flex-direction: column; align-items: center; gap: 0.1rem;
  padding: 0.55rem 0.7rem;
  border: 2px dashed var(--sa-border);
  border-radius: 12px;
  background: var(--sa-card);
  color: var(--sa-text2);
  font-size: 1.1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s, transform 0.15s;
  z-index: 5;
}
.plano-trash span { font-size: 0.6rem; font-weight: 700; letter-spacing: 0.05em; max-width: 110px; text-align: center; }
.plano-trash.show { opacity: 1; }
.plano-trash.hot {
  border-color: var(--sa-red);
  background: var(--sa-red-soft);
  color: var(--sa-red);
  transform: scale(1.08);
}

/* lugares por mesa (un campo por mesa) */
.cap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: 0.55rem;
  max-width: 760px;
}
.cap-cell {
  display: flex; flex-direction: column; gap: 0.25rem;
  border: 1px solid var(--sa-border);
  border-radius: 8px;
  background: var(--sa-card);
  padding: 0.55rem 0.6rem;
}
.cap-cell.over { border-color: var(--sa-red); background: var(--sa-red-soft); }
.cap-name { font-size: 0.76rem; font-weight: 800; }
.cap-occ { font-size: 0.68rem; color: var(--sa-text2); }
.cap-cell .field-input.slim.num { width: 100%; }

/* paginación de invitados */
.pager {
  display: flex; gap: 0.8rem; align-items: center; flex-wrap: wrap;
  margin-top: 0.8rem;
  padding: 0.6rem 0.2rem;
}
.pager-info { font-size: 0.8rem; color: var(--sa-text2); }
.pager-sizes, .pager-nav { display: flex; gap: 0.35rem; align-items: center; }
.pager-nav { margin-left: auto; }
.pager-label { font-size: 0.78rem; font-weight: 600; color: var(--sa-text2); }
.pager .chip:disabled { opacity: 0.4; cursor: default; }

/* iconos subidos (multimedia) */
.icons-legal {
  border: 1px solid var(--sa-warn);
  background: var(--sa-warn-soft);
  color: var(--sa-warn);
  border-radius: 8px;
  padding: 0.6rem 0.8rem;
  font-size: 0.8rem;
  line-height: 1.45;
  max-width: 640px;
  margin-bottom: 0.8rem;
}
.icons-grid { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.icons-subhead { font-size: 0.86rem; font-weight: 700; margin: 1.1rem 0 0.2rem; color: var(--sa-text); }
.icon-cell.preset { cursor: pointer; opacity: 0.62; transition: opacity 0.15s, border-color 0.15s; }
.icon-cell.preset:hover { opacity: 1; border-color: var(--sa-accent); }
.icon-cell.preset.on { opacity: 1; border-color: var(--sa-accent); background: var(--sa-accent-soft); }
.icon-on {
  position: absolute; top: -7px; right: -7px;
  width: 19px; height: 19px;
  border-radius: 50%;
  background: var(--sa-accent); color: #fff;
  font-size: 0.7rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--sa-card);
}
.icon-cell {
  position: relative;
  width: 74px; height: 74px;
  border: 1px solid var(--sa-border);
  border-radius: 10px;
  background: var(--sa-card);
  display: flex; align-items: center; justify-content: center;
  padding: 9px;
}
.icon-cell img { max-width: 100%; max-height: 100%; object-fit: contain; }
.icon-cell.add {
  cursor: pointer;
  border-style: dashed;
  color: var(--sa-text2);
  font-size: 1.5rem;
}
.icon-cell.add:hover { border-color: var(--sa-accent); color: var(--sa-accent); }


/* ============================================================
   Plantillas (panel admin)
   ============================================================ */
.tpl-admin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 1.1rem; }
.tpl-admin-card { border: 1px solid var(--sa-border); border-radius: var(--sa-radius); background: var(--sa-card); overflow: hidden; box-shadow: var(--sa-shadow); transition: box-shadow 0.15s, border-color 0.15s; }
.tpl-admin-card.def { border-color: var(--sa-accent); box-shadow: 0 0 0 2px var(--sa-accent-soft), var(--sa-shadow); }
.tpl-admin-card.off { opacity: 0.62; }
.tpl-admin-preview { position: relative; height: 250px; overflow: hidden; display: flex; align-items: flex-start; justify-content: center; }
.minidoc-frame { position: relative; width: 190px; height: 250px; overflow: hidden; }
.minidoc { position: absolute; top: 0; left: 0; transform-origin: top left; }
.tpl-def-badge { position: absolute; top: 8px; left: 8px; background: var(--sa-accent); color: #2a2008; font-size: 0.64rem; font-weight: 800; padding: 0.18rem 0.5rem; border-radius: 99px; z-index: 2; }
.tpl-off-badge { position: absolute; top: 8px; right: 8px; background: rgba(0,0,0,0.55); color: #fff; font-size: 0.64rem; font-weight: 700; padding: 0.18rem 0.5rem; border-radius: 99px; z-index: 2; }
.tpl-admin-body { padding: 0.7rem 0.8rem 0.9rem; }
.tpl-admin-name { font-family: 'Playfair Display', Georgia, serif; font-size: 1.05rem; font-weight: 600; }
.tpl-admin-tag { font-size: 0.74rem; color: var(--sa-text2); margin-bottom: 0.6rem; }
.tpl-admin-acts { display: flex; flex-direction: column; gap: 0.35rem; }
.tpl-admin-acts .chip { width: 100%; text-align: center; justify-content: center; }
.tpl-admin-acts .chip:disabled { opacity: 0.55; cursor: default; }


/* ============================================================
   Presupuesto v2 — gráfica, barras y control de deudas
   ============================================================ */
.bud-limit { display: flex; align-items: center; gap: 0.7rem; max-width: 460px; margin: 0.2rem 0 0.4rem; }
.bud-limit-bar { flex: 1; }
.bud-limit .ci-progress-fill.over { background: var(--sa-red); }
.bud-limit-lbl { font-size: 0.76rem; font-weight: 700; color: var(--sa-text2); white-space: nowrap; }
.bud-limit-lbl.over { color: var(--sa-red); }

.bud-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); gap: 1rem; margin-top: 1.2rem; }
.bud-card { border: 1px solid var(--sa-border); border-radius: var(--sa-radius); background: var(--sa-card); box-shadow: var(--sa-shadow); padding: 1rem 1.1rem 1.1rem; }
.bud-card.deudas { margin-top: 1rem; }

.bud-donut-row { display: flex; gap: 1.1rem; align-items: center; flex-wrap: wrap; }
.donut-num { font-size: 5.4px; font-weight: 800; fill: var(--sa-text); font-family: inherit; }
.donut-lbl { font-size: 2.6px; letter-spacing: 0.08em; fill: var(--sa-text2); text-transform: uppercase; }
.bud-legend { flex: 1; min-width: 180px; display: flex; flex-direction: column; gap: 0.34rem; }
.bud-leg-row { display: flex; align-items: center; gap: 0.5rem; font-size: 0.82rem; }
.bud-leg-dot { width: 10px; height: 10px; border-radius: 3px; flex: 0 0 auto; }
.bud-leg-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bud-leg-amt { font-weight: 700; }
.bud-leg-pct { color: var(--sa-text2); font-size: 0.72rem; width: 34px; text-align: right; }

.bud-bars { display: flex; flex-direction: column; gap: 0.55rem; }
.bbar-row { display: grid; grid-template-columns: minmax(84px, 130px) 1fr auto; gap: 0.6rem; align-items: center; }
.bbar-name { font-size: 0.78rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bbar-track { position: relative; height: 16px; background: transparent; }
.bbar-est { position: absolute; top: 0; left: 0; height: 100%; background: var(--sa-soft); border: 1px dashed var(--sa-border); border-radius: 5px; box-sizing: border-box; }
.bbar-real { position: absolute; top: 3px; left: 0; height: 10px; border-radius: 4px; overflow: hidden; display: block; }
.bbar-paid { position: absolute; top: 0; left: 0; height: 100%; background: rgba(255,255,255,0.45); display: block; }
.bbar-nums { font-size: 0.74rem; font-weight: 700; white-space: nowrap; }
.bbar-nums i { font-style: normal; color: var(--sa-text2); font-weight: 500; }
.bbar-key { display: flex; gap: 1rem; margin-top: 0.4rem; font-size: 0.68rem; color: var(--sa-text2); flex-wrap: wrap; }
.bbar-key i { display: inline-block; width: 14px; height: 8px; border-radius: 3px; margin-right: 0.3rem; vertical-align: middle; }
.bbar-key .k-est { background: var(--sa-soft); border: 1px dashed var(--sa-border); box-sizing: border-box; }
.bbar-key .k-real { background: var(--sa-accent); }
.bbar-key .k-paid { background: var(--sa-accent); position: relative; }
.bbar-key .k-paid::after { content: ""; position: absolute; inset: 0; background: rgba(255,255,255,0.45); border-radius: 3px; }

.deudas-head { display: flex; align-items: center; gap: 0.7rem; margin-bottom: 0.7rem; flex-wrap: wrap; }
.deudas-list { display: flex; flex-direction: column; gap: 0.45rem; }
.deuda-row { display: flex; align-items: center; gap: 0.6rem; padding: 0.5rem 0.6rem; border: 1px solid var(--sa-border); border-radius: 9px; background: var(--sa-bg); flex-wrap: wrap; }
.deuda-dot { width: 10px; height: 10px; border-radius: 50%; flex: 0 0 auto; }
.deuda-name { font-weight: 700; font-size: 0.86rem; }
.deuda-detail { flex: 1; font-size: 0.74rem; color: var(--sa-text2); min-width: 120px; }

.bud-edit { margin-top: 1.1rem; border-top: 1px solid var(--sa-border); padding-top: 0.8rem; }
.bud-edit summary { cursor: pointer; font-size: 0.85rem; font-weight: 700; color: var(--sa-text2); list-style: none; }
.bud-edit summary::-webkit-details-marker { display: none; }
.bud-edit summary:hover { color: var(--sa-text); }
