/* B1: local portfolio and health; reuse the existing theme and controls. */
.portfolio-active .top-controls>.field,.portfolio-active .h-notifications{display:none}
.p-modebar{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-bottom:18px}.p-modebar label{font-size:12px;font-weight:600}.p-modebar select{background:var(--panel);border:1px solid var(--border);border-radius:9px;padding:11px;color:var(--text);font:inherit;font-size:13px;max-width:100%}
.p-source{border:1px solid var(--border);border-left:3px solid var(--accent);padding:17px 20px;border-radius:10px;background:var(--panel)}.p-source strong{font-size:13px}.p-source p{font-size:12px;color:var(--muted);line-height:1.8;margin:5px 0 0}.p-save-status{color:var(--muted);font-size:11px;min-height:34px;padding:10px 0}
.p-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:17px;margin:8px 0 22px}.p-stats .card{padding:22px}.p-stats .card>span{font-size:12px;color:var(--muted);display:block}.p-stats .card>strong{display:block;font-size:23px;letter-spacing:-.5px;font-weight:550;margin:9px 0 5px;overflow-wrap:anywhere}.p-stats .card>small{font-size:10px;color:var(--muted)}
.p-section-head{display:flex;align-items:center;justify-content:space-between;gap:15px;margin-bottom:17px}.p-section-head h2{font-size:19px;font-weight:550;letter-spacing:-.4px;margin:4px 0}.p-positions>.p-section-head{padding:20px 23px;margin:0;border-bottom:1px solid var(--border)}.p-position{display:grid;grid-template-columns:minmax(150px,1fr) minmax(0,1.25fr) minmax(140px,1fr) 115px;gap:20px;padding:22px;border-bottom:1px solid var(--border);align-items:center}.p-position:last-child{border-bottom:0}.p-position small{display:block;color:var(--muted);font-size:10px;margin-top:3px}.p-position strong{font-size:13px;font-weight:600}.p-asset{display:flex;gap:10px;align-items:center}.p-quantity{min-width:0}.p-quantity strong{overflow-wrap:anywhere;display:block;font-variant-numeric:tabular-nums}.p-value{min-width:0}.p-value strong{overflow-wrap:anywhere}.p-row-actions{display:flex;flex-direction:column;align-items:flex-end}.p-delete{border:0;background:none;color:var(--red);font-size:12px;padding:10px 0;min-height:38px}.p-delete:hover{text-decoration:underline}
.p-health{margin-top:32px}.p-health-grid{display:grid;grid-template-columns:1fr 1fr;gap:20px}.p-health-card,.p-health-unavailable{padding:24px}.p-health h3{font-size:16px;font-weight:600;margin:0 0 16px}.p-health-unavailable>p{font-size:13px;color:var(--muted);line-height:1.8}.p-category-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:22px 0}.p-category-grid>div{padding:16px;background:var(--panel-alt);border-radius:10px;border:1px solid var(--border)}.p-category-grid strong,.p-category-grid span,.p-category-grid small{display:block}.p-category-grid strong{font-size:13px}.p-category-grid span{font-size:15px;margin:7px 0}.p-category-grid small{font-size:10px;color:var(--muted)}.p-weight-bar{display:flex;height:12px;gap:3px;overflow:hidden;border-radius:5px;margin:22px 0}.p-weight-row{display:flex;justify-content:space-between;gap:12px;font-size:13px;margin:15px 0}.p-weight-row>span{display:flex;gap:8px;align-items:center}.p-weight-row i{width:8px;height:8px;border-radius:3px}.p-health-card .e-muted{font-size:11px;line-height:1.8;margin:20px 0 0}.p-category{margin:22px 0}.p-category>div:first-child{display:flex;justify-content:space-between;font-size:12px;margin-bottom:9px}.p-category strong{font-weight:500}.p-alerts{margin-top:20px}.p-alerts article{border-top:1px solid var(--border);padding:15px 0}.p-alerts article strong{font-size:13px}.p-alerts article p{font-size:12px;color:var(--muted);line-height:1.8;margin:5px 0 0}.p-storage-note{display:flex;gap:12px;align-items:flex-start;color:var(--muted);margin-top:24px;font-size:11px;line-height:1.8}.p-storage-note svg{flex-shrink:0;margin-top:3px}.p-storage-note p{margin:0}
.p-error{border:1px solid var(--red);background:var(--red-bg);color:var(--text);padding:15px;border-radius:10px;font-size:12px;margin-top:14px;line-height:1.8}.p-form-error{color:var(--red);font-size:12px;line-height:1.7;min-height:18px}.p-field-label{display:block;font-size:12px;font-weight:600;margin:20px 0 8px}.p-input{width:100%;border:1px solid var(--border);border-radius:9px;background:var(--panel-alt);color:var(--text);padding:12px;font:inherit;font-size:14px}.p-input[aria-invalid=true]{border-color:var(--red)}.p-asset-results{display:grid;grid-template-columns:1fr 1fr;gap:7px;max-height:205px;overflow:auto;margin-top:10px;padding:3px}.p-asset-results button{padding:10px;border:1px solid var(--border);border-radius:8px;background:var(--panel);color:var(--text);text-align:left;min-height:53px}.p-asset-results button strong{font-size:12px}.p-asset-results button span,.p-asset-results button small{display:block;font-size:10px;color:var(--muted)}.p-asset-results button[aria-pressed=true]{border-color:var(--accent);background:var(--accent-bg)}.p-selected-asset{font-size:12px;color:var(--accent-strong);margin:13px 0}.p-form-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:24px}.p-danger{background:var(--red);color:var(--panel)}.p-form-note{margin-top:0}.p-position .private-amount{max-width:100%;white-space:normal;overflow-wrap:anywhere}.p-stats .private-amount{white-space:normal;overflow-wrap:anywhere}
@media(max-width:1200px){.p-position{grid-template-columns:minmax(120px,1fr) minmax(0,1.1fr) minmax(120px,1fr);gap:13px}.p-row-actions{grid-column:1/-1;flex-direction:row;gap:24px}.p-stats .card{padding:18px}.p-stats .card>strong{font-size:20px}}
@media(max-width:700px){.p-stats{grid-template-columns:1fr 1fr;gap:10px}.p-stats .card:nth-child(2){grid-column:1/-1;grid-row:1}.p-stats .card>strong{font-size:23px}.p-position{grid-template-columns:minmax(0,1fr) minmax(0,1fr);padding:18px}.p-asset{grid-column:1/-1}.p-row-actions{justify-content:flex-end;border-top:1px solid var(--border);padding-top:7px;margin-top:3px}.p-positions>.p-section-head{align-items:flex-start;flex-direction:column;gap:4px;padding:18px}.p-health-grid{grid-template-columns:1fr}.p-health>.p-section-head{align-items:flex-start;flex-direction:column;gap:7px}.p-category-grid{grid-template-columns:1fr 1fr}.p-health-card,.p-health-unavailable{padding:20px}.p-modebar{gap:9px}.p-modebar select{flex:1;min-width:0;font-size:12px}.p-modebar .e-badge{margin-left:0}.p-form-actions{flex-wrap:wrap}.p-form-actions button{flex:1}.p-quantity strong{font-size:12px}.p-value strong{font-size:12px}}
