:root {
  --bg: #060606;
  --panel: #11100e;
  --panel-2: #171512;
  --panel-3: #1f1b14;
  --line: rgba(214, 173, 84, 0.22);
  --line-strong: rgba(244, 210, 125, 0.42);
  --text: #f5f1e7;
  --muted: #a8a099;
  --soft: #d8d0c3;
  --green: #22d38b;
  --red: #ff5c72;
  --amber: #f4d27d;
  --cyan: #d7b56d;
  --blue: #c9c1b1;
  --gold: #d7b56d;
  --gold-bright: #f4d27d;
  --gold-deep: #9d742e;
  --gold-soft: rgba(215, 181, 109, 0.13);
  --mist: rgba(244, 210, 125, 0.08);
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.36);
}
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 20% 7%, rgba(244, 210, 125, 0.08), transparent 34%),
    radial-gradient(circle at 82% 16%, rgba(157, 116, 46, 0.08), transparent 30%),
    linear-gradient(180deg, #080808 0%, var(--bg) 48%, #050505 100%);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans TC", sans-serif;
  letter-spacing: 0;
}

button,
input,
select {
  font: inherit;
}

.app-shell {
  display: grid;
  grid-template-columns: 292px minmax(0, 1fr);
  min-height: 100vh;
}

.hero-banner {
  min-height: clamp(340px, 42vw, 620px);
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(6, 6, 6, 0.1), rgba(6, 6, 6, 0) 35%, rgba(6, 6, 6, 0.16)),
    url("assets/ethan543-hero-background-black-gold.jpg") center / cover no-repeat;
  box-shadow:
    inset 0 -110px 90px rgba(6, 6, 6, 0.34),
    0 26px 70px rgba(0, 0, 0, 0.34);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 22px;
  border-right: 1px solid var(--line);
  background:
    radial-gradient(circle at 38% 4%, rgba(244, 210, 125, 0.12), transparent 32%),
    linear-gradient(180deg, #080808 0%, #0c0b09 56%, #070707 100%);
  overflow: auto;
}

.brand {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 28px;
}

.brand-mark {
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 84px;
  height: 84px;
  border-radius: 8px;
  background: radial-gradient(circle at 50% 48%, rgba(244, 210, 125, 0.16), transparent 62%);
  overflow: visible;
}

.brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 12px 22px rgba(244, 210, 125, 0.16));
}

.eyebrow,
.status-label {
  margin: 0 0 5px;
  color: var(--gold-bright);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 18px;
  line-height: 1.25;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(26px, 3vw, 42px);
  line-height: 1.08;
}

h3 {
  margin-bottom: 6px;
  font-size: 18px;
}

.category-list {
  display: grid;
  gap: 8px;
}

.category-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--soft);
  cursor: pointer;
}

.category-button:hover,
.category-button.active {
  border-color: var(--line-strong);
  background: rgba(244, 210, 125, 0.09);
  color: var(--text);
}

.category-button span:last-child {
  color: var(--muted);
  font-size: 13px;
}

.data-status {
  margin-top: 24px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.018), transparent 42%), var(--panel);
}

.data-status strong,
.data-status span {
  display: block;
}

.data-status span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.data-status p:last-child {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.dashboard {
  min-width: 0;
  padding: 28px;
}

.topbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.topbar-actions {
  display: flex;
  align-items: end;
  gap: 10px;
}

.search-box {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

input,
select {
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0d0c0b;
  color: var(--text);
}

input {
  width: min(340px, 38vw);
  padding: 0 13px;
}

select {
  padding: 0 12px;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.summary-tile,
.market-table-wrap,
.detail-panel,
.calendar-panel,
.event-panel,
.roadmap-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    radial-gradient(circle at 18% 0%, rgba(244, 210, 125, 0.045), transparent 42%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.018), transparent 42%),
    var(--panel);
  box-shadow: var(--shadow);
}

.summary-tile {
  min-height: 110px;
  padding: 16px;
}

.summary-tile span,
.summary-tile small {
  display: block;
  color: var(--muted);
}

.summary-tile strong {
  display: block;
  margin: 10px 0 6px;
  font-size: 24px;
}

.workbench {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.75fr);
  gap: 16px;
}

.workbench > *,
.lower-grid > * {
  min-width: 0;
}

.market-table-wrap {
  scroll-margin-top: 14px;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 18px 12px;
}

.section-heading.compact {
  padding-bottom: 6px;
}

.section-heading p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.45;
}

.current-category-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  margin-top: 10px;
  padding: 0 10px;
  border: 1px solid rgba(244, 210, 125, 0.28);
  border-radius: 6px;
  background: rgba(244, 210, 125, 0.09);
  color: var(--gold);
  font-size: 13px;
  font-weight: 800;
}

.legend {
  display: flex;
  gap: 12px;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 6px;
  border-radius: 50%;
}

.dot.strong {
  background: var(--green);
}

.dot.neutral {
  background: var(--amber);
}

.dot.weak {
  background: var(--red);
}

.table-scroll {
  overflow: auto;
}

.market-table {
  width: 100%;
  min-width: 850px;
  border-collapse: collapse;
}

th,
td {
  padding: 12px 14px;
  border-top: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

tbody tr {
  cursor: pointer;
}

tbody tr:hover,
tbody tr.active {
  background: rgba(244, 210, 125, 0.075);
}

.symbol-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.symbol-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #211b10;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.symbol-name {
  color: var(--muted);
  font-size: 12px;
}

.positive {
  color: var(--green);
}

.negative {
  color: var(--red);
}

.neutral-text {
  color: var(--amber);
}

.score-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 54px;
  height: 26px;
  border-radius: 6px;
  color: #111;
  font-weight: 800;
}

.score-strong {
  background: var(--green);
}

.score-mid {
  background: var(--amber);
}

.score-weak {
  background: var(--red);
  color: #fff;
}

.spark {
  width: 100px;
  height: 30px;
}

.detail-content {
  padding: 6px 18px 18px;
}

.detail-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.gauge-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 10px 0 16px;
}

.gauge-card {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0d0c0b;
}

.gauge-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.gauge-label span {
  color: var(--soft);
  font-size: 13px;
  font-weight: 800;
}

.gauge-label strong {
  color: var(--muted);
  font-size: 12px;
}

.gauge {
  width: 100%;
  height: auto;
  display: block;
}

.gauge-track {
  fill: none;
  stroke-linecap: round;
  stroke-width: 11;
}

.gauge-weak {
  stroke: rgba(255, 79, 103, 0.72);
}

.gauge-mid {
  stroke: rgba(255, 216, 117, 0.76);
}

.gauge-strong {
  stroke: rgba(246, 200, 95, 0.78);
}

.gauge-ticks line {
  stroke: rgba(245, 241, 231, 0.52);
  stroke-linecap: round;
  stroke-width: 2;
}

.gauge-glow {
  fill: none;
  opacity: 0.18;
  stroke-linecap: round;
  stroke-width: 16;
}

.gauge-needle {
  stroke-linecap: round;
  stroke-width: 5;
  filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.22));
}

.gauge-hub {
  fill: #f5f1e7;
  stroke: #060606;
  stroke-width: 3;
}

.gauge text {
  fill: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.gauge-readout {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 6px;
  min-height: 32px;
  margin-top: 4px;
}

.gauge-readout strong {
  font-size: 24px;
  line-height: 1;
}

.gauge-readout span {
  color: var(--soft);
  font-size: 12px;
  font-weight: 800;
}

.metric {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(244, 210, 125, 0.035), transparent 48%), var(--panel-2);
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.metric strong {
  display: block;
  margin-top: 6px;
  font-size: 20px;
}

.detail-note {
  margin: 14px 0 0;
  color: var(--soft);
  line-height: 1.65;
}

.lower-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
  margin-top: 16px;
}

.calendar-list,
.event-list {
  display: grid;
  gap: 10px;
  padding: 0 18px 18px;
}

.calendar-item,
.event-item {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(244, 210, 125, 0.035), transparent 48%), var(--panel-2);
}

.item-topline {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.badge {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 8px;
  border-radius: 6px;
  background: #211b10;
  color: var(--soft);
  font-size: 12px;
  font-weight: 700;
}

.badge.high {
  background: rgba(255, 79, 103, 0.16);
  color: #ff8b9a;
}

.badge.medium {
  background: var(--gold-soft);
  color: #ffe09a;
}

.calendar-item p,
.event-item p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.55;
}

.roadmap-panel {
  margin-top: 16px;
}

.roadmap {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  padding: 0 18px 18px;
}

.roadmap div {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(244, 210, 125, 0.035), transparent 48%), var(--panel-2);
}

.roadmap strong {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--gold);
  color: #111;
}

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

  .hero-banner {
    min-height: clamp(300px, 54vw, 520px);
    background-position: 52% center;
  }

  .sidebar {
    position: static;
    height: auto;
  }

  .category-list,
  .summary-grid,
  .roadmap {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .workbench,
  .lower-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .brand-mark {
    width: 72px;
    height: 72px;
  }

  .hero-banner {
    min-height: clamp(230px, 68vw, 340px);
    background-size: cover;
    background-position: 50% center;
    box-shadow:
      inset 0 -70px 62px rgba(6, 6, 6, 0.42),
      0 18px 46px rgba(0, 0, 0, 0.34);
  }

  .dashboard,
  .sidebar {
    padding: 18px;
  }

  .market-table-wrap {
    scroll-margin-top: 18px;
  }

  .topbar,
  .topbar-actions,
  .section-heading,
  .item-topline {
    align-items: stretch;
    flex-direction: column;
  }

  input,
  select {
    width: 100%;
  }

  .category-list,
  .summary-grid,
  .roadmap,
  .gauge-grid,
  .detail-metrics {
    grid-template-columns: 1fr;
  }
}
