.table-main { min-width: 0; }
.table-intro { display: flex; justify-content: space-between; gap: 30px; align-items: flex-end; padding: 31px 25px 24px; border: 1px solid var(--line); background: linear-gradient(120deg, rgba(28, 44, 52, .88), rgba(16, 25, 35, .74)); }
.table-intro h2 { margin: 10px 0 10px; font-size: clamp(19px, 2.2vw, 28px); font-weight: 500; letter-spacing: -.03em; }
.table-intro p { max-width: 760px; color: var(--muted); font-size: 11px; line-height: 1.7; }
.table-source { flex: 0 0 190px; border-left: 1px solid var(--line-bright); padding-left: 18px; color: var(--muted); font: 9px var(--mono); line-height: 1.7; }
.table-source strong { color: var(--green); font-weight: 400; word-break: break-word; }
.table-summary { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-top: 12px; }
.table-summary article { min-height: 105px; padding: 17px 16px; border: 1px solid var(--line); background: rgba(20, 29, 40, .78); }
.table-summary span, .table-summary small { display: block; color: var(--muted); font: 9px var(--mono); }
.table-summary strong { display: block; margin: 11px 0 5px; color: var(--paper); font: 24px var(--mono); letter-spacing: -.08em; }
.table-summary small { font-size: 8px; line-height: 1.4; }
.deduction-board { margin-top: 12px; padding: 24px 25px 20px; border: 1px solid var(--line); background: linear-gradient(130deg, rgba(23, 35, 45, .96), rgba(12, 18, 26, .9)); }
.deduction-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.deduction-heading h2 { margin: 9px 0 8px; font-size: clamp(18px, 2vw, 25px); font-weight: 500; letter-spacing: -.03em; }
.deduction-heading p { max-width: 760px; color: var(--muted); font-size: 10px; line-height: 1.65; }
.deduction-stamp { flex: 0 0 178px; padding: 11px 13px; border-left: 1px solid var(--green); background: rgba(152,229,155,.045); }
.deduction-stamp span, .deduction-stamp small { display: block; color: var(--muted); font: 8px var(--mono); }
.deduction-stamp strong { display: block; margin: 7px 0 4px; color: var(--green); font: 12px var(--mono); }
.deduction-flow { display: flex; align-items: stretch; gap: 8px; margin-top: 21px; }
.deduction-flow > div { flex: 1; min-width: 0; padding: 12px 11px; border: 1px solid var(--line); background: rgba(8, 13, 19, .55); }
.deduction-flow > div.flow-pending { border-color: rgba(232,199,109,.42); background: rgba(232,199,109,.05); }
.deduction-flow i { display: grid; place-items: center; color: var(--muted); font: 16px var(--mono); font-style: normal; }
.deduction-flow small, .deduction-flow span { display: block; color: var(--muted); font: 8px var(--mono); line-height: 1.4; }
.deduction-flow strong { display: block; margin: 8px 0 5px; color: var(--paper); font: 23px var(--mono); letter-spacing: -.08em; }
.deduction-flow .flow-pending strong { color: var(--yellow); }
.analysis-charts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 12px; }
.analysis-panel { min-width: 0; padding: 15px 16px 13px; border: 1px solid var(--line); background: rgba(9, 15, 22, .62); }
.analysis-panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 14px; }
.analysis-panel-head span { color: var(--paper); font: 11px var(--display); }
.analysis-panel-head small { color: var(--muted); font: 8px var(--mono); }
.bar-chart { display: grid; gap: 10px; }
.bar-row { display: grid; grid-template-columns: 82px minmax(40px, 1fr) 36px; align-items: center; gap: 8px; min-height: 16px; }
.bar-row > span { overflow: hidden; color: var(--muted); font: 8px var(--mono); text-overflow: ellipsis; white-space: nowrap; }
.bar-row > strong { color: var(--paper); font: 9px var(--mono); text-align: right; }
.bar-track { height: 7px; background: #1c2a34; }
.bar-track i { display: block; height: 100%; min-width: 3px; background: var(--green); }
.bar-track i.priority { background: var(--green); }
.bar-track i.caution { background: var(--orange); }
.bar-track i.wait { background: var(--blue); }
.bar-track i.review { background: #b8a6ff; }
.bar-track i.avoid { background: var(--red); }
.bar-track i.near { background: var(--orange); }
.bar-track i.ma { background: var(--green); }
.deduction-note { display: flex; gap: 10px; align-items: flex-start; margin-top: 13px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--muted); }
.deduction-note p { font-size: 9px; line-height: 1.6; }
.table-controls { display: flex; align-items: flex-end; gap: 12px; margin: 24px 0 12px; padding: 15px 17px; border: 1px solid var(--line); background: rgba(10, 16, 23, .72); }
.table-controls label { display: grid; gap: 6px; min-width: 130px; color: var(--muted); font: 8px var(--mono); }
.table-controls .table-search { flex: 1; }
.table-controls input, .table-controls select { height: 34px; border: 1px solid var(--line-bright); border-radius: 0; outline: 0; padding: 0 10px; background: #0b121a; color: var(--paper); font: 11px var(--mono); }
.table-controls input:focus, .table-controls select:focus { border-color: var(--green); box-shadow: 0 0 0 2px rgba(152,229,155,.08); }
.table-count { margin-left: auto; padding: 0 4px 8px 12px; white-space: nowrap; color: var(--muted); font: 9px var(--mono); }
.table-count strong { color: var(--green); font-size: 16px; margin-right: 5px; }
.export-group { display: flex; align-items: center; gap: 6px; padding-bottom: 5px; white-space: nowrap; }
.export-group span { max-width: 118px; overflow: hidden; color: var(--muted); font: 8px var(--mono); text-overflow: ellipsis; }
.export-action { display: inline-grid; place-items: center; min-width: 42px; height: 30px; border: 1px solid var(--line-bright); border-radius: 0; background: #0b121a; color: var(--muted); font: 9px var(--mono); cursor: pointer; }
.export-action:hover, .export-action:focus-visible { border-color: var(--green); color: var(--paper); outline: 0; box-shadow: 0 0 0 2px rgba(152,229,155,.08); }
.export-action.primary { border-color: rgba(152,229,155,.5); color: var(--green); background: rgba(152,229,155,.06); }
.table-controls .archive-view-toggle { flex: 0 0 auto; margin-bottom: 5px; }
.table-card { border: 1px solid var(--line); background: rgba(15, 23, 32, .9); overflow: hidden; }
.table-scroll { overflow: auto; max-height: calc(100vh - 360px); min-height: 430px; }
.table-scroll table { width: max-content; min-width: 100%; border-collapse: separate; border-spacing: 0; color: #d5dee1; font: 10px var(--mono); }
.table-scroll th, .table-scroll td { padding: 11px 12px; border-bottom: 1px solid rgba(179,197,210,.1); border-right: 1px solid rgba(179,197,210,.06); text-align: right; white-space: nowrap; }
.table-scroll th { position: sticky; top: 0; z-index: 3; background: #182431; color: var(--muted); font-size: 8px; font-weight: 400; line-height: 1.35; letter-spacing: .02em; }
.table-scroll th small { color: #71808d; font-size: 7px; font-weight: 400; }
.table-scroll td:first-child, .table-scroll th:first-child { color: #61717e; text-align: center; width: 38px; }
.table-scroll th.sticky-name, .table-scroll td.sticky-name { position: sticky; left: 0; z-index: 2; text-align: left; }
.table-scroll th.sticky-name { z-index: 4; }
.table-scroll td.sticky-name { background: #111b25; }
.table-scroll tbody tr:hover td { background: rgba(152,229,155,.055); }
.table-scroll tbody tr:hover td.sticky-name { background: #172a2c; }
.table-scroll td.name-cell { text-align: left; min-width: 214px; font-family: var(--display); }
.manage-cell { min-width: 68px; text-align: center !important; }
.table-archive-action { min-width: 46px; height: 28px; border: 1px solid rgba(139,154,168,.35); border-radius: 0; background: #0b121a; color: #91a0ad; font: 9px var(--mono); cursor: pointer; }
.table-archive-action:hover, .table-archive-action:focus-visible { border-color: var(--yellow); color: var(--yellow); outline: 0; }
.table-archive-action.restore { border-color: rgba(152,229,155,.4); color: var(--green); background: rgba(152,229,155,.05); }
.table-archive-action.restore:hover, .table-archive-action.restore:focus-visible { border-color: var(--green); color: var(--paper); }
.name-line { display: flex; align-items: center; gap: 7px; min-width: 0; }
.name-cell strong { display: block; color: var(--paper); font-size: 12px; font-weight: 500; }
.name-cell small { display: block; margin-top: 4px; color: var(--muted); font: 8px var(--mono); }
.sector-stack { display: grid; gap: 5px; margin-top: 8px; max-width: 220px; }
.sector-line { display: flex; align-items: center; gap: 6px; min-width: 0; }
.sector-line strong { min-width: 0; overflow: hidden; color: #c5d0d8; font: 9px var(--mono); text-overflow: ellipsis; white-space: nowrap; }
.concept-line { display: flex; gap: 4px; overflow: hidden; }
.concept-line span { flex: 0 0 auto; max-width: 70px; overflow: hidden; border: 1px solid rgba(139,154,168,.2); padding: 2px 5px; color: #7e8c98; font: 8px var(--mono); text-overflow: ellipsis; white-space: nowrap; }
.pct-up { color: var(--red); }
.pct-down { color: var(--green); }
.ma-pass { color: var(--green); }
.ma-warn { color: var(--yellow); }
.near-high { color: var(--orange); }
.pivot-pending, .contraction-pending { color: var(--yellow); }
.pivot-ready { min-width: 136px; color: var(--orange); text-align: left !important; }
.pivot-ready strong, .pivot-pending strong { display: block; color: var(--paper); font: 12px var(--mono); }
.pivot-ready small, .pivot-pending small { display: block; margin-top: 5px; color: var(--muted); font: 8px/1.35 var(--mono); }
.valuation-cell { min-width: 82px; text-align: right !important; }
.valuation-cell strong { display: block; color: var(--paper); font: 11px var(--mono); }
.valuation-cell small { display: block; margin-top: 4px; color: var(--muted); font: 8px var(--mono); }
.derived-cell { min-width: 205px; text-align: left !important; white-space: normal !important; }
.derived-cell strong, .stage-cell strong { display: block; font: 10px var(--mono); }
.derived-cell strong { color: var(--green); }
.derived-cell small, .stage-cell small { display: block; margin-top: 5px; color: var(--muted); font: 8px/1.4 var(--mono); }
.stage-cell { min-width: 125px; text-align: left !important; white-space: normal !important; }
.stage-cell.stage-pass strong { color: var(--green); }
.stage-cell.stage-pending strong { color: var(--yellow); }
.stage-cell.stage-transition strong { color: var(--blue); }
.stage-cell.stage-extended strong { color: var(--orange); }
.stage-cell.stage-weak strong, .stage-cell.stage-review strong { color: #c8b9ff; }
.trend-pending strong, .trend-pending small { display: block; font: 9px/1.45 var(--mono); }
.trend-pending strong { color: var(--green); }
.trend-pending small { margin-top: 4px; color: var(--muted); }
.advice-cell { min-width: 225px; max-width: 275px; text-align: left !important; white-space: normal !important; vertical-align: top; }
.advice-cell strong { display: block; font-family: var(--display); font-size: 11px; font-weight: 500; }
.advice-cell small { display: block; margin-top: 5px; color: var(--muted); font: 8px/1.45 var(--mono); }
.advice-cell.execute strong, .advice-cell.priority strong { color: var(--green); }
.advice-cell.caution strong { color: var(--orange); }
.advice-cell.wait strong { color: var(--blue); }
.advice-cell.review strong { color: #c8b9ff; }
.advice-cell.avoid strong { color: var(--red); }
.star-cell { min-width: 150px; max-width: 190px; text-align: left !important; white-space: normal !important; vertical-align: top; }
.star-cell strong { display: block; color: var(--muted); font: 13px var(--mono); letter-spacing: .06em; }
.star-cell small { display: block; margin-top: 5px; color: var(--muted); font: 8px/1.45 var(--mono); }
.star-cell.star-5 strong { color: var(--green); }
.star-cell.star-4 strong { color: var(--yellow); }
.star-cell.star-3 strong { color: var(--blue); }
.star-cell.star-1 strong { color: #8d98a3; }
.table-footnote { display: flex; gap: 10px; align-items: flex-start; padding: 14px 17px; border-top: 1px solid var(--line); color: var(--muted); }
.table-footnote p { font-size: 10px; line-height: 1.6; }
.footnote-mark { display: inline-grid; place-items: center; width: 16px; height: 16px; flex: 0 0 auto; border: 1px solid var(--yellow); color: var(--yellow); font: 10px var(--mono); }
@media (max-width: 900px) {
  .table-summary { grid-template-columns: repeat(3, 1fr); }
  .table-controls { flex-wrap: wrap; }
  .table-controls .table-search { flex: 1 1 100%; }
  .table-count { margin-left: 0; }
  .export-group { margin-left: auto; }
  .deduction-flow { flex-wrap: wrap; }
  .deduction-flow > div { flex: 1 1 28%; }
  .deduction-flow i { display: none; }
  .analysis-charts { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .table-intro { display: block; padding: 21px 17px; }
  .table-source { margin-top: 18px; padding: 10px 0 0; border-left: 0; border-top: 1px solid var(--line-bright); }
  .table-summary { grid-template-columns: repeat(2, 1fr); }
  .table-summary article:last-child { grid-column: 1 / -1; }
  .table-controls { align-items: stretch; display: grid; grid-template-columns: 1fr 1fr; }
  .table-controls label { min-width: 0; }
  .table-controls .table-search { grid-column: 1 / -1; }
  .table-count { grid-column: 1 / -1; padding: 5px 0 0; }
  .export-group { grid-column: 1 / -1; margin-left: 0; justify-content: flex-start; padding-bottom: 0; }
  .table-controls .archive-view-toggle { align-self: stretch; margin-bottom: 0; }
  .export-group span { max-width: none; }
  .table-scroll { max-height: none; min-height: 460px; }
  .deduction-board { padding: 19px 17px 16px; }
  .deduction-heading { display: block; }
  .deduction-stamp { margin-top: 15px; }
  .deduction-flow > div { flex-basis: 45%; }
}
