/* ═══════════════════════════════════════════════════════════════
   RUGA RESEARCH — Shell (top nav horizontal + Hub Control Center)
   Port 1:1 do ruga-mockup-v5-control-center.html (V5.1 FINAL)
   Sidebar BANIDA — layout vertical: topbar-1 / topbar-2 / main
   ═══════════════════════════════════════════════════════════════ */

/* ── Layout base (override do grid sidebar legado) ── */
body.dashboard {
  display: block;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.005em;
}
.serif { font-family: var(--font-serif); font-weight: 400; letter-spacing: -0.01em; }
.num { font-family: var(--font-mono); font-feature-settings: 'tnum'; }

.main-content { display: block; max-width: none; padding: 0; }

/* ═══════════ TOPBAR 1 — brand + utility ═══════════ */
.topbar-1 {
  border-bottom: 1px solid var(--border);
  padding: 16px 40px;
  display: flex; align-items: center; justify-content: space-between;
  background: var(--bg);
}
.topbar-1 .brand { display: flex; align-items: center; gap: 14px; text-decoration: none; }
.topbar-1 .brand-logo { width: 32px; height: 32px; display: block; }
.topbar-1 .brand-text {
  font-family: var(--font-serif);
  font-size: 17px; color: var(--text); font-weight: 500;
}
.topbar-1 .brand-text em { color: var(--accent); font-style: italic; font-weight: 400; }

.topbar-1 .utility { display: flex; align-items: center; gap: 14px; }
.ticker-pill {
  display: flex; align-items: baseline; gap: 10px;
  padding: 6px 14px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 999px;
  font-family: var(--font-mono);
}
.ticker-pill .px { font-size: 12px; color: var(--text); font-weight: 600; }
.ticker-pill .btc-kpi { font-size: 10px; color: var(--text-2); }
.ticker-pill .btc-kpi.pos { color: var(--bull); }
.ticker-pill .btc-kpi.neg { color: var(--bear); }
.avatar {
  width: 28px; height: 28px; background: var(--surface-2);
  border: 1px solid var(--border-strong); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--text); font-size: 11px; font-weight: 600;
  font-family: var(--font-serif);
}

/* ═══════════ TOPBAR 2 — nav horizontal + dropdowns ═══════════ */
.topbar-2 {
  position: sticky; top: 0; z-index: 100;
  border-bottom: 1px solid var(--border);
  padding: 0 40px;
  display: flex; align-items: center;
  background: rgba(10, 10, 10, 0.92);
  backdrop-filter: blur(14px);
}
.nav-item {
  position: relative;
  padding: 12px 16px;
  color: var(--text-2);
  font-size: 11px; font-weight: 500;
  letter-spacing: 0.06em; text-transform: uppercase;
  cursor: pointer;
  border-bottom: 1px solid transparent;
  transition: color 0.18s ease, border-color 0.18s ease;
  white-space: nowrap;
  display: flex; align-items: center; gap: 6px;
  margin-bottom: -1px;
  background: none; border-top: none; border-left: none; border-right: none;
  font-family: inherit;
}
.nav-item:hover { color: var(--text); }
.nav-item.active { color: var(--accent); border-bottom-color: var(--accent); }
.nav-item .caret { font-size: 8px; opacity: 0.55; }
.nav-item .badge {
  background: var(--accent); color: var(--bg);
  font-size: 8px; padding: 2px 5px; border-radius: 3px;
  letter-spacing: 0.04em; font-weight: 700;
}
.nav-sep { flex: 1; }
.nav-meta {
  font-size: 10px; color: var(--text-2);
  letter-spacing: 0.16em; text-transform: uppercase;
  font-family: var(--font-mono);
}

/* Dropdown */
.nav-dropdown { position: relative; }
.nav-dropdown .nav-cat-link { color: inherit; text-decoration: none; }
.nav-dropdown .nav-cat-link:hover { color: var(--accent); }
.nav-menu {
  position: absolute; top: calc(100% + 1px); left: 0;
  min-width: 230px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 0 0 8px 8px;
  padding: 8px 0;
  display: none;
  z-index: 200;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55);
}
.nav-dropdown.open .nav-menu,
.nav-dropdown:hover .nav-menu { display: block; }
.nav-menu a {
  display: block;
  padding: 8px 18px;
  font-family: var(--font-serif);
  font-size: 13px;
  color: var(--text);
  text-decoration: none;
  text-transform: none;
  letter-spacing: 0;
  transition: color 0.15s, background 0.15s;
}
.nav-menu a::before { content: "·"; color: var(--accent-dim); margin-right: 8px; }
.nav-menu a:hover { color: var(--accent); background: var(--accent-soft); }
.nav-menu a.active { color: var(--accent); }

/* ═══════════ NAV MOBILE (≤860px) — hambúrguer · desktop intocado ═══════════ */
.nav-burger { display: none; }
@media (max-width: 860px) {
  .nav-burger {
    display: flex; align-items: center; justify-content: center;
    width: 42px; height: 34px; margin: 6px 12px 6px auto;
    background: transparent; border: 1px solid var(--border-strong);
    border-radius: 6px; color: var(--text); font-size: 15px; cursor: pointer;
    order: 99;
  }
  #topNav { flex-wrap: wrap; }
  #topNav .nav-item, #topNav .nav-sep, #topNav .nav-meta { display: none; }
  #topNav.mobile-open { padding-bottom: 10px; }
  #topNav.mobile-open .nav-item {
    display: flex; width: 100%;
    border-bottom: 1px solid var(--border);
    margin-bottom: 0;
  }
  #topNav.mobile-open .nav-dropdown { flex-direction: column; align-items: flex-start; }
  #topNav.mobile-open .nav-dropdown .caret { display: none; }
  #topNav.mobile-open .nav-menu {
    position: static; display: block; min-width: 0; width: 100%;
    background: transparent; border: none; box-shadow: none;
    padding: 2px 0 8px; border-radius: 0;
  }
  #topNav.mobile-open .nav-menu a { padding: 8px 8px; font-size: 14px; }
}

/* ═══════════ PAGE HEAD (detail pages) ═══════════ */
.page-head { max-width: 1400px; margin: 0 auto; padding: 24px 40px 0; }
.page-head h1 {
  font-family: var(--font-serif);
  font-size: 24px; font-weight: 500;
  color: var(--text); margin: 0;
  letter-spacing: -0.015em;
}
.page-head.hidden { display: none; }

#sectionContainer { max-width: 1400px; margin: 0 auto; padding: 16px 40px 48px; }

/* ═══════════ HUB CONTAINER ═══════════ */
.control { max-width: 1400px; margin: 0 auto; padding: 8px 0 24px; }

/* Header strip */
.head-strip { display: flex; align-items: center; gap: 18px; margin-bottom: 24px; }
.head-eyebrow {
  font-family: var(--font-mono);
  font-size: 10px; letter-spacing: 0.20em; text-transform: uppercase;
  color: var(--accent); font-weight: 600;
  display: flex; align-items: center; gap: 10px;
}
.head-eyebrow .pulse {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--bull); box-shadow: 0 0 10px var(--bull);
  animation: ruga-pulse 2s infinite;
}
@keyframes ruga-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
.head-rule { flex: 1; height: 1px; background: var(--hairline); }
.head-tag { font-family: var(--font-serif); font-style: italic; font-size: 12px; color: var(--text-2); }

.head-thesis {
  font-family: var(--font-serif);
  font-size: 22px; line-height: 1.25;
  color: var(--text); font-weight: 400;
  letter-spacing: -0.015em;
  max-width: 1100px;
  margin: 0 0 28px;
}
.head-thesis em { font-style: italic; color: var(--accent); }

/* ═══════════ RSPS HERO (40%) ═══════════ */
.rsps-hero {
  background: linear-gradient(160deg, var(--surface) 0%, rgba(216, 115, 64, 0.04) 100%);
  border: 1px solid var(--accent-dim);
  border-radius: 12px;
  padding: 0; margin-bottom: 24px;
  overflow: hidden; position: relative;
}
.rsps-hero::before {
  content: ""; position: absolute; top: 0; right: 0;
  width: 280px; height: 280px;
  background: radial-gradient(circle at top right, var(--accent-glow), transparent 60%);
  pointer-events: none;
}
.rsps-head {
  display: flex; align-items: center; gap: 20px;
  padding: 20px 32px;
  border-bottom: 1px solid var(--accent-soft);
  position: relative; z-index: 1;
}
.rsps-head .label {
  font-family: var(--font-mono);
  font-size: 10px; letter-spacing: 0.20em; text-transform: uppercase;
  color: var(--accent); font-weight: 600;
}
.rsps-head .strategy {
  font-family: var(--font-serif);
  font-size: 22px; color: var(--text); font-weight: 500;
  letter-spacing: -0.015em;
}
.rsps-head .strategy em { color: var(--accent); font-style: italic; }
.rsps-head .meta-stats { margin-left: auto; display: flex; gap: 28px; }
.rsps-head .ms { display: flex; flex-direction: column; gap: 2px; }
.rsps-head .ms .v { font-family: var(--font-mono); font-size: 14px; color: var(--text); font-weight: 600; }
.rsps-head .ms .v.up { color: var(--bull); }
.rsps-head .ms .l { font-size: 9px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-2); }

.rsps-body {
  display: grid;
  grid-template-columns: 1.2fr 1px 1fr 1px 1fr;
  padding: 28px 32px; gap: 32px;
  position: relative; z-index: 1;
}
.rsps-divider { width: 1px; background: var(--hairline); }

.rsps-block-label {
  font-size: 10px; letter-spacing: 0.20em; text-transform: uppercase;
  color: var(--text-2); font-weight: 500; margin-bottom: 16px;
}
.position-row {
  display: grid; grid-template-columns: 50px 1fr 60px;
  gap: 12px; align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--hairline);
}
.position-row:last-child { border-bottom: none; }
.position-asset { font-family: var(--font-mono); font-size: 13px; color: var(--text); font-weight: 600; letter-spacing: 0.04em; }
.position-bar { height: 6px; background: var(--surface-2); border-radius: 2px; position: relative; overflow: hidden; }
.position-bar-fill { position: absolute; top: 0; bottom: 0; left: 0; border-radius: 2px; }
.position-bar-fill.btc { background: linear-gradient(90deg, var(--accent-dim), var(--accent)); }
.position-bar-fill.eth { background: linear-gradient(90deg, #6B5BD3, var(--purple)); }
.position-bar-fill.cash { background: linear-gradient(90deg, #5A5853, var(--text-2)); }
.position-pct { font-family: var(--font-mono); font-size: 13px; color: var(--text); font-weight: 600; text-align: right; }

.action-big {
  font-family: var(--font-serif);
  font-size: 64px; line-height: 1;
  color: var(--accent); font-weight: 500;
  letter-spacing: -0.04em; margin-bottom: 14px;
}
.action-sub { font-size: 13px; color: var(--text-2); margin-bottom: 18px; }
.action-sub .key { color: var(--text); font-weight: 500; }
.action-meta { display: flex; gap: 18px; padding-top: 14px; border-top: 1px solid var(--hairline); }
.action-meta .m { display: flex; flex-direction: column; gap: 2px; }
.action-meta .m .v { font-family: var(--font-mono); font-size: 13px; color: var(--text); font-weight: 600; }
.action-meta .m .l { font-size: 9px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-2); }

.edge-big {
  font-family: var(--font-mono);
  font-size: 80px; line-height: 1;
  color: var(--accent); font-weight: 600;
  letter-spacing: -0.04em; margin-bottom: 8px;
}
.edge-big .o10 { color: var(--text-2); font-size: 32px; margin-left: 4px; }
.edge-sub { font-size: 13px; color: var(--text-2); margin-bottom: 18px; }
.edge-bar { height: 8px; background: var(--surface-2); border-radius: 2px; overflow: hidden; margin-bottom: 14px; }
.edge-bar-fill { height: 100%; background: linear-gradient(90deg, var(--bull) 0%, var(--accent) 100%); border-radius: 2px; }
.edge-zones { display: flex; justify-content: space-between; font-size: 9px; color: var(--text-3); letter-spacing: 0.12em; }

.rsps-foot {
  display: flex; align-items: center; gap: 18px;
  padding: 18px 32px;
  border-top: 1px solid var(--accent-soft);
  background: rgba(0, 0, 0, 0.18);
  position: relative; z-index: 1;
}
.rsps-foot .activity { font-size: 12px; color: var(--text-2); flex: 1; }
.rsps-foot .activity .key { color: var(--text); }
.rsps-foot .activity .ts { color: var(--accent); font-family: var(--font-mono); font-weight: 500; }
.btn-accent {
  background: var(--accent); color: var(--bg);
  padding: 11px 22px; border: none; border-radius: 5px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; cursor: pointer; font-family: inherit;
}
.btn-accent:hover { opacity: 0.9; }
.btn-outline {
  background: transparent; color: var(--text);
  border: 1px solid var(--border-strong); padding: 11px 22px; border-radius: 5px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; cursor: pointer; font-family: inherit;
}
.btn-outline:hover { background: var(--surface-2); }

/* ═══════════ SECONDARY ROW — Cycle Z + FV LIQ (15%) ═══════════ */
.secondary-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 20px; }
.sec-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 18px 22px;
  display: flex; flex-direction: column;
  cursor: pointer;
  transition: border-color 0.15s;
}
.sec-card:hover { border-color: var(--border-strong); }
.sec-eyebrow {
  font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--text-2); font-weight: 500; margin-bottom: 6px;
  display: flex; align-items: center; gap: 8px;
}
.sec-eyebrow .tag { color: var(--accent); }
.sec-eyebrow .pct {
  background: var(--accent-soft); color: var(--accent);
  padding: 2px 6px; border-radius: 3px;
  font-size: 8px; font-weight: 700; letter-spacing: 0.08em;
  margin-left: auto;
}
.sec-title { font-family: var(--font-serif); font-size: 14px; color: var(--text); margin-bottom: 12px; font-weight: 500; }
.sec-row { display: flex; align-items: baseline; gap: 14px; margin-bottom: 8px; }
.sec-big { font-family: var(--font-mono); font-size: 32px; color: var(--accent); font-weight: 600; line-height: 1; letter-spacing: -0.02em; }
.sec-pill {
  font-size: 9px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--bull); background: var(--bull-soft);
  padding: 4px 9px; border-radius: 3px; font-weight: 600;
  border: 1px solid rgba(79, 191, 143, 0.25);
}
.sec-pill.warn { color: var(--warn); background: rgba(242, 201, 76, 0.10); border-color: rgba(242, 201, 76, 0.25); }
.sec-pill.muted { color: var(--text-2); background: var(--surface-2); border-color: var(--border); }
.sec-sub { font-size: 11px; color: var(--text-2); margin-top: 4px; line-height: 1.4; }
.sec-spark { margin-top: 14px; }

/* ═══════════ LAYOUT 2 COLUNAS — main + sidebar (V5.3 · mock Leo) ═══════════ */
.ctl-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 14px; align-items: start; }
.ctl-main { min-width: 0; }
.ctl-side { display: flex; flex-direction: column; gap: 12px; }
.side-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 18px;
  display: flex; flex-direction: column; gap: 4px;
  transition: border-color 0.15s;
}
.side-card:hover { border-color: var(--border-strong); }
.side-card .l { font-size: 9px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-2); font-weight: 500; }
.side-card .v { font-family: var(--font-serif); font-size: 17px; color: var(--text); font-weight: 500; }
.side-card .v.bull { color: var(--bull); }
.side-card .v.bear { color: var(--bear); }
.side-card .v.accent { color: var(--accent); font-family: var(--font-mono); font-weight: 600; }
.side-card .c { font-size: 10px; color: var(--text-3); line-height: 1.4; }
.gx-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; margin-top: 8px; }
.gx { display: flex; flex-direction: column; gap: 2px; }
.gx .gl { font-size: 8px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-2); }
.gx .gv { font-family: var(--font-mono); font-size: 13px; color: var(--text); font-weight: 600; }
.gx .gv.accent { color: var(--accent); }
.gx .gv.bull { color: var(--bull); }
.gx .gv.bear { color: var(--bear); }
.gx .gc { font-size: 9px; color: var(--text-3); line-height: 1.3; }
@media (max-width: 1100px) {
  .ctl-layout { grid-template-columns: 1fr; }
  .ctl-side { display: grid; grid-template-columns: 1fr 1fr; }
  .side-gamma { grid-column: 1 / -1; }
}

/* ═══════════ STRIPS — Macro / GEX (10% cada) ═══════════ */
.strip-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px 24px;
  margin-bottom: 14px;
  display: flex; align-items: center; gap: 0;
}
.strip-label {
  display: flex; flex-direction: column; gap: 3px;
  padding-right: 22px;
  border-right: 1px solid var(--hairline);
  min-width: 170px;
}
.strip-label .eyebrow { font-size: 9px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-2); font-weight: 500; }
.strip-label .title { font-family: var(--font-serif); font-size: 15px; color: var(--text); font-weight: 500; }
.strip-label .pct { font-size: 8px; color: var(--accent); letter-spacing: 0.10em; font-weight: 600; margin-top: 2px; }
.strip-cells { flex: 1; display: flex; }
.strip-cell {
  flex: 1; padding: 0 22px;
  border-right: 1px solid var(--hairline);
  display: flex; flex-direction: column; gap: 3px;
}
.strip-cell:last-child { border-right: none; }
.strip-cell .l { font-size: 9px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-2); font-weight: 500; }
.strip-cell .v { font-family: var(--font-serif); font-size: 15px; color: var(--text); font-weight: 500; }
.strip-cell .v.bull { color: var(--bull); }
.strip-cell .v.bear { color: var(--bear); }
.strip-cell .v.accent { color: var(--accent); font-family: var(--font-mono); font-weight: 600; }
.strip-cell .c { font-size: 10px; color: var(--text-3); }

/* ═══════════ TAPE STRIP (5%) ═══════════ */
.tape-strip {
  display: flex; align-items: center;
  padding: 12px 0;
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  margin: 22px 0 28px;
  font-family: var(--font-mono);
  font-size: 11px;
  overflow: hidden;
}
.tape-label {
  display: flex; align-items: center; gap: 8px;
  padding: 0 22px 0 4px;
  color: var(--text-2);
  letter-spacing: 0.16em; text-transform: uppercase;
  border-right: 1px solid var(--hairline); font-weight: 600;
  white-space: nowrap;
}
.tape-label .pulse { width: 6px; height: 6px; border-radius: 50%; background: var(--bull); box-shadow: 0 0 8px var(--bull); animation: ruga-pulse 2s infinite; }
.tape-track { flex: 1; display: flex; gap: 26px; padding-left: 22px; overflow: hidden; white-space: nowrap; }
.tape-item { display: flex; align-items: baseline; gap: 6px; color: var(--text-2); }
.tape-item .sym { color: var(--text); font-weight: 600; letter-spacing: 0.04em; }
.tape-item .px { color: var(--text); }
.tape-item .delta.up { color: var(--bull); }
.tape-item .delta.down { color: var(--bear); }

/* ═══════════ QUICK NAV (10%) ═══════════ */
.quick-nav { border-top: 1px solid var(--hairline); padding-top: 28px; }
.qn-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 18px; }
.qn-title {
  font-family: var(--font-serif);
  font-size: 13px; color: var(--accent);
  letter-spacing: 0.30em; text-transform: uppercase; font-weight: 500;
}
.qn-sub { font-size: 11px; color: var(--text-3); font-style: italic; font-family: var(--font-serif); }
.qn-grid {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 0;
  border-top: 1px solid var(--hairline);
  border-left: 1px solid var(--hairline);
}
.qn-col {
  border-right: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  padding: 16px 18px;
}
.qn-col-title {
  font-family: var(--font-mono);
  font-size: 9px; letter-spacing: 0.20em; text-transform: uppercase;
  color: var(--text-2); font-weight: 600; margin-bottom: 10px;
}
.qn-link {
  display: block; padding: 4px 0;
  font-family: var(--font-serif);
  font-size: 13px; color: var(--text);
  cursor: pointer; text-decoration: none;
  transition: color 0.15s;
}
.qn-link:hover { color: var(--accent); }
.qn-link::before { content: "·"; color: var(--accent-dim); margin-right: 6px; }

.footer-meta {
  margin-top: 28px; padding-top: 18px;
  border-top: 1px solid var(--hairline);
  display: flex; justify-content: space-between;
  font-size: 10px; color: var(--text-2); letter-spacing: 0.10em;
}
.footer-meta em { color: var(--accent); font-style: normal; }
.footer-meta .left { letter-spacing: 0.16em; text-transform: uppercase; }
.footer-meta .right { text-align: right; }

/* ═══════════ RESPONSIVE ═══════════ */
@media (max-width: 1100px) {
  .rsps-body { grid-template-columns: 1fr; gap: 24px; }
  .rsps-divider { width: 100%; height: 1px; }
  .secondary-row { grid-template-columns: 1fr; }
  .qn-grid { grid-template-columns: repeat(2, 1fr); }
  .strip-section { flex-direction: column; align-items: stretch; gap: 14px; }
  .strip-label { border-right: none; border-bottom: 1px solid var(--hairline); padding: 0 0 12px; }
  .strip-cells { flex-wrap: wrap; }
  .strip-cell { flex: 1 1 40%; padding: 10px 12px 0 0; border-right: none; }
}
@media (max-width: 760px) {
  .topbar-1, .topbar-2 { padding-left: 16px; padding-right: 16px; }
  .page-head, #sectionContainer { padding-left: 16px; padding-right: 16px; }
  .nav-meta { display: none; }
  .head-thesis { font-size: 18px; }
  .rsps-head { flex-wrap: wrap; }
  .rsps-head .meta-stats { margin-left: 0; flex-wrap: wrap; gap: 18px; }
}
