/* Customer workspace: compact chart controls and touch-friendly account tools. */
.dashboard-page{--workspace-line:#214736;--workspace-panel:#0a2118;--workspace-muted:#a3bdaf;color:#ecf8f1}
.dashboard-page [hidden]{display:none!important}
.dashboard-page .dashboard-header{max-width:1800px;width:calc(100% - 40px);padding:12px 0;margin:auto}
.dashboard-page .dashboard-shell{max-width:1800px;width:calc(100% - 40px);padding:16px 0 32px}
.dashboard-page .dashboard-topbar{margin-bottom:18px;align-items:center}
.dashboard-page .dashboard-topbar h1{font-size:28px;line-height:1.2;margin:5px 0}
.dashboard-page .dashboard-topbar p{font-size:13px;margin:4px 0;color:var(--workspace-muted)}
.dashboard-page .dashboard-topbar .eyebrow{font-size:10px}
.dashboard-page .dashboard-plan-card{min-width:135px;padding:10px 16px}
.dashboard-page .dashboard-grid{grid-template-columns:240px minmax(0,1fr);gap:16px}
.dashboard-page .dashboard-card{padding:16px;border-radius:14px}
.dashboard-page .dashboard-card-head{margin-bottom:8px;gap:8px}
.dashboard-page .dashboard-card-head h2{font-size:22px;margin:0}
.dashboard-page .dashboard-card-head .dashboard-label{margin-bottom:4px;font-size:9px}
.dashboard-page .dashboard-live-info{margin-top:4px;gap:8px}
.last-data-update{display:block;margin-top:5px;color:var(--workspace-muted);font-size:11px}
.dashboard-page #dashboardLiveStatus[data-state=waiting]{color:#ffce7a;border-color:#665127}
.dashboard-page #dashboardLiveStatus[data-state=closed]{color:#adbcba;border-color:#3b514b}
.dashboard-page .dashboard-timeframes{gap:5px}
.dashboard-page .dashboard-timeframes button{font-size:12px;padding:8px 11px;min-height:38px}
.dashboard-page .indicator-picker{margin:8px 0!important;gap:6px!important}
.dashboard-page .indicator-picker .btn{font-size:12px;min-height:38px;padding:8px 11px}
.dashboard-page #loadEarlierCandles{margin:3px 0 8px;padding:6px 10px;font-size:11px;min-height:32px}
.dashboard-page #dashboardLiveChart{height:clamp(480px,70vh,900px);border-radius:10px}
.dashboard-page .dashboard-chart-card.is-expanded{padding:10px;gap:5px;max-width:none;height:100dvh}
.dashboard-page .is-expanded .chart-display-controls{max-height:34dvh;overflow:auto}
.dashboard-page .is-expanded #dashboardLiveChart{height:auto;min-height:150px;flex:1 1 0}
.dashboard-page .is-expanded .workspace-save-status{flex:0 0 auto}
.workspace-panel-title{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:10px}
.workspace-panel-title .dashboard-label{margin:0}
#watchlistCount{font-size:11px;color:var(--workspace-muted);background:#153626;padding:2px 6px;border-radius:5px}
.saved-watch-row{border-top:1px solid var(--workspace-line);padding:8px 0}
.watch-open{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:4px;width:100%;background:transparent;border:0;color:inherit;text-align:left;cursor:pointer;padding:7px 4px;border-radius:6px}
.watch-open[aria-current=true]{background:#103e2b}
.watch-open .watch-name{font-size:13px;font-weight:600;overflow-wrap:anywhere}
.watch-open small{font-size:10px;color:var(--workspace-muted)}
.watch-open strong{font-size:14px}
.watch-open .watch-change{align-self:center;text-align:right;font-size:11px}
.watch-state{grid-column:1/-1}
.watch-state[data-state=live],.watch-open .positive{color:#54df99}
.watch-state[data-state=delayed]{color:#ffce7a}
.watch-open .negative{color:#ff9393}
.watch-actions{display:flex;gap:6px;justify-content:flex-end;margin-top:4px}
.watch-actions button,.workspace-save-status button{border:1px solid var(--workspace-line);background:#102c20;color:#bdd9ca;min-width:30px;min-height:28px;border-radius:5px;cursor:pointer}
.workspace-empty{font-size:12px;color:var(--workspace-muted);line-height:1.6;margin:8px 0}
.workspace-notice{padding:6px 10px;font-size:12px;line-height:1.4;background:#113e29;border:1px solid #286646;border-radius:6px;margin:6px 0}
.workspace-notice.is-error{color:#ffd4bd;background:#3a2619;border-color:#66462e}
.workspace-save-status{display:flex;align-items:center;gap:8px;color:var(--workspace-muted);font-size:10px;min-height:12px;margin-top:5px}
.dashboard-page .dashboard-search-result{width:100%;color:inherit;text-align:left;border:1px solid var(--workspace-line);background:var(--workspace-panel);cursor:pointer;padding:10px}
.dashboard-page button:focus-visible,.dashboard-page summary:focus-visible{outline:2px solid #59daa0;outline-offset:3px}
.dashboard-page button:disabled{opacity:.48;cursor:default}
.watchlist-details summary{cursor:pointer;list-style:none}
.watchlist-details summary:after{content:'⌄';float:right;color:var(--workspace-muted)}
.watchlist-details summary::-webkit-details-marker{display:none}
.watchlist-details summary .workspace-panel-title{display:inline-flex;width:calc(100% - 20px)}
/* Drawing UI sits over the chart without changing its size or rebuilding it. */
.chart-drawings-root{inset:8px auto auto 8px;z-index:30;color:#ecf8f1;max-width:calc(100% - 70px)}
.chart-drawings-toolbar{gap:1px;padding:3px;background:#0d271eed;border-color:#3c594b}
.drawing-button{width:34px;height:34px;background:transparent;color:#cfe8da}
.drawing-button:hover,.drawing-button:focus-visible,.drawing-button[aria-pressed=true]{background:#214d38;color:#61edab}
.drawing-toolbar-separator{background:#385442;margin:3px}
.drawing-popover{pointer-events:auto;top:0;left:43px;background:#10281f;color:#e4f3ea;border-color:#3c594b;max-height:min(60vh,450px);width:260px}
.drawing-popover strong{color:#b5cfbf;border-bottom-color:#3c594b}
.drawing-popover>button{background:transparent;color:#e4f3ea;min-height:42px}
.drawing-popover>button:hover,.drawing-popover>button:focus-visible{background:#244b38;color:#8affbf}
.drawing-menu-icon{color:#b5cfbf}
.drawing-inspector{position:absolute;left:43px;top:0;min-width:210px;max-width:250px;background:#10281f;color:#e4f3ea;border-color:#3c594b}
.drawing-inspector strong{font-size:12px}
.drawing-inspector select,.drawing-inspector input,.drawing-inspector button{background:#183b29;color:#e4f3ea;border:1px solid #41634e;min-height:34px}
.drawing-tool-status{left:43px;top:auto;bottom:-25px;max-width:240px;white-space:normal;background:#143824;color:#cfffe3;pointer-events:none}
.drawing-tool-status:empty{display:none}
.chart-drawings-root>button{pointer-events:auto;min-height:40px}
/* Native dialogs stay accessible in normal and expanded chart views. */
.workspace-dialog{width:min(580px,calc(100vw - 24px));max-height:90dvh;overflow:auto;padding:22px;border:1px solid #345743;border-radius:16px;background:#0a2118;color:#effaf3;box-sizing:border-box}
.workspace-dialog::backdrop{background:#000a;backdrop-filter:blur(3px)}
.workspace-dialog-head{display:flex;align-items:center;justify-content:space-between}
.workspace-dialog-head small{font-size:10px;letter-spacing:.12em;color:#5ddb97}
.workspace-dialog h2{margin:4px 0;font-size:24px}
.workspace-dialog h3{font-size:15px;margin:20px 0 10px}
.workspace-dialog p,.workspace-dialog small{color:#b7cbbf;font-size:12px;line-height:1.5}
#closeAlerts{font-size:25px;border:1px solid #345743;border-radius:8px;background:transparent;color:white;width:42px;height:42px;cursor:pointer}
#alertForm{display:grid;gap:12px;margin:18px 0}
#alertForm label{display:grid;gap:6px;font-size:12px}
#alertForm input,#alertForm select{min-width:0;width:100%;box-sizing:border-box;border:1px solid #345743;border-radius:7px;background:#04170f;color:#f0fff5;font-size:15px;padding:10px;min-height:42px}
.alert-indicator-fields{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.alert-notification-controls{display:flex;align-items:center;gap:12px;flex-wrap:wrap;font-size:12px}
.alert-notification-controls button{font-size:11px}
.alert-row{padding:12px;border:1px solid #2c4c39;border-radius:8px;display:flex;flex-direction:column;gap:6px;margin:8px 0;overflow-wrap:anywhere}
.alert-row strong{font-size:13px}
.alert-row button{align-self:flex-end;border:0;background:transparent;color:#ffb8a2;padding:7px;cursor:pointer}
@media(max-width:1100px){.dashboard-page .dashboard-grid{grid-template-columns:210px minmax(0,1fr)}.dashboard-page .dashboard-card{padding:12px}.dashboard-page .dashboard-topbar h1{font-size:24px}}
@media(max-width:760px){
 .dashboard-page .dashboard-header,.dashboard-page .dashboard-shell{width:calc(100% - 20px)}
 .dashboard-page .dashboard-header{gap:8px;flex-wrap:wrap}
 .dashboard-page .dashboard-header-actions .btn{padding:8px 10px;font-size:11px}
 .dashboard-page .dashboard-grid{grid-template-columns:minmax(0,1fr)}
 .dashboard-page .dashboard-sidebar{order:0;grid-template-columns:minmax(0,1fr);gap:10px}
 .dashboard-page .dashboard-main{order:1}
 .dashboard-page .dashboard-topbar{gap:10px;margin-bottom:12px;flex-direction:row}
 .dashboard-page .dashboard-topbar h1{font-size:21px}
 .dashboard-page .dashboard-topbar p,.dashboard-page .dashboard-topbar .eyebrow{display:none}
 .dashboard-page .dashboard-plan-card{width:auto;min-width:85px;padding:8px 10px}
 .dashboard-page .dashboard-sidebar>.dashboard-card:first-child{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:6px}
 .dashboard-page .dashboard-sidebar>.dashboard-card:first-child>.dashboard-label{grid-column:1/-1;margin:0}
 .dashboard-page .dashboard-sidebar .dashboard-input{margin:0;height:42px;font-size:16px;min-width:0}
 .dashboard-page #dashboardSearchBtn{margin:0;width:auto;height:42px;padding:8px 16px}
 #dashboardSearchResults{grid-column:1/-1}
 .dashboard-page .dashboard-card-head{flex-direction:row;align-items:flex-start}
 .dashboard-page .dashboard-timeframes{width:auto;flex-wrap:wrap;justify-content:flex-start}
 .dashboard-page #showLoadedHistory,.dashboard-page #showLatest{flex:0 0 auto;font-size:11px;min-height:36px}
 .dashboard-page .dashboard-timeframe{flex:0 0 auto}
 .dashboard-page #dashboardLiveChart{height:65svh;min-height:380px}
 .dashboard-page .indicator-picker .btn{flex:0 1 auto;font-size:11px}
 .watch-actions button{min-height:38px;min-width:38px}
 .chart-drawings-root{inset:6px 66px auto 6px;max-width:none}
 .chart-drawings-toolbar{flex-direction:row;flex-wrap:wrap;width:max-content;max-width:100%;gap:0}
 .drawing-button{width:36px;height:36px}
 .drawing-toolbar-separator{display:none}
 .drawing-popover,.drawing-inspector{left:0;top:82px;width:min(270px,calc(100vw - 120px));max-height:45svh}
 .drawing-tool-status{left:0;bottom:-24px;max-width:100%}
 .dashboard-page .is-expanded .chart-display-controls{max-height:42dvh}
 .dashboard-page .is-expanded #dashboardLiveChart{min-height:160px;height:auto}
 .workspace-dialog{padding:16px}
}
@media(max-width:760px) and (orientation:landscape){.dashboard-page .is-expanded .chart-display-controls{max-height:38dvh}.drawing-button{width:30px;height:30px}.drawing-popover,.drawing-inspector{top:38px}}

.chart-drawings-root[data-tools-open=false] .chart-drawings-toolbar,.chart-drawings-root[data-tools-open=false] .drawing-inspector{display:none}
.dashboard-page #dashboardLiveChart{margin-top:6px}
