:root{
  --brand:#e84b9c;
  --brand-dark:#cf3d8a;
  --soft:#ffe8f1;
  --card:#ffffff;
  --ink:#2b2b2b;
  --muted:#6b6b6b;
  --shadow:0 10px 24px rgba(232, 75, 156, 0.18);
  --radius:18px;
  /* mismos tamaños que perfil */
  --appbar-h:76px;
  --icon-btn:64px;
  --icon-font:26px;
  --border:#eee;
}
body{
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto,
    "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  margin:0;
  background:linear-gradient(180deg, var(--soft), #fff 22%, var(--soft) 100%);
  color:var(--ink);
}
.container{
  max-width:1100px;
  margin:auto;
  padding:2rem 1rem 2.5rem;
}
/* Hero card estilo kawaii */
.hero-card{
  background:radial-gradient(circle at top left,#ffd3ec,#ffe7f5 40%,#ffffff 100%);
  border-radius:24px;
  padding:1.5rem 1.4rem;
  box-shadow:var(--shadow);
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:space-between;
  gap:1rem;
  margin-bottom:1.8rem;
}
.hero-text h1{
  margin:0 0 .35rem;
  font-size:1.6rem;
  color:var(--brand);
}
.hero-text p{
  margin:0;
  font-size:.95rem;
  color:var(--muted);
}
.hero-actions{
  display:flex;
  flex-wrap:wrap;
  gap:.6rem;
}
.hero-btn{
  border-radius:999px;
  padding:.55rem 1.1rem;
  font-size:.9rem;
  font-weight:800;
  text-decoration:none;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border:1px solid transparent;
}
.hero-btn-primary{
  background:var(--brand);
  color:#fff;
  border-color:var(--brand-dark);
}
.hero-btn-ghost{
  background:#fff;
  color:var(--brand-dark);
  border-color:#f5c5df;
}
/* Tarjetas */
.card-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(280px, 1fr));
  gap:1.5rem;
}
.card{
  background:var(--card);
  border-radius:var(--radius);
  padding:1.5rem;
  box-shadow:var(--shadow);
  transition:transform .2s ease;
  cursor:pointer;
  text-decoration:none;
  color:inherit;
}
.card:hover{
  transform:scale(1.02);
}
.card h2,
.card h3{
  font-size:1.2rem;
  color:var(--brand-dark);
  margin-bottom:.5rem;
}
.card p{
  font-size:.95rem;
  line-height:1.4;
}
/* meta semanal */
.meta-wrap{
  background:#ffe8f1;
  border-radius:12px;
  overflow:hidden;
  margin-top:.5rem;
}
.meta-bar{
  width:0%;
  height:10px;
  background:var(--brand-dark);
  transition: width .5s ease;
}
.meta-msg{
  margin-top:.5rem;
  color:var(--muted);
  font-size:.85rem;
}
/* Modal */
.modal-mask{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.35);
  display:none;
  align-items:center;
  justify-content:center;
  z-index:9999;
}
.modal{
  background:var(--card);
  border-radius:var(--radius);
  max-width:640px;
  width:92%;
  box-shadow:var(--shadow);
  padding:1.5rem;
}
.modal h3{
  margin:0 0 1rem;
  color:var(--brand);
}
.modal .row{
  margin:.4rem 0;
}
.modal .label{
  font-weight:600;
}
.modal footer{
  margin-top:1rem;
  display:flex;
  gap:.5rem;
  justify-content:flex-end;
}
.btn{
  padding:.6rem 1rem;
  border-radius:12px;
  border:none;
  cursor:pointer;
  font-weight:800;
}
.btn-primary{
  background:var(--brand);
  color:#fff;
}
.btn-ghost{
  background:#f4f4f5;
}
/* Chat bubble */
#lumina-chat-bubble{
  position:fixed;
  bottom:20px;
  right:20px;
  cursor:pointer;
  z-index:1000;
}
#lumina-avatar{
  width:90px;
  height:90px;
  border-radius:50%;
  box-shadow:0 0 10px rgba(0,0,0,.2);
  transition:transform .2s;
}
#lumina-avatar:hover{
  transform:scale(1.1);
}
#lumina-chat-box{
  position:fixed;
  bottom:100px;
  right:20px;
  width:300px;
  height:350px;
  background:#fff;
  border-radius:12px;
  box-shadow:0 8px 20px rgba(0,0,0,.15);
  z-index:1001;
  display:flex;
  flex-direction:column;
  overflow:hidden;
}
.chat-header{
  background:#f48fb1;
  color:#fff;
  padding:10px;
  font-weight:900;
  text-align:center;
}
.chat-body{
  flex:1;
  padding:10px;
  overflow-y:auto;
}
.chat-input{
  display:flex;
  border-top:1px solid #eee;
}
.chat-input input{
  flex:1;
  border:none;
  padding:10px;
  outline:none;
}
.chat-input button{
  background:#f48fb1;
  color:#fff;
  border:none;
  padding:10px;
  cursor:pointer;
  font-weight:900;
}
/* ===== Barra social superior (clon de perfil) ===== */
.top-social-bar{
  position:sticky;
  top:0;
  z-index:130;
  background:#fff;
  border-bottom:1px solid #f0e0ef;
}
.top-social-wrap{
  max-width:1100px;
  margin:0 auto;
  padding:8px 16px;
  display:flex;
  align-items:center;
  gap:10px;
}
.top-search{
  flex:1;
  display:flex;
  align-items:center;
  gap:8px;
  background:var(--soft);
  border:1px solid #f0d6e6;
  border-radius:999px;
  padding:6px 12px;
}
.top-search i{
  font-size:14px;
  color:var(--muted);
}
.top-search input{
  border:none;
  outline:none;
  background:transparent;
  width:100%;
  font-size:.9rem;
  color:var(--ink);
}
.top-msg-btn{
  position:relative;
  border:none;
  background:transparent;
  width:var(--icon-btn);
  height:var(--icon-btn);
  border-radius:14px;
  display:grid;
  place-items:center;
  cursor:pointer;
  color:var(--brand);
}
.top-msg-btn:hover{
  background:#fcecf6;
}
.top-msg-btn i{
  font-size:var(--icon-font);
}
.top-msg-badge{
  position:absolute;
  top:6px;
  right:6px;
  min-width:18px;
  height:18px;
  padding:0 5px;
  background:#ef4444;
  color:#fff;
  font-size:11px;
  font-weight:800;
  border-radius:999px;
  display:flex;
  align-items:center;
  justify-content:center;
}
/* ===== Appbar clonada de perfil ===== */
.appbar{
  position:sticky;
  top:0;
  z-index:100;
  background:#fff;
  box-shadow:0 2px 10px rgba(0,0,0,.08);
  padding-top:env(safe-area-inset-top,0);
  overflow:hidden;
}
.appbar .wrap{
  max-width:1100px;
  margin:0 auto;
  min-height:var(--appbar-h);
  padding:8px 16px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:12px;
}
.appbar .wrap.wrap-nav{
  justify-content:center;
  padding-top:0;
  padding-bottom:8px;
  min-height:auto;
}
.appbar .nav{
  display:flex;
  align-items:center;
  gap:14px;
  padding-bottom:8px;
  overflow:hidden;
  margin:0 auto;
}
.icon-btn{
  width:var(--icon-btn);
  height:var(--icon-btn);
  border-radius:14px;
  display:grid;
  place-items:center;
  cursor:pointer;
  color:#333;
  background:transparent;
  border:none;
  position:relative;
  transition:.15s transform ease,.15s background ease,.15s color ease;
  user-select:none;
  -webkit-tap-highlight-color:transparent;
}
.icon-btn:hover{
  background:#f7f7f8;
  transform:translateY(-1px);
}
.icon-btn i{
  font-size:var(--icon-font);
}
.icon-btn.active{
  color:var(--brand);
}
.icon-btn.active::after{
  content:"";
  position:absolute;
  left:20%;
  right:20%;
  bottom:6px;
  height:4px;
  background:var(--brand);
  border-radius:999px;
  pointer-events:none;
}
.badge-dot{
  position:absolute;
  top:6px;
  right:6px;
  min-width:16px;
  height:16px;
  padding:0 4px;
  border-radius:999px;
  background:#ef4444;
  color:#fff;
  font-size:10px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:900;
}
/* Menú desplegable */
.menu-panel{
  position:fixed;
  top:calc(var(--appbar-h) + 8px);
  right:clamp(10px,4vw,16px);
  width:220px;
  background:#fff;
  border-radius:14px;
  box-shadow:0 14px 28px rgba(0,0,0,.18);
  padding:10px;
  z-index:120;
  display:none;
}
.menu-panel a,
.menu-panel button{
  width:100%;
  text-align:left;
  background:transparent;
  border:0;
  padding:10px 12px;
  border-radius:10px;
  font-weight:800;
  color:#333;
  cursor:pointer;
  display:flex;
  gap:10px;
  align-items:center;
  text-decoration:none;      /* 👈 QUITA EL SUBRAYADO */
}
.menu-panel a:hover,
.menu-panel button:hover{
  background:#f7f7f8;
}
.menu-header{
  padding:6px 12px;
  margin-bottom:4px;
  color:var(--muted);
  font-weight:900;
  font-size:.9rem;
}
.menu-sep{
  border:none;
  border-top:1px solid #f0f0f0;
  margin:8px 0;
}
/* ===== Search dropdown compacto ===== */
.search-dd{
  position:absolute;
  top:calc(100% + 6px);
  left:50%;
  transform:translateX(-50%);
  width:min(360px, 100vw - 32px);
  background:#fff;
  border-radius:14px;
  border:1px solid #f3d9ea;
  box-shadow:0 10px 28px rgba(0,0,0,.16);
  z-index:9999;
  overflow:hidden;
  font-size:0.85rem;
  max-height:260px;
  overflow-y:auto;
}
.search-dd[aria-hidden="true"]{
  display:none;
}
.search-dd-title{
  padding:6px 10px;
  font-weight:700;
  background:#fff7fc;
  border-bottom:1px solid #f3e1ec;
  color:#4b1644;
  font-size:0.8rem;
}
.search-dd-row{
  padding:8px 10px;
  font-size:0.8rem;
}
.search-dd-row.muted{
  color:#6b7280;
}
.search-dd-item{
  width:100%;
  display:flex;
  align-items:center;
  gap:8px;
  padding:6px 10px;
  background:#ffffff;
  border:0;
  border-bottom:1px solid #f5e6f0;
  cursor:pointer;
  text-align:left;
}
.search-dd-item:last-of-type{
  border-bottom:none;
}
.search-dd-item:hover{
  background:#fdf2f8;
}
.search-dd-item.active{
  background:#fee2f2;
}
.search-dd-avatar{
  width:34px;
  height:34px;
  border-radius:999px;
  overflow:hidden;
  flex-shrink:0;
  background:#ffe4f0;
  display:grid;
  place-items:center;
}
.search-dd-avatar img{
  width:34px;
  height:34px;
  object-fit:cover;
  display:block;
}
.search-dd-avatar-fallback{
  font-size:0.75rem;
  font-weight:700;
  color:#4b1644;
}
.search-dd-main{
  flex:1;
  min-width:0;
}
.search-dd-name{
  font-weight:700;
  color:#111827;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  font-size:0.86rem;
}
.search-dd-meta{
  font-size:0.75rem;
  color:#6b7280;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.search-dd-arrow{
  color:#9ca3af;
  font-size:0.85rem;
}
.search-dd-all{
  width:100%;
  padding:8px 10px;
  border:0;
  background:#f9fafb;
  font-weight:700;
  font-size:0.78rem;
  cursor:pointer;
}
.search-dd-all:hover{
  background:#e5e7eb;
}
/* Mini spinner */
.spinner{
  width:12px;
  height:12px;
  border-radius:999px;
  border:2px solid #e5e7eb;
  border-top-color:#e84b9c;
  display:inline-block;
  margin-right:6px;
  vertical-align:middle;
  animation:spin .8s linear infinite;
}
@keyframes spin{
  to{ transform:rotate(360deg); }
}
/* Responsive */
@media (max-width:640px){
  .container{
    padding:1.4rem 0.75rem 2.2rem;
  }
}
/* =========================================================
   Anti-flicker auth (GLOBAL)
   - Evita que se vean rutas PRO antes de que nav.js filtre rol
   - Oculta navegación + main mientras data-auth="checking"
   ========================================================= */
html[data-auth="checking"] .top-social-bar,
html[data-auth="checking"] .appbar,
html[data-auth="checking"] .menu-panel,
html[data-auth="checking"] main{
  visibility: hidden;
  pointer-events: none;
}
html[data-auth="checking"] .modal-mask{
  display:none !important;
}

/* ===== Premium gate dashboard ===== */
.ba-gate-hero{
  border:1px solid rgba(232,75,156,.14);
  box-shadow:0 14px 32px rgba(232,75,156,.14);
}

.ba-dashboard-upsell{
  margin:-.4rem 0 1.35rem;
  padding:1rem 1.05rem;
  border-radius:22px;
  border:1px solid rgba(232,75,156,.12);
  background:linear-gradient(180deg,#fff8fc 0%,#fff2f8 100%);
  box-shadow:0 12px 28px rgba(232,75,156,.10);
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:space-between;
  gap:1rem;
}

.ba-dashboard-upsell-chip{
  display:inline-flex;
  align-items:center;
  gap:.45rem;
  padding:.35rem .7rem;
  border-radius:999px;
  background:#fff;
  border:1px solid #f5d6e6;
  color:var(--brand-dark);
  font-size:.76rem;
  font-weight:900;
  margin-bottom:.55rem;
}

.ba-dashboard-upsell h3{
  margin:0 0 .35rem;
  color:var(--brand-dark);
  font-size:1.1rem;
}

.ba-dashboard-upsell p{
  margin:0;
  color:var(--muted);
  font-size:.93rem;
  line-height:1.45;
}

.ba-dashboard-upsell-actions{
  display:flex;
  flex-wrap:wrap;
  gap:.6rem;
}

.ba-upsell-btn,
.ba-lock-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  text-decoration:none;
  border-radius:999px;
  padding:.7rem 1rem;
  background:var(--brand);
  color:#fff;
  border:1px solid var(--brand-dark);
  font-size:.88rem;
  font-weight:900;
  box-shadow:0 10px 20px rgba(232,75,156,.18);
}

.ba-upsell-link,
.ba-lock-link{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  text-decoration:none;
  border-radius:999px;
  padding:.7rem .95rem;
  background:#fff;
  color:var(--brand-dark);
  border:1px solid #f2c9dd;
  font-size:.85rem;
  font-weight:800;
}

.ba-locked-card{
  position:relative;
  overflow:hidden;
}

.ba-locked-card > *:not(.ba-lock-layer){
  filter:blur(4px);
  opacity:.78;
  pointer-events:none;
  user-select:none;
}

.ba-lock-layer{
  position:absolute;
  inset:0;
  display:flex;
  align-items:flex-end;
  padding:14px;
  background:linear-gradient(
    180deg,
    rgba(255,255,255,.12) 0%,
    rgba(255,255,255,.55) 44%,
    rgba(255,247,251,.98) 100%
  );
  z-index:2;
}

.ba-lock-box{
  width:100%;
  border-radius:18px;
  padding:14px;
  border:1px solid rgba(232,75,156,.12);
  background:rgba(255,255,255,.94);
  box-shadow:0 14px 26px rgba(232,75,156,.10);
  backdrop-filter:blur(8px);
}

.ba-lock-eyebrow{
  display:inline-flex;
  align-items:center;
  gap:.45rem;
  padding:.34rem .65rem;
  border-radius:999px;
  background:#f6fff8;
  color:#2f7d57;
  border:1px solid #caecd9;
  font-size:.74rem;
  font-weight:900;
  margin-bottom:.65rem;
}

.ba-lock-title{
  color:var(--brand-dark);
  font-size:1rem;
  font-weight:900;
  line-height:1.2;
  margin-bottom:.35rem;
}

.ba-lock-copy{
  color:#6c6670;
  font-size:.88rem;
  line-height:1.4;
  margin-bottom:.75rem;
}

.ba-lock-actions{
  display:flex;
  flex-wrap:wrap;
  gap:.5rem;
}

.ba-locked-calendar{
  min-height:360px;
}

.ba-calendar-teaser{
  min-height:250px;
  display:grid;
  place-content:center;
  gap:.65rem;
  text-align:center;
  color:var(--brand-dark);
  font-weight:800;
  font-size:1rem;
}

.ba-calendar-teaser span{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:.55rem .9rem;
  border-radius:999px;
  background:#fff7fb;
  border:1px solid #f4d3e5;
  box-shadow:0 8px 18px rgba(232,75,156,.08);
}

@media (max-width: 720px){
  .ba-dashboard-upsell{
    padding:.95rem;
    border-radius:18px;
  }
  .ba-lock-box{
    padding:12px;
    border-radius:16px;
  }
  .ba-lock-title{
    font-size:.96rem;
  }
  .ba-lock-copy{
    font-size:.84rem;
  }
}
