:root {
  --bg: #0f1419;
  --panel: #1a2332;
  --line: #2a3548;
  --text: #e7eef8;
  --muted: #8b9bb4;
  --accent: #3d9cf0;
  --up: #ef5350;
  --down: #26a69a;
  --warn: #f0b429;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: radial-gradient(1200px 600px at 10% -10%, #1b2a44 0%, transparent 50%),
              radial-gradient(900px 500px at 100% 0%, #1a3030 0%, transparent 45%),
              var(--bg);
  color: var(--text);
  min-height: 100vh;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: 1100px; margin: 0 auto; padding: 20px 18px 48px; }
nav {
  display: flex; gap: 16px; align-items: center; flex-wrap: wrap;
  padding: 14px 0 22px; border-bottom: 1px solid var(--line); margin-bottom: 22px;
}
nav .brand { font-weight: 700; font-size: 1.15rem; color: var(--text); margin-right: auto; }
nav a { color: var(--muted); }
nav a:hover { color: var(--text); }

h1, h2, h3 { margin: 0 0 12px; font-weight: 650; }
.muted { color: var(--muted); font-size: 0.92rem; }
.panel {
  background: color-mix(in srgb, var(--panel) 92%, black);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
}
.grid { display: grid; gap: 14px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 800px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

.stat { font-size: 1.4rem; font-weight: 700; }
.up { color: var(--up); }
.down { color: var(--down); }

table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 600; font-size: 0.85rem; }

.btn, button, input[type="submit"] {
  background: var(--accent);
  color: #041018;
  border: 0;
  border-radius: 8px;
  padding: 8px 14px;
  font-weight: 650;
  cursor: pointer;
}
.btn.secondary, button.secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
}
.btn.danger { background: #c44; color: #fff; }
form.inline { display: inline; }
form.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: end; }
label { display: flex; flex-direction: column; gap: 4px; font-size: 0.85rem; color: var(--muted); }
input, select {
  background: #0d121a;
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 8px;
  padding: 8px 10px;
  min-width: 120px;
}
.error {
  background: #3a1d1d;
  border: 1px solid #6b2f2f;
  color: #ffb4b4;
  padding: 10px 12px;
  border-radius: 8px;
  margin-bottom: 12px;
}
.disclaimer {
  margin-top: 28px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.5;
}
.report-panel { max-width: 820px; }
.report-meta { margin-bottom: 8px; }
.report-title {
  font-size: 1.45rem;
  margin: 0 0 18px;
  line-height: 1.35;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.report-body {
  line-height: 1.75;
  font-size: 0.98rem;
  color: var(--text);
}
.report-body > *:first-child { margin-top: 0; }
.report-body h1,
.report-body h2,
.report-body h3 {
  margin: 1.35em 0 0.55em;
  line-height: 1.35;
  font-weight: 650;
}
/* 页面已有标题时，正文里首个 h1/h2 收敛成章节样式，避免套娃大标题 */
.report-body h1 {
  font-size: 1.15rem;
  color: var(--text);
}
.report-body h2 {
  font-size: 1.12rem;
  color: var(--text);
}
.report-body h3 {
  font-size: 1.02rem;
  color: #c5d4e8;
}
.report-body p { margin: 0.65em 0; color: #d7e2f0; }
.report-body ul,
.report-body ol {
  margin: 0.5em 0 0.9em;
  padding-left: 1.25em;
}
.report-body li { margin: 0.35em 0; }
.report-body strong { color: #fff; font-weight: 680; }
.report-body hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 1.2em 0;
}
.report-body blockquote {
  margin: 0.9em 0;
  padding: 10px 14px;
  border-left: 3px solid var(--accent);
  background: rgba(61, 156, 240, 0.08);
  color: var(--muted);
}
.spark {
  display: flex; align-items: flex-end; gap: 2px; height: 36px;
}
.spark i {
  display: block; width: 3px; background: #4a7ab3; border-radius: 1px;
}

.nav-chart-wrap {
  position: relative;
  margin: 4px 0 8px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(20, 36, 56, 0.85), rgba(12, 18, 28, 0.9));
  padding: 10px 8px 8px;
  overflow: hidden;
}
.nav-hit {
  fill: transparent;
  cursor: crosshair;
}
.nav-cross {
  stroke: rgba(240, 180, 41, 0.55);
  stroke-width: 1;
  stroke-dasharray: 3 3;
  pointer-events: none;
}
.nav-cursor {
  fill: #f0b429;
  stroke: #0f1419;
  stroke-width: 1.5;
  pointer-events: none;
}
.nav-tip {
  position: absolute;
  z-index: 2;
  min-width: 148px;
  pointer-events: none;
  background: rgba(10, 16, 26, 0.94);
  border: 1px solid #3a567a;
  border-radius: 10px;
  padding: 10px 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  color: var(--text);
  font-size: 0.88rem;
  line-height: 1.45;
}
.nav-tip-date {
  color: var(--muted);
  font-size: 0.8rem;
  margin-bottom: 4px;
}
.nav-tip-row { margin-top: 2px; }
.nav-tip strong { font-weight: 700; }
.nav-chart {
  width: 100%;
  height: auto;
  display: block;
  /* 保持 viewBox 比例，避免 max-height 压扁导致 hover 坐标错位 */
  aspect-ratio: 720 / 260;
  max-height: none;
  overflow: visible;
  touch-action: none;
  cursor: crosshair;
}
.nav-grid {
  stroke: rgba(139, 155, 180, 0.18);
  stroke-width: 1;
}
.nav-area {
  fill: rgba(61, 156, 240, 0.16);
}
.nav-line {
  fill: none;
  stroke: #3d9cf0;
  stroke-width: 2.2;
  stroke-linejoin: round;
  stroke-linecap: round;
}
.nav-dot { stroke: #0f1419; stroke-width: 1.5; }
.nav-dot.hi { fill: #ef5350; }
.nav-dot.lo { fill: #26a69a; }
.nav-dot.last { fill: #f0b429; }
.nav-axis {
  fill: var(--muted);
  font-size: 11px;
}
.nav-tag {
  fill: #ef9a9a;
  font-size: 11px;
  font-weight: 650;
}
.nav-tag.lo { fill: #80cbc4; }
.nav-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: 6px;
  padding: 0 6px 2px;
  color: var(--muted);
  font-size: 0.84rem;
}
.nav-table-title {
  margin: 16px 0 8px;
  font-size: 1rem;
  font-weight: 650;
  color: #c5d4e8;
}

tr.prac-buy td { background: rgba(239, 83, 80, 0.06); }
tr.prac-sell td { background: rgba(38, 166, 154, 0.08); }
tr.prac-hold_pos td { background: rgba(240, 180, 41, 0.05); }


.stat-card {
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(0,0,0,0.16);
}
.table-scroll { overflow-x: auto; }
.data-table { min-width: 960px; }
.data-table th { white-space: nowrap; }
button.linkish {
  background: none; border: 0; color: var(--accent);
  padding: 0; font-weight: 600; cursor: pointer;
}
button.linkish:hover { text-decoration: underline; }
.dash-hero h1 { font-weight: 700; }

.mind {
  border-radius: 14px;
  padding: 18px 18px 16px;
  margin-bottom: 16px;
  border: 1px solid var(--line);
}
.mind-hold {
  background: linear-gradient(135deg, #3a2410, #1f1610 55%, #241818);
  border-color: #a07622;
  box-shadow: 0 0 0 1px rgba(240, 180, 41, 0.12) inset;
}
.mind-steady {
  background: linear-gradient(135deg, #2a3018, #1a2214);
  border-color: #6a7a32;
}
.mind-calm {
  background: linear-gradient(135deg, #14332e, #102018);
  border-color: #2f6b5e;
}
.mind-kicker {
  color: var(--warn);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}
.mind-calm .mind-kicker { color: var(--down); }
.mind-title {
  margin: 0 0 10px;
  font-size: 1.4rem;
  line-height: 1.35;
  font-weight: 750;
}
.mind-body {
  margin: 0;
  color: #e4ebf5;
  line-height: 1.65;
  font-size: 0.98rem;
}
.mind-triggers {
  margin: 12px 0 0;
  padding-left: 1.15em;
  color: #c9d4e4;
  line-height: 1.55;
  font-size: 0.92rem;
}
.mind-mantra {
  margin: 14px 0 0;
  padding-top: 12px;
  border-top: 1px dashed rgba(255,255,255,0.12);
  color: var(--warn);
  font-weight: 700;
  font-size: 1.02rem;
  letter-spacing: 0.02em;
}
.mind-calm .mind-mantra { color: #7fd4c4; }

.remind {
  display: flex; gap: 18px; justify-content: space-between; align-items: stretch;
  flex-wrap: wrap;
  border-radius: 14px; padding: 18px 18px 16px; margin-bottom: 16px;
  border: 1px solid var(--line);
}
.remind-todo { background: linear-gradient(135deg, #1a2a40, #152033); border-color: #3a567a; }
.remind-warn { background: linear-gradient(135deg, #3a2e14, #241c10); border-color: #8a6a22; }
.remind-urgent { background: linear-gradient(135deg, #3a1d1d, #241010); border-color: #8a3333; }
.remind-ok { background: linear-gradient(135deg, #14332e, #102420); border-color: #2f6b5e; }
.remind-rest { background: linear-gradient(135deg, #1a2332, #151c28); }
.remind-kicker { color: var(--muted); font-size: 0.85rem; margin-bottom: 6px; }
.remind-title { margin: 0 0 8px; font-size: 1.45rem; line-height: 1.3; }
.remind-detail { margin: 0; color: #d3deec; line-height: 1.55; }
.remind-tip { margin: 10px 0 0; color: var(--warn); font-size: 0.9rem; }
.remind-meta {
  display: flex; flex-wrap: wrap; gap: 10px 14px;
  margin-top: 14px; color: var(--muted); font-size: 0.86rem;
}
.remind-actions {
  display: flex; flex-direction: column; gap: 8px; justify-content: center; min-width: 200px;
}
.btn-lg, a.btn-lg, button.btn-lg {
  display: inline-block; text-align: center;
  padding: 11px 16px; border-radius: 10px; font-weight: 700;
  text-decoration: none;
}
a.btn {
  background: var(--accent); color: #041018; border-radius: 8px; padding: 8px 14px; font-weight: 650;
}
a.btn.secondary {
  background: transparent; color: var(--text); border: 1px solid var(--line);
}

.panel-head {
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px; flex-wrap: wrap; margin-bottom: 12px;
}
.todo-list { display: flex; flex-direction: column; gap: 8px; }
.todo-row {
  display: flex; gap: 12px; align-items: center;
  padding: 12px; border-radius: 10px; border: 1px solid var(--line);
  background: rgba(0,0,0,0.18);
}
.todo-row.is-pending { border-color: #6b3a3a; background: rgba(120, 40, 40, 0.12); }
.todo-row.is-done { border-color: #2f6b5e; background: rgba(30, 90, 75, 0.12); opacity: 0.92; }
.todo-check {
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; flex-shrink: 0;
  background: #243044; color: var(--muted);
}
.is-pending .todo-check { background: #6b2f2f; color: #ffc9c9; }
.is-done .todo-check { background: #1f6b5a; color: #d5fff4; }
.todo-body { flex: 1; min-width: 0; }
.todo-name { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; font-weight: 650; }
.todo-sub { margin-top: 4px; font-size: 0.9rem; color: var(--muted); }
.todo-action { flex-shrink: 0; }
.chip {
  font-size: 0.75rem; font-weight: 650; padding: 2px 8px; border-radius: 999px;
  background: #3a3420; color: var(--warn);
}
.tag {
  font-size: 0.8rem; font-weight: 650; padding: 3px 8px; border-radius: 6px;
}
.tag.ok { background: rgba(38, 166, 154, 0.2); color: var(--down); }
.tag.pending { background: rgba(239, 83, 80, 0.18); color: #ffb4b0; }
.log-list { padding-left: 1.1em; line-height: 1.7; }

@media (max-width: 800px) {
  .remind { flex-direction: column; }
  .remind-actions { width: 100%; }
  .todo-row { flex-wrap: wrap; }
  .todo-action { width: 100%; }
  .todo-action form, .todo-action button { width: 100%; }
}

