:root {
  --bg: #f7fbff;
  --surface: rgba(255, 255, 255, 0.86);
  --surface-strong: #ffffff;
  --blue: #3f86f7;
  --blue-soft: #eaf3ff;
  --blue-line: #cfe0fb;
  --navy: #132a5d;
  --ink: #17254d;
  --muted: #6f7fa8;
  --yellow: #f7c95a;
  --yellow-soft: #fff2ca;
  --mint: #53c9b5;
  --line: rgba(88, 119, 173, 0.18);
  --shadow: 0 20px 60px rgba(65, 104, 168, 0.12);
  --soft-shadow: 0 10px 28px rgba(54, 86, 137, 0.08);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    linear-gradient(110deg, rgba(255, 246, 218, 0.72), transparent 32%),
    linear-gradient(180deg, #fbfdff 0%, #eef7ff 100%);
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 28px 22px 22px;
  background: rgba(255, 255, 255, 0.72);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.brand-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.brand-row h1 {
  margin: 0;
  font-family: "Virgil", "Segoe Print", "Bradley Hand", "Comic Sans MS", cursive;
  font-size: 2.08rem;
  font-weight: 600;
  letter-spacing: 0;
  transform: rotate(-1deg);
}

.brand-row h1 span {
  color: #8fc4ff;
}

.brand-row h1 em {
  color: #f4cd67;
  font-style: normal;
  margin-left: 1px;
}

.brand-mark {
  width: 34px;
  height: 28px;
  margin-top: 4px;
  position: relative;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(143, 196, 255, 0.22), rgba(244, 205, 103, 0.24));
}

.brand-mark::before,
.brand-mark::after,
.brand-mark i {
  content: "";
  position: absolute;
  left: 8px;
  width: 20px;
  height: 4px;
  border-radius: 999px;
  background: #8fc4ff;
}

.brand-mark::before {
  top: 7px;
  transform: rotate(-18deg);
}

.brand-mark i {
  top: 12px;
  background: #f4cd67;
  transform: rotate(10deg);
}

.brand-mark::after {
  top: 17px;
  transform: rotate(-18deg);
}

.brand-block p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.side-nav {
  display: grid;
  gap: 9px;
}

.side-nav a {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: #31446f;
  text-decoration: none;
  font-size: 0.93rem;
}

.side-nav a span {
  color: var(--blue);
  width: 20px;
  text-align: center;
}

.side-nav a.active,
.side-nav a:hover {
  background: linear-gradient(180deg, #f6fbff, #edf5ff);
  border-color: var(--blue-line);
  color: #1d5fc8;
}

.hero-sun {
  position: absolute;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ffe8a5, var(--yellow));
}

.sidebar-status {
  margin-top: auto;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.76);
}

.sidebar-status span {
  width: 8px;
  height: 8px;
  margin-top: 6px;
  border-radius: 999px;
  background: #5ad0a5;
}

.sidebar-status p {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

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

.topbar {
  min-height: 66px;
  padding: 0 30px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.7);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.top-tabs {
  display: flex;
  height: 66px;
}

.top-tabs button {
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: #1f2d56;
  padding: 0;
}

.top-tabs button.active {
  color: var(--blue);
  border-bottom-color: var(--blue);
  font-weight: 700;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ticker-switch {
  display: flex;
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--blue-line);
  border-radius: 999px;
  background: #f6fbff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.88);
}

.ticker-option {
  min-width: 58px;
  min-height: 30px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: #253968;
  font-size: 0.82rem;
  font-weight: 700;
}

.ticker-option.active {
  border-color: var(--blue);
  background: #ffffff;
  box-shadow: 0 6px 18px rgba(63, 134, 247, 0.14);
  color: #1d5fc8;
}

.update-pill {
  display: flex;
  align-items: center;
  min-height: 38px;
  padding: 0 16px;
  border-radius: 9px;
  border: 1px solid #f1dca5;
  background: #fff9ea;
  color: #8d6812;
  font-size: 0.84rem;
}

.hero-panel {
  position: relative;
  min-height: 176px;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(620px, 0.72fr) minmax(260px, 0.28fr);
  align-items: stretch;
  background: linear-gradient(90deg, #ffffff 0%, #f9fcff 45%, #eef8ff 100%);
}

.hero-copy {
  position: relative;
  z-index: 2;
  padding: 28px 30px;
}

.eyebrow {
  margin: 0 0 8px;
  color: #447bd7;
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0;
}

.hero-copy blockquote {
  max-width: 980px;
  margin: 0;
  color: #8fc4ff;
  font-family: "Virgil", "Segoe Print", "Bradley Hand", "Comic Sans MS", cursive;
  font-size: clamp(1.18rem, 2.15vw, 1.78rem);
  line-height: 1.36;
  font-weight: 600;
  font-style: italic;
  letter-spacing: 0;
}

.hero-copy blockquote cite {
  color: #f4cd67;
  font-style: inherit;
  white-space: nowrap;
}

.hero-visual {
  position: relative;
  min-height: 176px;
}

.hero-sun {
  top: 26px;
  left: 40%;
  opacity: 0.75;
}

.hero-mountains {
  position: absolute;
  left: 0;
  right: -20px;
  bottom: 0;
  height: 150px;
  clip-path: polygon(0 82%, 13% 62%, 24% 71%, 36% 31%, 48% 58%, 58% 19%, 70% 54%, 80% 30%, 100% 72%, 100% 100%, 0 100%);
}

.hero-mountains.one {
  background: rgba(145, 195, 233, 0.2);
}

.hero-mountains.two {
  bottom: -18px;
  background: rgba(89, 172, 219, 0.18);
  transform: scaleX(1.12);
}

.hero-candles {
  position: absolute;
  left: 10%;
  right: 6%;
  bottom: 42px;
  height: 92px;
  display: flex;
  align-items: flex-end;
  gap: 7px;
}

.filter-panel {
  margin: 0 22px;
  transform: translateY(-1px);
  padding: 13px 20px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--soft-shadow);
}

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

.filter-row.primary {
  padding-bottom: 0;
  border-bottom: 0;
}

.filter-row.secondary {
  padding-top: 14px;
}

.search-box {
  flex: 1 1 360px;
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 14px;
  border: 1px solid var(--blue-line);
  border-radius: 8px;
  background: #fbfdff;
  color: var(--muted);
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
}

.sort-box,
.chip {
  border: 1px solid var(--blue-line);
  background: #fbfdff;
  color: #253968;
}

.sort-box {
  margin-left: auto;
  min-height: 44px;
  padding: 6px 10px;
  border-radius: 9px;
  display: grid;
  gap: 2px;
}

.sort-box span {
  color: var(--muted);
  font-size: 0.72rem;
}

.sort-box select {
  border: 0;
  outline: 0;
  background: transparent;
  color: #213866;
  min-width: 192px;
}

.filter-label {
  color: var(--muted);
  font-size: 0.82rem;
}

.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  min-height: 32px;
  padding: 0 13px;
  border-radius: 8px;
}

.chip.active {
  border-color: var(--blue);
  background: var(--blue-soft);
  color: #1d5fc8;
  box-shadow: inset 0 0 0 1px rgba(63, 134, 247, 0.12);
}

.divider {
  width: 1px;
  align-self: stretch;
  min-height: 28px;
  background: var(--line);
  margin: 0 8px;
}

.catalogue-header {
  padding: 20px 28px 12px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

.catalogue-header h3,
.selected-panel h3,
.symbol-panel h3 {
  margin: 0;
  color: var(--navy);
  font-size: 1.28rem;
  letter-spacing: 0;
}

.catalogue-header h3 span {
  display: inline-grid;
  place-items: center;
  min-width: 25px;
  height: 25px;
  margin-left: 8px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 0.82rem;
}

.status-text {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.card-grid {
  padding: 0 28px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(238px, 290px));
  gap: 14px;
}

.strategy-card,
.selected-panel,
.symbol-panel,
.status-card,
.empty-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--soft-shadow);
}

.strategy-card {
  padding: 13px;
  transition: transform 150ms ease, box-shadow 150ms ease, border-color 150ms ease;
}

.strategy-card:hover,
.strategy-card.selected {
  transform: translateY(-2px);
  border-color: rgba(63, 134, 247, 0.42);
  box-shadow: var(--shadow);
}

.card-topline {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
}

.pattern-icon {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
}

.card-topline h4 {
  margin: 0;
  color: var(--navy);
  font-size: 0.92rem;
  letter-spacing: 0;
}

.card-topline p,
.card-description,
.selected-panel p,
.symbol-panel p,
.status-card p {
  color: var(--muted);
  line-height: 1.45;
}

.card-topline p {
  margin: 4px 0 0;
  font-size: 0.8rem;
}

.mini-chart {
  height: 58px;
  margin: 10px 0 8px;
  display: flex;
  align-items: flex-end;
  gap: 7px;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent 0%, black 8%, black 92%, transparent 100%);
}

.mini-candle {
  position: relative;
  width: 7px;
  height: var(--height);
  margin-top: var(--top);
  border-radius: 2px;
  background: var(--blue);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.6);
}

.mini-candle::before {
  content: "";
  position: absolute;
  top: calc(var(--wick-top) - var(--top));
  left: 3px;
  width: 2px;
  height: calc(var(--height) + 12px);
  background: currentColor;
  opacity: 0.45;
}

.mini-candle.up {
  background: #78aefb;
  color: #78aefb;
}

.mini-candle.down {
  background: var(--yellow);
  color: var(--yellow);
}

.card-description {
  min-height: 42px;
  margin: 0 0 10px;
  font-size: 0.8rem;
}

.card-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 0;
}

.card-stats div,
.selected-grid div {
  border-left: 1px solid var(--line);
  padding-left: 10px;
}

.card-stats div:first-child,
.selected-grid div:first-child {
  border-left: 0;
  padding-left: 0;
}

.card-stats span,
.selected-grid span {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
}

.card-stats strong,
.selected-grid strong {
  display: block;
  margin-top: 3px;
  color: var(--navy);
  font-size: 0.98rem;
}

.card-stats div:nth-child(2) strong {
  color: #149579;
}

.insight-layout {
  padding: 20px 28px 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
}

.selected-panel,
.symbol-panel {
  padding: 18px;
}

.symbol-panel:empty {
  display: none;
}

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

.selected-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.selected-heading p {
  margin: 4px 0 0;
}

.selected-heading span {
  display: grid;
  place-items: center;
  min-width: 58px;
  height: 42px;
  border-radius: 10px;
  background: var(--blue-soft);
  color: #1e65d7;
  font-weight: 800;
}

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

.trade-note {
  margin-top: 16px;
  padding: 12px;
  border-radius: 10px;
  background: #f8fbff;
  border: 1px solid var(--line);
}

.trade-note strong,
.trade-note span {
  display: block;
}

.trade-note > span {
  margin-top: 4px;
  color: var(--muted);
}

.recent-trades {
  display: grid;
  gap: 7px;
  margin-top: 7px;
}

.recent-trade-header {
  display: grid;
  grid-template-columns: 1.2fr 1.3fr 0.55fr 0.65fr 0.5fr 0.7fr 0.8fr;
  gap: 8px;
  padding: 0 10px 6px;
  color: #7690bd;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.recent-trade-row {
  display: grid;
  grid-template-columns: 1.2fr 1.3fr 0.55fr 0.65fr 0.5fr 0.7fr 0.8fr;
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.62);
  color: var(--muted);
  font-size: 0.82rem;
}

.recent-trade-row strong {
  color: var(--navy);
}

.recent-trade-row.win strong {
  color: #149579;
}

.recent-trade-row.loss strong {
  color: #c99627;
}

.recent-trade-row.scratch strong {
  color: #6d7da5;
}

.no-trades {
  margin: 8px 0 0;
}

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

.status-card {
  min-height: 118px;
  padding: 18px;
  display: flex;
  gap: 14px;
  align-items: center;
}

.status-icon {
  flex: 0 0 auto;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 1.28rem;
}

.status-card h4 {
  margin: 0 0 6px;
  color: var(--navy);
}

.status-card p {
  margin: 0;
  font-size: 0.84rem;
}

.empty-card {
  grid-column: 1 / -1;
  padding: 28px;
}

.empty-card h3 {
  margin: 0 0 8px;
}

.empty-card p {
  margin: 0;
  color: var(--muted);
}

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

  .sidebar {
    position: relative;
    height: auto;
    display: block;
    padding: 20px;
  }

  .side-nav {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    margin-top: 18px;
  }

  .sidebar-status {
    display: none;
  }

  .hero-panel,
  .insight-layout,
  .status-grid {
    grid-template-columns: 1fr;
  }

  .sort-box {
    margin-left: 0;
  }
}

@media (max-width: 720px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
    padding: 16px 20px;
  }

  .top-tabs {
    width: 100%;
    height: auto;
    gap: 14px;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .top-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .hero-copy,
  .catalogue-header,
  .card-grid,
  .insight-layout,
  .status-grid {
    padding-left: 18px;
    padding-right: 18px;
  }

  .filter-panel {
    margin: 0 14px;
  }

  .selected-grid,
  .card-stats {
    grid-template-columns: 1fr 1fr;
  }

  .card-stats div,
  .selected-grid div {
    border-left: 0;
    padding-left: 0;
  }
}
