:root {
  --bg: #eef4fb;
  --panel: #ffffff;
  --panel-soft: #f5f8fe;
  --panel-strong: #e8eef9;
  --ink: #111827;
  --muted: #5f6b7a;
  --line: rgba(17, 24, 39, 0.1);
  --glow: rgba(59, 130, 246, 0.18);
  --good: #12946b;
  --bad: #d1435b;
  --warn: #d97706;
  --teal: #3b82f6;
  --amber: #93c5fd;
  --shadow: 0 22px 60px rgba(41, 66, 117, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(59, 130, 246, 0.18), transparent 22%),
    radial-gradient(circle at top right, rgba(147, 197, 253, 0.28), transparent 20%),
    linear-gradient(180deg, #f7faff 0%, #eef3fb 58%, #e8eef8 100%);
}

strong,
h1,
h2,
h3,
h4,
p {
  margin: 0;
}

.terminal-shell {
  max-width: 2200px;
  margin: 0 auto;
  padding: 28px 24px 56px;
}

.app-topbar {
  display: grid;
  grid-template-columns: auto auto 1fr;
  align-items: center;
  gap: 18px;
  padding: 14px 18px;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.topbar-brand,
.topbar-status,
.topbar-nav {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar-logo {
  width: 128px;
  height: auto;
  display: block;
}

.topbar-brand-copy strong,
.topbar-brand-copy small {
  display: block;
}

.topbar-brand-copy small {
  color: var(--muted);
  margin-top: 3px;
}

.topbar-nav {
  flex-wrap: wrap;
}

.topbar-chip {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.78);
  color: var(--muted);
  border-radius: 999px;
  padding: 10px 14px;
  font: inherit;
  cursor: default;
}

.topbar-chip.active {
  color: var(--ink);
  background: rgba(59, 130, 246, 0.12);
  border-color: rgba(59, 130, 246, 0.24);
}

.topbar-status {
  justify-content: flex-end;
  flex-wrap: wrap;
}

.search-shell {
  min-width: 300px;
  padding: 12px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.72);
}

.workspace-shell {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.signal-rail {
  display: grid;
  gap: 16px;
  position: sticky;
  top: 20px;
}

.rail-card {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(242, 247, 255, 0.94));
  box-shadow: var(--shadow);
  overflow: hidden;
}

.rail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.rail-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.rail-list li {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}

.rail-list li:last-child {
  border-bottom: 0;
}

.rail-list strong,
.rail-list small,
.rail-value span,
.rail-value small {
  display: block;
}

.rail-value {
  text-align: right;
  white-space: nowrap;
}

.empty-rail {
  color: var(--muted);
}

.market-stage {
  min-width: 0;
}

.hero-shell,
.summary-card,
.stream-panel,
.table-panel,
.ops-panel {
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.hero-shell {
  display: grid;
  grid-template-columns: 1.8fr 0.9fr;
  gap: 22px;
  padding: 28px;
  background:
    radial-gradient(circle at right top, rgba(59, 130, 246, 0.08), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(241, 246, 255, 0.98));
  border-radius: 28px;
  position: relative;
  overflow: hidden;
}

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

.brand-logo {
  width: 280px;
  max-width: 40vw;
  height: auto;
  filter: drop-shadow(0 12px 20px rgba(59, 130, 246, 0.16));
}

.brand-copy {
  min-width: 0;
  position: relative;
  z-index: 1;
}

.hero-watermark {
  position: absolute;
  top: 16px;
  left: 190px;
  font-size: clamp(5rem, 12vw, 8rem);
  font-weight: 800;
  letter-spacing: -0.08em;
  color: rgba(59, 130, 246, 0.07);
  pointer-events: none;
}

.section-kicker {
  color: var(--teal);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.76rem;
  margin-bottom: 8px;
}

h1 {
  font-size: clamp(2.4rem, 6vw, 4.9rem);
  line-height: 0.95;
  letter-spacing: -0.05em;
}

.hero-copy {
  margin-top: 14px;
  max-width: 60ch;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.6;
  position: relative;
  z-index: 1;
}

.login-shell {
  min-height: 68vh;
  align-items: center;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.hero-meta span,
.pill,
.tab,
.coin-chip,
.interval-pill,
.live-pill,
.trade-pill,
.health-pill {
  border-radius: 999px;
  border: 1px solid var(--line);
}

.hero-meta span,
.pill,
.tab,
.interval-pill {
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  font-size: 0.84rem;
}

.hero-goal-card {
  display: grid;
  place-items: center;
  gap: 16px;
  padding: 18px;
  background: linear-gradient(180deg, rgba(245, 249, 255, 0.98), rgba(231, 239, 252, 0.98));
  border-radius: 24px;
}

.goal-ring {
  --goal-progress: 0%;
  width: 220px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, rgba(255, 255, 255, 0.98) 58%, transparent 59%),
    conic-gradient(var(--teal) 0 var(--goal-progress), rgba(15, 23, 42, 0.1) var(--goal-progress) 100%);
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.06), 0 0 35px rgba(59, 130, 246, 0.12);
}

.goal-ring-inner {
  display: grid;
  place-items: center;
  width: 72%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 1) 0%, rgba(242, 247, 251, 1) 100%);
  text-align: center;
}

.goal-label {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
}

.goal-ring-inner strong {
  font-size: 2rem;
  margin-top: 4px;
}

.goal-ring-inner small,
.goal-copy p,
.market-expiry,
.mini-list small,
.status-list small,
.decision-card small,
.empty-state,
.empty-row,
td small {
  color: var(--muted);
}

.goal-copy {
  text-align: center;
  max-width: 28ch;
}

.login-card {
  width: 100%;
}

.login-form {
  width: min(100%, 360px);
  display: grid;
  gap: 12px;
}

.login-form label {
  font-size: 0.84rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.login-form input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  padding: 14px 16px;
  font: inherit;
}

.login-form input:focus {
  outline: 2px solid rgba(14, 165, 233, 0.28);
  border-color: rgba(14, 165, 233, 0.42);
}

.login-button {
  border: 0;
  border-radius: 16px;
  padding: 14px 16px;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  color: white;
  background: linear-gradient(90deg, #111827, #3b82f6);
  box-shadow: 0 10px 24px rgba(59, 130, 246, 0.18);
}

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

.ticker-strip-shell {
  margin-top: 18px;
}

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

.ticker-pill,
.overview-card {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(242, 247, 255, 0.98));
  box-shadow: var(--shadow);
}

.ticker-pill {
  padding: 14px;
  border-radius: 18px;
}

.ticker-top {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.venue-badge,
.ticker-interval {
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.72rem;
}

.ticker-pill strong {
  display: block;
  font-size: 1.15rem;
  margin-bottom: 6px;
}

.ticker-pill small {
  display: block;
  color: var(--muted);
  line-height: 1.35;
}

.summary-card {
  background: linear-gradient(180deg, var(--panel), var(--panel-soft));
  border-radius: 22px;
  padding: 18px;
}

.summary-card.standout {
  background: linear-gradient(180deg, rgba(234, 244, 255, 0.98), rgba(248, 251, 255, 0.98));
}

.summary-card span {
  color: var(--muted);
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.74rem;
}

.summary-card strong {
  display: block;
  margin-top: 12px;
  font-size: 2rem;
}

.summary-card small {
  display: block;
  margin-top: 10px;
  font-size: 0.85rem;
}

.stream-tabs,
.portfolio-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.stream-tabs {
  margin-top: 18px;
}

.tab.active {
  border-color: rgba(59, 130, 246, 0.3);
  color: var(--ink);
  background: rgba(59, 130, 246, 0.09);
}

button.tab {
  cursor: pointer;
  font: inherit;
}

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

.stream-panel,
.table-panel,
.ops-panel {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(243, 247, 255, 0.98));
  border-radius: 24px;
  padding: 24px;
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
}

.panel-title-row,
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
}

.panel-title-row p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.92rem;
}

.section-copy {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.95rem;
}

.stream-overview-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.overview-card {
  border-radius: 18px;
  padding: 16px;
}

.overview-card span {
  display: block;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
}

.overview-card strong {
  display: block;
  margin-top: 10px;
  font-size: 2rem;
}

.overview-card small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
}

.subhead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 8px 0 14px;
}

.subhead span {
  color: var(--muted);
  font-size: 0.84rem;
}

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

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

.market-card {
  padding: 18px;
  border-radius: 20px;
  border: 1px solid rgba(15, 23, 42, 0.09);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(243, 248, 255, 0.98));
}

.market-card.compact {
  padding: 14px 16px;
}

.market-card-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}

.market-card h4 {
  margin-top: 10px;
  font-size: 1rem;
  line-height: 1.35;
}

.coin-chip {
  display: inline-flex;
  padding: 6px 10px;
  background: rgba(59, 130, 246, 0.1);
  font-size: 0.76rem;
  color: #2563eb;
}

.live-pill {
  padding: 6px 10px;
  background: rgba(255, 107, 122, 0.08);
  border: 1px solid rgba(220, 63, 99, 0.18);
  color: var(--bad);
  font-size: 0.76rem;
  text-transform: uppercase;
}

.interval-pill {
  color: var(--teal);
}

.market-expiry {
  margin: 12px 0 16px;
  font-size: 0.88rem;
}

.market-subtitle {
  margin: -6px 0 12px;
  color: var(--muted);
  font-size: 0.86rem;
}

.ladder-row {
  display: grid;
  grid-template-columns: 68px 1fr 56px;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}

.ladder-row span,
.market-stats,
.mini-stats {
  font-size: 0.86rem;
}

.ladder-row strong {
  display: block;
  margin-top: 3px;
}

.ladder-bar {
  height: 5px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.08);
}

.ladder-yes,
.ladder-no {
  height: 100%;
  border-radius: inherit;
}

.ladder-yes {
  background: linear-gradient(90deg, rgba(85, 227, 155, 0.35), var(--good));
}

.ladder-no {
  background: linear-gradient(90deg, rgba(59, 130, 246, 0.25), #4f70ff);
}

.market-stats,
.mini-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
  color: var(--muted);
}

.todo-list,
.status-list,
.mini-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.placeholder-grid,
.all-streams-grid,
.placeholder-lower-grid {
  display: grid;
  gap: 16px;
}

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

.sports-detail-grid {
  margin-top: 18px;
}

.all-streams-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 16px;
}

.placeholder-lower-grid {
  grid-template-columns: 1fr 1fr;
  margin-top: 18px;
}

.placeholder-card,
.mini-stream {
  padding: 16px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.82);
}

.placeholder-card h3,
.mini-stream h3 {
  margin-bottom: 10px;
}

.mini-stream small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
}

.todo-list li,
.status-list li,
.mini-list li {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.todo-list li:last-child,
.status-list li:last-child,
.mini-list li:last-child {
  border-bottom: 0;
}

.portfolio-shell,
.secondary-grid,
.ops-grid {
  margin-top: 22px;
}

.portfolio-topline {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.portfolio-metric {
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(242, 247, 255, 0.96));
}

.portfolio-metric span {
  display: block;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
}

.portfolio-metric strong {
  display: block;
  margin-top: 10px;
  font-size: 1.9rem;
}

.portfolio-metric small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
}

.table-wrap {
  overflow-x: auto;
}

.compact-table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1100px;
}

.portfolio-table {
  min-width: 1650px;
}

.compact-table {
  min-width: 720px;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 12px 10px;
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.74rem;
}

td {
  font-size: 0.92rem;
}

td strong {
  display: block;
}

td small {
  display: block;
  margin-top: 4px;
}

.market-cell {
  min-width: 260px;
}

.market-cell-top {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.empty-row {
  text-align: center;
  padding: 24px;
}

.secondary-grid {
  display: block;
}

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

.trade-pill,
.health-pill,
.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.positive,
.trade-pill.positive,
.status-pill.positive,
.health-good {
  color: var(--good);
}

.negative,
.trade-pill.negative,
.status-pill.negative,
.health-bad {
  color: var(--bad);
}

.trade-pill.positive,
.status-pill.positive,
.health-good {
  background: rgba(15, 159, 110, 0.1);
}

.trade-pill.negative,
.status-pill.negative,
.health-bad {
  background: rgba(220, 63, 99, 0.1);
}

.decision-stack {
  display: grid;
  gap: 12px;
}

.decision-card {
  padding: 14px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.86);
}

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

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

.mini-list li {
  display: grid;
  gap: 4px;
}

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

  .signal-rail {
    position: static;
  }

  .streams-grid,
  .ops-grid,
  .secondary-grid,
  .summary-grid,
  .ticker-strip,
  .stream-overview-grid,
  .hero-shell,
  .all-streams-grid,
  .placeholder-grid,
  .placeholder-lower-grid,
  .portfolio-topline {
    grid-template-columns: 1fr;
  }

  .market-card-grid,
  .hourly-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .brand-lockup {
    flex-direction: column;
    align-items: flex-start;
  }

  .brand-logo {
    width: 180px;
    max-width: 100%;
  }

  .hero-watermark {
    left: auto;
    right: 16px;
    font-size: 4rem;
  }

  .search-shell {
    min-width: 100%;
  }
}
