:root{
  --bg:#f5f7fa;
  --line:#d8dee7;
  --ink:#111827;
  --muted:#64748b;
  --green:#8fd14f;
  --green-soft:#dff4c8;
  --red:#ff1111;
  --red-soft:#ffd2d2;
  --yellow:#fff20a;
  --orange:#ffbf00;
  --blue:#0d6efd;
}
*{box-sizing:border-box}
body{
  margin:0;
  font-family:Arial,Helvetica,sans-serif;
  background:var(--bg);
  color:var(--ink);
}
.topbar{
  min-height:48px;padding:9px 20px;
  display:flex;justify-content:space-between;align-items:center;
  background:#eef2f6;border-bottom:1px solid var(--line);
}
.brand{font-size:17px;font-weight:800}
.brand span{color:var(--blue)}
.live-label{
  font-size:11px;font-weight:800;color:#19784b;background:#e9f8ef;
  border:1px solid #ccebd9;padding:6px 10px;border-radius:999px;
}
.live-label i{display:inline-block;width:7px;height:7px;border-radius:50%;background:#1faa65;margin-right:5px}
.connection{
  display:flex;gap:9px;align-items:center;padding:12px 20px;background:#fff;border-bottom:1px solid var(--line);
}
.connection label{font-size:10px;font-weight:800;color:#60758b;letter-spacing:.07em}
.connection input{
  height:37px;flex:1;min-width:300px;border:1px solid #cdd6e1;border-radius:5px;padding:0 11px;outline:none;
}
.connection input:focus{border-color:#7eb1fb}
button{height:37px;border-radius:5px;padding:0 15px;font-weight:700;cursor:pointer}
.blue{border:1px solid var(--blue);background:var(--blue);color:#fff}
.outline{border:1px solid #cbd5e1;background:#fff;color:#52667b}
.status{
  min-width:245px;max-width:330px;display:flex;align-items:center;gap:9px;padding:7px 10px;
  border:1px solid #d8e0e8;border-radius:6px;background:#fbfdff;
}
.status b{display:block;font-size:11px}
.status small{display:block;font-size:9.5px;color:#73859a;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.dot{width:9px;height:9px;border-radius:50%;flex:none}
.dot.on{background:#1bad63;box-shadow:0 0 0 4px rgba(27,173,99,.10)}
.dot.wait{background:#eba900;box-shadow:0 0 0 4px rgba(235,169,0,.12)}
.dot.off{background:#b3bec9}
.metrics{
  display:grid;grid-template-columns:repeat(7,1fr);gap:1px;background:#cfd7e1;border-bottom:1px solid #cfd7e1;
}
.metric{background:#fff;padding:11px 14px;min-height:72px}
.metric span{display:block;font-size:9px;font-weight:700;letter-spacing:.06em;color:#718096}
.metric b{display:block;font-size:22px;margin-top:4px}
.metric small{display:block;font-size:9px;color:#75869a;margin-top:2px}
.metric.yellow{background:#fff900}
.metric.orange{background:#ffc414}
.metric.orange b{font-size:29px}
.metric b.positive,.positive{color:#098943}
.metric b.negative,.negative{color:#ef1616}
.neutral{color:#475569}
.message{max-height:0;opacity:0;overflow:hidden;padding:0 20px;font-size:11px;transition:.18s}
.message.show{max-height:45px;opacity:1;padding:8px 20px}
.message.good{background:#eaf9f0;color:#177143;border-bottom:1px solid #d5efdf}
.message.bad{background:#fff0f1;color:#c92d3c;border-bottom:1px solid #f4d4d8}
.panels{display:grid;grid-template-columns:1fr 1fr;gap:14px;padding:14px}
.panel{background:#fff;border:1px solid #d9e0e8}
.panel-head{
  display:flex;justify-content:space-between;align-items:center;padding:12px 14px;background:#f8fafc;border-bottom:1px solid var(--line)
}
.panel-kicker{font-size:10px;font-weight:900;color:#62768a;letter-spacing:.08em}
.panel h2{margin:2px 0 0;font-size:17px}
.expiry-box{text-align:right}
.expiry-box span{display:block;font-size:9px;color:#75859a}
.expiry-box b{font-size:14px}
.summary-row{
  display:grid;grid-template-columns:repeat(4,1fr);border-bottom:1px solid var(--line)
}
.summary-row>div{padding:8px 10px;border-right:1px solid #e6eaf0}
.summary-row>div:last-child{border-right:0}
.summary-row span{display:block;font-size:8.5px;color:#75859a;text-transform:uppercase}
.summary-row b{font-size:13px}
.pcr-summary{background:#fff2ad}
.table-wrap{max-height:670px;overflow:auto}
table{width:100%;border-collapse:collapse;min-width:770px}
thead{position:sticky;top:0;z-index:2}
th{
  padding:8px 6px;border-right:1px solid #849268;border-bottom:1px solid #7e8d65;
  background:#91d24e;font-size:11px;
}
.group th{font-size:12px}
.call-group{background:#86cb49}
.put-group{background:#86cb49}
.pcr-group{background:#ffbf00}
td{
  padding:7px 5px;text-align:center;border-right:1px solid #d5dbe2;border-bottom:1px solid #dbe1e8;
  font-size:12px;font-weight:600;background:#fff;
}
td.pcr-cell{background:#ffc31c;font-size:13px}
td.strike{font-weight:800}
.atm-row td.strike{background:#fff000;font-size:14px}
.atm-row td.pcr-cell{font-size:17px;font-weight:900}
.bull-cell{background:#8fd04e!important;color:#153f10}
.bear-cell{background:#ff1515!important;color:#2c0000}
td.positive{color:#04823e;font-weight:800}
td.negative{color:#e20d17;font-weight:800}
.empty{padding:25px;color:#7c8c9f;font-weight:500}
footer{
  padding:10px 15px;background:#eef2f6;color:#64748b;font-size:10px;border-top:1px solid #d5dbe3
}
@media(max-width:1200px){
  .metrics{grid-template-columns:repeat(4,1fr)}
  .panels{grid-template-columns:1fr}
}
@media(max-width:760px){
  .connection{flex-wrap:wrap}
  .connection input{min-width:100%}
  .status{width:100%;max-width:none}
  .metrics{grid-template-columns:repeat(2,1fr)}
  .summary-row{grid-template-columns:repeat(2,1fr)}
}


.error-cell{
  color:#c72d3f!important;
  background:#fff3f4!important;
  white-space:normal;
  line-height:1.45;
}


/* V3 strike-count selector */
.strike-selector{
  min-width:150px;
  display:flex;
  flex-direction:column;
  gap:3px;
}
.strike-selector label{
  font-size:9px;
  font-weight:800;
  color:#60758b;
  letter-spacing:.06em;
}
.strike-selector select{
  height:37px;
  border:1px solid #cdd6e1;
  border-radius:5px;
  background:#fff;
  padding:0 9px;
  font-weight:700;
  color:#26384c;
}
.strike-selector small{
  font-size:9px;
  color:#718096;
  white-space:nowrap;
}
@media(max-width:760px){
  .strike-selector{width:100%}
}
