/* Chart workspace: light shell, dark synchronized indicator panes. */
:root{color-scheme:light;--bg:#f4f4f6;--panel:#fff;--edge:#e8eaf0;--text:#15191f;--muted:#647084;--yellow:#ae913e;--green:#247548;--red:#b54242}
.masthead{border:0;padding:18px 22px 12px}.brand{font-size:30px;font-weight:450;letter-spacing:-1px}.brand span{font-size:12px;letter-spacing:2px;color:#a78b3e}.header-tools{display:flex;gap:12px;align-items:center}.badge.live{background:#eaf6ed}.badge.warn{background:#fff8df;color:#806616}main{max-width:2200px;padding:14px 20px}button{background:#fafbfc;color:#1a202c;border-color:#e8ebf2;border-radius:7px;padding:7px 10px;min-height:32px}button:hover{background:#edeef3}.primary{background:#c0a253;border-color:#c0a253}.primary:hover{background:#d3b86b}a{color:#866b26}input,select{background:#fff;color:#1a202c;border-color:#dfe3eb;min-height:34px;padding:6px 8px}button:disabled{cursor:default}.workspace-shell{display:grid;grid-template-columns:minmax(0,1fr) 310px;gap:16px;align-items:start}.workspace-shell.no-watchlist{grid-template-columns:minmax(0,1fr)}.chart-board{background:#fff;border-radius:18px;padding:12px 16px 6px;min-width:0}.board-toolbar{display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding:0 0 9px;color:#52627a;font-size:12px}.board-toolbar label{flex-direction:row;align-items:center;gap:6px;font-size:11px}.board-toolbar select{max-width:150px;font-size:12px}.board-actions{margin-left:auto;display:flex;gap:5px;align-items:center}.board-actions>button{width:29px;min-height:28px;padding:1px;font-size:20px}.layout-menu{position:relative}.layout-menu>summary{list-style:none;cursor:pointer;border:1px solid #e8ebf2;border-radius:7px;font-size:21px;padding:0 5px;line-height:26px;color:#a88b37}.layout-menu>summary::-webkit-details-marker{display:none}.layout-options{position:absolute;right:0;top:35px;display:flex;gap:5px;padding:8px;background:white;box-shadow:0 5px 20px #0002;border-radius:10px;z-index:10}.layout-options button{font-size:22px;display:flex;gap:5px;align-items:center}.layout-options small{font-size:10px}.layout-options [aria-pressed=true]{border-color:#b3933a;background:#fbf8ef;color:#987b2b}.chart-grid{display:grid;grid-template-columns:1fr;gap:12px}.chart-grid[data-count="2"]{grid-template-columns:repeat(2,minmax(0,1fr))}.chart-grid[data-count="3"]{grid-template-columns:repeat(3,minmax(0,1fr))}.chart-grid[data-count="4"]{grid-template-columns:repeat(2,minmax(0,1fr))}.instrument-tile{min-width:0;border:1px solid #e7eaf1;border-radius:10px;overflow:hidden;background:#151722}.instrument-tile.active{border-color:#b99b4d}.chart-grid[data-count="1"] .instrument-tile{border-color:transparent}.tile-toolbar{height:38px;background:#f3f4f7;display:flex;align-items:center;gap:5px;padding:4px 8px}.tile-symbol{display:flex;align-items:center;gap:6px;background:none;border:0;padding:0;min-height:28px;font-size:13px;min-width:0;white-space:nowrap}.tile-symbol>span:not(.symbol-icon){overflow:hidden;text-overflow:ellipsis}.tile-symbol small{font-size:11px;color:#a68a3a}.symbol-icon{display:inline-flex;width:17px;height:17px;min-width:17px;align-items:center;justify-content:center;border-radius:50%;background:#b99b4d;color:#fff;font-size:10px;font-weight:650}.tile-frames{margin-left:auto;display:flex;gap:3px;overflow:auto;max-width:55%;scrollbar-width:thin}.tile-frames button{font-size:11px;min-height:23px;padding:2px 5px;background:#e5e7ec;white-space:nowrap}.tile-frames button.selected{background:#111;color:white;border-color:#111}.chart-stack{height:clamp(570px,calc(100dvh - 205px),1050px);display:grid;grid-template-rows:minmax(0,5fr) minmax(0,1fr) minmax(0,1.2fr)}.chart-grid[data-count="4"] .chart-stack{height:520px}.chart-stack canvas{width:100%;height:100%;min-width:0;border-bottom:1px solid #373c50}.tile-status{height:22px;line-height:22px;padding:0 8px;color:#aab0c0;font-size:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tile-status.stale{color:#f0ba69!important}.feed-line{font-size:10px;min-height:30px;padding:8px 0 4px}.watchlist{background:#fff;border-radius:18px;padding:18px 12px;position:sticky;top:12px;max-height:calc(100dvh - 30px);overflow:auto}.watch-tabs{display:flex;gap:14px;border-bottom:1px solid #edf0f5;margin-bottom:12px}.watch-tabs button{border:0;background:none;border-radius:0;padding:8px 3px;border-bottom:2px solid transparent;font-size:13px}.watch-tabs .selected{color:#a88b37;border-bottom-color:#a88b37}.watch-search{font-size:10px;margin-bottom:12px}.watch-search input{font-size:12px}.watch-heading{display:grid;grid-template-columns:1fr auto 26px;font-size:12px;border-bottom:1px solid #edf0f5;padding:0 8px 12px}.watch-group{margin-top:14px}.watch-group summary{font-size:12px;cursor:pointer;padding:4px 9px 8px;list-style:none}.watch-group summary:after{content:'⌄';float:right}.watch-group:not([open]) summary:after{content:'›'}.watch-row{display:flex;align-items:center;border:1px solid transparent;border-radius:8px;min-height:33px;padding:0 4px}.watch-row.selected{border-color:#a9aaaf}.watch-instrument{display:flex;align-items:center;gap:5px;flex:1;min-width:0;background:none;border:0;font-size:12px;padding:4px;min-height:30px}.symbol-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:left}.quote{margin-left:auto;font-variant-numeric:tabular-nums;white-space:nowrap}.favorite{padding:0 3px;border:0;background:none;color:#969aa2;min-height:28px}.favorite[aria-pressed=true]{color:#ac8c2e}.source-dot{width:5px;height:5px;min-width:5px;border-radius:50%;background:#b09440}.stale-quote .source-dot{background:#bdc1c9}.stale-quote .quote{color:#8d95a4}.watch-note,.watch-empty{font-size:11px;color:#788193;line-height:1.6;padding:8px}.utility-bar{display:flex;align-items:center;gap:8px;margin-top:14px;flex-wrap:wrap}.utility-bar button{font-size:12px}.utility-bar span{font-size:11px;color:#738094;margin-left:auto}.alert-card,.detail-card{border:0;border-radius:15px}.alert-controls button{font-size:12px}#message{color:#88691b}.chart-board:fullscreen{overflow:auto;border-radius:0;padding:14px;background:#f4f4f6}.chart-board:fullscreen .chart-stack{height:calc(100dvh - 130px)}.chart-board:fullscreen .chart-grid[data-count="4"] .chart-stack{height:calc(50dvh - 100px)}
@media(min-width:1500px){.workspace-shell{grid-template-columns:minmax(0,1fr) 330px}.chart-grid[data-count="4"] .chart-stack{height:clamp(430px,calc(50dvh - 100px),700px)}}
@media(max-width:1100px){.workspace-shell{grid-template-columns:minmax(0,1fr) 255px;gap:10px}.chart-board{padding:10px}.chart-grid[data-count="3"]{grid-template-columns:repeat(2,minmax(0,1fr))}.chart-grid[data-count="3"] .instrument-tile:last-child{grid-column:span 2}.board-toolbar{gap:6px}.instrument-picker{max-width:200px}.chart-grid:not([data-count="1"]) .tile-toolbar{height:auto;min-height:38px;flex-wrap:wrap}.chart-grid:not([data-count="1"]) .tile-frames{max-width:100%}.chart-grid:not([data-count="1"]) .chart-stack{height:510px}}
@media(max-width:760px){main{padding:8px}.masthead{padding:12px}.brand{font-size:26px}.workspace-shell{grid-template-columns:1fr}.watchlist{position:static;max-height:420px;grid-row:2}.board-toolbar{flex-wrap:wrap}.board-toolbar label{font-size:10px}.board-actions{margin-left:auto}.chart-grid[data-count]{grid-template-columns:1fr}.chart-grid[data-count="3"] .instrument-tile:last-child{grid-column:auto}.chart-stack,.chart-grid:not([data-count="1"]) .chart-stack{height:610px}.tile-toolbar{height:36px}.tile-frames{max-width:65%}.feed-line{gap:3px}.utility-bar span{width:100%;margin:0}.badge{font-size:10px;padding:6px 8px}.chart-board:fullscreen .chart-grid[data-count="4"] .chart-stack{height:570px}}

#chart-grid[data-count="5"]{grid-template-columns:repeat(3,minmax(0,1fr))}#chart-grid[data-count="5"] .chart-stack{height:520px}#my-charts{font-size:12px;white-space:nowrap}
@media(max-width:1100px){#chart-grid[data-count="5"]{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:760px){#chart-grid[data-count="5"]{grid-template-columns:minmax(0,1fr)}}

.chart-actions #my-charts, #my-charts{width:auto;min-width:88px;padding:0 9px;flex-shrink:0}

.inventory-status { margin: 0; padding: 8px 16px; font-size: 13px; color: #48576b; background: #eef3f9; }
