* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Sans SC', sans-serif; background: #0a0a0f; color: #e0e0e0; overflow: hidden; }

/* Header */
.header { display: flex; align-items: center; gap: 16px; padding: 8px 20px; background: #12121a; border-bottom: 1px solid #2a2a3a; height: 44px; }
.logo { font-size: 18px; font-weight: 700; color: #4a9eff; white-space: nowrap; }
.logo .sub { color: #888; font-weight: 400; }
.ticker-search { display: flex; gap: 6px; align-items: center; }
.ticker-search input { background: #1a1a2e; border: 1px solid #3a3a5a; color: #fff; padding: 5px 10px; border-radius: 4px; font-size: 14px; width: 130px; text-transform: uppercase; }
.ticker-search select { background: #1a1a2e; border: 1px solid #3a3a5a; color: #fff; padding: 5px 6px; border-radius: 4px; font-size: 12px; }
.ticker-search button, #analyze-btn { background: #4a9eff; color: #fff; border: none; padding: 5px 16px; border-radius: 4px; cursor: pointer; font-size: 13px; font-weight: 600; }
.ticker-search button:hover, #analyze-btn:hover { background: #3a8eef; }
.nav-tabs { display: flex; gap: 4px; margin-left: auto; }
.nav-tabs button { background: none; border: 1px solid #3a3a5a; color: #888; padding: 4px 12px; border-radius: 4px; cursor: pointer; font-size: 12px; }
.nav-tabs button.active { background: #4a9eff22; border-color: #4a9eff; color: #4a9eff; }
.toolbar-right { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #666; }
.toolbar-right select { background: #1a1a2e; border: 1px solid #3a3a5a; color: #ccc; padding: 3px 6px; border-radius: 3px; font-size: 11px; }

/* Main Layout */
.main { display: grid; grid-template-columns: 1fr 360px; height: calc(100vh - 44px - 24px); }

/* Chart Area */
.chart-area { display: flex; flex-direction: column; border-right: 1px solid #2a2a3a; overflow: hidden; }
#vertical-view { display: flex; flex-direction: column; flex: 1; }
#price-chart { background: #ffffff; flex: 1; position: relative; }
#pf-view { flex: 1; }
#pf-container { background: #0d0d14; width: 100%; height: 100%; }

/* Right Panel */
.right-panel { overflow-y: auto; background: #0f0f18; }
.panel-section { border-bottom: 1px solid #1a1a2a; padding: 12px; }
.panel-title { font-size: 11px; font-weight: 600; color: #4a9eff; margin-bottom: 8px; text-transform: uppercase; letter-spacing: 1px; }

/* Zone Info */
.zone-info { display: grid; grid-template-columns: auto 1fr; gap: 3px 12px; font-size: 12px; }
.zone-key { color: #555; }
.zone-val { color: #ccc; font-family: monospace; }
.zone-val.forming { color: #f39c12; }
.zone-val.completed { color: #2ecc71; }
/* Phase 5d cause→effect target badge */
.zone-val.target-hit { color: #888; }                  /* objective met */
.zone-val.target-pending { color: #ffd166; font-weight: 600; }  /* still in play */
.zone-val.target-expired { color: #e05c5c; }           /* window closed, never reached */

/* Events */
.event-list { list-style: none; }
.event-list li { display: flex; justify-content: space-between; padding: 3px 0; font-size: 12px; border-bottom: 1px solid #1a1a2a; }
.event-type { font-weight: 600; width: 55px; }
.event-type.bc { color: #9b59b6; }
.event-type.ar { color: #e67e22; }
.event-type.st { color: #2ecc71; }
.event-type.spring { color: #00bcd4; }
.event-type.sos { color: #8bc34a; }
.event-type.sow { color: #e91e63; }
.event-type.ut, .event-type.utad { color: #c0392b; }
.event-type.lpsy { color: #e67e22; }
.event-type.ps, .event-type.psy { color: #3498db; }
.event-type.lps { color: #ffd700; }
.event-type.sc { color: #e74c3c; }
.event-date { color: #555; font-size: 11px; }
.event-price { color: #ccc; font-family: monospace; }

/* 9 Tests */
.test-score { font-size: 20px; font-weight: 700; color: #fff; margin-bottom: 8px; }
.test-score span { color: #4a9eff; }
.test-grid { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; font-size: 11px; }
.test-name { color: #666; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.test-pass { color: #2ecc71; font-weight: 600; }
.test-fail { color: #e74c3c; font-weight: 600; }

/* P&F Targets */
.target-list { list-style: none; }
.target-list li { display: flex; justify-content: space-between; padding: 3px 0; font-size: 12px; }
.target-bull { color: #4a9eff; font-weight: 600; }
.target-bear { color: #e74c3c; font-weight: 600; }
.target-method { color: #555; font-size: 10px; }

/* Status Bar */
.status-bar { padding: 4px 20px; background: #12121a; border-top: 1px solid #2a2a3a; font-size: 11px; color: #555; height: 24px; }
