.tpa-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:20px;
  margin-bottom:18px;
}

.tpa-head h1{
  margin:5px 0;
}

.tpa-head p{
  margin:0;
  max-width:760px;
  color:#718197;
}

.tpa-readonly{
  white-space:nowrap;
  padding:6px 9px;
  border:1px solid #d6e5e1;
  border-radius:6px;
  background:#f1f8f6;
  color:#33786b;
  font-size:8px;
  font-weight:800;
  letter-spacing:.06em;
}


.tpa-controls{
  display:grid;
  grid-template-columns:minmax(240px,1fr) 170px 170px auto;
  gap:14px;
  align-items:end;
  padding:15px;
  background:#fff;
  border:1px solid #dce4ec;
  border-radius:11px;
}

.tpa-controls .field{
  margin:0;
}


.tpa-strategy-summary{
  display:grid;
  grid-template-columns:repeat(5,1fr);
  gap:1px;
  margin-top:12px;
  overflow:hidden;
  border:1px solid #e0e6ed;
  border-radius:9px;
  background:#e0e6ed;
}

.tpa-strategy-summary>div{
  padding:10px 12px;
  background:#f8fafc;
}

.tpa-strategy-summary span{
  display:block;
  color:#8391a2;
  font-size:8px;
  font-weight:700;
  text-transform:uppercase;
}

.tpa-strategy-summary b{
  display:block;
  margin-top:3px;
  color:#3c5269;
  font-size:10px;
}


.tpa-status{
  margin:12px 0;
  padding:9px 11px;
  border:1px solid #e2e8ee;
  border-radius:7px;
  background:#f7f9fb;
  color:#748397;
  font-size:10px;
}


.tpa-summary-grid{
  display:grid;
  grid-template-columns:repeat(6,1fr);
  gap:9px;
}

.tpa-summary-card{
  min-height:88px;
  padding:13px;
  border:1px solid #dde4eb;
  border-radius:9px;
  background:#fff;
}

.tpa-summary-card span{
  display:block;
  color:#8492a3;
  font-size:8px;
  font-weight:800;
  letter-spacing:.05em;
}

.tpa-summary-card b{
  display:block;
  margin-top:8px;
  color:#344a61;
  font-size:18px;
}

.tpa-summary-card small{
  display:block;
  margin-top:5px;
  color:#8996a5;
  font-size:8px;
}


.tpa-pnl-strip{
  display:grid;
  grid-template-columns:repeat(5,1fr);
  gap:1px;
  margin-top:10px;
  overflow:hidden;
  border:1px solid #e0e6ed;
  border-radius:9px;
  background:#e0e6ed;
}

.tpa-pnl-strip>div{
  padding:10px 12px;
  background:#fff;
}

.tpa-pnl-strip span{
  display:block;
  color:#8391a2;
  font-size:8px;
}

.tpa-pnl-strip b{
  display:block;
  margin-top:4px;
  color:#3c5269;
  font-size:12px;
}


.tpa-panel{
  margin-top:13px;
  padding:15px;
  border:1px solid #dde4eb;
  border-radius:10px;
  background:#fff;
}

.tpa-section-head{
  display:flex;
  justify-content:space-between;
  margin-bottom:10px;
}

.tpa-section-head h3{
  margin:3px 0;
  font-size:14px;
}

.tpa-section-head p{
  margin:0;
  color:#8290a1;
  font-size:9px;
}


.tpa-svg{
  display:block;
  width:100%;
  height:180px;
  overflow:visible;
}

.tpa-zero{
  stroke:#d9e0e7;
  stroke-width:1;
  vector-effect:non-scaling-stroke;
}

.tpa-line{
  fill:none;
  stroke:#516e89;
  stroke-width:2;
  vector-effect:non-scaling-stroke;
}

.tpa-chart-axis{
  display:grid;
  grid-template-columns:1fr auto 1fr;
  align-items:center;
  margin-top:4px;
  color:#8290a0;
  font-size:8px;
}

.tpa-chart-axis b{
  color:#40566e;
  font-size:10px;
  text-align:center;
}

.tpa-chart-axis span:last-child{
  text-align:right;
}


.tpa-table{
  width:100%;
  border-collapse:collapse;
}

.tpa-table th,
.tpa-table td{
  padding:9px 10px;
  border-bottom:1px solid #edf1f4;
  text-align:right;
  font-size:9px;
}

.tpa-table th{
  color:#8190a2;
  font-size:8px;
  letter-spacing:.04em;
}

.tpa-table th:first-child,
.tpa-table td:first-child{
  text-align:left;
}

.tpa-table td:first-child b{
  display:block;
  color:#344a61;
}

.tpa-table td:first-child small{
  display:block;
  margin-top:2px;
  color:#8a97a6;
}

.tpa-table .positive,
.tpa-pnl-strip .positive{
  color:#267c6b;
}

.tpa-table .negative,
.tpa-pnl-strip .negative{
  color:#b14e57;
}


.tpa-footnote{
  margin-top:12px;
  padding:10px 12px;
  border-left:3px solid #7999b7;
  background:#f6f9fb;
  color:#748396;
  font-size:9px;
  line-height:1.55;
}


@media(max-width:1200px){

  .tpa-summary-grid{
    grid-template-columns:repeat(3,1fr);
  }

  .tpa-strategy-summary{
    grid-template-columns:repeat(3,1fr);
  }
}


@media(max-width:800px){

  .tpa-head{
    flex-direction:column;
  }

  .tpa-controls{
    grid-template-columns:1fr;
  }

  .tpa-summary-grid,
  .tpa-pnl-strip,
  .tpa-strategy-summary{
    grid-template-columns:1fr 1fr;
  }
}


/* ============================================================
   V2 - INTERACTIVE CHART HOVER
   ============================================================ */

.tpa-chart-canvas{
  position:relative;
  width:100%;
  height:180px;
  cursor:crosshair;
}

.tpa-chart-canvas .tpa-svg{
  position:absolute;
  inset:0;
}

.tpa-hover-crosshair{
  display:none;
  position:absolute;
  top:5px;
  bottom:4px;
  width:1px;
  background:#8295a8;
  pointer-events:none;
  z-index:3;
}

.tpa-hover-tooltip{
  display:none;
  position:absolute;
  top:12px;
  transform:translateX(10px);
  z-index:5;
  min-width:150px;
  padding:9px 11px;
  border:1px solid #d7e0e8;
  border-radius:7px;
  background:rgba(255,255,255,.97);
  box-shadow:0 6px 20px rgba(36,54,72,.12);
  pointer-events:none;
}

.tpa-hover-tooltip.tpa-tooltip-left{
  transform:translateX(calc(-100% - 10px));
}

.tpa-hover-tooltip span{
  display:block;
  color:#7d8b9c;
  font-size:8px;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.04em;
}

.tpa-hover-tooltip b{
  display:block;
  margin-top:4px;
  color:#314960;
  font-size:14px;
}

.tpa-hover-tooltip small{
  display:block;
  margin-top:4px;
  color:#738297;
  font-size:8px;
  line-height:1.45;
}

/* Trading Portfolio Analysis - use standard Prepzo section loader */

.tpa-status-loading{
  padding:0;
  background:transparent;
  border:0;
}

.tpa-status-loading .section-loader{
  min-height:74px;
  border:1px solid #e2e8ee;
  border-radius:8px;
  background:#fff;
}
