/* ── Hero platform: dashboard IA + flotantes ── */
.hero-platform {
  position: relative;
  min-height: 460px;
  margin-bottom: 1rem;
}

.platform-glow {
  position: absolute;
  inset: 8% 0;
  background:
    radial-gradient(circle at 55% 40%, rgba(0, 191, 255, 0.22) 0%, transparent 58%),
    radial-gradient(circle at 30% 75%, rgba(0, 153, 255, 0.12) 0%, transparent 50%);
  filter: blur(18px);
  pointer-events: none;
}

.platform-orbit {
  position: absolute;
  width: 88%;
  aspect-ratio: 1;
  left: 6%;
  top: 8%;
  border: 1px solid rgba(0, 191, 255, 0.12);
  border-radius: 50%;
  pointer-events: none;
  animation: platformOrbit 22s linear infinite;
}

@keyframes platformOrbit {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.platform-card {
  border: 1px solid rgba(0, 191, 255, 0.22);
  border-radius: 14px;
  background: linear-gradient(165deg, rgba(10, 22, 40, 0.96), rgba(6, 12, 24, 0.94));
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(10px);
}

.platform-main {
  position: relative;
  z-index: 2;
  width: 92%;
  margin: 0 auto;
  padding: 0.85rem 1rem 1rem;
}

.platform-head {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.85rem;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.62rem;
  color: #7da4c7;
}

.platform-head strong { color: #e8f4ff; }

.platform-live {
  margin-left: auto;
  font-style: normal;
  color: #34d399;
  font-size: 0.58rem;
}

.platform-ai {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.65rem;
  align-items: center;
  padding: 0.7rem 0.8rem;
  margin-bottom: 0.8rem;
  border-radius: 10px;
  background: rgba(0, 191, 255, 0.08);
  border: 1px solid rgba(0, 191, 255, 0.22);
}

.platform-ai-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(135deg, #0099ff, #00bfff);
  color: #fff;
  font-size: 1rem;
  box-shadow: 0 0 20px rgba(0, 191, 255, 0.45);
}

.platform-ai strong {
  display: block;
  font-size: 0.82rem;
  color: #fff;
}

.platform-ai p {
  margin: 0.15rem 0 0;
  font-size: 0.68rem;
  color: #8eb8d9;
  line-height: 1.4;
}

.platform-pill {
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  font-size: 0.58rem;
  font-weight: 700;
  color: #34d399;
  background: rgba(52, 211, 153, 0.12);
  border: 1px solid rgba(52, 211, 153, 0.35);
}

.platform-kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.platform-kpis div {
  padding: 0.55rem 0.45rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(0, 191, 255, 0.1);
}

.platform-kpis label {
  display: block;
  font-size: 0.58rem;
  color: #7da4c7;
  margin-bottom: 0.15rem;
}

.platform-kpis strong {
  font-size: 0.88rem;
  color: #fff;
}

.platform-chart {
  padding-top: 0.35rem;
}

.platform-chart span {
  display: block;
  font-size: 0.62rem;
  color: #7da4c7;
  margin-bottom: 0.35rem;
}

.platform-chart svg {
  width: 100%;
  height: 70px;
  display: block;
}

.platform-float {
  position: absolute;
  z-index: 3;
  padding: 0.65rem 0.75rem;
  width: min(42%, 190px);
  animation: platformFloat 5s ease-in-out infinite;
}

.platform-float header {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.6rem;
  color: #00bfff;
  margin-bottom: 0.35rem;
}

.platform-float-code {
  top: 2%;
  right: -2%;
  animation-delay: 0.4s;
}

.platform-float-code pre {
  margin: 0;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.58rem;
  line-height: 1.45;
  color: #c4dff5;
}

.platform-float-flow {
  bottom: 18%;
  left: -4%;
  animation-delay: 1s;
}

.flow-mini {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.2rem;
  font-size: 0.58rem;
  color: #b8d9f0;
}

.flow-mini i {
  font-style: normal;
  color: #00bfff;
}

.platform-float-flow p {
  margin: 0.35rem 0 0;
  font-size: 0.58rem;
  color: #7da4c7;
}

.platform-float-apis {
  bottom: 6%;
  right: -2%;
  animation-delay: 1.6s;
}

.api-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.api-badges span {
  padding: 0.18rem 0.42rem;
  border-radius: 6px;
  font-size: 0.55rem;
  font-weight: 600;
  color: #b8d9f0;
  background: rgba(0, 153, 255, 0.1);
  border: 1px solid rgba(0, 191, 255, 0.2);
}

@keyframes platformFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.portfolio-tab-icon {
  display: block;
  font-size: 1.35rem;
  margin-bottom: 0.35rem;
  filter: drop-shadow(0 0 10px rgba(0, 191, 255, 0.3));
}

/* ── Hero showcase: IDE + Dashboard (legacy) ── */
.hero-showcase {
  position: relative;
  min-height: 420px;
  margin-bottom: 2.2rem;
  perspective: 1200px;
}

.showcase-glow {
  position: absolute;
  inset: 10% 5%;
  background:
    radial-gradient(circle, rgba(0, 212, 255, 0.22) 0%, transparent 58%),
    radial-gradient(circle at 80% 60%, rgba(124, 58, 237, 0.1) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
  filter: blur(3px);
}

.showcase-badge {
  position: absolute;
  top: -8px;
  right: 12px;
  z-index: 5;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--primary);
  background: rgba(14, 165, 233, 0.12);
  border: 1px solid rgba(14, 165, 233, 0.35);
  backdrop-filter: blur(6px);
}

.ide-window {
  position: absolute;
  top: 0;
  left: 0;
  width: 92%;
  border: 1px solid rgba(0, 212, 255, 0.22);
  border-radius: 14px;
  background: rgba(6, 12, 24, 0.94);
  backdrop-filter: blur(14px) saturate(1.15);
  box-shadow:
    0 24px 50px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.04),
    0 0 40px rgba(0, 212, 255, 0.08);
  overflow: hidden;
  z-index: 1;
  transform: rotateY(-6deg) rotateX(4deg);
  transition: transform 0.5s ease;
}

.browser-window {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 88%;
  border: 1px solid rgba(0, 212, 255, 0.28);
  border-radius: 14px;
  background: rgba(8, 16, 32, 0.95);
  backdrop-filter: blur(14px) saturate(1.15);
  box-shadow:
    0 28px 60px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(0, 212, 255, 0.15),
    0 0 50px rgba(0, 153, 255, 0.1);
  overflow: hidden;
  z-index: 2;
  transform: rotateY(4deg) rotateX(-2deg);
  transition: transform 0.5s ease;
}

.hero-showcase:hover .ide-window {
  transform: rotateY(-4deg) rotateX(2deg) translateY(-4px);
}

.hero-showcase:hover .browser-window {
  transform: rotateY(2deg) translateY(-6px);
}

.win-chrome {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.5rem 0.75rem;
  background: #161b22;
  border-bottom: 1px solid #30363d;
}

.win-dots {
  display: flex;
  gap: 5px;
}

.win-dots i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: block;
  font-style: normal;
}

.win-dots i:nth-child(1) { background: #ff5f57; }
.win-dots i:nth-child(2) { background: #febc2e; }
.win-dots i:nth-child(3) { background: #28c840; }

.win-title {
  flex: 1;
  text-align: center;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.68rem;
  color: #8b949e;
}

.win-title strong { color: #c9d1d9; }

.ide-body {
  display: grid;
  grid-template-columns: 42px 1fr;
  min-height: 200px;
}

.ide-gutter {
  background: #010409;
  border-right: 1px solid #21262d;
  padding: 0.65rem 0;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.62rem;
  line-height: 1.55;
  color: #484f58;
  text-align: right;
  padding-right: 8px;
}

.ide-code {
  margin: 0;
  padding: 0.65rem 0.75rem;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.68rem;
  line-height: 1.55;
  color: #c9d1d9;
  overflow: hidden;
}

.ide-code .c { color: #8b949e; }
.ide-code .k { color: #ff7b72; }
.ide-code .f { color: #d2a8ff; }
.ide-code .s { color: #a5d6ff; }
.ide-code .n { color: #79c0ff; }
.ide-code .t { color: #ffa657; }

.app-layout {
  display: grid;
  grid-template-columns: 148px 1fr;
  min-height: 260px;
}

.app-sidebar {
  background: #0c1220;
  border-right: 1px solid var(--border);
  padding: 0.75rem 0.5rem;
}

.app-sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0 0.4rem 0.75rem;
  margin-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--white);
}

.app-sidebar-brand span {
  width: 22px;
  height: 22px;
  border-radius: 5px;
  background: var(--primary);
  display: grid;
  place-items: center;
  font-size: 0.55rem;
}

.app-nav {
  display: grid;
  gap: 0.2rem;
}

.app-nav a {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.42rem 0.5rem;
  border-radius: 6px;
  font-size: 0.68rem;
  color: var(--muted);
  text-decoration: none;
}

.app-nav a svg {
  width: 14px;
  height: 14px;
  opacity: 0.7;
}

.app-nav a.active {
  background: var(--primary-muted);
  color: var(--primary);
}

.app-main {
  padding: 0.65rem 0.75rem 0.75rem;
  background: #111827;
}

.app-topbar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
}

.app-topbar h4 {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--white);
  flex: 1;
}

.app-search {
  font-size: 0.62rem;
  color: #64748b;
  background: #1e293b;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.3rem 0.55rem;
  min-width: 100px;
}

.app-pill-live {
  font-size: 0.58rem;
  font-weight: 700;
  color: #4ade80;
  background: rgba(74, 222, 128, 0.12);
  border: 1px solid rgba(74, 222, 128, 0.3);
  border-radius: 999px;
  padding: 0.15rem 0.45rem;
}

.kpi-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.45rem;
  margin-bottom: 0.6rem;
}

.kpi {
  background: #1e293b;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.45rem 0.5rem;
}

.kpi label {
  display: block;
  font-size: 0.55rem;
  color: var(--muted);
  margin-bottom: 0.15rem;
}

.kpi strong {
  font-size: 0.78rem;
  color: var(--white);
}

.kpi em {
  display: block;
  font-size: 0.55rem;
  font-style: normal;
  color: #4ade80;
  margin-top: 0.1rem;
}

.app-panels {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 0.5rem;
}

.panel-chart {
  background: #1e293b;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.5rem;
}

.panel-chart header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.4rem;
}

.panel-chart header span {
  font-size: 0.62rem;
  font-weight: 600;
  color: var(--text);
}

.panel-chart header small {
  font-size: 0.55rem;
  color: var(--muted);
}

.chart-svg {
  width: 100%;
  height: 72px;
}

.chart-line {
  fill: none;
  stroke: var(--primary);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 400;
  stroke-dashoffset: 400;
  animation: drawLine 2s ease forwards 0.5s;
}

.chart-area {
  fill: url(#chartGrad);
  opacity: 0;
  animation: fadeIn 1s ease forwards 1.2s;
}

.panel-table {
  background: #1e293b;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.45rem;
  font-size: 0.58rem;
}

.panel-table table {
  width: 100%;
  border-collapse: collapse;
}

.panel-table th {
  text-align: left;
  color: var(--muted);
  font-weight: 600;
  padding: 0.2rem 0.25rem;
  border-bottom: 1px solid var(--border);
}

.panel-table td {
  padding: 0.28rem 0.25rem;
  color: var(--text);
  border-bottom: 1px solid rgba(45, 55, 72, 0.5);
}

.badge {
  display: inline-block;
  padding: 0.1rem 0.35rem;
  border-radius: 999px;
  font-size: 0.5rem;
  font-weight: 700;
}

.badge-ok { background: rgba(74, 222, 128, 0.15); color: #4ade80; }
.badge-warn { background: rgba(251, 191, 36, 0.15); color: #fbbf24; }
.badge-info { background: rgba(14, 165, 233, 0.15); color: var(--primary); }

/* ── Portfolio section ── */
.portfolio {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 1.5rem;
  align-items: start;
}

.portfolio-visual {
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

.portfolio-visual .portfolio-nav {
  flex-direction: row;
  justify-content: center;
  position: static;
  gap: 0.65rem;
}

.portfolio-visual .portfolio-tab {
  padding: 0.75rem 1.4rem;
  min-width: auto;
  text-align: center;
}

.portfolio-visual .portfolio-tab strong {
  font-size: 1.05rem;
  margin: 0;
}

.portfolio-visual .portfolio-tab span,
.portfolio-visual .portfolio-tab p {
  display: none;
}

.portfolio-visual .portfolio-stage {
  min-height: 440px;
}

.portfolio-nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  position: sticky;
  top: 90px;
}

.portfolio-tab {
  text-align: left;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  padding: 0.9rem 1rem;
  cursor: pointer;
  font-family: inherit;
  color: inherit;
  transition: border-color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

.portfolio-tab:hover {
  border-color: var(--border-hover);
  transform: translateX(4px);
}

.portfolio-tab.active {
  border-color: var(--primary);
  background: linear-gradient(90deg, rgba(14, 165, 233, 0.12), transparent);
  box-shadow: 0 0 0 1px rgba(14, 165, 233, 0.2);
}

.portfolio-tab[data-panel="trading"].active {
  border-color: rgba(139, 92, 246, 0.65);
  background: linear-gradient(90deg, rgba(139, 92, 246, 0.15), rgba(14, 165, 233, 0.06));
  box-shadow: 0 0 24px rgba(139, 92, 246, 0.15), 0 0 0 1px rgba(139, 92, 246, 0.25);
}

.portfolio-tab span {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--primary);
  margin-bottom: 0.25rem;
}

.portfolio-tab strong {
  display: block;
  font-size: 0.95rem;
  color: var(--white);
  margin-bottom: 0.3rem;
}

.portfolio-tab p {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.5;
}

.portfolio-stage {
  position: relative;
  min-height: 520px;
}

.portfolio-panel {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translateY(16px) scale(0.98);
  pointer-events: none;
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.portfolio-panel.active {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.product-frame {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #0a0f16;
  box-shadow: var(--shadow), 0 0 60px rgba(14, 165, 233, 0.08);
}

.product-frame .win-chrome {
  background: #0f172a;
}

.product-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.85rem;
}

.product-meta span {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.25rem 0.6rem;
}

/* Dashboard full */
.dash-full .app-layout {
  grid-template-columns: 170px 1fr;
  min-height: 400px;
}

.dash-full .kpi-row {
  grid-template-columns: repeat(4, 1fr);
}

.dash-full .app-panels {
  grid-template-columns: 1.35fr 1fr;
}

.dash-full .chart-svg { height: 110px; }

/* Automation flow */
.flow-canvas {
  padding: 1.5rem 1.25rem;
  min-height: 400px;
  background: linear-gradient(180deg, #0c1220 0%, #111827 100%);
  position: relative;
}

.flow-title {
  margin: 0 0 1.2rem;
  font-size: 0.85rem;
  color: var(--white);
  font-weight: 700;
}

.flow-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  align-items: center;
  position: relative;
}

.flow-grid::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 8%;
  right: 8%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  transform: translateY(-50%);
  z-index: 0;
}

.flow-node {
  position: relative;
  z-index: 1;
  background: #1e293b;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.85rem 0.65rem;
  text-align: center;
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.flow-node:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
}

.flow-node .icon {
  width: 36px;
  height: 36px;
  margin: 0 auto 0.5rem;
  border-radius: 8px;
  background: var(--primary-muted);
  display: grid;
  place-items: center;
  color: var(--primary);
}

.flow-node h5 {
  margin: 0 0 0.25rem;
  font-size: 0.75rem;
  color: var(--white);
}

.flow-node p {
  margin: 0;
  font-size: 0.62rem;
  color: var(--muted);
  line-height: 1.4;
}

.flow-log {
  margin-top: 1.25rem;
  background: #0d1117;
  border: 1px solid #30363d;
  border-radius: 8px;
  padding: 0.75rem;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.65rem;
  line-height: 1.7;
  color: #8b949e;
}

.flow-log .ok { color: #4ade80; }
.flow-log .info { color: var(--primary); }

.flow-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.6rem;
  margin-top: 1rem;
}

.flow-stat {
  background: #1e293b;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.65rem;
  text-align: center;
}

.flow-stat strong {
  display: block;
  font-size: 1.1rem;
  color: var(--primary);
}

.flow-stat span {
  font-size: 0.65rem;
  color: var(--muted);
}

/* ── Trading terminal (pro) ── */
.trade-terminal {
  border-color: rgba(139, 92, 246, 0.35);
  box-shadow: var(--shadow), 0 0 80px rgba(139, 92, 246, 0.12), 0 0 40px rgba(14, 165, 233, 0.08);
  background: #060a12;
}

.trade-chrome {
  background: linear-gradient(90deg, #0a0f1a, #111827);
  border-bottom-color: rgba(139, 92, 246, 0.25);
}

.trade-chrome-status {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.62rem;
  color: #4ade80;
  margin-left: auto;
  padding-right: 0.25rem;
}

.trade-chrome-status i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 10px #4ade80;
  animation: statusPulse 1.6s ease infinite;
}

.trade-terminal-body {
  background: linear-gradient(180deg, #070b14 0%, #0a1020 100%);
}

.trade-toolbar {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid rgba(45, 55, 72, 0.8);
  background: rgba(15, 23, 42, 0.6);
}

.trade-pairs {
  display: flex;
  gap: 0.35rem;
}

.trade-pairs button {
  border: 1px solid var(--border);
  background: #0f172a;
  color: var(--muted);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 0.35rem 0.6rem;
  border-radius: 6px;
  cursor: default;
}

.trade-pairs button.active {
  color: var(--white);
  border-color: rgba(139, 92, 246, 0.6);
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(14, 165, 233, 0.1));
  box-shadow: 0 0 16px rgba(139, 92, 246, 0.2);
}

.trade-live-ticker {
  display: flex;
  align-items: baseline;
  gap: 0.65rem;
  flex: 1;
  min-width: 200px;
}

.trade-price {
  font-family: "JetBrains Mono", monospace;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.02em;
  transition: color 0.2s ease;
}

.trade-price.tick-up { color: #4ade80; }
.trade-price.tick-down { color: #f87171; }

.trade-change {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
}

.trade-change.pos {
  color: #4ade80;
  background: rgba(74, 222, 128, 0.12);
}

.trade-change.neg {
  color: #f87171;
  background: rgba(248, 113, 113, 0.12);
}

.trade-vol {
  font-size: 0.62rem;
  color: var(--muted);
}

.trade-timeframes {
  display: flex;
  gap: 0.25rem;
}

.trade-timeframes span {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.62rem;
  color: var(--muted);
  padding: 0.3rem 0.5rem;
  border-radius: 4px;
  cursor: default;
}

.trade-timeframes span.active {
  color: var(--primary);
  background: rgba(14, 165, 233, 0.12);
  border: 1px solid rgba(14, 165, 233, 0.3);
}

.trade-main {
  display: grid;
  grid-template-columns: 118px 1fr 148px;
  min-height: 340px;
}

.trade-watchlist {
  padding: 0.65rem 0.5rem;
  border-right: 1px solid var(--border);
  background: #070d18;
}

.trade-watchlist header,
.trade-orderbook header {
  margin: 0 0 0.55rem;
  font-size: 0.58rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.watch-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.1rem 0.35rem;
  padding: 0.4rem 0.35rem;
  border-radius: 6px;
  margin-bottom: 0.2rem;
  font-size: 0.62rem;
  transition: background 0.2s ease;
}

.watch-item.active {
  background: rgba(139, 92, 246, 0.12);
  border: 1px solid rgba(139, 92, 246, 0.25);
}

.watch-item span { color: var(--muted); font-weight: 600; }
.watch-item strong { color: var(--white); font-family: "JetBrains Mono", monospace; grid-column: 2; }
.watch-item em { grid-column: 1 / -1; font-style: normal; font-size: 0.58rem; }
.watch-item em.pos { color: #4ade80; }
.watch-item em.neg { color: #f87171; }

.trade-chart-zone {
  position: relative;
  padding: 0.5rem 0.65rem 0.65rem;
  background:
    linear-gradient(rgba(45, 55, 72, 0.15) 1px, transparent 1px),
    linear-gradient(90deg, rgba(45, 55, 72, 0.15) 1px, transparent 1px);
  background-size: 28px 28px;
  overflow: hidden;
}

.chart-overlay-labels {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
  position: relative;
  z-index: 2;
}

.chart-overlay-labels span:not(.scan-line) {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.58rem;
  color: var(--muted);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border);
}

.chart-overlay-labels span:first-child { color: #a78bfa; border-color: rgba(167, 139, 250, 0.3); }
.chart-overlay-labels span:nth-child(2) { color: #38bdf8; border-color: rgba(56, 189, 248, 0.3); }

.scan-line {
  position: absolute;
  top: 0;
  left: 0;
  width: 2px;
  height: 100%;
  background: linear-gradient(180deg, transparent, rgba(14, 165, 233, 0.8), transparent);
  box-shadow: 0 0 12px rgba(14, 165, 233, 0.6);
  animation: scanMove 4s linear infinite;
  opacity: 0.7;
}

@keyframes scanMove {
  0% { left: 0; opacity: 0; }
  10% { opacity: 0.7; }
  90% { opacity: 0.7; }
  100% { left: 100%; opacity: 0; }
}

#trade-chart-canvas {
  width: 100%;
  height: 220px;
  display: block;
  border-radius: 6px;
}

.trade-positions {
  display: flex;
  gap: 0.45rem;
  margin-top: 0.5rem;
}

.pos-card {
  flex: 1;
  padding: 0.45rem 0.55rem;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid var(--border);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.pos-card.long {
  border-color: rgba(74, 222, 128, 0.35);
  box-shadow: 0 0 20px rgba(74, 222, 128, 0.08);
  animation: posGlow 2.5s ease-in-out infinite;
}

@keyframes posGlow {
  0%, 100% { box-shadow: 0 0 12px rgba(74, 222, 128, 0.06); }
  50% { box-shadow: 0 0 24px rgba(74, 222, 128, 0.18); }
}

.pos-card label {
  display: block;
  font-size: 0.52rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.15rem;
}

.pos-card strong {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.82rem;
  color: var(--white);
}

.pos-card.long strong { color: #4ade80; }

.pos-card span {
  display: block;
  font-size: 0.55rem;
  color: var(--muted);
  margin-top: 0.1rem;
}

.trade-orderbook {
  padding: 0.65rem 0.5rem;
  border-left: 1px solid var(--border);
  background: #070d18;
}

.ob-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.2rem;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.58rem;
  padding: 0.2rem 0;
  position: relative;
}

.ob-row span:first-child { color: var(--text); z-index: 1; }
.ob-row span:last-child { color: var(--muted); text-align: right; z-index: 1; }

.ob-bar {
  position: absolute;
  top: 2px;
  bottom: 2px;
  right: 0;
  width: var(--w, 50%);
  border-radius: 2px;
  opacity: 0.35;
  animation: obPulse 3s ease-in-out infinite;
}

.ob-row.ask .ob-bar { background: #f87171; }
.ob-row.bid .ob-bar { background: #4ade80; }

.ob-row:nth-child(2) .ob-bar { animation-delay: 0.3s; }
.ob-row:nth-child(3) .ob-bar { animation-delay: 0.6s; }
.ob-row:nth-child(5) .ob-bar { animation-delay: 0.2s; }
.ob-row:nth-child(6) .ob-bar { animation-delay: 0.5s; }

@keyframes obPulse {
  0%, 100% { opacity: 0.25; }
  50% { opacity: 0.5; }
}

.ob-spread {
  text-align: center;
  font-size: 0.55rem;
  color: var(--muted);
  padding: 0.35rem 0;
  margin: 0.15rem 0;
  border-top: 1px dashed var(--border);
  border-bottom: 1px dashed var(--border);
}

.trade-gauges {
  margin-top: 0.75rem;
  display: grid;
  gap: 0.55rem;
}

.gauge label {
  display: block;
  font-size: 0.55rem;
  color: var(--muted);
  margin-bottom: 0.2rem;
}

.gauge-track {
  height: 5px;
  background: #1e293b;
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 0.2rem;
}

.gauge-fill {
  height: 100%;
  width: var(--val, 50%);
  background: linear-gradient(90deg, #a78bfa, #38bdf8);
  border-radius: 99px;
  animation: gaugeGrow 1.2s ease forwards;
  transform-origin: left;
}

.gauge-fill.pos {
  background: linear-gradient(90deg, #4ade80, #22d3ee);
}

.gauge strong {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.68rem;
  color: var(--white);
}

@keyframes gaugeGrow {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

.trade-console {
  border-top: 1px solid var(--border);
  background: #050810;
}

.console-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  padding: 0 0.65rem;
}

.console-tabs span {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.6rem;
  color: var(--muted);
  padding: 0.45rem 0.65rem;
  border-bottom: 2px solid transparent;
  cursor: default;
}

.console-tabs span.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.console-output {
  margin: 0;
  padding: 0.65rem 0.85rem;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.62rem;
  line-height: 1.75;
  color: #8b949e;
  max-height: 110px;
  overflow: hidden;
}

.console-output .c { color: #6b7280; }
.console-output .ok { color: #4ade80; }
.console-output .info { color: #38bdf8; }
.console-output .warn { color: #fbbf24; }

.portfolio-panel.active .gauge-fill {
  animation: gaugeGrow 1.2s ease forwards;
}

.portfolio-panel.active .console-output {
  animation: consoleFade 0.6s ease;
}

@keyframes consoleFade {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

/* Service SVG icons */
.svc-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.2), rgba(124, 58, 237, 0.1));
  border: 1px solid rgba(0, 212, 255, 0.28);
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.1);
  display: grid;
  place-items: center;
  margin-bottom: 0.85rem;
  color: var(--primary);
}

.svc-icon svg {
  width: 20px;
  height: 20px;
}

@keyframes drawLine {
  to { stroke-dashoffset: 0; }
}

@keyframes fadeIn {
  to { opacity: 1; }
}

@media (max-width: 960px) {
  .hero-showcase {
    min-height: 340px;
    margin-top: 1.5rem;
  }

  .ide-window {
    width: 95%;
    transform: none;
  }

  .browser-window {
    width: 92%;
    transform: none;
    bottom: -10px;
  }

  .app-layout,
  .dash-full .app-layout {
    grid-template-columns: 1fr;
  }

  .app-sidebar { display: none; }

  .kpi-row,
  .dash-full .kpi-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .app-panels,
  .dash-full .app-panels {
    grid-template-columns: 1fr;
  }

  .portfolio {
    grid-template-columns: 1fr;
  }

  .portfolio-nav {
    flex-direction: row;
    overflow-x: auto;
    position: static;
    padding-bottom: 0.25rem;
  }

  .portfolio-tab {
    min-width: 200px;
    flex-shrink: 0;
  }

  .portfolio-tab:hover {
    transform: none;
  }

  .portfolio-stage {
    min-height: 0;
    height: auto;
    overflow: visible;
  }

  .portfolio-panel {
    position: relative;
    inset: auto;
    display: none;
    opacity: 1;
    transform: none;
    pointer-events: none;
    height: auto;
    overflow: visible;
  }

  .portfolio-panel.active {
    display: block;
    pointer-events: auto;
  }

  .product-frame {
    overflow: visible;
  }

  .dash-full .app-layout {
    min-height: auto;
  }

  .flow-canvas {
    min-height: auto;
  }

  .trade-terminal-body,
  .trade-main {
    min-height: auto;
  }

  .flow-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .flow-grid::before { display: none; }

  .trade-main {
    grid-template-columns: 1fr;
  }

  .trade-watchlist {
    display: flex;
    gap: 0.35rem;
    overflow-x: auto;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .trade-watchlist header { display: none; }

  .watch-item {
    min-width: 90px;
    flex-shrink: 0;
  }

  .trade-orderbook {
    border-left: none;
    border-top: 1px solid var(--border);
  }

  .trade-positions {
    flex-wrap: wrap;
  }
}

@media (max-width: 720px) {
  .hero-layout {
    grid-template-columns: 1fr !important;
  }

  .hero-showcase {
    min-height: 300px;
    margin-top: 1rem;
  }

  .ide-window,
  .browser-window {
    position: relative;
    width: 100%;
    transform: none !important;
  }

  .browser-window {
    margin-top: 0.75rem;
  }

  .flow-grid {
    grid-template-columns: 1fr;
  }

  .portfolio-tab strong {
    font-size: 0.88rem;
  }

  .dash-full .kpi-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .kpi strong {
    font-size: 0.7rem;
  }

  .panel-table {
    font-size: 0.52rem;
  }

  .trade-toolbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .trade-live-ticker {
    flex-wrap: wrap;
  }

  .trade-price {
    font-size: 1.1rem;
  }

  #trade-chart-canvas {
    height: 180px;
  }

  .trade-positions {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .portfolio-nav {
    flex-direction: column;
  }

  .portfolio-tab {
    min-width: 0;
    width: 100%;
  }

  .trade-main {
    grid-template-columns: 1fr;
  }

  .trade-watchlist {
    flex-direction: column;
    overflow-x: visible;
  }

  .watch-item {
    min-width: 0;
  }
}

/* ── Mobile: layout más compacto y profesional ── */
@media (max-width: 720px) {
  .hero-showcase {
    min-height: 0;
    margin-bottom: 0.85rem;
    perspective: none;
  }

  .showcase-glow {
    inset: 0;
  }

  .showcase-badge {
    position: relative;
    top: auto;
    right: auto;
    display: inline-flex;
    margin: 0 0 0.55rem;
    font-size: 0.58rem;
  }

  .browser-window {
    display: none;
  }

  .ide-window {
    position: relative;
    width: 100%;
    transform: none !important;
  }

  .ide-body {
    max-height: 128px;
    overflow: hidden;
  }

  .ide-code {
    font-size: 0.62rem;
    line-height: 1.45;
  }

  .hero-tech-stack {
    position: relative;
    bottom: auto;
    left: auto;
    right: auto;
    margin-top: 0.65rem;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.35rem;
  }

  .hero-tech-stack span {
    font-size: 0.6rem;
    padding: 0.22rem 0.48rem;
  }

  .portfolio-nav {
    flex-direction: row !important;
    overflow-x: auto;
    gap: 0.4rem;
    padding-bottom: 0.15rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .portfolio-nav::-webkit-scrollbar {
    display: none;
  }

  .portfolio-tab {
    min-width: auto !important;
    width: auto !important;
    flex: 0 0 auto;
    padding: 0.5rem 0.8rem;
    border-radius: 999px;
    white-space: nowrap;
  }

  .portfolio-tab span,
  .portfolio-tab p {
    display: none !important;
  }

  .portfolio-tab strong {
    margin: 0;
    font-size: 0.78rem;
  }

  .portfolio-tab:hover {
    transform: none;
  }

  .portfolio-stage {
    margin-top: 0.35rem;
  }

  .product-frame {
    max-height: 240px;
    overflow: hidden;
    position: relative;
    border-radius: 12px;
  }

  .product-frame::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 44px;
    background: linear-gradient(to bottom, transparent, #0a0f16 88%);
    pointer-events: none;
    z-index: 2;
  }

  .panel-table,
  .flow-log,
  .flow-stats,
  .trade-orderbook,
  .trade-positions,
  .trade-watchlist,
  .trade-console,
  .trade-toolbar .trade-pairs {
    display: none;
  }

  .app-search,
  .app-pill-live {
    display: none;
  }

  .app-topbar {
    padding: 0.45rem 0.65rem;
  }

  .app-topbar h4 {
    font-size: 0.72rem;
  }

  .kpi-row,
  .dash-full .kpi-row {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.35rem;
    padding: 0.45rem 0.55rem;
  }

  .kpi {
    padding: 0.4rem 0.45rem;
  }

  .kpi label {
    font-size: 0.52rem;
  }

  .kpi strong {
    font-size: 0.82rem;
  }

  .kpi em {
    font-size: 0.5rem;
  }

  .panel-chart header {
    padding: 0.4rem 0.55rem;
  }

  .panel-chart header span {
    font-size: 0.62rem;
  }

  .flow-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    padding: 0.55rem;
  }

  .flow-node {
    padding: 0.5rem;
  }

  .flow-node h5 {
    font-size: 0.68rem;
  }

  .flow-node p {
    display: none;
  }

  .flow-title {
    font-size: 0.72rem;
    padding: 0.45rem 0.55rem 0;
  }

  .product-meta {
    margin-top: 0.45rem;
    gap: 0.3rem;
  }

  .product-meta span {
    font-size: 0.58rem;
    padding: 0.18rem 0.42rem;
  }

  #trade-chart-canvas {
    height: 140px;
  }

  .section-showcase .section-header {
    margin-bottom: 1rem;
  }

  .section-showcase .section-intro {
    font-size: 0.92rem;
    line-height: 1.5;
  }
}

@media (max-width: 480px) {
  .hero-showcase {
    margin-bottom: 0.65rem;
  }

  .ide-body {
    max-height: 108px;
  }

  .product-frame {
    max-height: 200px;
  }

  .portfolio-tab strong {
    font-size: 0.72rem;
  }

  .flow-grid {
    grid-template-columns: 1fr 1fr;
  }
}
