:root{--y:#ffe500;--ink:#10110e;--mut:#73766d;--line:#e2e4db;--bg:#f2f3ed;--red:#ff5d52;--green:#26c86f;--blue:#6a6df5;--card:#fff;--shadow:0 16px 48px #191a130d}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);font:14px Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif}.app{min-height:100vh;display:grid;grid-template-columns:248px minmax(0,1fr)}.side{position:sticky;top:0;height:100vh;padding:29px 20px;background:#0d0e0c;color:#fff}.logo{font-size:25px;line-height:.82;font-weight:950;letter-spacing:-1px}.logo b{color:var(--y);font-size:32px}.logo small{display:block;margin-top:18px;color:#85877f;font-size:9px;letter-spacing:1.8px}.nav{display:grid;gap:6px;margin-top:42px}.nav button{border:0;border-radius:10px;padding:12px;background:transparent;color:#aeb1a7;text-align:left;font-weight:800;cursor:pointer}.nav button.on,.nav button:hover{background:#25271f;color:var(--y)}.side-note{position:absolute;left:20px;right:20px;bottom:23px;border:1px solid #303229;border-radius:13px;padding:15px;color:#aaaca4;font-size:12px}.main{width:100%;max-width:1680px;margin:auto;padding:31px}.top{display:flex;justify-content:space-between;align-items:end;gap:20px}.eyebrow{color:#8b8e85;font-size:10px;font-weight:950;letter-spacing:1.5px}h1{margin:7px 0 5px;font-size:40px;line-height:1;letter-spacing:-1.9px}h2{margin:0 0 5px;font-size:21px;letter-spacing:-.3px}h3{margin:0}.muted{color:var(--mut)}.actions{display:flex;gap:8px;flex-wrap:wrap}.btn{border:1px solid #161712;border-radius:9px;padding:10px 14px;background:#fff;font-weight:850;cursor:pointer}.btn.primary{background:var(--y)}.filters{display:flex;align-items:end;gap:9px;flex-wrap:wrap;margin:23px 0 15px;padding:12px;border:1px solid var(--line);border-radius:13px;background:#fff}.filters label{display:grid;gap:4px;color:#85877e;font-size:10px;font-weight:900}.filters input,.filters select,.filters>input,.filters>select{min-height:38px;border:1px solid var(--line);border-radius:8px;padding:8px 10px;background:#fff;color:var(--ink)}#search{min-width:240px;margin-left:auto}.source{display:flex;justify-content:space-between;gap:18px;align-items:center;margin-bottom:13px;padding:16px 18px;border-radius:15px;background:#12130f;color:white}.source b{color:var(--y);font-size:15px}.source span{color:#b7baaf}.verified{white-space:nowrap;border:1px solid #3b3e32;border-radius:999px;padding:7px 11px;color:#d7dacd!important;font-size:11px}.kpis{display:grid;grid-template-columns:repeat(6,1fr);gap:10px}.kpi{min-height:108px;padding:16px;border:1px solid var(--line);border-radius:14px;background:#fff;box-shadow:var(--shadow)}.kpi.hot{background:#10110e;color:#fff}.kpi small{display:block;color:#878a81;font-weight:750}.kpi strong{display:block;margin:13px 0 4px;font-size:27px;letter-spacing:-1px}.kpi.hot strong{color:var(--y)}.snapshot{margin-bottom:15px}.snapshot .kpi:nth-child(3){border-color:#f0d83d;background:#fffceb}.snapshot .kpi:nth-child(4){border-color:#78dda2;background:#effcf4}.snapshot .kpi:nth-child(5){border-color:#ff9e96;background:#fff3f1}.panel{margin-top:14px;padding:21px;border:1px solid var(--line);border-radius:16px;background:#fff;box-shadow:var(--shadow)}.panel-head{display:flex;justify-content:space-between;align-items:start;gap:15px;margin-bottom:18px}.flow{display:grid;grid-template-columns:repeat(6,1fr);gap:10px}.stage{position:relative;min-height:158px;padding:14px;border:1px solid var(--line);border-radius:14px;background:#f8f9f5}.stage:not(:last-child):after{content:'›';position:absolute;right:-9px;top:61px;z-index:2;width:17px;height:31px;background:#111;color:var(--y);display:grid;place-items:center;border-radius:10px;font-size:21px}.stage-title{min-height:28px;font-size:11px;font-weight:950;letter-spacing:.65px}.count{display:block;margin:7px 0 1px;font-size:29px;font-weight:950}.stage small{color:var(--mut)}.avatars{display:flex;margin-top:13px}.avatar{width:31px;height:31px;margin-right:-7px;border:2px solid #fff;border-radius:50%;background:#dadcd2;object-fit:cover;display:grid;place-items:center;color:#333;font-size:10px;font-weight:900}.mini-bars{display:grid;grid-template-columns:1fr 1fr;gap:18px}.bar-row{display:grid;grid-template-columns:115px 1fr 35px;align-items:center;gap:9px;margin:10px 0}.bar-track{height:9px;border-radius:20px;background:#eceee6;overflow:hidden}.bar-fill{height:100%;border-radius:20px;background:var(--y);border-right:1px solid #cbb500}.cards{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.person{padding:14px;border:1px solid var(--line);border-radius:14px;background:#fff;cursor:pointer}.person:hover{border-color:#babcaf;box-shadow:0 10px 28px #2221}.person-top{display:flex;align-items:center;gap:10px}.person-top .avatar{width:43px;height:43px;margin:0}.person h3{margin-bottom:2px;font-size:14px}.handle{font-size:11px;color:var(--mut)}.tags{display:flex;flex-wrap:wrap;gap:5px;margin-top:11px}.tag,.status{display:inline-flex;align-items:center;border-radius:999px;padding:5px 7px;background:#eee;font-size:9px;font-weight:950;letter-spacing:.2px}.tag.trial,.status.trial{background:#fff1a8}.tag.pay,.status.active{background:#dff7e8;color:#146938}.tag.cancel,.status.cancel{background:#ffe0dd;color:#9e2b23}.tag.free,.status.free{background:#ebeafd;color:#4142a6}.person footer{display:flex;justify-content:space-between;gap:8px;margin-top:10px;color:var(--mut);font-size:10px}.table-wrap{overflow:auto}.table{width:100%;border-collapse:collapse;white-space:nowrap}.table th,.table td{padding:11px 9px;border-bottom:1px solid var(--line);text-align:left}.table th{position:sticky;top:0;background:#fff;color:var(--mut);font-size:9px;letter-spacing:.8px}.member-row{cursor:pointer}.member-row:hover{background:#fafbf7}.journey{display:flex;align-items:center;gap:4px}.journey .tag{font-size:8px}.money-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.plan{padding:16px;border:1px solid var(--line);border-radius:14px}.plan strong{display:block;margin-top:7px;font-size:25px}.plan table{width:100%;margin-top:12px;border-collapse:collapse}.plan td{padding:5px 0;border-top:1px solid var(--line)}.plan td:last-child{text-align:right;font-weight:800}.hidden{display:none!important}.empty{padding:30px;text-align:center;color:var(--mut)}dialog{width:min(680px,calc(100% - 26px));max-height:92vh;padding:0;border:0;border-radius:18px;box-shadow:0 35px 100px #0006}dialog::backdrop{background:#0009}.modal{padding:23px}.close{float:right;width:34px;height:34px;border:0;border-radius:50%;background:#eee;cursor:pointer}.profile-grid{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin:15px 0;padding:13px;border-radius:12px;background:#f5f6f1}.profile-grid div{font-size:11px}.profile-grid b{display:block;font-size:12px}.timeline{margin:19px 0 19px 8px;padding-left:18px;border-left:2px solid #ddd}.move{position:relative;padding-bottom:18px}.move:before{content:'';position:absolute;left:-24px;top:4px;width:10px;height:10px;border:2px solid #111;border-radius:50%;background:var(--y)}.move b{display:block}.form{display:grid;grid-template-columns:1fr 1fr;gap:10px}.form label{font-size:10px;font-weight:850}.form input,.form select{display:block;width:100%;margin-top:5px;padding:10px;border:1px solid var(--line);border-radius:8px;background:white}.wide{grid-column:1/-1}.audit-note{padding:14px;border-left:4px solid var(--y);background:#fffceb}.pager{display:flex;justify-content:space-between;align-items:center;margin-top:13px}.pager button{border:1px solid var(--line);border-radius:8px;padding:7px 10px;background:#fff}.danger{color:#a52a21}.success{color:#197344}@media(max-width:1220px){.kpis{grid-template-columns:repeat(3,1fr)}.flow{grid-template-columns:repeat(3,1fr)}.stage:nth-child(3):after{display:none}.cards{grid-template-columns:repeat(2,1fr)}}@media(max-width:790px){.app{display:block}.side{position:relative;height:auto;padding:18px}.side-note{display:none}.nav{display:flex;overflow:auto;margin-top:18px}.main{padding:17px}.top{display:block}.actions{margin-top:14px}.filters{align-items:stretch}.filters>*{width:100%}#search{min-width:0;margin-left:0}.kpis,.flow,.mini-bars,.cards,.money-grid,.profile-grid{grid-template-columns:1fr 1fr}.stage:after{display:none}.table{font-size:12px}h1{font-size:34px}}@media(max-width:520px){.kpis,.flow,.mini-bars,.cards,.money-grid,.profile-grid{grid-template-columns:1fr}.source{display:block}.verified{display:inline-block;margin-top:10px}.form{grid-template-columns:1fr}.wide{grid-column:auto}}

/* ============================================================ */

[data-theme="dark"]{--ink:#f3f5ef;--mut:#9ca59b;--line:#343b34;--bg:#080a08;--card:#121512;--shadow:none;color-scheme:dark}[data-theme="dark"] body{background:linear-gradient(#ffffff08 1px,transparent 1px),linear-gradient(90deg,#ffffff08 1px,transparent 1px),var(--bg);background-size:36px 36px}[data-theme="dark"] .main,[data-theme="dark"] .filters,[data-theme="dark"] .panel,[data-theme="dark"] .kpi,[data-theme="dark"] .person,[data-theme="dark"] .stage,[data-theme="dark"] .plan,[data-theme="dark"] .table th,[data-theme="dark"] .profile-grid,[data-theme="dark"] .form input,[data-theme="dark"] .form select,[data-theme="dark"] .filters input,[data-theme="dark"] .filters select{background:var(--card);color:var(--ink);border-color:var(--line)}[data-theme="dark"] .kpi{border-top:2px solid var(--y);border-radius:16px}[data-theme="dark"] .snapshot .kpi:nth-child(n){background:var(--card)}[data-theme="dark"] .source{background:linear-gradient(120deg,#ffe500,#baca22);color:#121408}[data-theme="dark"] .source b,[data-theme="dark"] .source span{color:#121408}[data-theme="dark"] .member-row:hover{background:#222821}[data-theme="dark"] dialog{background:#191d1a;color:var(--ink)}.theme,.periods{display:flex;gap:5px;align-items:center}.periods{margin:16px 0 -10px}.periods button,.theme{border:1px solid var(--line);border-radius:9px;padding:8px 11px;background:var(--card);color:var(--ink);font-weight:800;cursor:pointer}.periods button.on{background:var(--y);color:#171a0b}.flow-context{display:grid;grid-template-columns:1fr 1fr 1.2fr 1.2fr;gap:9px;margin-bottom:12px}.flow-context div{padding:13px;border:1px dashed var(--line);border-radius:12px;background:var(--bg)}.flow-context small,.flow-context span{display:block;color:var(--mut);font-size:10px}.flow-context b{display:block;margin:6px 0;font-size:18px}.flow-context .direct{border-style:solid;border-color:var(--blue)}.flow-context .legacy{border-style:solid;border-color:#d8c500}.version{display:inline-flex;margin-left:9px;padding:5px 8px;border-radius:999px;background:var(--y);color:#171a0b;font-size:9px}@media(max-width:790px){.flow-context{grid-template-columns:1fr 1fr}.periods{overflow:auto}.theme{margin-top:10px}}

/* ============================================================ */

.mrr-explain{display:flex;gap:10px;align-items:center;margin-top:11px;padding:10px 13px;border:1px solid #777dff66;border-radius:11px;background:#777dff12;color:var(--mut);font-size:11px}.mrr-explain b{color:#7f83ff}.direction-grid{display:grid;grid-template-columns:1.65fr 1fr;gap:12px}.product-tabs{display:flex;gap:3px;padding:3px;border:1px solid var(--line);border-radius:9px;background:var(--bg)}.product-tabs button{border:0;border-radius:6px;padding:6px 9px;background:transparent;color:var(--mut);font-size:9px;font-weight:950;cursor:pointer}.product-tabs button.on{background:var(--y);color:#111}.income-summary{display:flex;gap:22px;margin-top:10px}.income-summary span{display:grid}.income-summary small{color:var(--mut);font-size:8px}.income-summary b{font-size:16px}.direction-renew-list{display:grid}.direction-renew-list>div{display:flex;align-items:center;justify-content:space-between;gap:8px;border-top:1px solid var(--line);padding:9px 0;cursor:pointer}.direction-renew-list>div>span{display:flex;align-items:center;gap:7px}.direction-renew-list .avatar{width:30px;height:30px;margin:0}.direction-renew-list span span,.direction-renew-list em{display:grid}.direction-renew-list small{color:var(--mut);font-size:8px}.direction-renew-list em{font-style:normal;text-align:right}.direction-renew-list em b{color:var(--green)}.renew-rate{display:grid;grid-template-columns:95px 1fr;align-items:center;gap:12px;margin-bottom:6px}.renew-ring{display:grid;place-items:center;width:90px;height:90px;border-radius:50%;background:conic-gradient(var(--green) calc(var(--rate)*1%),var(--line) 0);position:relative}.renew-ring:after{content:'';position:absolute;inset:10px;border-radius:50%;background:var(--card)}.renew-ring b{z-index:1;font-size:20px}.renew-rate span{display:grid}.renew-rate span b{font-size:16px}
.direction-funnel-wrap{
  display:flex;
  justify-content:flex-start;
  padding:4px 0 2px;
}
.membership-funnel-card{
  width:min(100%,430px);
  border:1px solid #263028;
  border-radius:14px;
  padding:16px 16px 14px;
  background:
    radial-gradient(circle at 18% 10%,rgba(255,255,255,.035),transparent 24%),
    linear-gradient(180deg,#101612 0%,#0a0f0c 100%);
  color:#fff;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.03);
}
.membership-funnel-title{
  margin-bottom:13px;
  color:#eef2ee;
  font-size:13px;
  font-weight:900;
}
.membership-funnel-grid{
  display:grid;
  grid-template-columns:minmax(0,1fr) 118px;
  align-items:stretch;
  gap:14px;
}
.membership-funnel-shape{
  min-height:260px;
  display:grid;
  grid-template-rows:repeat(4,1fr);
  align-items:stretch;
  justify-items:center;
}
.funnel-segment{
  display:grid;
  place-items:center;
  min-height:61px;
  color:#f4f6f4;
  font-weight:900;
  border-top:1px solid rgba(255,255,255,.05);
  clip-path:polygon(6% 0,94% 0,85% 100%,15% 100%);
}
.funnel-segment:nth-child(1){
  width:100%;
  background:linear-gradient(180deg,#3b4549,#2e3639);
  border-radius:5px 5px 0 0;
}
.funnel-segment:nth-child(2){
  width:82%;
  background:linear-gradient(180deg,#505b60,#3d474c);
}
.funnel-segment:nth-child(3){
  width:66%;
  background:linear-gradient(180deg,#646f74,#505b60);
}
.funnel-segment:nth-child(4){
  width:50%;
  background:linear-gradient(180deg,#fff200,#d6cb00);
  color:#10130f;
  border-radius:0 0 5px 5px;
}
.funnel-segment b{
  font-size:19px;
  letter-spacing:-.4px;
}
.funnel-side{
  display:grid;
  grid-template-rows:repeat(4,1fr);
  align-items:center;
}
.funnel-side-row{
  display:grid;
  align-content:center;
  min-height:61px;
  border-bottom:1px solid rgba(255,255,255,.045);
}
.funnel-side-row:last-child{border-bottom:0}
.funnel-side-row span{
  display:block;
  color:#dfe5df;
  font-size:10px;
  font-weight:800;
}
.funnel-side-row small{
  display:block;
  margin-top:2px;
  color:#9fa9a1;
  font-size:8px;
  font-weight:800;
}
.funnel-side-row strong{
  display:block;
  margin-top:3px;
  color:#fff;
  font-size:10px;
  font-weight:950;
}
.funnel-side-row:last-child strong{color:var(--y)}
.funnel-card-footer{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:7px;
  margin-top:13px;
  padding-top:12px;
  border-top:1px solid #263028;
}
.funnel-card-footer>div{
  min-width:0;
  padding:9px 8px;
  border:1px solid #253027;
  border-radius:9px;
  background:#131a15;
}
.funnel-card-footer small{
  display:block;
  color:#7f8b82;
  font-size:7px;
  font-weight:950;
  letter-spacing:.45px;
}
.funnel-card-footer b{
  display:block;
  margin-top:4px;
  color:#eef2ee;
  font-size:14px;
}
.funnel-card-footer .good b{color:#2bd576}
.funnel-card-footer .warn b{color:#ff8179}
@media(max-width:620px){
  .mrr-explain{align-items:start;flex-direction:column}
  .membership-funnel-card{width:100%}
  .membership-funnel-grid{grid-template-columns:minmax(0,1fr) 104px;gap:10px}
  .membership-funnel-shape{min-height:230px}
  .funnel-segment,.funnel-side-row{min-height:54px}
  .funnel-card-footer{grid-template-columns:1fr}
}

.demo-switch{display:flex;gap:8px;align-items:stretch;margin-bottom:14px;padding:8px;border:1px solid var(--line);border-radius:15px;background:var(--card);overflow:auto}.demo-switch button{display:flex;align-items:center;gap:9px;min-width:185px;border:1px solid transparent;border-radius:10px;padding:9px 11px;background:transparent;color:var(--mut);text-align:left;cursor:pointer}.demo-switch button>b{display:grid;place-items:center;width:30px;height:30px;border-radius:8px;background:var(--bg);color:var(--ink)}.demo-switch button span{display:grid;color:var(--ink);font-size:12px;font-weight:900}.demo-switch button small{color:var(--mut);font-size:9px}.demo-switch button.on{border-color:#e2ca00;background:#fffbe0}.demo-switch button.on>b{background:var(--y);color:#111}.demo-switch em{display:flex;align-items:center;margin-left:auto;padding:0 10px;color:#20a85f;font-size:9px;font-style:normal;font-weight:950;white-space:nowrap}.demo-view{border-radius:21px;padding:17px}.demo1,.demo3{--dc:#111611;--dl:#2c352d;--dt:#f7f9f4;--dm:#909a90;background:#080b09;color:var(--dt)}.demo3{--dc:#10162a;--dl:#26324c;--dm:#8793ac;background:#070b18}.demo2{--dc:#fff;--dl:#dfe3dc;--dt:#141612;--dm:#757d73;background:#f5f7f3;color:var(--dt)}.demo-hero{display:flex;justify-content:space-between;align-items:center;gap:20px;min-height:135px;border:1px solid var(--dl);border-radius:17px;padding:23px 26px;background:radial-gradient(circle at 82% 25%,#ffe50025,transparent 28%),var(--dc)}.demo3 .demo-hero{background:radial-gradient(circle at 82% 25%,#777dff40,transparent 30%),linear-gradient(125deg,#111a32,#090e1d)}.demo-hero span,.demo-head span{color:var(--dm);font-size:9px;font-weight:950;letter-spacing:1.4px}.demo-hero h2{margin:6px 0;font-size:31px}.demo-hero p{margin:0;color:var(--dm)}.demo-score{padding:12px 16px;border-radius:12px;background:var(--y);color:#111;text-align:center}.demo-score b{display:block;font-size:26px}.demo-score small{font-size:9px}.demo-stats{display:grid;grid-template-columns:repeat(5,1fr);gap:8px;margin-top:11px}.demo-stat{min-height:101px;border:1px solid var(--dl);border-left:3px solid #22c7f3;border-radius:12px;padding:14px;background:var(--dc)}.demo-stat:nth-child(2){border-left-color:var(--y)}.demo-stat:nth-child(3){border-left-color:#777dff}.demo-stat:nth-child(4){border-left-color:#ff8c42}.demo-stat:nth-child(5){border-left-color:#31d478}.demo-stat small,.demo-stat span{display:block;color:var(--dm);font-size:9px}.demo-stat b{display:block;margin:10px 0 3px;font-size:22px}.demo-grid{display:grid;grid-template-columns:1.6fr 1fr;gap:11px;margin-top:11px}.demo-box{border:1px solid var(--dl);border-radius:14px;padding:16px;background:var(--dc);overflow:hidden}.demo-head{display:flex;justify-content:space-between;align-items:start;margin-bottom:11px}.demo-head h3{margin-top:4px}.graph{height:220px;display:flex;align-items:end;gap:7px;padding:12px 4px 23px;border-bottom:1px solid var(--dl)}.graph-col{position:relative;display:flex;align-items:end;justify-content:center;gap:2px;flex:1;height:100%}.graph-col i{display:block;width:38%;min-height:2px;border-radius:5px 5px 0 0;background:#22c7f3}.graph-col i+ i{background:var(--y)}.graph-col small{position:absolute;bottom:-18px;color:var(--dm);font-size:8px}.legend-row{display:flex;gap:14px;margin-top:9px;color:var(--dm);font-size:9px}.legend-row i{display:inline-block;width:8px;height:8px;margin-right:4px;border-radius:2px;background:#22c7f3}.legend-row span+span i{background:var(--y)}.demo-origins{display:grid;gap:7px}.demo-origin{display:grid;grid-template-columns:105px 1fr 28px;align-items:center;gap:7px;color:var(--dm);font-size:9px}.demo-origin i{height:8px;border-radius:99px;background:linear-gradient(90deg,#777dff,#22c7f3)}.demo-flow{display:grid;grid-template-columns:repeat(6,1fr);gap:7px;margin-top:11px}.demo-stage{position:relative;min-height:119px;border:1px solid var(--dl);border-top:3px solid var(--y);border-radius:12px;padding:12px;background:var(--dc);cursor:pointer}.demo-stage small,.demo-stage b,.demo-stage span{display:block}.demo-stage small{min-height:26px;color:var(--dm);font-size:8px;font-weight:900}.demo-stage b{font-size:25px}.demo-stage span{margin-top:7px;color:var(--dm);font-size:8px}.demo-stage:not(:last-child):after{content:'›';position:absolute;right:-13px;top:42px;z-index:2;display:grid;place-items:center;width:25px;height:25px;border-radius:50%;background:var(--y);color:#111;font-size:18px}.demo2 .demo-headline{display:flex;justify-content:space-between;align-items:end;padding:10px 4px}.demo2 .demo-headline h2{font-size:29px}.journey-demo{display:grid;grid-template-columns:minmax(0,1fr) 310px;margin-top:11px;border:1px solid var(--dl);border-radius:15px;background:#fff;overflow:hidden}.journey-demo-list{min-width:0;padding:13px;overflow:auto}.journey-demo-row{display:grid;grid-template-columns:180px 105px minmax(360px,1fr) 110px;align-items:center;gap:9px;min-width:800px;border-top:1px solid #e8ebe5;padding:11px 6px;color:#171916;cursor:pointer}.journey-demo-row:first-child{border:1px solid #e2ca00;border-radius:10px;background:#fffcef}.demo-person{display:flex;align-items:center;gap:8px}.demo-person .avatar{width:38px;height:38px;margin:0}.demo-person span{display:grid}.demo-person small{color:#798078;font-size:9px}.demo-origin-pill{width:max-content;border-radius:99px;padding:6px 7px;background:#f0f2ed;color:#5f665d;font-size:8px}.demo-route{display:flex;align-items:center;gap:4px;white-space:nowrap;overflow:hidden}.demo-route span{display:flex;align-items:center;gap:4px;color:#555d53;font-size:8px;font-weight:900}.demo-route i{display:grid;place-items:center;width:18px;height:18px;border-radius:50%;background:#31c66f;color:white;font-style:normal}.demo-route .trial i{background:#f0d400;color:#111}.demo-route .lost i{background:#ff665c}.demo-route b{color:#a3aaa1}.journey-demo-side{border-left:1px solid var(--dl);padding:18px;color:#171916;background:#fbfcfa}.journey-profile-top{display:flex;align-items:center;gap:10px}.journey-profile-top .avatar{width:62px;height:62px;margin:0;border-radius:14px}.journey-profile-top span{display:grid}.journey-profile-top small{color:#827200;font-size:8px;font-weight:950}.journey-profile-top h3{margin:4px 0}.mini-timeline{margin:17px 0 0 7px;border-left:2px solid #dfe3dc}.mini-timeline div{position:relative;padding:0 0 15px 17px}.mini-timeline div:before{content:'';position:absolute;left:-6px;top:4px;width:10px;height:10px;border:2px solid white;border-radius:50%;background:#31c66f}.mini-timeline b,.mini-timeline small{display:block}.mini-timeline small{color:#737b71;font-size:8px}.analytics-panels{display:grid;grid-template-columns:1fr 1fr;gap:11px;margin-top:11px}.cohort{overflow:auto}.cohort>div{display:grid;grid-template-columns:90px 60px repeat(3,1fr);min-width:490px}.cohort>div>*{padding:9px;border-bottom:1px solid var(--dl);text-align:center}.cohort>div>*:first-child{text-align:left}.cohort>div:first-child{color:var(--dm);font-size:8px;font-weight:950}.heat{border-radius:4px;background:color-mix(in srgb,#777dff calc(var(--heat)*100%),transparent);font-weight:900}.renew-demo{display:grid}.renew-demo>div{display:flex;justify-content:space-between;align-items:center;border-top:1px solid var(--dl);padding:9px 0}.renew-demo span{display:flex;align-items:center;gap:7px}.renew-demo .avatar{width:30px;height:30px;margin:0}.renew-demo em{display:grid;color:#31d478;font-style:normal;text-align:right}.renew-demo small{color:var(--dm);font-size:8px}@media(max-width:1250px){.demo-stats{grid-template-columns:repeat(3,1fr)}.demo-flow{grid-template-columns:repeat(3,1fr)}.demo-grid,.analytics-panels{grid-template-columns:1fr}.journey-demo{grid-template-columns:1fr}.journey-demo-side{border-left:0;border-top:1px solid var(--dl)}}@media(max-width:790px){.demo-switch em{display:none}.demo-view{padding:10px}.demo-stats,.demo-flow{grid-template-columns:repeat(2,1fr)}.demo-hero{display:block}.demo-score{width:max-content;margin-top:14px}}@media(max-width:520px){.demo-stats,.demo-flow{grid-template-columns:1fr}.demo-hero h2,.demo2 .demo-headline h2{font-size:24px}}
[data-theme=dark] .demo-switch button.on{background:#393612}[data-theme=dark] .demo-switch button.on span{color:#fff}

/* ============================================================ */

:root{
  --y:#f4ea00;
  --ink:#10130f;
  --mut:#747b72;
  --line:#d7ddd3;
  --bg:#edf1eb;
  --card:#ffffff;
  --green:#2bd576;
  --sidebar:#090d09;
  --sidebar-2:#171d17;
  --shadow:0 1px 0 rgba(11,16,11,.02);
}
html{background:var(--bg)}
body{
  background:var(--bg);
  color:var(--ink);
  font:14px/1.45 Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",Arial,sans-serif;
}
.app{grid-template-columns:218px minmax(0,1fr);min-height:100vh}
.side{
  position:sticky;top:0;height:100vh;
  padding:40px 18px 24px 7px;
  background:var(--sidebar);
  border-right:1px solid #1d241d;
  overflow:hidden;
}
.logo{
  padding-left:0;
  color:#fff;
  font-size:23px;
  line-height:.92;
  letter-spacing:-.7px;
  font-weight:950;
}
.logo b{display:block;color:var(--y);font-size:31px;line-height:.88;letter-spacing:-1px}
.logo small{
  display:block;margin-top:12px;
  color:#8c9a90;font-size:8px;font-weight:900;
  letter-spacing:1.8px;
}
.nav{display:grid;gap:4px;margin-top:35px}
.nav button{
  min-height:50px;
  display:flex;align-items:center;gap:13px;
  width:100%;
  border:1px solid transparent;
  border-radius:10px;
  padding:0 12px 0 8px;
  background:transparent;
  color:#aeb8ae;
  text-align:left;
  font-size:13px;
  font-weight:850;
  letter-spacing:.05px;
  cursor:pointer;
  transition:.15s ease;
}
.nav button svg{
  width:18px;height:18px;min-width:18px;
  fill:none;stroke:currentColor;stroke-width:1.6;
  stroke-linecap:round;stroke-linejoin:round;
}
.nav button:first-child svg rect{fill:none}
.nav button.on,.nav button:hover{
  background:#171d17;
  border-color:#343d34;
  color:var(--y);
}
.nav button.on span{color:var(--y)}
.side-note{
  position:absolute;left:0;right:18px;bottom:16px;
  margin:0;padding:11px 10px 10px;
  border:1px solid #303931;border-radius:11px;
  background:#0d120e;color:#fff;
}
.side-note .status-line{display:flex;align-items:center;gap:8px}
.side-note i{
  display:block;width:10px;height:10px;border-radius:50%;
  background:#2bd576;box-shadow:0 0 0 5px rgba(43,213,118,.10)
}
.side-note b{font-size:9px;font-weight:950}
.side-note small{display:block;margin:4px 0 0 18px;color:#7d8c82;font-size:8px}

.main{
  width:100%;
  max-width:1460px;
  margin:0 auto;
  padding:28px 28px 46px 30px;
}
.top{align-items:flex-end}
.top .eyebrow{
  color:#7e897f;font-size:9px;letter-spacing:1.8px;font-weight:950
}
h1{
  margin:5px 0 2px;
  font-size:35px;line-height:1;
  letter-spacing:-1.45px;
}
h2{font-size:18px;letter-spacing:-.25px;font-weight:500}
h3{font-weight:800}
.version{display:none}
.actions .theme{display:none}
.btn{
  border-color:#cbd2c8;
  border-radius:9px;
  background:#fff;
  box-shadow:none;
}
.btn.primary{background:var(--y);border-color:#d0c800;color:#10130f}

.periods{
  margin:18px 0 0;
  padding:4px;
  width:max-content;
  border:1px solid var(--line);
  border-radius:10px;
  background:#fff;
}
.periods button{
  border:0;border-radius:7px;
  padding:7px 12px;
  background:transparent;
  color:#6e776f;
  font-size:11px;font-weight:850
}
.periods button.on{background:#111611;color:#fff}

.filters{
  margin:12px 0 14px;
  padding:10px 11px;
  border:1px solid var(--line);
  border-radius:13px;
  background:#fff;
  box-shadow:none;
}
.filters label{color:#7d877d;font-size:8px;letter-spacing:.7px}
.filters input,.filters select,.filters>input,.filters>select{
  min-height:36px;border-color:#dce1d9;
  border-radius:8px;background:#fafbf9;
}
#search{min-width:260px}

.source{
  margin-bottom:12px;
  padding:13px 16px;
  border:1px solid #292f29;
  border-radius:13px;
  background:#111611;
}
.source b{font-size:12px}
.source span{font-size:10px}

.panel{
  margin-top:14px;
  padding:20px;
  border:1px solid var(--line);
  border-radius:16px;
  background:#fff;
  box-shadow:var(--shadow);
}
.panel-head{align-items:flex-start;margin-bottom:15px}
.section-kicker,.panel .eyebrow{
  margin-bottom:6px;color:#879187;
  font-size:9px;font-weight:950;letter-spacing:1.5px;
}
.muted{color:#7c857c}

.kpis{gap:10px}
.kpi{
  min-height:98px;
  padding:15px 16px;
  border:1px solid var(--line);
  border-radius:14px;
  background:#fff;
  box-shadow:none;
}
.kpi.hot{background:#111611;color:#fff;border-color:#111611}
.kpi small{color:#7f897f;font-size:9px}
.kpi strong{margin:9px 0 3px;font-size:24px}

.table-wrap{border-radius:10px}
.table{font-size:12px}
.table th{
  position:sticky;top:0;
  padding:10px 12px;
  background:#fff;
  color:#6f786f;
  border-bottom:1px solid var(--line);
  font-size:8px;font-weight:950;letter-spacing:.45px
}
.table td{
  padding:13px 12px;
  border-bottom:1px solid #d9ddd6;
  vertical-align:middle;
}
.table td:first-child b{font-weight:850}
#ingresos .finance-table th:nth-child(2),
#ingresos .finance-table td:nth-child(2){display:none}
#ingresos .finance-table td:nth-child(4) b{color:var(--green);font-size:13px}
#ingresos .finance-table td:nth-child(5) b{font-size:12px}
.finance-ledger{padding-bottom:18px}

.money-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.plan{
  min-height:282px;
  padding:19px 18px 15px;
  border:1px solid var(--line);
  border-radius:14px;
  background:#f9faf8;
}
.plan>small{
  display:block;
  color:#151914;
  font-size:13px;font-weight:900;
}
.plan strong{
  display:inline-block;
  margin-top:13px;
  color:var(--green);
  font-size:27px;letter-spacing:-.65px;
}
.plan>.muted{
  display:inline-block;
  margin-left:4px;
  font-size:8px;font-weight:750;
}
.plan table{margin-top:13px}
.plan td{
  padding:7px 0;
  border-top:1px solid #dce1da;
  color:#6f776f;
}
.plan td:last-child{color:#111611;font-weight:900}
.rate-label{
  color:#7c857c;font-size:9px;font-weight:850;
  white-space:nowrap
}
.rate-label input{
  width:82px;margin-left:6px;padding:7px 8px;
  border:1px solid var(--line);border-radius:8px;background:#fafbf9
}
.economy-panel{padding-bottom:18px}

.person,.stage,.plan{box-shadow:none}
.person:hover{border-color:#aeb7ac;box-shadow:0 5px 18px rgba(20,27,20,.06)}
.tag,.status{font-size:8px}
dialog{border:1px solid #303830}

[data-theme="dark"] .main,
[data-theme="dark"] .filters,
[data-theme="dark"] .panel,
[data-theme="dark"] .kpi,
[data-theme="dark"] .person,
[data-theme="dark"] .stage,
[data-theme="dark"] .plan,
[data-theme="dark"] .table th,
[data-theme="dark"] .profile-grid,
[data-theme="dark"] .form input,
[data-theme="dark"] .form select,
[data-theme="dark"] .filters input,
[data-theme="dark"] .filters select{
  background:var(--card);color:var(--ink);border-color:var(--line)
}

@media(max-width:900px){
  .app{grid-template-columns:190px minmax(0,1fr)}
  .side{padding-right:10px}
  .nav button{font-size:11px}
  .main{padding:20px}
  .money-grid{grid-template-columns:1fr}
}
@media(max-width:700px){
  .app{display:block}
  .side{position:relative;height:auto;padding:18px}
  .logo{padding-left:4px}
  .nav{display:flex;overflow:auto;margin-top:18px}
  .nav button{min-width:max-content}
  .side-note{display:none}
  .main{padding:16px}
  .money-grid{grid-template-columns:1fr}
}

/* ============================================================ */

.income-line-card{
  position:relative;
  overflow:hidden;
  border:1px solid #29312b;
  border-radius:14px;
  background:
    radial-gradient(circle at 20% 0%,rgba(255,255,255,.035),transparent 28%),
    linear-gradient(180deg,#101512 0%,#0a0f0c 100%);
  color:#eef2ee;
  padding:14px 15px 13px;
}
.income-chart-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:14px;
  margin-bottom:8px;
}
.income-chart-title{
  display:grid;
  gap:3px;
}
.income-chart-title b{
  color:#eef2ee;
  font-size:11px;
  font-weight:900;
}
.income-chart-title small{
  color:#7e8a80;
  font-size:8px;
  font-weight:800;
}
.income-legend{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:14px;
  flex-wrap:wrap;
  color:#9ca79e;
  font-size:8px;
  font-weight:800;
}
.income-legend span{display:flex;align-items:center;gap:6px}
.income-legend i{
  display:block;
  width:7px;height:7px;
  border-radius:50%;
  background:var(--legend-color);
  box-shadow:0 0 0 2px color-mix(in srgb,var(--legend-color) 18%,transparent);
}
.income-svg-wrap{
  width:100%;
  overflow:hidden;
}
.income-svg{
  display:block;
  width:100%;
  height:290px;
}
.income-grid-line{
  stroke:#273028;
  stroke-width:1;
  shape-rendering:crispEdges;
}
.income-grid-line.vertical{opacity:.55}
.income-axis-label{
  fill:#738078;
  font-size:9px;
  font-weight:700;
}
.income-month-label{
  fill:#8e9990;
  font-size:9px;
  font-weight:800;
  text-anchor:middle;
}
.income-line{
  fill:none;
  stroke-width:2.5;
  vector-effect:non-scaling-stroke;
  filter:drop-shadow(0 0 3px rgba(0,0,0,.2));
}
.income-point{
  stroke:#0c120e;
  stroke-width:2;
  vector-effect:non-scaling-stroke;
  cursor:pointer;
  transition:r .12s ease;
}
.income-point:hover{r:5.5}
.income-summary{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:8px;
  margin-top:9px;
}
.income-summary span{
  display:block;
  min-width:0;
  padding:9px 10px;
  border:1px solid #263029;
  border-radius:9px;
  background:#111812;
}
.income-summary small{
  display:block;
  color:#758178;
  font-size:7px;
  font-weight:950;
  letter-spacing:.35px;
}
.income-summary b{
  display:block;
  margin-top:4px;
  color:#eef2ee;
  font-size:14px;
  white-space:nowrap;
}
.income-summary span:nth-child(1) b{color:#fff200}
.income-summary span:nth-child(2) b{color:#d4dbd6}
.income-summary span:nth-child(3) b{color:#2bd576}

@media(max-width:760px){
  .income-chart-head{display:grid}
  .income-legend{justify-content:flex-start}
  .income-svg{height:250px}
  .income-summary{grid-template-columns:1fr}
}

/* ============================================================ */

.analytics-top-grid{
  display:grid;
  grid-template-columns:minmax(0,2.15fr) minmax(300px,.85fr);
  gap:14px;
  align-items:stretch;
}
.analytics-dark{
  background:
    radial-gradient(circle at 12% 0%,rgba(255,255,255,.035),transparent 26%),
    linear-gradient(180deg,#111712 0%,#0a0f0c 100%) !important;
  border-color:#273128 !important;
  color:#eef2ee !important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.025) !important;
}
.analytics-dark .eyebrow{color:#8d9a90}
.analytics-dark h2{color:#f2f5f2;font-weight:650}
.analytics-card-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:14px;
  margin-bottom:10px;
}
.dark-tabs{
  background:#151c17 !important;
  border-color:#303b32 !important;
}
.dark-tabs button{color:#9aa69d}
.dark-tabs button.on{
  background:var(--y) !important;
  color:#111 !important;
}
.visible-count{
  color:#edf1ed;
  font-size:11px;
  font-weight:900;
  white-space:nowrap;
}

/* income chart */
.income-line-card{
  border:0 !important;
  border-radius:0 !important;
  background:transparent !important;
  padding:0 !important;
}
.income-chart-head{
  align-items:center;
  margin:3px 0 5px;
}
.income-chart-title b{
  font-size:10px;
  color:#dce3dd;
}
.income-chart-title small{
  font-size:8px;
  color:#6f7c73;
}
.income-legend{
  gap:15px;
  font-size:8px;
  color:#9eaaa1;
}
.income-svg{
  height:auto;
  aspect-ratio:900/305;
}
.income-grid-line{
  stroke:#263029;
  opacity:.95;
}
.income-grid-line.vertical{opacity:.38}
.income-axis-label,
.income-month-label{
  fill:#718077;
}
.income-line{
  stroke-width:2.7;
}
.income-point{
  stroke:#0a0f0c;
  stroke-width:2.1;
}
.income-area{opacity:.10}
.income-last-label rect{
  fill:#161d18;
  stroke:#374239;
  stroke-width:1;
}
.income-last-label text{
  fill:#e9efea;
  font-size:8px;
  font-weight:850;
}
.income-summary{
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:7px;
  margin-top:7px;
}
.income-summary span{
  background:#111813;
  border-color:#273229;
  padding:8px 9px;
}
.income-summary small{color:#748078}
.income-summary b{font-size:13px}

/* acquisition donut */
.origin-donut-layout{
  display:grid;
  grid-template-columns:150px minmax(0,1fr);
  align-items:center;
  gap:16px;
  min-height:315px;
}
.origin-donut-wrap{
  position:relative;
  width:150px;
  height:150px;
  display:grid;
  place-items:center;
}
.origin-donut-svg{
  width:150px;
  height:150px;
  overflow:visible;
}
.origin-donut-bg{
  fill:none;
  stroke:#263128;
  stroke-width:22;
}
.origin-donut-seg{
  fill:none;
  stroke-width:22;
  stroke-linecap:butt;
  transform:rotate(-90deg);
  transform-origin:75px 75px;
  transition:opacity .15s ease;
}
.origin-donut-seg:hover{opacity:.72}
.origin-center{
  position:absolute;
  display:grid;
  place-items:center;
  text-align:center;
  pointer-events:none;
}
.origin-center b{
  font-size:25px;
  line-height:1;
  color:#fff;
}
.origin-center small{
  margin-top:4px;
  color:#79867d;
  font-size:8px;
}
.origin-legend{
  display:grid;
  gap:9px;
  min-width:0;
}
.origin-legend-row{
  display:grid;
  grid-template-columns:9px minmax(0,1fr) auto;
  align-items:center;
  gap:7px;
  min-width:0;
}
.origin-dot{
  width:7px;height:7px;border-radius:50%;
}
.origin-legend-row span{
  color:#eef2ee;
  font-size:10px;
  line-height:1.15;
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
}
.origin-legend-row b{
  color:#fff;
  font-size:10px;
}
.origin-share{
  color:#708078 !important;
  font-size:7px !important;
  grid-column:2/4;
  margin-top:-6px;
}

/* renewals - corrected, audit-friendly */
.renewal-master-panel{padding-bottom:18px}
.renewal-master-head{align-items:flex-start}
.renewal-overview{
  display:grid;
  grid-template-columns:150px repeat(3,minmax(0,1fr));
  gap:10px;
  align-items:stretch;
}
.renewal-score{
  min-height:118px;
  display:grid;
  place-items:center;
  align-content:center;
  border:1px solid #d9dfd6;
  border-radius:13px;
  background:#fbfcfa;
  text-align:center;
}
.renewal-score-ring{
  --rate:0;
  position:relative;
  width:84px;height:84px;
  display:grid;
  place-items:center;
  border-radius:50%;
  background:conic-gradient(#2bd576 calc(var(--rate)*1%),#e3e7e1 0);
}
.renewal-score-ring:after{
  content:'';
  position:absolute;
  inset:9px;
  border-radius:50%;
  background:#fbfcfa;
}
.renewal-score-ring b{
  position:relative;
  z-index:1;
  font-size:20px;
}
.renewal-score small{
  margin-top:7px;
  color:#7c877d;
  font-size:8px;
  font-weight:850;
}
.renewal-metric{
  min-height:118px;
  display:grid;
  align-content:center;
  padding:15px;
  border:1px solid #d9dfd6;
  border-radius:13px;
  background:#fbfcfa;
}
.renewal-metric small{
  color:#7c877d;
  font-size:8px;
  font-weight:950;
  letter-spacing:.4px;
}
.renewal-metric b{
  margin-top:7px;
  font-size:22px;
  letter-spacing:-.4px;
}
.renewal-metric span{
  margin-top:4px;
  color:#808980;
  font-size:8px;
}
.renewal-metric.good b{color:#25bd67}
.renewal-metric.warn b{color:#e09b2d}
.renewal-list-title{
  margin:16px 0 5px;
  color:#7a857c;
  font-size:8px;
  font-weight:950;
  letter-spacing:.7px;
}
.direction-renew-list>div{
  padding:10px 2px;
}
.direction-renew-list em b{color:#25bd67}
.renewal-audit-note{
  margin-top:11px;
  padding:9px 11px;
  border:1px solid #e5d995;
  border-radius:9px;
  background:#fffbed;
  color:#6e684e;
  font-size:8px;
}

@media(max-width:1100px){
  .analytics-top-grid{grid-template-columns:1fr}
  .origin-donut-layout{grid-template-columns:170px 1fr}
}
@media(max-width:760px){
  .origin-donut-layout{grid-template-columns:1fr;justify-items:center}
  .origin-legend{width:100%}
  .renewal-overview{grid-template-columns:1fr 1fr}
}
@media(max-width:520px){
  .renewal-overview{grid-template-columns:1fr}
  .income-summary{grid-template-columns:1fr}
}

/* ============================================================ */

.funnel-master-panel{padding-bottom:18px}
.funnel-master-head{align-items:flex-start}
.funnel-analytics-layout{
  display:grid;
  grid-template-columns:minmax(360px,430px) minmax(0,1fr);
  gap:14px;
  align-items:start;
}
.funnel-analytics-layout>.direction-funnel-wrap{padding:0}
.funnel-analytics-layout .membership-funnel-card{width:100%;max-width:none}
.funnel-insights-stack{
  display:grid;
  grid-template-columns:1.08fr .92fr;
  gap:12px;
  min-width:0;
}
.funnel-insight-card{
  min-width:0;
  min-height:100%;
  overflow:hidden;
  border:1px solid #2b3550;
  border-radius:15px;
  padding:16px;
  background:
    radial-gradient(circle at 15% 0%,rgba(113,124,255,.08),transparent 28%),
    linear-gradient(180deg,#10172a 0%,#0c1323 100%);
  color:#f2f5ff;
}
.funnel-insight-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:12px;
  margin-bottom:13px;
}
.funnel-insight-head small{
  display:block;
  color:#8d9aa8;
  font-size:8px;
  font-weight:950;
  letter-spacing:1.1px;
}
.funnel-insight-head h3{
  margin-top:5px;
  color:#fff;
  font-size:15px;
  font-weight:650;
}
.funnel-insight-head>b{
  color:#fff;
  font-size:9px;
  white-space:nowrap;
}

/* COHORTES */
.cohort-table-wrap{
  width:100%;
  overflow:auto;
}
.cohort-table{
  width:100%;
  min-width:520px;
  border-collapse:collapse;
}
.cohort-table th,
.cohort-table td{
  padding:10px 9px;
  border-bottom:1px solid #26324c;
  text-align:center;
}
.cohort-table th{
  color:#7f90bd;
  font-size:7px;
  font-weight:950;
  letter-spacing:.25px;
  text-transform:uppercase;
}
.cohort-table th:first-child,
.cohort-table td:first-child{text-align:left}
.cohort-table td{
  color:#fff;
  font-size:11px;
  font-weight:900;
}
.cohort-table .cohort-name{
  color:#fff;
  font-size:12px;
}
.cohort-heat{
  position:relative;
  overflow:hidden;
  border-radius:0;
  background:rgba(119,125,255,var(--heat-alpha));
  color:#fff!important;
}
.cohort-heat span{
  position:relative;
  z-index:1;
}
.cohort-empty{
  padding:28px 8px;
  color:#7f8aa4;
  text-align:center;
  font-size:9px;
}

/* TENDENCIA */
.trend-chart-wrap{
  width:100%;
  overflow:hidden;
}
.trend-svg{
  display:block;
  width:100%;
  height:auto;
  aspect-ratio:620/285;
}
.trend-grid{
  stroke:#28334a;
  stroke-width:1;
  shape-rendering:crispEdges;
}
.trend-axis{
  fill:#8390a7;
  font-size:8px;
}
.trend-month{
  fill:#8d9ab2;
  font-size:7px;
  text-anchor:middle;
  font-weight:800;
}
.trend-bar{rx:1.5}
.trend-legend{
  display:flex;
  justify-content:center;
  gap:13px;
  flex-wrap:wrap;
  margin-top:5px;
  color:#a7b1c3;
  font-size:8px;
  font-weight:850;
}
.trend-legend span{display:flex;align-items:center;gap:5px}
.trend-legend i{width:9px;height:9px;border-radius:1px}

/* small selected-filter badge */
.funnel-filter-note{
  margin-top:9px;
  color:#6f7f96;
  font-size:8px;
  text-align:right;
}

@media(max-width:1280px){
  .funnel-analytics-layout{grid-template-columns:380px minmax(0,1fr)}
  .funnel-insights-stack{grid-template-columns:1fr}
}
@media(max-width:950px){
  .funnel-analytics-layout{grid-template-columns:1fr}
  .funnel-insights-stack{grid-template-columns:1fr 1fr}
}
@media(max-width:700px){
  .funnel-insights-stack{grid-template-columns:1fr}
}

/* ============================================================ */

.potential-explain{
  display:flex;
  align-items:center;
  gap:14px;
  margin:9px 0 14px;
  padding:10px 14px;
  border:1px solid #e2d67d;
  border-radius:10px;
  background:#fffced;
  color:#6d6748;
  font-size:9px;
}
.potential-explain>b{
  color:#4d481f;
  font-size:10px;
  white-space:nowrap;
}
.potential-explain strong{color:#312f1c}
.kpi.potential{
  border-color:#e7d952;
  background:linear-gradient(180deg,#fffdf0,#fffbea);
}
.kpi.potential strong{color:#17170d}
.kpi.potential-mrr{
  border-color:#9da4ff;
  background:linear-gradient(180deg,#f8f8ff,#f0f1ff);
}
.kpi.potential-mrr strong{color:#6268ef}

/* ============================================================ */

/* ---------- Header & sticky filters ---------- */
.main{padding-top:24px}
.top{padding:3px 2px 0}
.top h1{font-size:38px}
#subtitle{margin-top:6px;font-size:10px}
.filter-dock{
  position:sticky;
  top:0;
  z-index:40;
  margin:14px -8px 14px;
  padding:8px;
  border:1px solid rgba(205,213,203,.82);
  border-radius:14px;
  background:rgba(237,241,235,.91);
  backdrop-filter:blur(14px);
  box-shadow:0 8px 28px rgba(20,28,21,.06);
}
.filter-dock .periods{margin:0 0 7px}
.filter-dock .filters{margin:0}
.compact-source{
  min-height:54px;
  padding:11px 15px;
  display:flex;
  align-items:center;
}
.compact-source div{
  display:flex;
  align-items:center;
  gap:13px;
  min-width:0;
}
.compact-source b{white-space:nowrap}
.compact-source span:not(.verified){
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

/* ---------- Executive hero strip ---------- */
.executive-strip{
  display:grid;
  grid-template-columns:1.16fr 1.08fr 1.18fr .9fr .96fr;
  gap:10px;
  margin:14px 0 12px;
}
.exec-card{
  position:relative;
  min-width:0;
  min-height:112px;
  padding:15px 16px;
  overflow:hidden;
  border:1px solid #d5dcd2;
  border-radius:15px;
  background:#fff;
}
.exec-card:after{
  content:'';
  position:absolute;
  inset:auto -30px -48px auto;
  width:105px;height:105px;
  border-radius:50%;
  background:rgba(50,215,119,.055);
}
.exec-card small{
  display:block;
  color:#768177;
  font-size:8px;
  font-weight:950;
  letter-spacing:.65px;
}
.exec-card strong{
  position:relative;
  z-index:1;
  display:block;
  margin-top:11px;
  color:#20251f;
  font-size:29px;
  line-height:1;
  letter-spacing:-1.1px;
  white-space:nowrap;
}
.exec-card span{
  position:relative;
  z-index:1;
  display:block;
  margin-top:7px;
  color:#7d877e;
  font-size:8px;
}
.exec-card.real-money{
  border-color:#9fe1bb;
  background:linear-gradient(180deg,#f5fff8,#effbf3);
}
.exec-card.real-money strong{color:#20bd67}
.exec-card.estimate{
  border:1px dashed #d9c630;
  background:linear-gradient(180deg,#fffdf1,#fff9d9);
}
.exec-card.estimate strong{color:#25230d}
.exec-card.estimate small:before{content:'✦ ';color:#c5b500}
.exec-card.mrr-potential{
  border-style:dashed;
  border-color:#9ea5ff;
  background:linear-gradient(180deg,#fafaff,#f0f1ff);
}
.exec-card.mrr-potential strong{color:#666cef}

/* ---------- KPI groups ---------- */
.kpi-groups{
  display:grid;
  grid-template-columns:1fr 1fr 1fr;
  gap:11px;
  margin-top:11px;
}
.kpi-group{
  min-width:0;
  padding:15px;
  border:1px solid #d5dcd2;
  border-radius:15px;
  background:#fff;
}
.kpi-group-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  min-height:45px;
  padding-bottom:10px;
  border-bottom:1px solid #e4e8e2;
}
.kpi-group-head small{
  display:block;
  color:#7d887e;
  font-size:8px;
  font-weight:950;
  letter-spacing:1px;
}
.kpi-group-head h3{
  margin-top:4px;
  font-size:13px;
  font-weight:850;
}
.kpi-group-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:7px;
  padding-top:10px;
}
.mini-kpi{
  min-width:0;
  min-height:79px;
  padding:10px 11px;
  border:1px solid #e0e5de;
  border-radius:11px;
  background:#fafbf9;
}
.mini-kpi small{
  display:block;
  color:#7d887e;
  font-size:7px;
  font-weight:900;
  letter-spacing:.25px;
}
.mini-kpi b{
  display:block;
  margin-top:7px;
  color:#151915;
  font-size:19px;
  line-height:1;
  letter-spacing:-.45px;
}
.mini-kpi span{
  display:block;
  margin-top:5px;
  color:#879087;
  font-size:7px;
}
.mini-kpi.good b{color:#20bd67}
.mini-kpi.warn b{color:#d79a1b}
.mini-kpi.bad b{color:#ed625a}
.mini-kpi.potential{
  border-style:dashed;
  border-color:#ded166;
  background:#fffdf2;
}
.mini-kpi.potential b{color:#3b381c}
.mini-kpi.purple{
  border-style:dashed;
  border-color:#b6baff;
  background:#f7f7ff;
}
.mini-kpi.purple b{color:#686ef0}
.forecast-note{
  display:flex;
  align-items:center;
  gap:12px;
  margin:10px 0 12px;
  padding:10px 13px;
  border:1px dashed #d8cc67;
  border-radius:11px;
  background:#fffdf0;
  color:#746d45;
  font-size:8px;
}
.forecast-note>b{color:#51491c;white-space:nowrap}
.forecast-note strong{color:#2e2c1c}

/* ---------- Historical Club context ---------- */
.club-context{
  margin:0 0 14px;
  border:1px solid #d8ded5;
  border-radius:13px;
  background:#f8faf7;
}
.club-context summary{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:11px 14px;
  color:#5f695f;
  font-size:9px;
  font-weight:900;
  cursor:pointer;
  list-style:none;
}
.club-context summary::-webkit-details-marker{display:none}
.club-context summary span{color:#8a948b;font-size:8px}
.club-context[open] summary{border-bottom:1px solid #dfe4dd}
.club-context .snapshot{
  padding:11px;
  margin:0;
  grid-template-columns:repeat(6,1fr);
}
.club-context .kpi{
  min-height:83px;
  padding:11px;
  box-shadow:none;
}
.club-context .kpi strong{font-size:19px}

/* ---------- One coherent dark analytics world ---------- */
.analytics-zone{
  margin:15px -1px 14px;
  padding:14px;
  border:1px solid #263028;
  border-radius:18px;
  background:
    radial-gradient(circle at 12% -5%,rgba(255,230,0,.055),transparent 22%),
    linear-gradient(180deg,#0f1511 0%,#090e0b 100%);
}
.analytics-zone-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-end;
  gap:16px;
  padding:3px 3px 12px;
}
.analytics-zone-head h2{
  margin:4px 0 0;
  color:#f3f6f3;
  font-size:21px;
  font-weight:700;
}
.analytics-zone-head p{
  margin:5px 0 0;
  color:#738078;
  font-size:9px;
}
.analytics-overline{
  color:#8d9a90;
  font-size:8px;
  font-weight:950;
  letter-spacing:1.4px;
}
.analytics-master-tabs{
  border-color:#343d35 !important;
  background:#151c17 !important;
}
.analytics-master-tabs button{color:#95a198}
.analytics-master-tabs button.on{
  background:var(--y) !important;
  color:#111 !important;
}
.analytics-zone>.analytics-top-grid{margin:0}
.analytics-zone .panel{
  box-shadow:none;
}
.analytics-zone .renewal-master-panel,
.analytics-zone .funnel-master-panel{
  border-color:#29322b;
  background:#101612;
  color:#eef3ef;
}
.analytics-zone .renewal-master-panel .muted,
.analytics-zone .funnel-master-panel .muted{color:#78857b}
.analytics-zone .renewal-master-panel h2,
.analytics-zone .funnel-master-panel h2{color:#f4f6f4}
.analytics-zone .renewal-score,
.analytics-zone .renewal-metric{
  border-color:#283229;
  background:#141b16;
  color:#f1f4f1;
}
.analytics-zone .renewal-score-ring:after{background:#141b16}
.analytics-zone .renewal-metric small,
.analytics-zone .renewal-metric span,
.analytics-zone .renewal-score small{color:#7f8b82}
.analytics-zone .renewal-audit-note{
  border-color:#5e5933;
  background:#1b1a10;
  color:#a9a27b;
}
.analytics-zone .direction-renew-list>div{border-color:#283229}
.analytics-zone .funnel-insight-card{border-color:#293452}

/* attention becomes the only light operational panel after analytics */
#priorityCards .person{background:#fff}

/* responsive */
@media(max-width:1200px){
  .executive-strip{grid-template-columns:repeat(3,1fr)}
  .kpi-groups{grid-template-columns:1fr 1fr}
  .forecast-group{grid-column:1/-1}
}
@media(max-width:880px){
  .filter-dock{position:relative}
  .executive-strip{grid-template-columns:1fr 1fr}
  .kpi-groups{grid-template-columns:1fr}
  .forecast-group{grid-column:auto}
  .club-context .snapshot{grid-template-columns:repeat(3,1fr)}
  .analytics-zone-head{align-items:flex-start;flex-direction:column}
}
@media(max-width:560px){
  .executive-strip{grid-template-columns:1fr}
  .kpi-group-grid{grid-template-columns:1fr 1fr}
  .club-context .snapshot{grid-template-columns:1fr 1fr}
  .forecast-note{align-items:flex-start;flex-direction:column}
}

/* ============================================================ */

/* ---------- Journey command ---------- */
.journey-command{
  margin:0 0 14px;
  padding:18px;
  border:1px solid #273129;
  border-radius:18px;
  background:
    radial-gradient(circle at 10% 0%,rgba(255,230,0,.055),transparent 24%),
    linear-gradient(180deg,#101612 0%,#090e0b 100%);
  color:#f2f5f2;
}
.journey-command-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:16px;
  margin-bottom:14px;
}
.journey-command .eyebrow{color:#88958b}
.journey-command h2{
  margin:4px 0 0;
  color:#f4f6f4;
  font-size:20px;
  font-weight:700;
}
.journey-command p{
  margin:5px 0 0;
  color:#758178;
  font-size:9px;
}
.journey-legend{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  color:#87938a;
  font-size:8px;
  font-weight:850;
}
.journey-legend span{display:flex;align-items:center;gap:5px}
.journey-legend i{width:7px;height:7px;border-radius:50%}
.club-dot{background:#777dff}
.community-dot{background:#35d27c}
.direct-dot{background:#ffe600}

/* ---------- Main journey flow ---------- */
.route-funnel{
  display:grid;
  grid-template-columns:minmax(0,1fr) 210px;
  gap:12px;
}
.route-main-lane,
.route-direct-lane{
  border:1px solid #28332b;
  border-radius:14px;
  background:#121914;
}
.route-main-lane{padding:14px}
.route-lane-title{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:11px;
}
.route-lane-title small{
  color:#758278;
  font-size:8px;
  font-weight:950;
  letter-spacing:.7px;
}
.route-lane-title b{
  color:#fff;
  font-size:10px;
}
.route-steps{
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:8px;
  align-items:stretch;
}
.route-step{
  position:relative;
  min-width:0;
  padding:12px 10px 10px;
  border:1px solid #2c372e;
  border-radius:11px;
  background:#161e18;
}
.route-step:not(:last-child):after{
  content:'›';
  position:absolute;
  top:50%;
  right:-8px;
  z-index:3;
  transform:translateY(-50%);
  display:grid;
  place-items:center;
  width:16px;height:26px;
  border-radius:8px;
  background:#090e0b;
  color:#ffe600;
  font-size:17px;
}
.route-step small{
  display:block;
  min-height:22px;
  color:#8b978e;
  font-size:7px;
  font-weight:950;
}
.route-step b{
  display:block;
  margin-top:8px;
  color:#fff;
  font-size:23px;
  line-height:1;
  letter-spacing:-.6px;
}
.route-step span{
  display:block;
  margin-top:6px;
  color:#738078;
  font-size:7px;
}
.route-step.community{
  border-color:#28543a;
  background:#122018;
}
.route-step.community b{color:#35d27c}
.route-step.club-paid b{color:#9196ff}
.route-step .conv{
  display:inline-flex;
  margin-top:8px;
  padding:3px 6px;
  border-radius:999px;
  background:#232d25;
  color:#b4beb6;
  font-size:7px;
  font-weight:900;
}

.route-direct-lane{
  display:grid;
  align-content:center;
  padding:14px;
}
.route-direct-lane small{
  color:#7d897f;
  font-size:8px;
  font-weight:950;
  letter-spacing:.7px;
}
.route-direct-lane strong{
  display:block;
  margin-top:8px;
  color:#ffe600;
  font-size:27px;
  line-height:1;
}
.route-direct-lane>span{
  margin-top:5px;
  color:#7c887f;
  font-size:8px;
}
.direct-conversion{
  margin-top:13px;
  padding-top:11px;
  border-top:1px solid #2a342c;
}
.direct-conversion b{
  color:#35d27c;
  font-size:16px;
}
.direct-conversion span{
  display:block;
  margin-top:3px;
  color:#7c887f;
  font-size:7px;
}

/* ---------- Cohorts + route split ---------- */
.journey-insights-grid{
  display:grid;
  grid-template-columns:minmax(0,1.7fr) minmax(280px,.8fr);
  gap:12px;
  margin-top:12px;
}
.journey-cohorts-card,
.journey-direct-card{
  min-width:0;
  overflow:hidden;
  border:1px solid #28332b;
  border-radius:14px;
  background:#111813;
  padding:14px;
}
.journey-card-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:12px;
  margin-bottom:10px;
}
.journey-card-head small{
  display:block;
  color:#79857c;
  font-size:7px;
  font-weight:950;
  letter-spacing:.8px;
}
.journey-card-head h3{
  margin-top:4px;
  color:#f1f5f2;
  font-size:14px;
  font-weight:650;
}
.journey-card-head>b{
  color:#8b978f;
  font-size:8px;
  white-space:nowrap;
}
.member-cohort-wrap{overflow:auto}
.member-cohort-table{
  width:100%;
  min-width:680px;
  border-collapse:collapse;
}
.member-cohort-table th,
.member-cohort-table td{
  padding:9px 8px;
  border-bottom:1px solid #263129;
  text-align:center;
}
.member-cohort-table th{
  color:#718078;
  font-size:7px;
  font-weight:950;
  letter-spacing:.3px;
}
.member-cohort-table th:first-child,
.member-cohort-table td:first-child{text-align:left}
.member-cohort-table td{
  color:#eef3ef;
  font-size:9px;
  font-weight:850;
}
.member-cohort-table td b{
  display:block;
  font-size:11px;
}
.member-cohort-table td span{
  display:block;
  margin-top:2px;
  color:#7f8b82;
  font-size:7px;
}
.member-cohort-table td.heat{
  background:rgba(53,210,124,var(--heat));
}
.member-cohort-table td.direct-heat{
  background:rgba(255,230,0,var(--heat));
  color:#fff;
}

/* split card */
.route-split{
  display:grid;
  gap:9px;
}
.split-block{
  padding:12px;
  border:1px solid #29342b;
  border-radius:11px;
  background:#151d17;
}
.split-block small{
  display:block;
  color:#7b887e;
  font-size:7px;
  font-weight:950;
}
.split-block b{
  display:block;
  margin-top:7px;
  color:#fff;
  font-size:21px;
}
.split-block span{
  display:block;
  margin-top:4px;
  color:#7d897f;
  font-size:7px;
}
.split-block.club b{color:#9196ff}
.split-block.community b{color:#35d27c}
.split-block.direct b{color:#ffe600}
.split-rate{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:9px;
  padding:9px 2px 0;
  color:#859188;
  font-size:8px;
}
.split-rate strong{color:#fff}

/* ---------- CRM list controls ---------- */
.member-crm-panel{padding-top:17px}
.member-crm-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-end;
  gap:16px;
  margin-bottom:13px;
}
.member-sort{
  display:flex;
  align-items:center;
  gap:5px;
  flex-wrap:wrap;
  justify-content:flex-end;
}
.member-sort>span{
  margin-right:4px;
  color:#89938a;
  font-size:7px;
  font-weight:950;
  letter-spacing:.7px;
}
.member-sort button{
  border:1px solid #d8ddd5;
  border-radius:8px;
  padding:7px 9px;
  background:#f8faf7;
  color:#707a71;
  font-size:8px;
  font-weight:850;
  cursor:pointer;
}
.member-sort button.on{
  border-color:#161b17;
  background:#111611;
  color:#fff;
}
.member-table-wrap{
  border-top:1px solid #e0e4de;
}
.member-table td{
  vertical-align:middle;
}
.member-table th:nth-child(6),
.member-table td:nth-child(6){
  min-width:360px;
}
.route-cell{min-width:0}
.route-tags{
  display:flex;
  align-items:center;
  gap:4px;
  flex-wrap:wrap;
}
.route-tags>b{color:#9aa39b;font-size:9px}
.route-direct{
  display:inline-flex;
  padding:4px 6px;
  border-radius:999px;
  background:#fff8b8;
  color:#6c6200;
  font-size:7px;
  font-weight:950;
}
.route-progress{
  display:flex;
  align-items:center;
  gap:8px;
  margin-top:7px;
}
.route-progress>div{
  width:112px;
  height:5px;
  overflow:hidden;
  border-radius:999px;
  background:#e8ece6;
}
.route-progress i{
  display:block;
  height:100%;
  border-radius:inherit;
  background:linear-gradient(90deg,#777dff,#35d27c);
}
.route-progress span{
  color:#89928a;
  font-size:7px;
  white-space:nowrap;
}

@media(max-width:1200px){
  .route-funnel{grid-template-columns:1fr}
  .route-direct-lane{grid-template-columns:1fr 1fr;align-items:center}
  .journey-insights-grid{grid-template-columns:1fr}
}
@media(max-width:900px){
  .route-steps{grid-template-columns:1fr 1fr 1fr}
  .route-step:after{display:none}
  .member-crm-head{align-items:flex-start;flex-direction:column}
  .member-sort{justify-content:flex-start}
}
@media(max-width:600px){
  .journey-command-head{flex-direction:column}
  .route-steps{grid-template-columns:1fr}
  .route-direct-lane{grid-template-columns:1fr}
}

/* ============================================================ */

/* ==========================================================
   V17 — TEMA UNIFICADO
   Claro por defecto. El botón superior transforma todos los
   módulos de contenido al modo oscuro. La barra lateral de
   marca permanece oscura en ambos modos.
   ========================================================== */

/* ---------- Theme button ---------- */
.actions .theme{
  display:inline-flex !important;
  align-items:center;
  justify-content:center;
  min-height:39px;
  margin:0 !important;
  padding:9px 13px;
  border:1px solid #cfd6cc;
  border-radius:9px;
  background:#fff;
  color:#273027;
  font-size:10px;
  font-weight:900;
  cursor:pointer;
  white-space:nowrap;
  transition:.18s ease;
}
.actions .theme:hover{
  border-color:#aeb8ad;
  transform:translateY(-1px);
}

/* ==========================================================
   LIGHT MODE — every content module uses the same light skin
   ========================================================== */
html:not([data-theme="dark"]){
  color-scheme:light;
  --ink:#111611;
  --mut:#758078;
  --line:#d7ddd4;
  --bg:#edf1eb;
  --card:#fff;
}
html:not([data-theme="dark"]) body{
  background:#edf1eb !important;
  color:#111611 !important;
}
html:not([data-theme="dark"]) .main{
  background:transparent !important;
  color:#111611 !important;
}

/* Generic surfaces */
html:not([data-theme="dark"]) .panel,
html:not([data-theme="dark"]) .kpi,
html:not([data-theme="dark"]) .person,
html:not([data-theme="dark"]) .stage,
html:not([data-theme="dark"]) .plan,
html:not([data-theme="dark"]) .kpi-group,
html:not([data-theme="dark"]) .exec-card,
html:not([data-theme="dark"]) .member-crm-panel,
html:not([data-theme="dark"]) .renewal-master-panel,
html:not([data-theme="dark"]) .funnel-master-panel,
html:not([data-theme="dark"]) .journey-command,
html:not([data-theme="dark"]) .journey-cohorts-card,
html:not([data-theme="dark"]) .journey-direct-card,
html:not([data-theme="dark"]) .analytics-zone,
html:not([data-theme="dark"]) .analytics-dark,
html:not([data-theme="dark"]) .membership-funnel-card,
html:not([data-theme="dark"]) .funnel-insight-card,
html:not([data-theme="dark"]) .route-main-lane,
html:not([data-theme="dark"]) .route-direct-lane,
html:not([data-theme="dark"]) .renewal-score,
html:not([data-theme="dark"]) .renewal-metric,
html:not([data-theme="dark"]) .split-block{
  background:#fff !important;
  color:#111611 !important;
  border-color:#d8ded5 !important;
  box-shadow:none !important;
}

/* Source / status is also a light module */
html:not([data-theme="dark"]) .source.compact-source{
  background:#fff !important;
  color:#111611 !important;
  border:1px solid #d8ded5 !important;
  border-left:4px solid #f0dc00 !important;
}
html:not([data-theme="dark"]) .source.compact-source b{
  color:#514b00 !important;
}
html:not([data-theme="dark"]) .source.compact-source span{
  color:#6f786f !important;
}
html:not([data-theme="dark"]) .source .verified{
  color:#565f57 !important;
  border-color:#d7ddd4 !important;
  background:#f7f9f6 !important;
}

/* Sticky filter bar */
html:not([data-theme="dark"]) .filter-dock{
  background:rgba(237,241,235,.94) !important;
  border-color:#d3dad0 !important;
}
html:not([data-theme="dark"]) .filters,
html:not([data-theme="dark"]) .periods{
  background:#fff !important;
  border-color:#d8ded5 !important;
}
html:not([data-theme="dark"]) .filters input,
html:not([data-theme="dark"]) .filters select,
html:not([data-theme="dark"]) .rate-label input,
html:not([data-theme="dark"]) .form input,
html:not([data-theme="dark"]) .form select{
  background:#fbfcfa !important;
  color:#111611 !important;
  border-color:#dce2d9 !important;
}

/* Executive strip / KPI grouping */
html:not([data-theme="dark"]) .exec-card.real-money{
  background:linear-gradient(180deg,#f7fff9,#eefaf2) !important;
  border-color:#a8e2be !important;
}
html:not([data-theme="dark"]) .exec-card.estimate{
  background:linear-gradient(180deg,#fffef3,#fff9dd) !important;
  border-color:#d7c940 !important;
}
html:not([data-theme="dark"]) .exec-card.mrr-potential{
  background:linear-gradient(180deg,#fafaff,#f1f2ff) !important;
  border-color:#aeb3ff !important;
}
html:not([data-theme="dark"]) .mini-kpi{
  background:#fafbf9 !important;
  color:#111611 !important;
  border-color:#e0e5de !important;
}
html:not([data-theme="dark"]) .mini-kpi.potential{
  background:#fffdf1 !important;
}
html:not([data-theme="dark"]) .mini-kpi.purple{
  background:#f6f6ff !important;
}
html:not([data-theme="dark"]) .forecast-note,
html:not([data-theme="dark"]) .potential-explain,
html:not([data-theme="dark"]) .renewal-audit-note{
  background:#fffdf2 !important;
  color:#68613e !important;
  border-color:#ddcf6c !important;
}
html:not([data-theme="dark"]) .club-context{
  background:#f9faf8 !important;
  border-color:#d8ded5 !important;
}

/* ---------- Analytics becomes light too ---------- */
html:not([data-theme="dark"]) .analytics-zone{
  background:#f7f9f6 !important;
  border:1px solid #d4dbd1 !important;
}
html:not([data-theme="dark"]) .analytics-zone-head h2,
html:not([data-theme="dark"]) .analytics-dark h2,
html:not([data-theme="dark"]) .funnel-master-panel h2,
html:not([data-theme="dark"]) .renewal-master-panel h2,
html:not([data-theme="dark"]) .journey-command h2,
html:not([data-theme="dark"]) .journey-card-head h3,
html:not([data-theme="dark"]) .funnel-insight-head h3{
  color:#151a15 !important;
}
html:not([data-theme="dark"]) .analytics-zone-head p,
html:not([data-theme="dark"]) .analytics-overline,
html:not([data-theme="dark"]) .analytics-dark .eyebrow,
html:not([data-theme="dark"]) .journey-command .eyebrow,
html:not([data-theme="dark"]) .funnel-insight-head small,
html:not([data-theme="dark"]) .journey-card-head small{
  color:#778178 !important;
}
html:not([data-theme="dark"]) .analytics-master-tabs,
html:not([data-theme="dark"]) .dark-tabs{
  background:#eef2ec !important;
  border-color:#d4dbd1 !important;
}
html:not([data-theme="dark"]) .analytics-master-tabs button,
html:not([data-theme="dark"]) .dark-tabs button{
  color:#687269 !important;
}
html:not([data-theme="dark"]) .analytics-master-tabs button.on,
html:not([data-theme="dark"]) .dark-tabs button.on{
  background:#f4e600 !important;
  color:#111 !important;
}

/* Income chart light skin */
html:not([data-theme="dark"]) .income-line-card{
  background:transparent !important;
  color:#111611 !important;
}
html:not([data-theme="dark"]) .income-chart-title b,
html:not([data-theme="dark"]) .income-legend,
html:not([data-theme="dark"]) .income-legend span{
  color:#3d463e !important;
}
html:not([data-theme="dark"]) .income-chart-title small{
  color:#7f8980 !important;
}
html:not([data-theme="dark"]) .income-grid-line{
  stroke:#dfe5dc !important;
}
html:not([data-theme="dark"]) .income-axis-label,
html:not([data-theme="dark"]) .income-month-label{
  fill:#7b857c !important;
}
html:not([data-theme="dark"]) .income-last-label rect{
  fill:#fff !important;
  stroke:#cfd7cd !important;
}
html:not([data-theme="dark"]) .income-last-label text{
  fill:#222922 !important;
}
html:not([data-theme="dark"]) .income-summary span{
  background:#f8faf7 !important;
  border-color:#dce2d9 !important;
}
html:not([data-theme="dark"]) .income-summary small{
  color:#7b857c !important;
}
html:not([data-theme="dark"]) .income-summary b{
  color:#182018 !important;
}

/* Acquisition donut */
html:not([data-theme="dark"]) .origin-donut-bg{
  stroke:#e4e9e2 !important;
}
html:not([data-theme="dark"]) .origin-center b,
html:not([data-theme="dark"]) .origin-legend-row b,
html:not([data-theme="dark"]) .origin-legend-row span{
  color:#202720 !important;
}
html:not([data-theme="dark"]) .origin-center small,
html:not([data-theme="dark"]) .origin-share{
  color:#7a857b !important;
}
html:not([data-theme="dark"]) .visible-count{
  color:#303830 !important;
}

/* Funnel module background is light; funnel itself remains graphical */
html:not([data-theme="dark"]) .membership-funnel-title{
  color:#252c25 !important;
}
html:not([data-theme="dark"]) .funnel-card-footer{
  border-color:#dce2d9 !important;
}
html:not([data-theme="dark"]) .funnel-card-footer>div{
  background:#f8faf7 !important;
  border-color:#dce2d9 !important;
}
html:not([data-theme="dark"]) .funnel-card-footer b{
  color:#1a211a !important;
}
html:not([data-theme="dark"]) .funnel-card-footer small{
  color:#788278 !important;
}
html:not([data-theme="dark"]) .funnel-side-row{
  border-color:#e3e7e1 !important;
}
html:not([data-theme="dark"]) .funnel-side-row span{
  color:#333b34 !important;
}
html:not([data-theme="dark"]) .funnel-side-row small{
  color:#818b82 !important;
}

/* Cohorts / trend cards */
html:not([data-theme="dark"]) .funnel-insight-card{
  background:#fff !important;
  border-color:#d8ded5 !important;
}
html:not([data-theme="dark"]) .funnel-insight-head>b{
  color:#4e584f !important;
}
html:not([data-theme="dark"]) .cohort-table th,
html:not([data-theme="dark"]) .member-cohort-table th{
  color:#78847b !important;
}
html:not([data-theme="dark"]) .cohort-table td,
html:not([data-theme="dark"]) .member-cohort-table td{
  color:#202720 !important;
  border-color:#e2e7df !important;
}
html:not([data-theme="dark"]) .trend-grid{
  stroke:#dfe5dc !important;
}
html:not([data-theme="dark"]) .trend-axis,
html:not([data-theme="dark"]) .trend-month{
  fill:#7c877e !important;
}
html:not([data-theme="dark"]) .trend-legend{
  color:#69746b !important;
}

/* Renewals */
html:not([data-theme="dark"]) .renewal-score,
html:not([data-theme="dark"]) .renewal-metric{
  background:#fafbf9 !important;
}
html:not([data-theme="dark"]) .renewal-score-ring:after{
  background:#fafbf9 !important;
}
html:not([data-theme="dark"]) .renewal-score-ring b,
html:not([data-theme="dark"]) .renewal-metric b{
  color:#1c231d !important;
}
html:not([data-theme="dark"]) .direction-renew-list>div{
  border-color:#e0e5de !important;
}

/* Journey tab light */
html:not([data-theme="dark"]) .journey-command{
  background:#f7f9f6 !important;
}
html:not([data-theme="dark"]) .journey-command p,
html:not([data-theme="dark"]) .journey-legend,
html:not([data-theme="dark"]) .route-lane-title small,
html:not([data-theme="dark"]) .route-step small,
html:not([data-theme="dark"]) .route-step span,
html:not([data-theme="dark"]) .route-direct-lane>span,
html:not([data-theme="dark"]) .direct-conversion span,
html:not([data-theme="dark"]) .split-block small,
html:not([data-theme="dark"]) .split-block span{
  color:#788279 !important;
}
html:not([data-theme="dark"]) .route-main-lane,
html:not([data-theme="dark"]) .route-direct-lane,
html:not([data-theme="dark"]) .journey-cohorts-card,
html:not([data-theme="dark"]) .journey-direct-card{
  background:#fff !important;
}
html:not([data-theme="dark"]) .route-step{
  background:#f8faf7 !important;
  border-color:#dce2d9 !important;
}
html:not([data-theme="dark"]) .route-step b,
html:not([data-theme="dark"]) .route-lane-title b,
html:not([data-theme="dark"]) .split-block b,
html:not([data-theme="dark"]) .split-rate strong{
  color:#1d241e !important;
}
html:not([data-theme="dark"]) .route-step.community{
  background:#f3fbf6 !important;
  border-color:#bfe6cd !important;
}
html:not([data-theme="dark"]) .journey-card-head h3{
  color:#1c231d !important;
}
html:not([data-theme="dark"]) .member-cohort-table td{
  color:#202720 !important;
}

/* Tables & dialogs */
html:not([data-theme="dark"]) .table th{
  background:#fff !important;
  color:#6f796f !important;
}
html:not([data-theme="dark"]) .table td{
  color:#171d18 !important;
  border-color:#dfe4dd !important;
}
html:not([data-theme="dark"]) .member-row:hover{
  background:#f7f9f6 !important;
}
html:not([data-theme="dark"]) dialog{
  background:#fff !important;
  color:#111611 !important;
}
html:not([data-theme="dark"]) .profile-grid{
  background:#f5f7f4 !important;
}

/* ==========================================================
   DARK MODE — transform the whole content area consistently
   ========================================================== */
html[data-theme="dark"]{
  color-scheme:dark;
  --ink:#edf2ed;
  --mut:#8f9a91;
  --line:#2a342c;
  --bg:#080d09;
  --card:#111713;
}
html[data-theme="dark"] body{
  background:#080d09 !important;
  color:#edf2ed !important;
}
html[data-theme="dark"] .main{
  background:#080d09 !important;
  color:#edf2ed !important;
}
html[data-theme="dark"] h1,
html[data-theme="dark"] h2,
html[data-theme="dark"] h3,
html[data-theme="dark"] b,
html[data-theme="dark"] strong{
  color:#f3f6f3;
}
html[data-theme="dark"] .muted,
html[data-theme="dark"] .handle,
html[data-theme="dark"] .eyebrow{
  color:#879289 !important;
}

/* every content surface */
html[data-theme="dark"] .panel,
html[data-theme="dark"] .kpi,
html[data-theme="dark"] .person,
html[data-theme="dark"] .stage,
html[data-theme="dark"] .plan,
html[data-theme="dark"] .kpi-group,
html[data-theme="dark"] .exec-card,
html[data-theme="dark"] .member-crm-panel,
html[data-theme="dark"] .renewal-master-panel,
html[data-theme="dark"] .funnel-master-panel,
html[data-theme="dark"] .journey-command,
html[data-theme="dark"] .journey-cohorts-card,
html[data-theme="dark"] .journey-direct-card,
html[data-theme="dark"] .analytics-zone,
html[data-theme="dark"] .analytics-dark,
html[data-theme="dark"] .membership-funnel-card,
html[data-theme="dark"] .funnel-insight-card,
html[data-theme="dark"] .route-main-lane,
html[data-theme="dark"] .route-direct-lane,
html[data-theme="dark"] .renewal-score,
html[data-theme="dark"] .renewal-metric,
html[data-theme="dark"] .split-block,
html[data-theme="dark"] .filters,
html[data-theme="dark"] .periods,
html[data-theme="dark"] .club-context{
  background:#111713 !important;
  color:#edf2ed !important;
  border-color:#2b352d !important;
  box-shadow:none !important;
}

html[data-theme="dark"] .filter-dock{
  background:rgba(8,13,9,.92) !important;
  border-color:#273029 !important;
}
html[data-theme="dark"] .source.compact-source{
  background:#111713 !important;
  color:#edf2ed !important;
  border:1px solid #2b352d !important;
  border-left:4px solid #f0dc00 !important;
}
html[data-theme="dark"] .source.compact-source b{color:#f4e600 !important}
html[data-theme="dark"] .source.compact-source span{color:#89958c !important}
html[data-theme="dark"] .source .verified{
  color:#aab4ac !important;
  border-color:#364138 !important;
  background:#151c17 !important;
}

html[data-theme="dark"] .actions .theme,
html[data-theme="dark"] .btn,
html[data-theme="dark"] .periods button,
html[data-theme="dark"] .member-sort button{
  background:#151c17 !important;
  color:#dfe5df !important;
  border-color:#333e35 !important;
}
html[data-theme="dark"] .btn.primary,
html[data-theme="dark"] .periods button.on,
html[data-theme="dark"] .member-sort button.on,
html[data-theme="dark"] .analytics-master-tabs button.on{
  background:#f4e600 !important;
  color:#111 !important;
  border-color:#f4e600 !important;
}
html[data-theme="dark"] .filters input,
html[data-theme="dark"] .filters select,
html[data-theme="dark"] .rate-label input,
html[data-theme="dark"] .form input,
html[data-theme="dark"] .form select{
  background:#0d130f !important;
  color:#edf2ed !important;
  border-color:#2c372f !important;
}

/* executive cards keep semantic tints in dark mode */
html[data-theme="dark"] .exec-card.real-money{
  background:#0f1d15 !important;
  border-color:#285e3d !important;
}
html[data-theme="dark"] .exec-card.real-money strong{color:#36db82 !important}
html[data-theme="dark"] .exec-card.estimate{
  background:#1c1a0e !important;
  border-color:#5e5522 !important;
}
html[data-theme="dark"] .exec-card.mrr-potential{
  background:#14162b !important;
  border-color:#42487c !important;
}
html[data-theme="dark"] .exec-card.mrr-potential strong{color:#858bff !important}

html[data-theme="dark"] .mini-kpi{
  background:#0d130f !important;
  border-color:#28332b !important;
}
html[data-theme="dark"] .mini-kpi.potential{
  background:#19180d !important;
  border-color:#5a5223 !important;
}
html[data-theme="dark"] .mini-kpi.purple{
  background:#13152a !important;
  border-color:#40467c !important;
}
html[data-theme="dark"] .forecast-note,
html[data-theme="dark"] .potential-explain,
html[data-theme="dark"] .renewal-audit-note{
  background:#19180d !important;
  color:#a9a27b !important;
  border-color:#5a5223 !important;
}

/* charts */
html[data-theme="dark"] .income-grid-line{stroke:#263029 !important}
html[data-theme="dark"] .income-axis-label,
html[data-theme="dark"] .income-month-label{fill:#718077 !important}
html[data-theme="dark"] .income-summary span{
  background:#0d130f !important;
  border-color:#28332b !important;
}
html[data-theme="dark"] .origin-donut-bg{stroke:#263128 !important}
html[data-theme="dark"] .origin-center b,
html[data-theme="dark"] .origin-legend-row b,
html[data-theme="dark"] .origin-legend-row span{color:#f0f4f0 !important}
html[data-theme="dark"] .funnel-card-footer>div{
  background:#0d130f !important;
  border-color:#28332b !important;
}
html[data-theme="dark"] .cohort-table td,
html[data-theme="dark"] .member-cohort-table td{
  color:#eef3ef !important;
  border-color:#273229 !important;
}
html[data-theme="dark"] .trend-grid{stroke:#28334a !important}
html[data-theme="dark"] .trend-axis,
html[data-theme="dark"] .trend-month{fill:#8d9ab2 !important}
html[data-theme="dark"] .renewal-score-ring:after{background:#111713 !important}
html[data-theme="dark"] .direction-renew-list>div{border-color:#283229 !important}

/* journey dark */
html[data-theme="dark"] .route-step{
  background:#161e18 !important;
  border-color:#2c372e !important;
}
html[data-theme="dark"] .route-step.community{
  background:#122018 !important;
  border-color:#28543a !important;
}
html[data-theme="dark"] .route-step b,
html[data-theme="dark"] .route-lane-title b,
html[data-theme="dark"] .split-block b,
html[data-theme="dark"] .split-rate strong{
  color:#fff !important;
}
html[data-theme="dark"] .route-progress>div{background:#273129 !important}

/* tables */
html[data-theme="dark"] .table th{
  background:#111713 !important;
  color:#8d988f !important;
  border-color:#29342c !important;
}
html[data-theme="dark"] .table td{
  color:#eaf0eb !important;
  border-color:#29342c !important;
}
html[data-theme="dark"] .member-row:hover{background:#151d17 !important}
html[data-theme="dark"] dialog{
  background:#111713 !important;
  color:#edf2ed !important;
}
html[data-theme="dark"] .profile-grid{background:#0d130f !important}
html[data-theme="dark"] .close{background:#263028 !important;color:#fff !important}

/* Keep semantic colors readable */
html[data-theme="dark"] .success,
html[data-theme="dark"] .good b{color:#35d27c !important}
html[data-theme="dark"] .danger,
html[data-theme="dark"] .bad b{color:#ff6a63 !important}
html[data-theme="dark"] .warn b{color:#e0a83b !important}

/* Smooth transition: not on SVG paths, only module surfaces */
body,.main,.panel,.kpi,.kpi-group,.exec-card,.filters,.filter-dock,
.analytics-zone,.analytics-dark,.membership-funnel-card,.funnel-insight-card,
.journey-command,.journey-cohorts-card,.journey-direct-card,.member-crm-panel,
.route-main-lane,.route-direct-lane,.renewal-score,.renewal-metric,
.source.compact-source{
  transition:background-color .18s ease,border-color .18s ease,color .18s ease;
}

@media(max-width:790px){
  .actions .theme{margin-top:0 !important}
}

/* ============================================================ */

/* ==========================================================
   V18 — ANALYTICS ARMONICO
   3 tarjetas alineadas arriba + 4 métricas alineadas debajo
   ========================================================== */

.analytics-v18{
  padding:14px !important;
}
.analytics-v18 .analytics-zone-head{
  padding:3px 3px 13px;
}
.analytics-v18 .analytics-zone-head h2{
  font-size:20px;
  letter-spacing:-.35px;
}
.analytics-v18 .analytics-zone-head p{
  margin-top:4px;
}

/* top row */
.analytics-hero-grid{
  display:grid;
  grid-template-columns:minmax(0,2.15fr) minmax(230px,.88fr) minmax(280px,1.15fr);
  gap:10px;
  align-items:stretch;
}
.analytics-card{
  min-width:0;
  margin:0 !important;
  border-radius:11px !important;
  padding:13px !important;
  overflow:hidden;
}
.analytics-card-head{
  min-height:41px;
  margin-bottom:6px !important;
}
.analytics-card-head h3{
  margin-top:3px;
  font-size:13px;
  font-weight:800;
  letter-spacing:-.15px;
}
.analytics-card-head .eyebrow{
  font-size:7px !important;
  letter-spacing:1px;
}
.analytics-card-badge{
  display:inline-flex;
  align-items:center;
  min-height:24px;
  padding:0 8px;
  border:1px solid currentColor;
  border-radius:7px;
  opacity:.62;
  font-size:7px;
  font-weight:900;
  white-space:nowrap;
}

.analytics-card-income,
.analytics-card-funnel,
.analytics-card-origin{
  min-height:352px;
  height:352px;
}
.analytics-card-income{
  display:flex;
  flex-direction:column;
}
.analytics-card-income #directionIncome{
  flex:1;
  min-height:0;
}
.analytics-card-income .income-line-card{
  height:100%;
  display:flex;
  flex-direction:column;
}
.analytics-card-income .income-svg-wrap{
  flex:1;
  display:flex;
  min-height:0;
}
.analytics-card-income .income-svg{
  height:235px !important;
  max-height:235px;
  aspect-ratio:auto !important;
}
.analytics-card-income .income-summary{
  display:none !important;
}
.analytics-card-income .income-chart-head{
  margin:0 0 3px !important;
}
.analytics-card-income .income-chart-title small{
  font-size:7px;
}

/* funnel — compact, same visual height */
.analytics-card-funnel #directionFunnel,
.analytics-card-funnel .direction-funnel-wrap,
.analytics-card-funnel .membership-funnel-card{
  height:calc(100% - 2px);
}
.analytics-card-funnel .direction-funnel-wrap{
  padding:0 !important;
}
.analytics-card-funnel .membership-funnel-card{
  width:100% !important;
  max-width:none !important;
  padding:8px 6px 3px !important;
  border:0 !important;
  background:transparent !important;
}
.analytics-card-funnel .membership-funnel-title{
  display:none !important;
}
.analytics-card-funnel .membership-funnel-grid{
  grid-template-columns:minmax(0,1fr) 92px !important;
  gap:7px !important;
  min-height:0 !important;
}
.analytics-card-funnel .membership-funnel-shape{
  min-height:226px !important;
  height:226px;
}
.analytics-card-funnel .funnel-segment{
  min-height:50px !important;
}
.analytics-card-funnel .funnel-segment b{
  font-size:15px !important;
}
.analytics-card-funnel .funnel-side-row{
  min-height:50px !important;
}
.analytics-card-funnel .funnel-side-row span{
  font-size:8px !important;
}
.analytics-card-funnel .funnel-side-row small{
  font-size:6.5px !important;
}
.analytics-card-funnel .funnel-card-footer{
  grid-template-columns:repeat(3,1fr) !important;
  gap:4px !important;
  margin-top:6px !important;
  padding-top:6px !important;
}
.analytics-card-funnel .funnel-card-footer>div{
  padding:6px 5px !important;
  border-radius:6px !important;
}
.analytics-card-funnel .funnel-card-footer small{
  font-size:5.5px !important;
}
.analytics-card-funnel .funnel-card-footer b{
  margin-top:2px !important;
  font-size:11px !important;
}

/* origin */
.analytics-card-origin{
  display:flex;
  flex-direction:column;
}
.analytics-card-origin #originDonut{
  flex:1;
  display:flex;
  align-items:center;
}
.analytics-card-origin .origin-donut-layout{
  width:100%;
  min-height:0 !important;
  grid-template-columns:132px minmax(0,1fr) !important;
  gap:10px !important;
}
.analytics-card-origin .origin-donut-wrap{
  width:132px !important;
  height:132px !important;
}
.analytics-card-origin .origin-donut-svg{
  width:132px !important;
  height:132px !important;
}
.analytics-card-origin .origin-center b{
  font-size:22px !important;
}
.analytics-card-origin .origin-legend{
  gap:6px !important;
}
.analytics-card-origin .origin-legend-row{
  gap:5px !important;
}
.analytics-card-origin .origin-legend-row span,
.analytics-card-origin .origin-legend-row b{
  font-size:8px !important;
}
.analytics-card-origin .origin-share{
  font-size:6px !important;
  margin-top:-5px !important;
}

/* second row */
.analytics-status-grid{
  display:grid;
  grid-template-columns:1.05fr .95fr 1.05fr 1.18fr;
  gap:10px;
  margin-top:10px;
}
.analytics-mini-card{
  min-height:145px;
  height:145px;
  padding:12px !important;
}
.mini-analytics-title{
  display:block;
  margin-bottom:10px;
  font-size:9px;
  font-weight:900;
}
.mini-analytics-title-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
}
.mini-analytics-title-row small{
  font-size:6px;
  opacity:.6;
}

/* subscriptions */
.subscription-hero{
  display:flex;
  align-items:baseline;
  gap:6px;
  margin-bottom:10px;
}
.subscription-hero strong{
  font-size:25px;
  line-height:1;
}
.subscription-hero span{
  font-size:7px;
  opacity:.62;
}
.subscription-split{
  display:grid;
  gap:8px;
}
.subscription-split>div{
  display:grid;
  grid-template-columns:62px minmax(0,1fr) 24px;
  gap:7px;
  align-items:center;
  font-size:7px;
}
.subscription-split i{
  height:8px;
  overflow:hidden;
  border-radius:2px;
  background:rgba(128,138,130,.18);
}
.subscription-split i b{
  display:block;
  height:100%;
  border-radius:inherit;
  background:#f4e600;
}
.subscription-split>div:nth-child(2) i b{
  background:#cfd6d1;
}
.subscription-split em{
  font-style:normal;
  text-align:right;
  font-weight:900;
}

/* movement */
.movement-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:0;
  height:88px;
}
.movement-grid>div{
  display:grid;
  align-content:center;
  padding:0 10px;
}
.movement-grid>div+div{
  border-left:1px solid rgba(128,138,130,.2);
}
.movement-grid small{
  font-size:6px;
  opacity:.55;
  font-weight:900;
}
.movement-grid strong{
  margin-top:6px;
  color:#2bd576 !important;
  font-size:22px;
  line-height:1;
}
.movement-grid strong.negative{
  color:#ff625f !important;
}
.movement-grid span{
  margin-top:5px;
  font-size:7px;
  opacity:.65;
}

/* renewal */
.renewal-compact{
  display:grid;
  grid-template-columns:78px minmax(0,1fr);
  align-items:center;
  gap:10px;
}
.renewal-compact-ring{
  position:relative;
  width:72px;
  height:72px;
  display:grid;
  place-items:center;
  border-radius:50%;
  background:conic-gradient(#2bd576 calc(var(--rate)*1%),rgba(128,138,130,.2) 0);
}
.renewal-compact-ring:after{
  content:'';
  position:absolute;
  inset:8px;
  border-radius:50%;
  background:var(--card);
}
.renewal-compact-ring b{
  position:relative;
  z-index:1;
  font-size:16px;
}
.renewal-compact>div:last-child{
  display:grid;
  gap:4px;
}
.renewal-compact strong{
  font-size:8px;
}
.renewal-compact span{
  font-size:6.5px;
  opacity:.6;
}
.renewal-compact em{
  width:max-content;
  margin-top:2px;
  padding:3px 6px;
  border-radius:5px;
  background:rgba(43,213,118,.12);
  color:#2bd576;
  font-size:6px;
  font-style:normal;
  font-weight:900;
}

/* next renewals */
.analytics-next-renewals{
  display:flex;
  flex-direction:column;
}
#analyticsNextRenewals{
  display:grid;
  gap:0;
  flex:1;
}
.renewal-window-row{
  display:grid;
  grid-template-columns:15px 32px 1fr;
  align-items:center;
  gap:5px;
  min-height:24px;
  border-bottom:1px solid rgba(128,138,130,.16);
}
.renewal-window-row span{
  font-size:7px;
  opacity:.55;
}
.renewal-window-row b{
  font-size:9px;
}
.renewal-window-row small{
  font-size:7px;
  opacity:.65;
}
.renewal-window-foot{
  display:flex;
  justify-content:space-between;
  align-items:end;
  gap:8px;
  padding-top:7px;
}
.renewal-window-foot strong{
  color:#2bd576 !important;
  font-size:12px;
}
.renewal-window-foot span{
  font-size:6px;
  opacity:.55;
}

/* deep-dive row */
.analytics-deep-grid{
  display:grid;
  grid-template-columns:1.08fr .92fr;
  gap:10px;
  margin-top:10px;
}
.analytics-deep-card{
  min-height:300px;
}
.analytics-deep-card .cohort-table-wrap{
  max-height:235px;
}
.analytics-deep-card .trend-svg{
  max-height:220px;
}

/* light mode stays harmonic */
html:not([data-theme="dark"]) .analytics-v18{
  background:#f4f7f2 !important;
  border-color:#d6ddd3 !important;
}
html:not([data-theme="dark"]) .analytics-v18 .analytics-card{
  background:#fff !important;
  border-color:#d8ded5 !important;
}
html:not([data-theme="dark"]) .renewal-compact-ring:after{
  background:#fff !important;
}

/* dark mode: every card same family */
html[data-theme="dark"] .analytics-v18{
  background:#090e0b !important;
}
html[data-theme="dark"] .analytics-v18 .analytics-card{
  background:#101612 !important;
  border-color:#28322a !important;
}
html[data-theme="dark"] .renewal-compact-ring:after{
  background:#101612 !important;
}

/* response */
@media(max-width:1180px){
  .analytics-hero-grid{
    grid-template-columns:1.8fr 1fr;
  }
  .analytics-card-origin{
    grid-column:1/-1;
    height:auto;
    min-height:250px;
  }
  .analytics-card-origin .origin-donut-layout{
    grid-template-columns:150px minmax(0,1fr) !important;
  }
  .analytics-status-grid{
    grid-template-columns:1fr 1fr;
  }
}
@media(max-width:760px){
  .analytics-hero-grid,
  .analytics-status-grid,
  .analytics-deep-grid{
    grid-template-columns:1fr;
  }
  .analytics-card-income,
  .analytics-card-funnel,
  .analytics-card-origin,
  .analytics-mini-card{
    height:auto;
    min-height:0;
  }
  .analytics-card-income .income-svg{
    height:auto !important;
    max-height:none;
  }
}

/* ============================================================ */

.executive-source{
  gap:14px;
}
.executive-source .source-copy{
  flex:1;
  min-width:0;
}
.executive-source-tools{
  display:flex !important;
  align-items:center;
  justify-content:flex-end;
  gap:10px !important;
  flex:0 0 auto;
}
.executive-product-tabs{
  display:flex;
  align-items:center;
  gap:3px;
  padding:3px;
  border:1px solid #d4dbd1;
  border-radius:8px;
  background:#f4f7f2;
}
.executive-product-tabs button{
  min-height:25px;
  padding:0 9px;
  border:0;
  border-radius:6px;
  background:transparent;
  color:#6f796f;
  font-size:7px;
  font-weight:950;
  cursor:pointer;
}
.executive-product-tabs button.on{
  background:#f4e600;
  color:#111;
}
html[data-theme="dark"] .executive-product-tabs{
  border-color:#344036;
  background:#151c17;
}
html[data-theme="dark"] .executive-product-tabs button{
  color:#96a199;
}
html[data-theme="dark"] .executive-product-tabs button.on{
  background:#f4e600;
  color:#111;
}
@media(max-width:980px){
  .executive-source{
    align-items:flex-start;
    flex-direction:column;
  }
  .executive-source-tools{
    width:100%;
    justify-content:space-between;
  }
}
@media(max-width:560px){
  .executive-source-tools{
    align-items:flex-start;
    flex-direction:column;
  }
}

/* ============================================================ */

/* Previsión: contraste correcto en modo oscuro */
html[data-theme="dark"] .mini-kpi.potential{
  background:#18170c !important;
  border-color:#756922 !important;
}
html[data-theme="dark"] .mini-kpi.potential small{
  color:#c4ba79 !important;
}
html[data-theme="dark"] .mini-kpi.potential b{
  color:#fff0a0 !important;
  text-shadow:0 0 14px rgba(255,230,0,.08);
}
html[data-theme="dark"] .mini-kpi.potential span{
  color:#9f9871 !important;
}
html[data-theme="dark"] .exec-card.estimate{
  background:#1b190d !important;
  border-color:#756922 !important;
}
html[data-theme="dark"] .exec-card.estimate small{
  color:#c8be7b !important;
}
html[data-theme="dark"] .exec-card.estimate strong{
  color:#fff1a7 !important;
}
html[data-theme="dark"] .exec-card.estimate span{
  color:#a29a72 !important;
}
html[data-theme="dark"] .forecast-note{
  color:#c3bb8c !important;
}
html[data-theme="dark"] .forecast-note>b,
html[data-theme="dark"] .forecast-note strong{
  color:#fff0a0 !important;
}

/* Ejes independientes de la gráfica de ingresos */
.income-axis-title{
  font-size:7px;
  font-weight:950;
  letter-spacing:.55px;
}
.income-axis-title-left,
.income-axis-left{
  fill:#c8bd00 !important;
}
.income-axis-title-right,
.income-axis-right{
  fill:#3fcf85 !important;
}
html[data-theme="dark"] .income-axis-title-left,
html[data-theme="dark"] .income-axis-left{
  fill:#fff200 !important;
}
html[data-theme="dark"] .income-axis-title-right,
html[data-theme="dark"] .income-axis-right{
  fill:#55d896 !important;
}
html[data-theme="dark"] .income-line[stroke="#fff200"]{
  filter:drop-shadow(0 0 4px rgba(255,242,0,.38));
}
html[data-theme="dark"] .income-line[stroke="#55d896"]{
  filter:drop-shadow(0 0 4px rgba(85,216,150,.28));
}

/* ============================================================ */

/* ---------- Global analytics legibility ---------- */
.analytics-v18{
  --analytics-text:12px;
}
.analytics-v18 .analytics-card-head h3{
  font-size:15px !important;
  line-height:1.15;
}
.analytics-v18 .analytics-card-head .eyebrow{
  font-size:8px !important;
  letter-spacing:1.15px !important;
}
.analytics-v18 .analytics-card-badge{
  min-height:28px;
  padding:0 10px;
  font-size:8px;
}
.analytics-v18 .mini-analytics-title{
  font-size:10px;
}
.analytics-v18 .income-chart-title b{
  font-size:11px !important;
}
.analytics-v18 .income-chart-title small{
  font-size:8px !important;
  line-height:1.35;
}
.analytics-v18 .income-legend{
  gap:12px !important;
  font-size:9px !important;
}
.analytics-v18 .income-legend i{
  width:9px !important;
  height:9px !important;
}
.analytics-v18 .income-axis-label{
  font-size:10px !important;
  font-weight:800 !important;
}
.analytics-v18 .income-axis-title{
  font-size:8px !important;
  font-weight:950 !important;
}
.analytics-v18 .income-month-label{
  font-size:9px !important;
  font-weight:850 !important;
}
.analytics-v18 .origin-legend-row span,
.analytics-v18 .origin-legend-row b{
  font-size:9px !important;
}
.analytics-v18 .origin-share{
  font-size:7px !important;
}
.analytics-v18 .origin-center b{
  font-size:26px !important;
}
.analytics-v18 .funnel-side-row span{
  font-size:9px !important;
}
.analytics-v18 .funnel-side-row small{
  font-size:7px !important;
}
.analytics-v18 .funnel-segment b{
  font-size:17px !important;
}

/* ---------- Income graph interaction ---------- */
.income-point{
  cursor:crosshair !important;
  outline:none;
  transform-box:fill-box;
  transform-origin:center;
  transition:r .14s ease, filter .14s ease, opacity .14s ease;
}
.income-point:hover,
.income-point:focus{
  r:7.5 !important;
  filter:drop-shadow(0 0 7px currentColor);
  opacity:1;
}
.income-hover-guide{
  opacity:0;
  stroke:rgba(255,255,255,.34);
  stroke-width:1.2;
  stroke-dasharray:5 5;
  vector-effect:non-scaling-stroke;
  pointer-events:none;
  transition:opacity .12s ease;
}
.income-hover-guide.show{
  opacity:1;
}
html:not([data-theme="dark"]) .income-hover-guide{
  stroke:rgba(22,30,23,.28);
}

/* line drawing animation */
.income-line{
  stroke-dasharray:var(--path-len,0);
  stroke-dashoffset:var(--path-len,0);
}
.income-line.drawn{
  animation:incomeDraw .85s cubic-bezier(.16,.75,.28,1) forwards;
}
.income-area{
  opacity:0 !important;
}
.income-area.area-in{
  animation:incomeAreaIn .72s .35s ease forwards;
}
.income-point{
  opacity:0;
  transform:scale(.25);
}
.income-point.point-in{
  animation:incomePointIn .32s var(--point-delay,120ms) cubic-bezier(.2,.9,.3,1.35) forwards;
}
@keyframes incomeDraw{
  to{stroke-dashoffset:0}
}
@keyframes incomeAreaIn{
  to{opacity:.10}
}
@keyframes incomePointIn{
  to{opacity:1;transform:scale(1)}
}

/* ---------- Premium big tooltip ---------- */
.chart-rich-tooltip{
  position:fixed;
  top:0;
  left:0;
  z-index:9999;
  min-width:190px;
  max-width:250px;
  padding:13px 14px 12px;
  border:1px solid rgba(255,255,255,.15);
  border-radius:12px;
  background:rgba(10,15,11,.96);
  color:#f7faf7;
  box-shadow:0 16px 44px rgba(0,0,0,.34);
  backdrop-filter:blur(14px);
  opacity:0;
  visibility:hidden;
  pointer-events:none;
  transform:translate3d(-9999px,-9999px,0);
  transition:opacity .12s ease, visibility .12s ease;
}
.chart-rich-tooltip.show{
  opacity:1;
  visibility:visible;
}
.chart-rich-tooltip-head{
  display:flex;
  align-items:center;
  gap:8px;
  margin-bottom:8px;
}
.chart-rich-tooltip-head i{
  width:9px;
  height:9px;
  border-radius:50%;
  flex:0 0 auto;
}
.chart-rich-tooltip-head span{
  color:#cbd4cc;
  font-size:10px;
  font-weight:850;
}
.chart-rich-tooltip strong{
  display:block;
  color:#fff;
  font-size:23px;
  line-height:1;
  letter-spacing:-.5px;
}
.chart-rich-tooltip small{
  display:block;
  margin-top:7px;
  color:#8e9b91;
  font-size:9px;
  font-weight:800;
}
html:not([data-theme="dark"]) .chart-rich-tooltip{
  border-color:#d3dad1;
  background:rgba(255,255,255,.98);
  color:#111611;
  box-shadow:0 16px 44px rgba(21,31,23,.18);
}
html:not([data-theme="dark"]) .chart-rich-tooltip-head span{
  color:#59645b;
}
html:not([data-theme="dark"]) .chart-rich-tooltip strong{
  color:#111611;
}
html:not([data-theme="dark"]) .chart-rich-tooltip small{
  color:#768178;
}

/* ---------- Cards feel more alive, but restrained ---------- */
.analytics-v18 .analytics-card{
  transition:transform .18s ease,border-color .18s ease,box-shadow .18s ease;
}
.analytics-v18 .analytics-card:hover{
  transform:translateY(-2px);
  box-shadow:0 10px 28px rgba(0,0,0,.08) !important;
}
html[data-theme="dark"] .analytics-v18 .analytics-card:hover{
  border-color:#3b493e !important;
  box-shadow:0 12px 34px rgba(0,0,0,.28) !important;
}
html:not([data-theme="dark"]) .analytics-v18 .analytics-card:hover{
  border-color:#bcc6bb !important;
}

/* ---------- Better spacing / easier scanning ---------- */
.analytics-v18 .analytics-hero-grid,
.analytics-v18 .analytics-status-grid,
.analytics-v18 .analytics-deep-grid{
  gap:12px !important;
}
.analytics-v18 .analytics-card{
  padding:15px !important;
}
.analytics-v18 .analytics-card-income .income-svg{
  height:245px !important;
  max-height:245px !important;
}
.analytics-v18 .renewal-window-row{
  min-height:27px !important;
}
.analytics-v18 .renewal-window-row b{
  font-size:10px !important;
}
.analytics-v18 .renewal-window-row small{
  font-size:8px !important;
}
.analytics-v18 .movement-grid small,
.analytics-v18 .subscription-split,
.analytics-v18 .renewal-compact span,
.analytics-v18 .renewal-compact strong{
  font-size:8px !important;
}

/* Accessibility: users who prefer reduced motion get instant charts */
@media (prefers-reduced-motion: reduce){
  .income-line,.income-area,.income-point,.analytics-card{
    animation:none !important;
    transition:none !important;
  }
  .income-line{stroke-dashoffset:0 !important}
  .income-area{opacity:.10 !important}
  .income-point{opacity:1 !important;transform:none !important}
}


/* ============================================================
   V23 — FIREBASE LIVE STATUS
   ============================================================ */
.firebase-toolbar{
  display:flex;
  align-items:center;
  gap:8px;
  margin-left:auto;
}
.firebase-status{
  display:flex;
  align-items:center;
  gap:7px;
  min-width:145px;
  padding:6px 9px;
  border:1px solid #d8ded5;
  border-radius:9px;
  background:#f7f9f6;
}
.firebase-status-dot{
  width:8px;
  height:8px;
  flex:0 0 auto;
  border-radius:50%;
  background:#b0b8b1;
  box-shadow:0 0 0 4px rgba(176,184,177,.12);
}
.firebase-status b{
  display:block;
  color:#273028;
  font-size:7px;
  font-weight:950;
  letter-spacing:.3px;
}
.firebase-status small{
  display:block;
  margin-top:1px;
  color:#7d877e;
  font-size:6px;
}
.firebase-status[data-state="online"] .firebase-status-dot{
  background:#2bd576;
  box-shadow:0 0 0 4px rgba(43,213,118,.12);
}
.firebase-status[data-state="loading"] .firebase-status-dot{
  background:#f0d900;
  box-shadow:0 0 0 4px rgba(240,217,0,.13);
}
.firebase-status[data-state="auth"] .firebase-status-dot{
  background:#777dff;
  box-shadow:0 0 0 4px rgba(119,125,255,.12);
}
.firebase-status[data-state="offline"] .firebase-status-dot{
  background:#ff7168;
  box-shadow:0 0 0 4px rgba(255,113,104,.11);
}
.firebase-auth-btn{
  min-height:31px;
  padding:0 9px;
  border:1px solid #d5dbd2;
  border-radius:8px;
  background:#fff;
  color:#465047;
  font-size:7px;
  font-weight:900;
  cursor:pointer;
}
.firebase-user-email{
  max-width:170px;
  overflow:hidden;
  color:#748075;
  font-size:7px;
  text-overflow:ellipsis;
  white-space:nowrap;
}

html[data-theme="dark"] .firebase-status{
  border-color:#334037;
  background:#151c17;
}
html[data-theme="dark"] .firebase-status b{
  color:#edf3ee;
}
html[data-theme="dark"] .firebase-status small,
html[data-theme="dark"] .firebase-user-email{
  color:#829087;
}
html[data-theme="dark"] .firebase-auth-btn{
  border-color:#344037;
  background:#151c17;
  color:#dfe6e0;
}

@media(max-width:980px){
  .firebase-toolbar{
    width:100%;
    flex-wrap:wrap;
    margin-left:0;
  }
}

/* ============================================================
   V24 — CALENDARIO DE VENTAS
   ============================================================ */
.sales-calendar-shell{display:grid;gap:13px}
.sales-calendar-hero{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;padding:19px 20px;border:1px solid #d7ddd4;border-radius:16px;background:#fff}
.sales-calendar-hero h2{margin:4px 0 0;font-size:22px;font-weight:800;letter-spacing:-.4px}
.sales-calendar-hero p{margin:6px 0 0;color:#788279;font-size:9px}
.sales-calendar-controls{display:flex;align-items:center;gap:8px}
.sales-year-nav{display:flex;align-items:center;gap:2px;padding:3px;border:1px solid #d7ddd4;border-radius:9px;background:#f7f9f6}
.sales-year-nav button,.calendar-today-btn{min-height:31px;border:0;border-radius:7px;background:transparent;color:#4e584f;font-weight:900;cursor:pointer}
.sales-year-nav button{width:31px;font-size:13px}
.sales-year-nav strong{min-width:55px;text-align:center;font-size:11px}
.calendar-today-btn{padding:0 12px;border:1px solid #d7ddd4;background:#fff;font-size:8px}
.calendar-product-tabs{display:flex;width:max-content;gap:3px;padding:3px;border:1px solid #d7ddd4;border-radius:9px;background:#fff}
.calendar-product-tabs button{min-height:28px;padding:0 12px;border:0;border-radius:7px;background:transparent;color:#707a71;font-size:8px;font-weight:950;cursor:pointer}
.calendar-product-tabs button.on{background:#f4e600;color:#111}
.calendar-filter-row{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}
.calendar-trials-toggle{display:inline-flex;align-items:center;gap:8px;min-height:34px;padding:4px 5px 4px 11px;border:1px solid #d7ddd4;border-radius:999px;background:#fff;color:#6f796f;font-size:7px;font-weight:950;letter-spacing:.08em;cursor:pointer;transition:.18s ease}
.calendar-trials-toggle b{display:grid;place-items:center;min-width:34px;height:24px;padding:0 7px;border-radius:999px;background:#edf0eb;color:#747d75;font-size:7px}
.calendar-trials-toggle.on{border-color:#e5d900;background:#fffef0;color:#171b17}
.calendar-trials-toggle.on b{background:#f4e600;color:#111}
.dot-trial,.sales-day-dots i.trial{background:#f4e600;box-shadow:0 0 0 1px #d5c900 inset}
.calendar-sale-icon.trial{background:#f4e600;color:#111}
.calendar-sale-row.trial-row{background:#fffef2;border-color:#eee594}
.calendar-sale-row.trial-row .calendar-sale-money b{color:#9a8e00}
.calendar-day-summary:has(.trial-summary){grid-template-columns:1fr 1fr 1fr}
.calendar-day-summary .trial-summary b{color:#9a8e00}
html[data-theme="dark"] .calendar-trials-toggle{background:#111713;border-color:#2b352d;color:#dfe5df}
html[data-theme="dark"] .calendar-trials-toggle.on{background:#292a10;border-color:#d7cb00}
html[data-theme="dark"] .calendar-sale-row.trial-row{background:#211f0c!important;border-color:#514d18!important}
@media(max-width:720px){.calendar-filter-row{align-items:stretch}.calendar-trials-toggle{justify-content:space-between}.calendar-day-summary:has(.trial-summary){grid-template-columns:1fr 1fr}.calendar-day-summary .trial-summary{grid-column:1/-1}}

.calendar-year-summary{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:9px}
.calendar-year-summary>div{min-width:0;padding:12px 13px;border:1px solid #d8ded5;border-radius:12px;background:#fff}
.calendar-year-summary small,.calendar-kpi small{display:block;color:#7b867c;font-size:7px;font-weight:950;letter-spacing:.45px}
.calendar-year-summary b{display:block;margin-top:6px;color:#191f1a;font-size:18px;letter-spacing:-.4px}
.calendar-year-summary b.green{color:#22bd68}
.calendar-year-summary span{display:block;margin-top:4px;color:#8a938b;font-size:7px}
.calendar-month-selector{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:5px}
.calendar-month-selector button{min-width:0;padding:9px 6px;border:1px solid #d8ded5;border-radius:10px;background:#fff;text-align:left;cursor:pointer;transition:.15s ease}
.calendar-month-selector button:hover{transform:translateY(-1px);border-color:#aeb9ae}
.calendar-month-selector button.on{border-color:#111611;background:#111611}
.calendar-month-selector small{display:block;color:#818b82;font-size:7px;font-weight:950}
.calendar-month-selector b{display:block;margin-top:5px;color:#1e251f;font-size:10px;white-space:nowrap}
.calendar-month-selector span{display:block;margin-top:3px;color:#8b948c;font-size:6px}
.calendar-month-selector button.on small,.calendar-month-selector button.on b{color:#fff}
.calendar-month-selector button.on span{color:#9eaaa0}
.calendar-kpi-grid{display:grid;grid-template-columns:1.25fr 1.25fr .9fr 1fr 1fr .9fr;gap:8px}
.calendar-kpi{min-width:0;padding:13px 14px;border:1px solid #d8ded5;border-radius:12px;background:#fff}
.calendar-kpi b{display:block;margin-top:7px;color:#1d241e;font-size:20px;line-height:1;letter-spacing:-.5px}
.calendar-kpi span{display:block;margin-top:6px;color:#879188;font-size:7px}
.calendar-kpi.net{border-color:#9edfb8;background:#f5fff8}
.calendar-kpi.net b{color:#20bd67}
.calendar-kpi.club b{color:#777dff}.calendar-kpi.community b{color:#27bd70}
.calendar-main-grid{display:grid;grid-template-columns:minmax(0,1.75fr) minmax(290px,.65fr);gap:12px;align-items:start}
.calendar-panel,.calendar-day-panel{border:1px solid #d8ded5;border-radius:15px;background:#fff}
.calendar-panel{padding:15px}
.calendar-panel-head,.calendar-day-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.calendar-panel-head{margin-bottom:12px}
.calendar-panel-head small,.calendar-day-head small{color:#7b867c;font-size:7px;font-weight:950;letter-spacing:.7px}
.calendar-panel-head h3,.calendar-day-head h3{margin-top:4px;font-size:16px;font-weight:800}
.calendar-dot-legend{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:10px;color:#788279;font-size:7px;font-weight:850}
.calendar-dot-legend span{display:flex;align-items:center;gap:4px}
.calendar-dot-legend i,.sales-day-dots i{width:7px;height:7px;border-radius:50%}
.dot-club,.sales-day-dots i.club{background:#777dff}.dot-community,.sales-day-dots i.community{background:#2bd576}.dot-refund,.sales-day-dots i.refund{background:#ff665f}
.calendar-weekdays{display:grid;grid-template-columns:repeat(7,1fr);gap:5px;margin-bottom:5px}
.calendar-weekdays span{padding:0 7px 5px;color:#879188;font-size:7px;font-weight:950;text-transform:uppercase}
.sales-calendar-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:5px}
.sales-day{position:relative;min-height:104px;padding:8px;overflow:hidden;border:1px solid #e0e5de;border-radius:10px;background:#fbfcfa;color:#1d241e;text-align:left;cursor:pointer;transition:.14s ease}
.sales-day:hover{border-color:#abb6ac;transform:translateY(-1px)}
.sales-day.outside{opacity:.33;cursor:default}
.sales-day.has-sales{background:#fff;border-color:#cdd6cc}
.sales-day.selected{border-color:#222a23;box-shadow:0 0 0 2px rgba(20,27,21,.08)}
.sales-day.today:after{content:'HOY';position:absolute;top:7px;right:7px;color:#6c6200;font-size:5px;font-weight:950;letter-spacing:.5px}
.sales-day-top{display:flex;align-items:center;justify-content:space-between}
.sales-day-top>span{font-size:9px;font-weight:900}
.sales-day-top>b{display:grid;place-items:center;min-width:18px;height:18px;padding:0 4px;border-radius:999px;background:#111611;color:#fff;font-size:6px}
.sales-day-dots{display:flex;align-items:center;gap:3px;min-height:10px;margin-top:7px}
.sales-day-dots em{color:#7d877e;font-size:6px;font-style:normal}
.sales-day-money{position:absolute;left:8px;right:8px;bottom:8px}
.sales-day-money strong{display:block;color:#1c231d;font-size:9px;white-space:nowrap}
.sales-day-money small{display:block;margin-top:2px;color:#22ad62;font-size:7px;font-weight:850}
.calendar-day-panel{position:sticky;top:90px;padding:15px}
.calendar-day-head{padding-bottom:11px;border-bottom:1px solid #e1e6df}
.calendar-day-head>span{color:#7e8980;font-size:7px;font-weight:900}
.calendar-day-summary{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin:11px 0}
.calendar-day-summary>div{padding:10px;border:1px solid #e0e5de;border-radius:10px;background:#fafbf9}
.calendar-day-summary small{display:block;color:#7d877e;font-size:6px;font-weight:950}
.calendar-day-summary b{display:block;margin-top:5px;color:#1c231d;font-size:15px}
.calendar-day-summary>div:last-child b{color:#20bd67}
.calendar-day-events{display:grid;gap:6px}
.calendar-sale-row{display:grid;grid-template-columns:28px minmax(0,1fr) auto;align-items:center;gap:8px;padding:9px 8px;border:1px solid #e1e6df;border-radius:10px;background:#fbfcfa;cursor:pointer}
.calendar-sale-row:hover{border-color:#afb9af}.calendar-sale-row.refund{background:#fff7f6}
.calendar-sale-icon{display:grid;place-items:center;width:28px;height:28px;border-radius:8px;color:#fff;font-size:12px;font-weight:900}
.calendar-sale-icon.club{background:#777dff}.calendar-sale-icon.community{background:#27c675}
.calendar-sale-person{min-width:0}
.calendar-sale-person b{display:block;overflow:hidden;color:#202720;font-size:9px;text-overflow:ellipsis;white-space:nowrap}
.calendar-sale-person span{display:block;margin-top:3px;overflow:hidden;color:#7e8980;font-size:6.5px;text-overflow:ellipsis;white-space:nowrap}
.calendar-sale-money{text-align:right}.calendar-sale-money b{display:block;color:#202720;font-size:9px}
.calendar-sale-money span{display:block;margin-top:3px;color:#20b965;font-size:7px;font-weight:850}
.calendar-empty{padding:22px 10px;color:#8a948b;text-align:center;font-size:8px}
html[data-theme="dark"] .sales-calendar-hero,html[data-theme="dark"] .calendar-product-tabs,html[data-theme="dark"] .calendar-year-summary>div,html[data-theme="dark"] .calendar-month-selector button,html[data-theme="dark"] .calendar-kpi,html[data-theme="dark"] .calendar-panel,html[data-theme="dark"] .calendar-day-panel,html[data-theme="dark"] .sales-day,html[data-theme="dark"] .calendar-day-summary>div,html[data-theme="dark"] .calendar-sale-row{background:#111713!important;color:#eef3ef!important;border-color:#2b352d!important}
html[data-theme="dark"] .sales-year-nav{background:#151c17;border-color:#344037}
html[data-theme="dark"] .sales-year-nav button,html[data-theme="dark"] .calendar-today-btn{color:#dfe5df}
html[data-theme="dark"] .calendar-today-btn{background:#151c17;border-color:#344037}
html[data-theme="dark"] .calendar-month-selector button.on{background:#f4e600!important;border-color:#f4e600!important}
html[data-theme="dark"] .calendar-month-selector button.on small,html[data-theme="dark"] .calendar-month-selector button.on b,html[data-theme="dark"] .calendar-month-selector button.on span{color:#111!important}
html[data-theme="dark"] .calendar-year-summary b,html[data-theme="dark"] .calendar-kpi b,html[data-theme="dark"] .calendar-panel-head h3,html[data-theme="dark"] .calendar-day-head h3,html[data-theme="dark"] .sales-day-money strong,html[data-theme="dark"] .calendar-day-summary b,html[data-theme="dark"] .calendar-sale-person b,html[data-theme="dark"] .calendar-sale-money b{color:#f1f5f1}
html[data-theme="dark"] .sales-day.selected{border-color:#f4e600!important;box-shadow:0 0 0 1px rgba(244,230,0,.16)}
html[data-theme="dark"] .sales-day-top>b{background:#f4e600;color:#111}
html[data-theme="dark"] .calendar-day-head{border-color:#29342c}
html[data-theme="dark"] .calendar-kpi.net{background:#0e1d14!important;border-color:#275a3b!important}
html[data-theme="dark"] .calendar-sale-row.refund{background:#211312!important;border-color:#5a2d2b!important}
@media(max-width:1250px){.calendar-month-selector{grid-template-columns:repeat(6,1fr)}.calendar-year-summary{grid-template-columns:repeat(3,1fr)}.calendar-kpi-grid{grid-template-columns:repeat(3,1fr)}}
@media(max-width:950px){.calendar-main-grid{grid-template-columns:1fr}.calendar-day-panel{position:relative;top:auto}}
@media(max-width:700px){.sales-calendar-hero{flex-direction:column}.calendar-month-selector{grid-template-columns:repeat(4,1fr)}.calendar-year-summary,.calendar-kpi-grid{grid-template-columns:1fr 1fr}.sales-day{min-height:88px;padding:6px}.sales-day-money strong{font-size:7px}.sales-day-money small{font-size:6px}}


/* ============================================================
   V25 — AUTH GATE DE PRODUCCIÓN
   ============================================================ */
body.sta-auth-locked{
  overflow:hidden !important;
}
body.sta-auth-locked > .sidebar,
body.sta-auth-locked > .main,
body.sta-auth-locked > dialog,
body.sta-auth-locked > #chartRichTooltip{
  visibility:hidden !important;
  pointer-events:none !important;
}
.firebase-auth-gate{
  position:fixed;
  inset:0;
  z-index:100000;
  display:grid;
  place-items:center;
  padding:24px;
  background:
    radial-gradient(circle at 50% 20%,rgba(244,230,0,.055),transparent 28%),
    #080d09;
}
.firebase-auth-gate.hidden{
  display:none;
}
.firebase-auth-gate-card{
  width:min(420px,100%);
  padding:34px;
  border:1px solid #29342c;
  border-radius:20px;
  background:#101612;
  color:#eef3ef;
  box-shadow:0 34px 90px rgba(0,0,0,.45);
}
.auth-brand{
  color:#fff;
  font-size:19px;
  font-weight:950;
  line-height:.78;
  letter-spacing:-.8px;
}
.auth-brand b{
  color:#f4e600;
  font-size:26px;
}
.auth-kicker{
  margin-top:25px;
  color:#7e8b82;
  font-size:8px;
  font-weight:950;
  letter-spacing:1.35px;
}
.firebase-auth-gate-card h1{
  margin:6px 0 0;
  color:#fff;
  font-size:31px;
  letter-spacing:-1px;
}
.firebase-auth-gate-card>p{
  margin:10px 0 0;
  color:#89958c;
  font-size:10px;
  line-height:1.55;
}
.firebase-gate-state{
  display:flex;
  align-items:center;
  gap:9px;
  margin:22px 0 12px;
  padding:10px 11px;
  border:1px solid #2d3930;
  border-radius:10px;
  background:#0c120e;
  color:#aab5ac;
  font-size:9px;
  font-weight:850;
}
.firebase-gate-state i{
  width:8px;
  height:8px;
  border-radius:50%;
  background:#f4e600;
  box-shadow:0 0 0 4px rgba(244,230,0,.08);
}
.firebase-gate-login{
  width:100%;
  min-height:44px;
  border:1px solid #f4e600;
  border-radius:10px;
  background:#f4e600;
  color:#111;
  font-size:10px;
  font-weight:950;
  cursor:pointer;
  transition:.15s ease;
}
.firebase-gate-login:hover{
  transform:translateY(-1px);
  filter:brightness(1.03);
}
.firebase-gate-error{
  display:block;
  min-height:16px;
  margin-top:11px;
  color:#ff7a73;
  font-size:8px;
  line-height:1.4;
}
.firebase-gate-security{
  margin-top:15px;
  padding-top:13px;
  border-top:1px solid #283229;
  color:#68766d;
  font-size:7px;
  text-align:center;
}


/* ============================================================
   V26 — STATUS FIREBASE + BACKUP + VERSION GRANDE
   ============================================================ */
.app-version-badge{
  min-width:64px;
  min-height:40px;
  padding:0 14px;
  border:1px solid #111611;
  border-radius:10px;
  background:#111611;
  color:#f4e600;
  font-size:15px;
  font-weight:1000;
  letter-spacing:.4px;
  cursor:pointer;
  box-shadow:0 4px 14px rgba(17,22,17,.08);
}
.app-version-badge:hover{
  transform:translateY(-1px);
}

.firebase-top-status{
  display:flex;
  align-items:center;
  gap:8px;
  min-height:40px;
  padding:7px 11px;
  border:1px solid #d6ddd4;
  border-radius:10px;
  background:#fff;
  cursor:pointer;
  transition:.15s ease;
}
.firebase-top-dot{
  width:9px;
  height:9px;
  flex:0 0 auto;
  border-radius:50%;
  background:#b6beb7;
  box-shadow:0 0 0 4px rgba(182,190,183,.12);
}
.firebase-top-copy{
  display:block;
  text-align:left;
}
.firebase-top-copy b{
  display:block;
  color:#2c342d;
  font-size:8px;
  font-weight:1000;
  line-height:1;
}
.firebase-top-copy small{
  display:block;
  margin-top:3px;
  color:#7a857c;
  font-size:6px;
  font-weight:800;
}
.firebase-top-status.is-online{
  border-color:#8be0b0;
  background:#effcf4;
}
.firebase-top-status.is-online .firebase-top-dot{
  background:#22c86d;
  box-shadow:0 0 0 4px rgba(34,200,109,.12),0 0 12px rgba(34,200,109,.22);
}
.firebase-top-status.is-online .firebase-top-copy b{
  color:#148e4c;
}
.firebase-top-status.is-error{
  border-color:#ffc0bc;
  background:#fff4f3;
}
.firebase-top-status.is-error .firebase-top-dot{
  background:#ff655d;
  box-shadow:0 0 0 4px rgba(255,101,93,.12);
}
.firebase-top-status.is-error .firebase-top-copy b{
  color:#c33f39;
}
.firebase-top-status.is-auth{
  border-color:#bfc3ff;
  background:#f4f4ff;
}
.firebase-top-status.is-auth .firebase-top-dot{
  background:#777dff;
}
.firebase-top-status.is-checking .firebase-top-dot{
  background:#f0d900;
}

.backup-top-btn{
  min-height:40px;
  padding:0 13px;
  border:1px solid #cfd7cd;
  border-radius:10px;
  background:#fff;
  color:#344036;
  font-size:8px;
  font-weight:1000;
  cursor:pointer;
  transition:.15s ease;
}
.backup-top-btn:hover{
  border-color:#9faa9f;
  transform:translateY(-1px);
}
.backup-top-btn.backup-done{
  border-color:#8be0b0;
  background:#effcf4;
  color:#168c4d;
}
.backup-top-btn.backup-error{
  border-color:#ffc0bc;
  background:#fff4f3;
  color:#bf3f39;
}

/* Dialog */
.system-info-dialog{
  width:min(560px,calc(100vw - 36px));
  padding:0;
  overflow:hidden;
  border:1px solid #d6ddd4;
  border-radius:18px;
  background:#fff;
  color:#182019;
  box-shadow:0 30px 90px rgba(0,0,0,.22);
}
.system-info-dialog::backdrop{
  background:rgba(7,12,8,.55);
  backdrop-filter:blur(4px);
}
.system-info-dialog{
  padding:24px;
}
.system-info-close{
  position:absolute;
  top:13px;
  right:13px;
  width:31px;
  height:31px;
  border:1px solid #d8ded5;
  border-radius:9px;
  background:#f7f9f6;
  color:#536055;
  font-size:17px;
  cursor:pointer;
}
.system-info-kicker{
  color:#7c887f;
  font-size:8px;
  font-weight:1000;
  letter-spacing:1.2px;
}
.system-info-dialog h2{
  margin:5px 0 0;
  font-size:28px;
  letter-spacing:-.7px;
}
.system-info-sub{
  margin:7px 0 0;
  color:#7b867d;
  font-size:9px;
}
.system-info-grid{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:8px;
  margin:20px 0;
}
.system-info-grid>div{
  padding:12px;
  border:1px solid #dce2d9;
  border-radius:11px;
  background:#fafbf9;
}
.system-info-grid small{
  display:block;
  color:#7c877e;
  font-size:6px;
  font-weight:1000;
}
.system-info-grid b{
  display:block;
  margin-top:7px;
  color:#182019;
  font-size:17px;
}
#systemInfoFirebase[data-state="online"]{color:#20b965}
#systemInfoFirebase[data-state="offline"]{color:#ef5f58}

.system-info-actions{
  display:flex;
  gap:8px;
}
.backup-dialog-btn,
.secondary-dialog-btn{
  min-height:38px;
  padding:0 13px;
  border-radius:9px;
  font-size:8px;
  font-weight:950;
  cursor:pointer;
}
.backup-dialog-btn{
  border:1px solid #f4e600;
  background:#f4e600;
  color:#111;
}
.secondary-dialog-btn{
  border:1px solid #d7ddd4;
  background:#fff;
  color:#536055;
}
.system-info-note{
  display:block;
  margin-top:12px;
  color:#8a948b;
  font-size:7px;
  line-height:1.45;
}

/* Make sidebar version visibly larger too */
.sidebar .brand small,
.sidebar .brand .sub,
.sidebar .brand-sub{
  font-size:9px !important;
  font-weight:1000 !important;
  letter-spacing:1.25px !important;
}
.sidebar .brand{
  padding-bottom:4px;
}

/* dark */
html[data-theme="dark"] .app-version-badge{
  border-color:#f4e600;
  background:#f4e600;
  color:#111;
}
html[data-theme="dark"] .firebase-top-status,
html[data-theme="dark"] .backup-top-btn{
  border-color:#344037;
  background:#151c17;
  color:#dce4dd;
}
html[data-theme="dark"] .firebase-top-copy b{color:#e8eee9}
html[data-theme="dark"] .firebase-top-copy small{color:#829087}
html[data-theme="dark"] .firebase-top-status.is-online{
  border-color:#2b7047;
  background:#102117;
}
html[data-theme="dark"] .firebase-top-status.is-online .firebase-top-copy b{
  color:#42dd88;
}
html[data-theme="dark"] .system-info-dialog{
  border-color:#303b32;
  background:#111713;
  color:#eef3ef;
}
html[data-theme="dark"] .system-info-dialog h2,
html[data-theme="dark"] .system-info-grid b{
  color:#eef3ef;
}
html[data-theme="dark"] .system-info-grid>div{
  border-color:#2b352d;
  background:#0d130f;
}
html[data-theme="dark"] .system-info-close,
html[data-theme="dark"] .secondary-dialog-btn{
  border-color:#344037;
  background:#151c17;
  color:#dce4dd;
}

@media(max-width:1080px){
  .actions{
    flex-wrap:wrap;
  }
  .firebase-top-status,
  .backup-top-btn,
  .app-version-badge{
    min-height:36px;
  }
}
@media(max-width:620px){
  .system-info-grid{grid-template-columns:1fr 1fr}
  .system-info-actions{flex-direction:column}
}


/* ============================================================
   V27 — CACHE FIX + FEEDBACK
   ============================================================ */
.system-toast{
  position:fixed;
  right:22px;
  bottom:22px;
  z-index:200000;
  max-width:420px;
  padding:11px 14px;
  border:1px solid transparent;
  border-radius:11px;
  background:#111713;
  color:#eef3ef;
  box-shadow:0 18px 50px rgba(0,0,0,.22);
  font-size:9px;
  font-weight:850;
  opacity:0;
  transform:translateY(12px);
  pointer-events:none;
  transition:.18s ease;
}
.system-toast.show{
  opacity:1;
  transform:translateY(0);
}
.system-toast.ok{
  border-color:#359d61;
}
.system-toast.error{
  border-color:#c84c46;
  background:#271211;
  color:#ffb1ad;
}

.firebase-top-status.is-online{
  box-shadow:0 0 0 1px rgba(34,200,109,.08),0 6px 18px rgba(34,200,109,.08);
}
.firebase-top-status.is-error{
  box-shadow:0 0 0 1px rgba(255,101,93,.08),0 6px 18px rgba(255,101,93,.08);
}


/* ============================================================
   V29 — PERIOD NAVIGATOR + MOBILE + LIVE TODAY
   ============================================================ */

/* Period navigation: dates only appear in Personalizado */
.period-toolbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:8px;
}
.period-toolbar .periods{
  display:flex;
  align-items:center;
  gap:4px;
  margin:0 !important;
  min-width:0;
}
.period-navigator{
  display:grid;
  grid-template-columns:36px minmax(160px,1fr) 36px auto;
  align-items:center;
  gap:5px;
  min-width:330px;
  padding:3px;
  border:1px solid #d5ddd3;
  border-radius:10px;
  background:#fff;
}
.period-navigator[hidden]{display:none !important}
.period-navigator>button{
  min-height:32px;
  border:0;
  border-radius:7px;
  background:#f4f7f2;
  color:#263027;
  font-size:13px;
  font-weight:950;
  cursor:pointer;
}
.period-navigator>button:hover{background:#e9eee8}
.period-navigator>strong{
  min-width:0;
  overflow:hidden;
  color:#202720;
  font-size:10px;
  font-weight:950;
  text-align:center;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.period-navigator .period-today{
  padding:0 10px;
  background:#111611;
  color:#f4e600;
  font-size:8px;
  letter-spacing:.3px;
}
.custom-date-range{
  display:flex;
  align-items:end;
  gap:8px;
}
.custom-date-range[hidden]{display:none !important}

html[data-theme="dark"] .period-navigator{
  border-color:#344037;
  background:#151c17;
}
html[data-theme="dark"] .period-navigator>button{
  background:#1b241d;
  color:#dfe7e0;
}
html[data-theme="dark"] .period-navigator>button:hover{background:#263129}
html[data-theme="dark"] .period-navigator>strong{color:#edf3ee}
html[data-theme="dark"] .period-navigator .period-today{
  background:#f4e600;
  color:#111;
}

/* Traffic becomes visibly live once Work starts writing meta.traffic.monthly */
.traffic-badge.has-traffic{
  border-color:#2c7248 !important;
  background:#102218 !important;
  color:#55df92 !important;
}

/* Today is impossible to miss on desktop and mobile */
.sales-day.today{
  position:relative;
  border-color:#e1cc00 !important;
  border-bottom:4px solid #f4e600 !important;
  box-shadow:inset 0 -2px 0 rgba(244,230,0,.18),0 0 0 1px rgba(244,230,0,.10);
  animation:staTodayPulse 1.55s ease-in-out infinite;
}
.sales-day.today:after{
  top:6px !important;
  right:6px !important;
  padding:3px 5px;
  border-radius:999px;
  background:#f4e600;
  color:#111 !important;
  font-size:6px !important;
  box-shadow:0 0 0 3px rgba(244,230,0,.14);
}
@keyframes staTodayPulse{
  0%,100%{box-shadow:inset 0 -2px 0 rgba(244,230,0,.22),0 0 0 1px rgba(244,230,0,.12)}
  50%{box-shadow:inset 0 -4px 0 rgba(244,230,0,.70),0 0 0 4px rgba(244,230,0,.12),0 0 18px rgba(244,230,0,.14)}
}
@media (prefers-reduced-motion:reduce){
  .sales-day.today{animation:none}
}

/* ---------- Tablet ---------- */
@media(max-width:900px){
  .period-toolbar{
    align-items:stretch;
    flex-direction:column;
  }
  .period-toolbar .periods{
    width:100%;
    overflow-x:auto;
    padding-bottom:2px;
    scrollbar-width:none;
  }
  .period-toolbar .periods::-webkit-scrollbar{display:none}
  .period-toolbar .periods button{
    flex:0 0 auto;
    white-space:nowrap;
  }
  .period-navigator{
    width:100%;
    min-width:0;
    grid-template-columns:40px minmax(0,1fr) 40px auto;
  }
  .filters{
    display:grid !important;
    grid-template-columns:1fr 1fr;
    align-items:end !important;
  }
  .filters #search{
    grid-column:1/-1;
    width:100%;
    min-width:0;
    margin-left:0;
  }
  .custom-date-range{
    grid-column:1/-1;
    display:grid;
    grid-template-columns:1fr 1fr;
    width:100%;
  }
  .executive-source{
    gap:10px;
  }
  .executive-source .source-copy{
    width:100%;
  }
  .executive-source .source-copy span{
    white-space:normal !important;
    line-height:1.4;
  }
  .executive-source-tools{
    display:grid !important;
    grid-template-columns:1fr;
    align-items:stretch !important;
    width:100%;
  }
  .executive-product-tabs{
    width:100%;
  }
  .executive-product-tabs button{
    flex:1;
    min-height:34px;
    font-size:8px;
  }
  .firebase-toolbar{
    width:100%;
    display:grid !important;
    grid-template-columns:minmax(0,1fr) auto auto;
    align-items:center;
  }
  .firebase-user-email{
    max-width:none;
    overflow:hidden;
    text-overflow:ellipsis;
  }
}

/* ---------- Mobile: dashboard ---------- */
@media(max-width:760px){
  .main{padding:14px !important}
  .top{
    display:block !important;
  }
  .top h1{font-size:31px !important}
  .top .actions{
    display:grid !important;
    grid-template-columns:repeat(2,minmax(0,1fr));
    width:100%;
    gap:7px;
    margin-top:12px;
  }
  .top .actions>*{
    min-width:0;
    width:100%;
    justify-content:center;
  }
  .top .actions #newMove{
    grid-column:1/-1;
  }
  .app-version-badge{
    font-size:13px !important;
  }
  .firebase-top-copy small{font-size:7px !important}
  .filter-dock{
    margin:12px 0 !important;
    padding:8px !important;
    border-radius:12px !important;
  }
  .filters{
    grid-template-columns:1fr !important;
    gap:7px !important;
    padding:8px !important;
  }
  .filters>*,
  .filters label,
  .filters select,
  .filters input{
    width:100% !important;
  }
  .custom-date-range{
    grid-template-columns:1fr 1fr !important;
  }
  .period-navigator{
    grid-template-columns:38px minmax(0,1fr) 38px 52px;
  }
  .period-navigator>strong{font-size:9px}
  .period-navigator .period-today{padding:0 7px}

  /* Avoid the huge one-card-per-screen stack shown in the old mobile layout */
  .executive-strip{
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    gap:7px !important;
  }
  .exec-card{
    min-height:100px !important;
    padding:12px !important;
  }
  .exec-card strong{
    font-size:23px !important;
    white-space:normal !important;
  }
  .exec-card span{font-size:7px !important}
  .exec-card:nth-child(3){grid-column:1/-1}

  .kpi-groups{gap:8px !important}
  .kpi-group{padding:12px !important}
  .kpi-group-grid{
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    gap:6px !important;
  }
  .mini-kpi{min-height:74px !important}
  .mini-kpi b{font-size:17px !important}

  .source.compact-source{
    padding:12px !important;
  }
  .source.compact-source b{font-size:11px !important}
  .source.compact-source span{font-size:9px !important}

  .analytics-zone{
    margin-left:0 !important;
    margin-right:0 !important;
    padding:10px !important;
  }
  .analytics-zone-head{
    gap:9px !important;
  }
  .analytics-master-tabs{
    width:100%;
  }
  .analytics-master-tabs button{
    flex:1;
    min-height:32px;
  }
  .analytics-card{
    padding:13px !important;
  }
  .analytics-card-income .income-svg-wrap{
    overflow-x:auto;
  }
  .analytics-card-income .income-svg{
    min-width:700px;
  }
  .origin-donut-layout{
    grid-template-columns:1fr !important;
  }

  /* Calendar stays legible instead of crushing seven columns */
  .calendar-panel{
    overflow-x:auto;
    padding:12px !important;
  }
  .calendar-panel-head{
    min-width:610px;
  }
  .calendar-weekdays,
  .sales-calendar-grid{
    min-width:610px;
  }
  .sales-day{
    min-height:92px !important;
  }
  .sales-day-money strong{font-size:8px !important}
  .sales-day-money small{font-size:6.5px !important}
  .calendar-year-summary,
  .calendar-kpi-grid{
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  }
  .calendar-month-selector{
    grid-template-columns:repeat(4,minmax(0,1fr)) !important;
  }
}

/* Narrow phone */
@media(max-width:430px){
  .top .actions{
    grid-template-columns:1fr 1fr;
  }
  .firebase-top-status{
    grid-column:1/-1;
  }
  .executive-strip{
    grid-template-columns:1fr !important;
  }
  .exec-card:nth-child(3){grid-column:auto}
  .kpi-group-grid{
    grid-template-columns:1fr 1fr !important;
  }
  .calendar-year-summary,
  .calendar-kpi-grid{
    grid-template-columns:1fr !important;
  }
  .custom-date-range{
    grid-template-columns:1fr !important;
  }
}
\n\n/* V32 · Proceso CRM + prompt autónomo */\n.process-guide-section{padding-bottom:42px}\n.process-guide-hero{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;margin-bottom:18px;padding:22px 24px;border:1px solid var(--line);border-radius:20px;background:linear-gradient(135deg,rgba(255,230,0,.10),rgba(53,211,127,.06))}\n.process-guide-hero h2{margin:5px 0 7px;font-size:clamp(24px,3vw,38px)}\n.process-guide-hero p{margin:0;max-width:820px;color:var(--muted)}\n.process-guide-badge{white-space:nowrap;padding:10px 14px;border-radius:999px;background:#0c1610;color:#ffe600;font-size:12px;font-weight:900;letter-spacing:.04em;border:1px solid rgba(255,230,0,.28)}\n.process-guide-image-wrap{padding:10px;border:1px solid var(--line);border-radius:20px;background:#07100b;box-shadow:0 18px 50px rgba(0,0,0,.12);overflow:hidden}\n.process-guide-image{display:block;width:100%;height:auto;border-radius:14px}\n.process-guide-grid{display:grid;grid-template-columns:1.35fr 1fr;gap:16px;margin-top:16px}\n.process-guide-card{padding:20px;border:1px solid var(--line);border-radius:18px;background:var(--panel)}\n.process-guide-card small{font-weight:900;letter-spacing:.12em;color:var(--muted)}\n.process-guide-card h3{margin:5px 0 12px;font-size:20px}\n.process-guide-card p{line-height:1.55}\n.process-card-head{display:flex;align-items:center;justify-content:space-between;gap:15px}\n.process-guide-prompt pre{margin:12px 0;padding:16px;border-radius:14px;background:#07100b;color:#80f0a9;border:1px solid rgba(53,211,127,.25);white-space:pre-wrap;word-break:break-word;font:700 14px/1.55 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace}\n.process-mini-steps{display:grid;gap:10px}\n.process-mini-steps div{display:flex;align-items:center;gap:11px;padding:11px 12px;border-radius:13px;background:var(--soft);border:1px solid var(--line)}\n.process-mini-steps b{display:grid;place-items:center;width:30px;height:30px;border-radius:50%;background:#ffe600;color:#07100b}\n.process-mini-steps span{font-weight:800}\n.process-checks{list-style:none;padding:0;margin:10px 0 0;display:grid;gap:9px}\n.process-checks li{padding:10px 12px;border-radius:12px;background:rgba(53,211,127,.07);border:1px solid rgba(53,211,127,.16);font-weight:700}\n@media(max-width:900px){\n  .process-guide-hero{align-items:flex-start;flex-direction:column}\n  .process-guide-badge{white-space:normal}\n  .process-guide-grid{grid-template-columns:1fr}\n  .process-card-head{align-items:flex-start;flex-direction:column}\n  .process-card-head .btn{width:100%}\n  .process-guide-image-wrap{padding:5px;border-radius:14px;overflow-x:auto}\n  .process-guide-image{min-width:820px;max-width:none}\n}\n@media(max-width:600px){\n  .process-guide-hero{padding:16px}\n  .process-guide-card{padding:16px}\n  .process-guide-prompt pre{font-size:12px}\n}\n
/* V32 · Prompt autónomo completo */
.work-prompt-summary{margin:13px 0 11px;padding:14px 15px;border-radius:14px;background:rgba(255,230,0,.08);border:1px solid rgba(255,230,0,.24);line-height:1.55}
.work-prompt-flow{display:flex;gap:7px;flex-wrap:wrap;margin:10px 0 12px}
.work-prompt-flow span{padding:7px 9px;border-radius:999px;background:var(--soft);border:1px solid var(--line);font-size:11px;font-weight:850}
.work-prompt-source{position:fixed!important;left:-99999px!important;top:-99999px!important;width:1px!important;height:1px!important;opacity:0!important;pointer-events:none!important}
.work-prompt-details{margin-top:10px;border:1px solid var(--line);border-radius:14px;background:var(--soft);overflow:hidden}
.work-prompt-details summary{cursor:pointer;padding:12px 14px;font-weight:850;list-style:none}
.work-prompt-details summary::-webkit-details-marker{display:none}
.work-prompt-details summary:after{content:'＋';float:right;color:#ffe600}
.work-prompt-details[open] summary:after{content:'−'}
.work-prompt-details pre{margin:0!important;border-radius:0!important;max-height:430px;overflow:auto!important;border-left:0!important;border-right:0!important;border-bottom:0!important}
@media(max-width:600px){.work-prompt-flow{display:grid;grid-template-columns:1fr 1fr}.work-prompt-flow span{text-align:center}.work-prompt-details pre{max-height:360px}}


/* =========================================================
   V35 — CONVERSIÓN Y RECORRIDO CLARO
   ========================================================= */
.journey-simple-summary{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
  margin-bottom:12px;
  padding:16px 18px;
  border:1px solid #2b352e;
  border-radius:14px;
  background:#121914;
}
.journey-simple-summary small{
  display:block;
  color:#7d8981;
  font-size:8px;
  font-weight:950;
  letter-spacing:.75px;
}
.journey-simple-summary strong{
  display:block;
  margin-top:6px;
  color:#f4f7f5;
  font-size:15px;
  line-height:1.35;
}
.journey-simple-summary>div:first-child>span{
  display:block;
  margin-top:5px;
  color:#8e9a92;
  font-size:9px;
}
.journey-summary-number{
  min-width:155px;
  padding-left:18px;
  border-left:1px solid #303a33;
  text-align:right;
}
.journey-summary-number b{
  display:block;
  color:#35d27c;
  font-size:32px;
  line-height:1;
}
.journey-summary-number span{
  display:block;
  margin-top:4px;
  color:#7e8a82;
  font-size:8px;
  font-weight:800;
}
.journey-two-routes{
  display:grid;
  grid-template-columns:minmax(0,1.35fr) minmax(320px,.8fr);
  gap:12px;
}
.simple-route-card{
  min-width:0;
  padding:15px;
  border:1px solid #2a352d;
  border-radius:14px;
  background:#111813;
}
.simple-route-card>header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:12px;
}
.simple-route-card>header>div{
  display:flex;
  align-items:center;
  gap:7px;
}
.simple-route-card>header i{
  width:8px;
  height:8px;
  border-radius:50%;
  background:#777dff;
}
.simple-route-card.direct-route>header i{background:#ffe600}
.simple-route-card>header span{
  color:#8a968e;
  font-size:8px;
  font-weight:950;
  letter-spacing:.65px;
}
.simple-route-card>header b{
  color:#dce3de;
  font-size:9px;
}
.simple-route-chain{
  display:grid;
  grid-template-columns:minmax(0,1fr) 24px minmax(0,1fr) 24px minmax(0,1fr);
  gap:6px;
  align-items:stretch;
}
.simple-route-chain.direct-chain{
  grid-template-columns:minmax(0,1fr) 24px minmax(0,1fr);
}
.simple-route-step{
  padding:13px 11px;
  border:1px solid #2c372f;
  border-radius:11px;
  background:#161e18;
}
.simple-route-step small{
  display:block;
  min-height:20px;
  color:#7f8c83;
  font-size:7px;
  font-weight:950;
}
.simple-route-step strong{
  display:block;
  margin-top:6px;
  color:#f1f5f2;
  font-size:25px;
  line-height:1;
}
.simple-route-step span{
  display:block;
  margin-top:6px;
  color:#7b887f;
  font-size:7px;
  line-height:1.35;
}
.simple-route-step.club-buy strong{color:#9196ff}
.simple-route-step.community-buy{
  border-color:#28543a;
  background:#122018;
}
.simple-route-step.community-buy strong{color:#35d27c}
.simple-route-arrow{
  display:grid;
  place-items:center;
  color:#ffe600;
  font-size:20px;
  font-weight:900;
}
.simple-route-card>footer{
  display:flex;
  gap:7px;
  flex-wrap:wrap;
  margin-top:10px;
}
.simple-route-card>footer span{
  padding:5px 8px;
  border-radius:999px;
  background:#222c25;
  color:#9ca79f;
  font-size:7px;
  font-weight:850;
}
.simple-cohort-table{min-width:790px}
.simple-cohort-table td.conversion-total{
  background:rgba(53,210,124,.13);
  color:#35d27c;
}
.period-result-card{display:grid;gap:10px}
.period-result-total,
.period-result-split>div,
.period-result-note{
  padding:13px;
  border:1px solid #29342b;
  border-radius:11px;
  background:#151d17;
}
.period-result-total small,
.period-result-split small{
  display:block;
  color:#7b887e;
  font-size:7px;
  font-weight:950;
  letter-spacing:.4px;
}
.period-result-total b{
  display:block;
  margin-top:7px;
  color:#35d27c;
  font-size:30px;
  line-height:1;
}
.period-result-total span,
.period-result-split span,
.period-result-note span{
  display:block;
  margin-top:5px;
  color:#7d897f;
  font-size:7px;
  line-height:1.4;
}
.period-result-split{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:9px;
}
.period-result-split b{
  display:block;
  margin-top:6px;
  font-size:22px;
}
.period-result-split .from-club b{color:#9196ff}
.period-result-split .from-direct b{color:#ffe600}
.period-result-note strong{
  color:#e9eeeb;
  font-size:9px;
}

html:not([data-theme="dark"]) .journey-simple-summary,
html:not([data-theme="dark"]) .simple-route-card,
html:not([data-theme="dark"]) .period-result-total,
html:not([data-theme="dark"]) .period-result-split>div,
html:not([data-theme="dark"]) .period-result-note{
  background:#fff;
  border-color:#d7ded9;
}
html:not([data-theme="dark"]) .journey-simple-summary strong,
html:not([data-theme="dark"]) .simple-route-step strong,
html:not([data-theme="dark"]) .period-result-note strong{color:#111813}
html:not([data-theme="dark"]) .simple-route-step{
  background:#fbfcfb;
  border-color:#dbe2dd;
}
html:not([data-theme="dark"]) .simple-route-step.community-buy{
  background:#f1fbf5;
  border-color:#bee6cd;
}
html:not([data-theme="dark"]) .simple-route-card>footer span{background:#eef2ef;color:#657269}

@media(max-width:1050px){
  .journey-two-routes{grid-template-columns:1fr}
}
@media(max-width:760px){
  .journey-simple-summary{align-items:flex-start;flex-direction:column}
  .journey-summary-number{width:100%;padding-left:0;padding-top:12px;border-left:0;border-top:1px solid #303a33;text-align:left}
  .simple-route-chain,.simple-route-chain.direct-chain{grid-template-columns:1fr}
  .simple-route-arrow{transform:rotate(90deg);height:18px}
  .period-result-split{grid-template-columns:1fr}
}

/* ===== V36 · Conversión y recorrido cristalino ===== */
body[data-active-tab="miembros"] .global-status-filter,
body[data-active-tab="miembros"] .global-origin-filter,
body[data-active-tab="miembros"] .global-search-filter{display:none!important}
body[data-active-tab="miembros"] .filter-dock .filters{padding:0;border:0;background:transparent;box-shadow:none;min-height:0}
body[data-active-tab="miembros"] .filter-dock .custom-date-range{margin-top:8px}
.metric-help{display:inline-grid;place-items:center;width:17px;height:17px;border:1px solid currentColor;border-radius:50%;font-size:10px;font-weight:950;cursor:help;vertical-align:2px;opacity:.72}
[data-help]{cursor:help}
.metric-help-tip{position:fixed;z-index:99999;width:min(360px,calc(100vw - 24px));padding:14px 38px 14px 14px;border:1px solid #171a15;border-radius:12px;background:#10130f;color:#fff;box-shadow:0 18px 55px #0006;font-size:12px;line-height:1.45}
.metric-help-tip button{position:absolute;right:8px;top:7px;width:25px;height:25px;border:0;border-radius:50%;background:#ffffff16;color:#fff;cursor:pointer}
.metric-help-tip[hidden]{display:none!important}
.journey-summary-number em{display:block;margin-top:5px;color:#78857b;font-size:10px;font-style:normal;font-weight:800}
.v36-routes{grid-template-columns:1fr!important}
.v36-chain.club-chain{grid-template-columns:minmax(0,1fr) 24px minmax(0,1fr) 24px minmax(0,1fr) 24px minmax(0,1fr) 24px minmax(0,1fr)}
.v36-chain.community-chain{grid-template-columns:minmax(0,1fr) 24px minmax(0,1fr) 24px minmax(0,1fr) 24px minmax(0,1fr)}
.community-route>header i{background:#36d17d!important}
.trial-step{background:#fffdf0!important;border-color:#eee5a2!important}
.trial-step strong{color:#b49d00!important}
.trial-convert{background:#f2f0ff!important;border-color:#d7d4ff!important}
.trial-convert strong{color:#7772ef!important}
.route-base-note{margin:10px 0 8px;color:#748078;font-size:10px;font-weight:750}
.route-caveat{margin-top:9px;color:#7d877f;font-size:10px}
.direct-purchase-branch{display:grid;grid-template-columns:1fr auto auto;align-items:center;gap:10px;margin-top:10px;padding:10px 12px;border:1px dashed #cbd6ce;border-radius:10px;background:#f8fbf8}
.direct-purchase-branch span{font-size:9px;font-weight:950;letter-spacing:.7px;color:#78827b}
.direct-purchase-branch b{font-size:18px;color:#32c977}
.direct-purchase-branch small{color:#79857d;font-weight:750}
.v36-cohort-table tr[data-cohort-month]{cursor:pointer}
.v36-cohort-table tr[data-cohort-month]:hover td{background:#f7faf6}
.v36-cohort-table th .metric-help{width:14px;height:14px;font-size:8px}
.member-control-bar{display:grid;grid-template-columns:auto 1fr;gap:14px;align-items:center;margin:15px 0 13px;padding:12px;border:1px solid var(--line);border-radius:12px;background:#f8faf7}
.member-quick-filters,.recent-filter-buttons{display:flex;gap:6px;flex-wrap:wrap}
.member-quick-filters button,.recent-filter-buttons button{border:1px solid var(--line);border-radius:999px;padding:8px 10px;background:#fff;color:var(--ink);font-size:10px;font-weight:850;cursor:pointer}
.member-quick-filters button.on,.recent-filter-buttons button.on{background:#11150f;color:#fff;border-color:#11150f}
.member-search-tools{display:flex;justify-content:flex-end;align-items:center;gap:8px;flex-wrap:wrap}
.member-search-tools>input{min-width:260px;min-height:38px;border:1px solid var(--line);border-radius:8px;padding:8px 10px;background:#fff;color:var(--ink)}
.member-search-tools>label,.member-advanced-filter label{display:grid;gap:3px;color:#7f897f;font-size:8px;font-weight:950;letter-spacing:.7px}
.member-search-tools select{min-height:38px;border:1px solid var(--line);border-radius:8px;padding:7px 9px;background:#fff;color:var(--ink)}
.member-advanced-filter{position:relative}
.member-advanced-filter summary{list-style:none;border:1px solid var(--line);border-radius:8px;padding:10px 12px;background:#fff;font-size:10px;font-weight:850;cursor:pointer}
.member-advanced-filter[open]{padding:8px;border:1px solid var(--line);border-radius:10px;background:#fff}
.member-advanced-filter[open] summary{margin-bottom:7px;border:0;padding:2px;background:transparent}
.recent-activity-head{display:flex;justify-content:space-between;align-items:flex-start;gap:15px;margin-bottom:13px}
.recent-activity-feed{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.recent-activity-item{display:grid;grid-template-columns:34px 1fr auto;gap:10px;align-items:center;padding:11px;border:1px solid var(--line);border-radius:11px;background:#fafbf8}
.recent-activity-icon{display:grid;place-items:center;width:34px;height:34px;border-radius:9px;background:#11150f;color:var(--y);font-weight:950}
.recent-activity-item div{min-width:0}.recent-activity-item b,.recent-activity-item span{display:block}.recent-activity-item span{margin-top:2px;color:#7c867d;font-size:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.recent-activity-item time{color:#6f786f;font-size:10px;font-weight:800}
html[data-theme="dark"] .member-control-bar,html[data-theme="dark"] .recent-activity-item,html[data-theme="dark"] .direct-purchase-branch{background:#171b17;border-color:var(--line)}
html[data-theme="dark"] .member-search-tools>input,html[data-theme="dark"] .member-search-tools select,html[data-theme="dark"] .member-advanced-filter summary,html[data-theme="dark"] .member-advanced-filter[open],html[data-theme="dark"] .member-quick-filters button,html[data-theme="dark"] .recent-filter-buttons button{background:#121512;color:var(--ink);border-color:var(--line)}
html[data-theme="dark"] .trial-step{background:#211f12!important;border-color:#58522d!important}
html[data-theme="dark"] .trial-convert{background:#1a1830!important;border-color:#42406a!important}
@media(max-width:1180px){.v36-chain.club-chain,.v36-chain.community-chain{grid-template-columns:1fr}.v36-chain .simple-route-arrow{transform:rotate(90deg);height:18px}.member-control-bar{grid-template-columns:1fr}.member-search-tools{justify-content:flex-start}.recent-activity-feed{grid-template-columns:1fr}}
@media(max-width:720px){.member-search-tools>input{min-width:0;width:100%}.member-search-tools{display:grid;grid-template-columns:1fr}.member-search-tools>label,.member-advanced-filter{width:100%}.recent-activity-head{display:block}.recent-filter-buttons{margin-top:10px}.metric-help-tip{font-size:13px}}

/* =========================================================
   V40 — CONVERSIÓN Y RECORRIDO PREMIUM
   Basado en el mockup visual aprobado. Sin hardcodes de datos.
   ========================================================= */

.metric-help{display:inline-grid;place-items:center;width:20px;height:20px;border:1px solid currentColor;border-radius:50%;font-size:11px;font-weight:950;cursor:help;vertical-align:2px;opacity:.72}
.metric-help-tip{font-size:13px;line-height:1.52}

.v39-route-card{margin-top:18px;padding:20px 20px 18px;border:1px solid var(--line);border-radius:20px;background:var(--card)}
.v39-route-head{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-bottom:16px}
.v39-route-title{display:flex;align-items:center;gap:11px;min-width:0}.v39-route-title>div{min-width:0}
.v39-route-head small{display:block;color:var(--mut);font-size:12px;font-weight:950;letter-spacing:.85px}
.v39-route-head h3{margin:4px 0 0;color:var(--ink);font-size:23px;line-height:1.18;letter-spacing:-.25px}
.v39-route-head>strong{padding:10px 14px;border:1px solid var(--line);border-radius:999px;background:var(--soft);color:var(--ink);font-size:13px;white-space:nowrap}
.v39-route-dot{width:12px;height:12px;border-radius:50%;flex:none}.v39-route-dot.club{background:#6574ff}.v39-route-dot.community{background:#20bb67}

.v39-club-flow{display:grid;grid-template-columns:minmax(0,1fr) 28px minmax(0,1fr) 28px minmax(0,1fr) 28px minmax(0,1fr) 28px minmax(0,1fr);gap:6px;align-items:stretch}
.v39-flow-arrow,.v39-merge-arrow{display:grid;place-items:center;color:#e2c500;font-size:27px;font-weight:950}
.v39-stage{display:flex;flex-direction:column;min-width:0;min-height:194px;overflow:hidden;border:1px solid var(--line);border-radius:16px;background:var(--soft)}
.v39-stage-label{min-height:51px;padding:16px 16px 6px;color:var(--mut);font-size:11px;font-weight:950;letter-spacing:.55px;line-height:1.25;text-transform:uppercase}
.v39-stage-label .metric-help{width:17px;height:17px;font-size:9px;margin-left:3px}
.v39-stage-main{display:flex;align-items:center;gap:9px;padding:4px 16px 0;min-width:0}
.v39-stage-main strong{color:var(--ink);font-size:39px;line-height:1;letter-spacing:-1.4px}
.v39-people-icon{width:28px;height:22px;fill:currentColor;color:#172237;flex:none}.v39-people-icon.trial{color:#9a7c00}.v39-people-icon.club-paid,.v39-people-icon.trial-converted{color:#6672f3}.v39-people-icon.community-trial{color:#596372}.v39-people-icon.community-paid{color:#11a858}
.v39-pill{display:inline-flex!important;align-items:center;justify-content:center;width:max-content;min-height:32px;padding:5px 12px;border-radius:999px;background:#eef1ed;color:var(--ink)!important;font-size:15px!important;font-weight:950!important;line-height:1!important;white-space:nowrap}
.v39-stage.trial .v39-pill{background:#fff0a6;color:#755f00!important}.v39-stage.club-paid .v39-pill,.v39-stage.trial-converted .v39-pill{background:#dfe4ff;color:#3349c9!important}.v39-stage.community-paid .v39-pill{background:#d0f6df;color:#087a40!important}
.v39-stage-count{padding:8px 16px 12px;color:color-mix(in srgb,var(--ink) 84%,var(--mut));font-size:14px;font-weight:900;line-height:1.3}
.v39-stage footer{margin-top:auto;min-height:61px;padding:13px 16px;background:color-mix(in srgb,var(--ink) 3%,transparent);border-top:1px solid color-mix(in srgb,var(--line) 70%,transparent);color:var(--mut);font-size:13px;line-height:1.38}
.v39-stage.trial{background:color-mix(in srgb,#ffe86a 9%,var(--card));border-color:color-mix(in srgb,#d2b600 32%,var(--line))}.v39-stage.trial .v39-stage-main strong{color:#a58900}
.v39-stage.club-paid{background:color-mix(in srgb,#6574ff 7%,var(--card));border-color:color-mix(in srgb,#6574ff 28%,var(--line))}.v39-stage.club-paid .v39-stage-main strong{color:#6672f3}
.v39-stage.community-trial{background:color-mix(in srgb,#667085 5%,var(--card))}.v39-stage.community-trial .v39-stage-main strong{color:#303b49}
.v39-stage.trial-converted{background:color-mix(in srgb,#6574ff 7%,var(--card));border-color:color-mix(in srgb,#6574ff 28%,var(--line))}.v39-stage.trial-converted .v39-stage-main strong{color:#6672f3}
.v39-stage.community-paid{background:color-mix(in srgb,#20bb67 8%,var(--card));border-color:color-mix(in srgb,#20bb67 32%,var(--line))}.v39-stage.community-paid .v39-stage-main strong{color:#11ad5d}
.v39-route-note{margin:12px 2px 0;color:var(--mut);font-size:12px;line-height:1.45}

.v39-community-map{display:grid;grid-template-columns:minmax(210px,.78fr) 46px minmax(480px,1.8fr) 40px minmax(210px,.8fr);gap:10px;align-items:stretch}
.v39-split-connector{position:relative;display:grid;grid-template-rows:1fr 1fr;align-items:center;justify-items:center;color:#d9be00;font-weight:950}.v39-split-connector i{position:absolute;left:0;right:8px;top:50%;height:1px;background:color-mix(in srgb,var(--mut) 50%,transparent)}.v39-split-connector b,.v39-split-connector em{position:relative;z-index:1;font-size:24px;font-style:normal}.v39-split-connector em{align-self:end;color:#6f7a86;transform:translateY(4px) rotate(18deg)}
.v39-community-branches{display:grid;grid-template-rows:auto auto;gap:10px}
.v39-trial-path{display:grid;grid-template-columns:minmax(0,1fr) 34px minmax(0,1fr);gap:8px;align-items:stretch}
.v39-trial-path .v39-stage{min-height:160px}.v39-trial-path .v39-stage-label{min-height:42px;padding-top:13px}.v39-trial-path .v39-stage footer{min-height:48px;padding-top:10px;padding-bottom:10px}
.v39-direct-path{display:flex;flex-direction:column;justify-content:center;min-height:104px;padding:14px 16px;border:1px dashed color-mix(in srgb,#20bb67 40%,var(--line));border-radius:15px;background:color-mix(in srgb,#20bb67 5%,var(--card))}
.v39-direct-path>div{display:flex;align-items:center;gap:13px;flex-wrap:wrap}.v39-direct-path>div>span{color:var(--mut);font-size:11px;font-weight:950;letter-spacing:.5px}.v39-direct-path strong{color:#14ae5e;font-size:30px;line-height:1}.v39-direct-path em{color:color-mix(in srgb,var(--ink) 78%,var(--mut));font-size:14px;font-style:normal;font-weight:900}.v39-direct-path small{margin-top:7px;color:var(--mut);font-size:12px}
.v39-merge-arrow{font-size:28px}

.v39-cohort-wrap{overflow:auto}.v39-cohort-table{width:100%;min-width:990px;border-collapse:separate;border-spacing:0 6px}.v39-cohort-table thead th{padding:5px 10px 8px;color:var(--mut);font-size:10px;font-weight:950;letter-spacing:.45px;text-align:left;line-height:1.25}.v39-cohort-table tbody tr{cursor:pointer}.v39-cohort-table tbody td{padding:12px 10px;border-top:1px solid var(--line);border-bottom:1px solid var(--line);background:var(--soft);transition:.15s ease}.v39-cohort-table tbody td:first-child{border-left:1px solid var(--line);border-radius:11px 0 0 11px}.v39-cohort-table tbody td:last-child{border-right:1px solid var(--line);border-radius:0 11px 11px 0}.v39-cohort-table tbody tr:hover td{background:color-mix(in srgb,var(--y) 7%,var(--card))}.v39-cohort-table td b,.v39-cohort-table td span{display:block}.v39-cohort-table td b{color:var(--ink);font-size:16px}.v39-cohort-table td span{margin-top:3px;color:var(--mut);font-size:10.5px;font-weight:800}.v39-cohort-table td.buyers-cell b{color:#18ad5d}.v39-cohort-table td.conversion-total b{display:inline-flex;padding:5px 10px;border-radius:999px;background:#d7f5e2;color:#087f43;font-size:15px}

.v39-source-card{display:grid;gap:12px}.v39-source-total{padding:16px;border:1px solid var(--line);border-radius:14px;background:var(--soft)}.v39-source-total small,.v39-source-total em{display:block}.v39-source-total small{color:var(--mut);font-size:10px;font-weight:950;letter-spacing:.6px}.v39-source-total>div{display:flex;align-items:center;gap:11px;margin:7px 0 5px}.v39-source-total b{color:#11ad5d;font-size:35px;line-height:1}.v39-source-total em{color:var(--mut);font-size:12px;font-style:normal;font-weight:800}.v39-source-bar{display:flex;width:100%;height:11px;overflow:hidden;border-radius:999px;background:var(--soft)}.v39-source-bar i{display:block;height:100%}.v39-source-bar .club{background:#6574ff}.v39-source-bar .community{background:#20bb67}.v39-source-split{display:grid;grid-template-columns:1fr 1fr;gap:8px}.v39-source-split>div{padding:12px;border:1px solid var(--line);border-radius:12px;background:var(--soft)}.v39-source-split span{display:flex;align-items:center;gap:6px;color:var(--mut);font-size:10px;font-weight:900}.v39-source-split span i{width:8px;height:8px;border-radius:50%}.v39-source-split span i.club{background:#6574ff}.v39-source-split span i.community{background:#20bb67}.v39-source-split b{display:block;margin-top:6px;color:var(--ink);font-size:23px}.v39-source-split em{display:block;margin-top:2px;color:var(--mut);font-size:11px;font-style:normal;font-weight:850}.v39-source-detail{display:grid;grid-template-columns:1fr 1fr;gap:8px}.v39-source-detail span{padding:10px 11px;border:1px dashed var(--line);border-radius:10px;color:var(--mut);font-size:11px;line-height:1.35}.v39-source-detail b{color:var(--ink);font-size:14px}

/* CRM de miembros y actividad reciente: controles claros, no decorativos */
.member-control-bar{padding:15px}.member-quick-filters button,.recent-filter-buttons button{padding:9px 13px;font-size:12px}.member-search-tools>input{min-height:42px}.member-search-tools select,.member-advanced-filter summary{min-height:42px}
.recent-activity-feed{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.recent-activity-item{grid-template-columns:42px minmax(0,1fr) auto auto;gap:11px;padding:13px 14px;border-radius:13px}.recent-activity-icon{width:42px;height:42px;border-radius:11px;font-size:15px}.recent-activity-copy b{font-size:13px}.recent-activity-copy span{font-size:11.5px;line-height:1.35}.recent-activity-amount{color:#24b965;font-size:13px}.recent-activity-item time{font-size:11px}.recent-activity-item.trial .recent-activity-icon{background:#f1d800;color:#16150b}.recent-activity-item.payment .recent-activity-icon{background:#24b965;color:#fff}.recent-activity-item.cancel .recent-activity-icon{background:#e9685f;color:#fff}

html[data-theme="dark"] .v39-pill{background:#29312b;color:#f6f8f5!important}html[data-theme="dark"] .v39-stage.trial .v39-pill{background:#514819;color:#fff3a6!important}html[data-theme="dark"] .v39-stage.club-paid .v39-pill,html[data-theme="dark"] .v39-stage.trial-converted .v39-pill{background:#2f335a;color:#cdd2ff!important}html[data-theme="dark"] .v39-stage.community-paid .v39-pill{background:#17472d;color:#8cf0b7!important}html[data-theme="dark"] .v39-cohort-table td.conversion-total b{background:#17472d;color:#8cf0b7}

@media(max-width:1450px){
  .v39-route-card{padding:18px}.v39-club-flow{grid-template-columns:minmax(0,1fr) 22px minmax(0,1fr) 22px minmax(0,1fr) 22px minmax(0,1fr) 22px minmax(0,1fr)}
  .v39-stage-label{font-size:10.5px;padding-left:13px;padding-right:13px}.v39-stage-main{padding-left:13px;padding-right:13px}.v39-stage-main strong{font-size:34px}.v39-stage-count{padding-left:13px;padding-right:13px;font-size:13px}.v39-stage footer{padding-left:13px;padding-right:13px;font-size:12px}
  .v39-pill{font-size:13.5px!important;padding:5px 9px}.v39-community-map{grid-template-columns:minmax(190px,.72fr) 34px minmax(420px,1.65fr) 30px minmax(190px,.74fr)}
}
@media(max-width:1180px){
  .v39-club-flow{grid-template-columns:repeat(5,minmax(170px,1fr));overflow-x:auto;gap:10px;padding-bottom:5px}.v39-club-flow>.v39-flow-arrow{display:none}.v39-stage{min-height:184px}.v39-community-map{grid-template-columns:1fr}.v39-split-connector,.v39-merge-arrow{height:26px;display:grid;place-items:center}.v39-split-connector i,.v39-split-connector em{display:none}.v39-community-branches{grid-template-columns:1fr;grid-template-rows:auto auto}.recent-activity-feed{grid-template-columns:1fr}
}
@media(max-width:720px){
  .v39-route-card{padding:15px;border-radius:16px}.v39-route-head{align-items:flex-start;flex-direction:column}.v39-route-head h3{font-size:19px}.v39-route-head>strong{font-size:12px}.v39-club-flow{grid-template-columns:1fr;overflow:visible}.v39-stage{min-height:166px}.v39-stage-main strong{font-size:33px}.v39-stage-main{flex-wrap:wrap}.v39-stage-count{font-size:13.5px}.v39-stage footer{min-height:auto;font-size:12.5px}.v39-trial-path{grid-template-columns:1fr}.v39-trial-path>.v39-flow-arrow{height:22px;transform:rotate(90deg)}.v39-direct-path>div{align-items:flex-start}.v39-source-split,.v39-source-detail{grid-template-columns:1fr}.recent-activity-item{grid-template-columns:42px minmax(0,1fr) auto}.recent-activity-amount{grid-column:2/3}.recent-activity-item time{grid-column:3/4;grid-row:1/3}
}

/* =========================================================
   V40 — trazabilidad visible + listas por métrica
   ========================================================= */
.metric-help{padding:0;background:transparent;color:inherit;font-family:inherit}
.journey-clickable{cursor:pointer;transition:border-color .16s ease,box-shadow .16s ease,transform .16s ease}
.journey-clickable:hover,.journey-clickable:focus-visible{border-color:color-mix(in srgb,var(--y) 58%,var(--line));box-shadow:0 12px 28px #00000012;outline:none}
.journey-clickable:active{transform:translateY(1px)}
.journey-view-people{display:block;margin-top:6px;color:var(--ink);font-size:11px;font-weight:950}
.v39-stage footer .journey-view-people{color:color-mix(in srgb,var(--ink) 82%,var(--mut))}

.journey-accounting{margin-top:14px;padding:14px;border:1px solid var(--line);border-radius:15px;background:color-mix(in srgb,var(--ink) 2%,var(--card))}
.journey-accounting.is-balanced{border-color:color-mix(in srgb,#20bb67 30%,var(--line));background:color-mix(in srgb,#20bb67 3%,var(--card))}
.journey-accounting.has-warning{border-color:color-mix(in srgb,#e1b900 45%,var(--line));background:color-mix(in srgb,#ffe86a 7%,var(--card))}
.journey-accounting-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px}
.journey-accounting-head small,.journey-accounting-head b{display:block}.journey-accounting-head small{color:var(--mut);font-size:10px;font-weight:950;letter-spacing:.7px}.journey-accounting-head b{margin-top:2px;font-size:15px}.journey-accounting-head>span{padding:6px 10px;border-radius:999px;background:var(--card);border:1px solid var(--line);font-size:12px;font-weight:950}
.journey-accounting-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px}
.journey-accounting-grid button{display:grid;grid-template-columns:auto 1fr;align-items:center;gap:8px;min-height:58px;padding:10px 11px;border:1px solid var(--line);border-radius:11px;background:var(--card);color:var(--ink);text-align:left;cursor:pointer}
.journey-accounting-grid button:hover,.journey-accounting-grid button:focus-visible{border-color:#9fa69b;outline:none;background:color-mix(in srgb,var(--y) 5%,var(--card))}
.journey-accounting-grid strong{font-size:24px;line-height:1}.journey-accounting-grid span{font-size:11px;font-weight:850;line-height:1.25}
.journey-accounting>p{margin:10px 0 0;color:var(--mut);font-size:11px;line-height:1.4}

.journey-people-dialog{width:min(720px,calc(100vw - 28px));max-height:min(760px,calc(100vh - 40px));border:0;border-radius:18px;padding:0;background:var(--card);color:var(--ink);box-shadow:0 28px 80px #0005}
.journey-people-dialog::backdrop{background:#0b0d0a80;backdrop-filter:blur(3px)}
.journey-people-modal{position:relative;padding:24px}
.journey-people-modal h2{margin:6px 40px 5px 0;font-size:26px;letter-spacing:-.5px}
.journey-people-modal>.muted{margin:0 0 16px}
.journey-people-close{position:absolute;right:14px;top:14px;width:34px;height:34px;border:1px solid var(--line);border-radius:50%;background:var(--soft);color:var(--ink);font-size:22px;cursor:pointer}
.journey-people-list{display:grid;gap:8px;max-height:560px;overflow:auto;padding-right:3px}
.journey-person-row{display:grid;grid-template-columns:46px minmax(0,1fr) auto;align-items:center;gap:11px;width:100%;padding:11px 12px;border:1px solid var(--line);border-radius:12px;background:var(--soft);color:var(--ink);text-align:left;cursor:pointer}
.journey-person-row:hover,.journey-person-row:focus-visible{border-color:#aeb5aa;background:color-mix(in srgb,var(--y) 5%,var(--card));outline:none}
.journey-person-row .avatar{width:42px;height:42px;margin:0}.journey-person-row span{min-width:0}.journey-person-row b,.journey-person-row small,.journey-person-row em{display:block}.journey-person-row b{font-size:13px}.journey-person-row small{margin-top:2px;color:var(--mut);font-size:10.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.journey-person-row em{margin-top:4px;color:color-mix(in srgb,var(--ink) 70%,var(--mut));font-size:10.5px;font-style:normal;line-height:1.3}.journey-person-row>strong{color:var(--ink);font-size:11px;white-space:nowrap}

html[data-theme="dark"] .journey-accounting,html[data-theme="dark"] .journey-accounting-grid button,html[data-theme="dark"] .journey-person-row{background:#171b17;border-color:var(--line)}
html[data-theme="dark"] .journey-accounting-head>span{background:#111411}

@media(max-width:980px){.journey-accounting-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:620px){.journey-accounting-grid{grid-template-columns:1fr}.journey-person-row{grid-template-columns:42px minmax(0,1fr)}.journey-person-row>strong{grid-column:2/3}.journey-people-modal{padding:19px}}

/* =========================================================
   V42.3 — TRIALS RESILIENTES + CAJA VISIBLE + FILTROS GLOBALES
   ========================================================= */
.finance-ledger .table-wrap{overflow:auto;overscroll-behavior:contain}
.finance-table{min-width:1520px}
.finance-table th,.finance-table td{white-space:nowrap;vertical-align:middle}
.finance-payment-row{cursor:pointer;transition:background .16s ease}
.finance-payment-row:hover{background:rgba(255,242,0,.055)}
.finance-payment-row.refund{background:rgba(255,98,95,.045)}
.finance-payment-row:focus-within{outline:2px solid var(--accent,#f5df00);outline-offset:-2px}
.finance-legacy{display:block;margin-top:5px;font-size:10px;font-weight:800;letter-spacing:.04em;text-transform:uppercase;color:#9a6d00}
.finance-source{display:inline-flex;align-items:center;min-height:28px;padding:5px 9px;border:1px solid rgba(20,34,25,.12);border-radius:999px;background:rgba(45,190,112,.08);font-size:11px;font-weight:850;line-height:1.1}
.finance-source.warn{background:#fff8d8;border-color:#ead486;color:#7a5d00}
.finance-plan-note{display:block;margin-top:10px;line-height:1.45;color:var(--muted,#738078)}
.payment-breakdown-btn{margin-top:6px;border:0;background:transparent;padding:0;color:var(--text,#111);font:inherit;font-size:11px;font-weight:850;text-decoration:underline;text-underline-offset:2px;cursor:pointer}
.payment-breakdown-btn:hover{opacity:.66}

.payment-detail-dialog,.prompt-manager-dialog{width:min(920px,calc(100vw - 28px));max-width:920px;border:0;border-radius:22px;padding:0;background:transparent;color:var(--text,#111)}
.payment-detail-dialog::backdrop,.prompt-manager-dialog::backdrop{background:rgba(8,13,10,.58);backdrop-filter:blur(5px)}
.payment-detail-modal,.prompt-manager-modal{background:var(--panel,#fff);border:1px solid var(--line,#dbe1dc);border-radius:22px;padding:24px;box-shadow:0 24px 80px rgba(0,0,0,.22)}
.payment-detail-modal .modal-head,.prompt-manager-modal .modal-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin-bottom:18px}
.payment-detail-modal .modal-head small,.prompt-manager-modal .modal-head small{display:block;font-size:11px;font-weight:900;letter-spacing:.16em;color:var(--muted,#738078)}
.payment-detail-modal .modal-head h2,.prompt-manager-modal .modal-head h2{margin:4px 0 0;font-size:26px;line-height:1.08}
.payment-detail-modal .modal-head>button,.prompt-manager-modal .modal-head>button{width:42px;height:42px;border:1px solid var(--line,#dbe1dc);border-radius:12px;background:var(--card,#fff);font-size:24px;cursor:pointer}
.payment-detail-meta{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:18px}
.payment-detail-meta>span{padding:7px 10px;border-radius:999px;background:rgba(0,0,0,.045);font-size:12px;font-weight:760}
.payment-detail-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.payment-detail-grid>div{min-width:0;padding:14px;border:1px solid var(--line,#dbe1dc);border-radius:15px;background:var(--card,#fbfdfb)}
.payment-detail-grid small{display:block;min-height:28px;font-size:10px;font-weight:900;letter-spacing:.08em;text-transform:uppercase;color:var(--muted,#738078)}
.payment-detail-grid b{display:block;margin-top:5px;font-size:21px;line-height:1.1;overflow-wrap:anywhere}
.payment-detail-grid span{display:block;margin-top:7px;font-size:11px;line-height:1.35;color:var(--muted,#738078)}
.payment-detail-note{margin-top:14px;padding:13px 15px;border-radius:14px;background:rgba(45,190,112,.075);font-size:12px;line-height:1.5}
.payment-detail-note b{display:block;margin-bottom:3px}

.prompt-manager-actions{display:flex;gap:8px;flex-wrap:wrap}
.prompt-current-meta{display:grid;gap:3px;margin-top:12px;padding:12px 14px;border:1px solid var(--line,#dbe1dc);border-radius:14px;background:rgba(0,0,0,.025)}
.prompt-current-meta b{font-size:13px}
.prompt-current-meta span{font-size:12px;color:var(--muted,#738078)}
.prompt-current-meta small{font-size:11px;line-height:1.45;color:var(--muted,#738078)}
.prompt-manager-modal{width:100%}
.prompt-manager-explainer{margin:0 0 14px;color:var(--muted,#738078);line-height:1.5}
.prompt-version-label{display:grid;gap:6px;font-size:10px;font-weight:900;letter-spacing:.08em;color:var(--muted,#738078)}
.prompt-version-label input{width:100%;min-height:46px;border:1px solid var(--line,#dbe1dc);border-radius:12px;padding:0 13px;background:var(--card,#fff);color:var(--text,#111);font-size:15px;font-weight:700}
.prompt-editor-textarea{display:block;width:100%;height:430px;resize:vertical;margin-top:12px;padding:15px;border:1px solid var(--line,#dbe1dc);border-radius:14px;background:var(--card,#fbfdfb);color:var(--text,#111);font:500 13px/1.55 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;tab-size:2}
.prompt-editor-footer{display:flex;justify-content:space-between;gap:12px;align-items:center;margin-top:12px}
.prompt-editor-footer>span{font-size:11px;color:var(--muted,#738078)}
.prompt-editor-footer>div{display:flex;gap:8px;flex-wrap:wrap}
.prompt-history-list{display:grid;gap:9px;max-height:520px;overflow:auto;padding-right:3px}
.prompt-history-item{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:13px;border:1px solid var(--line,#dbe1dc);border-radius:14px;background:var(--card,#fff)}
.prompt-history-item.current{border-color:rgba(45,190,112,.5);background:rgba(45,190,112,.065)}
.prompt-history-item>div:first-child{display:grid;gap:3px;min-width:0}
.prompt-history-item b{font-size:13px;overflow-wrap:anywhere}
.prompt-history-item span,.prompt-history-item small{font-size:11px;color:var(--muted,#738078)}
.prompt-history-item>div:last-child{display:flex;gap:7px;flex-shrink:0}
.prompt-history-footer{display:flex;gap:8px;flex-wrap:wrap;margin-top:14px;padding-top:14px;border-top:1px solid var(--line,#dbe1dc)}
.prompt-import-label{cursor:pointer}

@media(max-width:900px){
  .payment-detail-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .prompt-editor-footer{align-items:flex-start;flex-direction:column}
  .prompt-history-item{align-items:flex-start;flex-direction:column}
}
@media(max-width:560px){
  .payment-detail-modal,.prompt-manager-modal{padding:17px;border-radius:17px}
  .payment-detail-grid{grid-template-columns:1fr}
  .prompt-editor-textarea{height:360px;font-size:12px}
  .prompt-manager-actions .btn{flex:1 1 auto}
  .prompt-history-item>div:last-child{width:100%}
  .prompt-history-item>div:last-child .btn{flex:1}
}

/* ============================================================
   V42.5 — FINV2 + VENTAS POR PRODUCTO
   ============================================================ */
.mini-kpi.club-sales{
  border-color:#cbd0ff;
  background:linear-gradient(180deg,#fbfbff,#f3f4ff);
}
.mini-kpi.club-sales b{color:#666cef}
.mini-kpi.community-sales{
  border-color:#a9e5c1;
  background:linear-gradient(180deg,#f7fff9,#effbf3);
}
.mini-kpi.community-sales b{color:#20bd67}


/* =========================================================
   V42.6 — legibilidad ejecutiva + drilldown de ventas
   ========================================================= */
.sales-kpi-clickable{cursor:pointer;transition:transform .14s ease,border-color .14s ease,box-shadow .14s ease}
.sales-kpi-clickable:hover,.sales-kpi-clickable:focus-visible{transform:translateY(-1px);border-color:color-mix(in srgb,var(--ink) 28%,var(--line));box-shadow:0 10px 24px #0000000d;outline:none}
.sales-kpi-clickable span{font-weight:800}
.forecast-group .mini-kpi.forecast-total{grid-column:1/-1}
.sales-detail-list{display:grid;gap:8px;max-height:560px;overflow:auto;padding-right:3px}
.sales-detail-row{display:grid;grid-template-columns:42px minmax(0,1fr) auto;align-items:center;gap:11px;width:100%;padding:12px;border:1px solid var(--line);border-radius:12px;background:var(--soft);color:var(--ink);text-align:left;cursor:pointer}
.sales-detail-row:hover,.sales-detail-row:focus-visible{border-color:#aeb5aa;background:color-mix(in srgb,var(--y) 5%,var(--card));outline:none}
.sales-detail-product{display:grid;place-items:center;width:38px;height:38px;border-radius:11px;font-size:10px;font-weight:950;background:#eceeff;color:#555bd8}
.sales-detail-product.comunidad{background:#e8fbf0;color:#159852}
.sales-detail-copy{min-width:0}.sales-detail-copy b,.sales-detail-copy small,.sales-detail-copy em{display:block}.sales-detail-copy b{font-size:13px}.sales-detail-copy small{margin-top:2px;color:var(--mut);font-size:10.5px}.sales-detail-copy em{margin-top:4px;color:color-mix(in srgb,var(--ink) 72%,var(--mut));font-size:10.5px;font-style:normal}
.sales-detail-row>strong{font-size:13px;white-space:nowrap}
html[data-theme="dark"] .sales-detail-row{background:#171b17;border-color:var(--line)}
@media(max-width:620px){.sales-detail-row{grid-template-columns:38px minmax(0,1fr)}.sales-detail-row>strong{grid-column:2/3}}
