:root{
  --teal:#4aa79f;
  --teal-dark:#318b85;
  --teal-soft:#e7f6f3;
  --yellow:#e8c968;
  --pink:#b76f8f;
  --pink-soft:#faeaf1;
  --ink:#343436;
  --muted:#7a7a7d;
  --line:#e4e1e3;
  --bg:#f7f5f6;
  --card:#ffffff;
  --danger:#b64d5c;
  --shadow:0 8px 28px rgba(50,42,46,.06);
}
*{box-sizing:border-box}
html{font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:var(--ink);background:var(--bg)}
body{margin:0;min-height:100vh}
a{color:var(--pink);text-decoration:none}
a:hover{text-decoration:underline}
.shell{width:min(1180px,calc(100% - 40px));margin:0 auto}
.topbar{background:#fff;border-bottom:1px solid var(--line);position:sticky;top:0;z-index:20}
.topbar-inner{height:78px;display:flex;align-items:center;gap:34px}
.brand{display:flex;align-items:center;width:150px;min-width:150px}
.brand img{width:140px;height:58px;object-fit:contain}
.nav{display:flex;align-items:stretch;gap:28px;height:100%}
.nav a{display:flex;align-items:center;color:#6c686b;font-weight:600;font-size:14px;border-bottom:3px solid transparent}
.nav a:hover,.nav a.active{color:var(--pink);text-decoration:none;border-bottom-color:var(--pink)}
.user-chip{margin-left:auto;display:flex;align-items:center;gap:10px;font-size:14px;font-weight:700}
.avatar{width:38px;height:38px;border-radius:50%;background:var(--pink);color:#fff;display:grid;place-items:center;font-size:12px}
.link-button{border:0;background:none;color:var(--muted);cursor:pointer}
.main{padding:34px 0 42px;min-height:calc(100vh - 150px)}
.footer{padding:20px 0 34px;border-top:1px solid var(--line);display:flex;justify-content:space-between;color:#969194;font-size:12px}

.page-head{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;margin-bottom:28px}
.page-head h1{font-size:34px;line-height:1.05;margin:0 0 8px;letter-spacing:-.03em}
.page-head p{margin:0;color:var(--muted)}
.eyebrow{font-size:12px;font-weight:800;letter-spacing:.09em;color:var(--pink);margin:0 0 10px}
.eyebrow.light{color:#fff}
.muted{color:var(--muted)}
.micro{font-size:12px;color:var(--muted)}
.center{text-align:center}
.mono{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;word-break:break-all}

.card,.empty-card{background:var(--card);border:1px solid var(--line);border-radius:22px;box-shadow:var(--shadow)}
.card{padding:26px}
.card h2,.empty-card h2,.help-card h2{margin:0 0 14px;font-size:22px;letter-spacing:-.02em}
.card-title-row{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:12px}
.card-title-row h2{margin:0}
.card-title-row>a{font-size:12px;font-weight:700}
.empty-card{padding:38px;display:flex;justify-content:space-between;align-items:center;gap:30px}
.empty-card p{max-width:680px;color:var(--muted)}

.status-pill{display:inline-flex;align-items:center;justify-content:center;padding:8px 15px;border-radius:99px;background:#ecf8f5;color:#3b9c8a;font-weight:800;font-size:11px;letter-spacing:.05em;text-transform:uppercase;white-space:nowrap}
.status-pill.pending{background:#fff4db;color:#a67b17}
.status-pill.paused{background:#f3edf8;color:#7e5c96}
.status-pill.canceled{background:#fbe9ec;color:#a04c58}
.status-pill.authorized{background:#e8f7f4;color:#3b9c8a}

.dashboard-grid{display:grid;grid-template-columns:1.4fr .85fr .95fr;gap:18px}
.progress-card{grid-column:span 2;background:linear-gradient(125deg,#419f98,#54afa5);border-radius:22px;min-height:300px;color:#fff;display:flex;align-items:center;justify-content:space-between;padding:32px 34px;overflow:hidden;position:relative}
.progress-card:after{content:"";position:absolute;width:320px;height:320px;border-radius:50%;right:-80px;bottom:-160px;background:rgba(255,255,255,.08)}
.progress-copy{position:relative;z-index:2;flex:1}
.amount{font-size:42px;font-weight:850;letter-spacing:-.04em;margin:5px 0 2px}
.progress-copy>p:not(.eyebrow){margin:0 0 18px;color:rgba(255,255,255,.85)}
.progress-message{font-size:13px;line-height:1.5;margin:18px 0 22px;max-width:620px}
.progress-message strong{color:#fff}
.ring-wrap{margin-left:34px;position:relative;z-index:2;display:flex;flex-direction:column;align-items:center;min-width:180px}
.ring{--p:0;--ring-color:var(--yellow);width:158px;height:158px;border-radius:50%;background:conic-gradient(var(--ring-color) calc(var(--p)*1%),rgba(255,255,255,.22) 0);display:grid;place-items:center;position:relative}
.ring-cycle-a{--ring-color:var(--yellow)}
.ring-cycle-b{--ring-color:var(--pink)}
.ring:before{content:"";position:absolute;inset:14px;border-radius:50%;background:#58aaa3}
.ring div{position:relative;z-index:1;text-align:center;display:flex;flex-direction:column;gap:4px}
.ring strong{font-size:30px;letter-spacing:-.03em}
.ring-caption{text-align:center;margin-top:12px;display:flex;flex-direction:column;gap:3px}
.ring-caption strong{font-size:13px}
.ring-caption span{font-size:11px;color:rgba(255,255,255,.78)}
.subscription-summary{grid-column:3;grid-row:1}
.movements-card{grid-column:1}
.benefit-card{grid-column:2}
.help-card{grid-column:3;background:var(--pink-soft);border-radius:22px;padding:26px;display:flex;flex-direction:column}
.help-card p{color:#76666d;line-height:1.6;flex:1}
.help-card small{margin-top:16px;color:#8a7780}

.summary-list{margin:4px 0 18px}
.summary-list>div{display:flex;justify-content:space-between;gap:20px;padding:16px 0;border-bottom:1px solid var(--line)}
.summary-list dt{color:var(--muted);font-size:13px}
.summary-list dd{margin:0;font-weight:800;text-align:right}
.button-row{display:flex;gap:9px;flex-wrap:wrap}
.button-row form{flex:1}.button-row a,.button-row button{width:100%}

.movement-list{display:flex;flex-direction:column}
.movement{display:grid;grid-template-columns:34px 1fr auto auto;align-items:center;gap:12px;padding:16px 0;border-bottom:1px solid var(--line)}
.movement:last-child{border-bottom:0}
.movement-icon{width:28px;height:28px;border-radius:50%;display:grid;place-items:center;background:var(--teal-soft);color:var(--teal-dark);font-weight:900;font-size:12px}
.movement-icon.rejected,.movement-icon.failed{background:#fbe9ec;color:var(--danger)}
.movement-main{display:flex;flex-direction:column;gap:4px}
.movement-main strong{font-size:13px}.movement-main small{font-size:10px;color:var(--muted);text-transform:uppercase}
.positive{color:#3a9b80}.negative{color:var(--danger)}
.movement-state{font-size:10px;font-weight:800;padding:5px 8px;border-radius:99px;background:#e6f7ef;color:#3b987f;text-transform:uppercase}
.movement-state.rejected,.movement-state.failed{background:#fbe9ec;color:var(--danger)}
.movement-state.pending,.movement-state.scheduled{background:#fff4db;color:#9b781f}
.compact .movement{grid-template-columns:30px 1fr auto auto;gap:8px}.compact .movement-state{font-size:9px}

.benefit-title{display:flex;align-items:center;gap:13px;margin:14px 0}
.benefit-title div{display:flex;flex-direction:column;gap:5px}.benefit-title small{color:var(--muted)}
.star{width:42px;height:42px;background:#f8e0a3;color:#fff;border-radius:50%;display:grid;place-items:center}
.benefit-card hr{border:0;border-top:1px solid var(--line);margin:22px 0}
.benefit-card p{font-size:13px;color:var(--muted);line-height:1.6}

.btn{appearance:none;border:1px solid transparent;border-radius:99px;padding:12px 18px;font-weight:800;font-size:11px;letter-spacing:.03em;cursor:pointer;text-align:center;display:inline-flex;align-items:center;justify-content:center;min-height:42px}
.btn:hover{text-decoration:none;filter:brightness(.98)}
.btn-primary{background:var(--teal);color:#fff}
.btn-magenta{background:var(--pink);color:#fff}
.btn-white{background:#fff;color:var(--teal-dark)}
.btn-outline{background:#fff;border-color:var(--teal);color:var(--teal-dark)}
.btn-soft{background:#f9edf3;color:var(--pink)}
.btn-danger-outline{background:#fff;border-color:#d69aa5;color:var(--danger)}
.btn-disabled{background:#eeecee;color:#aaa4a7;cursor:not-allowed}
.full{width:100%}

.auth-wrap{min-height:650px;display:grid;place-items:center;padding:20px 0}
.auth-wrap.wide .auth-card{max-width:720px}
.auth-card{width:100%;max-width:470px;background:#fff;border:1px solid var(--line);border-radius:26px;padding:38px;box-shadow:var(--shadow)}
.auth-logo{text-align:center;margin:-10px 0 12px}.auth-logo img{width:165px;height:105px;object-fit:contain}
.auth-card h1{font-size:29px;margin:0 0 10px;letter-spacing:-.03em}
.form-stack{display:flex;flex-direction:column;gap:16px}
.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}
.span-2{grid-column:span 2}.span-all{grid-column:1/-1}
label{display:flex;flex-direction:column;gap:7px;font-size:12px;font-weight:750;color:#615e60}
input,select,textarea{width:100%;border:1px solid #dcd8da;border-radius:12px;padding:12px 13px;font:inherit;background:#fff;color:var(--ink);outline:none}
input:focus,select:focus,textarea:focus{border-color:var(--teal);box-shadow:0 0 0 3px rgba(74,167,159,.12)}
textarea{resize:vertical;line-height:1.5}
.checkbox{flex-direction:row;align-items:flex-start;gap:10px;line-height:1.5}.checkbox input{width:18px;height:18px;margin-top:1px}
.auth-separator{display:flex;align-items:center;gap:10px;margin:22px 0;color:var(--muted);font-size:11px}
.auth-separator:before,.auth-separator:after{content:"";height:1px;background:var(--line);flex:1}

.alert{padding:12px 14px;border-radius:12px;font-size:13px;line-height:1.45;margin:12px 0}
.alert-error{background:#fbeaec;color:#944451;border:1px solid #f3ccd3}
.alert-warn{background:#fff6df;color:#856719;border:1px solid #f1dfaa}
.alert-success{background:#e9f8f2;color:#2c8069;border:1px solid #bfe7da}
.alert-info{background:#edf7f8;color:#347b7a;border:1px solid #c8e7e5}

.two-col{display:grid;grid-template-columns:1.2fr .8fr;gap:20px}
.admin-grid{display:grid;grid-template-columns:1fr 1.3fr;gap:20px}
.faq{display:flex;flex-direction:column;gap:12px}
.faq details{background:#fff;border:1px solid var(--line);border-radius:16px;padding:18px 20px}
.faq summary{font-weight:800;cursor:pointer}.faq p{color:var(--muted);line-height:1.6;margin-bottom:0}
.legal-content{line-height:1.7}.legal-content h2{margin-top:30px}.legal-content p,.legal-content li{color:#555155}
.empty-inline{padding:30px;color:var(--muted);text-align:center}

@media (max-width:900px){
  .shell{width:min(100% - 28px,1180px)}
  .topbar-inner{height:auto;min-height:68px;flex-wrap:wrap;padding:8px 0}
  .brand{width:120px;min-width:120px}.brand img{width:115px;height:45px}
  .nav{order:3;width:100%;height:40px;gap:20px;overflow-x:auto}
  .nav a{white-space:nowrap;font-size:12px}
  .user-chip>span:first-child{display:none}
  .dashboard-grid{grid-template-columns:1fr 1fr}
  .progress-card{grid-column:1/-1}
  .subscription-summary{grid-column:1/-1;grid-row:auto}
  .movements-card,.benefit-card{grid-column:auto}
  .help-card{grid-column:1/-1}
  .admin-grid,.two-col{grid-template-columns:1fr}
}
@media (max-width:620px){
  .shell{width:calc(100% - 24px)}
  .main{padding-top:22px}
  .page-head h1{font-size:28px}
  .dashboard-grid{display:flex;flex-direction:column}
  .progress-card{min-height:auto;display:block;padding:26px}
  .ring-wrap{margin:24px auto 0}
  .amount{font-size:36px}
  .empty-card{display:block;padding:28px}.empty-card form{margin-top:20px}
  .form-grid{grid-template-columns:1fr}.span-2{grid-column:auto}
  .auth-card{padding:28px 22px;border-radius:20px}
  .movement{grid-template-columns:30px 1fr auto}.movement-state{grid-column:2/4;justify-self:start}
  .compact .movement{grid-template-columns:30px 1fr auto}.compact .movement-state{grid-column:2/4}
  .footer{flex-direction:column;gap:8px}
}

/* Administración V1.1 */
.admin-metrics{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}
.metric-card{background:#fff;border:1px solid var(--line);border-radius:18px;padding:20px;box-shadow:var(--shadow);display:flex;flex-direction:column;gap:7px}
.metric-card span{font-size:12px;font-weight:800;text-transform:uppercase;letter-spacing:.05em;color:var(--muted)}
.metric-card strong{font-size:28px;letter-spacing:-.03em}.metric-card small{color:var(--muted);line-height:1.4}
.admin-top-gap{margin-top:20px}
.status-breakdown{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:10px 0 20px}
.status-breakdown div{border:1px solid var(--line);border-radius:14px;padding:16px;display:flex;align-items:center;justify-content:space-between}
.status-breakdown span{color:var(--muted);font-size:13px}.status-breakdown strong{font-size:22px}
.table-scroll{overflow:auto}.admin-table{border-collapse:collapse;width:100%;min-width:900px}.admin-table th,.admin-table td{padding:13px 12px;border-bottom:1px solid var(--line);text-align:left;font-size:12px}.admin-table th{color:var(--muted);font-size:10px;text-transform:uppercase;letter-spacing:.05em}
.mini-pill{display:inline-flex;padding:5px 8px;border-radius:99px;font-size:10px;font-weight:800;background:#ecf8f5;color:#3b9c8a}.mini-pill.not_found{background:#fff4db;color:#9b781f}.mini-pill.conflict{background:#fbe9ec;color:var(--danger)}
@media (max-width:900px){.admin-metrics{grid-template-columns:repeat(2,1fr)}}
@media (max-width:620px){.admin-metrics{grid-template-columns:1fr}.metric-card strong{font-size:24px}}

/* Funnel comercial V1.2 */
.public-nav{margin-left:auto}.nav-login{min-height:34px;padding:8px 14px}
.public-hero{padding:46px 0 22px;max-width:820px}.public-hero h1{font-size:48px;line-height:1.02;margin:10px 0 16px;letter-spacing:-.045em}.public-hero p,.muted-copy{color:var(--muted);line-height:1.65}.eyebrow{font-size:11px;font-weight:900;letter-spacing:.08em;color:var(--pink);text-transform:uppercase}
.program-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px;margin:18px 0 28px}.program-card{background:#fff;border:1px solid var(--line);border-radius:22px;padding:24px;box-shadow:var(--shadow);display:flex;flex-direction:column;gap:20px}.program-card h2{font-size:25px;margin:6px 0 8px}.program-card p{color:var(--muted);line-height:1.55;margin:0}.program-facts{margin:0;display:flex;flex-direction:column}.program-facts>div{display:flex;justify-content:space-between;gap:16px;border-bottom:1px solid var(--line);padding:11px 0}.program-facts dt{color:var(--muted);font-size:12px}.program-facts dd{margin:0;text-align:right;font-weight:800;font-size:13px}
.public-login-strip{margin:30px 0;background:var(--pink-soft);border-radius:20px;padding:22px 26px;display:flex;align-items:center;justify-content:space-between;gap:20px}.public-login-strip div{display:flex;flex-direction:column;gap:5px}.public-login-strip span{color:var(--muted);font-size:13px}
.program-detail{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(320px,.75fr);gap:32px;padding:44px 0}.program-detail h1{font-size:46px;margin:10px 0 14px;letter-spacing:-.04em}.lead{font-size:18px;color:var(--muted);line-height:1.6}.program-checkout-card{align-self:start;position:sticky;top:20px}.fine-print{display:block;color:var(--muted);line-height:1.55;margin-top:14px}.benefit-highlight{display:flex;gap:14px;align-items:center;background:var(--teal-soft);padding:18px;border-radius:16px;margin-top:26px}.benefit-highlight>span{width:42px;height:42px;border-radius:50%;display:grid;place-items:center;background:#f4d889;color:white}.benefit-highlight div{display:flex;flex-direction:column;gap:5px}.benefit-highlight small{color:var(--muted)}
.status-shell{min-height:620px;display:grid;place-items:center}.status-card{max-width:620px;text-align:center;padding:40px}.status-card h1{font-size:34px;margin:12px 0}.status-icon{width:60px;height:60px;border-radius:50%;background:var(--teal-soft);color:var(--teal-dark);display:grid;place-items:center;font-size:26px;font-weight:900;margin:18px auto}.timeline-simple{display:grid;grid-template-columns:repeat(4,1fr);gap:6px;margin:28px 0 20px}.timeline-simple span{font-size:10px;padding:10px 6px;border-radius:9px;background:#f0edef;color:#8b8689;font-weight:800}.timeline-simple span.done{background:var(--teal-soft);color:var(--teal-dark)}
@media (max-width:900px){.program-grid{grid-template-columns:1fr 1fr}.program-detail{grid-template-columns:1fr}.program-checkout-card{position:static}.public-hero h1,.program-detail h1{font-size:38px}}
@media (max-width:620px){.public-nav{width:100%;order:3;overflow-x:auto}.program-grid{grid-template-columns:1fr}.public-hero{padding-top:28px}.public-hero h1,.program-detail h1{font-size:32px}.public-login-strip{flex-direction:column;align-items:stretch}.timeline-simple{grid-template-columns:1fr 1fr}.status-card{padding:28px 22px}}


/* Portal cuenta primero + detalle HTML + tarjeta embebida V1.3 */
.public-login-buttons{display:flex;gap:10px;align-items:center}
.selected-program{margin:14px 0 20px;padding:15px 17px;border-radius:14px;background:var(--teal-soft);display:flex;flex-direction:column;gap:4px}
.selected-program span,.selected-program small{font-size:11px;color:var(--muted)}
.selected-program strong{font-size:15px}
.detail-login{margin-top:10px}
.program-html{margin-top:28px;line-height:1.7;color:#565256}
.program-html section{display:block}
.program-html h2{font-size:26px;margin:30px 0 12px;color:var(--ink);letter-spacing:-.02em}
.program-html h3{font-size:18px;margin:24px 0 10px;color:var(--ink)}
.program-html p{margin:0 0 14px}
.program-html ul{padding-left:22px;margin:10px 0 18px}
.program-html li{margin:8px 0}
.program-html small{color:var(--muted)}
.payment-layout{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(300px,.75fr);gap:20px}
.payment-card{max-width:760px}
.payment-card h2{margin-top:10px}
.payment-help{align-self:start}
.secure-badge{display:inline-flex;align-items:center;gap:7px;background:var(--teal-soft);color:var(--teal-dark);font-size:11px;font-weight:800;padding:8px 11px;border-radius:99px}
.mp-field{height:47px;border:1px solid #dcd8da;border-radius:12px;background:#fff;padding:0 12px;display:flex;align-items:center}
.mp-field:focus-within{border-color:var(--teal);box-shadow:0 0 0 3px rgba(74,167,159,.12)}
.payment-grid{grid-template-columns:1fr 1fr}
button:disabled{opacity:.65;cursor:not-allowed}
@media (max-width:900px){.payment-layout{grid-template-columns:1fr}.payment-card{max-width:none}}
@media (max-width:620px){.public-login-buttons{width:100%;flex-direction:column}.public-login-buttons .btn{width:100%}.payment-grid{grid-template-columns:1fr}.ring-wrap{margin-left:0}}

/* Suscripción efectiva + vista previa completa V1.4.1 */
.status-pill.not-subscribed{background:#fff4db;color:#9a7115}
.preview-banner{background:linear-gradient(120deg,#fff8e7,#fff);border:1px solid #f0dba0;border-radius:20px;padding:24px 26px;margin:0 0 18px;display:flex;align-items:center;justify-content:space-between;gap:28px;box-shadow:var(--shadow)}
.preview-banner h2{margin:4px 0 8px;font-size:24px;letter-spacing:-.025em}.preview-banner p{margin:0 0 7px;color:#655e52;line-height:1.55}.preview-banner small{display:block;color:var(--muted);line-height:1.5;max-width:760px}.preview-banner form{flex:0 0 auto}.preview-waiting{max-width:300px;background:#fff4db;color:#806119;border:1px solid #efdaa0;padding:14px 16px;border-radius:14px;font-size:12px;line-height:1.5;font-weight:700}
.preview-dashboard .progress-card{box-shadow:0 14px 40px rgba(53,132,126,.14)}
.preview-empty{display:flex;align-items:center;gap:13px;padding:16px;border:1px dashed #d7d2d5;border-radius:14px;background:#fbfafb}.preview-empty.large{padding:28px}.preview-empty-icon{width:34px;height:34px;border-radius:50%;display:grid;place-items:center;background:var(--teal-soft);color:var(--teal-dark);font-weight:900}.preview-empty div{display:flex;flex-direction:column;gap:4px}.preview-empty small{color:var(--muted);line-height:1.45}
.preview-feature-list{display:flex;flex-direction:column;gap:10px;margin:18px 0}.preview-feature-list>div{display:flex;flex-direction:column;gap:3px;padding:12px 14px;border-radius:12px;background:#faf8f9}.preview-feature-list span{color:var(--muted);font-size:12px}
@media (max-width:760px){.preview-banner{display:block}.preview-banner form,.preview-waiting{margin-top:18px;max-width:none}.preview-banner .btn{width:100%}}
