/* Fase 3 · puerto del prototipo: qué se ve en cada estado y piezas comunes (tokens de app.css). */
#p3-home,#p3-summary,#p3-wiz-top,#p3-list-top,#p3-form-link{display:none}
body.view-reports[data-p3-role] #leader-head,body.view-reports[data-p3-role] #leader-seg,body[data-p3-role] .fg2-history-head>.grow{display:none!important}
body.view-reports[data-p3=home] #p3-home{display:block}
body.view-reports[data-p3=home] #submission,body.view-reports[data-p3=home] #report-history{display:none!important}
body.view-reports[data-p3=report] #p3-wiz-top{display:block}
body.view-reports[data-p3=report] #report-history{display:none!important}
body.view-reports[data-p3=sent] #submission{display:none!important}
body.view-reports[data-p3=sent] #p3-list-top,body.view-reports[data-p3=list] #p3-list-top{display:block}
body.view-reports[data-p3=summary] #p3-summary{display:block}
body.view-reports[data-p3=summary] #report-history,body.view-reports[data-p3=summary] #editor,
body.view-reports[data-p3=list] #editor,body.view-reports[data-p3=form] #report-history{display:none!important}
body.view-reports[data-p3=list] #p3-form-link:not([hidden]){display:flex}
body.view-reports[data-p3=people] #p3-summary,
body.view-reports[data-p3=people] #report-history,
body.view-reports[data-p3=people] #editor,
body.view-reports[data-p3=people] #p3-home,
body.view-reports[data-p3=people] #p3-wiz-top,
body.view-reports[data-p3=people] #p3-list-top,
body.view-reports[data-p3=people] #p3-form-link{display:none!important}
body.view-reports[data-p3=people] #people-panel:not([hidden]){display:block}
body.view-reports[data-p3=summary] #people-panel,
body.view-reports[data-p3=list] #people-panel,
body.view-reports[data-p3=form] #people-panel,
body.view-reports[data-p3=home] #people-panel,
body.view-reports[data-p3=report] #people-panel,
body.view-reports[data-p3=sent] #people-panel{display:none!important}
body.view-reports[data-p3=summary].p3-x #weekly-status{display:none}
#p3-summary.p3-past #weekly-status{display:none!important}
/* Cabecera grande del prototipo */
.p3-head{display:flex;align-items:flex-start;gap:12px;padding:12px 0 16px}
.p3-head .ttl{flex:1;min-width:0}
.p3-head .eyebrow,.p3-eyebrow{font-size:11px;font-weight:700;letter-spacing:.09em;text-transform:uppercase;color:var(--teal-d);margin:0}
.p3-head h1{font-size:30px;line-height:1.15;letter-spacing:-.025em;font-weight:800;margin:2px 0 0;color:var(--navy)}
.p3-head p{color:var(--muted);font-size:13.5px;margin:4px 0 0}
.p3-avatar{width:48px;height:48px;border-radius:50%;background:#fff;border:1px solid var(--line);display:grid;place-items:center;box-shadow:var(--shadow-sm);font-weight:700;color:var(--teal-d);flex:none;font-size:16px;cursor:pointer}
.p3-icon-btn{width:48px;height:48px;border-radius:50%;border:0;background:none;display:grid;place-items:center;color:var(--navy);cursor:pointer}
.p3-icon-btn:disabled{opacity:.35;cursor:default}
.p3-icon-btn .i,.p3-btn .i{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.p3-btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:52px;padding:0 22px;border-radius:999px;border:1px solid transparent;font:inherit;font-weight:700;font-size:15.5px;cursor:pointer;text-decoration:none}
.p3-stack{display:flex;flex-direction:column;gap:12px}
.p3-metrics{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.p3-metric{padding:16px;border-radius:var(--r-lg);background:#fff;border:1px solid var(--line);box-shadow:var(--shadow-md);min-height:112px;display:flex;flex-direction:column;justify-content:space-between;gap:6px}
.p3-metric .k{font-size:12.5px;font-weight:600;color:var(--muted);line-height:1.25}
.p3-metric .v{font-size:44px;font-weight:800;letter-spacing:-.03em;line-height:1;font-variant-numeric:tabular-nums;color:var(--navy)}
.p3-metric .v small{font-size:22px;font-weight:700;opacity:.75}
.p3-metric .foot{font-size:12px;color:var(--muted);min-height:0}
.p3-metric .foot:empty,.p3-metric .bar{display:none}
.p3-metric.teal{background:var(--teal);border-color:var(--teal);color:#fff}
.p3-metric.teal .k,.p3-metric.teal .v,.p3-metric.teal .foot{color:#fff}
.p3-metric.warn{background:var(--warn-bg);border-color:var(--warn-line)}
.p3-metric.warn .v{color:var(--warn)}
.p3-section-title{display:flex;align-items:baseline;justify-content:space-between;margin:12px 0 8px;gap:12px}
.p3-section-title h2{font-size:17px;font-weight:700;margin:0;color:var(--navy)}
.p3-section-title button,.p3-card-head button{font:inherit;font-size:13.5px;font-weight:600;color:var(--teal-d);background:none;border:0;cursor:pointer;min-height:44px}
.p3-list{display:flex;flex-direction:column;gap:10px;list-style:none;margin:0;padding:0}
.p3-row{display:flex;align-items:center;gap:12px;width:100%;padding:14px 16px;border-radius:var(--r-lg);background:#fff;border:1px solid var(--line);box-shadow:var(--shadow-sm);font:inherit;text-align:left;color:var(--navy);cursor:pointer}
.p3-row.is-static{cursor:default}
/* app.css pone button:hover en navy; esa regla gana a .p3-row y deja título y cifra invisibles (navy sobre navy). */
button.p3-row,
button.p3-row:hover,
button.p3-row:focus,
button.p3-row:focus-visible,
button.p3-row:active{
  background:#fff;
  border-color:var(--line);
  color:var(--navy);
}
button.p3-row:hover,
button.p3-row:focus-visible{
  background:var(--soft,#f0f6f8);
  border-color:var(--teal-100,#cfe9ed);
}
button.p3-row:active{background:var(--teal-50,#e8f5f7)}
button.p3-row.is-current,
button.p3-row.is-current:hover,
button.p3-row.is-current:focus,
button.p3-row.is-current:focus-visible,
button.p3-row.is-current:active{
  background:#fff;
  border-color:var(--teal,#008d9b);
  color:var(--navy);
  box-shadow:0 0 0 1px var(--teal-100,#cfe9ed), var(--shadow-sm);
}
button.p3-row.is-current:hover,
button.p3-row.is-current:focus-visible{background:var(--soft,#f0f6f8)}
.p3-row .ava,.p3-rc-row .ava{width:42px;height:42px;border-radius:50%;background:var(--teal-50);color:var(--teal-d);display:grid;place-items:center;font-weight:700;flex:none}
.p3-row .tx{flex:1;min-width:0}
.p3-row .tx strong{display:block;font-size:15.5px;font-weight:700;color:var(--navy)}
.p3-row .tx span{display:block;font-size:13.5px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.p3-row .end{flex:none;display:flex;align-items:baseline;gap:6px;color:var(--muted)}
.p3-row .end b{font-size:22px;color:var(--navy);font-weight:800}
.p3-row .end small{font-size:11px;color:var(--muted)}
.p3-card{background:#fff;border:1px solid var(--line);border-radius:var(--r-lg);box-shadow:var(--shadow-md);padding:16px}
.p3-card-head{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-bottom:8px}
.p3-card-head strong{font-size:15.5px;color:var(--navy)}
.p3-note{font-size:12.5px;color:var(--muted);margin:8px 0 0}
.p3-empty{color:var(--muted);font-size:14px;padding:16px;text-align:center;background:#fff;border:1px dashed var(--line);border-radius:var(--r-lg);margin:0}
/* Pestaña central «+ Reporte» del líder */
.tabbar .p3-tab-report .i{width:44px;height:28px;padding:3px 11px;border-radius:999px;background:var(--teal-d);stroke:#fff;color:#fff}
.tabbar a.p3-tab[aria-current=page] .i{background:var(--teal-50);border-radius:999px}
.tabbar .p3-tab .i{width:44px;height:28px;padding:3px 11px;border-radius:999px}
.tabbar a.p3-tab-report[aria-current=page] .i{background:var(--teal-d)}
/* El prototipo no enmarca las pantallas: quitar la tarjeta genérica de section/article */
#p3-home,#p3-summary,.p3-hero,body[data-p3-role] #submission,body[data-p3-role] #report-history{background:none;border:0;box-shadow:none;padding:0;margin:0;border-radius:0}
.p3-hero{border-radius:28px;padding:20px}
@media (max-width:1023px){body.view-reports[data-p3-role] #app-brandrow{display:none}}
body[data-p3-role] .tabbar a .i{width:44px;height:28px;padding:4px 12px;border-radius:999px}
body[data-p3-role] .tabbar a[aria-current=page] .i{background:var(--teal-50)}
body[data-p3-role] .tabbar a,body[data-p3-role] .tabbar .side-avatar{font-size:12px;gap:4px;align-self:stretch;height:100%;margin:0;line-height:1;-webkit-appearance:none;appearance:none}
body[data-p3-role] .tabbar .av{width:28px;height:28px;font-size:12px}

/* fg-movil-compacto: que nada se salga del ancho del teléfono. */
html{box-sizing:border-box}
*,*::before,*::after{box-sizing:inherit}
html,body{max-width:100%;overflow-x:clip}
.layout,#workspace,.layout>.main,#app-main{max-width:100%;overflow-x:hidden}
.layout>.main{padding-top:calc(16px + env(safe-area-inset-top,0px))}
body[data-p3-role=usher] .layout>.main{padding-bottom:24px}
button,input,select,textarea,.p3s-cta,.p3s-cta .go,.p3s-pill,.p3s-row,.p3s-ghost,.p3s-date,.p3inv-card,.p3as-cta{
  box-sizing:border-box;
  max-width:100%;
}
img,svg,video,canvas{max-width:100%;height:auto}
