:root {
  --navy: #0a3555;
  --navy-2: #123f62;
  --ink: #15324a;
  --muted: #667d90;
  --line: #d8e6ef;
  --soft-blue: #f3f8fb;
  --green: #12945b;
  --green-soft: #eaf8f0;
  --red: #e64b50;
  --red-soft: #fff0f0;
  --purple: #8258d6;
  --shadow: 0 14px 40px rgba(17, 59, 86, .09);
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: #f6f9fb; font-family: Inter, "PingFang SC", "Noto Sans CJK SC", Arial, sans-serif; }
button, input { font: inherit; }
button { cursor: pointer; }
.app-shell { max-width: 1540px; margin: 0 auto; padding: 28px 32px 24px; }
.topbar { color: white; background: linear-gradient(112deg, var(--navy), #184f73); border-radius: 22px; padding: 28px 32px; display: flex; align-items: center; justify-content: space-between; gap: 28px; box-shadow: var(--shadow); }
.topbar h1 { margin: 6px 0 8px; font-size: clamp(27px, 3vw, 44px); letter-spacing: -.04em; }
.subtitle { margin: 0; color: #d8e7f1; font-size: 14px; }
.eyebrow { margin: 0; font-size: 11px; letter-spacing: .18em; font-weight: 800; opacity: .74; }
.top-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }
.schedule-pill { padding: 10px 13px; border: 1px solid rgba(255,255,255,.22); border-radius: 999px; color: #dff0fb; font-size: 12px; white-space: nowrap; }
.button { border: 0; border-radius: 10px; padding: 10px 16px; font-weight: 750; transition: transform .15s ease, box-shadow .15s ease; }
.button:disabled { cursor: not-allowed; opacity: .65; transform: none; }
.button:hover { transform: translateY(-1px); }
.button.primary { color: var(--navy); background: #fff; box-shadow: 0 7px 20px rgba(0,0,0,.12); }
.button.secondary { color: white; background: var(--navy-2); }
.button.ghost { color: var(--navy-2); background: #eef5f8; border: 1px solid var(--line); }
.tabbar { display: flex; gap: 8px; margin: 22px 0 4px; padding: 6px; background: white; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); overflow-x: auto; }
.tab-button { flex: 0 0 auto; border: 0; border-radius: 10px; padding: 11px 16px; color: var(--muted); background: transparent; font-weight: 800; font-size: 13px; }
.tab-button:hover { background: var(--soft-blue); color: var(--ink); }
.tab-button.active { color: white; background: var(--navy); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }
.control-panel, .report-card { margin-top: 22px; background: white; border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); }
.control-panel { padding: 22px; }
.panel-heading, .reports-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.panel-heading h2, .reports-heading h2 { margin: 5px 0 0; font-size: 20px; letter-spacing: -.02em; }
.run-status, .last-refresh { color: var(--muted); font-size: 12px; }
.controls-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 18px; margin-top: 18px; }
.symbols-box, .settings-box { padding: 17px; border: 1px solid var(--line); border-radius: 14px; background: #fbfdfe; }
.section-label { font-size: 13px; font-weight: 800; margin-bottom: 12px; }
.add-row { display: flex; gap: 8px; }
input { width: 100%; border: 1px solid #cfe0ea; border-radius: 9px; padding: 10px 12px; color: var(--ink); background: white; outline: none; }
input:focus { border-color: #5598bf; box-shadow: 0 0 0 3px rgba(85,152,191,.12); }
.symbol-list { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.symbol-chip { display: inline-flex; align-items: center; gap: 8px; padding: 7px 8px 7px 10px; border: 1px solid var(--line); background: white; border-radius: 999px; font-size: 12px; }
.symbol-chip.off { opacity: .46; }
.chip-toggle { width: 28px; height: 16px; appearance: none; border-radius: 999px; background: #c8d6df; position: relative; margin: 0; cursor: pointer; }
.chip-toggle:checked { background: var(--green); }
.chip-toggle::after { content: ''; position: absolute; width: 12px; height: 12px; left: 2px; top: 2px; border-radius: 50%; background: white; transition: left .15s; }
.chip-toggle:checked::after { left: 14px; }
.chip-delete { border: 0; background: none; color: #9aaebc; font-size: 16px; line-height: 1; padding: 0 2px; }
.settings-box label { display: grid; grid-template-columns: 76px 1fr; align-items: center; gap: 9px; margin: 8px 0; color: var(--muted); font-size: 12px; }
.settings-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; }
#key-state { color: var(--green); font-size: 12px; }
.compact-panel { padding: 22px; }
.helper-text { color: var(--muted); font-size: 12px; line-height: 1.65; }
.symbols-textarea { width: 100%; min-height: 150px; resize: vertical; border: 1px solid #cfe0ea; border-radius: 10px; padding: 12px; color: var(--ink); font: inherit; line-height: 1.65; outline: none; margin: 8px 0 12px; }
.symbols-textarea:focus { border-color: #5598bf; box-shadow: 0 0 0 3px rgba(85,152,191,.12); }
.history-filters { display: grid; grid-template-columns: 1fr 1fr auto auto; align-items: end; gap: 10px; margin-top: 17px; }
.history-filters label { display: grid; gap: 6px; color: var(--muted); font-size: 12px; }
.history-filters .button { height: 40px; }
.reports-heading { margin: 34px 3px 13px; }
.report-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(530px, 1fr)); gap: 18px; }
.empty-state { padding: 56px 20px; border: 1px dashed #bcd0dc; border-radius: 16px; text-align: center; color: var(--muted); grid-column: 1 / -1; }
.report-card { overflow: hidden; }
.report-header { padding: 18px 20px 15px; display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; border-bottom: 1px solid var(--line); }
.report-symbol { font-size: 24px; font-weight: 900; letter-spacing: -.04em; }
.report-name { color: var(--muted); font-size: 12px; margin-top: 3px; max-width: 320px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.report-date { color: var(--muted); font-size: 11px; margin-top: 7px; }
.price-block { text-align: right; }
.price { font-size: 27px; font-weight: 850; letter-spacing: -.03em; }
.change { font-size: 13px; font-weight: 800; margin-top: 2px; }
.up { color: var(--green); } .down { color: var(--red); }
.rating-pill { display: inline-flex; align-items: center; gap: 6px; margin-top: 9px; border-radius: 999px; padding: 5px 9px; font-size: 11px; font-weight: 800; background: var(--green-soft); color: var(--green); }
.rating-pill.neutral { background: #f0f4f6; color: #6d7d86; } .rating-pill.weak { background: var(--red-soft); color: var(--red); }
.report-body { padding: 16px 20px 19px; }
.summary { min-height: 63px; background: #effaf4; border: 1px solid #d2eadd; border-radius: 11px; padding: 11px 13px; color: #245842; font-size: 13px; line-height: 1.66; }
.chart-wrap { margin: 14px 0 12px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: #fcfeff; }
canvas { width: 100%; height: 240px; display: block; }
.metric-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.metric { background: var(--soft-blue); border-radius: 9px; padding: 9px 10px; min-height: 51px; }
.metric .label { color: var(--muted); font-size: 10px; }
.metric .value { margin-top: 3px; font-size: 13px; font-weight: 800; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.detail-card { border: 1px solid var(--line); border-radius: 11px; padding: 11px 12px; }
.detail-title { font-size: 12px; font-weight: 850; margin-bottom: 7px; }
.detail-card p { margin: 4px 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.detail-card p strong { color: var(--ink); font-weight: 800; }
.level { display: flex; justify-content: space-between; gap: 8px; font-size: 11px; margin: 5px 0; }
.level .kind { font-weight: 800; } .resistance { color: var(--red); } .support { color: var(--green); }
.ops { margin-top: 12px; padding: 11px 12px; border-radius: 11px; background: #fff8e8; border: 1px solid #f2e3b8; }
.ops-row { display: grid; grid-template-columns: 72px 1fr; gap: 7px; font-size: 11px; line-height: 1.5; margin: 4px 0; }
.ops-row b { color: var(--ink); } .ops-row span { color: #6e6245; }
.validation { text-align: right; margin-top: 9px; color: #76909e; font-size: 10px; }
footer { color: #7b909e; font-size: 11px; text-align: center; padding: 26px 0 4px; }
@media (max-width: 900px) { .app-shell { padding: 16px; } .topbar { align-items: flex-start; flex-direction: column; } .top-actions { justify-content: flex-start; } .controls-grid { grid-template-columns: 1fr; } .report-grid { grid-template-columns: 1fr; } .history-filters { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .report-grid { display: block; } .report-card { margin-bottom: 16px; } .detail-grid { grid-template-columns: 1fr; } .metric-grid { grid-template-columns: repeat(2, 1fr); } .report-header { padding: 15px; } .report-body { padding: 13px 15px 16px; } }
