/* ==========================================================================
   Mi Día E — estilos del sitio, autenticación y paneles
   ========================================================================== */
:root {
  --blue: #2F5BEA;
  --blue-600: #2349C9;
  --purple: #8A3FFC;
  --purple-600: #7429E6;
  --grad: linear-gradient(120deg, #2F5BEA 0%, #8A3FFC 100%);
  --ink: #1C1B33;
  --ink-2: #4A4A68;
  --muted: #7A7A96;
  --line: #E7E5F2;
  --bg: #FFFFFF;
  --bg-soft: #F7F6FC;
  --bg-tint: #F1EDFF;
  --ok: #12A150;
  --ok-bg: #E7F8EE;
  --warn: #B7791F;
  --warn-bg: #FFF6E0;
  --err: #D92D4B;
  --err-bg: #FDECEF;
  --info-bg: #EEF2FF;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 10px 30px rgba(38, 30, 110, .08);
  --shadow-lg: 0 24px 60px rgba(38, 30, 110, .14);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-head: 'Poppins', var(--font);
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
html, body { overflow-x: clip; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.6; font-size: 16px; }
img, svg, video { max-width: 100%; }
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--purple); }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 4.6vw, 3.4rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.4rem); font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 600; }
p { margin: 0 0 1em; }
.container { width: min(1180px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(760px, 100% - 32px); margin-inline: auto; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.center { text-align: center; }
.hidden { display: none !important; }
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; border: 0 !important; overflow: hidden !important; clip: rect(0 0 0 0) !important; white-space: nowrap !important; }
/* Campo trampa anti-spam: fuera de la vista sin afectar el ancho de la página */
.hp-field { position: absolute !important; left: 0 !important; top: 0 !important; width: 1px !important; height: 1px !important; padding: 0 !important; border: 0 !important; opacity: 0 !important; pointer-events: none !important; overflow: hidden !important; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: .8em 1.4em; border-radius: 999px; border: 1.5px solid transparent;
  font: 600 .95rem/1.2 var(--font-head); cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease, color .15s;
  background: var(--bg-soft); color: var(--ink);
}
.btn:hover { transform: translateY(-1px); color: inherit; }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 8px 20px rgba(98, 60, 240, .28); }
.btn-primary:hover { color: #fff; box-shadow: 0 12px 26px rgba(98, 60, 240, .36); }
.btn-outline { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-outline:hover { border-color: var(--purple); color: var(--purple); }
.btn-ghost { background: transparent; color: var(--ink-2); padding-inline: .8em; }
.btn-danger { background: var(--err-bg); color: var(--err); }
.btn-danger:hover { background: var(--err); color: #fff; }
.btn-success { background: var(--ok); color: #fff; }
.btn-sm { padding: .5em 1em; font-size: .85rem; }
.btn-lg { padding: 1em 1.8em; font-size: 1.05rem; }
.btn-block { width: 100%; }
.btn[disabled], .btn.disabled { opacity: .5; pointer-events: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }

/* ---------- Encabezado del sitio ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.86); backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.site-header.scrolled { border-color: var(--line); }
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 1rem; }
.brand img { height: 40px; width: auto; display: block; }
.nav { display: flex; align-items: center; gap: 1.6rem; }
.nav a:not(.btn) { color: var(--ink-2); font-weight: 500; font-size: .95rem; }
.nav a:not(.btn):hover { color: var(--purple); }
.nav-toggle { display: none; background: none; border: 0; padding: .4rem; cursor: pointer; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--ink); margin: 5px 0; border-radius: 2px; }
@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .nav { position: absolute; top: 72px; left: 0; right: 0; background: #fff; flex-direction: column; align-items: stretch; padding: 1rem 16px 1.4rem; gap: .9rem; border-bottom: 1px solid var(--line); box-shadow: var(--shadow); display: none; }
  .nav.open { display: flex; }
  .nav .btn { width: 100%; }
}

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: clamp(3rem, 7vw, 6rem) 0 clamp(3rem, 6vw, 5rem); background:
  radial-gradient(900px 420px at 88% -10%, rgba(138,63,252,.14), transparent 60%),
  radial-gradient(700px 400px at -10% 30%, rgba(47,91,234,.12), transparent 60%); }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 3rem; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: .5rem; font: 600 .8rem/1 var(--font-head); letter-spacing: .12em; text-transform: uppercase; color: var(--purple); background: var(--bg-tint); padding: .55rem .9rem; border-radius: 999px; margin-bottom: 1.2rem; }
.hero p.lead { font-size: 1.15rem; color: var(--ink-2); max-width: 36em; }
.hero .btn-row { margin-top: 1.8rem; }
.hero-trust { display: flex; gap: 1.6rem; margin-top: 2rem; flex-wrap: wrap; color: var(--ink-2); font-size: .9rem; }
.hero-trust strong { font-family: var(--font-head); color: var(--ink); display: block; font-size: 1.3rem; }
.hero-visual { position: relative; height: 520px; }
.hero-visual .phone { position: absolute; width: 250px; height: 500px; border-radius: 38px; background: #111; padding: 10px; box-shadow: var(--shadow-lg); }
.hero-visual .phone .screen { width: 100%; height: 100%; border-radius: 30px; overflow: hidden; background: #fff; position: relative; }
.hero-visual .phone .screen iframe { width: 390px; height: 780px; border: 0; transform: scale(.588); transform-origin: 0 0; pointer-events: none; }
.hero-visual .phone.p1 { left: 8%; top: 10px; transform: rotate(-6deg); z-index: 2; }
.hero-visual .phone.p2 { right: 4%; top: 20px; transform: rotate(5deg); }
.hero-visual .badge { position: absolute; z-index: 3; background: #fff; border-radius: 14px; padding: .75rem 1rem; box-shadow: var(--shadow); font-size: .85rem; display: flex; gap: .6rem; align-items: center; }
.hero-visual .badge b { font-family: var(--font-head); }
.hero-visual .badge.b1 { left: 0; bottom: 60px; }
.hero-visual .badge.b2 { right: 0; bottom: 10px; }
.badge-ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--bg-tint); font-size: 1.1rem; }
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { height: 440px; max-width: 460px; margin: 0 auto; width: 100%; }
  .hero-visual .phone { width: 210px; height: 420px; }
  .hero-visual .phone .screen iframe { transform: scale(.487); }
}
@media (max-width: 520px) {
  .hero-visual { height: 380px; }
  .hero-visual .phone { width: 180px; height: 360px; border-radius: 30px; }
  .hero-visual .phone .screen { border-radius: 24px; }
  .hero-visual .phone .screen iframe { transform: scale(.41); }
  .hero-visual .phone.p1 { left: 0; }
  .hero-visual .phone.p2 { right: 0; }
}

/* ---------- Secciones ---------- */
.section { padding: clamp(3.5rem, 7vw, 6rem) 0; }
.section-soft { background: var(--bg-soft); }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 3rem; }
.section-head p { color: var(--ink-2); font-size: 1.08rem; }
.grid { display: grid; gap: 1.4rem; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-events { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
@media (max-width: 960px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem; }
.card-hover { transition: transform .2s, box-shadow .2s, border-color .2s; }
.card-hover:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: transparent; }

.step { position: relative; }
.step-num { width: 44px; height: 44px; border-radius: 14px; background: var(--grad); color: #fff; display: grid; place-items: center; font: 700 1.1rem var(--font-head); margin-bottom: 1rem; }
.step p { color: var(--ink-2); margin: 0; }

.event-card { text-align: center; padding: 2rem 1.4rem; }
.event-card .emoji { font-size: 2.4rem; display: block; margin-bottom: .6rem; }
.event-card p { color: var(--ink-2); font-size: .95rem; }

.feature { display: flex; gap: 1rem; align-items: flex-start; }
.feature .ico { flex: 0 0 48px; height: 48px; border-radius: 14px; background: var(--bg-tint); display: grid; place-items: center; font-size: 1.4rem; }
.feature h3 { margin-bottom: .25rem; font-size: 1.05rem; }
.feature p { color: var(--ink-2); margin: 0; font-size: .95rem; }

/* ---------- Miniaturas de plantillas ---------- */
.tabs { display: flex; gap: .5rem; justify-content: center; flex-wrap: wrap; margin-bottom: 2rem; }
.tab { padding: .6rem 1.1rem; border-radius: 999px; background: #fff; border: 1px solid var(--line); color: var(--ink-2); font-weight: 600; font-size: .9rem; cursor: pointer; font-family: var(--font-head); }
.tab.active, .tab:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1.4rem; }
.tpl-card { display: block; color: inherit; }
.tpl-grid:not(.show-all) .tpl-extra { display: none !important; }
.tpl-more { text-align: center; margin-top: 2rem; }
.tpl-more .muted { font-weight: 500; margin-left: .2rem; }
.tpl-card:hover { color: inherit; }
.tpl-thumb { position: relative; aspect-ratio: 3 / 4.2; border-radius: 18px; overflow: hidden; box-shadow: 0 6px 20px rgba(0,0,0,.08); transition: transform .25s, box-shadow .25s; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 1rem; }
.tpl-card:hover .tpl-thumb { transform: translateY(-6px); box-shadow: 0 18px 40px rgba(0,0,0,.14); }
.tpl-thumb .t-top, .tpl-thumb .t-bot { position: absolute; left: 0; right: 0; width: 100%; height: 34%; }
.tpl-thumb .t-top { top: 2%; }
.tpl-thumb .t-bot { bottom: 2%; }
.tpl-thumb .t-inner { position: relative; z-index: 2; padding: 0 .4rem; }
/* Plantillas de época: esquinas de filigrana también en la miniatura */
.tpl-thumb .t-frame { position: absolute; inset: 6px; z-index: 1; pointer-events: none; }
.tpl-thumb .t-frame i { position: absolute; width: 30%; aspect-ratio: 1; background: var(--corner) center / contain no-repeat; }
.tpl-thumb .t-frame i:nth-child(1) { top: 0; left: 0; } .tpl-thumb .t-frame i:nth-child(2) { top: 0; right: 0; transform: scaleX(-1); }
.tpl-thumb .t-frame i:nth-child(3) { bottom: 0; left: 0; transform: scaleY(-1); } .tpl-thumb .t-frame i:nth-child(4) { bottom: 0; right: 0; transform: scale(-1, -1); }
.tpl-thumb .t-top, .tpl-thumb .t-bot { z-index: 1; }
.tpl-thumb .t-photo { position: absolute; inset: 0; background-size: cover; background-position: center; z-index: 0; transition: transform .6s ease; }
.tpl-card:hover .tpl-thumb .t-photo { transform: scale(1.06); }
.tpl-thumb .t-veil { position: absolute; inset: 0; z-index: 0; background:
  radial-gradient(ellipse 80% 55% at 50% 50%, color-mix(in srgb, var(--t-bg) calc(var(--t-veil) + 15%), transparent), transparent 80%),
  color-mix(in srgb, var(--t-bg) calc(var(--t-veil) - 5%), transparent); }
.tpl-thumb .t-kicker { font-size: .62rem; letter-spacing: .22em; text-transform: uppercase; opacity: .8; }
.tpl-thumb .t-name { font-size: 2rem; line-height: 1.05; margin: .3rem 0; word-break: break-word; }
.tpl-thumb .t-date { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; }
.tpl-thumb.l-card .t-inner { background: var(--t-surface); padding: 1.2rem .9rem; border-radius: 12px; box-shadow: 0 4px 16px rgba(0,0,0,.12); }
.tpl-meta { padding: .9rem .2rem 0; display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.tpl-meta b { font-family: var(--font-head); font-weight: 600; }
.tag { display: inline-block; font-size: .72rem; font-weight: 600; padding: .25rem .6rem; border-radius: 999px; background: var(--bg-tint); color: var(--purple); white-space: nowrap; }

/* ---------- Paquetes ---------- */
.pricing { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.4rem; align-items: stretch; }
@media (max-width: 960px) { .pricing { grid-template-columns: 1fr; max-width: 460px; margin: 0 auto; } }
.price-card { position: relative; background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: 2rem 1.8rem; display: flex; flex-direction: column; }
.price-card.featured { border: 2px solid transparent; background: linear-gradient(#fff, #fff) padding-box, var(--grad) border-box; box-shadow: var(--shadow-lg); transform: translateY(-8px); }
.price-card .ribbon { position: absolute; top: -14px; left: 50%; transform: translateX(-50%); background: var(--grad); color: #fff; font: 600 .78rem var(--font-head); padding: .4rem 1rem; border-radius: 999px; white-space: nowrap; }
.price-card h3 { font-size: 1.4rem; margin-bottom: .2rem; }
.price-card .tagline { color: var(--ink-2); font-size: .95rem; min-height: 2.8em; }
.price { font: 700 2.8rem/1 var(--font-head); margin: 1rem 0 .3rem; }
.price small { font-size: .95rem; color: var(--muted); font-weight: 500; }
.checklist { list-style: none; padding: 0; margin: 1.2rem 0 1.8rem; flex: 1; }
.checklist li { position: relative; padding: .38rem 0 .38rem 1.9rem; color: var(--ink-2); font-size: .95rem; }
.checklist li::before { content: ''; position: absolute; left: 0; top: .58rem; width: 1.2rem; height: 1.2rem; border-radius: 50%; background: var(--bg-tint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3 3 7-7' fill='none' stroke='%238A3FFC' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/70% no-repeat; }

/* ---------- FAQ ---------- */
.faq details { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 1.1rem 1.3rem; margin-bottom: .8rem; }
.faq summary { cursor: pointer; font: 600 1rem var(--font-head); list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-size: 1.4rem; line-height: 1; color: var(--purple); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: .8rem 0 0; color: var(--ink-2); }

/* ---------- CTA y pie ---------- */
.cta-band { background: var(--grad); color: #fff; border-radius: 28px; padding: clamp(2.2rem, 5vw, 3.6rem); text-align: center; position: relative; overflow: hidden; }
.cta-band h2 { color: #fff; }
.cta-band p { opacity: .9; max-width: 560px; margin: 0 auto 1.6rem; }
.cta-band .btn { background: #fff; color: var(--purple); }
.site-footer { background: #15142B; color: #B9B8D3; padding: 3.5rem 0 2rem; margin-top: 0; }
.site-footer a { color: #DCDBF2; }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2rem; }
.footer-grid h4 { color: #fff; font-size: .95rem; margin-bottom: 1rem; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; font-size: .92rem; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); margin-top: 2.4rem; padding-top: 1.4rem; font-size: .85rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; } }

/* ---------- Formularios ---------- */
.form-grid { display: grid; gap: 1.1rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1.1rem; }
@media (max-width: 640px) { .form-row, .form-row-3 { grid-template-columns: 1fr; } }
/* align-content: start → un campo sin texto de ayuda no se estira para igualar la altura del de al lado */
.field { display: grid; gap: .4rem; min-width: 0; align-content: start; }
.field > label, .label { font-weight: 600; font-size: .9rem; color: var(--ink); }
.field .hint { font-size: .8rem; color: var(--muted); }
.field .error-text { font-size: .82rem; color: var(--err); }
.input, .select, .textarea, input:not([type]), input[type=text], input[type=email], input[type=tel], input[type=password], input[type=number], input[type=date], input[type=time], input[type=url], input[type=search], select, textarea {
  width: 100%; padding: .78rem .95rem; border: 1.5px solid var(--line); border-radius: 12px; font: inherit; font-size: .97rem; color: var(--ink); background: #fff;
  transition: border-color .15s, box-shadow .15s; min-width: 0;
}
textarea { min-height: 110px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--purple); box-shadow: 0 0 0 4px rgba(138,63,252,.14); }
.is-invalid { border-color: var(--err) !important; }
input[type=color] { width: 100%; height: 44px; padding: 4px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer; }
input[type=file] { font-size: .9rem; max-width: 100%; }
.check { display: flex; gap: .6rem; align-items: flex-start; font-size: .93rem; color: var(--ink-2); cursor: pointer; }
.check input { margin-top: .25rem; width: 18px; height: 18px; accent-color: var(--purple); flex: 0 0 auto; }
.choice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .7rem; }
@media (max-width: 560px) { .choice-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.choice { position: relative; display: block; min-width: 0; color: inherit; cursor: pointer; }
.choice:hover { color: inherit; }
.choice input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.choice .choice-box { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .15rem; box-sizing: border-box; width: 100%; height: 100%; min-height: 88px;
  border: 1.5px solid var(--line); border-radius: 14px; padding: .9rem .6rem; text-align: center; font-weight: 600; font-size: .92rem; line-height: 1.25; transition: all .15s; background: #fff; }
.choice:hover .choice-box { border-color: color-mix(in srgb, var(--purple) 45%, var(--line)); }
.choice.active .choice-box { border-color: var(--purple); background: var(--bg-tint); color: var(--purple); box-shadow: 0 0 0 3px rgba(138,63,252,.14); }
.choice .choice-box .emoji { font-size: 1.6rem; line-height: 1; display: block; margin-bottom: .25rem; }
.choice input:checked + .choice-box { border-color: var(--purple); background: var(--bg-tint); color: var(--purple); box-shadow: 0 0 0 3px rgba(138,63,252,.14); }
.choice input:focus-visible + .choice-box { outline: 2px solid var(--purple); outline-offset: 2px; }

/* ---------- Alertas ---------- */
.alert { padding: .9rem 1.1rem; border-radius: 12px; font-size: .94rem; margin-bottom: 1rem; display: flex; gap: .6rem; align-items: flex-start; }
.alert-success { background: var(--ok-bg); color: #0B6B35; }
.alert-error { background: var(--err-bg); color: #A51D36; }
.alert-warning { background: var(--warn-bg); color: #8A5A10; }
.alert-info { background: var(--info-bg); color: #2C3F9E; }
.flash-stack { position: fixed; top: 84px; right: 16px; z-index: 100; display: grid; gap: .6rem; max-width: min(420px, calc(100% - 32px)); }
.flash-stack .alert { box-shadow: var(--shadow); margin: 0; animation: slideIn .3s ease; }
.flash-stack .alert button { margin-left: auto; background: none; border: 0; font-size: 1.1rem; cursor: pointer; color: inherit; opacity: .6; }
@keyframes slideIn { from { transform: translateX(20px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- Autenticación ---------- */
.auth-wrap { min-height: calc(100vh - 72px); display: grid; place-items: center; padding: 2.5rem 16px; background:
  radial-gradient(700px 400px at 100% 0, rgba(138,63,252,.12), transparent 60%), radial-gradient(600px 400px at 0 100%, rgba(47,91,234,.1), transparent 60%); }
.auth-card { width: min(520px, 100%); background: #fff; border-radius: 24px; padding: clamp(1.6rem, 4vw, 2.6rem); box-shadow: var(--shadow-lg); }
.auth-card h1 { font-size: 1.8rem; }
.auth-card .sub { color: var(--ink-2); margin-bottom: 1.6rem; }
.auth-foot { text-align: center; margin-top: 1.4rem; font-size: .93rem; color: var(--ink-2); }
.big-icon { width: 72px; height: 72px; border-radius: 22px; background: var(--bg-tint); display: grid; place-items: center; font-size: 2rem; margin: 0 auto 1.2rem; }

/* ---------- Paneles (cliente y admin) ---------- */
.app { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; background: var(--bg-soft); }
.sidebar { background: #fff; border-right: 1px solid var(--line); padding: 1.4rem 1rem; position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; }
.sidebar .brand { padding: 0 .6rem 1.4rem; }
.sidebar .brand img { height: 36px; }
.side-nav { display: grid; gap: .2rem; }
.side-nav .group { font: 600 .7rem var(--font-head); text-transform: uppercase; letter-spacing: .12em; color: var(--muted); padding: 1.2rem .8rem .4rem; }
.side-nav a { display: flex; align-items: center; gap: .75rem; padding: .7rem .8rem; border-radius: 12px; color: var(--ink-2); font-weight: 500; font-size: .94rem; }
.side-nav a:hover { background: var(--bg-soft); color: var(--ink); }
.side-nav a.active { background: var(--bg-tint); color: var(--purple); font-weight: 600; }
.side-nav a .ico { width: 20px; text-align: center; font-size: 1.05rem; }
.online-now { display: flex; align-items: center; gap: .75rem; padding: .35rem .8rem .5rem; font-size: .84rem; color: var(--muted); cursor: default; }
.online-now b { color: var(--ink-2); font-weight: 600; }
.online-now .dot { width: 20px; display: flex; justify-content: center; }
.online-now .dot::before { content: ''; width: 9px; height: 9px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 rgba(18, 161, 80, .5); animation: onlinePulse 2s infinite; }
.online-now.is-empty .dot::before { background: #B8BCC8; animation: none; }
@keyframes onlinePulse { 0% { box-shadow: 0 0 0 0 rgba(18, 161, 80, .5); } 70% { box-shadow: 0 0 0 7px rgba(18, 161, 80, 0); } 100% { box-shadow: 0 0 0 0 rgba(18, 161, 80, 0); } }
.side-nav a .count { margin-left: auto; background: var(--purple); color: #fff; font-size: .7rem; padding: .1rem .5rem; border-radius: 999px; }
.sidebar .me { margin-top: auto; padding: 1rem .6rem 0; border-top: 1px solid var(--line); font-size: .88rem; }
.sidebar .me b { display: block; }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { display: none; background: #fff; border-bottom: 1px solid var(--line); padding: .8rem 16px; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 40; }
.topbar img { height: 32px; }
.content { padding: clamp(1.2rem, 3vw, 2.2rem); width: 100%; max-width: 1240px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; margin-bottom: 1.6rem; flex-wrap: wrap; }
.page-head h1 { font-size: clamp(1.5rem, 3vw, 2rem); margin: 0; }
.page-head p { margin: .3rem 0 0; color: var(--ink-2); }
.crumbs { font-size: .85rem; color: var(--muted); margin-bottom: .4rem; }
.crumbs a { color: var(--muted); }
@media (max-width: 960px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: 280px; z-index: 60; transform: translateX(-100%); transition: transform .25s; box-shadow: var(--shadow-lg); }
  .sidebar.open { transform: none; }
  .topbar { display: flex; }
  .flash-stack { top: 70px; }
}
.backdrop { display: none; position: fixed; inset: 0; background: rgba(20,18,50,.4); z-index: 55; }
.backdrop.show { display: block; }

.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem; margin-bottom: 1.4rem; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1rem; flex-wrap: wrap; }
.panel-head h2, .panel h2 { font-size: 1.15rem; margin: 0; }
.panel-sub { color: var(--ink-2); font-size: .92rem; margin: -.6rem 0 1rem; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1rem; margin-bottom: 1.4rem; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem 1.3rem; }
.stat .label { color: var(--muted); font-size: .82rem; font-weight: 500; }
.stat .value { font: 700 1.8rem/1.2 var(--font-head); margin-top: .3rem; }
.stat .delta { font-size: .8rem; color: var(--ok); }

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: 12px; }
table.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th { text-align: left; font-weight: 600; color: var(--muted); font-size: .76rem; text-transform: uppercase; letter-spacing: .06em; padding: .7rem .8rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: .8rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tr:hover td { background: #FBFAFF; }
.table .actions { white-space: nowrap; text-align: right; }
.table .actions form { display: inline; }
.cell-title { font-weight: 600; color: var(--ink); }
.cell-sub { font-size: .8rem; color: var(--muted); }

.pill { display: inline-flex; align-items: center; gap: .35rem; font-size: .75rem; font-weight: 600; padding: .28rem .7rem; border-radius: 999px; white-space: nowrap; }
.pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill-draft, .pill-pending, .pill-logged { background: #F1F0F7; color: #5E5D78; }
.pill-paid, .pill-sent { background: var(--info-bg); color: var(--blue); }
.pill-published, .pill-ok { background: var(--ok-bg); color: var(--ok); }
.pill-opened { background: #F1E8FF; color: #7A3FE0; }
.pill-expired, .pill-refunded, .pill-canceled { background: var(--warn-bg); color: var(--warn); }
.pill-suspended, .pill-failed { background: var(--err-bg); color: var(--err); }

.toolbar { display: flex; gap: .6rem; flex-wrap: wrap; margin-bottom: 1rem; align-items: center; }
.toolbar input, .toolbar select { width: auto; min-width: 160px; flex: 1 1 180px; max-width: 320px; padding: .6rem .8rem; }
.pager { display: flex; gap: .4rem; justify-content: center; margin-top: 1rem; flex-wrap: wrap; }
.pager a, .pager span { padding: .4rem .8rem; border-radius: 8px; border: 1px solid var(--line); font-size: .85rem; background: #fff; }
.pager .current { background: var(--ink); color: #fff; border-color: var(--ink); }
.empty { text-align: center; padding: 3rem 1rem; color: var(--ink-2); }
.empty .big-icon { margin-bottom: 1rem; }

/* Tarjetas de invitación en el panel del cliente */
.inv-list { display: grid; gap: 1.2rem; }
.inv-item { display: grid; grid-template-columns: 150px 1fr; gap: 1.4rem; background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 1.2rem; }
.inv-item .tpl-thumb { aspect-ratio: 3/4; border-radius: 14px; padding: .5rem; }
.inv-item .tpl-thumb .t-name { font-size: 1.25rem; }
.inv-item h3 { font-size: 1.25rem; margin-bottom: .3rem; }
.inv-item .meta { display: flex; gap: .5rem 1.2rem; flex-wrap: wrap; color: var(--ink-2); font-size: .88rem; margin: .5rem 0 1rem; }
.inv-item .link-box { background: var(--bg-soft); border-radius: 10px; padding: .55rem .8rem; font-size: .88rem; display: inline-flex; gap: .5rem; align-items: center; margin-bottom: 1rem; word-break: break-all; }
.progress-steps { display: flex; gap: .4rem; margin: .4rem 0 1rem; flex-wrap: wrap; }
.progress-steps span { font-size: .75rem; padding: .3rem .7rem; border-radius: 999px; background: var(--bg-soft); color: var(--muted); font-weight: 600; }
.progress-steps span.done { background: var(--ok-bg); color: var(--ok); }
.progress-steps span.now { background: var(--bg-tint); color: var(--purple); }
@media (max-width: 640px) { .inv-item { grid-template-columns: 1fr; } .inv-item .tpl-thumb { max-width: 200px; } }

/* Editor */
.editor-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 1.6rem; align-items: start; }
.editor-side { position: sticky; top: 1.4rem; }
.preview-frame { width: 100%; border: 0; border-radius: 18px; background: #fff; height: 680px; box-shadow: var(--shadow); }
/* minmax(0, 1fr): la fila de pestañas (más ancha que un celular) ya no ensancha todo el editor */
@media (max-width: 1180px) { .editor-layout { grid-template-columns: minmax(0, 1fr); } .editor-side { position: static; } }
#editorForm { min-width: 0; }
.sm-only { display: none; }
/* Celular: botones de guardar compactos, en una sola fila */
@media (max-width: 560px) {
  .sm-hide { display: none; } .sm-only { display: inline; }
  .sticky-actions { flex-wrap: nowrap; gap: .45rem; padding: .6rem 0; }
  .sticky-actions .btn { flex: 1 1 0; min-width: 0; padding: .7rem .5rem; font-size: .88rem; white-space: nowrap; }
}
.ed-tabs { display: flex; gap: .3rem; overflow-x: auto; margin-bottom: 1rem; padding-bottom: .2rem; max-width: 100%;
  scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
.ed-tabs button { scroll-snap-align: start; }
@media (max-width: 760px) {
  /* Desvanecido a la orilla: indica que hay más pestañas deslizando */
  .ed-tabs { -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); padding-right: 2.5rem; }
  .ed-tabs.at-end { -webkit-mask-image: none; mask-image: none; }
}
.ed-tabs button { flex: 0 0 auto; padding: .6rem 1rem; border-radius: 10px; border: 0; background: transparent; font: 600 .88rem var(--font-head); color: var(--ink-2); cursor: pointer; }
.ed-tabs button.active { background: #fff; color: var(--purple); box-shadow: 0 2px 8px rgba(0,0,0,.06); }
.ed-pane { display: none; }
.ed-pane.active { display: block; }
.locked { position: relative; }
.locked-note { display: flex; gap: .8rem; align-items: center; background: var(--bg-tint); color: var(--purple-600); border-radius: 12px; padding: .9rem 1rem; font-size: .9rem; margin-bottom: 1rem; }
.locked fieldset[disabled] { opacity: .45; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.repeater-row { display: grid; grid-template-columns: minmax(150px, 170px) 1fr auto; gap: .6rem; margin-bottom: .6rem; }
.repeater-row input[type=time] { padding-right: .6rem; }
.repeater-row.gift { grid-template-columns: 1fr 1fr auto; }
@media (max-width: 560px) { .repeater-row, .repeater-row.gift { grid-template-columns: 1fr; } }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: .7rem; margin: .6rem 0; }
.media-item { position: relative; border-radius: 12px; overflow: hidden; aspect-ratio: 1; background: var(--bg-soft); }
.media-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.media-item label { position: absolute; left: 6px; bottom: 6px; background: rgba(255,255,255,.92); border-radius: 8px; padding: .2rem .45rem; font-size: .72rem; display: flex; align-items: center; gap: .3rem; cursor: pointer; }
.sticky-actions { position: sticky; bottom: 0; background: rgba(247,246,252,.94); backdrop-filter: blur(8px); padding: 1rem 0; display: flex; gap: .6rem; flex-wrap: wrap; justify-content: flex-end; border-top: 1px solid var(--line); margin-top: 1rem; z-index: 5; }
.tpl-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .9rem; }
.tpl-pick label { cursor: pointer; display: block; position: relative; }
.tpl-pick input { position: absolute; opacity: 0; }
.tpl-pick .tpl-thumb { aspect-ratio: 3/4; padding: .5rem; border: 3px solid transparent; }
.tpl-pick .tpl-thumb .t-name { font-size: 1.3rem; }
.tpl-pick input:checked + .tpl-thumb { border-color: var(--purple); box-shadow: 0 0 0 4px rgba(138,63,252,.2); }
.tpl-pick .tpl-label { font-size: .85rem; font-weight: 600; text-align: center; margin-top: .4rem; }
.pkg-pick { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: .9rem; }
.pkg-pick label { cursor: pointer; position: relative; }
.pkg-pick input { position: absolute; opacity: 0; }
.pkg-pick .box { border: 2px solid var(--line); border-radius: 16px; padding: 1.1rem; height: 100%; background: #fff; transition: all .15s; }
.pkg-pick input:checked + .box { border-color: var(--purple); background: var(--bg-tint); box-shadow: 0 0 0 4px rgba(138,63,252,.14); }
.pkg-pick .box b { font-family: var(--font-head); font-size: 1.1rem; }
.pkg-pick .box .p { font: 700 1.5rem var(--font-head); color: var(--purple); margin: .2rem 0 .4rem; }
.pkg-pick .box ul { margin: 0; padding-left: 1.1rem; font-size: .83rem; color: var(--ink-2); }

/* Compartir */
.share-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.2rem; }
@media (max-width: 1100px) { .share-grid { grid-template-columns: 1fr; } }
.share-opt { display: flex; flex-direction: column; }
.share-opt .num { font: 700 .75rem var(--font-head); letter-spacing: .12em; text-transform: uppercase; color: var(--purple); }
.share-opt h2 { margin: .3rem 0 .4rem; }
.share-opt p { color: var(--ink-2); font-size: .92rem; }
.share-preview { background: var(--bg-soft); border-radius: 14px; padding: 1rem; display: grid; place-items: center; margin-bottom: 1rem; flex: 1; min-height: 240px; }
.share-preview canvas, .share-preview img { width: 100%; max-width: 300px; height: auto; border-radius: 10px; box-shadow: 0 6px 20px rgba(0,0,0,.12); }
.share-text { font-family: ui-monospace, Menlo, monospace; font-size: .85rem; white-space: pre-wrap; background: var(--bg-soft); border-radius: 12px; padding: 1rem; min-height: 160px; }
.url-box { display: flex; gap: .5rem; align-items: center; background: #fff; border: 1.5px solid var(--line); border-radius: 14px; padding: .4rem .4rem .4rem 1rem; }
.url-box code { flex: 1; font-size: .95rem; word-break: break-all; }
.tag-input { display: flex; align-items: stretch; border: 1.5px solid var(--line); border-radius: 14px; overflow: hidden; background: #fff; }
.tag-input span { background: var(--bg-soft); padding: .85rem 1rem; color: var(--ink-2); font-weight: 600; white-space: nowrap; border-right: 1px solid var(--line); }
.tag-input input { border: 0; border-radius: 0; font-weight: 600; }
.tag-input input:focus { box-shadow: none; }
.tag-input:focus-within { border-color: var(--purple); box-shadow: 0 0 0 4px rgba(138,63,252,.14); }
.tag-status { font-size: .88rem; margin-top: .5rem; min-height: 1.4em; }
.tag-status.ok { color: var(--ok); }
.tag-status.bad { color: var(--err); }

.kv { display: grid; grid-template-columns: 160px 1fr; gap: .5rem 1rem; font-size: .93rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; word-break: break-word; }
.color-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .8rem; }
@media (max-width: 560px) { .color-grid { grid-template-columns: repeat(2, 1fr); } .kv { grid-template-columns: 1fr; } }
.perm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .6rem; }
.perm-grid .check { background: var(--bg-soft); padding: .7rem .8rem; border-radius: 10px; }
.bar { height: 8px; border-radius: 99px; background: var(--bg-soft); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--grad); border-radius: 99px; }
.swatches { display: flex; gap: 4px; }
.swatches i { width: 18px; height: 18px; border-radius: 50%; border: 1px solid rgba(0,0,0,.08); display: block; }
.divider-line { height: 1px; background: var(--line); margin: 1.4rem 0; }
.code { font-family: ui-monospace, Menlo, monospace; font-size: .85rem; background: var(--bg-soft); padding: .15rem .45rem; border-radius: 6px; word-break: break-all; }
.legal h2 { font-size: 1.3rem; margin-top: 2rem; }
.legal p, .legal li { color: var(--ink-2); }

/* Selector de fondo de portada */
.cover-pick { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .8rem; margin-top: .6rem; }
.cover-img.cover-video-ico { display: grid; place-items: center; font-size: 2rem; background: linear-gradient(135deg, #1B1B26, #4A3F8C); }
@media (max-width: 640px) { .cover-pick { grid-template-columns: 1fr; } }
.cover-pick label { position: relative; cursor: pointer; }
.cover-pick input { position: absolute; opacity: 0; }
/* Una sola columna que no crece más que la tarjeta (antes el recuadro de la imagen podía salirse del borde) */
.cover-opt { display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; gap: .15rem; border: 2px solid var(--line); border-radius: 14px; padding: .6rem; background: #fff; height: 100%; transition: all .15s; }
.cover-opt small { color: var(--muted); font-size: .78rem; }
.cover-img { display: grid; place-items: center; width: 100%; aspect-ratio: 16 / 9; border-radius: 10px; background: var(--bg-soft) center / cover no-repeat; margin-bottom: .4rem; font-size: 1.6rem; border: 1px solid var(--line); overflow: hidden; }
.cover-pick input:checked + .cover-opt { border-color: var(--purple); background: var(--bg-tint); box-shadow: 0 0 0 4px rgba(138,63,252,.14); }
.cover-pick input:disabled + .cover-opt { opacity: .45; cursor: not-allowed; }
.cover-pick input:focus-visible + .cover-opt { outline: 2px solid var(--purple); outline-offset: 2px; }

/* ---------- Celular con lada internacional ---------- */
.phone-field { position: relative; display: flex; align-items: stretch; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; transition: border-color .15s, box-shadow .15s; }
.phone-field:focus-within { border-color: var(--purple); box-shadow: 0 0 0 4px rgba(138,63,252,.14); }
.phone-field.is-invalid { border-color: var(--err); }
.phone-field input[type=tel] { border: 0; border-radius: 0 12px 12px 0; box-shadow: none !important; flex: 1; }
.pf-btn { display: inline-flex; align-items: center; gap: .4rem; padding: 0 .7rem 0 .8rem; border: 0; border-right: 1px solid var(--line); background: var(--bg-soft); border-radius: 11px 0 0 11px; font: 600 .93rem var(--font); color: var(--ink); cursor: pointer; white-space: nowrap; }
.pf-btn img { border-radius: 3px; box-shadow: 0 0 0 1px rgba(0,0,0,.08); }
.pf-caret { font-size: .7rem; color: var(--muted); }
.pf-menu { position: absolute; top: calc(100% + 6px); left: 0; z-index: 60; width: min(320px, 90vw); background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); padding: .5rem; }
.pf-menu[hidden] { display: none; }
.pf-menu .pf-search { padding: .6rem .8rem; margin-bottom: .4rem; font-size: .9rem; }
.pf-menu ul { list-style: none; margin: 0; padding: 0; max-height: 260px; overflow-y: auto; }
.pf-menu li { display: flex; align-items: center; gap: .6rem; padding: .5rem .6rem; border-radius: 8px; cursor: pointer; font-size: .9rem; }
.pf-menu li span { flex: 1; }
.pf-menu li b { color: var(--muted); font-weight: 600; font-size: .85rem; }
.pf-menu li:hover, .pf-menu li:focus { background: var(--bg-tint); outline: none; }
.pf-menu li[aria-selected="true"] { background: var(--bg-tint); color: var(--purple); }
.pf-menu li[hidden] { display: none; }

/* ---------- Ventanas emergentes (dialog) ---------- */
dialog.modal { border: 0; border-radius: 20px; padding: 0; width: min(640px, calc(100vw - 32px)); max-height: calc(100vh - 48px); box-shadow: var(--shadow-lg); color: var(--ink); }
dialog.modal::backdrop { background: rgba(20, 16, 50, .55); backdrop-filter: blur(3px); }
.modal-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1.1rem 1.4rem; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: #fff; z-index: 2; }
.modal-head h2 { font-size: 1.2rem; margin: 0; }
.modal-close { border: 0; background: var(--bg-soft); width: 36px; height: 36px; border-radius: 50%; font-size: 1.3rem; line-height: 1; cursor: pointer; color: var(--ink-2); flex: 0 0 auto; }
.modal-body { padding: 1.2rem 1.4rem 1.4rem; }
.modal-foot { display: flex; gap: .6rem; justify-content: flex-end; flex-wrap: wrap; padding: 1rem 1.4rem; border-top: 1px solid var(--line); }

/* Botón pequeño junto a una etiqueta */
.label-row { display: flex; justify-content: space-between; align-items: center; gap: .6rem; flex-wrap: wrap; }
.btn-mini { display: inline-flex; align-items: center; gap: .3rem; padding: .3rem .7rem; border-radius: 999px; border: 1.5px solid var(--line); background: #fff; font: 600 .78rem var(--font); color: var(--purple); cursor: pointer; }
.btn-mini:hover { border-color: var(--purple); background: var(--bg-tint); }

/* Guía de Google Maps */
.seg { display: inline-flex; background: var(--bg-soft); border-radius: 999px; padding: 4px; gap: 4px; margin-bottom: 1.1rem; }
.seg button { border: 0; background: transparent; padding: .45rem 1rem; border-radius: 999px; font: 600 .85rem var(--font); color: var(--ink-2); cursor: pointer; }
.seg button.active { background: #fff; color: var(--purple); box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.1rem; counter-reset: st; }
.steps li { display: grid; grid-template-columns: 180px 1fr; gap: 1.1rem; align-items: center; counter-increment: st; }
.steps li img { width: 100%; height: auto; border-radius: 14px; border: 1px solid var(--line); background: var(--bg-soft); }
.steps li h3 { font-size: 1rem; margin: 0 0 .3rem; }
.steps li h3::before { content: counter(st); display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--grad); color: #fff; font-size: .78rem; margin-right: .5rem; vertical-align: 1px; }
.steps li p { margin: 0; font-size: .9rem; color: var(--ink-2); }
.steps.desktop li { grid-template-columns: 240px 1fr; }
@media (max-width: 560px) { .steps li, .steps.desktop li { grid-template-columns: 1fr; } .steps li img { max-width: 190px; } .steps.desktop li img { max-width: 100%; } }
.maps-tip { background: var(--bg-tint); border-radius: 12px; padding: .8rem 1rem; font-size: .88rem; color: var(--purple-600); margin-top: 1.1rem; }

/* Selector de emojis */
.emoji-pair { display: flex; align-items: center; gap: .5rem; }
.emoji-pair input[type=text], .emoji-pair input:not([type]) { flex: 1; }
.emoji-btn { flex: 0 0 auto; width: 48px; height: 48px; border-radius: 12px; border: 1.5px solid var(--line); background: #fff; font-size: 1.45rem; cursor: pointer; line-height: 1; }
.emoji-btn:hover { border-color: var(--purple); background: var(--bg-tint); }
.emoji-btn.is-empty { font-size: .7rem; color: var(--muted); font-weight: 600; }
.emoji-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(46px, 1fr)); gap: .35rem; }
.emoji-grid button { aspect-ratio: 1; border: 0; background: var(--bg-soft); border-radius: 10px; font-size: 1.45rem; cursor: pointer; line-height: 1; }
.emoji-grid button:hover, .emoji-grid button:focus-visible { background: var(--bg-tint); outline: 2px solid var(--purple); }
.emoji-group { font: 600 .75rem var(--font-head); text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin: 1rem 0 .5rem; }
.emoji-group:first-child { margin-top: 0; }

/* Música: origen (archivo o Spotify) */
.src-pick { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; margin-bottom: 1rem; }
.src-pick label { position: relative; cursor: pointer; }
.src-pick input { position: absolute; opacity: 0; }
.src-pick label > span { display: flex; gap: .7rem; align-items: center; border: 2px solid var(--line); border-radius: 14px; padding: .8rem 1rem; font-weight: 600; font-size: .92rem; background: #fff; height: 100%; }
.src-pick label > span > span { display: grid; gap: .1rem; line-height: 1.3; }
.src-pick small { display: block; font-weight: 400; color: var(--muted); font-size: .78rem; }
.src-pick input:checked + span { border-color: var(--purple); background: var(--bg-tint); box-shadow: 0 0 0 4px rgba(138,63,252,.14); }
.src-pick input:focus-visible + span { outline: 2px solid var(--purple); outline-offset: 2px; }
@media (max-width: 560px) { .src-pick { grid-template-columns: 1fr; } }
.src-pane[hidden] { display: none; }
.spotify-preview { margin-top: .8rem; }
.spotify-preview iframe { width: 100%; height: 152px; border: 0; border-radius: 12px; }

/* Solicitud de diseño personalizado (Delux) */
.custom-request { display: flex; gap: 1rem; align-items: center; justify-content: space-between; flex-wrap: wrap; background: var(--grad); color: #fff; border-radius: 16px; padding: 1.1rem 1.3rem; margin-top: 1.2rem; }
.custom-request p { margin: .2rem 0 0; font-size: .88rem; opacity: .9; }
.custom-request b { font-family: var(--font-head); font-size: 1.02rem; }
.custom-request .btn { background: #fff; color: var(--purple); border-color: #fff; }
.custom-request.sent { background: var(--ok-bg); color: var(--ink); }

/* Centro de notificaciones */
.bell .count { background: var(--err); color: #fff; font-size: .7rem; font-weight: 700; border-radius: 999px; padding: .05rem .45rem; min-width: 1.3rem; text-align: center; }
.topbar .top-actions { display: flex; align-items: center; gap: .6rem; }
.bell { position: relative; display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--bg-soft); font-size: 1.1rem; color: var(--ink); }
.bell .count { position: absolute; top: -2px; right: -4px; margin: 0; }
.notif-list { list-style: none; margin: 0; padding: 0; }
.notif { display: grid; grid-template-columns: 44px 1fr auto; gap: .9rem; align-items: start; padding: 1rem .4rem; border-bottom: 1px solid var(--line); }
.notif:last-child { border-bottom: 0; }
.notif .n-ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-size: 1.3rem; background: var(--bg-soft); }
.notif.rsvp .n-ico { background: var(--ok-bg); }
.notif.unread .n-ico { box-shadow: 0 0 0 2px var(--purple); }
.notif .n-title { font-weight: 600; color: var(--ink); }
.notif.unread .n-title::after { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--purple); margin-left: .5rem; vertical-align: 2px; }
.notif .n-body { font-size: .9rem; color: var(--ink-2); margin-top: .15rem; white-space: pre-line; }
.notif .n-time { font-size: .78rem; color: var(--muted); white-space: nowrap; }
@media (max-width: 560px) { .notif { grid-template-columns: 40px 1fr; } .notif .n-time { grid-column: 2; } }

/* Compartir en redes */
.social-row { display: flex; flex-wrap: wrap; gap: .6rem; }
.social-btn { display: inline-flex; align-items: center; gap: .5rem; padding: .7rem 1.1rem; border-radius: 999px; font: 600 .9rem var(--font); color: #fff; border: 0; cursor: pointer; text-decoration: none; }
.social-btn:hover { color: #fff; filter: brightness(1.08); }
.social-btn svg { width: 18px; height: 18px; fill: currentColor; }
.social-btn.wa { background: #25D366; } .social-btn.fb { background: #1877F2; } .social-btn.ms { background: linear-gradient(45deg, #0099FF, #A033FF 60%, #FF5280); }
.social-btn.tg { background: #26A5E4; } .social-btn.ig { background: linear-gradient(45deg, #F58529, #DD2A7B 50%, #8134AF); }
.share-hint { font-size: .85rem; color: var(--ink-2); background: var(--bg-soft); border-radius: 10px; padding: .7rem .9rem; margin: .8rem 0 0; }
.share-hint[hidden] { display: none; }
.form-row.wide-first { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
@media (max-width: 640px) { .form-row.wide-first { grid-template-columns: 1fr; } }

/* Cupón en la página de pago */
.coupon-box { margin-top: .4rem; }
.coupon-box summary { cursor: pointer; color: var(--purple); font-weight: 600; font-size: .92rem; }
.coupon-form { display: flex; gap: .5rem; margin-top: .7rem; }
.coupon-form input { text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
.coupon-applied { display: flex; justify-content: space-between; align-items: center; gap: .6rem; flex-wrap: wrap; background: var(--ok-bg); border-radius: 12px; padding: .7rem .9rem; font-size: .92rem; }
.price-line { display: flex; justify-content: space-between; font-size: .95rem; margin-bottom: .4rem; }
.price-line.discount { color: var(--ok); font-weight: 600; }

/* Cupones (admin) */
#couponForm .label-row input { flex: 1; }
.input-affix { display: flex; align-items: stretch; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; overflow: hidden; }
.input-affix:focus-within { border-color: var(--purple); box-shadow: 0 0 0 4px rgba(138,63,252,.14); }
.input-affix input { border: 0; box-shadow: none !important; border-radius: 0; }
.input-affix span { display: grid; place-items: center; padding: 0 .9rem; background: var(--bg-soft); color: var(--ink-2); font-weight: 700; }
.coupon-preview { font-size: .88rem; color: var(--ink-2); background: var(--bg-soft); border-radius: 12px; padding: .8rem 1rem; }
.coupon-preview:empty { display: none; }
.coupon-preview s { color: var(--muted); }
a.code { font-family: ui-monospace, Menlo, monospace; letter-spacing: .04em; white-space: nowrap; }

/* Contraseña con generador */
.pw-group .label-row, .pw-group .field > label { min-height: 32px; display: flex; align-items: center; }
.pw-group .label-row { justify-content: space-between; }
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 3rem; }
.pw-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border: 0; border-radius: 8px; background: transparent; cursor: pointer; font-size: 1rem; opacity: .45; }
.pw-eye:hover, .pw-eye.on { opacity: 1; background: var(--bg-soft); }
.pw-match { font-size: .82rem; min-height: 1.2em; }
.pw-match.ok { color: var(--ok); }
.pw-match.bad { color: var(--err); }
.pw-generated { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .8rem; background: var(--ok-bg); border-radius: 12px; padding: .75rem 1rem; font-size: .9rem; }
.pw-generated code { font-family: ui-monospace, Menlo, monospace; font-size: .95rem; background: #fff; padding: .15rem .5rem; border-radius: 6px; user-select: all; }
.pw-generated small { flex-basis: 100%; color: var(--ink-2); }

/* ---------- Ayuda / tickets de soporte ---------- */
.side-nav .side-btn { display: flex; align-items: center; gap: .75rem; width: 100%; padding: .7rem .8rem; border: 0; border-radius: 12px; background: none; color: var(--ink-2); font: 500 .94rem var(--font); cursor: pointer; text-align: left; }
.side-nav .side-btn:hover { background: var(--bg-soft); color: var(--ink); }
.side-nav .side-btn .ico { width: 20px; text-align: center; font-size: 1.05rem; }
.link-btn { border: 0; background: none; padding: 0; color: var(--blue); font: inherit; cursor: pointer; text-decoration: underline; }
.ticket-types { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
@media (max-width: 560px) { .ticket-types { grid-template-columns: 1fr; } }
.ticket-types label { position: relative; cursor: pointer; }
.ticket-types input { position: absolute; opacity: 0; }
.ticket-types label > span { display: grid; gap: .2rem; height: 100%; border: 2px solid var(--line); border-radius: 14px; padding: .75rem .9rem; background: #fff; transition: all .15s; }
.ticket-types b { font-size: .92rem; }
.ticket-types small { color: var(--muted); font-size: .78rem; line-height: 1.35; }
.ticket-types input:checked + span { border-color: var(--purple); background: var(--bg-tint); box-shadow: 0 0 0 4px rgba(138,63,252,.14); }
.ticket-types input:focus-visible + span { outline: 2px solid var(--purple); outline-offset: 2px; }
.template-fields { background: var(--bg-soft); border-radius: 14px; padding: 1rem; }
.ticket-list { list-style: none; margin: 0; padding: 0; }
.ticket-list li { border-bottom: 1px solid var(--line); }
.ticket-list li:last-child { border-bottom: 0; }
.ticket-list a { display: flex; align-items: center; gap: .9rem; padding: 1rem .4rem; color: var(--ink); flex-wrap: wrap; }
.ticket-list a:hover { background: var(--bg-soft); }
.ticket-list .t-ico { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--bg-soft); font-size: 1.2rem; flex: 0 0 auto; }
.ticket-list .t-main { flex: 1; min-width: 200px; display: grid; }
.ticket-list .t-main small { color: var(--muted); }
.ticket-list li.unread .t-ico { box-shadow: 0 0 0 2px var(--purple); }
.t-new { font-size: .75rem; font-weight: 700; color: var(--purple); }
.ticket-status { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: .9rem 1.1rem; margin-bottom: 1rem; color: var(--ink-2); }
.ticket-status.st-waiting_client { border-color: var(--warn); background: var(--warn-bg); color: var(--ink); font-weight: 600; }
.ticket-steps { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: .4rem; padding: 0; margin: 0 0 1.4rem; counter-reset: s; }
.ticket-steps li { counter-increment: s; text-align: center; font-size: .8rem; font-weight: 600; color: var(--muted); padding-top: 1.9rem; position: relative; }
.ticket-steps li::before { content: counter(s); position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--bg-soft); border: 2px solid var(--line); font-size: .75rem; }
.ticket-steps li.done { color: var(--ok); } .ticket-steps li.done::before { content: '✓'; background: var(--ok); border-color: var(--ok); color: #fff; }
.ticket-steps li.now { color: var(--purple); } .ticket-steps li.now::before { background: var(--purple); border-color: var(--purple); color: #fff; }
.ticket-thread { display: grid; gap: 1rem; }
.t-msg { max-width: 82%; border-radius: 16px; padding: .9rem 1.1rem; background: var(--bg-soft); border: 1px solid var(--line); }
.t-msg.staff { background: var(--bg-tint); border-color: color-mix(in srgb, var(--purple) 25%, var(--line)); }
.t-msg.mine { justify-self: end; }
@media (max-width: 640px) { .t-msg { max-width: 100%; } }
.t-msg header { display: flex; justify-content: space-between; gap: 1rem; font-size: .82rem; margin-bottom: .4rem; }
.t-msg header span { color: var(--muted); white-space: nowrap; }
.t-body { white-space: pre-wrap; word-break: break-word; font-size: .95rem; }
.t-links { display: grid; grid-template-columns: auto 1fr; gap: .3rem .8rem; margin: .8rem 0 0; font-size: .85rem; }
.t-links dt { color: var(--muted); } .t-links dd { margin: 0; word-break: break-all; }
.t-files { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: .8rem; }
.t-thumb { display: grid; width: 130px; border-radius: 10px; overflow: hidden; background: #fff; border: 1px solid var(--line); color: var(--ink-2); }
.t-thumb img { width: 100%; height: 96px; object-fit: cover; display: block; }
.t-thumb span, .t-file span { font-size: .75rem; padding: .3rem .5rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.t-file { display: flex; align-items: center; gap: .3rem; max-width: 260px; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: .5rem .7rem; color: var(--ink); }
.t-file small { color: var(--muted); font-size: .72rem; white-space: nowrap; }
.t-status-change { text-align: center; font-size: .8rem; color: var(--muted); }
.reply-box.attention { border: 2px solid var(--warn); }
.ticket-admin { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 1.4rem; align-items: start; }
@media (max-width: 1000px) { .ticket-admin { grid-template-columns: 1fr; } }
.plain-list { list-style: none; padding: 0; margin: .8rem 0 0; display: grid; gap: .6rem; font-size: .88rem; }
a.stat { color: inherit; } a.stat:hover { border-color: var(--purple); }

/* ---------- Banner "Colabora" (fondo animado con las fotos de las plantillas) ---------- */
.colabora { position: relative; overflow: hidden; color: #fff; padding: clamp(4rem, 9vw, 7rem) 0; background: #1C1B33; isolation: isolate; }
.colabora-bg, .cm-bg { position: absolute; inset: 0; z-index: -2; }
.colabora-bg .slide, .cm-bg .slide { position: absolute; inset: 0; background: center / cover no-repeat; opacity: 0; transform: scale(1.08); transition: opacity 1.4s ease, transform 7s linear; }
.colabora-bg .slide.on, .cm-bg .slide.on { opacity: 1; transform: scale(1); }
.colabora-veil { position: absolute; inset: 0; z-index: -1; background: linear-gradient(100deg, rgba(20, 16, 50, .92) 0%, rgba(47, 40, 120, .78) 45%, rgba(138, 63, 252, .35) 100%); }
.colabora-inner { max-width: 1180px; }
.colabora .eyebrow { background: rgba(255,255,255,.14); color: #fff; }
.colabora h2 { max-width: 760px; color: #fff; font-size: clamp(1.9rem, 4.2vw, 3rem); }
.colabora .grad-text { background: linear-gradient(90deg, #9DB5FF, #E3B6FF); -webkit-background-clip: text; background-clip: text; color: transparent; }
.colabora p { max-width: 680px; font-size: 1.08rem; color: rgba(255,255,255,.88); margin: 0 0 1.8rem; }
.colabora-actions { display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap; }
.colabora-now { font-size: .85rem; color: rgba(255,255,255,.7); min-height: 1.2em; }
.colabora-steps { list-style: none; display: flex; flex-wrap: wrap; gap: .6rem 1.4rem; padding: 0; margin: 2.2rem 0 0; font-size: .9rem; color: rgba(255,255,255,.85); }
.colabora-steps b { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: rgba(255,255,255,.18); margin-right: .4rem; font-size: .8rem; }
.colabora-dots { position: absolute; right: 24px; bottom: 20px; display: flex; gap: 6px; }
.colabora-dots i { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,.35); transition: all .3s; }
.colabora-dots i.on { background: #fff; width: 20px; border-radius: 4px; }
@media (max-width: 640px) { .colabora-dots { right: 50%; transform: translateX(50%); } .colabora-veil { background: linear-gradient(180deg, rgba(20,16,50,.9), rgba(47,40,120,.85)); } }
/* Versión compacta (pestaña Diseño del editor) */
.colabora-mini { position: relative; overflow: hidden; border-radius: 16px; margin-top: 1.4rem; color: #fff; background: #1C1B33; isolation: isolate; }
.colabora-mini::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(20,16,50,.94) 0%, rgba(47,40,120,.82) 60%, rgba(138,63,252,.45) 100%); }
.cm-content { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding: 1.1rem 1.3rem; }
.cm-content p { margin: .2rem 0 0; font-size: .88rem; color: rgba(255,255,255,.88); max-width: 520px; }
.cm-content .btn { background: #fff; color: var(--purple); border-color: #fff; }
@media (prefers-reduced-motion: reduce) { .colabora-bg .slide, .cm-bg .slide { transition: opacity .6s; transform: none !important; } }
/* Casilla "plantilla pública" en el formulario de Ayuda */
.public-ok { background: var(--bg-tint); border-radius: 12px; padding: .9rem 1rem; }
.public-ok .hint { display: block; margin: .4rem 0 0 1.9rem; color: var(--purple-600); font-size: .82rem; line-height: 1.45; }

/* ---------- Selector de idioma y moneda ---------- */
.prefs { display: inline-flex; align-items: center; gap: .5rem; font: 600 .78rem var(--font); color: var(--muted); }
.prefs-group { display: inline-flex; align-items: center; gap: 2px; background: var(--bg-soft); border-radius: 999px; padding: 3px; }
.prefs-group a { padding: .2rem .55rem; border-radius: 999px; color: var(--ink-2); line-height: 1.4; }
.prefs-group a:hover { color: var(--purple); }
.prefs-group a.on { background: #fff; color: var(--purple); box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.prefs-dark .prefs-group { background: rgba(255,255,255,.12); }
.prefs-dark .prefs-group a { color: rgba(255,255,255,.75); }
.prefs-dark .prefs-group a.on { background: #fff; color: var(--purple); }
.sidebar .prefs { margin: .8rem 0 .2rem; }
.pay-currency { display: flex; align-items: center; justify-content: space-between; gap: .6rem; margin-top: 1rem; font-size: .9rem; color: var(--ink-2); font-weight: 600; }
.pay-currency .prefs-group a { font-size: .8rem; }
.en-box { background: var(--bg-soft); border-radius: 14px; padding: .9rem 1.1rem; }
.en-box summary { cursor: pointer; font-weight: 600; }

/* Lista de invitados (Delux) */
.stats-5 { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.guests-tools { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem; align-items: start; }
.guests-tools > .panel { margin-bottom: 1.4rem; }
@media (max-width: 860px) { .guests-tools { grid-template-columns: 1fr; gap: 0; } }
details.panel > summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; }
details.panel > summary::-webkit-details-marker { display: none; }
details.panel > summary::after { content: '▾'; color: var(--muted); transition: transform .2s; }
details.panel[open] > summary::after { transform: rotate(180deg); }
.guests-table td { vertical-align: top; }
.btn-row.nowrap { flex-wrap: nowrap; }
.btn-wa { background: #25D366; color: #fff; }
.btn-wa:hover { background: #1EBE5A; color: #fff; }
.row-menu { position: relative; }
.row-menu > summary { list-style: none; }
.row-menu > summary::-webkit-details-marker { display: none; }
.row-menu-box { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; width: min(340px, 86vw); background: #fff; border: 1px solid var(--line);
  border-radius: 14px; box-shadow: 0 18px 40px rgba(0,0,0,.14); padding: 1rem; text-align: left; }
.guests-upsell .checklist { margin: 1rem 0 1.4rem; }

/* Subtipos de Eventos Especiales en la página de plantillas */
.subtabs { display: flex; gap: .4rem; justify-content: center; flex-wrap: wrap; margin: -1.2rem 0 2rem; }
.subtab { padding: .4rem .9rem; border-radius: 999px; border: 1px dashed var(--line); color: var(--ink-2); font-size: .85rem; font-weight: 600; }
.subtab.active, .subtab:hover { border-style: solid; border-color: var(--violet, #8A3FFC); color: var(--violet, #8A3FFC); background: #fff; }
.tpl-group-title { grid-column: 1 / -1; margin: 1rem 0 -.4rem; font-size: 1.05rem; }

/* ==========================================================================
   Analytics (admin). Paleta de referencia validada para daltonismo: serie 1 azul, 2 naranja, 3 aqua;
   magnitudes en una sola rampa de azul. Marcas delgadas, cuadrícula de 1 px y texto siempre en tinta, no en el color de la serie.
   (El panel no tiene modo oscuro, así que las gráficas solo definen el claro.)
   ========================================================================== */
.viz-root {
  --viz-surface: #fcfcfb; --viz-ink: #0b0b0b; --viz-ink-2: #52514e; --viz-muted: #898781; --viz-grid: #e1e0d9; --viz-base: #c3c2b7;
  --viz-empty: #f0efec; --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --s4: #eda100;
  display: grid; gap: 1.4rem;
}
.viz-filters { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem 1.2rem; margin-bottom: 1.4rem; }
.seg-links { display: inline-flex; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 3px; gap: 2px; }
.seg-links a { padding: .4rem .95rem; border-radius: 999px; font: 600 .85rem var(--font-head); color: var(--ink-2); }
.seg-links a.active { background: var(--ink); color: #fff; }
.viz-select { display: inline-flex; align-items: center; gap: .5rem; font-size: .88rem; color: var(--ink-2); }
.viz-select select { padding: .4rem .7rem; border-radius: 10px; }
.viz-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1rem; }
.viz-tile { background: var(--viz-surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem; }
.viz-tile .label { color: var(--viz-ink-2); font-size: .82rem; font-weight: 500; display: flex; align-items: center; gap: .45rem; }
.viz-tile .value { font: 700 1.9rem/1.15 system-ui, -apple-system, "Segoe UI", sans-serif; color: var(--viz-ink); margin-top: .35rem; }
.viz-tile .sub { font-size: .78rem; color: var(--viz-muted); margin-top: .3rem; }
.viz-hero .value { font-size: 3rem; }
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: #0ca30c; box-shadow: 0 0 0 0 rgba(12,163,12,.5); animation: livePulse 2s infinite; display: inline-block; }
@keyframes livePulse { 0% { box-shadow: 0 0 0 0 rgba(12,163,12,.45); } 70% { box-shadow: 0 0 0 8px rgba(12,163,12,0); } 100% { box-shadow: 0 0 0 0 rgba(12,163,12,0); } }
@media (prefers-reduced-motion: reduce) { .live-dot { animation: none; } }
.viz-card { background: var(--viz-surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.3rem 1.4rem; min-width: 0; }
.viz-head { display: flex; justify-content: space-between; align-items: baseline; gap: .6rem 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.viz-head h2 { font-size: 1.05rem; margin: 0; display: flex; align-items: center; gap: .5rem; }
.viz-note { font-size: .78rem; color: var(--viz-muted); }
.viz-sub { font-size: .9rem; margin: 1.4rem 0 .7rem; color: var(--viz-ink-2); }
.viz-empty { color: var(--viz-muted); font-size: .88rem; margin: .4rem 0; }
.viz-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.4rem; }
@media (max-width: 980px) { .viz-grid-2 { grid-template-columns: 1fr; } }
/* Línea */
.viz-line { width: 100%; height: auto; display: block; overflow: visible; }
.viz-line .viz-grid { stroke: var(--viz-grid); stroke-width: 1; }
.viz-line .viz-base { stroke: var(--viz-base); stroke-width: 1; }
.viz-line .viz-tick { fill: var(--viz-muted); font: 11px system-ui, sans-serif; font-variant-numeric: tabular-nums; }
.viz-line .viz-area { fill: var(--s1); opacity: .1; }
.viz-line .viz-stroke { fill: none; stroke: var(--s1); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.viz-line .viz-dot { fill: var(--s1); stroke: var(--viz-surface); stroke-width: 2; }
.viz-line .viz-endlabel { fill: var(--viz-ink); font: 600 12px system-ui, sans-serif; }
.viz-line .viz-cross { stroke: var(--viz-base); stroke-width: 1; }
.viz-line .viz-hit { fill: transparent; cursor: crosshair; outline: none; }
.viz-line .viz-hover-dot { fill: var(--s1); stroke: var(--viz-surface); stroke-width: 2; }
/* Barras horizontales: 10 px, extremo redondeado de 4 px, base recta */
.bl { display: grid; gap: .55rem; }
.bl-row { display: grid; grid-template-columns: minmax(90px, 34%) 1fr auto; align-items: center; gap: .8rem; border-radius: 8px; padding: .15rem .3rem; margin: 0 -.3rem; }
.bl-row:hover, .bl-row:focus-visible { background: #f4f3ef; outline: none; }
.bl-label { font-size: .86rem; color: var(--viz-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bl-track { height: 10px; display: block; }
.bl-bar { display: block; height: 10px; background: var(--s1); border-radius: 0 4px 4px 0; }
.bl-val { font-size: .86rem; font-weight: 600; color: var(--viz-ink); text-align: right; font-variant-numeric: tabular-nums; min-width: 4.2em; }
.bl-val small { display: block; font-weight: 400; color: var(--viz-muted); font-size: .72rem; }
/* Barra apilada (dispositivos): 2 px de separación entre segmentos */
.viz-stack { display: flex; gap: 2px; height: 22px; }
.viz-stack .seg { display: block; min-width: 3px; }
.viz-stack .seg:first-child { border-radius: 4px 0 0 4px; }
.viz-stack .seg:last-child { border-radius: 0 4px 4px 0; }
.viz-stack .seg:only-child { border-radius: 4px; }
.viz-stack .seg:hover, .viz-stack .seg:focus-visible { filter: brightness(1.12); outline: none; }
.s1 { background: var(--s1); } .s2 { background: var(--s2); } .s3 { background: var(--s3); } .s4 { background: var(--s4); }
.viz-legend { list-style: none; padding: 0; margin: .9rem 0 0; display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; font-size: .86rem; color: var(--viz-ink); }
.viz-legend li { display: flex; align-items: center; gap: .45rem; }
.viz-legend .key { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
/* Mapa de calor */
.viz-heat { display: grid; grid-template-columns: 2.6rem repeat(24, minmax(0, 1fr)); gap: 2px; font-size: .7rem; color: var(--viz-muted); }
.viz-heat .hh { text-align: center; font-variant-numeric: tabular-nums; }
.viz-heat .dd { align-self: center; }
.viz-heat .cell { aspect-ratio: 1; border-radius: 3px; min-height: 12px; }
.viz-heat .cell:hover { outline: 2px solid var(--viz-ink); outline-offset: -1px; }
.viz-scale { display: flex; align-items: center; gap: 3px; margin-top: .8rem; font-size: .75rem; color: var(--viz-muted); }
.viz-scale i { width: 18px; height: 10px; border-radius: 2px; display: inline-block; }
.viz-scale span { margin: 0 .4rem; }
/* Vista de tabla y tabla de visitas */
.viz-table { margin-top: .9rem; }
.viz-table summary { cursor: pointer; font-size: .8rem; color: var(--viz-ink-2); font-weight: 600; }
.viz-table table { margin-top: .6rem; font-size: .84rem; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .8rem; word-break: break-all; }
.nowrap { white-space: nowrap; }
.visits-table td { vertical-align: top; font-size: .85rem; }
.visits-table .ip { word-break: normal; white-space: nowrap; }
/* Tooltip: el valor manda, la etiqueta acompaña */
.viz-tip { position: fixed; z-index: 100; pointer-events: none; background: #fff; border: 1px solid rgba(11,11,11,.1); border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.12);
  padding: .55rem .75rem; font-size: .8rem; color: var(--ink-2, #52514e); max-width: 260px; line-height: 1.35; }
.viz-tip b { display: block; font-size: 1rem; color: #0b0b0b; }
.viz-tip .row { display: flex; align-items: center; gap: .45rem; }
.viz-tip .row i { width: 12px; height: 2px; background: #2a78d6; display: inline-block; }
