@import url('https://fonts.googleapis.cn/css2?family=Inter:wght@400;500;600;700&family=Noto+Sans+SC:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* ---------- Design Tokens ---------- */
:root {
  --sidebar-bg: #0F1729;
  --sidebar-surface: #172033;
  --sidebar-surface-hover: #1D2942;
  --sidebar-border: #1F2A44;
  --sidebar-text: #C7CFDD;
  --sidebar-text-dim: #6B7A99;
  --sidebar-active: #FFFFFF;

  --paper-bg: #F5F3EE;
  --card-bg: #FFFFFF;
  --card-border: #E5E2D8;
  --row-hover: #FBF8EF;
  --ink-primary: #14171F;
  --ink-secondary: #4A5163;
  --ink-tertiary: #8A8F9C;

  --accent: #B8860B;
  --accent-hover: #A0750A;
  --pos-green: #1F7A4C;
  --neg-red: #B4322C;
  --warn-amber: #C88A1E;
  --info-blue: #2C5AA0;

  --p0: #1F7A4C;
  --p1: #2C5AA0;
  --p2: #C88A1E;
  --p3: #8A8F9C;

  --font-sans: 'Inter', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', 'Consolas', monospace;

  --sidebar-width: 280px;
  --transition: 180ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  height: 100%;
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--ink-primary);
  background: var(--paper-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button { font-family: inherit; cursor: pointer; border: none; background: none; }
input { font-family: inherit; }

/* ---------- Layout ---------- */
.app {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* ---------- Sidebar ---------- */
.sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--sidebar-border);
  display: flex;
  flex-direction: column;
  height: 100vh;
}

.sidebar-header {
  padding: 22px 20px 16px;
  border-bottom: 1px solid var(--sidebar-border);
}

.sidebar-brand {
  display: flex;
  align-items: baseline;
  gap: 8px;
  color: var(--sidebar-active);
}

.sidebar-brand .brand-mark {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--accent);
  padding: 2px 6px;
  border: 1px solid var(--accent);
  border-radius: 2px;
}

.sidebar-brand .brand-title {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.sidebar-subtitle {
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--sidebar-text-dim);
  letter-spacing: 0.05em;
}

.sidebar-search {
  padding: 14px 16px 8px;
}

.sidebar-search input {
  width: 100%;
  padding: 8px 12px;
  background: var(--sidebar-surface);
  border: 1px solid var(--sidebar-border);
  border-radius: 4px;
  color: var(--sidebar-text);
  font-size: 13px;
  outline: none;
  transition: border-color var(--transition);
}

.sidebar-search input::placeholder { color: var(--sidebar-text-dim); }
.sidebar-search input:focus { border-color: var(--accent); }

.sidebar-section-label {
  padding: 14px 20px 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--sidebar-text-dim);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.industry-list {
  flex: 1;
  overflow-y: auto;
  padding: 4px 8px 20px;
  list-style: none;
}

.industry-list::-webkit-scrollbar { width: 6px; }
.industry-list::-webkit-scrollbar-track { background: transparent; }
.industry-list::-webkit-scrollbar-thumb { background: var(--sidebar-border); border-radius: 3px; }

.industry-item {
  position: relative;
  padding: 10px 12px 10px 20px;
  margin: 2px 0;
  border-radius: 4px;
  color: var(--sidebar-text);
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.industry-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 3px;
  background: transparent;
  border-radius: 2px;
  transition: background var(--transition);
}

.industry-item:hover {
  background: var(--sidebar-surface);
  transform: translateX(2px);
}
.industry-item:hover::before { background: var(--sidebar-text-dim); }

.industry-item.active {
  background: var(--sidebar-surface);
  color: var(--sidebar-active);
}
.industry-item.active::before { background: var(--accent); }

.industry-item .name {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.industry-item .meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--sidebar-text-dim);
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.status-dot.done     { background: var(--pos-green); }
.status-dot.progress { background: var(--warn-amber); box-shadow: 0 0 0 2px rgba(200,138,30,0.18); }
.status-dot.review   { background: var(--info-blue); }
.status-dot.pending  { background: var(--neg-red); }

/* 建仓计划导航 */
.sidebar-plan-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px 10px 20px;
  margin: 4px 8px;
  border-radius: 4px;
  color: var(--sidebar-text);
  cursor: pointer;
  transition: background var(--transition);
  position: relative;
}
.sidebar-plan-nav:hover {
  background: var(--sidebar-surface);
  color: var(--sidebar-active);
}
.sidebar-plan-nav::before {
  content: '';
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 3px;
  border-radius: 2px;
  background: transparent;
  transition: background var(--transition);
}
.sidebar-plan-nav:hover::before {
  background: var(--accent);
}
.plan-nav-icon {
  font-size: 16px;
  line-height: 1;
}
.plan-nav-count {
  margin-left: auto;
  font-size: 11px;
  font-weight: 600;
  color: var(--sidebar-text-dim);
  background: var(--sidebar-border);
  padding: 1px 6px;
  border-radius: 8px;
  font-family: 'JetBrains Mono', monospace;
}

.sidebar-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--sidebar-border);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--sidebar-text-dim);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sidebar-timestamp {
  font-size: 10px;
  color: var(--sidebar-text-dim);
  white-space: nowrap;
}

.sidebar-logout {
  margin-left: 8px;
  padding: 3px 8px;
  background: transparent;
  border: 1px solid var(--sidebar-border);
  color: var(--sidebar-text-dim);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: color 160ms, border-color 160ms;
}
.sidebar-logout:hover {
  color: var(--warn-amber);
  border-color: var(--warn-amber);
}

/* ---------- Login page ---------- */
.login-page {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(1200px 600px at 20% 10%, #17223A 0%, transparent 60%),
    radial-gradient(1000px 500px at 80% 90%, #131C2F 0%, transparent 60%),
    var(--sidebar-bg);
  color: var(--sidebar-text);
  font-family: var(--font-sans);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.login-container {
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.login-panel {
  background: var(--sidebar-surface);
  border: 1px solid var(--sidebar-border);
  padding: 36px 32px 28px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--sidebar-border);
}

.login-brand .brand-mark {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: #0F1729;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.05em;
}

.login-title {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--sidebar-text);
}

.login-subtitle {
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--sidebar-text-dim);
  text-transform: uppercase;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.login-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sidebar-text-dim);
}

.login-input {
  background: #0B1220;
  border: 1px solid var(--sidebar-border);
  color: var(--sidebar-text);
  padding: 11px 14px;
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.05em;
  outline: none;
  transition: border-color 160ms;
}
.login-input:focus {
  border-color: var(--accent);
}
.login-input::placeholder {
  color: #4C566E;
}

.login-submit {
  margin-top: 6px;
  padding: 11px 16px;
  background: var(--accent);
  color: #0F1729;
  border: none;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 160ms, transform 160ms;
}
.login-submit:hover:not(:disabled) {
  background: var(--accent-hover);
  transform: translateY(-1px);
}
.login-submit:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.login-error {
  min-height: 18px;
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--neg-red);
}

.login-hint {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--sidebar-border);
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  color: var(--sidebar-text-dim);
}
.login-hint-dot {
  width: 6px;
  height: 6px;
  background: var(--pos-green);
  border-radius: 50%;
  animation: pulse 1.8s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 0.4; }
  50%      { opacity: 1;   }
}

.login-meta {
  text-align: center;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: #4C566E;
}

/* ---------- Main content ---------- */
.main {
  flex: 1;
  overflow-y: auto;
  background: var(--paper-bg);
}

.main::-webkit-scrollbar { width: 8px; }
.main::-webkit-scrollbar-track { background: var(--paper-bg); }
.main::-webkit-scrollbar-thumb { background: #D8D3C6; border-radius: 4px; }

.detail {
  max-width: 1180px;
  margin: 0 auto;
  padding: 32px 40px 60px;
  animation: fadeSlide 200ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes fadeSlide {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Header ---------- */
.detail-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--card-border);
  margin-bottom: 28px;
  gap: 24px;
  flex-wrap: wrap;
}

.detail-title-block {
  flex: 1;
  min-width: 300px;
}

.detail-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-tertiary);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.detail-title {
  font-size: 26px;
  font-weight: 700;
  color: var(--ink-primary);
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.detail-meta {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-secondary);
}

.detail-meta .status-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.rating-box {
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding: 10px 16px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 4px;
  min-width: 100px;
}
.rating-label {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-tertiary);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.rating-value {
  font-family: var(--font-mono);
  font-size: 24px;
  font-weight: 600;
  color: var(--accent);
}
.rating-value.pending { color: var(--ink-tertiary); font-size: 15px; }
.rating-suffix { font-family: var(--font-mono); font-size: 12px; color: var(--ink-tertiary); }

.btn-update {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: var(--accent);
  color: #FFFFFF;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.03em;
  border-radius: 4px;
  box-shadow: 0 1px 0 rgba(0,0,0,0.04);
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
}
.btn-update:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(184,134,11,0.25);
}
.btn-update:active { transform: translateY(0); }
.btn-update .refresh-icon {
  width: 14px; height: 14px;
  border: 1.5px solid #FFFFFF;
  border-right-color: transparent;
  border-radius: 50%;
  display: inline-block;
}

/* ---------- Section ---------- */
.section { margin-bottom: 32px; }

.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-secondary);
  margin-bottom: 12px;
}
.section-title::before {
  content: '';
  width: 4px; height: 12px;
  background: var(--accent);
  border-radius: 1px;
}

/* Conclusion */
.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 4px;
  padding: 20px 22px;
}

.conclusion p {
  font-size: 14px;
  line-height: 1.75;
  color: var(--ink-primary);
  margin: 0;
}
.conclusion p + p { margin-top: 10px; }
.conclusion p::before {
  content: '§';
  display: inline-block;
  margin-right: 8px;
  font-family: var(--font-mono);
  color: var(--accent);
  font-weight: 600;
}

/* ---------- Holdings table ---------- */
.holdings-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 4px;
  overflow: hidden;
}

.holdings-table thead th {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-tertiary);
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--card-border);
  background: #FAF8F2;
}

.holdings-table tbody td {
  padding: 14px 16px;
  border-bottom: 1px solid #F0EDE3;
  vertical-align: middle;
  line-height: 1.4;
}

.holdings-table tbody tr:last-child td { border-bottom: none; }
.holdings-table tbody tr { transition: background var(--transition); }
.holdings-table tbody tr:hover { background: var(--row-hover); }

.holdings-table tbody tr {
  position: relative;
}

.p-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-primary);
}
.p-tag::before {
  content: '';
  width: 3px;
  height: 14px;
  border-radius: 1px;
}
.p-tag.p0::before { background: var(--p0); }
.p-tag.p1::before { background: var(--p1); }
.p-tag.p2::before { background: var(--p2); }
.p-tag.p3::before { background: var(--p3); }

.stock-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-primary);
}
.stock-code {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-tertiary);
  margin-top: 2px;
}
.pos-value {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-primary);
  text-align: right;
}
.pos-value.zero { color: var(--ink-tertiary); text-decoration: line-through; }
.pos-value .unit {
  font-size: 11px;
  color: var(--ink-tertiary);
  font-weight: 500;
  margin-left: 2px;
}
.pos-value.pending { color: var(--ink-tertiary); font-size: 12px; text-decoration: none; }

.logic-cell {
  font-size: 13px;
  color: var(--ink-secondary);
  line-height: 1.55;
  max-width: 380px;
}

.action-cell {
  text-align: right;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}
.plan-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.plan-dot.has-plan { background: #1F7A4C; }
.plan-dot.no-plan { background: #D0D0D0; }
.btn-mini {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
  padding: 4px 10px;
  border: 1px solid rgba(184,134,11,0.35);
  border-radius: 3px;
  transition: background var(--transition), color var(--transition);
}
.btn-mini:hover { background: var(--accent); color: #fff; }

.col-p { width: 60px; }
.col-code { width: 140px; }
.col-pos { width: 100px; text-align: right; }
.col-action { width: 70px; text-align: right; }

/* ---------- Events timeline ---------- */
.timeline {
  list-style: none;
  padding: 4px 0;
}
.timeline li {
  display: grid;
  grid-template-columns: 130px 1fr 100px 140px;
  gap: 16px;
  padding: 14px 16px;
  border-bottom: 1px solid #F0EDE3;
  align-items: center;
  transition: background var(--transition);
}
.timeline li:last-child { border-bottom: none; }
.timeline li:hover { background: var(--row-hover); }

.event-time {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-secondary);
  letter-spacing: 0.02em;
}
.event-title {
  font-size: 14px;
  color: var(--ink-primary);
  font-weight: 500;
}
.event-action {
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 3px 8px;
  border-radius: 3px;
  display: inline-block;
  text-align: center;
  justify-self: start;
  background: rgba(74,81,99,0.06);
  color: var(--ink-tertiary);
}
.event-action.加仓, .event-action.T2加仓 { background: rgba(31,122,76,0.10); color: var(--pos-green); }
.event-action.减仓 { background: rgba(200,138,30,0.12); color: var(--warn-amber); }
.event-action.清仓, .event-action.T1强退 { background: rgba(180,50,44,0.10); color: var(--neg-red); }
.event-action.观察, .event-action.维持 { background: rgba(74,81,99,0.08); color: var(--ink-secondary); }
.event-action.关键催化 { background: rgba(44,90,160,0.10); color: var(--info-blue); }
.event-action.default { background: rgba(74,81,99,0.06); color: var(--ink-tertiary); }

.event-delta {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-secondary);
  text-align: right;
}

/* ---------- Empty state ---------- */
.empty-hint {
  padding: 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-tertiary);
  text-align: center;
  border: 1px dashed var(--card-border);
  border-radius: 4px;
}

/* ---------- Modal ---------- */
.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 41, 0.55);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  opacity: 0;
  transition: opacity 180ms ease;
}
.modal-mask.open {
  display: flex;
  opacity: 1;
}

.modal {
  width: 460px;
  max-width: 92vw;
  background: var(--card-bg);
  border-radius: 6px;
  border: 1px solid var(--card-border);
  box-shadow: 0 16px 40px rgba(15,23,41,0.28);
  overflow: hidden;
  transform: translateY(8px);
  transition: transform 180ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.modal-mask.open .modal { transform: translateY(0); }

.modal-header {
  padding: 20px 24px 12px;
  border-bottom: 1px solid var(--card-border);
}
.modal-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--ink-primary);
}
.modal-eyebrow {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--accent);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.modal-body {
  padding: 18px 24px 22px;
  font-size: 13px;
  color: var(--ink-secondary);
  line-height: 1.7;
}
.modal-body ul {
  list-style: none;
  margin-top: 10px;
  padding-left: 0;
}
.modal-body li {
  padding-left: 18px;
  position: relative;
  margin-bottom: 4px;
}
.modal-body li::before {
  content: '›';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 20px;
  background: #FAF8F2;
  border-top: 1px solid var(--card-border);
}
.btn-secondary, .btn-primary {
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  border-radius: 4px;
  transition: background var(--transition), color var(--transition);
}
.btn-secondary {
  background: transparent;
  color: var(--ink-secondary);
  border: 1px solid var(--card-border);
}
.btn-secondary:hover { background: #F0EDE3; }
.btn-primary {
  background: var(--accent);
  color: #FFFFFF;
}
.btn-primary:hover { background: var(--accent-hover); }

/* Toast */
.toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--sidebar-bg);
  color: var(--sidebar-active);
  padding: 12px 20px;
  border-radius: 4px;
  font-size: 13px;
  box-shadow: 0 8px 24px rgba(15,23,41,0.25);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms cubic-bezier(0.2, 0.8, 0.2, 1);
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 10px;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.toast::before {
  content: '';
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--warn-amber);
  box-shadow: 0 0 0 3px rgba(200,138,30,0.25);
  flex-shrink: 0;
}

/* Responsive small screens */
@media (max-width: 900px) {
  .sidebar { width: 240px; }
  .detail { padding: 24px 20px; }
  .holdings-table thead { display: none; }
  .holdings-table, .holdings-table tbody, .holdings-table tr, .holdings-table td {
    display: block; width: 100%;
  }
  .holdings-table tr {
    padding: 12px; border-bottom: 1px solid #F0EDE3;
  }
  .holdings-table td { padding: 4px 0; border: none; }
  .timeline li {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

/* ============================================================
   建仓计划模块
   ============================================================ */

/* ============================================================
   个股详情弹窗（建仓计划）
   ============================================================ */

/* 弹窗遮罩 */
.stock-modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(15,23,41,0.55);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 150ms ease-out;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* 弹窗主体 */
.stock-modal {
  background: var(--paper-bg);
  border-radius: 6px;
  width: 90%;
  max-width: 800px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
  animation: slideUp 200ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* 弹窗头部 */
.stock-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--card-border);
  position: sticky;
  top: 0;
  background: var(--paper-bg);
  z-index: 1;
}
.stock-modal-title {
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.stock-modal-title .code {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 600;
  color: var(--ink-primary);
}
.stock-modal-title .name {
  font-family: var(--font-sans);
  font-size: 16px;
  color: var(--ink-secondary);
}
.stock-modal-close {
  width: 28px;
  height: 28px;
  border: none;
  background: var(--card-border);
  border-radius: 50%;
  cursor: pointer;
  font-size: 14px;
  color: var(--ink-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 150ms;
}
.stock-modal-close:hover { background: var(--ink-tertiary); color: #fff; }

/* 弹窗内容 */
.stock-modal-body {
  padding: 20px 24px 24px;
}

/* 当前状态行 */
.stock-meta-row {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink-primary);
}
.stock-meta-item {
  white-space: nowrap;
}
.stock-meta-item .label {
  font-family: var(--font-sans);
  font-size: 11px;
  color: var(--ink-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-right: 6px;
}

/* 四档位表格 */
.tier-section {
  margin-bottom: 20px;
}
.tier-section-title {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-primary);
  margin-bottom: 10px;
  letter-spacing: 0.03em;
}
.tier-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-sans);
  font-size: 13px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 4px;
  overflow: hidden;
}
.tier-table thead th {
  padding: 9px 14px;
  text-align: left;
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #fff;
}
.tier-table thead th.build { background: #1F7A4C; }
.tier-table thead th.add { background: #2C5AA0; }
.tier-table thead th.reduce { background: #C88A1E; }
.tier-table thead th.clear { background: #B4322C; }
.tier-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--card-border);
  vertical-align: top;
}
.tier-table tr:last-child td { border-bottom: none; }
.tier-table td.price {
  font-family: var(--font-mono);
  color: var(--ink-primary);
  white-space: nowrap;
  font-weight: 600;
}
.tier-table td.ratio {
  font-family: var(--font-mono);
  color: var(--accent);
  font-weight: 600;
  white-space: nowrap;
}
.tier-table td.condition {
  color: var(--ink-secondary);
  font-size: 12px;
  line-height: 1.5;
}
.tier-table tr.current {
  background: #FBF8EF;
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}
.tier-table tr.current td.price::after {
  content: ' ← 当前';
  font-family: var(--font-sans);
  font-size: 11px;
  color: var(--accent);
  font-weight: 600;
}

/* 三维评分 */
.score-section {
  margin-bottom: 20px;
}
.score-section-title {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-primary);
  margin-bottom: 10px;
  letter-spacing: 0.03em;
}
.score-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
}
.score-item {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 4px;
  padding: 12px;
}
.score-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.score-item-header .label {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-secondary);
}
.score-item-header .value {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 700;
}
.score-item-header .value.fundamental { color: #1F7A4C; }
.score-item-header .value.capital { color: #2C5AA0; }
.score-item-header .value.news { color: #8A8F9C; }
.score-bar-bg {
  height: 6px;
  background: var(--card-border);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 6px;
}
.score-bar-fill {
  height: 100%;
  border-radius: 10px;
  transition: width 300ms;
}
.score-bar-fill.fundamental { background: #1F7A4C; }
.score-bar-fill.capital { background: #2C5AA0; }
.score-bar-fill.news { background: #8A8F9C; }
.score-reason {
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--ink-tertiary);
  line-height: 1.4;
}

/* 每日关注点 */
.focus-section-title {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-primary);
  margin-bottom: 10px;
  letter-spacing: 0.03em;
}
.focus-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.focus-list li {
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--ink-secondary);
  line-height: 1.5;
  padding: 8px 12px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 4px;
  position: relative;
  padding-left: 24px;
}
.focus-list li::before {
  content: '→';
  position: absolute;
  left: 10px;
  color: var(--accent);
  font-weight: 700;
}

/* 未找到数据 */
.no-plan-data {
  text-align: center;
  padding: 40px 20px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink-tertiary);
}


/* ============ 真龙/伪龙标签 ============ */
.dragon-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 13px;
  cursor: default;
  white-space: nowrap;
}
.dragon-badge .dragon-icon { font-size: 18px; line-height: 1; }
.dragon-true { background: rgba(255, 77, 79, 0.12); color: #ff4d4f; border: 1px solid rgba(255, 77, 79, 0.3); }
.dragon-false { background: rgba(82, 196, 26, 0.12); color: #52c41a; border: 1px solid rgba(82, 196, 26, 0.3); }
.dragon-pending { background: rgba(250, 173, 20, 0.12); color: #faad14; border: 1px solid rgba(250, 173, 20, 0.3); }
.dragon-weak { background: rgba(140, 140, 150, 0.12); color: #8c8c96; border: 1px solid rgba(140, 140, 150, 0.3); }

/* ---- 统一股池 · 双轨 tab ---- */
.pool-tabs { display: flex; gap: 10px; margin: 4px 0 18px; flex-wrap: wrap; }
.pool-tab-btn {
  padding: 8px 18px; border-radius: 8px; border: 1px solid var(--card-border);
  background: var(--card-bg); color: var(--ink-secondary); cursor: pointer; font-size: 14px;
  transition: all 0.15s ease;
}
.pool-tab-btn:hover { border-color: var(--accent); color: var(--accent); }
.pool-tab-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); font-weight: 600; }
.pool-expand-btn {
  padding: 8px 16px; border-radius: 8px; border: 1px dashed var(--card-border);
  background: transparent; color: var(--ink-secondary); cursor: pointer; font-size: 13px;
  margin-bottom: 12px; transition: all 0.15s ease;
}
.pool-expand-btn:hover { color: var(--accent); border-color: var(--accent); }
.pool-fold[hidden] { display: none; }
.p-tag.swing-p0w { outline: 2px solid rgba(250, 173, 20, 0.55); outline-offset: 1px; }

/* ---- 当日作战全景（概览页） ---- */
.overview-item .name { font-weight: 600; }
.section-sub {
  font-size: 11px;
  color: var(--ink-tertiary);
  font-weight: 400;
  margin-left: 8px;
}
.pool-table th, .pool-table td { white-space: nowrap; padding: 8px 10px; }
.pool-table .logic-cell { white-space: normal; }
.num-cell {
  font-family: var(--font-mono);
  font-size: 12px;
  text-align: right;
}
.val-up { color: var(--neg-red); }
.val-down { color: var(--pos-green); }
.row-p0 { background: rgba(31, 122, 76, 0.07); }
.row-p0 td:first-child { border-left: 3px solid var(--p0); }
.mini-dragon {
  display: inline-block;
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(255, 77, 79, 0.10);
  color: #B4322C;
  margin-left: 4px;
  white-space: nowrap;
}

/* ===== 波段轨估值风险档位（PE 分档） ===== */
/* 高危 PE>300 橙 | 高估值 150-300 琥珀 | 可接受 <150 绿 */
.pe-risk-hi { color: #E8590C; font-weight: 700; }
.pe-risk-mid { color: var(--warn-amber); font-weight: 700; }
.pe-risk-ok { color: var(--pos-green); font-weight: 600; }

.risk-badge {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 11px;
  line-height: 1.5;
  margin-right: 5px;
  white-space: nowrap;
}
.risk-badge.risk-hi { background: rgba(232, 89, 12, 0.12); color: #E8590C; border: 1px solid rgba(232, 89, 12, 0.45); }
.risk-badge.risk-mid { background: rgba(200, 138, 30, 0.12); color: var(--warn-amber); border: 1px solid rgba(200, 138, 30, 0.45); }
.risk-badge.risk-ok { background: rgba(31, 122, 76, 0.10); color: var(--pos-green); border: 1px solid rgba(31, 122, 76, 0.4); }

/* ===== 全景页日期选择器 ===== */
.detail-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.date-picker-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--ink-secondary);
  white-space: nowrap;
}
.date-picker {
  appearance: none;
  -webkit-appearance: none;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-primary);
  background: var(--card-bg, #fff);
  border: 1px solid var(--card-border);
  border-radius: 6px;
  padding: 6px 30px 6px 12px;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23B8860B' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  transition: border-color var(--transition);
}
.date-picker:hover, .date-picker:focus {
  border-color: var(--accent);
  outline: none;
}


/* ===== 攻防三池标签（口径v2：进攻红/防守蓝/观察灰，与双轨正交） ===== */
.tag-stack { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
.pool-tag {
  display: inline-block;
  padding: 0 6px;
  border-radius: 4px;
  font-size: 10px;
  line-height: 1.6;
  white-space: nowrap;
  letter-spacing: 1px;
}
.pool-tag.pool-attack  { background: rgba(180, 50, 44, 0.12);  color: var(--neg-red);  border: 1px solid rgba(180, 50, 44, 0.5); }
.pool-tag.pool-defense { background: rgba(76, 130, 184, 0.14); color: #4C82B8;         border: 1px solid rgba(76, 130, 184, 0.5); }
.pool-tag.pool-watch   { background: rgba(128, 128, 128, 0.12); color: var(--ink-tertiary); border: 1px solid rgba(128, 128, 128, 0.35); }

/* ===== 风险提醒区块（口径v2第3节：红牌/黄牌/绿灯，置于精选名单之前） ===== */
.risk-banner-green {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-radius: 8px;
  background: rgba(31, 122, 76, 0.10);
  border: 1px solid rgba(31, 122, 76, 0.45);
  color: var(--pos-green);
  font-size: 14px;
}
.risk-banner-green .risk-light { font-size: 16px; }
.risk-banner-green strong { font-size: 15px; }
.risk-banner-green .risk-green-sub { color: var(--ink-secondary); font-size: 12px; }

.risk-card-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.risk-card-badge.red    { background: rgba(180, 50, 44, 0.14);  color: var(--neg-red);  border: 1px solid rgba(180, 50, 44, 0.5); }
.risk-card-badge.yellow { background: rgba(200, 138, 30, 0.14); color: var(--warn-amber); border: 1px solid rgba(200, 138, 30, 0.5); }

.row-risk-red    { background: rgba(180, 50, 44, 0.07); }
.row-risk-red td:first-child { border-left: 3px solid var(--neg-red); }
.row-risk-yellow { background: rgba(200, 138, 30, 0.06); }
.row-risk-yellow td:first-child { border-left: 3px solid var(--warn-amber); }

/* ==== 快速筛选 · 三组合漏斗（v10）==== */
.screen-dist { display: flex; gap: 10px; flex-wrap: wrap; margin: 10px 0; }
.screen-chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 12px; border-radius: 999px; font-size: 12px; font-weight: 700;
  border: 1px solid transparent;
}
.screen-chip.verdict-hot  { background: rgba(180, 50, 44, 0.12); color: var(--neg-red); border-color: rgba(180, 50, 44, 0.35); }
.screen-chip.verdict-pass { background: rgba(34, 139, 87, 0.10); color: var(--pos-green); border-color: rgba(34, 139, 87, 0.30); }
.screen-chip.verdict-spec { background: rgba(200, 138, 30, 0.12); color: var(--warn-amber); border-color: rgba(200, 138, 30, 0.35); }
.screen-chip.verdict-fail { background: rgba(120, 120, 130, 0.10); color: var(--ink-tertiary); border-color: rgba(120, 120, 130, 0.28); }

.screen-deeprun {
  margin: 0 0 12px; padding: 8px 12px; border-radius: 8px;
  background: rgba(200, 138, 30, 0.07); border-left: 3px solid var(--warn-amber);
  font-size: 13px; color: var(--ink-secondary); line-height: 1.6;
}
.screen-deeprun b { color: var(--warn-amber); }

.verdict-badge {
  display: inline-block; padding: 1px 8px; border-radius: 999px;
  font-size: 11px; font-weight: 700; white-space: nowrap;
}
.verdict-badge.verdict-hot  { background: rgba(180, 50, 44, 0.14); color: var(--neg-red); }
.verdict-badge.verdict-pass { background: rgba(34, 139, 87, 0.12); color: var(--pos-green); }
.verdict-badge.verdict-spec { background: rgba(200, 138, 30, 0.14); color: var(--warn-amber); }
.verdict-badge.verdict-fail { background: rgba(120, 120, 130, 0.12); color: var(--ink-tertiary); }

.row-hot { background: rgba(180, 50, 44, 0.05); }
.row-hot td:first-child { border-left: 3px solid var(--neg-red); }

/* ---------- 次日交易策略 ---------- */
.strat-banner { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 4px 0 14px; }
.strat-banner-item {
  background: var(--card-bg); border: 1px solid var(--card-border); border-radius: 10px;
  padding: 10px 14px; display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: var(--ink-secondary);
}
.strat-banner-item b { font-size: 12px; color: var(--accent); letter-spacing: 1px; }
.strat-group-title {
  font-weight: 700; font-size: 14px; color: var(--ink-primary);
  margin: 18px 0 8px; padding-left: 10px; border-left: 3px solid var(--accent);
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
}
.strat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(430px, 1fr)); gap: 12px; }
.strat-card {
  background: var(--card-bg); border: 1px solid var(--card-border); border-radius: 10px;
  overflow: hidden; align-self: start;
}
.strat-card-title {
  font-weight: 700; font-size: 13px; color: var(--ink-primary);
  background: var(--row-hover); padding: 8px 12px; border-bottom: 1px solid var(--card-border);
}
.strat-cond-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.strat-cond-table th {
  text-align: left; font-size: 11px; color: var(--ink-tertiary); font-weight: 600;
  padding: 6px 10px; border-bottom: 1px solid var(--card-border); background: var(--card-bg);
}
.strat-cond-table td { padding: 8px 10px; border-bottom: 1px solid var(--card-border); vertical-align: top; line-height: 1.55; }
.strat-cond-table tr:last-child td { border-bottom: none; }
.strat-type {
  display: inline-block; font-size: 10px; font-weight: 700; color: var(--accent);
  border: 1px solid var(--accent); border-radius: 4px; padding: 0 5px; margin-bottom: 3px;
}
.strat-cond { color: var(--ink-primary); }
.strat-hit { color: var(--pos-green); }
.strat-miss { color: var(--neg-red); }
.strat-hit-h { color: var(--pos-green) !important; }
.strat-miss-h { color: var(--neg-red) !important; }
.strat-disclaimer { margin-top: 12px; font-size: 11px; color: var(--ink-tertiary); }
@media (max-width: 900px) {
  .strat-banner { grid-template-columns: 1fr; }
  .strat-grid { grid-template-columns: 1fr; }
}

/* ---------- 明日作战计划（v3板块分层） ---------- */
.battle-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); gap: 12px; }
.battle-sector-card {
  background: var(--card-bg); border: 1px solid var(--card-border); border-radius: 10px;
  overflow: hidden; align-self: start;
}
.battle-sector-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  background: var(--row-hover); padding: 8px 12px; border-bottom: 1px solid var(--card-border);
}
.battle-sector-name { font-weight: 700; font-size: 13px; color: var(--ink-primary); }
.stage-badge {
  display: inline-block; font-size: 11px; font-weight: 600; padding: 2px 8px;
  border-radius: 4px; white-space: nowrap;
}
.stage-peak { background: rgba(180, 50, 44, 0.12); color: var(--neg-red); }
.stage-main { background: rgba(31, 122, 76, 0.12); color: var(--pos-green); }
.stage-start { background: rgba(44, 90, 160, 0.12); color: var(--info-blue); }
.stage-ebb { background: rgba(138, 143, 156, 0.15); color: var(--ink-tertiary); }
.stage-wait { background: rgba(200, 138, 30, 0.12); color: var(--warn-amber); }
.stage-dead { background: rgba(138, 143, 156, 0.08); color: var(--ink-tertiary); }
.dir-attack { color: var(--pos-green); }
.dir-watch { color: var(--warn-amber); }
.role-badge {
  display: inline-block; font-size: 10px; font-weight: 700; padding: 1px 6px;
  border-radius: 3px;
}
.role-lead { background: rgba(31, 122, 76, 0.15); color: var(--pos-green); }
.role-elastic { background: rgba(44, 90, 160, 0.12); color: var(--info-blue); }
.role-backup { background: rgba(138, 143, 156, 0.12); color: var(--ink-tertiary); }
.tag-badge {
  display: inline-block; font-size: 10px; padding: 1px 5px;
  border: 1px solid var(--card-border); border-radius: 3px; color: var(--ink-secondary);
}
.battle-verify {
  margin-top: 12px; padding: 10px 14px; background: rgba(200, 138, 30, 0.08);
  border: 1px solid rgba(200, 138, 30, 0.25); border-radius: 8px;
  font-size: 12px; color: var(--ink-secondary); display: flex; gap: 10px; align-items: baseline;
}
.battle-verify b { color: var(--warn-amber); white-space: nowrap; }
/* 潜力板块样式 */
.potential-card { border-left: 3px solid var(--info-blue); }
.potential-card .battle-sector-head { background: rgba(44, 90, 160, 0.06); }
.potential-note {
  padding: 8px 12px; font-size: 11px; color: var(--ink-secondary);
  background: rgba(44, 90, 160, 0.04); border-bottom: 1px solid var(--card-border);
  font-style: italic;
}
/* 启动评分徽章 */
.score-badge {
  display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 8px;
  background: linear-gradient(135deg, rgba(44, 90, 160, 0.15), rgba(31, 122, 76, 0.15));
  color: var(--info-blue); border-radius: 4px;
}
/* 数据修正提示 */
.data-correction {
  margin-top: 12px; padding: 10px 14px; background: rgba(200, 138, 30, 0.06);
  border: 1px dashed rgba(200, 138, 30, 0.3); border-radius: 8px;
  font-size: 12px; color: var(--ink-secondary); display: flex; gap: 10px; align-items: baseline;
}
.data-correction b { color: var(--warn-amber); white-space: nowrap; }
@media (max-width: 900px) { .battle-grid { grid-template-columns: 1fr; } }
