/* =========================================================
   ÁREA DE CLIENTES — Grafs
   Layout tipo SaaS (sidebar + panel) con la estética de la marca.
   Usa los tokens de ../assets/css/styles.css (cargar ESE primero).
   ========================================================= */

:root {
  --side-w: 256px;            /* shadcn SIDEBAR_WIDTH 16rem */
  --side-rail: 48px;          /* shadcn SIDEBAR_WIDTH_ICON 3rem */
  --topbar-h: 64px;           /* header h-16 */
  --r-lg: 18px;
  --sidebar-accent: rgba(25,26,30,.055);  /* hover suave de items */
}
html[data-theme="dark"] { --sidebar-accent: rgba(255,255,255,.07); }

/* Reset suave coherente con el resto */
* { box-sizing: border-box; }
html, body { margin: 0; }
body.app-body {
  font-family: var(--font-sans);
  background: var(--bg-2);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

/* ---------- LOGIN ---------- */
.login-wrap {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--bg);
}
.login-aside {
  position: relative;
  background: var(--grad-hero);
  overflow: hidden;
  padding: 56px 56px 56px max(56px, calc((100vw - 1400px) / 2 + 24px));
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: var(--ink);
}
.login-aside .blob {
  position: absolute; border-radius: 50%; filter: blur(60px); opacity: .55; z-index: 0;
}
.login-aside .blob.b1 { width: 320px; height: 320px; background: var(--accent); top: -60px; left: -40px; }
.login-aside .blob.b2 { width: 360px; height: 360px; background: var(--pix-blue); bottom: -80px; right: -60px; opacity: .4; }
.login-aside > * { position: relative; z-index: 1; }
.login-aside .logo img { height: 30px; display: block; }
.login-aside h2 { font-family: var(--font-serif); font-size: clamp(1.8rem, 3vw, 2.6rem); line-height: 1.1; margin: 0 0 14px; letter-spacing: -.02em; }
.login-aside p { color: var(--ink-soft); max-width: 380px; line-height: 1.6; margin: 0; }
.login-aside .aside-foot { font-size: .82rem; color: var(--ink-faint); }

.login-form-side { display: grid; place-items: center; padding: 40px; }
.login-card { width: 100%; max-width: 380px; }
.login-card .eyebrow { color: var(--accent); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: .78rem; margin: 0 0 10px; }
.login-card h1 { font-family: var(--font-serif); font-size: 2rem; margin: 0 0 6px; letter-spacing: -.02em; }
.login-card .sub { color: var(--ink-soft); margin: 0 0 28px; font-size: .95rem; }
.login-error { background: #fdecea; color: #b5302a; border: 1px solid #f5c6c0; border-radius: var(--r-btn); padding: 10px 14px; font-size: .85rem; margin: 0 0 18px; }
html[data-theme="dark"] .login-error { background: rgba(214,69,60,.16); border-color: rgba(214,69,60,.4); color: #f0a59f; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: .82rem; font-weight: 600; margin-bottom: 7px; color: var(--ink-soft); }
.field input {
  width: 100%; padding: 13px 15px; border-radius: var(--r-btn);
  border: 1px solid var(--line); background: var(--bg);
  color: var(--ink); font: inherit; font-size: .95rem; transition: border-color .15s ease, box-shadow .15s ease;
}
.field input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.login-row { display: flex; justify-content: space-between; align-items: center; margin: 4px 0 22px; font-size: .85rem; }
.login-row a { color: var(--ink-soft); text-decoration: none; }
.login-row a:hover { color: var(--accent); }

/* Login responsive (2026-07-08): en móvil el split de 2 columnas pasa a apilado */
@media (max-width: 820px) {
  .login-wrap { grid-template-columns: 1fr; min-height: 100svh; }
  .login-aside { padding: 26px 24px 30px; justify-content: flex-start; gap: 16px; }
  .login-aside h2 { font-size: 1.45rem; margin: 0 0 8px; }
  .login-aside p { font-size: .92rem; max-width: 46ch; }
  .login-aside .aside-foot { display: none; }
  .login-aside .logo img { height: 26px; }
  .login-form-side { padding: 36px 24px 60px; align-items: start; }
  .login-card { max-width: 440px; margin: 0 auto; }
  .login-card h1 { font-size: 1.7rem; }
  .field input { font-size: 16px; }   /* evita el zoom automático de iOS al enfocar */
  .login-row { flex-wrap: wrap; gap: 10px; }
}
@media (max-width: 480px) {
  .login-aside .blob.b1 { width: 220px; height: 220px; }
  .login-aside .blob.b2 { width: 240px; height: 240px; }
}
.btn-block { width: 100%; justify-content: center; }
.login-hint { margin-top: 22px; font-size: .8rem; color: var(--ink-faint); text-align: center; }

/* ---------- LAYOUT APP · estética shadcn/ui (sidebar-07) ---------- */
.app { display: flex; min-height: 100vh; }

/* ===== SIDEBAR ===== */
.sidebar {
  width: var(--side-w); flex: 0 0 var(--side-w);
  position: sticky; top: 0; height: 100vh;
  background: var(--bg);
  border-right: 1px solid var(--line);
  display: flex; flex-direction: column;
  padding: 8px;
  transition: width .2s ease, flex-basis .2s ease;
}

/* -- Header del sidebar: switcher (mark + nombre + chevron) -- */
.side-switch { position: relative; }
.ss-btn {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 8px; border-radius: 10px; border: none; background: none;
  cursor: pointer; font: inherit; color: var(--ink); text-align: left;
  transition: background .15s ease;
}
.ss-btn:hover { background: var(--sidebar-accent); }
.ss-mark {
  width: 32px; height: 32px; flex: 0 0 32px; border-radius: 9px;
  background: var(--accent); color: #fff;
  display: none; place-items: center; font-weight: 800; font-size: .92rem;
  box-shadow: 0 1px 2px rgba(0,0,0,.14); overflow: hidden;
}
.ss-mark img { width: 100%; height: 100%; object-fit: contain; }
/* Logo de marca (wordmark) en el header de la barra — claro/oscuro según tema */
.ss-logo { display: block; height: 22px; width: auto; max-width: 150px; object-fit: contain; object-position: left center; }
.ss-logo-dark { display: none; }
html[data-theme="dark"] .ss-logo-light { display: none; }
html[data-theme="dark"] .ss-logo-dark { display: block; }
.ss-txt { line-height: 1.2; min-width: 0; flex: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
.ss-txt strong { display: block; font-size: .875rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ss-txt span { display: block; font-size: .75rem; color: var(--ink-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ss-chev { width: 16px; height: 16px; color: var(--ink-faint); flex: 0 0 16px; margin-left: auto; }

/* separador fino */
.side-sep { height: 1px; background: var(--line); margin: 8px 4px; }

/* -- Nav -- */
.side-nav { display: flex; flex-direction: column; gap: 2px; overflow-y: auto; flex: 1; margin: 0; padding: 4px 0; list-style: none; }
.side-nav .group-label { display: flex; align-items: center; height: 28px; font-size: .6875rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-faint); padding: 0 8px; margin-top: 14px; }
.side-nav > .side-link:first-child, .side-nav > .group-label:first-child { margin-top: 0; }
.side-link {
  display: flex; align-items: center; gap: 8px;
  height: 32px; padding: 0 8px; border-radius: 8px;
  color: var(--ink-soft); text-decoration: none; font-size: .875rem; font-weight: 500;
  cursor: pointer; border: none; background: none; width: 100%; text-align: left; font-family: inherit;
  transition: background .12s ease, color .12s ease; position: relative;
}
.side-link .ico { flex: 0 0 18px; width: 18px; height: 18px; display: inline-flex; align-items: center; justify-content: center; font-size: 18px; line-height: 1; opacity: 1; background: none; color: inherit; border-radius: 0; }
.side-link .ico::before { display: block; }
.side-link:hover { background: var(--sidebar-accent); color: var(--ink); }
.side-link.is-active { background: var(--accent-soft); color: var(--ink); font-weight: 600; }
.side-link.is-active .ico { color: inherit; opacity: 1; }
.side-badge { margin-left: auto; background: var(--accent); color: #fff; font-size: .66rem; font-weight: 700; border-radius: 999px; padding: 1px 7px; }

/* -- Footer: usuario (estilo shadcn) -- */
.side-foot { border-top: 1px solid var(--line); padding-top: 6px; margin-top: 4px; }
.side-user { position: relative; }
.su-btn {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 7px 8px; border-radius: 10px; border: none; background: none;
  cursor: pointer; font: inherit; color: var(--ink); text-align: left;
  transition: background .15s ease;
}
.su-btn:hover { background: var(--sidebar-accent); }
.su-txt { line-height: 1.2; min-width: 0; flex: 1; }
.su-txt strong { display: block; font-size: .875rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.su-txt span { display: block; font-size: .75rem; color: var(--ink-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.su-chev { width: 16px; height: 16px; color: var(--ink-faint); flex: 0 0 16px; margin-left: auto; }
.su-menu {
  position: absolute; bottom: calc(100% + 6px); left: 0; right: 0;
  background: var(--bg); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 12px 34px rgba(0,0,0,.16); padding: 6px; display: none; z-index: 40;
}
.side-user.open .su-menu { display: block; }
.su-menu a, .su-menu button {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  padding: 8px 10px; border-radius: 8px; border: none; background: none;
  font: inherit; font-size: .85rem; color: var(--ink); cursor: pointer; text-decoration: none;
}
.su-menu a:hover, .su-menu button:hover { background: var(--bg-2); }
.su-menu a svg, .su-menu button svg { width: 15px; height: 15px; opacity: .8; flex: 0 0 15px; }
.su-menu .sep { height: 1px; background: var(--line); margin: 5px 4px; }

/* ===== MAIN ===== */
.app-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.app-topbar {
  height: var(--topbar-h); flex: 0 0 var(--topbar-h);
  display: flex; align-items: center; gap: 8px;
  padding: 0 16px; border-bottom: 1px solid var(--line);
  background: var(--bg); position: sticky; top: 0; z-index: 20;
}
.app-topbar .topbar-sep { width: 1px; height: 22px; background: var(--line); margin: 0 4px; flex: 0 0 1px; }
.app-topbar .crumb { font-size: .9rem; color: var(--ink-faint); display: flex; align-items: center; gap: 8px; min-width: 0; }
.app-topbar .crumb b { color: var(--ink); font-weight: 500; }
.app-topbar .spacer { flex: 1; }
.icon-btn {
  width: 36px; height: 36px; border-radius: 8px; border: 1px solid transparent;
  background: transparent; color: var(--ink); display: grid; place-items: center; cursor: pointer;
  position: relative; transition: background .15s ease, border-color .15s ease;
}
.icon-btn:hover { background: var(--sidebar-accent); }
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn .dot { position: absolute; top: 7px; right: 7px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); border: 2px solid var(--bg); }
.topbar-user { display: flex; align-items: center; gap: 10px; }
.avatar { width: 36px; height: 36px; border-radius: 9px; background: var(--ink); color: var(--bg); display: grid; place-items: center; font-weight: 700; font-size: .82rem; }
/* Avatar con logo de cliente: chip blanco para que la marca se lea en claro y oscuro */
.avatar.has-logo { width: auto; min-width: 36px; height: 36px; padding: 0 9px; background: #fff; border: 1px solid var(--line); }
.avatar.has-logo img { display: block; height: 20px; width: auto; max-width: 116px; object-fit: contain; }
.app.is-collapsed .avatar.has-logo { width: 36px; min-width: 36px; padding: 0 5px; }
.app.is-collapsed .avatar.has-logo img { max-width: 26px; }
.topbar-user .who { line-height: 1.2; }
.topbar-user .who strong { display: block; font-size: .85rem; }
.topbar-user .who span { font-size: .72rem; color: var(--ink-faint); }

/* Theme toggle reutiliza el del sistema */
.app-topbar .theme-toggle .icon-sun { display: none; }
html[data-theme="dark"] .app-topbar .theme-toggle .icon-moon { display: none; }
html[data-theme="dark"] .app-topbar .theme-toggle .icon-sun { display: block; }

/* Content scroll area */
.app-content { padding: 32px; flex: 1; }

/* Panels (cada sección) */
.panel { display: none; animation: fade .25s ease; }
.panel.is-active { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.panel-head { margin-bottom: 24px; }
.panel-head .eyebrow { color: var(--accent); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: .74rem; margin: 0 0 8px; }
.panel-head h1 { font-family: var(--font-serif); font-size: clamp(1.6rem, 3vw, 2.2rem); margin: 0 0 6px; letter-spacing: -.02em; }
.panel-head p { color: var(--ink-soft); margin: 0; max-width: 640px; line-height: 1.55; }

/* ---------- COMPONENTES GENÉRICOS ---------- */
.box {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 22px;
  box-shadow: 0 1px 2px rgba(25,26,30,.04);
}
html[data-theme="dark"] .box { box-shadow: 0 1px 2px rgba(0,0,0,.25); }
/* Stat-cards con leve degradado cálido (estilo shadcn dashboard-01: from-primary/5 to-card) */
.box.stat { background: linear-gradient(180deg, var(--accent-soft) -55%, var(--bg) 42%); }
.box-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.box-head h3 { margin: 0; font-size: 1.05rem; font-family: var(--font-head); }
.box-head .link { color: var(--ink-soft); font-size: .82rem; text-decoration: none; }
.box-head .link:hover { color: var(--accent); }

.grid { display: grid; gap: 20px; }
.g-4 { grid-template-columns: repeat(4, 1fr); }
.g-3 { grid-template-columns: repeat(3, 1fr); }
.g-2 { grid-template-columns: repeat(2, 1fr); }
.col-2 { grid-template-columns: 2fr 1fr; }
@media (max-width: 1100px) { .g-4 { grid-template-columns: repeat(2,1fr); } .col-2 { grid-template-columns: 1fr; } }

/* ===== Resumen — dashboard estilo shadcn ===== */
.home-hi { display: flex; align-items: center; gap: .35em; margin: 0; }
.home-hi .wave { font-style: normal; line-height: 1; font-weight: 400; }

/* KPIs (auto-fit: se hacen más pequeños cuantos más haya) */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-bottom: 20px; }
.kpi { display: flex; flex-direction: column; gap: 8px; padding: 18px 20px; }
.kpi-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.kpi-label { font-size: .82rem; color: var(--ink-soft); }
.kpi-badge { display: inline-flex; align-items: center; gap: 4px; font-size: .72rem; font-weight: 600; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink-soft); white-space: nowrap; }
.kpi-badge .trend-ico { width: 13px; height: 13px; }
.kpi-badge.up { color: #1c9d63; border-color: rgba(28,157,99,.32); }
.kpi-badge.down { color: #d6453c; border-color: rgba(214,69,60,.32); }
.kpi-num { font-family: var(--font-head); font-size: 1.85rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.kpi-foot { display: flex; flex-direction: column; gap: 2px; margin-top: 2px; }
.kpi-foot-h { display: flex; align-items: center; gap: 5px; font-size: .82rem; font-weight: 600; color: var(--ink); }
.kpi-foot-h .trend-ico { width: 14px; height: 14px; color: var(--ink-soft); }
.kpi-foot-s { font-size: .78rem; color: var(--ink-faint); }

/* Fila 50/50: gráfica (izq) + Pendiente (der) */
.home-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
@media (max-width: 980px) { .home-grid { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .stats-grid { grid-template-columns: 1fr; } }

/* Tarjeta de gráfica (shadcn Card: header + content + footer) */
.chart-card { display: flex; flex-direction: column; }
.chart-card-head { margin-bottom: 18px; }
.chart-card-head.row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.chart-card-head h3 { margin: 0 0 2px; font-size: 1.02rem; font-family: var(--font-head); }
.chart-desc { margin: 0; font-size: .82rem; color: var(--ink-faint); }

/* Barras (shadcn: grid horizontal + barras redondeadas + eje) */
.bar-chart { position: relative; height: 220px; padding-top: 6px; }
.bc-grid { position: absolute; inset: 6px 0 24px; display: flex; flex-direction: column; justify-content: space-between; z-index: 0; }
.bc-grid span { display: block; height: 1px; background: var(--line); opacity: .7; }
.bc-bars { position: relative; z-index: 1; height: 100%; display: flex; align-items: flex-end; gap: 12px; }
.bc-col { flex: 1; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 8px; }
.bc-bar { position: relative; width: 100%; max-width: 48px; border-radius: 7px 7px 0 0; background: var(--accent); transition: height .6s cubic-bezier(.2,.7,.2,1), filter .12s ease; }
.bc-bar:hover { filter: brightness(1.07); }
.bc-bar[data-val]:hover::after { content: attr(data-val); position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; font-size: .7rem; font-weight: 600; padding: 3px 7px; border-radius: 6px; white-space: nowrap; pointer-events: none; z-index: 2; }
.bc-col small { font-size: .72rem; color: var(--ink-faint); }

/* Pie de gráfica (footer shadcn) */
.chart-foot { margin-top: 16px; display: flex; flex-direction: column; gap: 3px; }
.cf-line { display: flex; align-items: center; gap: 6px; font-size: .85rem; font-weight: 600; }
.cf-line .trend-ico { width: 15px; height: 15px; }
.cf-sub { font-size: .8rem; color: var(--ink-faint); }

/* Selector de rango (segmented control) */
.seg { display: inline-flex; background: var(--bg-2); border: 1px solid var(--line); border-radius: 9px; padding: 3px; gap: 2px; }
.seg button { border: none; background: none; font: inherit; font-size: .78rem; font-weight: 500; color: var(--ink-soft); padding: 5px 11px; border-radius: 7px; cursor: pointer; transition: background .12s ease, color .12s ease; }
.seg button:hover { color: var(--ink); }
.seg button.is-active { background: var(--bg); color: var(--ink); box-shadow: 0 1px 2px rgba(25,26,30,.08); }

/* Área (SVG dibujado por area.js) */
.area-card { margin-top: 20px; }
.area-chart { width: 100%; height: 260px; }
.area-chart svg { width: 100%; height: 100%; display: block; }
.ac-grid line { stroke: var(--line); opacity: .7; }
.ac-axis text { fill: var(--ink-faint); font-size: 11px; }
.ac-line-a { fill: none; stroke: var(--accent); stroke-width: 2; }
.ac-line-b { fill: none; stroke: var(--pix-blue, #4A90E2); stroke-width: 2; }
.chart-legend { display: flex; justify-content: center; gap: 18px; margin-top: 12px; }
.lg-item { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; color: var(--ink-soft); }
.lg-dot { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.lg-dot.a { background: var(--accent); }
.lg-dot.b { background: var(--pix-blue, #4A90E2); }

/* -- Admin: selector de estadísticas del Resumen (KPIs por cliente) -- */
.stats-config { margin-top: 28px; border-top: 1px solid var(--line); padding-top: 22px; }
.sc-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.sc-head h3 { margin: 0 0 4px; font-size: 1.05rem; }
.sc-sub { margin: 0; color: var(--ink-soft); font-size: .86rem; max-width: 520px; line-height: 1.5; }
.sc-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
@media (max-width: 760px) { .sc-grid { grid-template-columns: 1fr; } }
.sc-item { position: relative; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; background: var(--bg); transition: border-color .12s ease, background .12s ease; }
.sc-item:hover { border-color: var(--ink-faint); }
.sc-item.is-on { border-color: var(--accent); background: var(--accent-soft); }
.sc-item input { position: absolute; opacity: 0; pointer-events: none; }
.sc-check { width: 18px; height: 18px; flex: 0 0 18px; border-radius: 6px; border: 2px solid var(--line); display: grid; place-items: center; transition: background .12s ease, border-color .12s ease; }
.sc-item.is-on .sc-check { background: var(--accent); border-color: var(--accent); }
.sc-item.is-on .sc-check::after { content: ""; width: 9px; height: 5px; border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(-45deg) translateY(-1px); }
.sc-name { font-size: .9rem; font-weight: 500; }
.sc-val { margin-left: auto; font-size: .8rem; color: var(--ink-faint); font-variant-numeric: tabular-nums; }
.sc-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

/* Editor de métricas (tabla valor/Δ/tendencia/texto/periodo) */
.metric-editor { display: flex; flex-direction: column; gap: 6px; }
.me-head, .me-row { display: grid; grid-template-columns: 30px minmax(110px,1.3fr) 86px 60px 98px minmax(120px,1.6fr) minmax(90px,1fr); gap: 10px; align-items: center; }
.me-head { font-size: .72rem; color: var(--ink-faint); font-weight: 600; padding: 0 8px; }
.me-row { padding: 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); transition: border-color .12s ease, background .12s ease; }
.me-row.is-on { border-color: var(--accent); background: var(--accent-soft); }
.me-show { display: inline-flex; cursor: pointer; position: relative; }
.me-show input { position: absolute; opacity: 0; pointer-events: none; }
.me-row.is-on .sc-check { background: var(--accent); border-color: var(--accent); }
.me-row.is-on .sc-check::after { content: ""; width: 9px; height: 5px; border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(-45deg) translateY(-1px); }
.me-name { font-size: .85rem; font-weight: 500; display: flex; align-items: center; gap: 6px; min-width: 0; }
.me-name .me-label { flex: 1; font-weight: 500; }
.me-src { font-size: .6rem; font-weight: 700; color: #1c9d63; background: rgba(28,157,99,.12); padding: 1px 6px; border-radius: 999px; text-transform: uppercase; letter-spacing: .04em; }
.me-f { font: inherit; font-size: .82rem; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--ink); width: 100%; min-width: 0; }
.me-f:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.me-num { text-align: right; }
@media (max-width: 860px) { .me-head { display: none; } .me-row { grid-template-columns: 30px 1fr 1fr; } }

/* Conexión LinkedIn (Slice 2) */
.li-state { font-size: .66rem; font-weight: 600; padding: 2px 9px; border-radius: 999px; background: var(--bg-2); color: var(--ink-soft); margin-left: 8px; vertical-align: middle; }
.li-state.on { background: rgba(28,157,99,.14); color: #1c9d63; }
.li-form { display: flex; gap: 10px; flex-wrap: wrap; }
.li-form .me-f { flex: 1; min-width: 220px; }
.li-err { color: #d6453c; font-size: .8rem; margin: 10px 0 0; }

/* Formulario de mapeo Notion (Slice 15) */
.nt-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; margin-top: 4px; }
.nt-field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.nt-field.nt-wide { grid-column: 1 / -1; }
.nt-field > span { font-size: .74rem; font-weight: 600; color: var(--ink-soft); letter-spacing: .01em; }
.nt-field > span em { font-style: normal; font-weight: 400; opacity: .7; }
.nt-field .me-f { width: 100%; }
@media (max-width: 640px) { .nt-form { grid-template-columns: 1fr; } }

/* Logo de cliente en cabecera de informe (si lo tiene; si no, iniciales) */
.rb-logo:has(img) { background: none !important; width: auto !important; padding: 0 !important; }
.rb-logo img { display: block; height: 32px; width: auto; max-width: 160px; object-fit: contain; }
@media (max-width: 720px) { .g-3, .g-2 { grid-template-columns: 1fr; } }

/* Stat cards */
.stat { display: flex; flex-direction: column; gap: 8px; }
.stat .label { font-size: .82rem; color: var(--ink-faint); }
.stat .num { font-size: 1.9rem; font-family: var(--font-head); font-weight: 800; letter-spacing: -.02em; }
.stat .delta { font-size: .8rem; font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
.delta.up { color: #1c9d63; } .delta.down { color: #d6453c; }
.stat .spark { display: flex; gap: 4px; align-items: flex-end; height: 38px; margin-top: 6px; }
.stat .spark span { flex: 1; background: var(--accent-soft); border-radius: 3px 3px 0 0; }
.stat .spark span.hi { background: var(--accent); }

/* Chart de barras */
.chart-lg { display: flex; align-items: flex-end; gap: 14px; height: 220px; padding-top: 10px; }
.chart-lg .col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; height: 100%; justify-content: flex-end; }
.chart-lg .col .bar { width: 100%; max-width: 46px; border-radius: 8px 8px 0 0; background: linear-gradient(180deg, var(--accent), var(--xtra-coral)); transition: height .6s cubic-bezier(.2,.7,.2,1); }
.chart-lg .col small { font-size: .72rem; color: var(--ink-faint); }

/* Tarjetas de contenido (post LinkedIn / blog para validar) */
.content-card { display: flex; flex-direction: column; gap: 12px; border-radius: 16px; transition: box-shadow .18s ease, border-color .18s ease, transform .18s ease; }
.content-card[data-item]:hover { box-shadow: 0 10px 30px -12px rgba(25,26,30,.22); border-color: color-mix(in srgb, var(--ink) 16%, var(--line)); transform: translateY(-2px); }
html[data-theme="dark"] .content-card[data-item]:hover { box-shadow: 0 12px 32px -14px rgba(0,0,0,.6); }
.content-card.is-selected,
.content-card:has(.val-sel:checked) { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset, 0 10px 30px -14px color-mix(in srgb, var(--accent) 60%, transparent); }
.cc-top { display: flex; align-items: center; gap: 10px; }
.cc-top .badge { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; padding: 4px 9px; border-radius: 999px; }
.badge.linkedin { background: #e8f0fb; color: #0a66c2; }
.badge.blog { background: var(--accent-soft); color: var(--accent-700); }
html[data-theme="dark"] .badge.linkedin { background: rgba(10,102,194,.2); color: #6ea8e6; }
.cc-top .when { font-size: .76rem; color: var(--ink-faint); margin-left: auto; }
.cc-body { font-size: .92rem; line-height: 1.6; color: var(--ink); white-space: pre-line; }
.cc-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.cc-tags span { font-size: .74rem; color: var(--accent-700); }
.cc-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 4px; padding-top: 14px; border-top: 1px solid var(--line); }
.cc-actions .req-changes { margin-left: auto; }

/* Slice 14 — historial / hilo de cambios dentro de la pieza */
.cc-thread { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 14px; }
.cc-thread.is-empty { display: none; }
.cct-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.cct-title { font-size: .72rem; font-weight: 700; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .05em; }
.cct-ver { font-size: .7rem; font-weight: 700; color: var(--accent-700); background: var(--accent-soft); padding: 2px 9px; border-radius: 999px; }
.cct-list { display: flex; flex-direction: column; gap: 8px; }
.cct-event { display: flex; align-items: center; gap: 8px; font-size: .78rem; color: var(--ink-faint); font-weight: 600; }
.cct-event .cce-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-faint); flex: 0 0 7px; }
.cct-event.s-changes .cce-dot { background: #c2410c; }
.cct-event.s-approved .cce-dot { background: #1c9d63; }
.cct-event.ver .cce-dot { background: var(--accent); }
.cct-msg { max-width: 88%; padding: 9px 12px; border-radius: 12px; font-size: .84rem; line-height: 1.45; }
.cct-msg .ccm-who { font-size: .68rem; opacity: .7; margin-bottom: 3px; font-weight: 600; }
.cct-msg.out { align-self: flex-end; background: var(--accent-soft); color: var(--ink); border-bottom-right-radius: 4px; }
.cct-msg.in { align-self: flex-start; background: var(--bg-2); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.status-pill { font-size: .74rem; font-weight: 600; padding: 4px 10px; border-radius: 999px; }
.status-pill.pend { background: #fff4e0; color: #b5780c; }
.status-pill.ok { background: #e4f6ec; color: #1c9d63; }
html[data-theme="dark"] .status-pill.pend { background: rgba(181,120,12,.18); }
html[data-theme="dark"] .status-pill.ok { background: rgba(28,157,99,.2); }

/* Botones (mini variantes; el sistema ya define .btn) */
.btn-sm { padding: 8px 14px; font-size: .84rem; border-radius: var(--r-btn); }
.btn-soft { background: var(--bg-2); color: var(--ink); border: 1px solid var(--line); }
.btn-soft:hover { border-color: var(--ink); }

/* Calendario */
.calendar { border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.cal-head, .cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.cal-head span { padding: 12px 8px; font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-faint); text-align: center; background: var(--bg-2); }
.cal-cell { min-height: 92px; border-top: 1px solid var(--line); border-left: 1px solid var(--line); padding: 8px; font-size: .8rem; }
.cal-cell:nth-child(7n+1) { border-left: none; }
.cal-cell .d { color: var(--ink-faint); font-size: .76rem; }
.cal-cell.out { background: var(--bg-2); opacity: .5; }
.cal-event { margin-top: 6px; font-size: .72rem; padding: 4px 6px; border-radius: 6px; background: var(--accent-soft); color: var(--accent-700); border-left: 3px solid var(--accent); line-height: 1.25; }
.cal-event.li { background: #e8f0fb; color: #0a66c2; border-left-color: #0a66c2; }
html[data-theme="dark"] .cal-event.li { background: rgba(10,102,194,.18); color: #6ea8e6; }

/* Tablas */
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th { text-align: left; font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-faint); padding: 12px 14px; border-bottom: 1px solid var(--line); font-weight: 600; }
.table td { padding: 14px; border-bottom: 1px solid var(--line); }
.table tr:last-child td { border-bottom: none; }
.table .name { font-weight: 600; }
.lvl-pill { font-size: .76rem; font-weight: 700; padding: 3px 11px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-700); }

/* Bandeja de mensajes */
.inbox { display: grid; grid-template-columns: 320px 1fr; min-height: 460px; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.inbox-list { border-right: 1px solid var(--line); overflow-y: auto; }
.msg-item { padding: 16px 18px; border-bottom: 1px solid var(--line); cursor: pointer; transition: background .12s ease; }
.msg-item:hover, .msg-item.is-active { background: var(--bg-2); }
.msg-item .mi-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.msg-item .mi-top strong { font-size: .9rem; }
.msg-item .mi-top .t { font-size: .72rem; color: var(--ink-faint); }
.msg-item .mi-prev { font-size: .82rem; color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg-item .unread { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); display: inline-block; margin-right: 6px; }
.inbox-read { padding: 26px; display: flex; flex-direction: column; }
.inbox-read .ir-head { border-bottom: 1px solid var(--line); padding-bottom: 16px; margin-bottom: 16px; }
.inbox-read h3 { margin: 0 0 4px; font-family: var(--font-serif); }
.inbox-read .ir-body { line-height: 1.7; color: var(--ink-soft); flex: 1; }
.inbox-reply { display: flex; gap: 10px; margin-top: 16px; }
.inbox-reply input { flex: 1; padding: 12px 14px; border-radius: var(--r-btn); border: 1px solid var(--line); background: var(--bg); color: var(--ink); font: inherit; }
@media (max-width: 820px) { .inbox { grid-template-columns: 1fr; } }

/* Tarjetas networking / club / formación / recomendados (look galería) */
.tile-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.tile {
  border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--bg); overflow: hidden;
  display: flex; flex-direction: column; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.tile:hover { transform: translateY(-3px); box-shadow: 0 16px 40px -22px rgba(0,0,0,.3); border-color: transparent; }
.tile-cover { height: 96px; background: var(--grad-hero); position: relative; }
.tile-logo { position: absolute; left: 20px; bottom: -22px; width: 52px; height: 52px; border-radius: 14px; background: var(--bg); border: 1px solid var(--line); display: grid; place-items: center; font-family: var(--font-head); font-weight: 800; color: var(--accent); }
.tile-body { padding: 32px 20px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.tile-body h4 { margin: 0; font-size: 1.05rem; }
.tile-body .role { font-size: .76rem; color: var(--ink-faint); }
.tile-body p { margin: 4px 0 0; font-size: .87rem; color: var(--ink-soft); line-height: 1.5; }
.tile-foot { margin-top: auto; padding-top: 14px; display: flex; gap: 10px; }

/* Club de Grafs — puntos */
.club-hero { background: var(--ink); color: var(--bg); border-radius: var(--r-lg); padding: 28px; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.club-hero .pts { font-family: var(--font-head); font-weight: 800; font-size: 3rem; letter-spacing: -.02em; line-height: 1; }
.club-hero .pts small { display: block; font-size: .8rem; font-weight: 500; color: rgba(255,255,255,.6); letter-spacing: 0; }
.club-progress { flex: 1; min-width: 240px; }
.club-progress .bar { height: 10px; border-radius: 999px; background: rgba(255,255,255,.15); overflow: hidden; margin: 10px 0 6px; }
.club-progress .bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--xtra-coral)); border-radius: 999px; }
.club-progress .lbl { font-size: .78rem; color: rgba(255,255,255,.65); display: flex; justify-content: space-between; }
.tier { display: flex; gap: 12px; align-items: flex-start; }
.tier .medal { width: 40px; height: 40px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-700); display: grid; place-items: center; flex: 0 0 40px; }

/* Ofertas */
.offer { position: relative; display: flex; flex-direction: column; gap: 10px; }
.offer.feat { border-color: var(--accent); }
.offer .ribbon { position: absolute; top: 16px; right: 16px; background: var(--accent); color: #fff; font-size: .68rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; text-transform: uppercase; letter-spacing: .05em; }
.offer .price { font-family: var(--font-head); font-weight: 800; font-size: 1.8rem; }
.offer .price s { color: var(--ink-faint); font-size: 1rem; font-weight: 500; margin-right: 8px; }
.offer ul { margin: 4px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.offer ul li { font-size: .87rem; color: var(--ink-soft); display: flex; gap: 8px; }
.offer ul li::before { content: "✓"; color: var(--accent); font-weight: 700; }

/* Formación */
.course-cover { height: 120px; background: var(--grad-hero); display: grid; place-items: center; position: relative; }
.course-cover .play { width: 48px; height: 48px; border-radius: 50%; background: var(--bg); display: grid; place-items: center; box-shadow: 0 8px 24px -8px rgba(0,0,0,.4); }
.course-cover .dur { position: absolute; bottom: 10px; right: 10px; background: rgba(0,0,0,.6); color: #fff; font-size: .72rem; padding: 2px 8px; border-radius: 6px; }

/* =========================================================
   ONBOARDING (checklist de bienvenida) y ESTADOS VACÍOS
   ========================================================= */
.onboard { position: relative; background: var(--ink); color: var(--bg); border-radius: var(--r-lg); padding: 24px 26px; margin-bottom: 24px; overflow: hidden; }
.onboard::after { content: ""; position: absolute; width: 220px; height: 220px; border-radius: 50%; background: var(--accent); filter: blur(70px); opacity: .35; right: -40px; top: -60px; }
.onboard > * { position: relative; z-index: 1; }
.onboard h3 { margin: 0 0 4px; font-family: var(--font-serif); font-size: 1.3rem; }
.onboard .ob-sub { color: rgba(255,255,255,.7); font-size: .88rem; margin: 0 0 16px; }
.onboard .ob-bar { height: 6px; border-radius: 999px; background: rgba(255,255,255,.15); overflow: hidden; max-width: 320px; margin-bottom: 18px; }
.onboard .ob-bar i { display: block; height: 100%; background: var(--accent); border-radius: 999px; transition: width .3s ease; }
.ob-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.ob-step { display: flex; align-items: center; gap: 10px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12); border-radius: 12px; padding: 12px 14px; cursor: pointer; transition: background .15s ease; }
.ob-step:hover { background: rgba(255,255,255,.12); }
.ob-step .tick { width: 22px; height: 22px; border-radius: 50%; border: 2px solid rgba(255,255,255,.4); flex: 0 0 22px; display: grid; place-items: center; font-size: .7rem; }
.ob-step.done .tick { background: var(--accent); border-color: var(--accent); color: #fff; }
.ob-step.done span { text-decoration: line-through; color: rgba(255,255,255,.55); }
.ob-step span { font-size: .86rem; }
.onboard .ob-close { position: absolute; top: 16px; right: 16px; z-index: 2; background: rgba(255,255,255,.12); border: none; color: var(--bg); width: 28px; height: 28px; border-radius: 8px; cursor: pointer; font-size: 1rem; line-height: 1; }
.onboard .ob-close:hover { background: rgba(255,255,255,.22); }

.empty-state { text-align: center; padding: 56px 24px; color: var(--ink-soft); }
.empty-state .es-ico { width: 60px; height: 60px; border-radius: 16px; background: var(--bg-2); display: grid; place-items: center; margin: 0 auto 16px; color: var(--ink-faint); }
.empty-state .es-ico svg { width: 28px; height: 28px; }
.empty-state h3 { margin: 0 0 6px; font-family: var(--font-serif); color: var(--ink); }
.empty-state p { margin: 0 auto 18px; max-width: 380px; font-size: .9rem; line-height: 1.55; }

/* =========================================================
   BÚSQUEDA (barra topbar + paleta ⌘K) y NOTIFICACIONES
   ========================================================= */
/* Barra de búsqueda en la topbar (abre la paleta) */
.topbar-search {
  display: flex; align-items: center; gap: 10px; cursor: text;
  border: 1px solid var(--line); background: var(--bg-2); border-radius: 10px;
  padding: 0 12px; height: 40px; color: var(--ink-faint); font-size: .88rem;
  /* centrado en el medio de la topbar */
  position: absolute; left: 50%; transform: translateX(-50%);
  width: 60vw; max-width: 840px; min-width: 240px;
}
@media (max-width: 1000px) { .topbar-search { position: static; transform: none; width: auto; flex: 1; } }
.topbar-search:hover { border-color: var(--ink-soft); }
.topbar-search svg { width: 16px; height: 16px; }
.topbar-search .kbd { margin-left: auto; font-size: .72rem; border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; background: var(--bg); color: var(--ink-faint); }
@media (max-width: 760px) { .topbar-search { min-width: 0; } .topbar-search .label, .topbar-search .kbd { display: none; } }

/* Paleta de comandos ⌘K */
.cmdk { position: fixed; inset: 0; background: rgba(10,10,12,.45); z-index: 200; display: none; align-items: flex-start; justify-content: center; padding-top: 12vh; }
.cmdk.open { display: flex; }
.cmdk-box { width: 100%; max-width: 560px; background: var(--bg); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 30px 80px -20px rgba(0,0,0,.5); overflow: hidden; }
.cmdk-input-wrap { display: flex; align-items: center; gap: 10px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.cmdk-input-wrap svg { width: 18px; height: 18px; color: var(--ink-faint); }
.cmdk-input { flex: 1; border: none; background: none; font: inherit; font-size: 1rem; color: var(--ink); outline: none; }
.cmdk-list { max-height: 360px; overflow-y: auto; padding: 8px; }
.cmdk-group { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-faint); padding: 10px 12px 4px; }
.cmdk-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; cursor: pointer; color: var(--ink); font-size: .9rem; }
.cmdk-item .ico { width: 18px; height: 18px; color: var(--ink-soft); flex: 0 0 18px; }
.cmdk-item .sub { margin-left: auto; font-size: .76rem; color: var(--ink-faint); }
.cmdk-item.is-active, .cmdk-item:hover { background: var(--bg-2); }
.cmdk-empty { padding: 24px; text-align: center; color: var(--ink-faint); font-size: .9rem; }

/* Centro de notificaciones */
.notif-wrap { position: relative; }
.notif-panel {
  position: absolute; top: calc(100% + 10px); right: 0; width: 360px; z-index: 50;
  background: var(--bg); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: 0 24px 60px -22px rgba(0,0,0,.4); display: none; overflow: hidden;
}
.notif-wrap.open .notif-panel { display: block; }
.notif-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.notif-head h4 { margin: 0; font-size: .95rem; }
.notif-head a { font-size: .78rem; color: var(--ink-soft); text-decoration: none; }
.notif-head a:hover { color: var(--accent); }
.notif-list { max-height: 380px; overflow-y: auto; }
.notif-item { display: flex; gap: 12px; padding: 13px 16px; border-bottom: 1px solid var(--line); cursor: pointer; }
.notif-item:hover { background: var(--bg-2); }
.notif-item.unread { background: var(--accent-soft); }
.notif-item.unread:hover { background: var(--accent-soft); }
.notif-ico { width: 34px; height: 34px; border-radius: 10px; flex: 0 0 34px; display: grid; place-items: center; background: var(--bg-2); color: var(--ink-soft); }
.notif-ico svg { width: 17px; height: 17px; }
.notif-txt { flex: 1; min-width: 0; }
.notif-txt strong { display: block; font-size: .86rem; font-weight: 600; }
.notif-txt span { font-size: .8rem; color: var(--ink-soft); }
.notif-txt .t { font-size: .72rem; color: var(--ink-faint); margin-top: 3px; display: block; }
.notif-foot { padding: 12px 16px; text-align: center; }
.notif-del {
  flex: none; align-self: center; display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border: 0; border-radius: 8px; background: transparent;
  color: var(--ink-faint); cursor: pointer; opacity: 0; transition: opacity .15s ease, background .15s ease, color .15s ease;
}
.notif-item:hover .notif-del { opacity: 1; }
.notif-del:hover { background: color-mix(in srgb, var(--danger, #c0392b) 12%, transparent); color: var(--danger, #c0392b); }
.notif-del:focus-visible { opacity: 1; outline: 2px solid var(--accent); outline-offset: 1px; }
.notif-empty { padding: 26px 16px; text-align: center; font-size: .84rem; color: var(--ink-faint); }
@media (hover: none) { .notif-del { opacity: 1; } }

/* =========================================================
   VISTA PREVIA POST LINKEDIN (idéntica visualmente a LinkedIn)
   ========================================================= */
.li-post {
  background: var(--white); border: 1px solid var(--line); border-radius: 12px;
  max-width: 700px; overflow: hidden; font-family: var(--font-sans);
  box-shadow: 0 1px 2px rgba(25,26,30,.06), 0 6px 20px -12px rgba(25,26,30,.18);
}
.li-head { display: flex; gap: 10px; padding: 12px 14px 0; align-items: center; }
.li-av { width: 48px; height: 48px; border-radius: 8px; flex: 0 0 48px; display: grid; place-items: center; font-weight: 700; color: #fff; background: #0a66c2; font-size: .95rem; overflow: hidden; border: 1px solid var(--line); }
.li-av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.li-id { flex: 1; min-width: 0; }
.li-name { font-weight: 600; font-size: .9rem; color: var(--ink); line-height: 1.2; }
.li-name .verified { color: #0a66c2; }
.li-sub { font-size: .76rem; color: var(--ink-faint); line-height: 1.3; margin-top: 1px; }
.li-time { font-size: .76rem; color: var(--ink-faint); display: flex; align-items: center; gap: 4px; margin-top: 1px; }
.li-time .globe { width: 12px; height: 12px; }
.li-more { color: var(--ink-faint); font-weight: 700; letter-spacing: 1px; align-self: flex-start; padding: 0 4px; }
.li-follow { color: #0a66c2; font-weight: 600; font-size: .82rem; flex: 0 0 auto; padding-top: 2px; }
.li-text { padding: 10px 16px 14px; font-size: .905rem; line-height: 1.5; color: var(--ink); white-space: pre-line; word-break: break-word; }
.li-text.li-clamp { max-height: 236px; overflow: hidden; padding-bottom: 4px;
  -webkit-mask-image: linear-gradient(180deg, #000 78%, transparent);
          mask-image: linear-gradient(180deg, #000 78%, transparent); }
.li-more-btn { display: block; width: 100%; text-align: left; background: none; border: none;
  padding: 2px 16px 12px; margin: 0; color: var(--ink-faint); font: inherit; font-weight: 600; font-size: .86rem; cursor: pointer; }
.li-more-btn:hover { color: var(--ink-soft); text-decoration: underline; }
.li-media { height: 230px; margin-top: 10px; background: var(--grad-hero); position: relative; display: grid; place-items: center; color: var(--ink-faint); font-size: .8rem; }
.li-counts { display: flex; align-items: center; gap: 6px; padding: 10px 14px 8px; font-size: .76rem; color: var(--ink-faint); }
.li-reacts { display: flex; align-items: center; }
.li-reacts span { width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; font-size: .62rem; margin-left: -5px; border: 1.5px solid var(--bg); background: var(--bg-2); }
.li-reacts span:first-child { margin-left: 0; }
.li-counts .dot-sep { margin-left: auto; }
.li-divider { height: 1px; background: var(--line); margin: 0 14px; }
.li-actions { display: flex; padding: 4px 6px; }
.li-actions button { flex: 1; display: flex; align-items: center; justify-content: center; gap: 7px; padding: 10px 4px; background: none; border: none; color: var(--ink-soft); font: inherit; font-size: .82rem; font-weight: 600; cursor: pointer; border-radius: 6px; }
.li-actions button:hover { background: var(--bg-2); }
.li-actions svg { width: 18px; height: 18px; }
@media (max-width: 480px) { .li-actions button span { display: none; } }

/* Barra de acciones en bloque (validar) */
.bulk-bar { display: flex; align-items: center; gap: 14px; background: color-mix(in srgb, var(--bg) 82%, transparent); -webkit-backdrop-filter: saturate(1.6) blur(10px); backdrop-filter: saturate(1.6) blur(10px); border: 1px solid var(--line); border-radius: 14px; padding: 12px 18px; margin-bottom: 20px; position: sticky; top: 10px; z-index: 10; box-shadow: 0 6px 20px -14px rgba(25,26,30,.4); }
.bulk-bar .sel-count { font-weight: 600; font-size: .9rem; }
.bulk-bar .spacer { flex: 1; }
.val-check { display: flex; align-items: center; gap: 8px; font-size: .82rem; color: var(--ink-soft); cursor: pointer; }
.val-check input { width: 16px; height: 16px; accent-color: var(--accent); }

/* Caja de comentarios en línea */
.cc-comment { margin-top: 10px; }
.cc-comment textarea { width: 100%; min-height: 60px; resize: vertical; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg-2); color: var(--ink); font: inherit; font-size: .86rem; }
.cc-comment textarea:focus { outline: none; border-color: var(--accent); }
.cc-comment .hide { display: none; }
.status-pill.chg { background: #fdeee0; color: #c2410c; }
html[data-theme="dark"] .status-pill.chg { background: rgba(194,65,12,.2); }

/* Preview de artículo de blog (compositor) */
.blog-prev { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; max-width: 500px; }
.blog-prev .bp-cover { height: 150px; background: var(--grad-hero); }
.blog-prev .bp-body { padding: 16px; }
.blog-prev .bp-kicker { font-size: .72rem; color: var(--accent); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.blog-prev h4 { margin: 6px 0 8px; font-family: var(--font-serif); font-size: 1.15rem; line-height: 1.2; }
.blog-prev p { margin: 0; font-size: .85rem; color: var(--ink-soft); line-height: 1.5; }
.hide { display: none !important; }

/* =========================================================
   SUPERADMIN (modo Grafs)
   ========================================================= */
/* Distintivo de modo admin en el sidebar/topbar */
.admin-tag { font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); border: 1px solid var(--accent); border-radius: 999px; padding: 2px 8px; }

/* Selector de cliente en la topbar */
.client-switch { position: relative; }
.client-switch .cs-btn {
  display: flex; align-items: center; gap: 10px; cursor: pointer;
  border: 1px solid var(--line); background: var(--bg); border-radius: 12px; padding: 6px 12px 6px 8px;
  font: inherit; color: var(--ink);
}
.client-switch .cs-btn:hover { border-color: var(--ink); }
.client-switch .cs-btn .avatar { width: 30px; height: 30px; font-size: .72rem; }
.client-switch .cs-btn .who { line-height: 1.15; text-align: left; }
.client-switch .cs-btn .who strong { display: block; font-size: .82rem; }
.client-switch .cs-btn .who span { font-size: .68rem; color: var(--ink-faint); }
.client-switch .cs-menu {
  position: absolute; top: calc(100% + 8px); left: 0; min-width: 240px; z-index: 40;
  background: var(--bg); border: 1px solid var(--line); border-radius: 14px; padding: 6px;
  box-shadow: 0 20px 50px -20px rgba(0,0,0,.35); display: none;
}
.client-switch.open .cs-menu { display: block; }
.cs-menu button { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 9px 10px; border-radius: 9px; border: none; background: none; font: inherit; color: var(--ink); cursor: pointer; }
.cs-menu button:hover { background: var(--bg-2); }
.cs-menu .sep { height: 1px; background: var(--line); margin: 6px 4px; }

/* Switcher de cliente colocado en el header del sidebar (estilo shadcn sidebar-07) */
.sidebar .client-switch { width: 100%; }
.sidebar .client-switch .cs-btn { width: 100%; border: none; background: none; border-radius: 10px; padding: 8px; }
.sidebar .client-switch .cs-btn:hover { background: var(--sidebar-accent); border: none; }
.sidebar .client-switch .cs-btn .avatar { width: 32px; height: 32px; flex: 0 0 32px; border-radius: 9px; background: var(--accent); color: #fff; font-size: .82rem; }
.sidebar .client-switch .cs-btn .who { flex: 1; min-width: 0; }
.sidebar .client-switch .cs-btn .who strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar .client-switch .cs-btn > svg { margin-left: auto; color: var(--ink-faint); flex: 0 0 16px; }
.sidebar .client-switch .cs-menu { left: 0; right: 0; min-width: 0; top: calc(100% + 6px); }
.app.is-collapsed .sidebar .client-switch .cs-btn .who,
.app.is-collapsed .sidebar .client-switch .cs-btn > svg { display: none; }
.app.is-collapsed .sidebar .client-switch .cs-btn { justify-content: center; }
@media (max-width: 900px) {
  .app.is-collapsed .sidebar .client-switch .cs-btn .who,
  .app.is-collapsed .sidebar .client-switch .cs-btn > svg { display: revert; }
  .app.is-collapsed .sidebar .client-switch .cs-btn { justify-content: flex-start; }
}

/* Compositor de contenido */
.composer { display: grid; grid-template-columns: 1fr 360px; gap: 24px; align-items: start; }
@media (max-width: 980px) { .composer { grid-template-columns: 1fr; } }
.composer textarea {
  width: 100%; min-height: 200px; resize: vertical; padding: 14px 16px; font: inherit; line-height: 1.6;
  border-radius: 12px; border: 1px solid var(--line); background: var(--bg); color: var(--ink);
}
.composer textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.composer .row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 14px; }
.composer .seg { display: flex; gap: 4px; background: var(--bg-2); padding: 4px; border-radius: 10px; }
.composer .seg button { border: none; background: none; padding: 7px 14px; border-radius: 8px; font: inherit; font-size: .85rem; cursor: pointer; color: var(--ink-soft); }
.composer .seg button.is-active { background: var(--bg); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.08); font-weight: 600; }
.composer select, .composer input[type="datetime-local"], .composer input[type="date"] {
  padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); font: inherit; font-size: .88rem;
}
/* Preview tipo tarjeta del cliente */
.composer-preview { position: sticky; top: 16px; }
.composer-preview .preview-label { font-size: .74rem; color: var(--ink-faint); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 10px; }

/* Switch */
.switch { position: relative; display: inline-block; width: 40px; height: 22px; flex: 0 0 40px; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .track { position: absolute; inset: 0; background: var(--line); border-radius: 999px; transition: background .15s ease; cursor: pointer; }
.switch .track::before { content: ""; position: absolute; width: 16px; height: 16px; border-radius: 50%; background: #fff; top: 3px; left: 3px; transition: transform .15s ease; }
.switch input:checked + .track { background: var(--accent); }
.switch input:checked + .track::before { transform: translateX(18px); }

/* Editable inline (admin) */
.editable { border: 1px dashed transparent; border-radius: 6px; padding: 2px 6px; cursor: text; }
.editable:hover { border-color: var(--line); background: var(--bg-2); }

/* Mini-tag de estado de cola */
.qstate { font-size: .72rem; font-weight: 600; padding: 3px 9px; border-radius: 999px; }
.qstate.draft { background: var(--bg-2); color: var(--ink-soft); }
.qstate.sent { background: #fff4e0; color: #b5780c; }
.qstate.appr { background: #e4f6ec; color: #1c9d63; }
.qstate.pub  { background: #e8f0fb; color: #0a66c2; }
html[data-theme="dark"] .qstate.sent { background: rgba(181,120,12,.18); }
html[data-theme="dark"] .qstate.appr { background: rgba(28,157,99,.2); }
html[data-theme="dark"] .qstate.pub { background: rgba(10,102,194,.2); color:#6ea8e6; }

/* ===== Sidebar: trigger + colapso a iconos (escritorio) ===== */
.side-toggle { display: grid; }   /* visible siempre, como shadcn */

/* Colapsado a rail: solo iconos. Oculta textos sin quitarlos del DOM
   (así el breadcrumb y los tooltips siguen leyendo el label). */
.app.is-collapsed .sidebar { width: var(--side-rail); flex: 0 0 var(--side-rail); }
.app.is-collapsed .ss-txt,
.app.is-collapsed .ss-chev,
.app.is-collapsed .su-txt,
.app.is-collapsed .su-chev,
.app.is-collapsed .side-badge { display: none; }
.app.is-collapsed .ss-mark { display: grid; }
.app.is-collapsed .ss-btn,
.app.is-collapsed .su-btn { justify-content: center; padding: 8px; }
.app.is-collapsed .side-link { justify-content: center; gap: 0; width: 32px; height: 32px; padding: 8px; font-size: 0; margin: 0 auto; }
.app.is-collapsed .side-link .ico { width: 18px; height: 18px; flex-basis: 18px; font-size: 18px; }
.app.is-collapsed .side-nav .group-label { height: 1px; padding: 0; margin: 10px 12px; background: var(--line); color: transparent; overflow: hidden; }
.app.is-collapsed .side-sep { margin: 8px 10px; }

/* Tooltip al pasar el ratón estando colapsado */
.app.is-collapsed .side-link[data-tip]:hover::after,
.app.is-collapsed .ss-btn[data-tip]:hover::after,
.app.is-collapsed .su-btn[data-tip]:hover::after {
  content: attr(data-tip);
  position: absolute; left: calc(100% + 10px); top: 50%; transform: translateY(-50%);
  background: var(--ink); color: var(--bg); font-size: .76rem; font-weight: 500;
  padding: 5px 9px; border-radius: 7px; white-space: nowrap; z-index: 80;
  box-shadow: 0 4px 14px rgba(0,0,0,.2); pointer-events: none;
}

/* ===== Responsive: off-canvas en móvil ===== */
.app-backdrop { display: none; }
@media (max-width: 900px) {
  .sidebar { position: fixed; left: 0; top: 0; z-index: 60; transform: translateX(-100%); transition: transform .25s ease; box-shadow: 0 0 60px rgba(0,0,0,.3); }
  /* en móvil el menú es un cajón completo: anula el colapso de escritorio */
  .app.is-collapsed .sidebar,
  .sidebar { width: var(--side-w); flex-basis: var(--side-w); }
  .app.is-collapsed .ss-txt, .app.is-collapsed .ss-chev,
  .app.is-collapsed .su-txt, .app.is-collapsed .su-chev,
  .app.is-collapsed .side-badge { display: revert; }
  .app.is-collapsed .side-link { justify-content: flex-start; gap: 8px; width: 100%; height: 32px; padding: 0 8px; font-size: .875rem; margin: 0; }
  .app.is-collapsed .ss-btn, .app.is-collapsed .su-btn { justify-content: flex-start; }
  .app.is-collapsed .side-nav .group-label { height: auto; padding: 12px 10px 4px; margin: 0; background: none; color: var(--ink-faint); }
  .app.nav-open .sidebar { transform: none; }
  .app-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 50; }
  .app.nav-open .app-backdrop { display: block; }
}

/* =========================================================
   PARTE 3 — MÁQUINA DE ESTADOS, SECCIONES POR PLAN, ROLES
   ========================================================= */

/* ---------- Máquina de estados del contenido (chip canónico) ----------
   Borrador → Por validar → Cambios solicitados → Aprobado → Programado → Publicado.
   Reutiliza la paleta ya existente para que todo combine. */
.state {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .74rem; font-weight: 600; padding: 4px 10px; border-radius: 999px;
  white-space: nowrap;
}
.state::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: 0 0 7px; }
.state.s-draft     { background: var(--bg-2);  color: var(--ink-soft); }
.state.s-review    { background: #fff4e0; color: #b5780c; }
.state.s-changes   { background: #fdeee0; color: #c2410c; }
.state.s-approved  { background: #e4f6ec; color: #1c9d63; }
.state.s-scheduled { background: #ecebfb; color: #5048c8; }
.state.s-published { background: #e8f0fb; color: #0a66c2; }
html[data-theme="dark"] .state.s-review    { background: rgba(181,120,12,.18); }
html[data-theme="dark"] .state.s-changes   { background: rgba(194,65,12,.2); }
html[data-theme="dark"] .state.s-approved  { background: rgba(28,157,99,.2); }
html[data-theme="dark"] .state.s-scheduled { background: rgba(80,72,200,.22); color: #a9a3f0; }
html[data-theme="dark"] .state.s-published { background: rgba(10,102,194,.2); color: #6ea8e6; }

/* Stepper del flujo (leyenda del ciclo de vida) */
.flow {
  display: flex; align-items: center; flex-wrap: wrap; gap: 4px 0;
  background: var(--bg); border: 1px solid var(--line); border-radius: 14px;
  padding: 14px 18px; margin-bottom: 22px;
}
.flow .step { display: flex; align-items: center; gap: 8px; color: var(--ink-faint); font-size: .8rem; font-weight: 600; }
.flow .step .num { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--line); display: grid; place-items: center; font-size: .72rem; }
.flow .step.done { color: var(--ink); }
.flow .step.done .num { background: var(--accent); border-color: var(--accent); color: #fff; }
.flow .step.current { color: var(--ink); }
.flow .step.current .num { border-color: var(--accent); color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.flow .step.opt .num { border-style: dashed; }
.flow .arrow { color: var(--ink-faint); margin: 0 12px; }
@media (max-width: 980px) { .flow .step span { display: none; } .flow .arrow { margin: 0 6px; } }

/* ---------- Secciones según plan (gating) ---------- */
.side-link.locked { opacity: .55; }
.side-link.locked:hover { background: var(--bg-2); color: var(--ink-soft); }
.side-link .lock { margin-left: auto; width: 14px; height: 14px; opacity: .75; flex: 0 0 14px; }
.side-link.locked.is-active { opacity: 1; }

/* Pantalla de upsell cuando una sección no está en el plan */
.lock-upsell {
  text-align: center; padding: 52px 28px;
  border: 1px dashed var(--line); border-radius: var(--r-lg); background: var(--bg);
}
.lock-upsell .lk-ico { width: 64px; height: 64px; border-radius: 18px; background: var(--accent-soft); color: var(--accent-700); display: grid; place-items: center; margin: 0 auto 18px; }
.lock-upsell .lk-ico svg { width: 28px; height: 28px; }
.lock-upsell h3 { font-family: var(--font-serif); font-size: 1.5rem; margin: 0 0 8px; }
.lock-upsell p { color: var(--ink-soft); max-width: 440px; margin: 0 auto 22px; line-height: 1.6; }
.lock-upsell .lk-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* Lista "Tu plan y servicios" (en Ajustes) */
.plan-list { display: flex; flex-direction: column; gap: 2px; }
.plan-row { display: flex; align-items: center; gap: 12px; padding: 12px 4px; border-bottom: 1px solid var(--line); }
.plan-row:last-child { border-bottom: none; }
.plan-row .pr-ico { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; flex: 0 0 30px; }
.plan-row.on  .pr-ico { background: #e4f6ec; color: #1c9d63; }
.plan-row.off .pr-ico { background: var(--bg-2); color: var(--ink-faint); }
html[data-theme="dark"] .plan-row.on .pr-ico { background: rgba(28,157,99,.2); }
.plan-row .pr-name { font-weight: 600; font-size: .9rem; }
.plan-row .pr-meta { font-size: .78rem; color: var(--ink-faint); }
.plan-row .pr-tag { margin-left: auto; font-size: .72rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.plan-row.on  .pr-tag { background: var(--accent-soft); color: var(--accent-700); }
.plan-row.off .pr-tag { background: var(--bg-2); color: var(--ink-soft); cursor: pointer; }

/* ---------- Roles y permisos (visual) ---------- */
.role-pill { font-size: .72rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.role-pill.owner  { background: var(--ink); color: var(--bg); }
.role-pill.editor { background: var(--accent-soft); color: var(--accent-700); }
.role-pill.viewer { background: var(--bg-2); color: var(--ink-soft); }
.user-row { display: flex; align-items: center; gap: 12px; padding: 13px 4px; border-bottom: 1px solid var(--line); }
.user-row:last-child { border-bottom: none; }
.user-row .avatar { width: 34px; height: 34px; font-size: .76rem; flex: 0 0 34px; }
.user-row .u-id { line-height: 1.25; }
.user-row .u-id strong { display: block; font-size: .88rem; }
.user-row .u-id span { font-size: .76rem; color: var(--ink-faint); }
.user-row .u-act { margin-left: auto; display: flex; align-items: center; gap: 10px; }

/* Tabla de posicionamiento SEO */
.kw-pos { font-family: var(--font-head); font-weight: 800; font-size: 1rem; }
.kw-pos.top { color: #1c9d63; }
.serp-hook { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; background: var(--bg-2); border: 1px dashed var(--line); border-radius: 12px; padding: 14px 18px; margin-bottom: 20px; }
.serp-hook .sh-txt { font-size: .85rem; color: var(--ink-soft); }
.serp-hook .sh-txt b { color: var(--ink); }

/* ===================================================================
   PARTE 4A — Estadísticas (informe PDF + vs objetivo), Calendario
   (vistas semana/mes + drag&drop) y Mensajes (adjuntar/plantillas/prioridad)
   =================================================================== */

/* Barra de herramientas dentro de un panel */
.panel-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: -6px 0 20px; }
.panel-toolbar .spacer { flex: 1; }
.panel-toolbar select { font: inherit; font-size: .84rem; padding: 8px 12px; border-radius: var(--r-btn); border: 1px solid var(--line); background: var(--bg); color: var(--ink); }
.cal-range { font-weight: 600; font-size: .9rem; min-width: 118px; text-align: center; }

/* Segmentado reutilizable (Mes/Semana, etc.) */
.useg { display: inline-flex; background: var(--bg-2); border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.useg button { border: none; background: none; font: inherit; font-size: .82rem; font-weight: 600; color: var(--ink-soft); padding: 6px 14px; border-radius: 999px; cursor: pointer; }
.useg button.is-active { background: var(--bg); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.1); }
html[data-theme="dark"] .useg button.is-active { background: var(--ink); color: var(--bg); }

/* Botón circular de paso (◀ ▶) */
.step-btn { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: var(--bg); color: var(--ink-soft); cursor: pointer; font-size: .9rem; line-height: 1; }
.step-btn:hover:not(:disabled) { color: var(--ink); border-color: var(--ink-faint); }
.step-btn:disabled { opacity: .4; cursor: default; }

/* --- Comparativa vs objetivo (Estadísticas) --- */
.goals { display: flex; flex-direction: column; gap: 18px; }
.goal-row .g-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 8px; }
.goal-row .g-name { font-weight: 600; font-size: .9rem; }
.goal-row .g-val { font-size: .82rem; color: var(--ink-faint); }
.goal-row .g-val b { color: var(--ink); font-family: var(--font-head); }
.goal-track { position: relative; height: 12px; border-radius: 999px; background: var(--bg-2); overflow: hidden; }
.goal-fill { position: absolute; inset: 0 auto 0 0; border-radius: 999px; background: linear-gradient(90deg, var(--accent), var(--xtra-coral)); }
.goal-fill.met { background: linear-gradient(90deg, #1c9d63, #4ec98a); }
.goal-row .g-pct { font-weight: 700; }
.goal-row .g-pct.met { color: #1c9d63; }
.goal-row .g-pct.near { color: var(--accent-700); }

/* --- Cabecera de marca del informe (solo al imprimir / guardar PDF) --- */
.report-brand { display: none; }
@media print {
  .sidebar, .app-topbar, .app-backdrop, .cmdk, .toast, .panel-toolbar { display: none !important; }
  .app, .app-main, .app-content { display: block !important; height: auto !important; overflow: visible !important; }
  body, .app-body { background: #fff !important; }
  .panel { display: none !important; }
  .panel[data-panel="estadisticas"] { display: block !important; }
  .report-brand { display: flex !important; align-items: center; gap: 14px; border-bottom: 2px solid #191A1E; padding-bottom: 16px; margin-bottom: 24px; }
  .report-brand .rb-logo { width: 46px; height: 46px; border-radius: 12px; background: #191A1E; color: #fff; display: grid; place-items: center; font-weight: 800; font-family: var(--font-head); }
  .report-brand .rb-title { font-family: var(--font-serif); font-size: 1.4rem; margin: 0; line-height: 1.1; }
  .report-brand .rb-meta { font-size: .82rem; color: #555; }
  .report-brand .rb-by { margin-left: auto; text-align: right; font-size: .76rem; color: #555; }
  .box, .goal-row { break-inside: avoid; }
  .box { box-shadow: none !important; border-color: #ddd !important; }
}

/* --- Calendario: drag & drop + vistas --- */
.cal-event { cursor: grab; }
.cal-event:active { cursor: grabbing; }
.cal-event.dragging { opacity: .4; }
.cal-cell.drop-hover { background: var(--accent-soft); box-shadow: inset 0 0 0 2px var(--accent); }
.calendar.is-week .cal-cell { display: none; }
.calendar.is-week .cal-cell.wk-show { display: block; min-height: 320px; }
.calendar.is-week .cal-cell.out.wk-show { opacity: 1; background: var(--bg); }

/* --- Toast (avisos efímeros) --- */
.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(20px); background: var(--ink); color: var(--bg); padding: 12px 20px; border-radius: var(--r-btn); font-size: .86rem; font-weight: 500; box-shadow: 0 10px 30px rgba(0,0,0,.25); opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; z-index: 200; display: flex; align-items: center; gap: 10px; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast .t-ico { color: var(--accent); font-weight: 800; }

/* --- Mensajes: barra de respuesta enriquecida --- */
.inbox-reply { flex-direction: column; align-items: stretch; }
.reply-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.reply-tools .spacer { flex: 1; }
.rt-btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--bg); color: var(--ink-soft); font: inherit; font-size: .8rem; font-weight: 600; padding: 7px 12px; border-radius: var(--r-btn); cursor: pointer; }
.rt-btn:hover { color: var(--ink); border-color: var(--ink-faint); }
.rt-btn.on { background: var(--accent-soft); color: var(--accent-700); border-color: transparent; }
.tpl-wrap { position: relative; }
.tpl-menu { position: absolute; bottom: calc(100% + 8px); left: 0; min-width: 250px; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 14px 40px rgba(0,0,0,.16); padding: 6px; display: none; z-index: 30; }
.tpl-menu.open { display: block; }
.tpl-menu button { display: block; width: 100%; text-align: left; border: none; background: none; font: inherit; font-size: .84rem; font-weight: 600; color: var(--ink); padding: 9px 12px; border-radius: 8px; cursor: pointer; }
.tpl-menu button:hover { background: var(--bg-2); }
.tpl-menu button small { display: block; font-weight: 400; color: var(--ink-faint); font-size: .74rem; margin-top: 2px; }
.attach-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.attach-chips:empty { display: none; }
.chip { display: inline-flex; align-items: center; gap: 8px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 999px; padding: 5px 6px 5px 12px; font-size: .78rem; color: var(--ink-soft); }
.chip .x { width: 18px; height: 18px; border-radius: 50%; border: none; background: var(--line); color: var(--ink); font-size: .8rem; line-height: 1; cursor: pointer; display: grid; place-items: center; }
.chip .x:hover { background: var(--accent); color: #fff; }
.reply-row { display: flex; gap: 10px; }
.reply-prio-tag { display: none; font-size: .76rem; font-weight: 700; color: var(--accent-700); align-items: center; gap: 6px; }
.reply-prio-tag.show { display: inline-flex; }

/* =====================================================================
   Mensajes — chat moderno (estética shadcn) + columna de contacto
   ===================================================================== */
.chat-layout { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; align-items: start; }
@media (max-width: 900px) { .chat-layout { grid-template-columns: 1fr; } }
.chat-card { display: flex; flex-direction: column; padding: 0; overflow: hidden; height: clamp(460px, 64vh, 700px); }
.chat-head { display: flex; align-items: center; gap: 12px; padding: 15px 20px; border-bottom: 1px solid var(--line); }
.chat-av { width: 40px; height: 40px; flex: 0 0 40px; border-radius: 12px; background: var(--ink); color: var(--bg); display: grid; place-items: center; font-weight: 800; font-family: var(--font-head); }
.chat-id { flex: 1; min-width: 0; line-height: 1.25; }
.chat-id strong { display: block; font-size: .92rem; }
.chat-id span { font-size: .76rem; color: var(--ink-faint); }
.chat-online { display: inline-flex; align-items: center; gap: 6px; font-size: .76rem; font-weight: 600; color: #1c9d63; white-space: nowrap; }
.chat-online i { width: 8px; height: 8px; border-radius: 50%; background: #1c9d63; box-shadow: 0 0 0 3px rgba(28,157,99,.18); }
.chat-scroll { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 12px; background: var(--bg-2); }
.chat-bubble { max-width: 80%; padding: 11px 14px; border-radius: 16px; font-size: .88rem; line-height: 1.5; }
.chat-bubble .cb-body { white-space: pre-line; word-wrap: break-word; }
.chat-bubble .cb-meta { font-size: .68rem; margin-top: 5px; opacity: .65; }
.chat-bubble.in { align-self: flex-start; background: var(--bg); border: 1px solid var(--line); border-bottom-left-radius: 5px; }
.chat-bubble.out { align-self: flex-end; background: var(--accent); color: #fff; border-bottom-right-radius: 5px; }
.chat-bubble.out .cb-meta { opacity: .8; }
.chat-empty { margin: auto; text-align: center; max-width: 340px; padding: 20px; }
.chat-empty .ce-ico { font-size: 2rem; color: var(--accent); margin-bottom: 10px; line-height: 1; }
.chat-empty h3 { margin: 0 0 6px; }
.chat-empty p { color: var(--ink-soft); font-size: .9rem; margin: 0; line-height: 1.5; }
.chat-compose { border-top: 1px solid var(--line); padding: 12px 16px 14px; background: var(--bg); }
.chat-compose .compose-toolbar { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.chat-compose .compose-toolbar .spacer { flex: 1; }
.compose-row { display: flex; align-items: center; gap: 8px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 999px; padding: 5px; transition: border-color .15s ease, box-shadow .15s ease; }
.compose-row:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.compose-row input[type="text"] { flex: 1; min-width: 0; border: none; background: none; font: inherit; font-size: .9rem; color: var(--ink); padding: 7px 6px; outline: none; }
.compose-add, .compose-send { width: 38px; height: 38px; flex: 0 0 38px; border-radius: 50%; cursor: pointer; display: grid; place-items: center; transition: background .15s ease, color .15s ease, border-color .15s ease; }
.compose-add { border: 1px solid var(--line); background: var(--bg); color: var(--ink-soft); font-size: 1.35rem; line-height: 1; }
.compose-add:hover { color: var(--ink); border-color: var(--ink-faint); }
.compose-send { border: none; background: var(--accent); color: #fff; }
.compose-send:hover { background: var(--accent-700); }
.compose-send svg { width: 18px; height: 18px; }
/* Tarjeta de contacto */
.contact-card { display: flex; flex-direction: column; gap: 14px; }
.contact-person { display: flex; align-items: center; gap: 12px; }
.contact-person .cp-av { width: 42px; height: 42px; flex: 0 0 42px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-700); display: grid; place-items: center; font-weight: 800; font-family: var(--font-head); }
.contact-person strong { display: block; font-size: .95rem; }
.contact-person span { font-size: .76rem; color: var(--ink-faint); }
.contact-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.contact-list li { display: flex; align-items: center; gap: 12px; padding: 9px 8px; border-radius: 10px; }
.contact-list li:hover { background: var(--bg-2); }
.contact-list .ci-ico { width: 34px; height: 34px; flex: 0 0 34px; border-radius: 9px; background: var(--bg-2); display: grid; place-items: center; color: var(--ink-soft); }
.contact-list li:hover .ci-ico { color: var(--accent); }
.contact-list .ci-ico i { font-size: 17px; }
.contact-list .ci-txt { line-height: 1.3; min-width: 0; }
.contact-list .ci-txt > span { display: block; font-size: .72rem; color: var(--ink-faint); }
.contact-list .ci-txt a, .contact-list .ci-txt strong { font-size: .86rem; color: var(--ink); font-weight: 600; text-decoration: none; word-break: break-word; }
.contact-list .ci-txt a:hover { color: var(--accent); }
/* Columna derecha: contacto + tarjetas de equipo apiladas */
.contact-col { display: flex; flex-direction: column; gap: 16px; }
.contact-person .cp-logo { height: 26px; width: auto; display: block; }
/* Tarjetas de equipo (firma Grafs, formato tarjeta compacto) */
.team-card { padding: 18px 20px; border-left: 3px solid var(--accent); }
.team-card .tc-logo { height: 20px; width: auto; display: block; margin-bottom: 12px; opacity: .92; }
.team-card .tc-name { display: block; font-family: var(--font-head); font-size: 1.02rem; font-weight: 800; color: var(--ink); line-height: 1.2; }
.team-card .tc-role { display: block; font-size: .8rem; color: var(--ink-faint); margin-top: 1px; }
.team-card .tc-spec { display: block; font-size: .68rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: var(--accent-700); line-height: 1.4; margin: 10px 0 12px; }
.team-card .tc-contact { display: flex; flex-direction: column; gap: 5px; }
.team-card .tc-contact a { font-size: .84rem; color: var(--ink-soft); text-decoration: none; font-weight: 500; width: fit-content; }
.team-card .tc-contact a:hover { color: var(--accent); }
.team-card .tc-contact a.tc-li { color: var(--accent-700); font-weight: 700; }

/* --- "Próximamente": badge en títulos + estado de sección en construcción --- */
.soon-badge { display: inline-flex; align-items: center; vertical-align: middle; margin-left: 12px; font-family: var(--font-body, inherit); font-size: .62em; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--accent-700); background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); padding: 4px 10px; border-radius: 999px; }
.soon-badge.soon-sm { font-size: .46em; padding: 3px 9px; margin-left: 10px; letter-spacing: .05em; }
.soon-state { margin-top: 8px; }
.soon-state .es-ico { font-size: 1.9rem; color: var(--accent); }
.net-soon-note { margin: 16px 2px 0; font-size: .86rem; color: var(--ink-faint); }
.net-sample { max-width: 340px; }

/* =====================================================================
   PARTE 4B — Club (gamificación) & Referidos (compartir + niveles)
   ===================================================================== */

/* --- Club: misiones --- */
.mission-list { display: flex; flex-direction: column; gap: 14px; }
.mission { display: flex; align-items: center; gap: 14px; }
.mission .m-ico { width: 38px; height: 38px; flex: 0 0 38px; border-radius: 12px; background: var(--bg-2); display: grid; place-items: center; font-size: 1.1rem; }
.mission .m-body { flex: 1; min-width: 0; }
.mission .m-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 7px; }
.mission .m-name { font-weight: 600; font-size: .9rem; }
.mission .m-rw { font-size: .8rem; font-weight: 700; color: var(--accent-700); white-space: nowrap; }
.mission .m-meta { font-size: .78rem; color: var(--ink-faint); margin-top: 6px; }
.mission .claim-btn { flex: 0 0 auto; }
.mission.is-claimed { opacity: .55; }

/* --- Club: canje de puntos --- */
.reward-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.reward { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px; display: flex; flex-direction: column; gap: 6px; background: var(--bg); }
.reward .r-ico { font-size: 1.5rem; }
.reward h4 { margin: 4px 0 0; font-family: var(--font-head); font-size: .98rem; }
.reward p { margin: 0; font-size: .82rem; color: var(--ink-soft); line-height: 1.45; flex: 1; }
.reward .r-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; }
.reward .r-cost { font-family: var(--font-head); font-weight: 800; font-size: 1.05rem; }
.reward.locked { opacity: .6; }
.reward.locked .r-cost { color: var(--ink-faint); }

/* --- Club: historial de puntos --- */
.pt-amt { font-family: var(--font-head); font-weight: 800; text-align: right; white-space: nowrap; }
.pt-amt.plus { color: #1c9d63; }
.pt-amt.minus { color: var(--ink-faint); }

/* --- Referidos: compartir en 1 clic --- */
.copy-field { display: flex; gap: 8px; margin-bottom: 14px; }
.copy-field input { flex: 1; min-width: 0; font: inherit; font-size: .86rem; padding: 9px 12px; border-radius: var(--r-btn); border: 1px solid var(--line); background: var(--bg-2); color: var(--ink-soft); }
.share-tools { display: flex; gap: 8px; flex-wrap: wrap; }
.share-btn { display: inline-flex; align-items: center; gap: 7px; font: inherit; font-size: .82rem; font-weight: 600; padding: 8px 14px; border-radius: var(--r-btn); text-decoration: none; color: #fff; cursor: pointer; border: none; }
.share-btn::before { font-size: .95rem; line-height: 1; }
.share-btn.wa { background: #25d366; }
.share-btn.wa::before { content: "\1F4AC"; }
.share-btn.li { background: #0a66c2; }
.share-btn.li::before { content: "in"; font-weight: 800; font-style: normal; }
.share-btn.mail { background: var(--ink); }
.share-btn.mail::before { content: "\2709"; }
.share-btn:hover { filter: brightness(1.07); }

/* --- Referidos: niveles + invitar --- */
.lvl-perks { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.lvl-perks li { font-size: .84rem; color: var(--ink-soft); display: flex; gap: 10px; align-items: baseline; line-height: 1.45; }
.lvl-perks .lp-now, .lvl-perks .lp-next { flex: 0 0 auto; font-size: .72rem; font-weight: 700; padding: 2px 9px; border-radius: 999px; }
.lvl-perks .lp-now { background: var(--bg-2); color: var(--ink-soft); }
.lvl-perks .lp-next { background: var(--accent-soft); color: var(--accent-700); }
.invite-form { display: none; gap: 8px; padding: 14px 20px 4px; flex-wrap: wrap; }
.invite-form.open { display: flex; }
.invite-form input { flex: 1; min-width: 160px; font: inherit; font-size: .86rem; padding: 9px 12px; border-radius: var(--r-btn); border: 1px solid var(--line); background: var(--bg); color: var(--ink); }

/* =====================================================================
   PARTE 4B-2 — Networking (filtros + ficha), Formación (progreso +
   certificados), Ofertas (upsell contextual)
   ===================================================================== */

/* --- Networking: filtros sector/zona + ficha desplegable --- */
.net-count { font-size: .82rem; color: var(--ink-faint); }
.tile-more { display: none; flex-direction: column; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); }
.tile-more.open { display: flex; }
.tile-more .tm-row { display: flex; justify-content: space-between; gap: 12px; font-size: .82rem; align-items: baseline; }
.tile-more .tm-row > span { color: var(--ink-faint); flex: 0 0 auto; }
.tile-more .tm-row b { font-weight: 600; text-align: right; }
.tile-more .tm-row a { text-align: right; }

/* --- Formación: progreso por curso + certificados --- */
.train-summary .ts-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.train-summary .ts-meta { display: flex; justify-content: space-between; font-size: .8rem; color: var(--ink-faint); margin-top: 8px; }
.course-prog { margin-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.course-prog .cp-lbl { font-size: .76rem; font-weight: 600; color: var(--ink-faint); }
.course-prog .cp-lbl.done { color: #1c9d63; }
.course-cover.is-done .play { background: #1c9d63; color: #fff; }
.course-cover.is-done::before { content: "✓ Completado"; position: absolute; top: 10px; left: 10px; background: #1c9d63; color: #fff; font-size: .7rem; font-weight: 700; padding: 2px 8px; border-radius: 6px; z-index: 1; }

/* --- Ofertas: upsell contextual --- */
.offer-context { display: flex; align-items: center; gap: 16px; padding: 16px 20px; border: 1px solid var(--accent); background: var(--accent-soft); border-radius: var(--r-lg); margin-bottom: 20px; }
html[data-theme="dark"] .offer-context { background: rgba(247,86,43,.12); }
.offer-context .oc-ico { font-size: 1.5rem; flex: 0 0 auto; }
.offer-context .oc-text { flex: 1; min-width: 0; }
.offer-context .oc-text strong { display: block; font-family: var(--font-head); font-size: 1rem; }
.offer-context .oc-text p { margin: 4px 0 0; font-size: .86rem; color: var(--ink-soft); line-height: 1.5; }
.offer-context .btn { flex: 0 0 auto; }
.offer .offer-why { display: flex; gap: 8px; font-size: .8rem; color: var(--ink-soft); line-height: 1.45; padding: 10px 12px; background: var(--bg-2); border-radius: 10px; margin: 2px 0; }
.offer .offer-why::before { content: "💡"; flex: 0 0 auto; }
.offer.flash { animation: offerFlash 1.2s ease; }
@keyframes offerFlash { 30% { box-shadow: 0 0 0 4px var(--accent-soft); } }
@media (max-width: 600px) { .offer-context { flex-direction: column; align-items: flex-start; } .offer-context .btn { width: 100%; } }

/* =====================================================================
   SLICE 6 — Validar sin fricción: modo "tarjetas" (una a una, tipo Tinder)
   vs modo "lista" (vista actual con selección en bloque).
   ===================================================================== */
.val-toolbar { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.val-mode { flex: 0 0 auto; }
.val-deck-nav { display: flex; align-items: center; gap: 14px; flex: 1; min-width: 220px; }
.val-deck-nav .dn-prog { font-weight: 700; font-size: .9rem; white-space: nowrap; }
.val-deck-nav .dn-bar { flex: 1; height: 8px; background: var(--bg-2); border-radius: 999px; overflow: hidden; }
.val-deck-nav .dn-fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--xtra-coral)); border-radius: 999px; transition: width .35s cubic-bezier(.2,.7,.2,1); }
.val-deck-nav .dn-skip { white-space: nowrap; font-size: .84rem; }

/* Por defecto (sin JS) se ve como lista: la barra de deck oculta. */
.val-deck-nav { display: none; }
.panel.mode-deck .val-deck-nav { display: flex; }
.panel.mode-deck .bulk-bar { display: none; }

/* Modo tarjetas: una sola pieza centrada y grande; el resto ocultas. */
.panel.mode-deck .grid.g-2 { display: block; max-width: 560px; margin: 0 auto; }
.panel.mode-deck .content-card { display: none; }
.panel.mode-deck .content-card.is-current { display: flex; animation: deckIn .32s cubic-bezier(.2,.7,.2,1); }
.panel.mode-deck .content-card .val-check { display: none; }      /* el seleccionar no aplica a una sola */
.panel.mode-deck .empty-state { display: block; }
@keyframes deckIn { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: none; } }
.deck-done { text-align: center; padding: 48px 24px; }
.deck-done .dd-emoji { font-size: 2.4rem; }
.deck-done h3 { font-family: var(--font-serif); margin: 10px 0 4px; }
.deck-done p { color: var(--ink-soft); font-size: .9rem; margin: 0; }

/* =====================================================================
   SLICE 7 — Publicaciones + Calendario unificados (estilo Notion):
   conmutador Lista | Calendario, calendario real desde BD, eventos
   clicables y arrastrables (reprogramar persistente).
   ===================================================================== */
.pub-toolbar { margin-bottom: 18px; }
.pubview { display: none; }
.pubview.is-active { display: block; animation: pvIn .26s cubic-bezier(.2,.7,.2,1); }
@keyframes pvIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }

/* Barra del calendario (navegación de mes + leyenda) */
.cal-toolbar { margin-bottom: 14px; }
.cal-range { font-weight: 700; min-width: 132px; text-align: center; }
.cal-legend { display: inline-flex; align-items: center; gap: 7px; font-size: .74rem; color: var(--ink-faint); flex-wrap: wrap; }
.cal-legend .lg { width: 11px; height: 11px; border-radius: 3px; display: inline-block; flex: 0 0 auto; }
.cal-legend .lg.li { background: #0a66c2; }
.cal-legend .lg.blog { background: var(--accent); }
.cal-legend .lg.pend { background: var(--bg-2); border: 1px dashed var(--ink-faint); }

/* Día de hoy resaltado */
.cal-cell.is-today { background: var(--accent-soft); }
html[data-theme="dark"] .cal-cell.is-today { background: rgba(247,86,43,.12); }
.cal-cell.is-today .d { color: var(--accent-700); font-weight: 800; }

/* Eventos: prefijo de canal + estado pendiente (punteado) + publicado (atenuado) */
.cal-event { transition: box-shadow .15s, transform .15s; }
.cal-event:hover { transform: translateY(-1px); }
.cal-event .ce-ch { font-weight: 700; opacity: .85; }
.cal-event.is-pending { background: var(--bg-2); color: var(--ink-soft); border-left-style: dashed; border-left-color: var(--ink-faint); }
html[data-theme="dark"] .cal-event.is-pending { background: var(--bg-2); }
.cal-event.s-published { opacity: .68; }

/* Pulso al abrir una pieza desde la otra vista/panel (lista ⇄ calendario ⇄ validar) */
@keyframes rowHot { 0% { background: var(--accent-soft); } 100% { background: transparent; } }
.table tbody tr.is-hot td { animation: rowHot 1.7s ease; }
@keyframes hotPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(247,86,43,0); } 30% { box-shadow: 0 0 0 3px var(--accent); } }
.content-card.is-hot, .cal-event.is-hot { animation: hotPulse 1.7s ease; }

/* La fila de la tabla "Ver/Validar" indica que es clicable */
.table tbody tr[data-row-id] { cursor: default; }
.table .link[data-open] { cursor: pointer; }

/* =====================================================================
   SLICE 8 — Temáticas (chips + filtro), Fuentes/menciones, y Material
   (adjuntos del cliente + modal "pedir publicación"). La paleta de cada
   temática se expone como variables (--tc-*) para que chip, píldora de
   filtro y selector del modal la reutilicen sin recolorear todo.
   ===================================================================== */

/* Paleta por temática (solo define variables) */
.tp-orange { --tc-bg:#fde7df; --tc-fg:#c2410c; --tc-dot:#ea6a36; }
.tp-blue   { --tc-bg:#e8f0fb; --tc-fg:#0a66c2; --tc-dot:#0a66c2; }
.tp-green  { --tc-bg:#e3f6ec; --tc-fg:#1c9d63; --tc-dot:#1c9d63; }
.tp-violet { --tc-bg:#ecebfb; --tc-fg:#5048c8; --tc-dot:#5048c8; }
.tp-pink   { --tc-bg:#fce7f0; --tc-fg:#c0367a; --tc-dot:#d8559a; }
.tp-teal   { --tc-bg:#def5f3; --tc-fg:#0f8a82; --tc-dot:#10a99f; }
.tp-slate  { --tc-bg:#e9edf2; --tc-fg:#475569; --tc-dot:#7c8aa0; }
html[data-theme="dark"] .tp-orange { --tc-bg:rgba(194,65,12,.22); --tc-fg:#f0a576; }
html[data-theme="dark"] .tp-blue   { --tc-bg:rgba(10,102,194,.22); --tc-fg:#6ea8e6; }
html[data-theme="dark"] .tp-green  { --tc-bg:rgba(28,157,99,.22);  --tc-fg:#5fcf97; }
html[data-theme="dark"] .tp-violet { --tc-bg:rgba(80,72,200,.26);  --tc-fg:#a9a3f0; }
html[data-theme="dark"] .tp-pink   { --tc-bg:rgba(192,54,122,.24); --tc-fg:#ed8cba; }
html[data-theme="dark"] .tp-teal   { --tc-bg:rgba(15,138,130,.24); --tc-fg:#56cabf; }
html[data-theme="dark"] .tp-slate  { --tc-bg:rgba(124,138,160,.24);--tc-fg:#aab6c6; }

/* Chip de temática */
.tchip {
  display: inline-flex; align-items: center; gap: 5px; vertical-align: middle;
  font-size: .68rem; font-weight: 700; letter-spacing: .01em; white-space: nowrap;
  padding: 3px 9px 3px 8px; border-radius: 999px;
  background: var(--tc-bg, var(--bg-2)); color: var(--tc-fg, var(--ink-soft));
}
.tchip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--tc-dot, currentColor); flex: 0 0 7px; }

/* Filtro por temática (barra de píldoras sobre la lista) */
.topic-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 16px; }
.tfilter-pill {
  display: inline-flex; align-items: center; gap: 7px; font: inherit; font-size: .8rem; font-weight: 600;
  color: var(--ink-soft); background: var(--bg); border: 1px solid var(--line); border-radius: 999px;
  padding: 6px 13px; cursor: pointer; transition: border-color .15s, background .15s, color .15s;
}
.tfilter-pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--tc-dot, #cbd5e1); flex: 0 0 8px; }
.tfilter-pill[data-topic="all"]::before { display: none; }
.tfilter-pill:hover { border-color: var(--ink-faint); color: var(--ink); }
.tfilter-pill.is-active { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.tfilter-pill .tf-n { font-size: .72rem; font-weight: 700; opacity: .65; }
.tf-add { font: inherit; font-size: .8rem; font-weight: 600; color: var(--accent-700); background: none; border: 1px dashed var(--line); border-radius: 999px; padding: 6px 13px; cursor: pointer; }
.tf-add:hover { border-color: var(--accent); }
.tf-add.editing { border-style: solid; }

/* Contador en la pestaña Material */
.useg-n { font-size: .66rem; font-weight: 700; background: var(--accent); color: #fff; border-radius: 999px; padding: 0 5px; margin-left: 3px; }

/* Fuentes / menciones en la tarjeta de contenido */
.cc-sources { display: flex; align-items: flex-start; gap: 10px; flex-wrap: wrap; padding-top: 12px; border-top: 1px dashed var(--line); }
.cc-sources .cs-label { font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-faint); padding-top: 6px; flex: 0 0 auto; }
.cc-sources .cs-list { display: flex; flex-wrap: wrap; gap: 7px; min-width: 0; }
.src-chip { display: inline-flex; align-items: center; gap: 6px; max-width: 260px; font-size: .74rem; font-weight: 600; color: var(--ink-soft); background: var(--bg-2); border: 1px solid var(--line); border-radius: 8px; padding: 4px 9px; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.src-chip .si { flex: 0 0 auto; }
a.src-chip:hover { border-color: var(--accent); color: var(--accent-700); }

/* Banner "creado a partir de tu material" */
.cc-basis { display: flex; align-items: center; gap: 8px; background: var(--accent-soft); border-radius: 10px; padding: 8px 12px; font-size: .8rem; color: var(--accent-700); }
html[data-theme="dark"] .cc-basis { background: rgba(247,86,43,.12); }
.cc-basis .cb-ico { flex: 0 0 auto; }
.cc-basis .cb-txt b { font-weight: 700; }

/* Material (dentro de Ideas · Slice 16b) */
.ideas-sub-head { margin: 36px 0 14px; padding-top: 28px; border-top: 1px solid var(--line); }
.ideas-sub-title { display: flex; align-items: center; gap: 10px; margin: 0; font-family: var(--font-serif); font-size: 1.25rem; }
.ideas-sub-title .useg-n { font-family: var(--font-sans); }
.mat-hero { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; background: var(--ink); color: var(--bg); border-radius: var(--r-lg); padding: 22px 26px; margin-bottom: 20px; }
.mat-hero-txt { flex: 1; min-width: 240px; }
.mat-hero h3 { margin: 0 0 4px; font-family: var(--font-serif); font-size: 1.3rem; }
.mat-hero p { margin: 0; color: rgba(255,255,255,.72); font-size: .88rem; line-height: 1.5; max-width: 560px; }
.mat-hero .btn { flex: 0 0 auto; }
.material-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.mat-card { display: flex; flex-direction: column; gap: 12px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--bg); padding: 18px; }
.mat-file { display: flex; align-items: center; gap: 12px; }
.mat-file .mf-ico { font-size: 1.6rem; flex: 0 0 auto; }
.mat-file .mf-id { flex: 1; min-width: 0; }
.mat-file .mf-id b { display: block; font-size: .9rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mat-file .mf-meta { font-size: .74rem; color: var(--ink-faint); }
.apill { flex: 0 0 auto; font-size: .72rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.apill.as-req  { background: #fff4e0; color: #b5780c; }
.apill.as-prog { background: #ecebfb; color: #5048c8; }
.apill.as-done { background: #e4f6ec; color: #1c9d63; }
html[data-theme="dark"] .apill.as-req  { background: rgba(181,120,12,.18); }
html[data-theme="dark"] .apill.as-prog { background: rgba(80,72,200,.22); color: #a9a3f0; }
html[data-theme="dark"] .apill.as-done { background: rgba(28,157,99,.2); }
.mat-note { margin: 0; font-size: .84rem; color: var(--ink-soft); line-height: 1.5; background: var(--bg-2); border-radius: 10px; padding: 10px 12px; }
.mat-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; }
.mat-foot .mf-await { font-size: .78rem; color: var(--ink-faint); }
.mat-foot .mf-demo { font-size: .72rem; color: var(--ink-faint); border: 1px dashed var(--line); border-radius: 6px; padding: 2px 7px; }
.mat-foot .mat-open { font-weight: 600; cursor: pointer; }

/* Modal "pedir publicación" */
.modal { position: fixed; inset: 0; background: rgba(10,10,12,.5); z-index: 210; display: none; align-items: flex-start; justify-content: center; padding: 6vh 16px; overflow-y: auto; }
.modal.open { display: flex; }
.modal-box { width: 100%; max-width: 560px; background: var(--bg); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 30px 80px -20px rgba(0,0,0,.5); overflow: hidden; animation: pvIn .22s cubic-bezier(.2,.7,.2,1); }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; padding: 20px 22px 0; }
.modal-eyebrow { color: var(--accent); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: .7rem; }
.modal-head h3 { margin: 2px 0 0; font-family: var(--font-serif); font-size: 1.35rem; }
.modal-x { background: var(--bg-2); border: none; color: var(--ink); width: 32px; height: 32px; border-radius: 9px; font-size: 1.1rem; line-height: 1; cursor: pointer; flex: 0 0 auto; }
.modal-x:hover { background: var(--line); }
.modal-body { padding: 14px 22px 4px; }
.modal-intro { margin: 0 0 16px; font-size: .86rem; color: var(--ink-soft); line-height: 1.5; }
.modal-label { display: block; font-size: .78rem; font-weight: 700; color: var(--ink-soft); margin-bottom: 8px; }
.topic-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.topic-pick .pk { display: inline-flex; align-items: center; gap: 6px; font: inherit; font-size: .8rem; font-weight: 600; color: var(--ink-soft); background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; cursor: pointer; }
.topic-pick .pk::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--tc-dot, #cbd5e1); flex: 0 0 8px; }
.topic-pick .pk:hover { border-color: var(--ink-faint); }
.topic-pick .pk.is-active { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.topic-add-row { display: flex; gap: 8px; margin-top: 10px; }
.topic-add-row input { flex: 1; min-width: 0; font: inherit; font-size: .86rem; padding: 9px 12px; border-radius: var(--r-btn); border: 1px solid var(--line); background: var(--bg); color: var(--ink); }
.topic-add-row input:focus { outline: none; border-color: var(--accent); }
.modal-body textarea { width: 100%; min-height: 90px; resize: vertical; font: inherit; font-size: .9rem; line-height: 1.5; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); }
.modal-body textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.file-drop { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; padding: 22px; border: 1.5px dashed var(--line); border-radius: 14px; background: var(--bg-2); cursor: pointer; transition: border-color .15s, background .15s; }
.file-drop:hover, .file-drop.drag { border-color: var(--accent); background: var(--accent-soft); }
.file-drop .fd-ico { font-size: 1.4rem; }
.file-drop .fd-txt { font-size: .86rem; color: var(--ink-soft); }
.file-drop .fd-hint { font-size: .74rem; color: var(--ink-faint); }
.fd-chosen { margin-top: 10px; }
.fd-chosen:empty { display: none; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 22px 22px; }
@media (max-width: 560px) { .modal-foot { flex-direction: column-reverse; } .modal-foot .btn { width: 100%; } }

/* =====================================================================
   SLICE 9 — Bandeja de Ideas clasificada por persona. Tarjetas tipo
   galería con avatar de la persona (reusa la paleta .tp-* como variables),
   badge de la fuente (LinkedIn/correo/web/nota), pill de estado clicable
   y filtro por persona (reusa .topic-filter). Modal "capturar idea".
   ===================================================================== */

/* Barra superior: filtro de personas + CTA */
.ideas-bar { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.ideas-bar .idea-filter { flex: 1 1 auto; margin-bottom: 0; }
.ideas-bar .btn { flex: 0 0 auto; }
.tfilter-pill[data-person="all"]::before { display: none; }

/* Rejilla y tarjeta de idea */
.idea-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.idea-card { display: flex; flex-direction: column; gap: 11px; background: var(--bg); border: 1px solid var(--line); border-left: 4px solid var(--tc-dot, var(--accent)); border-radius: 16px; padding: 17px 18px; box-shadow: 0 1px 2px rgba(25,26,30,.04); transition: box-shadow .18s ease, transform .18s ease, border-color .18s ease; }
.idea-card:hover { box-shadow: 0 14px 34px -16px rgba(25,26,30,.28); transform: translateY(-3px); }

.ic-top { display: flex; align-items: center; gap: 8px; }
.ic-src { display: inline-flex; align-items: center; gap: 6px; margin-right: auto; font-size: .72rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--bg-2); color: var(--ink-soft); }
.ic-src .sb-ico { display: inline-flex; align-items: center; justify-content: center; min-width: 16px; height: 16px; font-size: .82rem; line-height: 1; }
.sb-linkedin { background: #e8f0fb; color: #0a66c2; }
.sb-linkedin .sb-ico { width: 16px; border-radius: 4px; background: #0a66c2; color: #fff; font-size: .58rem; font-weight: 800; font-style: normal; text-transform: lowercase; }
.sb-email { background: #fff4e0; color: #b5780c; }
.sb-web   { background: #def5f3; color: #0f8a82; }
.sb-note  { background: #e9edf2; color: #475569; }
html[data-theme="dark"] .sb-linkedin { background: rgba(10,102,194,.2); color: #6ea8e6; }
html[data-theme="dark"] .sb-email { background: rgba(181,120,12,.18); color: #e0b873; }
html[data-theme="dark"] .sb-web   { background: rgba(15,138,130,.2); color: #56cabf; }
html[data-theme="dark"] .sb-note  { background: rgba(124,138,160,.22); color: #aab6c6; }

.ic-by { font-size: .64rem; font-weight: 700; color: var(--accent-700); background: var(--accent-soft); border-radius: 999px; padding: 2px 8px; white-space: nowrap; }
html[data-theme="dark"] .ic-by { background: rgba(247,86,43,.14); }

/* Pill de estado (botón clicable que cicla el estado) */
.istatus { font: inherit; font-size: .7rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; border: none; cursor: pointer; white-space: nowrap; transition: filter .15s; }
.istatus:hover { filter: brightness(.96); }
.istatus.is-new       { background: #fff4e0; color: #b5780c; }
.istatus.is-exploring { background: #ecebfb; color: #5048c8; }
.istatus.is-planned   { background: #e8f0fb; color: #0a66c2; }
.istatus.is-done      { background: #e4f6ec; color: #1c9d63; }
html[data-theme="dark"] .istatus.is-new       { background: rgba(181,120,12,.2); color: #e0b873; }
html[data-theme="dark"] .istatus.is-exploring { background: rgba(80,72,200,.24); color: #a9a3f0; }
html[data-theme="dark"] .istatus.is-planned   { background: rgba(10,102,194,.22); color: #6ea8e6; }
html[data-theme="dark"] .istatus.is-done      { background: rgba(28,157,99,.2); color: #5fcf97; }

.ic-title { display: block; font-family: var(--font-serif); font-size: 1.02rem; font-weight: 600; line-height: 1.32; color: var(--ink); text-decoration: none; }
a.ic-title:hover { color: var(--accent-700); }
.ic-title .ic-ext { font-size: .8rem; color: var(--ink-faint); }
.ic-note { margin: 0; font-size: .84rem; line-height: 1.5; color: var(--ink-soft); }
.ic-topic { margin-top: -1px; }

.ic-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 12px; border-top: 1px dashed var(--line); }
.ic-convert { font-weight: 600; font-size: .8rem; cursor: pointer; flex: 0 0 auto; white-space: nowrap; }

/* Persona (avatar + nombre + cargo) */
.person { display: inline-flex; align-items: center; gap: 9px; min-width: 0; }
.person-av { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; font-size: .72rem; font-weight: 800; letter-spacing: .02em; background: var(--tc-bg, var(--bg-2)); color: var(--tc-fg, var(--ink-soft)); flex: 0 0 32px; }
.person-meta { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.person-meta b { font-size: .82rem; font-weight: 700; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person-meta span { font-size: .7rem; color: var(--ink-faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person-none .person-av { background: var(--bg-2); color: var(--ink-faint); }

/* Vacío al filtrar */
.idea-empty { padding: 28px; text-align: center; color: var(--ink-faint); font-size: .9rem; }
.idea-grid .empty-state .es-ico { font-size: 1.9rem; display: block; margin-bottom: 6px; }

/* Modal "capturar idea": inputs sueltos, segmentado de fuente, picker de personas */
.modal-input { width: 100%; font: inherit; font-size: .9rem; padding: 10px 13px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); }
.modal-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.modal-label .lbl-opt { font-weight: 400; color: var(--ink-faint); }

/* ===== Reservar reunión · calendario tipo shadcn (Slice 19) ===== */
.book-box { max-width: 680px; }
.book-body { display: flex; gap: 0; padding: 10px 22px 4px; }
.book-body .cal { flex: 1 1 auto; min-width: 0; padding: 4px 18px 8px 0; }
.book-body .slots { flex: 0 0 152px; border-left: 1px solid var(--line); padding: 4px 0 8px 16px; }
@media (max-width: 620px) {
  .book-body { flex-direction: column; }
  .book-body .slots { flex: none; border-left: 0; border-top: 1px solid var(--line); padding: 14px 0 0; margin-top: 4px; }
}
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.cal-title { font-weight: 600; font-size: .95rem; text-transform: capitalize; }
.cal-nav { width: 32px; height: 32px; border-radius: 9px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); cursor: pointer; font-size: 1.2rem; line-height: 1; display: flex; align-items: center; justify-content: center; transition: background .15s ease, border-color .15s ease; }
.cal-nav:hover { background: var(--bg-2); border-color: var(--accent); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.cal-dow span { text-align: center; font-size: .72rem; font-weight: 600; color: var(--ink-faint); padding: 4px 0; }
.cal-day { aspect-ratio: 1 / 1; border: 0; background: transparent; color: var(--ink); border-radius: 9px; font: inherit; font-size: .85rem; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background .12s ease, color .12s ease; }
.cal-day:hover:not(:disabled):not(.is-sel) { background: var(--accent-soft); }
.cal-day.is-today { box-shadow: inset 0 0 0 1px var(--accent); font-weight: 700; }
.cal-day.is-sel { background: var(--accent); color: #fff; font-weight: 700; }
.cal-day:disabled { color: var(--ink-faint); opacity: .35; cursor: default; }
.cal-day.is-empty { visibility: hidden; }
.slots-title { font-size: .74rem; font-weight: 600; color: var(--ink-faint); text-transform: capitalize; margin-bottom: 8px; }
.slots-list { display: flex; flex-direction: column; gap: 6px; max-height: 296px; overflow-y: auto; padding-right: 4px; }
@media (max-width: 620px) { .slots-list { flex-direction: row; flex-wrap: wrap; max-height: none; } .slots-list .slot { flex: 1 0 28%; } }
.slot { padding: 9px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); font: inherit; font-size: .85rem; font-weight: 600; cursor: pointer; text-align: center; transition: background .12s ease, border-color .12s ease, color .12s ease; }
.slot:hover { border-color: var(--accent); }
.slot.is-sel { background: var(--accent); color: #fff; border-color: var(--accent); }
.slots-empty { font-size: .82rem; color: var(--ink-faint); line-height: 1.5; padding: 10px 0; }
.book-agenda { padding: 4px 22px 2px; }
.book-agenda label { display: block; font-size: .82rem; font-weight: 600; margin-bottom: 6px; color: var(--ink-soft); }
.book-agenda .lbl-opt { font-weight: 400; color: var(--ink-faint); }
.book-agenda textarea { width: 100%; min-height: 60px; resize: vertical; font: inherit; font-size: .9rem; line-height: 1.5; padding: 10px 13px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); }
.book-agenda textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.book-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 22px 22px; margin-top: 10px; border-top: 1px solid var(--line); }
.book-sum { font-size: .86rem; color: var(--ink-soft); min-width: 0; }
.book-sum b { color: var(--ink); }
.book-acts { display: flex; gap: 10px; flex: 0 0 auto; }
@media (max-width: 620px) { .book-foot { flex-direction: column; align-items: stretch; } .book-acts { justify-content: flex-end; } .book-acts .btn { flex: 1; } }
.idea-src { display: flex; }
.idea-src button { flex: 1; text-align: center; }
.people-pick .pk { padding-left: 5px; }
.people-pick .pk::before { display: none; }
.pk-av { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 50%; font-size: .6rem; font-weight: 800; background: var(--tc-bg, var(--bg-2)); color: var(--tc-fg, var(--ink-soft)); flex: 0 0 20px; }
.people-pick .pk.is-active .pk-av { background: rgba(255,255,255,.25); color: #fff; }

/* =====================================================================
   SLICE 10 — Reuniones (indicador + panel) + Referidos enriquecidos.
   ===================================================================== */

/* --- Indicador de próxima reunión en la topbar --- */
.topbar-meet { display: inline-flex; align-items: center; gap: 10px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px 6px 11px; cursor: pointer; color: var(--ink); font: inherit; transition: border-color .2s, background .2s; }
.topbar-meet:hover { border-color: var(--accent); background: var(--accent-soft); }
.topbar-meet svg { width: 18px; height: 18px; color: var(--accent); flex: 0 0 auto; }
.tm-txt { display: flex; flex-direction: column; line-height: 1.12; text-align: left; }
.tm-lbl { font-size: .62rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-faint); font-weight: 700; }
.tm-txt b { font-size: .82rem; font-weight: 700; color: var(--ink); }
.topbar-meet.is-empty svg { color: var(--ink-faint); }
.topbar-meet.is-empty:hover svg { color: var(--accent); }
@media (max-width: 880px) { .topbar-meet .tm-txt { display: none; } .topbar-meet { padding: 8px; } }
/* Botón "Reservar una reunión" en naranja (Slice 19) */
.topbar-meet.topbar-book { background: var(--accent); border-color: var(--accent); color: #fff; padding: 8px 16px; }
.topbar-meet.topbar-book svg, .topbar-meet.topbar-book b { color: #fff; }
.topbar-meet.topbar-book:hover { background: var(--accent-700); border-color: var(--accent-700); }
.topbar-meet.topbar-book .tm-txt b { font-size: .84rem; }

/* ===== Programa de referidos (afiliados) ===== */
.ref-bonus-card { background: linear-gradient(180deg, var(--accent-soft) -40%, var(--bg) 45%); }
.ref-left { display: flex; flex-direction: column; gap: 20px; }
.ref-wallet { display: flex; flex-direction: column; gap: 6px; background: var(--ink); color: var(--bg); }
.ref-wallet .rw-label { font-size: .76rem; text-transform: uppercase; letter-spacing: .05em; opacity: .7; font-weight: 700; }
.ref-wallet .rw-amount { font-family: var(--font-head); font-size: 2.4rem; line-height: 1; font-weight: 800; }
.ref-wallet .rw-sub { font-size: .82rem; opacity: .78; line-height: 1.45; }
.ref-levels { margin-top: 6px; }
.rl-track { height: 10px; background: var(--bg-2); border-radius: 999px; overflow: hidden; }
.rl-fill { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--xtra-coral, var(--accent-700))); border-radius: 999px; transition: width .4s cubic-bezier(.2,.7,.2,1); }
.rl-marks { display: flex; justify-content: space-between; margin-top: 8px; font-size: .74rem; font-weight: 700; color: var(--ink-faint); }
.rl-marks .on { color: var(--accent-700); }
.prog-table thead th { background: var(--bg-2); font-size: .74rem; }
.prog-table td { font-size: .9rem; }
.prog-table td b { font-family: var(--font-head); color: var(--ink); }
.prog-table tbody tr:hover { background: var(--accent-soft); }
.ref-terms { font-size: .76rem; color: var(--ink-faint); line-height: 1.5; margin: 16px 2px 0; }

/* --- Hero: próxima reunión --- */
.meet-hero { display: flex; gap: 22px; align-items: stretch; background: linear-gradient(135deg, var(--accent) 0%, var(--accent-700) 100%); color: #fff; border-radius: 18px; padding: 22px; margin-bottom: 8px; box-shadow: 0 14px 36px rgba(247,86,43,.22); }
.meet-hero .mh-when { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 138px; padding: 16px; background: rgba(255,255,255,.16); border-radius: 14px; text-align: center; }
.mh-rel { font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; opacity: .92; }
.mh-date { font-family: var(--font-head); font-size: 1.02rem; font-weight: 700; margin-top: 5px; line-height: 1.25; }
.mh-info { flex: 1; display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.mh-eyebrow { font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; opacity: .88; font-weight: 800; }
.mh-info h3 { font-family: var(--font-head); font-size: 1.5rem; margin: 5px 0 6px; color: #fff; }
.mh-meta { font-size: .9rem; opacity: .94; margin: 0; }
.mh-agenda { font-size: .88rem; opacity: .9; margin: 8px 0 0; line-height: 1.5; }
.mh-acts { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.meet-hero .btn-accent { background: #fff; color: var(--accent-700); }
.meet-hero .btn-accent:hover { filter: brightness(.95); }
.meet-hero .btn-soft { background: rgba(255,255,255,.18); color: #fff; border: 1px solid transparent; }
.meet-hero .btn-soft:hover { background: rgba(255,255,255,.3); }
.meet-hero.is-pending { background: linear-gradient(135deg, #6366f1, #4f46e5); box-shadow: 0 14px 36px rgba(79,70,229,.22); }
.meet-hero.is-empty { background: var(--bg-2); color: var(--ink); box-shadow: none; border: 1px dashed var(--line); }
.meet-hero.is-empty .mh-when { background: var(--bg); }
.meet-hero.is-empty .mh-rel, .meet-hero.is-empty .mh-eyebrow { color: var(--ink-faint); opacity: 1; }
.meet-hero.is-empty .mh-date, .meet-hero.is-empty .mh-info h3 { color: var(--ink); }
.meet-hero.is-empty .mh-meta { color: var(--ink-soft); opacity: 1; }
.meet-hero.is-empty .btn-accent { background: var(--accent); color: #fff; }
.meet-hero.is-empty .btn-soft { background: var(--bg); color: var(--ink); border: 1px solid var(--line); }

/* --- Secciones y tarjetas de reunión --- */
.meet-section { margin-top: 22px; }
.ms-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.ms-head h3 { font-family: var(--font-head); font-size: 1.1rem; margin: 0; }
.meet-list { display: flex; flex-direction: column; gap: 12px; }
.meet-list.is-past .meet-card { opacity: .72; }
.meet-card { display: flex; gap: 16px; align-items: flex-start; background: var(--bg); border: 1px solid var(--line); border-radius: 14px; padding: 16px; transition: box-shadow .2s, transform .2s; }
.meet-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,.06); transform: translateY(-1px); }
.mc-date { flex: 0 0 auto; width: 56px; height: 56px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-700); display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; }
.mc-day { font-family: var(--font-head); font-size: 1.4rem; font-weight: 800; }
.mc-mon { font-size: .62rem; font-weight: 700; letter-spacing: .05em; margin-top: 3px; }
.meet-card.is-requested .mc-date { background: #ede9fe; color: #6d28d9; }
.meet-card.is-mdone .mc-date, .meet-card.is-cancelled .mc-date { background: var(--bg-2); color: var(--ink-faint); }
.mc-body { flex: 1; min-width: 0; }
.mc-top { display: flex; align-items: center; gap: 10px; }
.mc-top h4 { font-size: .98rem; margin: 0; font-weight: 700; flex: 1; }
.mc-meta { font-size: .82rem; color: var(--ink-soft); margin: 4px 0 0; }
.mc-agenda { font-size: .86rem; color: var(--ink-soft); margin: 8px 0 0; line-height: 1.5; }
.mc-acts { margin-top: 12px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.mc-acts:empty { display: none; }
.mc-hint { font-size: .82rem; color: var(--ink-faint); }
.mstatus { font-size: .72rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; flex: 0 0 auto; }
.mstatus.is-scheduled { background: #e4f6ec; color: #1c9d63; }
.mstatus.is-requested { background: #ede9fe; color: #6d28d9; }
.mstatus.is-mdone { background: var(--bg-2); color: var(--ink-soft); }
.mstatus.is-cancelled { background: #fde8e8; color: #c0392b; }
html[data-theme="dark"] .mstatus.is-scheduled { background: rgba(28,157,99,.2); }
html[data-theme="dark"] .mstatus.is-requested, html[data-theme="dark"] .meet-card.is-requested .mc-date { background: rgba(109,40,217,.28); color: #c4b5fd; }
html[data-theme="dark"] .mstatus.is-cancelled { background: rgba(192,57,43,.22); color: #f3a29a; }

/* --- Referidos: tarjeta enriquecida que se comparte --- */
.ref-card { border: 1px solid var(--line); border-radius: 14px; padding: 16px; background: linear-gradient(135deg, var(--bg-2), var(--bg)); }
.rc-top { display: flex; align-items: center; gap: 12px; }
.rc-logo { width: 42px; height: 42px; border-radius: 12px; background: var(--accent); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-family: var(--font-head); font-weight: 800; font-size: .9rem; flex: 0 0 auto; }
.rc-id { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.rc-id b { font-family: var(--font-head); font-size: .96rem; }
.rc-id span { font-size: .78rem; color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rc-badge { flex: 0 0 auto; font-size: .66rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: 3px 9px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-700); }
.rc-msg { font-size: .88rem; color: var(--ink-soft); line-height: 1.55; margin: 12px 0; }
.rc-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; border-top: 1px dashed var(--line); padding-top: 10px; }
.rc-by { font-size: .76rem; color: var(--ink-faint); flex: 0 0 auto; }
.rc-link { font-size: .78rem; font-weight: 600; color: var(--accent-700); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* --- Botones de compartir añadidos --- */
.share-btn.cal { background: #0e9384; }
.share-btn.cal::before { content: "\1F4F9"; }
.share-btn.card { background: var(--accent); }
.share-btn.card::before { content: "\1F4CB"; }

/* --- Tabla de referidos --- */
.status-pill.off { background: var(--bg-2); color: var(--ink-faint); }
html[data-theme="dark"] .status-pill.off { background: rgba(255,255,255,.08); }
.ref-contact { display: block; font-size: .76rem; color: var(--ink-faint); font-weight: 400; margin-top: 2px; }

/* --- Controles compactos del superadmin (estado + recompensa) --- */
.mini-select, .mini-input { font: inherit; font-size: .84rem; padding: 7px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); }
.reward-inp { display: inline-flex; align-items: center; gap: 5px; }
.reward-inp input { width: 92px; }
.reward-inp i { font-style: normal; color: var(--ink-faint); font-size: .82rem; }
.invite-form select.mini-select, .invite-form .reward-inp { flex: 0 0 auto; }
.invite-form .reward-inp input { min-width: 0; }
.table .ref-status { width: 100%; max-width: 180px; }

/* ============================================================
   SLICE 11 · Networking — tarjetas de empresa a doble cara (flip)
   El front lleva el degradado de marca (--grad-hero); el reverso,
   la ficha (contacto/web/email) + acciones. Gira al hover (escritorio)
   o al tocar (táctil, clase .is-flipped). Los botones del reverso
   siguen siendo operativos.
   ============================================================ */
.net-grid { perspective: 1600px; }
.net-grid .tile.flip {
  position: relative; display: block; height: 340px;
  background: transparent; border: 0; overflow: visible;
  border-radius: var(--r-lg);
}
.net-grid .tile.flip:hover { transform: none; box-shadow: none; border-color: transparent; }

.flip-inner {
  position: absolute; inset: 0;
  transform-style: preserve-3d;
  transition: transform .6s cubic-bezier(.2,.7,.2,1);
}
@media (hover: hover) and (pointer: fine) {
  .net-grid .tile.flip:hover .flip-inner { transform: rotateY(180deg); }
}
.net-grid .tile.flip.is-flipped .flip-inner { transform: rotateY(180deg); }

.flip-front, .flip-back {
  position: absolute; inset: 0;
  -webkit-backface-visibility: hidden; backface-visibility: hidden;
  border: 1px solid var(--line); border-radius: var(--r-lg);
  overflow: hidden; display: flex; flex-direction: column;
  box-shadow: 0 12px 34px -24px rgba(0,0,0,.3);
}

/* ---- Cara frontal: el degradado de marca ---- */
.flip-front { background: var(--grad-hero); padding: 22px 22px 18px; }
.flip-front::after {
  content: ''; position: absolute; right: -60px; top: -60px;
  width: 180px; height: 180px; border-radius: 50%;
  background: radial-gradient(circle, rgba(247,86,43,.18), rgba(247,86,43,0) 70%);
  pointer-events: none;
}
.flip-spin {
  position: absolute; top: 16px; right: 18px; z-index: 2;
  width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(255,255,255,.6); border: 1px solid var(--line);
  color: var(--accent); font-size: .92rem;
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  transition: transform .4s ease;
}
.net-grid .tile.flip:hover .flip-spin { transform: rotate(180deg); }
.ff-logo {
  width: 60px; height: 60px; border-radius: 16px;
  background: var(--bg); border: 1px solid var(--line);
  display: grid; place-items: center;
  font-family: var(--font-head); font-weight: 800; font-size: 1.25rem; color: var(--accent);
  box-shadow: 0 8px 20px -12px rgba(0,0,0,.35);
}
.ff-body { display: flex; flex-direction: column; gap: 6px; margin-top: 16px; }
.ff-body h4 { margin: 0; font-size: 1.12rem; }
.ff-body .role { font-size: .78rem; color: var(--ink-faint); }
.ff-body p { margin: 6px 0 0; font-size: .88rem; color: var(--ink-soft); line-height: 1.5; }
.flip-cue {
  margin-top: auto; display: inline-flex; align-items: center; gap: 6px;
  font-size: .74rem; font-weight: 600; color: var(--accent-700);
}
.flip-cue::before { content: '↻'; font-size: .9rem; }
.cue-tap { display: none; }
@media (hover: none) {
  .cue-hover { display: none; }
  .cue-tap { display: inline; }
  .flip-spin { display: none; }
}

/* ---- Reverso: la ficha ---- */
.flip-back { background: var(--bg); transform: rotateY(180deg); }
.fb-head {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 18px; border-bottom: 1px solid var(--line);
  background: var(--grad-hero);
}
.fb-logo {
  width: 40px; height: 40px; border-radius: 11px; flex: 0 0 auto;
  background: var(--bg); border: 1px solid var(--line);
  display: grid; place-items: center;
  font-family: var(--font-head); font-weight: 800; font-size: .92rem; color: var(--accent);
}
.fb-id h4 { margin: 0; font-size: 1rem; }
.fb-id .role { font-size: .74rem; color: var(--ink-faint); }
.fb-rows { display: flex; flex-direction: column; gap: 10px; padding: 16px 18px; flex: 1; }
.fb-rows .tm-row { display: flex; justify-content: space-between; gap: 12px; font-size: .84rem; align-items: baseline; }
.fb-rows .tm-row > span { color: var(--ink-faint); flex: 0 0 auto; }
.fb-rows .tm-row b { font-weight: 600; text-align: right; }
.fb-rows .tm-row a { text-align: right; word-break: break-word; }
.fb-foot { display: flex; gap: 10px; padding: 0 18px 18px; }
.fb-foot .btn { flex: 1; }
.fb-foot .net-intro { flex: 2; }
@media (hover: hover) and (pointer: fine) {
  .net-back { display: none; }
}

html[data-theme="dark"] .flip-spin { background: rgba(255,255,255,.1); }
html[data-theme="dark"] .flip-front::after {
  background: radial-gradient(circle, rgba(247,86,43,.26), rgba(247,86,43,0) 70%);
}

@media (prefers-reduced-motion: reduce) {
  .flip-inner { transition: none; }
  .net-grid .tile.flip:hover .flip-spin { transform: none; }
}

/* =====================================================================
   SLICE 12 — Tablero modular del superadmin (drag-and-drop). Todo bajo
   .mod-* para no afectar a ninguna otra sección.
   ===================================================================== */
.mod-toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.mod-toolbar .spacer { flex: 1; }
.mod-status { display: inline-flex; align-items: center; gap: 8px; padding: 6px 13px; border-radius: 999px; font-size: .8rem; font-weight: 600; border: 1px solid var(--line); color: var(--ink-soft); background: var(--bg); }
.mod-status .ms-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-faint); flex: 0 0 auto; }
.mod-status.is-saved   .ms-dot { background: #16a34a; }
.mod-status.is-saving  { color: var(--accent-700); }
.mod-status.is-saving  .ms-dot { background: var(--accent); animation: modPulse 1s ease-in-out infinite; }
.mod-status.is-unsaved .ms-dot { background: #d97706; }
.mod-status.is-error   { color: #dc2626; }
.mod-status.is-error   .ms-dot { background: #dc2626; }
@keyframes modPulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

.mod-board { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.mod-col { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px; }
.mc-head { display: flex; align-items: center; gap: 10px; margin: 2px 4px 12px; }
.mc-head h3 { margin: 0; font-size: 1rem; }
.mc-count { margin-left: auto; min-width: 26px; height: 22px; padding: 0 8px; border-radius: 999px; display: inline-grid; place-items: center; font-size: .78rem; font-weight: 700; background: var(--bg); border: 1px solid var(--line); color: var(--ink-soft); }
.mod-list { display: flex; flex-direction: column; gap: 10px; min-height: 130px; border-radius: 12px; padding: 6px; transition: background .18s ease, box-shadow .18s ease; }
.mod-list.drag-over { background: rgba(247,86,43,.07); box-shadow: inset 0 0 0 2px rgba(247,86,43,.5); }
.mod-empty { margin: 0; padding: 26px 14px; text-align: center; color: var(--ink-faint); font-size: .86rem; border: 1px dashed var(--line); border-radius: 12px; }

.mod-chip { display: flex; align-items: center; gap: 12px; padding: 11px 12px; background: var(--bg); border: 1px solid var(--line); border-radius: 13px; cursor: grab; box-shadow: 0 6px 18px -16px rgba(0,0,0,.4); transition: transform .12s ease, box-shadow .18s ease, border-color .18s ease; }
.mod-chip:hover { border-color: rgba(247,86,43,.4); box-shadow: 0 10px 24px -16px rgba(0,0,0,.45); }
.mod-chip:active { cursor: grabbing; }
.mod-chip.dragging { opacity: .55; transform: scale(.99); }
.mod-chip.is-core { cursor: default; opacity: .9; background: var(--bg-2); border-style: dashed; box-shadow: none; }
.mod-chip.is-core:hover { border-color: var(--line); }

.mod-chip .grip { flex: 0 0 auto; color: var(--ink-faint); display: grid; place-items: center; }
.mod-chip .grip svg { width: 18px; height: 18px; }
.mod-chip.is-core .grip { color: var(--accent); }
.mod-ico { flex: 0 0 auto; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--bg-2); border: 1px solid var(--line); color: var(--accent); }
.mod-chip.is-core .mod-ico { background: var(--bg); }
.mod-ico .ico { width: 18px; height: 18px; }
.mod-meta { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1; }
.mod-meta b { font-size: .92rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mod-grp { font-size: .72rem; color: var(--ink-faint); }
.mod-lockhint { color: var(--accent-700); font-weight: 600; }

.mod-actions { display: flex; align-items: center; gap: 2px; flex: 0 0 auto; }
.mod-actions button { width: 30px; height: 30px; border: 0; background: transparent; color: var(--ink-faint); border-radius: 8px; display: grid; place-items: center; cursor: pointer; transition: background .15s ease, color .15s ease; }
.mod-actions button:hover { background: var(--bg-2); color: var(--accent); }
.mod-actions button svg { width: 17px; height: 17px; }
.mod-toggle .eye-show, .mod-toggle .eye-hide { display: none; }
.mod-list[data-col="visible"] .mod-toggle .eye-hide { display: block; }
.mod-list[data-col="hidden"]  .mod-toggle .eye-show { display: block; }
.mod-list[data-col="hidden"]  .mod-chip { opacity: .82; }
.mod-list[data-col="hidden"]  .mod-chip:hover { opacity: 1; }

.mod-foot-note { margin: 16px 2px 0; font-size: .82rem; color: var(--ink-faint); line-height: 1.55; }

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

/* =====================================================================
   SLICE 16 — Calendario con piel shadcn + cajón de vista previa "tipo Notion".
   El rediseño del calendario son overrides (la rejilla DOM no cambia, así que
   sirve igual para el PHP inicial y el JS al navegar). El cajón es un drawer
   lateral que abre la pieza al clicar un evento del calendario.
   ===================================================================== */

/* ---- Calendario: refresco visual ---- */
.calendar { box-shadow: var(--shadow-sm, 0 1px 2px rgba(16,24,40,.05)); background: var(--bg); }
.cal-cell { min-height: 108px; padding: 7px 7px 9px; transition: background .15s; position: relative; }
.cal-cell .d {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 22px; height: 22px; padding: 0 4px; border-radius: 999px;
  font-size: .74rem; font-weight: 600; color: var(--ink-soft);
}
.cal-cell:not(.out):hover { background: var(--bg-2); }
/* Sáb (6) y Dom (7) con un tinte suave */
.cal-cell:nth-child(7n+6):not(.out), .cal-cell:nth-child(7n):not(.out) { background: color-mix(in srgb, var(--bg-2) 45%, transparent); }
/* Hoy: anillo de acento en el número, no fondo lleno */
.cal-cell.is-today { background: transparent; }
.cal-cell.is-today .d { background: var(--accent); color: #fff; font-weight: 800; box-shadow: 0 1px 4px rgba(247,86,43,.35); }

.cal-event {
  margin-top: 6px; display: flex; align-items: center; gap: 6px;
  font-size: .71rem; font-weight: 500; padding: 5px 8px; border-radius: 8px;
  background: var(--bg-2); color: var(--ink); border-left: none;
  box-shadow: inset 0 0 0 1px var(--line); line-height: 1.2;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cal-event::before { content: ""; flex: 0 0 auto; width: 7px; height: 7px; border-radius: 999px; background: var(--accent); }
.cal-event.li::before { background: #0a66c2; }
.cal-event.li { background: #eef4fc; color: #0a3d6e; box-shadow: inset 0 0 0 1px rgba(10,102,194,.18); }
html[data-theme="dark"] .cal-event.li { background: rgba(10,102,194,.16); color: #aacdf0; box-shadow: inset 0 0 0 1px rgba(10,102,194,.3); }
.cal-event .ce-ch { font-weight: 700; font-size: .62rem; text-transform: uppercase; letter-spacing: .04em; opacity: .75; }
.cal-event.is-pending { background: repeating-linear-gradient(45deg, var(--bg-2), var(--bg-2) 6px, transparent 6px, transparent 12px); box-shadow: inset 0 0 0 1px var(--ink-faint); color: var(--ink-soft); }
.cal-event.is-pending::before { background: var(--ink-faint); }
.cal-event.s-published { opacity: .6; }
.cal-event:hover { transform: translateY(-1px); box-shadow: 0 3px 10px rgba(16,24,40,.12), inset 0 0 0 1px var(--line); }

/* ---- Cajón de vista previa (drawer lateral) ---- */
body.drawer-lock { overflow: hidden; }
.drawer { position: fixed; inset: 0; z-index: 1200; visibility: hidden; pointer-events: none; }
.drawer.open { visibility: visible; pointer-events: auto; }
.drawer-scrim { position: absolute; inset: 0; background: rgba(16,24,40,.42); opacity: 0; transition: opacity .25s; }
.drawer.open .drawer-scrim { opacity: 1; }
.drawer-panel {
  position: absolute; top: 0; right: 0; height: 100%; width: min(520px, 94vw);
  background: var(--bg); border-left: 1px solid var(--line);
  box-shadow: -16px 0 40px rgba(16,24,40,.18);
  display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform .28s cubic-bezier(.16,1,.3,1);
}
.drawer.open .drawer-panel { transform: translateX(0); }
.drawer-head { display: flex; align-items: center; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.drawer-title { margin: 0; font-size: 1.15rem; flex: 1; line-height: 1.25; }
.drawer-x { flex: 0 0 auto; width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--line); background: var(--bg); color: var(--ink-soft); cursor: pointer; font-size: .9rem; transition: background .15s; }
.drawer-x:hover { background: var(--bg-2); color: var(--ink); }
.drawer-body { flex: 1; overflow-y: auto; padding: 20px 22px; }
.drawer-foot { display: flex; gap: 10px; justify-content: flex-end; padding: 14px 22px; border-top: 1px solid var(--line); background: var(--bg); }
.drawer-foot .btn { flex: 0 0 auto; }

/* Meta de la vista previa */
.pd-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.pd-topic { margin-bottom: 12px; }
.pd-ext { font-size: .68rem; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: var(--bg-2); color: var(--ink-soft); border: 1px solid var(--line); }
.pd-err { color: #d6453c; font-size: .9rem; }
.pd-skel { display: flex; flex-direction: column; gap: 12px; }
.pd-skel span { display: block; height: 16px; border-radius: 6px; background: linear-gradient(90deg, var(--bg-2) 25%, var(--line) 50%, var(--bg-2) 75%); background-size: 200% 100%; animation: pdShimmer 1.2s infinite; }
.pd-skel span:nth-child(1) { width: 60%; height: 22px; }
.pd-skel span:nth-child(2) { width: 100%; height: 120px; }
.pd-skel span:nth-child(3) { width: 80%; }
@keyframes pdShimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .drawer-panel { transition: none; } .pd-skel span { animation: none; } }

/* ============ PAGOS · Facturas (cliente + admin) ============ */
.inv-box { padding: 0; overflow: hidden; }
.inv-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.inv-table th {
  text-align: left; font-weight: 600; font-size: .74rem; letter-spacing: .04em;
  text-transform: uppercase; color: var(--ink-faint); padding: 16px 20px; border-bottom: 1px solid var(--line);
}
.inv-table td { padding: 15px 20px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.inv-table tbody tr:last-child td { border-bottom: 0; }
.inv-table tbody tr { transition: background var(--dur-fast, 150ms) ease; }
.inv-table tbody tr:hover { background: var(--surface-2, rgba(0,0,0,.02)); }
.inv-concepto { font-weight: 600; color: var(--ink); }
.inv-date { color: var(--ink-soft); white-space: nowrap; }
.inv-amount { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.ta-r { text-align: right; }
.inv-nofile { color: var(--ink-faint); font-size: .82rem; }
.inv-tag {
  display: inline-block; font-size: .72rem; font-weight: 600; padding: 3px 10px;
  border-radius: 999px; letter-spacing: .02em; white-space: nowrap;
}
.inv-mensual { background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent-700, var(--accent)); }
.inv-puntual { background: color-mix(in srgb, var(--ink) 8%, transparent); color: var(--ink-soft); }

/* Formulario de subida (admin) */
.inv-form .field { margin-bottom: 14px; }
.inv-form-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
@media (max-width: 640px) { .inv-form-row { grid-template-columns: 1fr; } }
