/* Aurora-Alert 资讯浏览页 —— 极简响应式样式（无外部框架）。 */
:root {
  --bg: #f6f7f9;
  --card: #ffffff;
  --ink: #1c1f23;
  --muted: #6b7280;
  --line: #e4e7eb;
  --accent: #2b6cb0;
  --chip: #eef2f7;
  --cluster: #fff4e5;
  --error: #c53030;
  --empty: #6b7280;
  --radius: 8px;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 14px/1.6 -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", Roboto, sans-serif;
}
#app { max-width: 920px; margin: 0 auto; padding: 16px; }

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 4px 2px 12px;
  border-bottom: 1px solid var(--line); margin-bottom: 12px;
}
.topbar h1 { font-size: 18px; margin: 0; font-weight: 600; }
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.count { color: var(--muted); font-size: 13px; }
button {
  cursor: pointer; border: 1px solid var(--line); background: var(--card);
  padding: 4px 12px; border-radius: var(--radius); color: var(--ink);
}
button:hover { border-color: var(--accent); color: var(--accent); }
button:disabled { opacity: .5; cursor: default; }

.filters { margin-bottom: 12px; }
.filters .row {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 8px 10px; margin: 0 0 8px; background: var(--card);
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px;
}
.filters legend { font-size: 12px; color: var(--muted); padding: 0 4px; }
.filters label { white-space: nowrap; }
.filters .chk input { margin-right: 4px; }
.filters input[type="text"], .filters input[type="search"], .filters input[type="datetime-local"], .filters select {
  padding: 4px 8px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--ink);
}
.filters .grow { flex: 1 1 220px; min-width: 160px; }
.filters .sep { width: 1px; align-self: stretch; background: var(--line); margin: 0 2px; }
.custom-range { display: inline-flex; align-items: center; gap: 6px; }

.status { padding: 10px 4px; color: var(--muted); }
.status.loading::before { content: "⏳ "; }
.status.error { color: var(--error); }
.status.error::before { content: "⚠ "; }
.status.empty::before { content: "📭 "; }

.list { display: flex; flex-direction: column; gap: 10px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px 14px;
}
.card-meta { font-size: 12px; color: var(--muted); margin-bottom: 4px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.card-meta .rel { color: var(--accent); }
.cluster-badge { background: var(--cluster); color: #9a4a00; padding: 1px 8px; border-radius: 10px; font-size: 11px; }
.title { font-size: 15px; font-weight: 600; margin: 2px 0 6px; cursor: pointer; }
.chips { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; }
.chip { background: var(--chip); color: var(--muted); font-size: 11px; padding: 1px 8px; border-radius: 10px; }
.content {
  color: #2f3640; white-space: pre-wrap; word-break: break-word;
  max-height: 4.2em; overflow: hidden; position: relative; cursor: pointer;
}
.content.expanded { max-height: none; }
.content::after { content: ""; }
.content.expanded::after { display: none; }
.card-foot { margin-top: 8px; display: flex; gap: 14px; align-items: center; }
.link { background: none; border: none; color: var(--accent); padding: 0; font-size: 12px; }
.src-link { color: var(--accent); font-size: 12px; text-decoration: none; }
.members { margin-top: 8px; display: flex; flex-direction: column; gap: 6px; }
.member { border-left: 3px solid var(--chip); padding: 4px 8px; background: #fafbfc; border-radius: 0 6px 6px 0; }
.member .m-title { font-weight: 600; font-size: 13px; }
.member .m-content { font-size: 12px; color: var(--muted); white-space: pre-wrap; }
.muted { color: var(--muted); font-size: 12px; }

.more-wrap { text-align: center; padding: 16px 0; }
.more-status { color: var(--muted); font-size: 12px; margin-left: 10px; }
.footer { text-align: center; color: var(--muted); font-size: 11px; padding: 16px 0; }
.footer code { background: var(--chip); padding: 1px 6px; border-radius: 4px; }

@media (max-width: 600px) {
  #app { padding: 10px; }
  .filters .grow { flex: 1 1 100%; }
  .title { font-size: 14px; }
}

/* feature 007：源筛选 chips（多选，"全部"=不筛选） */
.fchips { display: flex; flex-wrap: wrap; gap: 4px; flex: 1; }
.f-chip {
  background: var(--chip); color: var(--muted); font-size: 12px;
  padding: 2px 10px; border-radius: 10px; border: 1px solid transparent; cursor: pointer;
}
.f-chip:hover { border-color: var(--accent); }
.f-chip.active { background: var(--accent); color: #fff; }

/* ══════════ MARKET 行情面板（feature 009） ══════════ */
.tabs { display: flex; gap: .25rem; margin: .75rem 0; border-bottom: 2px solid var(--border, #ddd); }
.tab { padding: .4rem 1.1rem; border: none; background: none; font: inherit; cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -2px; color: var(--muted, #666); }
.tab.active { border-bottom-color: #b03a2e; color: inherit; font-weight: 600; }

.m-toolbar { display: flex; align-items: center; gap: .6rem; margin: .75rem 0; flex-wrap: wrap; }
.m-latest-btn { padding: .25rem .8rem; }
.m-banner { background: #fff7e0; border: 1px solid #e8c96a; color: #7a5b00;
  border-radius: 6px; padding: .3rem .7rem; font-size: .85rem; }

.m-sentiment { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
  background: var(--card-bg, #fafafa); border: 1px solid var(--border, #ddd);
  border-radius: 8px; padding: .6rem 1rem; margin: .5rem 0 .75rem; }
.m-sent-item { font-size: .95rem; }
.m-sent-item b { font-size: 1.15rem; margin-left: .15rem; }
.m-partial { color: var(--muted, #888); font-size: .85rem; }
.m-sent-badge { font-weight: 700; padding: .15rem .7rem; border-radius: 999px; font-size: .85rem; }
.m-sent-badge.lv-RED { background: #fbe3e1; color: #a93226; }
.m-sent-badge.lv-YELLOW { background: #fdf3d0; color: #9a7d0a; }
.m-sent-badge.lv-GREEN { background: #e2f4e5; color: #1e8449; }

.m-sections { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: .75rem; margin-bottom: 1rem; }
.m-section { background: var(--card-bg, #fff); border: 1px solid var(--border, #ddd);
  border-radius: 8px; padding: .6rem .8rem; }
.m-sec-head { display: flex; align-items: baseline; justify-content: space-between;
  gap: .5rem; flex-wrap: wrap; margin-bottom: .4rem; }
.m-sec-head h3 { margin: 0; font-size: 1rem; }
.m-badges { display: inline-flex; gap: .3rem; flex-wrap: wrap; }
.m-badge { font-size: .72rem; background: var(--bg-muted, #eee); color: var(--muted, #555);
  border-radius: 4px; padding: .1rem .4rem; }
.m-badge-td { background: #e8f0fe; color: #1a4d8f; }
.m-badge-fb { background: #fdf3d0; color: #9a7d0a; }

.m-cards { display: flex; flex-wrap: wrap; gap: .5rem; }
.m-card { display: flex; flex-direction: column; min-width: 6.5rem; padding: .4rem .6rem;
  border: 1px solid var(--border, #e5e5e5); border-radius: 6px; background: var(--card-bg, #fff); }
.m-card-name { font-size: .8rem; color: var(--muted, #666); }
.m-card-price { font-size: 1.05rem; font-weight: 600; }
.m-card-price small { font-size: .7em; font-weight: 400; margin-left: .15rem; }
.m-card-sub { font-size: .72rem; color: var(--muted, #888); }

.m-table-wrap { overflow: auto; }
table.m-table { border-collapse: collapse; width: 100%; font-size: .85rem; }
.m-table th, .m-table td { padding: .22rem .45rem; text-align: right;
  border-bottom: 1px solid var(--border, #eee); white-space: nowrap; }
.m-table th:nth-child(-n+2), .m-table td:nth-child(-n+2) { text-align: left; }
.m-details summary { cursor: pointer; color: var(--muted, #555); font-size: .85rem;
  padding: .2rem 0; }
.m-details[open] .m-table-wrap { max-height: 24rem; overflow: auto; }
.m-details[open] summary { margin-bottom: .3rem; }

.m-sub { margin: .6rem 0 .25rem; font-size: .9rem; }
.m-note { font-size: .78rem; color: var(--muted, #888); margin: .4rem 0 0; }
.m-empty, .m-error { color: var(--muted, #888); font-size: .9rem; padding: .4rem 0; }
.m-error { color: #a93226; }
.m-retry { font-size: .8rem; }

.m-margin { display: flex; flex-direction: column; gap: .5rem; }
.m-spark { color: #1a4d8f; display: flex; flex-direction: column; align-items: flex-start; }
.m-spark svg { background: #f4f7fd; border-radius: 4px; }
.m-spark-label { font-size: .72rem; color: var(--muted, #888); }

.up { color: #c0392b; }      /* A 股习惯：涨红 */
.down { color: #1e8449; }    /* 跌绿 */
.flat { color: var(--muted, #888); }

/* zt_universe 三池切换 chips */
.m-pool-chips { display: flex; gap: .3rem; flex-wrap: wrap; margin-bottom: .4rem; }
.m-pool-chip { font-size: .78rem; padding: .12rem .55rem; border-radius: 999px;
  border: 1px solid var(--border, #ccc); background: var(--card-bg, #fff);
  cursor: pointer; color: var(--muted, #555); }
.m-pool-chip.active { background: #e8f0fe; border-color: #1a4d8f; color: #1a4d8f;
  font-weight: 600; }
