#personal-dashboard{margin:28px 0}#personal-dashboard h1{font-size:32px}.dashboard-toolbar{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:14px 0}#personal-dashboard button,#personal-dashboard select,#personal-dashboard input,.dashboard-button{font:inherit;color:inherit;border:1px solid #8b989e;background:transparent;padding:8px 12px;border-radius:0}#personal-dashboard button{cursor:pointer}#personal-dashboard button:hover,.dashboard-button:hover{border-color:#ff9d32}#dashboard-save{font-size:14px}#dashboard-save.error,#widget-error{color:#c74545}.dashboard-row{display:grid;min-width:0}.dashboard-pane{border:1px solid #8b989e;display:flex;flex-direction:column;min-width:0;min-height:0;overflow:hidden}.dashboard-pane header{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:10px;border-bottom:1px solid #8b989e}.dashboard-pane h2{font-size:18px;margin:0;overflow:hidden;text-overflow:ellipsis}.dashboard-body{flex:1;min-height:0;overflow:auto;padding:12px;position:relative}.dashboard-chart{position:relative;height:100%;min-height:150px}.dashboard-body table{width:100%;border-collapse:collapse;font-variant-numeric:tabular-nums}.dashboard-body td,.dashboard-body th{padding:10px 8px;border-bottom:1px solid #8b989e;text-align:right;white-space:nowrap}.dashboard-body td:first-child,.dashboard-body th:first-child{text-align:left;white-space:normal}.dashboard-up{color:#168253}.dashboard-down{color:#d54356}.dashboard-resize-x{cursor:col-resize;touch-action:none}.dashboard-resize-y{height:12px;cursor:row-resize;touch-action:none}.dashboard-resize-x:hover,.dashboard-resize-y:hover,.dashboard-resize-x:focus,.dashboard-resize-y:focus{background:#ff9d32}.dashboard-empty{display:grid;place-content:center;height:100%}.dashboard-body .terminal-news-item{display:block;padding:12px 0;border-bottom:1px solid #8b989e;text-decoration:none}.dashboard-body .terminal-news-item h3{font-size:18px}.dashboard-body .terminal-news-item time{font-size:13px}#dashboard-editor{width:min(620px,94vw);max-height:85vh;padding:24px;color:inherit;background:var(--bs-body-bg,#f6f5f1);border:1px solid #8b989e}#dashboard-editor::backdrop{background:#0008}#dashboard-editor label{display:block;margin:8px 0}#dashboard-editor select,#dashboard-editor input[type=search]{width:100%}#widget-results{max-height:35vh;overflow:auto;margin-top:12px}#widget-results button{display:block;width:100%;text-align:left;margin:6px 0}#widget-results button.selected{border:2px solid #ff9d32}#widget-selected{margin:8px 0;font-size:14px}.dashboard-loading{display:grid;place-content:center;height:100%}.dashboard-loading:before{content:'';width:28px;height:28px;border:3px solid #8b989e;border-top-color:#ff9d32;border-radius:50%;animation:dashboard-spin 1s linear infinite;margin:0 auto 12px}@keyframes dashboard-spin{to{transform:rotate(360deg)}}
@media(max-width:767px){.dashboard-row{display:flex!important;flex-direction:column;height:auto!important;gap:12px;margin-bottom:12px}.dashboard-pane{height:420px;flex:none}.dashboard-resize-x,.dashboard-resize-y{display:none}#personal-dashboard h1{font-size:26px}.dashboard-toolbar{gap:8px}.dashboard-pane header button{font-size:14px}}

.portfolio-summary{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:12px;margin-bottom:16px}.portfolio-summary span,.portfolio-summary strong,.portfolio-summary small{display:block}.portfolio-summary span,.portfolio-note{font-size:13px}.portfolio-summary strong{font-size:20px}.portfolio-operations{max-height:42vh;overflow:auto}.portfolio-operation{display:flex;gap:8px;flex-wrap:wrap;border-bottom:1px solid var(--site-border);padding:10px 0}.portfolio-operation strong{width:100%}.portfolio-operation label{flex:1;min-width:115px}.portfolio-operation input{width:100%;min-width:0}.portfolio-note{margin-top:12px}

#dashboard-count{display:flex;gap:6px}#personal-dashboard #dashboard-count button{display:grid;place-items:center;width:42px;height:42px;padding:8px;border:0;border-radius:7px}#personal-dashboard #dashboard-count button[aria-pressed="true"]{color:#ff8c22;background:rgba(255,157,50,.15)}#personal-dashboard #dashboard-count button:focus-visible{outline:2px solid #ff9d32;outline-offset:2px}

/* Fit the workspace to the viewport; long lists scroll inside their own window. */
html:has(#dashboard-grid){height:100%;overflow:hidden}
body.site-theme:has(#personal-dashboard){width:100%;max-width:none;margin:0}
body.site-theme:has(#dashboard-grid){height:100dvh;min-height:0;display:flex;flex-direction:column;overflow:hidden}
body.site-theme:has(#dashboard-grid)>.container{display:flex;flex-direction:column;flex:1;min-height:0;width:100%;max-width:none;margin:0;padding:0 8px 8px;overflow:hidden}
body.site-theme:has(#dashboard-grid)>.footer_index{display:none}
#personal-dashboard:has(#dashboard-grid){display:flex;flex-direction:column;flex:1;min-height:0;margin:0;overflow:hidden}
#personal-dashboard>.dashboard-toolbar{flex:none;margin:4px 0;gap:8px}
#dashboard-grid{display:flex;flex-direction:column;flex:1;min-height:0;overflow:hidden}
#dashboard-grid .dashboard-row{display:grid!important;min-height:0;height:auto!important;margin:0;gap:0}
#dashboard-grid .dashboard-pane{height:auto;min-height:0;flex:initial}
#dashboard-grid .dashboard-resize-y{height:8px;flex:0 0 8px;display:block}
#dashboard-grid .dashboard-resize-x{display:block}
#dashboard-grid .dashboard-pane header{padding:4px 8px;flex:none}
#dashboard-grid .dashboard-pane h2{font-size:15px;white-space:nowrap}
#dashboard-grid .dashboard-pane header button{padding:4px 8px;font-size:12px}
#dashboard-grid .dashboard-body{padding:6px}
#dashboard-grid .dashboard-chart{min-height:0}
@media(max-width:767px){#dashboard-grid .dashboard-pane h2{font-size:12px}#dashboard-grid .dashboard-pane header{gap:3px;padding:3px}#dashboard-grid .dashboard-pane header button{font-size:10px;padding:3px}#dashboard-save{font-size:11px}}

#dashboard-grid .dashboard-news .terminal-news-item{display:flex;align-items:baseline;flex-wrap:wrap;gap:3px 8px;padding:6px 2px;margin:0;line-height:1.3}#dashboard-grid .dashboard-news .terminal-news-item h3{font-size:13px;line-height:1.3;font-weight:500;margin:0;flex:1 1 160px}#dashboard-grid .dashboard-news .terminal-news-item time{font-size:11px;white-space:nowrap}#dashboard-grid .dashboard-news .news-category{font-size:10px;white-space:nowrap}#dashboard-grid .dashboard-news .news-category b{margin-left:4px}

#dashboard-grid .portfolio-quotes td,#dashboard-grid .portfolio-quotes th{padding:6px;font-size:12px}.portfolio-total{margin:12px 0 0;padding-top:10px;border-top:1px solid var(--site-border,#8b989e);grid-template-columns:repeat(2,minmax(0,1fr))}.portfolio-total strong{font-size:18px}

.dashboard-chart-controls{position:absolute;top:0;left:0;right:0;display:flex;flex-wrap:wrap;align-items:center;gap:3px;z-index:2}#personal-dashboard .dashboard-chart-controls button{height:26px;min-width:28px;padding:2px 5px;font-size:11px;line-height:20px;display:grid;place-items:center;border:1px solid var(--site-border,#8b989e);background:var(--site-bg,#f6f5f1)}#personal-dashboard .dashboard-chart-controls button[aria-pressed="true"]{background:#ff9d32;color:#17212b;border-color:#ff9d32}.dashboard-body>.dashboard-chart-controls{position:static}

#dashboard-grid .dashboard-pane header{height:32px;box-sizing:border-box}#dashboard-grid .dashboard-pane h2{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis}#dashboard-grid .dashboard-pane header button{flex:none}#dashboard-grid .dashboard-quote-list td,#dashboard-grid .dashboard-quote-list th{padding:4px 5px;font-size:11px;line-height:1.2}#dashboard-grid .dashboard-quote-list td:first-child{white-space:nowrap;max-width:160px;overflow:hidden;text-overflow:ellipsis}#dashboard-editor.portfolio-editor{width:min(850px,94vw)}.portfolio-add-controls{display:grid;grid-template-columns:1.2fr 1.5fr 1fr auto;gap:10px;align-items:end;padding-bottom:14px;border-bottom:1px solid var(--site-border,#8b989e)}#dashboard-editor .portfolio-add-controls label{margin:0;font-size:12px}#dashboard-editor .portfolio-add-controls input,#dashboard-editor .portfolio-add-controls select{height:38px;padding:6px;font-size:13px}.portfolio-operation{display:grid;grid-template-columns:minmax(120px,1.3fr) minmax(80px,1fr) minmax(90px,1fr) minmax(135px,1fr) 32px;align-items:end;gap:10px}#dashboard-editor .portfolio-operation label{min-width:0;margin:0;font-size:12px}.portfolio-operation strong{width:auto;font-size:13px;align-self:center}.portfolio-operation input{padding:6px!important;font-size:13px!important;height:36px;box-sizing:border-box}#personal-dashboard .portfolio-remove{padding:6px;border:0;color:#d54356;display:grid;place-items:center;height:36px}.portfolio-operations{margin-top:10px}@media(max-width:600px){.portfolio-add-controls{grid-template-columns:1fr 1fr}.portfolio-operation{grid-template-columns:1fr 1fr 32px}.portfolio-operation strong{grid-column:1/-1}.portfolio-operation label:nth-of-type(3){grid-column:1/3}}

#dashboard-save:not(.error){display:none}#dashboard-grid .dashboard-portfolio{display:flex;flex-direction:column;overflow:hidden}.portfolio-scroll{flex:1;min-height:0;overflow:auto}.dashboard-portfolio .portfolio-total{flex:none;margin:0;padding:8px 2px 2px;background:var(--site-bg,#f6f5f1)}

.portfolio-history{flex:none;font-size:11px;line-height:1.3;margin-top:5px;max-height:35%;overflow:auto}.portfolio-history summary{cursor:pointer;font-size:11px}.portfolio-history p{font-size:11px!important;line-height:1.3;margin:4px 0}

#dashboard-grid .dashboard-body:has(.dashboard-chart-controls){padding:0 4px 4px}.dashboard-chart-controls{top:4px;left:8px;right:8px;pointer-events:none}#personal-dashboard .dashboard-chart-controls button{pointer-events:auto}

.dashboard-pane{container-type:inline-size}.portfolio-total strong{font-size:clamp(11px,4.5cqw,18px);white-space:nowrap}.portfolio-total span,.portfolio-total small{font-size:clamp(9px,3cqw,12px)}#personal-dashboard .dashboard-quote-list th button{border:0;padding:0;font-size:11px;white-space:nowrap}#personal-dashboard .dashboard-quote-list input{padding:2px;width:100%;min-width:30px;font-size:10px;box-sizing:border-box;height:22px}.dashboard-quote-list{table-layout:fixed}.dashboard-quote-list th:first-child{width:38%}

.dashboard-latest{font-size:12px;font-weight:600;margin:0 8px;white-space:nowrap;color:var(--reading-text,inherit);}
