:root { color-scheme: light; font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
body { margin: 0; background: #f5f4f1; color: #1f2528; }
header { padding: 24px 28px 12px; display: flex; justify-content: space-between; gap: 16px; align-items: flex-end; }
h1, h2 { margin: 0; }
h1 { font-size: 24px; }
h2 { font-size: 16px; }
main { padding: 0 28px 28px; }
a { color: #245b63; text-decoration: none; font-weight: 760; }
button, select { border: 1px solid #b7aca1; border-radius: 6px; background: #fff; padding: 7px 10px; min-height: 34px; }
button { cursor: pointer; }
.muted { color: #667174; font-size: 13px; }
.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.toolbar label { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: #3d474a; }
.status { min-height: 18px; margin: 2px 0 10px; }
.policy-controls { display: grid; grid-template-columns: repeat(auto-fit, minmax(108px, 1fr)); gap: 8px; margin: 12px 0; padding: 10px; background: #fff; border: 1px solid #ded8cf; border-radius: 8px; }
.policy-controls label { display: grid; gap: 4px; color: #586367; font-size: 12px; font-weight: 720; }
.policy-controls input { width: 100%; box-sizing: border-box; border: 1px solid #cfc6bc; border-radius: 6px; padding: 6px 8px; font-size: 13px; }
.manual-controls { display: flex; flex-wrap: wrap; align-items: end; gap: 8px; margin: 0 0 12px; padding: 10px; background: #fbfaf8; border: 1px solid #ded8cf; border-radius: 8px; }
.manual-controls label { display: grid; gap: 4px; color: #586367; font-size: 12px; font-weight: 720; min-width: 150px; flex: 1 1 170px; }
.manual-controls input, .manual-controls select { width: 100%; box-sizing: border-box; border: 1px solid #cfc6bc; border-radius: 6px; padding: 6px 8px; font-size: 13px; min-height: 34px; background: #fff; }
.manual-controls button { flex: 0 0 auto; }
#manual-strike-status { flex: 1 1 180px; min-height: 18px; padding-bottom: 7px; }
.manual-strike-count { display: inline-flex; margin-left: 8px; color: #245b63; font-weight: 760; }
.manual-folded-strikes { display: flex; justify-content: center; padding: 8px; }
.manual-window-controls { display: flex; justify-content: center; gap: 12px; padding: 8px 10px; background: #fbfaf8; }
.manual-window-controls.above { border-bottom: 1px solid #ece7df; }
.manual-window-controls.below { border-top: 1px solid #ece7df; }
.manual-window-controls button:disabled { color: #9aa1a3; text-decoration: none; cursor: default; }
.manual-panel-collapsed #manual-strike-body { display: none; }
#manual-panel-toggle { min-width: 64px; }
.summary-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(138px, 1fr)); gap: 10px; margin: 10px 0 12px; }
.summary-card { background: #fff; border: 1px solid #ded8cf; border-radius: 8px; padding: 10px 12px; }
.summary-card strong { display: block; font-size: 24px; line-height: 1.1; margin-top: 3px; }
.monitor-grid { display: grid; grid-template-columns: 1fr; gap: 12px; align-items: start; }
.panel { background: #fff; border: 1px solid #ded8cf; border-radius: 8px; }
.panel-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; padding: 12px; background: #fbfaf8; border-bottom: 1px solid #ece7df; }
.empty { padding: 16px 12px; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 9px 10px; border-bottom: 1px solid #ece7df; text-align: left; vertical-align: top; font-size: 13px; }
th { color: #586367; background: #fbfaf8; font-size: 12px; }
tr:last-child td { border-bottom: 0; }
.entry-table thead th { position: sticky; top: 0; z-index: 5; box-shadow: 0 1px 0 #ece7df; }
.symbol-group-row td { background: #fbfaf8; color: #263033; font-size: 12px; padding: 8px 10px; }
.symbol-group-row .muted { margin-left: 8px; }
.symbol-toggle { border: 0; background: transparent; color: #245b63; padding: 0; min-height: 0; margin-left: 8px; font: inherit; font-weight: 760; text-decoration: underline; text-underline-offset: 2px; }
.entry-table th, .entry-table td { white-space: nowrap; }
.entry-table th:first-child, .entry-table td:first-child { white-space: normal; min-width: 190px; }
.entry-table tbody tr:not(.symbol-group-row) td:first-child { padding-left: 24px; }
.entry-contract-cell.near-spot-strike-cell { background: #eef7f1; box-shadow: inset 3px 0 0 #2f8a57; }
.near-spot-pill { margin-left: 6px; padding: 2px 6px; font-size: 11px; }
.sort-button { appearance: none; border: 0; background: transparent; color: inherit; padding: 0; min-height: 0; display: inline-flex; align-items: center; gap: 4px; font: inherit; font-weight: 760; }
.sort-button span { display: inline-block; width: 9px; color: #245b63; font-size: 10px; }
.sort-button.active { color: #245b63; }
.contract { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.contract strong, .contract span { overflow-wrap: anywhere; }
.metric-line { display: flex; flex-wrap: wrap; gap: 4px 10px; }
.metric-main { font-weight: 760; color: #263033; }
.metric-sub { color: #667174; font-size: 12px; margin-top: 2px; }
.pill { display: inline-flex; border-radius: 999px; padding: 3px 8px; font-size: 12px; font-weight: 760; background: #ece7df; color: #667174; white-space: nowrap; }
.pill.good { background: #dfeee4; color: #2f6b48; }
.pill.warn { background: #f3e1d5; color: #8b4f2f; }
.pill.bad { background: #f2ddd8; color: #a14032; }
.pill.neutral { background: #ece7df; color: #667174; }
.monitor-event-stack { display: grid; gap: 5px; min-width: 132px; }
.monitor-earnings-alert, .monitor-strategy-event { display: grid; gap: 2px; border-left: 3px solid #d7cec4; border-radius: 6px; background: #fbfaf8; padding: 5px 7px; line-height: 1.25; white-space: normal; }
.monitor-earnings-alert.good, .monitor-strategy-event.good { border-left-color: #4f8f68; background: #f1faf4; }
.monitor-earnings-alert.neutral, .monitor-strategy-event.neutral { border-left-color: #8c9294; background: #f5f6f4; }
.monitor-earnings-alert.warn, .monitor-strategy-event.warn { border-left-color: #b86d3f; background: #fff7f1; }
.monitor-earnings-alert.bad, .monitor-strategy-event.bad { border-left-color: #a14032; background: #fff1ee; }
.monitor-events-empty { min-width: 72px; }
.filtered-entry-rejections { padding: 10px 12px; border-bottom: 1px solid #ece7df; background: #fff8f6; }
.filtered-entry-rejections summary { cursor: pointer; display: flex; align-items: center; gap: 8px; list-style: none; }
.filtered-entry-rejections summary::-webkit-details-marker { display: none; }
.filtered-entry-rejections summary::before { content: ">"; color: #a14032; font-size: 12px; }
.filtered-entry-rejections[open] summary { margin-bottom: 6px; }
.filtered-entry-rejections[open] summary::before { content: "v"; }
.filtered-entry-item { display: flex; flex-wrap: wrap; gap: 5px 8px; align-items: baseline; border-left: 3px solid #a14032; border-radius: 6px; background: #fff1ee; padding: 6px 8px; font-size: 12px; line-height: 1.25; }
.filtered-entry-item strong { color: #1f2528; }
.filtered-entry-item span:not(.muted) { color: #a14032; font-weight: 780; }
.filtered-entry-count { margin-left: auto; border: 1px solid #e0aaa2; border-radius: 999px; padding: 1px 7px; background: #fff; white-space: nowrap; }
.filtered-entry-inspect { margin-left: auto; min-height: 26px; padding: 3px 8px; font-size: 12px; border-color: #d09b93; color: #8e362d; }
.actions { display: flex; gap: 6px; flex-wrap: wrap; }
.action-link { border: 1px solid #b7aca1; border-radius: 6px; background: #fff; padding: 7px 10px; min-height: 32px; display: inline-flex; align-items: center; justify-content: center; white-space: nowrap; }
@media (max-width: 900px) {
  header { padding: 16px 14px 10px; flex-direction: column; align-items: stretch; }
  main { padding: 0 14px 18px; }
  .monitor-grid { grid-template-columns: 1fr; }
  .toolbar select, .toolbar button, .toolbar a { flex: 1 1 calc(50% - 8px); min-width: 0; }
}
@media (max-width: 640px) {
  .summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  table, tbody, tr, td { display: block; width: 100%; }
  thead { display: none; }
  tr { border-bottom: 1px solid #ece7df; }
  td { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 8px; border-bottom: 1px solid #f0ebe4; padding: 8px 10px; }
  .entry-table th, .entry-table td { white-space: normal; }
  .entry-table th:first-child, .entry-table td:first-child { min-width: 0; }
  td:last-child { border-bottom: 0; }
  td::before { content: attr(data-label); color: #667174; font-size: 12px; font-weight: 760; }
  .symbol-group-row td { display: block; width: auto; }
  .symbol-group-row td::before { content: none; }
  .entry-table .entry-candidate-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); width: auto; padding: 7px 8px; }
  .entry-table .entry-candidate-row td { display: block; width: auto; min-width: 0; padding: 4px 3px; border-bottom: 0; }
  .entry-table .entry-candidate-row td::before { display: block; margin-bottom: 1px; font-size: 10px; line-height: 1.1; }
  .entry-table tbody tr.entry-candidate-row td:first-child { padding-left: 3px; }
  .entry-contract-cell, .entry-price-cell, .entry-event-cell, .entry-action-cell { grid-column: 1 / -1; }
  .entry-liquidity-cell, .entry-snapshot-cell { grid-column: span 2; }
  .entry-table .entry-candidate-row .metric-main { font-size: 13px; }
  .entry-table .entry-candidate-row .metric-sub, .entry-table .entry-candidate-row .muted { font-size: 11px; margin-top: 1px; }
  .entry-contract-cell .contract { gap: 1px; }
  .actions .action-link { flex: 1 1 110px; }
}
