/* ===========================================================================
   Ekkoer — estilos de la app (paneles, registro, perfil público, admin)
   Complementa a welcome.css. Paleta: fondo #03000D, acento #73C7F7, Lexend.
   =========================================================================== */

:root {
  --bg: #03000D;
  --panel: #0B0231;
  --panel-2: #130a3d;
  --accent: #73C7F7;
  --text: #FFFFFF;
  --muted: #9aa3b2;
  --danger: #ff6b6b;
  --ok: #4ade80;
}
.level-limits { display: grid; gap: 8px; }
.level-limits label { display: grid; gap: 4px; font-size: 12px; color: var(--muted); }
.level-limits .input-field { padding: 7px 10px; font-size: 14px; }

* { box-sizing: border-box; }

.container { width: 100%; }

/* Barra superior unificada --------------------------------------------------*/
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 6vw;
  flex-wrap: wrap;
  gap: 10px;
}
.header .top-right {
  position: static;
  display: flex;
  align-items: center;
  gap: 8px;
}
.header .top-right .login,
.header .top-right .registrar {
  width: auto;
  padding: 8px 16px;
  cursor: pointer;
}

/* Contenedores de formulario ------------------------------------------------*/
.login-container { padding: 0 6vw; max-width: 640px; margin: 0 auto; }

.input-field {
  width: 100%;
  padding: 12px 14px;
  background: var(--panel);
  border: 1px solid #241a52;
  border-radius: 10px;
  color: var(--text);
  font-size: 16px;
  outline: none;
}
.input-field::placeholder { color: #6b738a; }
.input-field:focus { border-color: var(--accent); }
textarea.input-field { resize: vertical; }

.input-wrapper { position: relative; width: 100%; }
.password-toggle {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  background: transparent; border: none; color: var(--accent); cursor: pointer;
}
.password-input { padding-right: 38px; }

/* Alertas / mensajes --------------------------------------------------------*/
.form-alert {
  max-width: 520px; margin: 16px auto 0; padding: 12px 16px;
  border-radius: 10px; text-align: center;
}
.form-alert--ok    { background: rgba(74,222,128,.12); color: var(--ok); border: 1px solid rgba(74,222,128,.4); }
.form-alert--error { background: rgba(255,107,107,.12); color: var(--danger); border: 1px solid rgba(255,107,107,.4); }

.message-card {
  max-width: 560px; margin: 0 auto; background: var(--panel);
  border: 1px solid #241a52; border-radius: 16px; padding: 36px 28px;
}

/* Formulario de registro ----------------------------------------------------*/
.register-form { max-width: 560px; margin: 0 auto; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; flex: 1; }
.field label { color: var(--muted); font-size: 14px; }
.field-error { color: var(--danger); font-size: 13px; }
.field-row { display: flex; gap: 14px; }
.section-label { color: var(--accent); margin: 18px 0 6px; font-size: 14px; letter-spacing: .04em; text-transform: uppercase; }
.boton--wide { width: auto; min-width: 200px; padding: 10px 28px; height: auto; line-height: 1.4; }

/* ===========================================================================
   Panel (dashboard) y admin
   =========================================================================== */
.dash { max-width: 1040px; margin: 0 auto; padding: 0 6vw 40px; color: var(--text); }
.dash-head { display: flex; align-items: center; justify-content: space-between; margin: 10px 0 18px; }
.dash-public-link { display: inline-flex; align-items: center; gap: 8px; color: var(--accent); text-decoration: none; margin-top: 6px; }

.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.dash-col { display: flex; flex-direction: column; gap: 20px; }

.card {
  background: var(--panel); border: 1px solid #241a52; border-radius: 16px;
  padding: 20px; color: var(--text);
}
.card h2 { margin: 0 0 14px; font-size: 18px; color: var(--accent); display: flex; align-items: center; gap: 10px; font-weight: 500; }
.card label { display: block; color: var(--muted); font-size: 14px; margin: 10px 0 6px; }
.card .hint { color: var(--muted); font-size: 13px; margin: 8px 0 0; }
.card code { background: #1c1147; padding: 2px 6px; border-radius: 6px; color: #cbd5ff; }

.btn-primary {
  margin-top: 14px; background: var(--accent); color: #03000D; border: none;
  border-radius: 10px; padding: 11px 20px; font-size: 15px; font-weight: 600;
  cursor: pointer; font-family: inherit;
}
.btn-primary:hover { opacity: .9; }

.color-row { display: flex; align-items: center; gap: 12px; }
input[type="color"] { width: 54px; height: 38px; border: none; background: none; cursor: pointer; }

/* Avatar */
.avatar-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.avatar-preview {
  width: 72px; height: 72px; border-radius: 50%; overflow: hidden; flex-shrink: 0;
  background: var(--panel-2); display: flex; align-items: center; justify-content: center;
  color: var(--accent); font-size: 28px; font-weight: 700; border: 2px solid var(--accent);
}
.avatar-preview img { width: 100%; height: 100%; object-fit: cover; }
.avatar-form { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.avatar-form input[type="file"] { color: var(--muted); font-size: 13px; max-width: 220px; }
.avatar-form .btn-primary { margin-top: 0; }

/* Lista de enlaces */
.link-list { list-style: none; padding: 0; margin: 10px 0 0; display: flex; flex-direction: column; gap: 10px; }
.link-item {
  display: grid; grid-template-columns: auto auto 1fr auto; align-items: center; gap: 12px;
  background: var(--panel-2); border: 1px solid #2a1f5e; border-radius: 12px; padding: 12px 14px;
}
.link-item.is-inactive { opacity: .5; }
.link-item.dragging { outline: 2px dashed var(--accent); }
.drag-handle { color: var(--muted); cursor: grab; }
.link-icon { color: var(--accent); width: 22px; text-align: center; }
.link-meta { display: flex; flex-direction: column; overflow: hidden; }
.link-meta strong { font-weight: 600; }
.link-meta small { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.link-actions { display: flex; align-items: center; gap: 6px; }
.link-actions form { margin: 0; display: inline; }
.icon-btn {
  background: transparent; border: 1px solid #39306b; color: var(--text);
  width: 34px; height: 34px; border-radius: 8px; cursor: pointer;
}
.icon-btn:hover { border-color: var(--accent); color: var(--accent); }
.icon-btn--danger:hover { border-color: var(--danger); color: var(--danger); }
.link-edit { grid-column: 1 / -1; border-top: 1px solid #2a1f5e; margin-top: 10px; padding-top: 10px; }

/* Título de sección en la lista del panel */
.link-item--heading {
  background: transparent; border: 1px dashed #39306b;
}
.link-item--heading .link-icon { color: var(--muted); }
.link-item--heading .link-meta strong { letter-spacing: .04em; text-transform: uppercase; font-size: 14px; }

/* Métricas admin */
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 16px 0 22px; }
.stat { background: var(--panel); border: 1px solid #241a52; border-radius: 14px; padding: 18px; text-align: center; color: var(--muted); display: flex; flex-direction: column; gap: 6px; }
.stat-num { font-size: 30px; color: var(--accent); font-weight: 700; }

/* Tabla admin */
.table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; color: var(--text); }
.admin-table th, .admin-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid #241a52; font-size: 14px; }
.admin-table th { color: var(--muted); font-weight: 500; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11px; margin-left: 4px; }
.badge--admin { background: rgba(115,199,247,.18); color: var(--accent); }
.badge--ok { background: rgba(74,222,128,.15); color: var(--ok); }
.badge--off { background: rgba(255,107,107,.15); color: var(--danger); }
.badge--warn { background: rgba(250,204,21,.15); color: #facc15; }
.btn-small { background: var(--accent); color: #03000D; border: none; border-radius: 8px; padding: 7px 12px; font-size: 13px; cursor: pointer; font-weight: 600; }
.btn-small--danger { background: var(--danger); color: #1a0000; }
.checkbox-row { display: flex; align-items: center; gap: 8px; color: var(--muted); margin: 12px 0; }
.divider { border: none; border-top: 1px solid #241a52; margin: 20px 0; }

/* ===========================================================================
   Perfil público (Linktree)
   =========================================================================== */
.profile-body { background: var(--p-bg, var(--bg)); min-height: 100vh; }
.profile {
  max-width: 560px; margin: 0 auto; padding: 48px 20px 40px;
  display: flex; flex-direction: column; align-items: center; text-align: center;
}
.profile-avatar {
  width: 110px; height: 110px; border-radius: 50%; overflow: hidden;
  background: var(--panel-2); display: flex; align-items: center; justify-content: center;
  color: var(--accent); font-size: 44px; font-weight: 700;
  border: 3px solid var(--accent); margin-bottom: 18px;
}
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-title { color: var(--p-title, #fff); font-size: 26px; margin: 0 0 6px; }
.profile-bio { color: var(--p-desc, var(--muted)); margin: 0 0 24px; max-width: 420px; }

/* Fila de iconos sociales bajo la descripción (además de los botones de enlaces) */
.profile-socials {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 12px;
  margin: 0 0 26px; padding: 0;
}
.profile-socials .social-ico {
  width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; font-size: 19px; line-height: 1; text-decoration: none;
  color: var(--btn-text, var(--p-title, #fff));
  background: var(--accent);
  border: 2px solid var(--btn-border, var(--accent));
  transition: transform .12s ease, opacity .12s ease;
}
.profile-socials .social-ico:hover { transform: translateY(-2px); opacity: .9; }

.profile-links { width: 100%; display: flex; flex-direction: column; gap: 14px; }

/* Título de sección entre los enlaces del perfil público */
.profile-section {
  color: var(--p-title, #fff); font-size: 14px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .08em; opacity: .72;
  margin: 18px 0 2px; padding-bottom: 8px; width: 100%;
  border-bottom: 1px solid color-mix(in srgb, var(--p-title, #fff) 22%, transparent);
}
.profile-section:first-child { margin-top: 0; }

/* Botón de enlace con variantes de forma y estilo */
.btn-link {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 15px 18px; font-size: 16px; text-decoration: none; cursor: pointer;
  border: 2px solid var(--btn-border, var(--accent)); transition: transform .12s ease, opacity .12s ease;
  position: relative;
}
.btn-link i { position: absolute; left: 18px; }
.btn-link:hover { transform: translateY(-2px); }

/* Forma */
.profile[data-shape="rounded"] .btn-link { border-radius: 12px; }
.profile[data-shape="pill"]    .btn-link { border-radius: 999px; }
.profile[data-shape="square"]  .btn-link { border-radius: 0; }

/* Estilo (el color del texto y del borde los controla el usuario) */
.profile[data-style="fill"]    .btn-link { background: var(--accent); color: var(--btn-text, #03000D); }
.profile[data-style="outline"] .btn-link { background: transparent; color: var(--btn-text, var(--accent)); }
.profile[data-style="soft"]    .btn-link { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--btn-text, var(--accent)); border-color: transparent; }

/* Embed de YouTube */
.yt-embed { width: 100%; display: flex; flex-direction: column; gap: 10px; }
.yt-embed iframe { width: 100%; aspect-ratio: 16 / 9; border-radius: 12px; border: 1px solid #241a52; }

.profile-footer { margin-top: 36px; font-size: 14px; }

/* ===========================================================================
   Responsivo
   =========================================================================== */
@media (max-width: 860px) {
  .dash-grid { grid-template-columns: 1fr; }
  .stat-row { grid-template-columns: repeat(2, 1fr); }
  .field-row { flex-direction: column; gap: 0; }
}

/* ===========================================================================
   Superficies del navegador (tematizadas desde la paleta)
   =========================================================================== */
:root { color-scheme: dark; }
/* El atributo hidden debe ganar a cualquier display de clase. */
[hidden] { display: none !important; }
::selection { background: rgba(115, 199, 247, 0.28); color: #fff; }
input, textarea { caret-color: var(--accent); }
:where(a, button, input, select, textarea):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}
html { scrollbar-color: #2a1f5e #07031a; scrollbar-width: thin; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #07031a; }
::-webkit-scrollbar-thumb { background: #2a1f5e; border-radius: 8px; border: 2px solid #07031a; }
::-webkit-scrollbar-thumb:hover { background: #3a2d72; }

/* ===========================================================================
   Registro interactivo (asistente con vista previa en vivo)
   =========================================================================== */
.reg-body {
  --reg-muted: #9fb2de;
  min-height: 100vh;
  background:
    radial-gradient(120% 90% at 85% 10%, rgba(115, 199, 247, 0.06), transparent 60%),
    var(--bg);
  color: var(--text);
}
.reg {
  display: grid;
  grid-template-columns: 1fr 480px;
  min-height: 100vh;
}
.reg-controls {
  display: flex;
  flex-direction: column;
  padding: 26px clamp(24px, 5vw, 72px) 40px;
}

.reg-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.reg-brand {
  color: var(--accent);
  font-size: 24px;
  letter-spacing: 0.02em;
  text-decoration: none;
}
.reg-top-alt { color: var(--reg-muted); font-size: 14px; }
.reg-top-alt a { color: var(--accent); text-decoration: none; }
.reg-top-alt a:hover { text-decoration: underline; }

.reg-progress {
  margin: 30px 0 22px;
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 560px;
}
.reg-progress-bar {
  flex: 1;
  height: 6px;
  background: #17103c;
  border-radius: 999px;
  overflow: hidden;
}
.reg-progress-fill {
  display: block;
  height: 100%;
  width: 25%;
  background: var(--accent);
  border-radius: 999px;
  transition: width 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}
.reg-progress-label { color: var(--reg-muted); font-size: 13px; white-space: nowrap; }

.reg-form {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 560px;
  width: 100%;
}
.reg-step { animation: regStepIn 0.45s cubic-bezier(0.16, 1, 0.3, 1); }
.reg-step:not(.is-current) { display: none; }
@keyframes regStepIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
.reg-q {
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
  color: #fff;
  text-wrap: balance;
}
.reg-sub { color: var(--reg-muted); font-size: 16px; margin: 0 0 26px; }

.reg-form label {
  display: block;
  color: var(--reg-muted);
  font-size: 14px;
  margin: 16px 0 7px;
}
.reg-opt { color: #6f7aa0; }
.reg-input {
  width: 100%;
  padding: 14px 16px;
  background: var(--panel);
  border: 1px solid #241a52;
  border-radius: 12px;
  color: var(--text);
  font-size: 16px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.reg-input::placeholder { color: #6b738a; }
.reg-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(115, 199, 247, 0.18); }
.reg-input.has-error { border-color: var(--danger); }
.field-error { display: block; color: var(--danger); font-size: 13px; margin-top: 6px; min-height: 1em; }

/* Handle con prefijo */
.reg-handle {
  display: flex;
  align-items: stretch;
  background: var(--panel);
  border: 1px solid #241a52;
  border-radius: 12px;
  overflow: hidden;
}
.reg-handle:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(115, 199, 247, 0.18); }
.reg-handle-prefix {
  display: flex;
  align-items: center;
  padding: 0 4px 0 16px;
  color: var(--reg-muted);
  font-size: 16px;
  white-space: nowrap;
}
.reg-handle-input {
  border: none;
  background: transparent;
  box-shadow: none;
  padding-left: 0;
}
.reg-handle-input:focus { box-shadow: none; }
.reg-handle-status { display: block; font-size: 13px; margin-top: 7px; min-height: 1em; }
.reg-handle-status.is-checking { color: var(--reg-muted); }
.reg-handle-status.is-ok { color: var(--ok); }
.reg-handle-status.is-bad { color: var(--danger); }
.reg-handle-status i { margin-right: 5px; }

/* Solo para lectores de pantalla (contenido visualmente oculto). */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Tipos de negocio */
.reg-types {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.reg-type {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: var(--panel);
  border: 1px solid #241a52;
  border-radius: 14px;
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}
.reg-type i { color: var(--accent); font-size: 20px; width: 24px; text-align: center; flex-shrink: 0; }
.reg-type:hover { border-color: #3a2d72; transform: translateY(-2px); }
.reg-type.is-active {
  border-color: var(--accent);
  background: rgba(115, 199, 247, 0.12);
  box-shadow: 0 0 0 1px var(--accent) inset;
}

/* Colores */
.reg-swatches {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 12px;
  max-width: 420px;
}
.reg-swatch {
  aspect-ratio: 1;
  border-radius: 50%;
  border: 2px solid transparent;
  background: var(--sw);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}
.reg-swatch:hover { transform: scale(1.08); }
.reg-swatch.is-active {
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--sw);
  transform: scale(1.08);
}
.reg-custom {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 22px;
  color: var(--reg-muted);
  font-size: 14px;
}
.reg-custom input[type="color"] {
  width: 46px;
  height: 34px;
  padding: 0;
  border: 1px solid #241a52;
  border-radius: 8px;
  background: none;
  cursor: pointer;
}

/* Cuenta */
.reg-two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.reg-disclosure {
  margin-top: 18px;
  background: transparent;
  border: 1px dashed #3a2d72;
  color: var(--accent);
  border-radius: 10px;
  padding: 11px 14px;
  font-family: inherit;
  font-size: 14px;
  cursor: pointer;
  width: 100%;
  text-align: left;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.reg-disclosure:hover { background: rgba(115, 199, 247, 0.06); }
.reg-disclosure.is-open i { transform: rotate(45deg); }
.reg-disclosure i { transition: transform 0.2s ease; }
.reg-socials { margin-top: 12px; }

/* Navegación */
.reg-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 30px;
}
.reg-back {
  background: transparent;
  border: 1px solid #3a2d72;
  color: var(--text);
  border-radius: 12px;
  padding: 13px 20px;
  font-family: inherit;
  font-size: 15px;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.reg-back:hover { border-color: var(--accent); color: var(--accent); }
.reg-next, .reg-submit {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--accent);
  color: #03000D;
  border: none;
  border-radius: 12px;
  padding: 14px 26px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(115, 199, 247, 0.22);
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}
.reg-next:hover, .reg-submit:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(115, 199, 247, 0.3); }

/* ---------------------------------------------------------------------------
   Escenario: teléfono con preview en vivo
   --------------------------------------------------------------------------- */
.reg-stage {
  position: relative;
  background:
    radial-gradient(90% 60% at 50% 0%, rgba(115, 199, 247, 0.10), transparent 70%),
    linear-gradient(180deg, #0a0520, #050112);
  border-left: 1px solid #1a1340;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 40px 24px;
}
.reg-phone {
  --accent: #73C7F7;
  --accent-text: #03000D;
  width: 300px;
  height: 600px;
  border-radius: 40px;
  padding: 12px;
  background: linear-gradient(160deg, #241a52, #0d0730);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(115, 199, 247, 0.12);
  position: relative;
}
.reg-phone::before {
  content: "";
  position: absolute;
  top: 18px; left: 50%;
  transform: translateX(-50%);
  width: 92px; height: 7px;
  border-radius: 999px;
  background: #0d0730;
  z-index: 2;
}
.reg-phone-screen {
  height: 100%;
  border-radius: 30px;
  background: radial-gradient(120% 80% at 50% 0%, #0b0524, #03000D 70%);
  padding: 44px 22px 26px;
  overflow-y: auto;
  text-align: center;
  scrollbar-width: none;
}
.reg-phone-screen::-webkit-scrollbar { display: none; }
.reg-pf-avatar {
  width: 72px; height: 72px;
  margin: 0 auto 14px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 30px; font-weight: 700;
  color: var(--accent);
  background: rgba(255, 255, 255, 0.04);
  border: 2px solid var(--accent);
  transition: border-color 0.3s ease, color 0.3s ease;
}
.reg-pf-title { color: #fff; font-size: 19px; margin-bottom: 4px; word-break: break-word; }
.reg-pf-handle { color: var(--accent); font-size: 12px; margin-bottom: 22px; word-break: break-all; transition: color 0.3s ease; }
.reg-pf-links { display: flex; flex-direction: column; gap: 11px; }
.reg-pf-link {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  position: relative;
  padding: 13px 14px;
  border-radius: 12px;
  background: var(--accent);
  color: var(--accent-text);
  font-size: 14px;
  font-weight: 600;
  animation: regLinkIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
  transition: background 0.3s ease, color 0.3s ease;
}
.reg-pf-link i { position: absolute; left: 14px; font-size: 14px; }
@keyframes regLinkIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
.reg-pf-ghost {
  height: 46px;
  border-radius: 12px;
  border: 1.5px dashed #2f2660;
  background: rgba(255, 255, 255, 0.015);
}
.reg-stage-caption { color: var(--reg-muted); font-size: 13px; }

/* ---------------------------------------------------------------------------
   Responsivo
   --------------------------------------------------------------------------- */
@media (max-width: 880px) {
  /* Modo app: pantalla completa, sin scroll de página, transición por paso */
  /* Bloquea el scroll SOLO en el registro (se fija al viewport visible).
     OJO: no usar el selector global html aquí; bloquearía el scroll de todo el sitio. */
  .reg-body { overflow: hidden; overscroll-behavior: none; height: 100%; }
  .reg {
    grid-template-columns: 1fr;
    display: flex; flex-direction: column;
    position: fixed; inset: 0; min-height: 0; overflow: hidden;
  }
  /* El preview solo se muestra al final (pantalla de "Tu sitio se verá así"),
     no durante los pasos en móvil. */
  .reg-stage { display: none; }
  .reg-phone { width: 140px; height: 248px; border-radius: 24px; padding: 6px; }
  .reg-phone::before { top: 9px; width: 48px; height: 5px; }
  .reg-phone-screen { border-radius: 19px; padding: 22px 12px 14px; }
  .reg-pf-avatar { width: 42px; height: 42px; font-size: 18px; margin-bottom: 7px; }
  .reg-pf-title { font-size: 13px; }
  .reg-pf-handle { font-size: 9px; margin-bottom: 10px; }
  .reg-pf-link { padding: 8px; font-size: 10px; gap: 6px; }
  .reg-pf-link i { font-size: 10px; left: 9px; }
  .reg-pf-ghost { height: 28px; }
  .reg-stage-caption { display: none; }

  .reg-controls { flex: 1 1 auto; display: flex; flex-direction: column; overflow: hidden; padding: 12px clamp(16px, 6vw, 34px) 10px; }
  .reg-top { flex: 0 0 auto; }
  .reg-progress { flex: 0 0 auto; margin: 14px 0 10px; }
  .reg-form { flex: 1 1 auto; display: flex; flex-direction: column; min-height: 0; justify-content: flex-start; padding-top: 0; }

  .reg-screens { position: relative; flex: 1 1 auto; min-height: 0; overflow: hidden; }
  .reg-step {
    display: block !important;
    position: absolute; inset: 0; overflow-y: auto; padding: 2px 2px 8px;
    opacity: 0; transform: translateX(42px) scale(0.98); pointer-events: none;
    transition: opacity 0.42s cubic-bezier(0.4, 0, 0.2, 1), transform 0.42s cubic-bezier(0.4, 0, 0.2, 1);
    animation: none;
  }
  .reg-step.is-current { opacity: 1; transform: none; pointer-events: auto; }
  .reg-step.is-prev { opacity: 0; transform: translateX(-42px) scale(0.98); }
  .reg-step.is-next { opacity: 0; transform: translateX(42px) scale(0.98); }
  .reg-q { font-size: clamp(24px, 7vw, 32px); }

  .reg-nav { flex: 0 0 auto; margin-top: 8px; padding: 6px 0 calc(4px + env(safe-area-inset-bottom)); gap: 10px; }
  .reg-next, .reg-submit { flex: 1; justify-content: center; margin-left: 0; }
  .reg-back { flex: 0 0 auto; }
  .reg-types { grid-template-columns: 1fr; }
  .reg-swatches { grid-template-columns: repeat(8, 1fr); max-width: none; }
}
@media (max-width: 420px) {
  .reg-two { grid-template-columns: 1fr; gap: 0; }
  .reg-swatches { grid-template-columns: repeat(4, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  .reg-step, .reg-pf-link { animation: none; }
  .reg-step { transition: none; }
  .reg-progress-fill { transition: none; }
}

/* ===========================================================================
   Panel: selectores de color, límite de enlaces, enlace a estadísticas
   =========================================================================== */
.dash-head { align-items: flex-start; }
.dash-stats-link {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--accent); text-decoration: none;
  border: 1px solid #241a52; border-radius: 10px; padding: 9px 16px;
  transition: border-color 0.15s ease;
}
.dash-stats-link:hover { border-color: var(--accent); }

.color-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 6px 0 4px;
}
.color-field {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  font-size: 13px; color: var(--muted);
}
.color-field input[type="color"] {
  width: 100%; height: 40px;
  border: 1px solid #241a52; border-radius: 8px;
  background: none; cursor: pointer; padding: 2px;
}

.limit-notice {
  display: flex; gap: 10px; align-items: flex-start;
  background: rgba(250, 204, 21, 0.1);
  border: 1px solid rgba(250, 204, 21, 0.4);
  color: #facc15;
  border-radius: 10px; padding: 12px 14px; margin-bottom: 14px; font-size: 14px;
}
.limit-notice i { margin-top: 2px; }

/* ===========================================================================
   Estadísticas
   =========================================================================== */
.range-toggle {
  display: inline-flex;
  border: 1px solid #241a52; border-radius: 10px; overflow: hidden;
}
.range-toggle a { padding: 8px 15px; color: var(--muted); text-decoration: none; font-size: 14px; }
.range-toggle a.is-active { background: var(--accent); color: #03000D; font-weight: 600; }

.chart-legend { display: flex; gap: 18px; color: var(--muted); font-size: 13px; margin-top: 6px; }
.chart-legend .dot { width: 10px; height: 10px; border-radius: 3px; display: inline-block; margin-right: 6px; }
.dot--views { background: var(--accent); }
.dot--clicks { background: #FBBF24; }

.chart {
  display: flex; align-items: flex-end; gap: 6px;
  margin-top: 16px; overflow-x: auto; padding-bottom: 4px;
}
.chart-col { flex: 1 1 0; min-width: 14px; display: flex; flex-direction: column; align-items: center; gap: 7px; }
.chart-pair { height: 140px; display: flex; align-items: flex-end; gap: 3px; }
.bar { width: 9px; min-height: 2px; border-radius: 3px 3px 0 0; transition: height 0.4s cubic-bezier(0.16, 1, 0.3, 1); }
.bar--views { background: var(--accent); }
.bar--clicks { background: #FBBF24; }
.chart-x { font-size: 11px; color: var(--muted); white-space: nowrap; }

.rank-list { list-style: none; padding: 0; margin: 14px 0 0; display: flex; flex-direction: column; gap: 15px; }
.rank-item { display: flex; align-items: center; gap: 12px; }
.rank-icon { color: var(--accent); width: 24px; text-align: center; flex-shrink: 0; }
.rank-body { flex: 1; min-width: 0; }
.rank-top { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.rank-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-count { color: var(--accent); font-weight: 600; flex-shrink: 0; }
.rank-track { height: 8px; background: #17103c; border-radius: 999px; overflow: hidden; }
.rank-bar { display: block; height: 100%; background: var(--accent); border-radius: 999px; transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1); }

@media (prefers-reduced-motion: reduce) {
  .bar, .rank-bar { transition: none; }
}
@media (max-width: 620px) {
  .color-grid { gap: 8px; }
  .dash-head { flex-direction: column; gap: 12px; }
}

/* ===========================================================================
   Niveles de cuenta (Mi plan) y controles de nivel en admin
   =========================================================================== */
.dash-head-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.plan-pending {
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  background: rgba(250, 204, 21, 0.1); border: 1px solid rgba(250, 204, 21, 0.4);
  color: #facc15; border-radius: 12px; padding: 14px 16px; margin-bottom: 18px;
}
.plan-pending form { margin: 0; }

.tier-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.tier-card {
  position: relative;
  background: var(--panel); border: 1px solid #241a52; border-radius: 16px;
  padding: 24px 22px; display: flex; flex-direction: column; color: var(--text);
}
.tier-card.is-current { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.tier-flag {
  position: absolute; top: 14px; right: 14px;
  background: var(--accent); color: #03000D; font-size: 11px; font-weight: 700;
  padding: 3px 10px; border-radius: 999px;
}
.tier-card h2 { margin: 0 0 4px; font-size: 22px; color: #fff; }
.tier-price { color: var(--accent); font-size: 18px; font-weight: 600; margin: 0 0 16px; }
.tier-features { list-style: none; padding: 0; margin: 0 0 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.tier-features li { display: flex; align-items: flex-start; gap: 10px; color: #cdd4e6; font-size: 14px; line-height: 1.4; }
.tier-features i { color: var(--ok); margin-top: 3px; }
.tier-action .btn-primary { width: 100%; margin-top: 0; }
.tier-action .btn-primary:disabled { opacity: 0.5; cursor: default; }

.req-list { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-direction: column; gap: 12px; }
.req-item {
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  background: var(--panel-2); border: 1px solid #2a1f5e; border-radius: 12px; padding: 12px 14px; font-size: 14px;
}
.req-item form { margin: 0; }

.tier-set { display: inline-flex; align-items: center; gap: 6px; margin: 0; }
.tier-select {
  background: var(--panel); color: var(--text);
  border: 1px solid #39306b; border-radius: 8px; padding: 6px 8px; font-size: 13px;
}

@media (max-width: 760px) {
  .tier-grid { grid-template-columns: 1fr; }
}

/* ===========================================================================
   Catálogo — gestión (panel)
   =========================================================================== */
.inline-add { display: flex; gap: 8px; margin-bottom: 14px; }
.inline-add .input-field { flex: 1; }
.inline-add .btn-primary { margin-top: 0; white-space: nowrap; }

.cat-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.cat-item { display: flex; gap: 8px; align-items: center; }
.cat-item form { margin: 0; }
.cat-rename { display: flex; gap: 6px; flex: 1; }
.cat-rename .input-field { flex: 1; }

.cat-heading { color: var(--accent); font-size: 15px; margin: 20px 0 10px; font-weight: 600; }
.item-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.item-card {
  background: var(--panel-2); border: 1px solid #2a1f5e; border-radius: 12px;
  overflow: hidden; display: flex; flex-direction: column;
}
.item-card.is-inactive { opacity: 0.5; }
.item-thumb {
  aspect-ratio: 1; background: #0d0730;
  display: flex; align-items: center; justify-content: center; color: #39306b; font-size: 28px;
}
.item-thumb img { width: 100%; height: 100%; object-fit: cover; }
.item-info { padding: 12px; display: flex; flex-direction: column; gap: 6px; }
.item-top { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.item-price { color: var(--accent); font-weight: 600; white-space: nowrap; }
.item-sizes { color: var(--muted); font-size: 12px; }
.item-actions { display: flex; gap: 6px; margin-top: 4px; }
.item-actions form { margin: 0; display: inline; }
.item-edit { padding: 0 12px 12px; border-top: 1px solid #2a1f5e; margin-top: 4px; }
.item-edit input[type="file"] { color: var(--muted); font-size: 12px; max-width: 100%; }

/* ===========================================================================
   Catálogo — feed público (perfil)
   =========================================================================== */
.profile-catalog { width: 100%; margin-top: 36px; display: flex; flex-direction: column; gap: 32px; text-align: left; }
.cat-feed-title { color: var(--p-title, #fff); font-size: 21px; margin: 0 0 14px; text-align: center; }
.feed { display: flex; flex-direction: column; gap: 18px; }
.feed-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px; overflow: hidden;
}
.feed-media { aspect-ratio: 4 / 5; background: rgba(0, 0, 0, 0.25); }
.feed-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.feed-body { padding: 15px 16px; }
.feed-head { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; margin-bottom: 6px; }
.feed-name { font-size: 17px; margin: 0; color: var(--p-title, #fff); }
.feed-price { color: var(--accent); font-weight: 700; white-space: nowrap; }
.feed-desc { color: var(--p-desc, var(--muted)); font-size: 14px; margin: 0 0 12px; line-height: 1.5; }
.feed-sizes { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.size-chip {
  border: 1px solid var(--btn-border, var(--accent));
  color: var(--p-desc, #cbd5ff); font-size: 12px; padding: 3px 10px; border-radius: 999px;
}
.feed-wa {
  display: inline-flex; align-items: center; gap: 8px;
  background: #25D366; color: #05240f; text-decoration: none; font-weight: 600;
  padding: 11px 18px; border-radius: 10px; transition: transform 0.12s ease;
}
.feed-wa:hover { transform: translateY(-2px); }

/* ===========================================================================
   Catálogo — enlaces de categoría en el home + badge de nº de fotos
   =========================================================================== */
.profile-cats { width: 100%; display: flex; flex-direction: column; gap: 14px; margin-top: 16px; }
.item-thumb { position: relative; }
.img-count {
  position: absolute; top: 8px; right: 8px;
  background: rgba(0, 0, 0, 0.6); color: #fff; font-size: 11px;
  padding: 2px 7px; border-radius: 999px; display: inline-flex; gap: 4px; align-items: center;
}

/* ===========================================================================
   Página de categoría — feed estilo Instagram (con los colores del perfil)
   =========================================================================== */
.cat-main { max-width: 560px; margin: 0 auto; padding: 0 0 40px; }
.cat-bar {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px; background: var(--p-bg, #03000D);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.cat-back { color: var(--accent); font-size: 18px; text-decoration: none; width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; }
.cat-bar-id { display: flex; align-items: center; gap: 12px; }
.cat-bar-avatar {
  width: 42px; height: 42px; border-radius: 50%; overflow: hidden;
  background: rgba(255, 255, 255, 0.06); display: flex; align-items: center; justify-content: center;
  color: var(--accent); font-weight: 700; border: 1px solid var(--accent);
}
.cat-bar-avatar img { width: 100%; height: 100%; object-fit: cover; }
.cat-bar-name { display: block; color: var(--p-title, #fff); font-size: 17px; }
.cat-bar-user { color: var(--p-desc, var(--muted)); font-size: 13px; }
.cat-empty { text-align: center; color: var(--p-desc, var(--muted)); padding: 48px 16px; }

.posts { display: flex; flex-direction: column; gap: 26px; padding: 18px 12px 0; }
.post { background: rgba(255, 255, 255, 0.03); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 16px; overflow: hidden; }
.post-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; }
.post-avatar {
  width: 34px; height: 34px; border-radius: 50%; overflow: hidden;
  background: rgba(255, 255, 255, 0.06); display: flex; align-items: center; justify-content: center;
  color: var(--accent); font-weight: 700; font-size: 14px; border: 1px solid var(--accent);
}
.post-avatar img { width: 100%; height: 100%; object-fit: cover; }
.post-user { color: var(--p-title, #fff); font-weight: 600; font-size: 14px; }

.post-media { position: relative; }
.carousel { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.carousel::-webkit-scrollbar { display: none; }
.slide { flex: 0 0 100%; scroll-snap-align: center; aspect-ratio: 4 / 5; background: rgba(0, 0, 0, 0.25); }
.slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dots { position: absolute; bottom: 10px; left: 0; right: 0; display: flex; justify-content: center; gap: 6px; }
.dot { width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, 0.45); transition: background 0.2s ease, transform 0.2s ease; }
.dot.is-active { background: #fff; transform: scale(1.3); }

.post-actions { display: flex; align-items: center; gap: 16px; padding: 11px 14px 2px; }
.act { background: none; border: none; cursor: pointer; color: var(--p-title, #fff); font-size: 22px; padding: 2px; line-height: 1; transition: transform 0.12s ease, color 0.15s ease; }
.act:not([disabled]):active { transform: scale(0.88); }
.act[disabled] { opacity: 0.35; cursor: default; }
.act-like.liked { color: #ff4d6d; }

.post-body { padding: 4px 14px 16px; }
.post-top { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; margin-bottom: 6px; }
.post-name { margin: 0; font-size: 16px; color: var(--p-title, #fff); }
.post-price { color: var(--accent); font-weight: 700; white-space: nowrap; }
.post-desc {
  color: var(--p-desc, var(--muted)); font-size: 14px; line-height: 1.5; margin: 0;
  overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3;
}
.post-desc.expanded { -webkit-line-clamp: unset; display: block; }
.read-more { background: none; border: none; color: var(--p-desc, var(--muted)); opacity: 0.85; cursor: pointer; padding: 4px 0 0; font-size: 13px; font-family: inherit; }
.post-sizes { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; }
.post-body .feed-wa { margin-top: 4px; }

.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: #0B0231; border: 1px solid var(--accent); color: #fff;
  padding: 10px 18px; border-radius: 999px; font-size: 14px; z-index: 50; max-width: 90vw;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

@media (prefers-reduced-motion: reduce) {
  .dot, .act { transition: none; }
}

/* ===========================================================================
   Página de inicio (landing) — estilizada, responsive y animada
   =========================================================================== */
.lp { --lp-muted: #9fb2de; height: auto; min-height: 100vh; }

.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1); }
.reveal.in { opacity: 1; transform: none; }

/* Botones de la landing */
.lp-btn {
  display: inline-flex; align-items: center; justify-content: center;
  text-decoration: none; font-family: inherit; font-weight: 600;
  border-radius: 12px; padding: 14px 26px; font-size: 16px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.lp-btn--primary { background: var(--accent); color: #03000D; box-shadow: 0 10px 26px rgba(115, 199, 247, 0.26); }
.lp-btn--primary:hover { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(115, 199, 247, 0.36); }
.lp-btn--ghost { background: transparent; color: var(--accent); border: 1px solid #2f3b6b; }
.lp-btn--ghost:hover { border-color: var(--accent); }
.lp-btn--lg { padding: 16px 36px; font-size: 18px; }

/* Hero */
.lp-hero {
  max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: 1.05fr 0.95fr; align-items: center;
  gap: clamp(24px, 5vw, 60px);
  padding: clamp(24px, 6vw, 70px) 6vw clamp(40px, 8vw, 90px);
}
.lp-hero-text h1 { color: #fff; font-size: clamp(32px, 5.2vw, 60px); line-height: 1.05; letter-spacing: -0.02em; margin: 0 0 18px; text-wrap: balance; }
.lp-hero-text p { color: var(--lp-muted); font-size: clamp(16px, 2.2vw, 21px); line-height: 1.5; margin: 0 0 28px; max-width: 46ch; }
.lp-hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.lp-hero-media { position: relative; display: flex; justify-content: center; align-items: center; }
.lp-glow {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 78%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle, rgba(115, 199, 247, 0.4), transparent 68%);
  filter: blur(46px); z-index: 0;
}
.lp-phone { position: relative; z-index: 1; max-width: 100%; height: auto; max-height: 68vh; display: block; filter: drop-shadow(0 28px 60px rgba(0, 0, 0, 0.55)); }

/* Pasos */
.lp-steps { max-width: 1100px; margin: 0 auto; padding: clamp(30px, 6vw, 70px) 6vw; text-align: center; }
.lp-steps h2 { color: #fff; font-size: clamp(26px, 4vw, 40px); letter-spacing: -0.02em; margin: 0 0 clamp(26px, 4vw, 48px); }
.lp-step-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.lp-step {
  background: var(--panel); border: 1px solid #241a52; border-radius: 16px;
  padding: 26px 20px; text-align: left; position: relative;
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}
.lp-step-list .lp-step:nth-child(2) { transition-delay: 0.08s; }
.lp-step-list .lp-step:nth-child(3) { transition-delay: 0.16s; }
.lp-step-list .lp-step:nth-child(4) { transition-delay: 0.24s; }
.lp-step-dot {
  display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; border-radius: 12px;
  background: rgba(115, 199, 247, 0.12); color: var(--accent); font-size: 20px; margin-bottom: 16px;
  transition: background 0.4s ease, color 0.4s ease, transform 0.4s ease;
}
.lp-step h3 { color: #fff; font-size: 18px; margin: 0 0 8px; }
.lp-step p { color: var(--lp-muted); font-size: 14px; line-height: 1.5; margin: 0; }
.lp-accent { color: var(--accent); }
.lp-step.is-active { border-color: var(--accent); box-shadow: 0 12px 32px rgba(115, 199, 247, 0.16); transform: translateY(-5px); }
.lp-step.is-active .lp-step-dot { background: var(--accent); color: #03000D; transform: scale(1.08); }

/* Características */
.lp-features { max-width: 1100px; margin: 0 auto; padding: clamp(20px, 5vw, 50px) 6vw; display: flex; flex-direction: column; gap: clamp(44px, 8vw, 96px); }
.lp-feature { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: clamp(20px, 5vw, 60px); }
.lp-feature--reverse .lp-feature-media { order: -1; }
.lp-feature-text h2 { color: #fff; font-size: clamp(24px, 3.4vw, 34px); letter-spacing: -0.02em; margin: 0 0 12px; text-wrap: balance; }
.lp-feature-text p { color: var(--lp-muted); font-size: clamp(15px, 2vw, 18px); line-height: 1.55; margin: 0; max-width: 44ch; }
.lp-feature-media { display: flex; justify-content: center; }
.lp-feature-media .lp-phone { max-height: 54vh; }

/* Personalízalo: demo de colores */
.lp-custom { max-width: 1100px; margin: 0 auto; padding: clamp(30px, 6vw, 70px) 6vw; display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: clamp(24px, 5vw, 60px); }
.lp-custom-text h2 { color: #fff; font-size: clamp(26px, 4vw, 40px); letter-spacing: -0.02em; margin: 0 0 12px; }
.lp-custom-text p { color: var(--lp-muted); font-size: clamp(15px, 2vw, 18px); line-height: 1.55; margin: 0 0 22px; max-width: 42ch; }
.lp-custom-demo { display: flex; justify-content: center; }
.lp-mini {
  --mbg: #0c0a1e; --macc: #73C7F7; --mtitle: #ffffff; --mtext: #03000D;
  width: 280px; max-width: 100%;
  background: var(--mbg); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 26px;
  padding: 28px 22px; text-align: center; box-shadow: 0 30px 70px rgba(0, 0, 0, 0.5);
  transition: background 0.8s ease;
}
.lp-mini-avatar {
  width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 14px;
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 26px;
  background: rgba(255, 255, 255, 0.06); color: var(--macc); border: 2px solid var(--macc);
  transition: color 0.8s ease, border-color 0.8s ease;
}
.lp-mini-title { color: var(--mtitle); font-weight: 700; font-size: 18px; transition: color 0.8s ease; }
.lp-mini-sub { color: var(--macc); font-size: 12px; margin-bottom: 18px; opacity: 0.85; transition: color 0.8s ease; }
.lp-mini-links { display: flex; flex-direction: column; gap: 10px; }
.lp-mini-link {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--macc); color: var(--mtext); border-radius: 12px; padding: 11px; font-size: 14px; font-weight: 600;
  transition: background 0.8s ease, color 0.8s ease;
}

/* CTA final */
.lp-final { text-align: center; padding: clamp(40px, 8vw, 90px) 6vw clamp(16px, 4vw, 34px); }
.lp-final h2 { color: #fff; font-size: clamp(26px, 4.4vw, 44px); letter-spacing: -0.02em; margin: 0 0 24px; }

/* Responsive */
@media (max-width: 900px) {
  /* Home y login en móvil: sin botones de nav; nombre EKKOER centrado. */
  .lp .header,
  .login-page .header { justify-content: center; }
  .lp .header .top-right,
  .login-page .header .top-right { display: none; }
  .lp .header .tituloPrincipal,
  .login-page .header .tituloPrincipal { padding-left: 0; text-align: center; }
  .lp-hero { grid-template-columns: 1fr; text-align: center; }
  .lp-hero-text p { margin-left: auto; margin-right: auto; }
  .lp-hero-cta { justify-content: center; }
  .lp-step-list { grid-template-columns: repeat(2, 1fr); }
  .lp-feature, .lp-feature--reverse { grid-template-columns: 1fr; text-align: center; }
  .lp-feature--reverse .lp-feature-media { order: 0; }
  .lp-feature-text p { margin-left: auto; margin-right: auto; }
  .lp-custom { grid-template-columns: 1fr; text-align: center; }
  .lp-custom-text p { margin-left: auto; margin-right: auto; }
  .lp-phone { max-height: 50vh; }
  .lp-feature-media .lp-phone { max-height: 46vh; }
}
@media (max-width: 520px) {
  .lp-step-list { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .reveal, .lp-step { opacity: 1; transform: none; transition: none; }
  .lp-step-dot, .lp-mini, .lp-mini-avatar, .lp-mini-title, .lp-mini-sub, .lp-mini-link { transition: none; }
}

/* ===========================================================================
   Aviso de cookies
   =========================================================================== */
.cookie-banner {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 60;
  max-width: 720px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  background: var(--panel); border: 1px solid #241a52; border-radius: 14px;
  padding: 14px 18px; box-shadow: 0 16px 44px rgba(0, 0, 0, 0.55);
  opacity: 0; transform: translateY(12px); transition: opacity 0.25s ease, transform 0.25s ease;
}
.cookie-banner.in { opacity: 1; transform: none; }
.cookie-text { margin: 0; color: var(--lp-muted, #9fb2de); font-size: 14px; flex: 1; min-width: 200px; line-height: 1.5; }
.cookie-text a { color: var(--accent); text-decoration: none; }
.cookie-text a:hover { text-decoration: underline; }
.cookie-actions { display: flex; gap: 10px; }
.cookie-btn { border-radius: 10px; padding: 9px 18px; font-family: inherit; font-size: 14px; font-weight: 600; cursor: pointer; border: 1px solid transparent; transition: border-color 0.15s ease, opacity 0.15s ease; }
.cookie-btn--primary { background: var(--accent); color: #03000D; }
.cookie-btn--primary:hover { opacity: 0.9; }
.cookie-btn--ghost { background: transparent; color: var(--accent); border-color: #39306b; }
.cookie-btn--ghost:hover { border-color: var(--accent); }
@media (max-width: 520px) {
  .cookie-actions { width: 100%; }
  .cookie-btn { flex: 1; }
}

/* ===========================================================================
   Aviso de instalación (PWA)
   =========================================================================== */
.pwa-install {
  position: fixed; left: 16px; right: 16px; z-index: 55;
  bottom: calc(16px + env(safe-area-inset-bottom));
  max-width: 460px; margin: 0 auto;
  display: flex; align-items: center; gap: 12px;
  background: var(--panel); border: 1px solid #241a52; border-radius: 16px;
  padding: 12px 14px; box-shadow: 0 16px 44px rgba(0, 0, 0, 0.55);
  opacity: 0; transform: translateY(14px); pointer-events: none;
  transition: opacity 0.28s ease, transform 0.28s ease;
}
.pwa-install.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.pwa-install__icon { width: 42px; height: 42px; border-radius: 10px; flex: 0 0 auto; }
.pwa-install__text { display: flex; flex-direction: column; gap: 1px; flex: 1; min-width: 0; }
.pwa-install__text strong { color: var(--text); font-size: 14px; font-weight: 600; }
.pwa-install__text span { color: var(--muted); font-size: 12.5px; line-height: 1.35; }
.pwa-install__cta {
  flex: 0 0 auto; background: var(--accent); color: #03000D; border: none;
  border-radius: 10px; padding: 9px 16px; font-family: inherit; font-size: 14px;
  font-weight: 600; cursor: pointer;
}
.pwa-install__cta:hover { opacity: 0.9; }
.pwa-install__close {
  flex: 0 0 auto; background: transparent; border: none; color: var(--muted);
  font-size: 22px; line-height: 1; cursor: pointer; padding: 0 2px;
}
.pwa-install__close:hover { color: var(--text); }

/* ===========================================================================
   Página legal (política de privacidad)
   =========================================================================== */
.legal { max-width: 760px; margin: 0 auto; padding: 24px 6vw 64px; color: #d7deec; line-height: 1.65; }
.legal h1 { color: #fff; font-size: clamp(28px, 5vw, 42px); letter-spacing: -0.02em; margin: 0 0 6px; }
.legal-updated { color: var(--muted); font-size: 14px; margin: 0 0 26px; }
.legal h2 { color: var(--accent); font-size: 20px; margin: 30px 0 10px; }
.legal p { margin: 0 0 14px; }
.legal ul { margin: 0 0 16px; padding-left: 20px; }
.legal li { margin-bottom: 9px; }
.legal a { color: var(--accent); }
.legal code { background: #1c1147; padding: 2px 6px; border-radius: 6px; color: #cbd5ff; font-size: 13px; }
.legal-back { margin-top: 32px; }

.reg-consent { color: var(--reg-muted, #9fb2de); font-size: 13px; margin: 18px 0 0; line-height: 1.5; }
.reg-consent a { color: var(--accent); }

/* ===========================================================================
   Pantalla de revelación tras el registro ("Tu sitio se verá así")
   =========================================================================== */
.done-body {
  min-height: 100vh;
  background:
    radial-gradient(120% 90% at 50% -10%, rgba(115, 199, 247, 0.08), transparent 60%),
    var(--bg);
}
.done {
  max-width: 560px; margin: 0 auto; min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 40px 22px 48px; gap: 18px;
}
.done-badge { width: 56px; height: 56px; border-radius: 50%; background: rgba(74, 222, 128, 0.14); color: var(--ok); display: flex; align-items: center; justify-content: center; font-size: 24px; }
.done h1 { color: #fff; font-size: clamp(26px, 6vw, 38px); letter-spacing: -0.02em; margin: 0; }
.done-mini { margin: 4px 0; }
.done-email { color: var(--lp-muted, #9fb2de); font-size: 16px; line-height: 1.5; margin: 0; max-width: 44ch; }
.done-email strong { color: var(--accent); }
.done-link { display: inline-flex; align-items: center; gap: 10px; max-width: 100%; background: var(--panel); border: 1px solid #241a52; border-radius: 12px; padding: 10px 14px; color: #fff; font-size: 15px; }
.done-link #doneUrl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.done-copy { background: none; border: none; color: var(--accent); cursor: pointer; font-size: 16px; padding: 2px 4px; flex-shrink: 0; }
.done .lp-btn { margin-top: 4px; }
.done-note { color: var(--muted); font-size: 13px; margin: 0; }

.done > * { opacity: 0; transform: translateY(16px); transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1); }
.done.in > * { opacity: 1; transform: none; }
.done.in > *:nth-child(2) { transition-delay: 0.06s; }
.done.in > *:nth-child(3) { transition-delay: 0.12s; }
.done.in > *:nth-child(4) { transition-delay: 0.2s; }
.done.in > *:nth-child(5) { transition-delay: 0.28s; }
.done.in > *:nth-child(6) { transition-delay: 0.34s; }
.done.in > *:nth-child(7) { transition-delay: 0.4s; }
.done.in .done-mini .lp-mini { animation: doneMiniIn 0.7s cubic-bezier(0.16, 1, 0.3, 1) both; animation-delay: 0.12s; }
@keyframes doneMiniIn { from { transform: scale(0.92); } to { transform: scale(1); } }

@media (prefers-reduced-motion: reduce) {
  .done > * { opacity: 1; transform: none; transition: none; }
  .done.in .done-mini .lp-mini { animation: none; }
}

/* ===========================================================================
   Panel tipo app (pestañas, pantallas, vista previa, accesos directos)
   =========================================================================== */
.app { height: auto; min-height: 100vh; }
.app-wrap { max-width: 760px; margin: 0 auto; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }

.appbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px clamp(16px, 5vw, 28px); position: sticky; top: 0; z-index: 20;
  background: rgba(3, 0, 13, 0.82); backdrop-filter: blur(10px); border-bottom: 1px solid #16103a;
}
.appbar-id { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.appbar-logo { color: var(--accent); font-size: 20px; letter-spacing: 0.02em; }
.appbar-handle { color: var(--muted); font-size: 13px; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.appbar-view { display: inline-flex; align-items: center; gap: 7px; color: var(--accent); text-decoration: none; border: 1px solid #241a52; border-radius: 10px; padding: 8px 14px; font-size: 14px; flex-shrink: 0; }
.appbar-view:hover { border-color: var(--accent); }

.tabbar {
  display: flex; gap: 4px; padding: 6px clamp(10px, 4vw, 20px);
  position: sticky; top: 54px; z-index: 19;
  background: rgba(3, 0, 13, 0.82); backdrop-filter: blur(10px); border-bottom: 1px solid #16103a;
}
.tab {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  background: none; border: none; cursor: pointer; color: var(--muted);
  font-family: inherit; font-size: 11px; padding: 8px 4px; border-radius: 10px;
  transition: color 0.15s ease, background 0.15s ease;
}
.tab i { font-size: 18px; }
.tab:hover { color: #cdd4e6; }
.tab.is-active { color: var(--accent); background: rgba(115, 199, 247, 0.1); }

.app-flash { margin: 12px clamp(16px, 5vw, 28px) 0; }
.app-screens { flex: 1; padding: 16px clamp(16px, 5vw, 28px) 40px; }
.app-screen { display: flex; flex-direction: column; gap: 18px; animation: screenIn 0.32s cubic-bezier(0.16, 1, 0.3, 1); }
@keyframes screenIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.app-title { color: #fff; font-size: 26px; letter-spacing: -0.02em; margin: 4px 0 0; display: flex; align-items: baseline; gap: 10px; }
.app-title-count { color: var(--muted); font-size: 15px; font-weight: 400; }

/* Vista previa */
.preview-actions { display: flex; gap: 10px; align-items: center; }
.preview-actions .btn-primary { margin-top: 0; }
.btn-ghost-sm { display: inline-flex; align-items: center; gap: 8px; color: var(--accent); text-decoration: none; border: 1px solid #241a52; border-radius: 10px; padding: 10px 16px; font-size: 14px; }
.btn-ghost-sm:hover { border-color: var(--accent); }
.preview-device {
  border: 10px solid #130a3d; border-radius: 28px; overflow: hidden; background: #03000D;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5); max-width: 380px; width: 100%; margin: 0 auto; aspect-ratio: 9 / 18;
}
.preview-iframe { width: 100%; height: 100%; border: 0; display: block; background: #03000D; }

/* Accesos directos */
.shortcut-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.shortcut {
  display: flex; flex-direction: column; align-items: flex-start; gap: 10px;
  background: var(--panel); border: 1px solid #241a52; border-radius: 16px; padding: 18px;
  color: #fff; text-decoration: none; transition: border-color 0.15s ease, transform 0.15s ease;
}
.shortcut:hover { border-color: var(--accent); transform: translateY(-2px); }
.shortcut i { color: var(--accent); font-size: 22px; }
.shortcut span { font-size: 14px; }
.shortcut--muted i, .shortcut--muted span { color: var(--muted); }
.shortcut-logout { margin-top: 6px; }
.btn-logout { width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 10px; background: transparent; border: 1px solid #39306b; color: #ff9aa5; border-radius: 12px; padding: 13px; font-family: inherit; font-size: 15px; cursor: pointer; transition: border-color 0.15s ease, color 0.15s ease; }
.btn-logout:hover { border-color: var(--danger); color: var(--danger); }

/* Móvil: barra de pestañas fija abajo, como una app */
@media (max-width: 760px) {
  .app-wrap { padding-bottom: 74px; }
  .appbar { top: 0; }
  .tabbar {
    position: fixed; left: 0; right: 0; bottom: 0; top: auto;
    border-top: 1px solid #16103a; border-bottom: none;
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); z-index: 40;
  }
  .app-title { font-size: 23px; }
}
@media (prefers-reduced-motion: reduce) {
  .app-screen { animation: none; }
}
