.tc-workspace{max-width:1200px;margin:24px auto;padding:0 16px;overflow-wrap:anywhere}.tc-warning{background:#711d28;color:#fff;border:2px solid #ef6572;border-radius:12px;padding:16px;line-height:1.8;font-weight:700;margin-bottom:16px}.tc-panel,.tc-metrics article,.tc-review{background:var(--card);border:1px solid var(--line);border-radius:14px;padding:16px;margin-bottom:14px}.tc-metrics{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,210px),1fr));gap:12px}.tc-metrics strong{display:block;font-size:22px;margin-top:8px}.tc-head,.tc-actions,.tc-row{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}.tc-row{border-bottom:1px solid var(--line);padding:12px 0}.tc-fields{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,190px),1fr));gap:12px;align-items:end}.tc-workspace label,.tc-ticket label{display:block}.tc-workspace input,.tc-ticket input,.tc-ticket select,.tc-ticket textarea{width:100%;box-sizing:border-box;min-width:0;background:var(--bg-soft);color:var(--text);border:1px solid var(--line);padding:10px;border-radius:8px;font:inherit;margin:6px 0}.tc-button,.tc-open{display:inline-block;background:var(--action);color:white;border:0;border-radius:8px;padding:10px 14px;font:inherit;cursor:pointer}.tc-button:disabled{opacity:.5;cursor:not-allowed}.tc-ticket{background:var(--bg);color:var(--text);border:1px solid var(--line);border-radius:16px;width:min(760px,calc(100vw - 24px));max-height:90dvh;box-sizing:border-box;overflow:auto;padding:18px}.tc-ticket::backdrop{background:#000a}.tc-ticket output{display:block;white-space:pre-wrap;min-height:40px;margin:12px 0}.tc-notice{border:1px solid var(--info);padding:12px;border-radius:10px}.tc-workspace summary{cursor:pointer}.tc-workspace small{color:var(--muted)}@media(max-width:600px){.tc-workspace{padding:0 12px}.tc-ticket{padding:12px}.tc-fields{grid-template-columns:1fr}.tc-head h1{font-size:23px}.tc-metrics{grid-template-columns:1fr 1fr}.tc-metrics strong{font-size:17px}.tc-warning{padding:12px;font-size:13px}}@media(prefers-reduced-motion:reduce){.tc-ticket{scroll-behavior:auto}}

/* Shared, compact market action; no layout-changing button styling. */
.paper-link.tc-open{display:inline-flex;align-items:center;background:transparent!important;border:0!important;color:#b96b00!important;padding:3px 5px!important;font-size:12px!important;line-height:20px;white-space:nowrap;min-height:24px;box-shadow:none!important;border-radius:4px;font-weight:600}.paper-link.tc-open:hover{color:#d97706!important;text-decoration:underline}.paper-link.tc-open:focus-visible{outline:2px solid #f59e0b;outline-offset:2px;text-decoration:underline}[data-theme=dark] .paper-link.tc-open{color:#f59e0b!important}.tc-inline-actions{white-space:nowrap}.tc-tabs{display:flex;gap:4px;overflow-x:auto;margin:12px 0;border-bottom:1px solid var(--line)}.tc-tabs button{background:transparent;color:var(--muted);border:0;padding:10px 12px;white-space:nowrap;font:inherit;font-size:13px;cursor:pointer}.tc-tabs button[aria-selected=true]{color:var(--text);border-bottom:2px solid #f59e0b}.tc-workspace [hidden],.tc-ticket [hidden]{display:none!important}.tc-warning{font-size:13px;padding:10px 12px;line-height:1.5}.tc-warning details{display:inline}.tc-warning summary{display:inline;cursor:pointer;text-decoration:underline}.tc-ticket h2{font-size:19px}.tc-ticket p{font-size:13px;line-height:1.5;margin:8px 0}.tc-profit{color:#16a34a}.tc-loss{color:#ef4444}.tc-workspace svg{width:100%;height:140px}.tc-review{padding:10px}.tc-metrics article{padding:12px}.tc-metrics strong{font-size:18px}.tc-metrics{grid-template-columns:repeat(3,minmax(0,1fr))}.tc-ticket .tc-warning{margin-bottom:8px}.tc-ticket .tc-fields{grid-template-columns:repeat(2,minmax(0,1fr))}@media(max-width:600px){.tc-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.tc-tabs button{font-size:12px;padding:10px 8px}.tc-ticket .tc-fields{grid-template-columns:repeat(2,minmax(0,1fr))}}

.tc-workspace select{width:100%;background:var(--card);color:var(--text);border:1px solid var(--line);border-radius:8px;padding:10px;font:inherit}.tc-head h1{font-size:24px}.tc-workspace{color:var(--text)}.tc-workspace h2{font-size:18px}.tc-workspace h3{font-size:15px}.tc-ticket #tc-close{background:transparent;color:var(--text);border:1px solid var(--line);border-radius:6px;padding:6px 10px;cursor:pointer}
.tc-metrics article{margin-bottom:0}.tc-notice{font-size:12px;margin-bottom:12px;padding:8px 10px}.tc-notice summary{cursor:pointer}
#tc-allocation progress{display:block;width:100%;height:8px;accent-color:#f59e0b}
.tc-currency-choice{display:inline-flex!important;align-items:center;gap:6px;font-size:12px}.tc-currency-choice select{width:82px!important;padding:5px 8px!important;font-size:12px!important}

.tc-display-switch{display:inline-flex;align-items:center;gap:2px;border-radius:18px;background:var(--surface,#f3f4f6);padding:2px;font-size:12px;white-space:nowrap}.tc-display-switch button{border:0;background:transparent;color:inherit;border-radius:15px;padding:6px 10px;cursor:pointer;transition:background .15s,color .15s}.tc-display-switch button[aria-pressed=true]{background:#b45309;color:#fff}.tc-display-switch button:focus-visible{outline:2px solid #f59e0b;outline-offset:2px}

.tc-table-currency{font-size:12px;font-weight:400;color:var(--muted)}
.tc-table-wrap{overflow-x:auto}
.tc-pos-table,.tc-ord-table{width:100%;border-collapse:collapse;font-size:13px}
.tc-pos-table th,.tc-ord-table th{text-align:center;font-size:11px;color:var(--muted);font-weight:600;padding:6px 8px;border-bottom:1px solid var(--line)}
.tc-pos-table td,.tc-ord-table td{padding:8px;border-bottom:1px solid var(--line-soft,var(--line));color:var(--muted-2,var(--muted));vertical-align:middle;text-align:center;display:table-cell}
.tc-pos-table th:first-child,.tc-ord-table th:first-child,.tc-pos-table td.tc-col-name,.tc-ord-table td.tc-col-name{text-align:right}
.tc-row-main{cursor:pointer}
.tc-row-main:hover{background:var(--bg-soft)}
.tc-row-main:focus-visible{outline:2px solid #f59e0b;outline-offset:-2px}
.tc-row-detail td{background:var(--bg-soft);color:var(--muted);font-size:12px;padding:10px 12px;text-align:start}
.tc-row-detail .tc-fields{margin-top:6px}
.tc-col-name{color:var(--text)}
.tc-name-inner{display:flex;align-items:center;gap:8px}
.tc-company-name{font-weight:700;color:var(--action);font-size:13px}
.tc-symbol{color:var(--muted);font-size:11px}
.tc-expand-chevron{margin-inline-start:auto;flex-shrink:0;width:7px;height:7px;border-inline-end:2px solid var(--muted);border-bottom:2px solid var(--muted);transform:rotate(45deg);transition:transform .15s}
.tc-row-main[aria-expanded=true] .tc-expand-chevron{transform:rotate(-135deg)}
.tc-col-pl{font-weight:700;font-variant-numeric:tabular-nums}
.tc-col-pl.tc-profit{color:#16a34a}
.tc-col-pl.tc-loss{color:#ef4444}
.tc-pos-table td[dir=ltr],.tc-ord-table td[dir=ltr]{font-variant-numeric:tabular-nums}
.tc-badge{display:inline-block;font-size:11px;padding:2px 8px;border-radius:10px;background:var(--bg-soft,#eef0f3);color:var(--muted);font-weight:600;white-space:nowrap}
.tc-badge-stale{background:#fb923c26;color:#b45309}
[data-theme=dark] .tc-badge-stale{background:#fb923c33;color:#fdba74}
.tc-delay-note{color:var(--muted);font-size:11px}
.tc-badge-buy{background:color-mix(in srgb,var(--buy-fill,#087b58) 18%,transparent);color:var(--buy-fill,#087b58)}
.tc-badge-sell{background:color-mix(in srgb,var(--sell-fill,#b83843) 18%,transparent);color:var(--sell-fill,#b83843)}
.tc-pos-table details,.tc-row-detail details{display:inline-block;margin-top:4px}
.tc-pos-table summary{font-size:12px;color:var(--muted)}
@media(max-width:600px){
.tc-pos-table thead{display:none}
.tc-pos-table,.tc-pos-table tbody{display:block;width:100%}
.tc-pos-table .tc-row-main{display:grid;grid-template-columns:1fr 1fr;grid-template-areas:"name pl" "qty price";gap:2px 10px;padding:10px 4px}
.tc-pos-table .tc-row-main td{display:block;padding:0;border:0}
.tc-col-avgcost,.tc-col-value{display:none}
.tc-col-name{grid-area:name}
.tc-col-pl{grid-area:pl;text-align:end;justify-self:end}
.tc-col-qty{grid-area:qty}
.tc-col-price{grid-area:price;text-align:end;justify-self:end}
.tc-pos-table .tc-row-detail{display:block}
.tc-pos-table .tc-row-detail td{display:block}
.tc-ord-table thead{display:none}
.tc-ord-table,.tc-ord-table tbody{display:block;width:100%}
.tc-ord-table .tc-row-main{display:flex;flex-wrap:wrap;align-items:center;gap:6px;padding:10px 4px}
.tc-ord-table .tc-row-main td{display:inline-flex;padding:0;border:0;width:auto}
.tc-ord-table .tc-row-main .tc-col-name{width:100%}
.tc-order-time{margin-inline-start:auto;font-size:11px;color:var(--muted)}
.tc-ord-table .tc-row-detail{display:block}
.tc-ord-table .tc-row-detail td{display:block}
}

.tc-coach-summary{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin-bottom:14px}
.tc-coach-summary article{background:var(--bg-soft);border-radius:10px;padding:10px;text-align:center}
.tc-coach-summary small{display:block;font-size:11px;margin-bottom:4px}
.tc-coach-summary strong{display:block;font-size:16px}
.tc-coach-progress{background:var(--line-soft,var(--line));border-radius:6px;height:6px;margin:4px 0;overflow:hidden}
.tc-coach-progress-fill{background:var(--action);height:100%}
.tc-coach-repeats{margin-bottom:10px}
.tc-coach-repeat-line{font-size:13px;color:#b45309;margin:4px 0}
[data-theme=dark] .tc-coach-repeat-line{color:#fdba74}
.tc-coach-chart{display:flex;align-items:flex-end;gap:14px;height:110px;margin-bottom:16px;padding:0 4px;overflow-x:auto}
.tc-coach-chart-col{display:flex;flex-direction:column;align-items:center;justify-content:flex-end;flex-shrink:0;width:52px;height:100%}
.tc-coach-chart-fill{width:20px;min-height:3px;background:var(--action);border-radius:3px 3px 0 0}
.tc-coach-chart-count{font-size:11px;font-weight:700;margin-top:4px}
.tc-coach-chart-label{font-size:10px;color:var(--muted);text-align:center;line-height:1.3;margin-top:2px;max-width:60px}
.tc-coach-list{display:flex;flex-direction:column;gap:8px}
.tc-coach-row{background:var(--bg-soft);border-radius:10px;padding:2px 12px}
.tc-coach-row summary{list-style:none}
.tc-coach-row summary::-webkit-details-marker{display:none}
.tc-coach-row-summary{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:8px 0}
.tc-coach-row-detail{padding:4px 0 10px;font-size:12px;color:var(--muted)}
.tc-coach-row-detail p{margin:4px 0}
.tc-badge-warn{background:#fde68a40;color:#b45309}
[data-theme=dark] .tc-badge-warn{background:#fde68a26;color:#fbbf24}
.tc-badge-bad{background:color-mix(in srgb,var(--sell-fill,#b83843) 18%,transparent);color:var(--sell-fill,#b83843)}
@media(max-width:600px){
.tc-coach-summary{grid-template-columns:repeat(2,1fr)}
.tc-coach-chart{gap:8px}
.tc-coach-chart-col{width:44px}
}

.tc-report-charts{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-bottom:16px}
.tc-chart-box{background:var(--bg-soft);border-radius:12px;padding:10px}
.tc-chart-box h3{margin:0 0 6px}
.tc-chart-svg{width:100%;height:160px;display:block}
.tc-chart-axis-label{font-size:9px;fill:var(--muted)}
.tc-chart-last-label{font-size:10px;font-weight:700}
.tc-alloc-bar{display:flex;width:100%;height:14px;border-radius:7px;overflow:hidden;background:var(--line-soft,var(--line))}
.tc-alloc-seg{height:100%}
.tc-alloc-legend{display:flex;flex-wrap:wrap;gap:10px;margin-top:10px;font-size:12px}
.tc-alloc-legend-item{display:flex;align-items:center;gap:6px}
.tc-alloc-dot{width:10px;height:10px;border-radius:50%;flex-shrink:0}
.tc-report-table-wrap details{margin-bottom:10px}
.tc-report-table-wrap summary{font-weight:600;padding:8px 0;cursor:pointer}
.tc-report-more{font-size:12px;margin-top:6px;display:inline-block}
@media(max-width:600px){.tc-report-charts{grid-template-columns:1fr}}
