:root {
  --bg: #111417;
  --panel: rgba(19, 27, 31, 0.92);
  --panel-strong: #182229;
  --panel-soft: rgba(232, 223, 208, 0.06);
  --border: rgba(234, 223, 209, 0.12);
  --text: #f2ede4;
  --muted: #bbaea0;
  --teal: #6dc3b1;
  --teal-deep: #285f58;
  --amber: #f1b763;
  --amber-deep: #6d4b1c;
  --rose: #f28a79;
  --rose-deep: #6f3128;
  --green: #92d3a2;
  --green-deep: #2f6942;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 999px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at top left, rgba(109, 195, 177, 0.18), transparent 24%),
    radial-gradient(circle at top right, rgba(241, 183, 99, 0.18), transparent 22%),
    linear-gradient(145deg, #0d1012, #151b1f 42%, #0f1417);
  color: var(--text);
  font-family: "Segoe UI Variable", "Microsoft YaHei UI", "PingFang SC", sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 30px 30px;
  pointer-events: none;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.48), transparent);
}

a {
  color: inherit;
}

button {
  border: 0;
  cursor: pointer;
  font: inherit;
}

.service-launcher-btn {
  position: fixed;
  right: 26px;
  bottom: 26px;
  z-index: 40;
  min-height: 54px;
  padding: 0 18px;
  border-radius: 18px;
  color: #16110c;
  background: linear-gradient(135deg, #f1c27b, #e8dfcf);
  font-weight: 700;
  box-shadow: 0 16px 30px rgba(241, 183, 99, 0.24);
}

.service-launcher-btn.is-running {
  color: #e7fbf5;
  background: linear-gradient(135deg, rgba(109, 195, 177, 0.92), rgba(40, 95, 88, 0.96));
}

.service-launcher-btn:hover {
  transform: translateY(-1px);
}

.shell {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 22px;
  min-height: 100vh;
  padding: 22px;
}

.sidebar,
.main {
  backdrop-filter: blur(18px);
}

.sidebar {
  position: sticky;
  top: 22px;
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 24px;
  background: linear-gradient(180deg, rgba(19, 27, 31, 0.95), rgba(11, 16, 19, 0.92));
  border: 1px solid var(--border);
  border-radius: 30px;
  box-shadow: var(--shadow);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand h1,
.topbar h2,
.hero h3,
.section-head h3,
.card-head h4,
.section-head h4 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(241, 183, 99, 0.18), rgba(109, 195, 177, 0.26));
  border: 1px solid rgba(241, 183, 99, 0.26);
  color: #f6cf9a;
  font-size: 22px;
  font-weight: 700;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.sidebar-block,
.card,
.detail-card,
.watch-card,
.report-card,
.hero,
.section-block {
  background: linear-gradient(180deg, rgba(28, 37, 43, 0.85), rgba(14, 20, 23, 0.92));
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
}

.sidebar-block {
  padding: 18px;
}

.sidebar-block.compact {
  gap: 12px;
}

.block-title,
.column-title {
  margin: 0 0 12px;
  color: #e6ddcf;
  font-size: 13px;
  font-weight: 700;
}

.micro-copy,
.hero-note,
.detail-summary,
.report-copy,
.stock-note,
.watch-card p,
.replace-row p {
  margin: 0;
  color: #d5cabd;
  line-height: 1.6;
}

.status-chip,
.badge,
.signal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 700;
}

.risk-high,
.badge.amber {
  background: rgba(241, 183, 99, 0.14);
  color: #f5cb8d;
  border: 1px solid rgba(241, 183, 99, 0.26);
}

.badge.teal,
.signal.up {
  background: rgba(109, 195, 177, 0.14);
  color: #8fe1d0;
  border: 1px solid rgba(109, 195, 177, 0.24);
}

.badge.rose,
.signal.down {
  background: rgba(242, 138, 121, 0.14);
  color: #f6a394;
  border: 1px solid rgba(242, 138, 121, 0.24);
}

.badge.green {
  background: rgba(146, 211, 162, 0.12);
  color: #afe8bc;
  border: 1px solid rgba(146, 211, 162, 0.22);
}

.badge.slate,
.signal.wait {
  background: rgba(255, 255, 255, 0.06);
  color: #d8d1c8;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

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

.nav-pill {
  padding: 14px 16px;
  color: #d8d0c4;
  text-align: left;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid transparent;
  border-radius: 16px;
  transition: 0.2s ease;
}

.nav-pill:hover,
.nav-pill.is-active {
  background: linear-gradient(145deg, rgba(109, 195, 177, 0.12), rgba(241, 183, 99, 0.08));
  border-color: rgba(109, 195, 177, 0.22);
  color: #fff5e6;
}

.share-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 10px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 16px;
}

.share-card span {
  color: var(--muted);
  font-size: 12px;
}

.main {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 22px;
  background: rgba(12, 17, 20, 0.6);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
}

.topbar-actions,
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.topbar-actions {
  justify-content: flex-end;
}

.ghost-btn,
.primary-btn,
.text-link {
  min-height: 42px;
  padding: 0 16px;
  border-radius: 14px;
}

.ghost-btn {
  color: #ede4d8;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.04));
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.primary-btn {
  color: #16110c;
  background: linear-gradient(135deg, #f1c27b, #e8dfcf);
  font-weight: 700;
  box-shadow: 0 10px 24px rgba(241, 183, 99, 0.18);
}

.text-link {
  padding: 0;
  color: #90d9cb;
  background: transparent;
}

.ghost-btn:hover,
.primary-btn:hover,
.text-link:hover {
  transform: translateY(-1px);
}

.topbar-actions .ghost-btn,
.topbar-actions .primary-btn {
  min-height: 48px;
  padding: 0 18px;
  font-weight: 700;
  border-radius: 16px;
}

.static-chip {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 14px;
  color: #bfb5a7;
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed rgba(255, 255, 255, 0.16);
  cursor: default;
}

.static-chip.teal {
  color: #8ecfbe;
  border-color: rgba(109, 195, 177, 0.2);
}

.static-toolbar {
  align-items: center;
}

.tab-panel {
  display: none;
  flex-direction: column;
  gap: 22px;
}

.tab-panel.is-active {
  display: flex;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(260px, 0.9fr);
  gap: 18px;
  padding: 26px;
  overflow: hidden;
  position: relative;
}

.hero::after {
  content: "";
  position: absolute;
  width: 260px;
  height: 260px;
  right: -60px;
  top: -70px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(109, 195, 177, 0.22), transparent 70%);
}

.hero-copy {
  position: relative;
  z-index: 1;
}

.hero h3 {
  margin-bottom: 12px;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
}

.hero-stats {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 14px;
}

.hero-stat {
  padding: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 18px;
}

.hero-stat span,
.market-chip span,
.detail-meta span,
.price-strip span,
.watch-metrics span {
  color: var(--muted);
  font-size: 12px;
}

.hero-stat strong,
.market-chip strong {
  display: block;
  margin-top: 8px;
  font-size: 26px;
  font-weight: 700;
}

.loss,
.down {
  color: #f19d8f;
}

.up {
  color: #94e1c0;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 18px;
}

.dashboard-grid > .card:nth-child(1) { grid-column: span 5; }
.dashboard-grid > .card:nth-child(2) { grid-column: span 4; }
.dashboard-grid > .card:nth-child(3) { grid-column: span 3; }
.dashboard-grid > .card:nth-child(4) { grid-column: span 12; }

.card,
.detail-card,
.watch-card,
.report-card,
.section-block {
  padding: 22px;
}

.card-head,
.section-head,
.detail-head,
.watch-top,
.report-header,
.stock-top {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.thermo {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 18px;
  margin-top: 18px;
}

.thermo-ring {
  display: grid;
  place-items: center;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, #172126 50%, transparent 51%),
    conic-gradient(from 230deg, #f1b763 0 72%, rgba(255, 255, 255, 0.07) 72% 100%);
  border: 1px solid rgba(241, 183, 99, 0.22);
}

.thermo-core {
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: #0d1316;
  font-size: 28px;
  font-weight: 700;
}

.plain-list,
.source-list,
.stack-list {
  margin: 0;
  padding-left: 18px;
  color: #ddd3c7;
  line-height: 1.7;
}

.stack-list li {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.stack-list strong {
  color: #efe5d8;
}

.stack-list strong a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.22);
}

.stack-list em {
  color: #9fd8cb;
  font-style: normal;
  font-size: 12px;
}

.stack-list span {
  color: var(--muted);
}

.priority-columns,
.detail-columns,
.report-layout,
.weekly-grid,
.watch-grid {
  display: grid;
  gap: 18px;
}

.priority-columns {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 18px;
}

.detail-columns.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.rank-list {
  margin: 0;
  padding-left: 22px;
}

.rank-list li {
  margin-bottom: 10px;
  color: #e6ddd1;
}

.rank-list li span {
  display: block;
  color: var(--muted);
  margin-top: 4px;
}

.market-grid {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.market-chip,
.mini-card,
.service-card {
  padding: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 16px;
}

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

.service-card span {
  color: #efe6da;
  font-size: 13px;
  font-weight: 700;
}

.service-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.mail-preview {
  margin-top: 16px;
}

.mail-subject {
  margin: 0 0 14px;
  color: #fff1dc;
  font-weight: 700;
}

.section-block {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.stock-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.stock-card {
  padding: 18px;
  border-radius: 22px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(20, 28, 32, 0.98), rgba(10, 15, 18, 0.92));
}

.stock-card.strong {
  box-shadow: inset 0 0 0 1px rgba(109, 195, 177, 0.18);
}

.stock-card.weak {
  box-shadow: inset 0 0 0 1px rgba(242, 138, 121, 0.18);
}

.stock-card.neutral {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.stock-top h5,
.watch-top h4,
.detail-head h4,
.report-header h4 {
  margin: 0;
  font-size: 22px;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 600;
}

.stock-top p,
.watch-top p,
.phone-title {
  margin: 6px 0 0;
  color: var(--muted);
}

.price-strip,
.detail-meta,
.watch-metrics,
.phone-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.price-strip span,
.detail-meta span,
.watch-metrics span {
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  border: 1px solid var(--border);
}

.dual {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.replace-list {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.replace-row {
  padding: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 18px;
}

.replace-row strong,
.replace-row span {
  display: block;
}

.replace-row span {
  margin: 6px 0 10px;
  color: #9fe0d4;
}

.phone-preview {
  display: grid;
  place-items: center;
  min-height: 100%;
  margin-top: 12px;
}

.phone-frame {
  width: 240px;
  padding: 14px;
  border-radius: 32px;
  background: linear-gradient(180deg, #07090a, #12191d);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.phone-screen {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 420px;
  padding: 20px 16px;
  border-radius: 24px;
  background:
    radial-gradient(circle at top right, rgba(241, 183, 99, 0.18), transparent 30%),
    linear-gradient(180deg, #10181d, #182127);
}

.mini-card strong {
  display: block;
  margin-bottom: 8px;
}

.detail-grid {
  display: grid;
  gap: 18px;
}

.detail-columns,
.report-layout,
.weekly-grid,
.watch-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.source-list {
  list-style: none;
  padding-left: 0;
}

.source-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.source-list a {
  color: #eee5d8;
  text-decoration: none;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.2);
}

.watch-card,
.detail-card,
.report-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.notice-strip {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  background: rgba(241, 183, 99, 0.08);
  border: 1px solid rgba(241, 183, 99, 0.18);
  border-radius: 18px;
  color: #f2e7d8;
}

.notice-strip span {
  color: #dbcdbd;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.form-card {
  gap: 18px;
}

.data-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.data-form label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: #efe5d9;
  font-size: 14px;
}

.data-form label span {
  color: #d5cabd;
}

.data-form input,
.data-form textarea,
.data-form select {
  width: 100%;
  min-height: 46px;
  padding: 12px 14px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  outline: none;
}

.data-form textarea {
  min-height: 100px;
  resize: vertical;
}

.data-form input:focus,
.data-form textarea:focus,
.data-form select:focus {
  border-color: rgba(109, 195, 177, 0.4);
  box-shadow: 0 0 0 4px rgba(109, 195, 177, 0.08);
}

.field-row {
  display: grid;
  gap: 12px;
}

.field-row.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.field-row.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.checkbox-row {
  flex-direction: row !important;
  align-items: center;
}

.checkbox-row input {
  width: 18px;
  min-height: 18px;
  padding: 0;
}

.form-actions {
  display: flex;
  justify-content: flex-start;
}

.records-list {
  display: grid;
  gap: 12px;
}

.record-card {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 16px;
}

.record-card strong {
  display: block;
  margin-bottom: 8px;
}

.record-card p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.danger-btn {
  color: #f4a99a;
}

.empty-state {
  margin: 0;
  padding: 14px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: 16px;
}

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

  .sidebar {
    position: static;
  }

  .dashboard-grid,
  .stock-grid,
  .dual,
  .form-grid,
  .service-grid,
  .detail-columns,
  .report-layout,
  .weekly-grid,
  .watch-grid,
  .priority-columns {
    grid-template-columns: 1fr;
  }

  .dashboard-grid > .card:nth-child(1),
  .dashboard-grid > .card:nth-child(2),
  .dashboard-grid > .card:nth-child(3),
  .dashboard-grid > .card:nth-child(4) {
    grid-column: span 12;
  }

  .hero,
  .thermo {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .shell {
    padding: 14px;
    gap: 14px;
  }

  .sidebar,
  .topbar,
  .card,
  .detail-card,
  .report-card,
  .section-block,
  .hero {
    border-radius: 24px;
  }

  .topbar,
  .section-head,
  .card-head,
  .detail-head,
  .report-header,
  .stock-top,
  .watch-top {
    flex-direction: column;
  }

  .topbar-actions,
  .toolbar {
    width: 100%;
  }

  .ghost-btn,
  .primary-btn {
    flex: 1 1 auto;
  }

  .service-launcher-btn {
    right: 18px;
    bottom: 18px;
    left: 18px;
  }

  .stock-grid {
    grid-template-columns: 1fr;
  }

  .field-row.two,
  .field-row.three,
  .record-card,
  .notice-strip {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .hero h3 {
    font-size: 28px;
  }
}
