/* =============================================================================
   IwaiTech — estilos de la aplicación (dashboard, login y admin)
   Paleta "Azul niebla": fondo casi blanco, superficies blancas y un acento azul suave.
   Los colores de estado (asiste / no asiste / pendiente) son fijos en toda la app.
   ============================================================================= */

:root {
  --bg: #f9fafc;
  --surface: #ffffff;
  --ink: #2b3040;
  --muted: #767d92;
  --line: #e2e6ef;
  --line-strong: #cfd5e3;
  --accent: #6a7db0;
  --accent-strong: #56699c;
  --accent-ink: #ffffff;
  --accent-soft: #e8ecf7;

  --ok: #3d8a5c;
  --ok-soft: #e4f2e9;
  --no: #a3584a;
  --no-soft: #f6e6e2;
  --wait: #a77a22;
  --wait-soft: #f8eed9;
  --idle: #7c8290;
  --idle-soft: #eef0f4;
  --wa: #25d366;
  --wa-ink: #0a3d1f;

  /* Gráficas (validadas para daltonismo: verde/coral difieren en tono y claridad).
     Siempre van acompañadas de números y leyenda escritos. */
  --chart-yes: #1f8a55;
  --chart-no: #ec8a68;
  --chart-track: #e6e9f1;
  --chart-done: #56699c;
  --chart-wait: #a9b6d8;

  --display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --body: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --radius: 12px;
  --radius-lg: 16px;
  --shadow: 0 1px 2px rgba(43, 48, 64, 0.04), 0 8px 24px rgba(43, 48, 64, 0.06);
  --nav-width: 220px;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 15px;
  line-height: 1.5;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  text-wrap: balance;
}

p {
  margin: 0;
}

.hidden {
  display: none !important;
}

.muted {
  color: var(--muted);
}

.small-text {
  font-size: 0.85rem;
}

.display {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: 0.005em;
}

/* -----------------------------------------------------------------------------
   Formularios
   ----------------------------------------------------------------------------- */

form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

label {
  font-weight: 600;
  font-size: 0.88rem;
  margin-top: 8px;
}

input,
select,
textarea {
  font: inherit;
  color: var(--ink);
  background: var(--surface);
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  width: 100%;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}

/* Los radios y casillas nunca toman el 100% de ancho: si además están ocultos con
   position:absolute, ese 100% sería el de la página y provocaría scroll horizontal. */
input[type="checkbox"],
input[type="radio"] {
  width: auto;
  accent-color: var(--accent);
}

fieldset {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 8px 0 0;
  padding: 12px 14px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

legend {
  font-weight: 700;
  color: var(--accent-strong);
  padding: 0 4px;
}

.form-error,
.field-error {
  color: var(--no);
  margin: 2px 0 0;
}

.field-error {
  font-size: 0.82rem;
}

.success {
  color: var(--ok);
  font-weight: 600;
}

.checkbox {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-weight: 500;
  white-space: nowrap;
}

/* -----------------------------------------------------------------------------
   Botones: primario por defecto; .secondary = contorno; .whatsapp; .danger; .small; .link
   ----------------------------------------------------------------------------- */

button {
  font: inherit;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 18px;
  border: 1px solid var(--accent);
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

button:hover {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
}

button:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

button:disabled {
  opacity: 0.6;
  cursor: wait;
}

button.secondary {
  background: var(--surface);
  color: var(--accent-strong);
  border-color: var(--line-strong);
}

button.secondary:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
}

button.whatsapp {
  background: var(--wa);
  border-color: var(--wa);
  color: var(--wa-ink);
}

button.whatsapp:hover {
  background: #1fbf5b;
  border-color: #1fbf5b;
}

button.danger {
  background: var(--surface);
  color: var(--no);
  border-color: #e7c9c2;
}

button.danger:hover {
  background: var(--no-soft);
}

button.small {
  padding: 6px 12px;
  font-size: 0.84rem;
}

button.link {
  background: none;
  border: 0;
  padding: 4px 0;
  color: var(--accent-strong);
  border-radius: 4px;
}

button.link:hover {
  text-decoration: underline;
  background: none;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

/* -----------------------------------------------------------------------------
   Tarjetas, insignias y estados
   ----------------------------------------------------------------------------- */

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px;
}

.card h3 {
  font-size: 1.05rem;
}

.badge,
.status,
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 600;
  white-space: nowrap;
}

.status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.badge-on,
.pill-yes,
.s-done {
  color: var(--ok);
  background: var(--ok-soft);
}

.badge-off,
.pill-no {
  color: var(--no);
  background: var(--no-soft);
}

.badge-neutral,
.pill-wait,
.s-idle {
  color: var(--idle);
  background: var(--idle-soft);
}

.s-sent {
  color: var(--wait);
  background: var(--wait-soft);
}

.s-open {
  color: var(--accent-strong);
  background: var(--accent-soft);
}

/* -----------------------------------------------------------------------------
   Pantalla de acceso (login y cambio de contraseña)
   ----------------------------------------------------------------------------- */

.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px 16px;
  background: radial-gradient(120% 80% at 50% 0%, var(--accent-soft) 0%, var(--bg) 60%);
}

.auth {
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.brand {
  font-family: var(--display);
  font-weight: 600;
  font-size: 2.4rem;
  line-height: 1;
  color: var(--ink);
  text-align: center;
}

.brand small {
  display: block;
  margin-top: 6px;
  font-family: var(--body);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.auth .card {
  box-shadow: var(--shadow);
}

.auth form button[type="submit"] {
  margin-top: 12px;
}

/* -----------------------------------------------------------------------------
   Estructura: barra lateral (escritorio) / barra inferior (celular)
   ----------------------------------------------------------------------------- */

.shell {
  display: grid;
  grid-template-columns: var(--nav-width) minmax(0, 1fr);
  min-height: 100vh;
}

.nav {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 22px 14px;
  background: var(--surface);
  border-right: 1px solid var(--line);
}

.nav .brand {
  font-size: 1.7rem;
  text-align: left;
  padding: 0 10px 18px;
}

.nav-item {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-weight: 500;
}

.nav-item:hover {
  background: var(--bg);
  color: var(--ink);
}

.nav-item.active {
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-weight: 700;
}

.nav-item svg {
  width: 20px;
  height: 20px;
  flex: none;
}

.nav-footer {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 10px 0;
  border-top: 1px solid var(--line);
  font-size: 0.85rem;
}

.nav-footer .link {
  align-self: flex-start;
}

.nav-footer strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.content {
  min-width: 0;
  padding: 28px 32px 48px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.page-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px 20px;
}

.page-header .titles {
  flex: 1 1 260px;
  min-width: 0;
}

.page-header h1 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.9rem, 3.2vw, 2.5rem);
  line-height: 1.05;
}

.page-header p {
  color: var(--muted);
  margin-top: 6px;
}

.view {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.view-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.view-header h2 {
  font-size: 1.15rem;
}

/* -----------------------------------------------------------------------------
   Invitados: fichas-filtro, lista compacta y panel de detalle
   ----------------------------------------------------------------------------- */

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

.chip {
  padding: 7px 14px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-weight: 500;
  font-size: 0.86rem;
}

.chip:hover {
  background: var(--accent-soft);
  border-color: var(--line-strong);
}

.chip b {
  font-variant-numeric: tabular-nums;
}

.chip.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

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

.toolbar input {
  flex: 1 1 240px;
  width: auto;
  border-radius: 999px;
  padding-left: 16px;
}

.toolbar select {
  flex: 0 1 230px;
  width: auto;
  border-radius: 999px;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.list {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.row {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  width: 100%;
  padding: 12px 16px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font-weight: 400;
  text-align: left;
}

.row:last-child {
  border-bottom: 0;
}

.row:hover {
  background: var(--bg);
}

.row:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.row.selected {
  background: var(--accent-soft);
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.82rem;
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.row.selected .avatar {
  background: var(--accent);
  color: var(--accent-ink);
}

.row-text {
  min-width: 0;
}

.row-name {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.row-sub {
  font-size: 0.82rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.row-end {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.count {
  font-size: 0.78rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.list-footer {
  display: flex;
  justify-content: center;
  padding: 12px;
}

.empty {
  padding: 36px 20px;
  text-align: center;
  color: var(--muted);
}

.detail {
  position: sticky;
  top: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow);
}

.detail-back {
  display: none;
}

.detail h2 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.75rem;
  line-height: 1.1;
}

.timeline {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.timeline span {
  font-size: 0.78rem;
  padding: 3px 9px;
  border-radius: 8px;
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--muted);
}

.people {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.people li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}

.people li:last-child {
  border-bottom: 0;
}

.people small {
  color: var(--muted);
}

.detail-meta {
  display: grid;
  gap: 4px;
  font-size: 0.86rem;
  color: var(--muted);
}

.detail-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.detail-actions .whatsapp {
  width: 100%;
}

/* -----------------------------------------------------------------------------
   Resumen: indicadores y barras
   ----------------------------------------------------------------------------- */

.kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.kpi {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

.kpi-label {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.kpi-value {
  font-family: var(--display);
  font-size: 2.6rem;
  font-weight: 600;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.kpi.primary {
  background: var(--accent-soft);
  border-color: transparent;
}

.kpi.primary .kpi-value {
  color: var(--accent-strong);
}

.kpi-sub {
  font-size: 0.84rem;
  color: var(--muted);
}

.summary-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.summary-grid .card {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.card-title {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}

/* Barra apilada: segmentos con 2px de separación y extremos redondeados. */
.bar {
  display: flex;
  gap: 2px;
  height: 12px;
  border-radius: 6px;
  overflow: hidden;
  background: var(--chart-track);
}

.bar.thick {
  height: 18px;
  border-radius: 9px;
}

.bar span {
  height: 100%;
  min-width: 0;
}

.bar span:first-child {
  border-radius: 6px 0 0 6px;
}

.seg-yes {
  background: var(--chart-yes);
}

.seg-no {
  background: var(--chart-no);
}

.seg-done {
  background: var(--chart-done);
}

.seg-wait {
  background: var(--chart-wait);
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  font-size: 0.84rem;
  color: var(--muted);
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend b {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.legend i {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  display: inline-block;
}

.legend i.track {
  background: var(--chart-track);
  box-shadow: inset 0 0 0 1px var(--line-strong);
}

.category-rows {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.category-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.category-row header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

.category-row strong {
  font-weight: 600;
}

.category-row .count {
  font-size: 0.82rem;
}

.plain-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.plain-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.9rem;
}

.plain-list li:last-child {
  border-bottom: 0;
}

.plain-list small {
  color: var(--muted);
}

.next-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* -----------------------------------------------------------------------------
   Diálogos (nueva invitación, editar, registrar respuesta)
   ----------------------------------------------------------------------------- */

dialog {
  width: min(580px, calc(100% - 32px));
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  padding: 0;
  border: 0;
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 24px 64px rgba(43, 48, 64, 0.22);
}

dialog::backdrop {
  background: rgba(43, 48, 64, 0.35);
}

dialog form {
  padding: 24px;
}

.dialog-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.dialog-head h3 {
  font-family: var(--display);
  font-size: 1.6rem;
  font-weight: 600;
  line-height: 1.1;
}

.dialog-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.member-row {
  display: grid;
  grid-template-columns: 1fr 1fr auto auto;
  gap: 8px;
  align-items: center;
}

.rsvp-row {
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
}

.rsvp-row select {
  width: auto;
}

.export-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 8px;
}

.export-option {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.export-option h4 {
  font-size: 1rem;
}

.export-option button {
  margin-top: auto;
}

fieldset .checkbox {
  white-space: normal;
  margin: 0;
}

.danger-zone {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
  padding-top: 14px;
  border-top: 1px dashed var(--line-strong);
}

/* -----------------------------------------------------------------------------
   Admin: clientes
   ----------------------------------------------------------------------------- */

.table-wrap {
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

th,
td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th {
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  background: var(--bg);
}

tbody tr:last-child td {
  border-bottom: 0;
}

td .badge + button {
  display: flex;
  margin-top: 6px;
}

td.actions {
  flex-wrap: nowrap;
}

.notice {
  border-color: var(--accent);
  box-shadow: var(--shadow);
}

pre {
  white-space: pre-wrap;
  background: var(--bg);
  border: 1px solid var(--line);
  padding: 12px 14px;
  border-radius: 10px;
  font-family: var(--body);
  font-size: 0.88rem;
  margin: 8px 0;
}

/* -----------------------------------------------------------------------------
   Mi boda
   ----------------------------------------------------------------------------- */

.form-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-section + .form-section {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.upsell {
  border-style: dashed;
  border-color: var(--accent);
  background: linear-gradient(135deg, var(--surface) 0%, var(--accent-soft) 100%);
}

.upsell h3 {
  font-family: var(--display);
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.narrow {
  max-width: 720px;
}

.template-picker {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
}

.template-option {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  font-weight: 400;
  cursor: pointer;
}

.template-option:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.template-option input {
  width: auto;
  accent-color: var(--accent);
}

.template-option b {
  display: block;
}

.template-option small {
  color: var(--muted);
}

.template-swatch {
  width: 42px;
  height: 42px;
  flex: none;
  border-radius: 10px;
  border: 1px solid var(--line);
}

.color-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.color-option {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 6px 12px 6px 6px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-weight: 500;
  cursor: pointer;
}

.color-option:has(input:checked) {
  border-color: var(--ink);
  box-shadow: 0 0 0 1px var(--ink);
}

.color-option:has(input:focus-visible) {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.color-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.color-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  flex: none;
}

.dot-default {
  background: conic-gradient(#a8875a 0 50%, #6f8f7a 50% 100%);
}

.cover-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cover-preview {
  display: grid;
  place-items: center;
  min-height: 120px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: var(--bg);
  overflow: hidden;
}

.cover-preview img {
  width: 100%;
  max-height: 260px;
  object-fit: cover;
  display: block;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 8px;
}

.photo-thumb {
  position: relative;
  aspect-ratio: 1;
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg);
}

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

.photo-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(43, 48, 64, 0.72);
  color: #fff;
  font-size: 1.1rem;
  line-height: 1;
}

.photo-remove:hover {
  background: var(--no);
}

.gift-option {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 8px 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
}

.gift-option-head {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.gift-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
  font-size: 0.82rem;
}

.gift-add {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.gift-add select {
  flex: 1 1 200px;
  width: auto;
}

.swatch-elegant {
  background: linear-gradient(135deg, #fbf8f2 0 55%, #a8875a 55% 100%);
}

.swatch-garden {
  background: linear-gradient(135deg, #fafbf8 0 55%, #6f8f7a 55% 100%);
}

/* -----------------------------------------------------------------------------
   Celular
   ----------------------------------------------------------------------------- */

@media (max-width: 860px) {
  .shell {
    grid-template-columns: minmax(0, 1fr);
  }

  /* La barra lateral se vuelve barra inferior fija. */
  .nav {
    position: fixed;
    inset: auto 0 0 0;
    z-index: 20;
    height: auto;
    flex-direction: row;
    justify-content: space-around;
    gap: 0;
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px));
    border-right: 0;
    border-top: 1px solid var(--line);
  }

  .nav .brand,
  .nav-footer {
    display: none;
  }

  .nav-item {
    flex: 1;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    font-size: 0.72rem;
    padding: 6px 4px;
  }

  .nav-item.active {
    background: transparent;
  }

  .content {
    padding: 20px 16px 96px;
  }

  .split,
  .summary-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .kpi-value {
    font-size: 2.1rem;
  }

  /* El detalle se abre como pantalla completa sobre la lista. */
  .detail {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 30;
    border-radius: 0;
    border: 0;
    overflow-y: auto;
    padding: 16px 16px calc(24px + env(safe-area-inset-bottom, 0px));
  }

  .detail.open {
    display: flex;
  }

  .detail-back {
    display: inline-flex;
    align-self: flex-start;
  }

  .member-row {
    grid-template-columns: 1fr 1fr;
  }

  .rsvp-row {
    grid-template-columns: 1fr 1fr;
  }

  .rsvp-row span {
    grid-column: 1 / -1;
    font-weight: 600;
  }

  dialog {
    width: 100%;
    max-width: none;
    max-height: 100%;
    height: 100%;
    margin: 0;
    border-radius: 0;
  }
}

.mobile-only {
  display: none !important;
}

@media (max-width: 860px) {
  .mobile-only {
    display: inline-flex !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
