:root {
  --gain: #2e7d32;
  --loss: #c62828;
}

.morningWrap {
  max-width: 960px;
  margin: 0 auto;
  padding: 32px 24px;
}

.morningHeaderRow {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.morningTitle {
  font-size: 22px;
  font-weight: 700;
  margin: 0;
}

.morningDateLabel {
  color: var(--muted, #888);
  font-size: 14px;
}

.morningScannedLabel {
  font-size: 12px;
  color: var(--muted, #aaa);
  margin-left: auto;
}

.morningActionsRow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

#morningContent {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.morningAnalysisCard {
  background: #fff;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 8px;
  padding: 24px;
}

.morningAnalysisCard h3 {
  margin: 0 0 14px;
  font-size: 17px;
  font-weight: 700;
  color: #14153F;
  letter-spacing: 0.3px;
}

#morningAnalysisText {
  line-height: 1.85;
  color: #333;
  font-size: 14px;
  min-height: 80px;
}

.morningBullet {
  padding-left: 1.2em;
  text-indent: -1.2em;
  margin: 2px 0;
}

.morningNumItem {
  display: flex;
  gap: 0.4em;
  margin: 10px 0 6px;
  align-items: flex-start;
  font-size: 20px;
  font-weight: 800;
  color: #14153F;
  line-height: 1.45;
}

.morningNumPrefix {
  flex-shrink: 0;
  min-width: 1.8em;
  font-weight: 900;
}

.morningIndent {
  padding-left: 2em;
  margin: 2px 0;
  color: #444;
}

.morningPara {
  margin: 2px 0;
}

.morningGap {
  height: 4px;
}

.morningAnalysisPlaceholder {
  color: #bbb;
  font-size: 13px;
  text-align: center;
  padding: 28px 0;
}

.morningMoversRow {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 640px) {
  .morningMoversRow {
    grid-template-columns: 1fr;
  }
}

.morningMoversCard {
  background: #fff;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 8px;
  padding: 20px;
  overflow: hidden;
}

.morningMoversCard h3 {
  margin: 0 0 14px;
  font-size: 13px;
  font-weight: 700;
}

.morningMoversCard.gainCard h3 {
  color: var(--gain);
}

.morningMoversCard.lossCard h3 {
  color: var(--loss);
}

.morningTable {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.morningTable thead tr {
  border-bottom: 1px solid #f0f0f0;
}

.morningTable th {
  padding: 6px 10px;
  text-align: left;
  font-size: 11px;
  color: #aaa;
  text-transform: uppercase;
  font-weight: 600;
}

.morningTable th:last-child,
.morningTable td:last-child {
  text-align: right;
}

.morningTable th:nth-child(3),
.morningTable td:nth-child(3) {
  text-align: right;
}

.morningTable tbody tr {
  border-bottom: 1px solid #fafafa;
  cursor: default;
}

.morningTable tbody tr:last-child {
  border-bottom: none;
}

.morningTable td {
  padding: 9px 10px;
  vertical-align: middle;
}

.morningTicker {
  font-weight: 700;
  color: #111;
}

.morningName {
  color: #888;
  font-size: 12px;
  max-width: 120px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.morningPrice {
  text-align: right;
  color: #555;
}

.morningChange {
  text-align: right;
  font-weight: 700;
}

.morningEmailCard {
  background: #fff;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 8px;
  padding: 20px 24px;
}

.morningEmailCard h3 {
  margin: 0 0 14px;
  font-size: 17px;
  font-weight: 700;
  color: #14153F;
  letter-spacing: 0.3px;
}

.morningEmailRow {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.morningEmailRow input {
  flex: 1;
  min-width: 200px;
  padding: 8px 12px;
  border: 1px solid var(--border, #d1d5db);
  border-radius: 6px;
  font-size: 14px;
  outline: none;
}

.morningEmailRow input:focus {
  border-color: var(--accent, #6366f1);
}

.morningEmailHint {
  margin-top: 8px;
  font-size: 12px;
  color: #c62828;
}

.morningEmpty {
  color: #ccc;
  font-size: 12px;
  text-align: center;
  padding: 24px 0;
}

#morningEmptyState {
  text-align: center;
  color: #aaa;
  font-size: 14px;
  padding: 60px 20px;
}

.morningExpandBtn {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 8px 0;
  background: #FDFDFB;
  border: 1px solid #14153F;
  border-radius: 4px;
  color: #14153F;
  font-family: Aptos, "Aptos Display", Arial, sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.morningExpandBtn:hover {
  background: #14153F;
  color: #FDFDFB;
}

/* ── Deep Dive ─────────────────────────────────── */
.deepDiveCard {
  background: #fff;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 8px;
  padding: 24px 28px;
}

.deepDiveCard h3 {
  margin: 0 0 16px;
  font-size: 17px;
  font-weight: 700;
  color: #14153F;
  letter-spacing: 0.3px;
}

.deepDiveSearchRow {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.deepDiveSearchRow input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--border, #d1d5db);
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  text-transform: uppercase;
}

.deepDiveSearchRow input:focus {
  border-color: #14153F;
}

.deepDiveEmptyState {
  color: #bbb;
  font-size: 13px;
  text-align: center;
  padding: 24px 0 8px;
}

.ddSpinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid #ddd;
  border-top-color: #14153F;
  border-radius: 50%;
  animation: ddSpin 0.7s linear infinite;
  vertical-align: middle;
  margin-left: 8px;
}

@keyframes ddSpin {
  to { transform: rotate(360deg); }
}

.ddLoading, .ddError {
  font-size: 13px;
  color: #888;
  padding: 16px 0;
}

.ddError { color: #c62828; }

/* Price bar */
.ddPriceBar {
  display: flex;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
  padding: 16px 0 14px;
  border-bottom: 1px solid #f0f0f0;
  margin-bottom: 16px;
}

.ddPriceTicker {
  font-size: 20px;
  font-weight: 800;
  color: #14153F;
  letter-spacing: 0.5px;
}

.ddPriceName {
  font-size: 13px;
  font-weight: 400;
  color: #888;
  margin-left: 10px;
}

.ddPriceStats {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.ddPrice {
  font-size: 22px;
  font-weight: 700;
  color: #111;
}

.ddChange {
  font-size: 16px;
  font-weight: 700;
}

.ddChange.ddGain { color: var(--gain); }
.ddChange.ddLoss { color: var(--loss); }

.ddMeta {
  font-size: 12px;
  color: #888;
  background: #f5f5f5;
  border-radius: 4px;
  padding: 3px 8px;
}

/* Chart */
.ddChartWrap {
  margin-bottom: 20px;
  border: 1px solid #f0f0f0;
  border-radius: 8px;
  padding: 12px 16px;
  background: #fafafa;
}

.ddChartPeriods {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
}

.ddPeriodBtn {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  background: #fff;
  color: #888;
  cursor: pointer;
  transition: all 0.15s;
}

.ddPeriodBtn.active, .ddPeriodBtn:hover {
  background: #14153F;
  color: #fff;
  border-color: #14153F;
}

.ddKlineChart {
  width: 100%;
  height: 320px;
  position: relative;
}

.ddRsiChart {
  width: 100%;
  height: 100px;
  position: relative;
  margin-top: 2px;
}

.ddRsiLabel {
  font-size: 10px;
  color: #aaa;
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-top: 8px;
  padding-left: 2px;
}

.ddChartLegend {
  position: absolute;
  top: 6px;
  left: 8px;
  display: flex;
  gap: 12px;
  font-size: 11px;
  z-index: 10;
  pointer-events: none;
}

.ddOHLCTooltip {
  display: none;
  position: absolute;
  top: 8px;
  left: 60px;
  background: rgba(255,255,255,0.95);
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  padding: 4px 10px;
  font-size: 11px;
  flex-direction: column;
  gap: 3px;
  z-index: 20;
  pointer-events: none;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.ddTTRow1 { display: flex; gap: 10px; align-items: center; }
.ddTTRow2 { display: flex; gap: 10px; align-items: center; padding-top: 3px; border-top: 1px solid #f0f0f0; }

.ddTTDate {
  color: #aaa;
  margin-right: 4px;
}

/* Report cards */
.ddReportGrid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

@media (max-width: 700px) {
  .ddReportGrid { grid-template-columns: 1fr; }
}

.ddReportCard {
  background: #fafafa;
  border: 1px solid #ebebeb;
  border-radius: 8px;
  padding: 14px 16px;
}

.ddReportEmpty {
  opacity: 0.5;
}

.ddReportLabel {
  font-size: 14px;
  font-weight: 800;
  color: #14153F;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.ddReportDate {
  font-size: 11px;
  color: #aaa;
  margin-bottom: 8px;
}

.ddRatingRow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.ddRatingLabel {
  font-size: 11px;
  font-weight: 700;
}

.ddRatingPT {
  font-size: 11px;
  color: #555;
}

.ddReportNo {
  font-size: 12px;
  color: #ccc;
  margin-top: 8px;
}

.ddInsight {
  font-size: 12px;
  color: #555;
  line-height: 1.5;
  margin-top: 6px;
  display: flex;
  gap: 6px;
  align-items: flex-start;
}

.ddInsightItems {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.ddInsightTag {
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 3px;
  text-transform: uppercase;
  margin-top: 1px;
}

.ddInsightTag.thesis { background: #e8eaf6; color: #3949ab; }
.ddInsightTag.catalyst { background: #e8f5e9; color: #2e7d32; }
.ddInsightTag.risk { background: #fce4ec; color: #c62828; }

/* Analysis */
.ddAnalysisTitle {
  font-size: 15px;
  font-weight: 700;
  color: #14153F;
  letter-spacing: 0.3px;
  margin-bottom: 12px;
}

.ddAnalysisBody {
  font-size: 14px;
  line-height: 1.72;
  color: #333;
}

/* ── Market Context Card ───────────────────────── */
.ddMarketCtxCard {
  background: #fff;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 8px;
  padding: 14px 20px;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ddMktMetrics {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
}

.ddMktMetricItem {
  display: flex;
  gap: 5px;
  align-items: baseline;
}

.ddMktLabel {
  font-size: 11px;
  color: #aaa;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.ddMktVal {
  font-size: 13px;
  font-weight: 700;
  color: #111;
}

.ddMktConsensus {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.ddConsBar {
  display: flex;
  height: 6px;
  width: 120px;
  border-radius: 3px;
  overflow: hidden;
  flex-shrink: 0;
}

.ddConsBarBull { background: var(--gain); }
.ddConsBarHold { background: #d1d5db; }
.ddConsBarBear { background: var(--loss); }

.ddConsStat {
  font-size: 11px;
  font-weight: 600;
}

.ddConsBull { color: var(--gain); }
.ddConsHold { color: #888; }
.ddConsBear { color: var(--loss); }

.ddMktTarget {
  font-size: 12px;
  color: #555;
  margin-left: 4px;
}

/* Modal: recent changes table */
.rmChangesTable {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.rmChangesTable tr {
  border-bottom: 1px solid #f5f5f5;
}

.rmChangesTable tr:last-child { border-bottom: none; }

.rmChDate  { color: #aaa; padding: 5px 8px 5px 0; white-space: nowrap; width: 90px; }
.rmChFirm  { color: #333; padding: 5px 8px; font-weight: 600; }
.rmChAction{ padding: 5px 8px; font-weight: 700; white-space: nowrap; }
.rmChGrade { color: #555; padding: 5px 0 5px 8px; }

/* Modal: news items */
.rmNewsItem {
  margin-bottom: 10px;
}

.rmNewsTitle {
  font-size: 12.5px;
  color: #222;
  line-height: 1.5;
}

.rmNewsMeta {
  font-size: 11px;
  color: #aaa;
  margin-top: 2px;
}

.rmNewsLink {
  color: #14153F;
  text-decoration: none;
  display: block;
}

.rmNewsLink:hover {
  text-decoration: underline;
  color: #2a2c6b;
}

/* ── Market Extras (评级动向 + 资讯) ────────────── */
.ddExtrasWrap {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 20px;
}

.ddExtrasCard {
  background: #fff;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 8px;
  padding: 18px 20px;
}

.ddExtrasTitle {
  font-size: 13px;
  font-weight: 700;
  color: #14153F;
  margin-bottom: 14px;
  padding-left: 9px;
  border-left: 3px solid #14153F;
}

.ddExtrasTable {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}

.ddExtrasTable thead tr {
  border-bottom: 1px solid #f0f0f0;
}

.ddExtrasTable th {
  font-size: 11px;
  color: #aaa;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 4px 8px 8px;
  text-align: left;
}

.ddExtrasTable tbody tr {
  border-bottom: 1px solid #fafafa;
}

.ddExtrasTable tbody tr:last-child { border-bottom: none; }

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

.ddNewsItem {}

.ddNewsItemTitle {
  font-size: 13px;
  color: #222;
  line-height: 1.5;
}

.ddNewsLink {
  color: #1A1A1A;
  text-decoration: none;
  display: block;
}

.ddNewsLink:visited {
  color: #1A1A1A;
}

.ddNewsLink:hover,
.ddNewsLink:focus-visible {
  color: #14153F;
  text-decoration: underline;
}

.ddNewsItemMeta {
  font-size: 11px;
  color: #aaa;
  margin-top: 2px;
}

.ddNewsMore {
  margin-top: 10px;
  flex-direction: column;
  gap: 10px;
}

.ddNewsToggleBtn {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 8px 0;
  background: #FDFDFB;
  border: 1px solid #14153F;
  border-radius: 4px;
  color: #14153F;
  font-family: Aptos, "Aptos Display", Arial, sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.ddNewsToggleBtn:hover {
  background: #14153F;
  color: #FDFDFB;
}

.ddNewsToggleBtn:focus-visible {
  outline: 2px solid #14153F;
  outline-offset: 1px;
}

/* ── Report Detail Modal ───────────────────────── */
.reportModalOverlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.reportModalBox {
  background: #fff;
  border-radius: 12px;
  width: 100%;
  max-width: 620px;
  max-height: 82vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 40px rgba(0,0,0,0.18);
  overflow: hidden;
}

.reportModalHeader {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  background: #14153F;
  padding: 20px 24px 16px;
  flex-shrink: 0;
}

.reportModalProvider {
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  letter-spacing: 1px;
}

.reportModalDate {
  font-size: 12px;
  color: rgba(255,255,255,0.55);
  margin-top: 4px;
}

.reportModalClose {
  background: none;
  border: none;
  color: rgba(255,255,255,0.6);
  font-size: 18px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  margin-top: 2px;
  transition: color 0.15s;
}

.reportModalClose:hover { color: #fff; }

.reportModalRatingRow {
  flex-shrink: 0;
}

.rmSnapRow {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 24px;
  background: #f9f9f9;
  border-bottom: 1px solid #eee;
}

.rmRatingBadge {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.5px;
  padding: 3px 9px;
  border: 1.5px solid currentColor;
  border-radius: 4px;
}

.rmRatingDir {
  font-size: 12px;
  font-weight: 600;
}

.rmTargetGroup {
  margin-left: auto;
  font-size: 12px;
  color: #777;
}

.rmTargetGroup strong {
  font-size: 13px;
  color: #111;
  font-weight: 700;
}

.reportModalBody {
  overflow-y: auto;
  padding: 18px 24px 24px;
  flex: 1;
}

.rmSection {
  margin-bottom: 18px;
}

.rmSection:last-child { margin-bottom: 0; }

.rmSectionTitle {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
  padding-left: 9px;
  border-left: 3px solid #14153F;
  line-height: 1.2;
}

.rmItem {
  display: flex;
  gap: 7px;
  margin-bottom: 8px;
  line-height: 1.55;
}

.rmItemDot {
  flex-shrink: 0;
  font-weight: 700;
  margin-top: 1px;
}

.rmItemText {
  font-size: 12px;
  color: #2a2a2a;
}

.rmEvidence {
  font-size: 10.5px;
  color: #bbb;
  margin-top: 2px;
}

.ddReportCard {
  cursor: pointer;
  transition: box-shadow 0.15s, transform 0.15s;
}

.ddReportCard:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.10);
  transform: translateY(-1px);
}

/* ── Ticker Tooltip ────────────────────────────── */
.morningTickerTooltip {
  display: none;
  position: fixed;
  z-index: 9999;
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.13);
  padding: 12px 16px;
  min-width: 200px;
  pointer-events: none;
}

.mtt-title {
  font-size: 13px;
  font-weight: 700;
  color: #14153F;
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}

.mtt-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 12px;
  padding: 3px 0;
  border-bottom: 1px solid #f3f4f6;
}

.mtt-row:last-child {
  border-bottom: none;
}

.mtt-label {
  color: #888;
}

.mtt-val {
  font-weight: 600;
  color: #111;
}

.mtt-loading {
  font-size: 12px;
  color: #aaa;
}
