/* ============================================================
 * BBO Investor Hub — Editorial Skin
 * Scoped to body[data-investor="1"] — only applies on the
 * investor sub-routes (dashboard / pipeline / buy-box / messages /
 * embedded /view). Never bleeds into contractor / staff / PM UI.
 *
 * File: /var/www/html/scopecam/investor-hub-editorial.css
 * Loaded: <link> in scopecam/index.html <head>
 * Route-flag: tiny <script> in same <head> flips data-investor on hashchange
 * Rollback: remove the two lines from index.html + restore .bak
 * Author: editorial-refresh subagent 2026-09-27
 * ============================================================ */

/* ---------- 1. Editorial variables (scoped) ---------- */
body[data-investor="1"] {
  --ed-navy:      #0f2033;
  --ed-navy-2:    #152b45;
  --ed-navy-deep: #0b1424;
  --ed-cream:     #f5efe4;
  --ed-cream-2:   #ebe3d2;
  --ed-cream-3:   #faf6ec;
  --ed-gold:      #b89968;
  --ed-gold-2:    #8f7647;
  --ed-gold-bright:#d4b787;
  --ed-ink:       #1b1b1b;
  --ed-muted:     #6a5f4d;
  --ed-border:    #d9ceb5;
  --ed-border-2:  #ebe3d2;
  --ed-card:      #ffffff;
  --ed-burgundy:  #7d3d3d;
  --ed-sage:      #6a7b5f;
  --ed-ok:        #3f8b5c;
  --ed-warn:      #c47b2b;
  --ed-danger:    #b23a3a;
  --ed-shadow:    0 1px 3px rgba(15,32,51,0.08), 0 1px 2px rgba(15,32,51,0.06);
  --ed-shadow-lg: 0 4px 14px rgba(15,32,51,0.10), 0 2px 6px rgba(15,32,51,0.06);
}

/* ---------- 2. Base body + font stack ---------- */
body[data-investor="1"] {
  background: var(--ed-cream) !important;
  color: var(--ed-ink) !important;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body[data-investor="1"] main {
  padding: 20px 18px 40px !important;
  max-width: 900px !important;
}
@media (min-width: 1024px) {
  body[data-investor="1"] main {
    max-width: 1100px !important;
  }
}

/* ---------- 3. Header (top bar) ---------- */
body[data-investor="1"] header {
  background: linear-gradient(135deg, var(--ed-navy) 0%, var(--ed-navy-2) 100%) !important;
  border-bottom: 3px solid var(--ed-gold) !important;
  color: var(--ed-cream) !important;
  padding: 14px 20px !important;
}
body[data-investor="1"] header h1 {
  font-family: 'Playfair Display', Georgia, serif !important;
  font-style: italic !important;
  font-weight: 700 !important;
  font-size: 22px !important;
  color: var(--ed-cream) !important;
  letter-spacing: -0.005em !important;
}
body[data-investor="1"] header h1 .b {
  color: var(--ed-gold-bright) !important;
}
body[data-investor="1"] header .right,
body[data-investor="1"] header a {
  color: #dcd0b5 !important;
}

/* ---------- 4. Cards ---------- */
body[data-investor="1"] .card {
  background: var(--ed-card) !important;
  border: 1px solid var(--ed-border) !important;
  border-radius: 12px !important;
  box-shadow: var(--ed-shadow) !important;
  padding: 18px 20px !important;
  margin: 12px 0 !important;
  color: var(--ed-ink) !important;
}
/* Special-case: gradient buy-box callouts (dark) → light gold-tinted */
body[data-investor="1"] .card[style*="linear-gradient(135deg,#1d2840"],
body[data-investor="1"] .card[style*="linear-gradient(135deg, #1d2840"],
body[data-investor="1"] .card[style*="background:linear-gradient(135deg,#1e3a5f"],
body[data-investor="1"] .card[style*="background: linear-gradient(135deg, #1e3a5f"] {
  background: linear-gradient(135deg, #ffffff 0%, #fdf7ea 100%) !important;
  border: 1px solid var(--ed-gold) !important;
  color: var(--ed-ink) !important;
}
/* Cards with border-left stage stripe — keep the stripe */
body[data-investor="1"] .card[style*="border-left:4px solid"] {
  padding-left: 20px !important;
}
body[data-investor="1"] .card h2,
body[data-investor="1"] .card h3,
body[data-investor="1"] main > h2,
body[data-investor="1"] main > h3 {
  font-family: 'Playfair Display', Georgia, serif !important;
  font-weight: 600 !important;
  color: var(--ed-navy) !important;
  letter-spacing: -0.005em !important;
}
body[data-investor="1"] .card h2 { font-size: 24px !important; font-style: italic !important; }
body[data-investor="1"] .card h3 { font-size: 18px !important; }
body[data-investor="1"] .card p { color: var(--ed-muted) !important; }
body[data-investor="1"] .muted { color: var(--ed-muted) !important; }

/* ---------- 5. Buttons ---------- */
body[data-investor="1"] .btn {
  border-radius: 8px !important;
  font-family: 'Inter', sans-serif !important;
  font-weight: 600 !important;
  letter-spacing: 0.15px !important;
  min-height: 44px !important;
  transition: background .15s ease, border-color .15s ease, color .15s ease, transform .1s ease;
  background: var(--ed-card) !important;
  border: 1px solid var(--ed-border) !important;
  color: var(--ed-navy) !important;
}
body[data-investor="1"] .btn:hover {
  border-color: var(--ed-gold) !important;
  color: var(--ed-navy) !important;
}
body[data-investor="1"] .btn.primary {
  background: var(--ed-navy) !important;
  color: var(--ed-cream) !important;
  border-color: var(--ed-navy) !important;
}
body[data-investor="1"] .btn.primary:hover {
  background: var(--ed-navy-deep) !important;
  border-color: var(--ed-gold) !important;
  color: var(--ed-cream) !important;
}
body[data-investor="1"] .btn.success {
  background: var(--ed-ok) !important;
  border-color: var(--ed-ok) !important;
  color: #fff !important;
}
body[data-investor="1"] .btn.danger {
  background: var(--ed-danger) !important;
  border-color: var(--ed-danger) !important;
  color: #fff !important;
}
body[data-investor="1"] .btn.ghost {
  background: transparent !important;
  color: var(--ed-navy) !important;
  border: 1px solid var(--ed-border) !important;
}
body[data-investor="1"] .btn.ghost:hover {
  background: rgba(184,153,104,0.08) !important;
  border-color: var(--ed-gold) !important;
}

/* ---------- 6. Investor top-nav (renderInvestorTopNav) ---------- */
/* The nav buttons are <a class="btn ghost" style="…background:#0e1729;border:1px solid #26324c;color:#e6ecff…"> */
body[data-investor="1"] a.btn[href*="#/view/dashboard"],
body[data-investor="1"] a.btn[href*="#/view/pipeline"],
body[data-investor="1"] a.btn[href*="#/view/buy-box"],
body[data-investor="1"] a.btn[href*="#/view/messages"],
body[data-investor="1"] a.btn[href*="&classic=1"] {
  background: var(--ed-cream-3) !important;
  color: var(--ed-navy) !important;
  border: 1px solid var(--ed-border) !important;
  border-radius: 9999px !important;
  padding: 8px 16px !important;
  font-size: 12.5px !important;
  font-weight: 700 !important;
  letter-spacing: 0.4px !important;
  text-transform: uppercase !important;
  min-height: 38px !important;
}
body[data-investor="1"] a.btn.primary[href*="#/view/"] {
  background: var(--ed-navy) !important;
  color: var(--ed-cream) !important;
  border-color: var(--ed-navy) !important;
}

/* ---------- 7. Inline dark-navy tiles + anchor cards → cream tiles ---------- */
body[data-investor="1"] [style*="background:#0e1729"],
body[data-investor="1"] [style*="background: #0e1729"] {
  background: var(--ed-card) !important;
  border-color: var(--ed-border) !important;
  color: var(--ed-ink) !important;
  box-shadow: var(--ed-shadow);
}
body[data-investor="1"] [style*="background:#0a1424"],
body[data-investor="1"] [style*="background: #0a1424"],
body[data-investor="1"] [style*="background:#131b2e"],
body[data-investor="1"] [style*="background: #131b2e"],
body[data-investor="1"] [style*="background:#132139"],
body[data-investor="1"] [style*="background: #132139"] {
  background: var(--ed-card) !important;
  border-color: var(--ed-border) !important;
  color: var(--ed-ink) !important;
}
body[data-investor="1"] [style*="background:#1a2438"],
body[data-investor="1"] [style*="background: #1a2438"] {
  background: var(--ed-cream-2) !important;
  color: var(--ed-navy) !important;
}
/* Quick-actions <a> tiles: dark navy → cream card w/ gold arrow */
body[data-investor="1"] a[href*="#/view/"][style*="background:#0e1729"],
body[data-investor="1"] a[href*="#/view/"][style*="background: #0e1729"] {
  background: var(--ed-card) !important;
  border: 1px solid var(--ed-border) !important;
  color: var(--ed-navy) !important;
  box-shadow: var(--ed-shadow) !important;
  transition: transform .1s ease, border-color .12s ease, box-shadow .12s ease !important;
}
body[data-investor="1"] a[href*="#/view/"][style*="background:#0e1729"]:hover,
body[data-investor="1"] a[href*="#/view/"][style*="background: #0e1729"]:hover {
  border-color: var(--ed-gold) !important;
  box-shadow: var(--ed-shadow-lg) !important;
  transform: translateY(-1px);
}
body[data-investor="1"] a[href*="#/view/"] span[style*="color:#3aa0ff"],
body[data-investor="1"] a[href*="#/view/"] span[style*="color: #3aa0ff"] {
  color: var(--ed-gold-2) !important;
}
/* Construction billing gold-tinted card: dark → warm cream w/ gold border */
body[data-investor="1"] .card[style*="linear-gradient(135deg,#1d1810"],
body[data-investor="1"] .card[style*="linear-gradient(135deg, #1d1810"] {
  background: linear-gradient(135deg, #fdf7ea 0%, #f9f0d8 100%) !important;
  border-color: var(--ed-gold) !important;
  color: var(--ed-ink) !important;
}
body[data-investor="1"] .card[style*="linear-gradient(135deg,#1d1810"] h3,
body[data-investor="1"] .card[style*="linear-gradient(135deg, #1d1810"] h3,
body[data-investor="1"] .card[style*="linear-gradient(135deg,#1d1810"] [style*="color:#fbbf24"] {
  color: var(--ed-gold-2) !important;
}
/* Wholesale cockpit nudge: dark navy gradient → subtle cream+gold */
body[data-investor="1"] a[href*="wholesale"][style*="linear-gradient(135deg,#1d2840"],
body[data-investor="1"] a[href*="wholesale"][style*="linear-gradient(135deg, #1d2840"] {
  background: linear-gradient(135deg, var(--ed-navy) 0%, var(--ed-navy-2) 100%) !important;
  border-color: var(--ed-gold) !important;
  color: var(--ed-cream) !important;
}
/* Number values inside stat tiles */
body[data-investor="1"] .card div[style*="font-size:22px"],
body[data-investor="1"] div[style*="font-size:22px"][style*="font-weight:800"] {
  font-family: 'Playfair Display', Georgia, serif !important;
  font-weight: 700 !important;
  font-size: 28px !important;
  color: var(--ed-navy) !important;
  font-variant-numeric: tabular-nums !important;
}
/* Small label pill above value */
body[data-investor="1"] div[style*="font-size:11px"][style*="text-transform:uppercase"] {
  color: var(--ed-gold-2) !important;
  font-weight: 700 !important;
  letter-spacing: 0.7px !important;
  font-size: 10px !important;
}
body[data-investor="1"] div[style*="color:#7d8aa3"] {
  color: var(--ed-muted) !important;
}

/* ---------- 8. Borders / dividers (dark) ---------- */
body[data-investor="1"] div[style*="border:1px solid #26324c"],
body[data-investor="1"] div[style*="border: 1px solid #26324c"],
body[data-investor="1"] div[style*="border-top:1px solid #1f2a44"],
body[data-investor="1"] div[style*="border-top: 1px solid #1f2a44"] {
  border-color: var(--ed-border) !important;
}
body[data-investor="1"] div[style*="border:1px solid #3aa0ff"] {
  border-color: var(--ed-gold) !important;
}
body[data-investor="1"] a[style*="border:1px solid #3aa0ff"] {
  border-color: var(--ed-gold) !important;
  color: var(--ed-navy) !important;
}

/* ---------- 9. Text colours that reference sky accent → gold/burgundy ---------- */
body[data-investor="1"] [style*="color:#3aa0ff"],
body[data-investor="1"] [style*="color: #3aa0ff"] {
  color: var(--ed-gold-2) !important;
}
body[data-investor="1"] [style*="color:#ef4444"],
body[data-investor="1"] [style*="color: #ef4444"] {
  color: var(--ed-danger) !important;
}
body[data-investor="1"] [style*="color:#10b981"],
body[data-investor="1"] [style*="color: #10b981"] {
  color: var(--ed-burgundy) !important;
  font-variant-numeric: tabular-nums !important;
  font-weight: 700 !important;
}
body[data-investor="1"] [style*="color:#f59e0b"],
body[data-investor="1"] [style*="color: #f59e0b"],
body[data-investor="1"] [style*="color:#fbbf24"],
body[data-investor="1"] [style*="color: #fbbf24"] {
  color: var(--ed-gold-2) !important;
}
body[data-investor="1"] [style*="color:#e6ecff"],
body[data-investor="1"] [style*="color: #e6ecff"] {
  color: var(--ed-ink) !important;
}
body[data-investor="1"] [style*="color:#fff"][style*="linear-gradient(135deg,#1d2840"] {
  color: var(--ed-cream) !important;
}

/* Money values — burgundy tabular-nums (opt-in via .money-ed but also aggressive
   attempt on any element with a leading '$') */
body[data-investor="1"] .money {
  color: var(--ed-burgundy) !important;
  font-variant-numeric: tabular-nums !important;
  font-weight: 600 !important;
}

/* ---------- 10. Inputs / selects ---------- */
body[data-investor="1"] input,
body[data-investor="1"] select,
body[data-investor="1"] textarea {
  background: #ffffff !important;
  color: var(--ed-ink) !important;
  border: 1px solid var(--ed-border) !important;
  border-radius: 8px !important;
  font-family: 'Inter', sans-serif !important;
  padding: 11px 13px !important;
  font-size: 14.5px !important;
}
body[data-investor="1"] input:focus,
body[data-investor="1"] select:focus,
body[data-investor="1"] textarea:focus {
  outline: 2px solid var(--ed-gold) !important;
  outline-offset: -1px !important;
  border-color: var(--ed-gold) !important;
}
body[data-investor="1"] label {
  color: var(--ed-gold-2) !important;
  font-size: 10.5px !important;
  font-weight: 700 !important;
  letter-spacing: 0.7px !important;
  text-transform: uppercase !important;
  margin-top: 12px !important;
}
/* Inline-styled selects on pipeline stage dropdown */
body[data-investor="1"] select[style*="background:#0e1729"],
body[data-investor="1"] select[style*="background: #0e1729"] {
  background: var(--ed-cream-3) !important;
  color: var(--ed-navy) !important;
  border-color: var(--ed-border) !important;
}

/* ---------- 11. Buy Box gradient / callouts ---------- */
body[data-investor="1"] .card[style*="linear-gradient"] {
  background: linear-gradient(135deg, #ffffff 0%, #fdf7ea 100%) !important;
  color: var(--ed-ink) !important;
}
body[data-investor="1"] .card[style*="linear-gradient"] [style*="color:#e6ecff"] {
  color: var(--ed-ink) !important;
}
body[data-investor="1"] .card[style*="linear-gradient"] [style*="color:#3aa0ff"] {
  color: var(--ed-gold-2) !important;
}

/* ---------- 12. Deal row hovers / thumbs ---------- */
body[data-investor="1"] div[style*="border-top:1px solid #1f2a44"] {
  border-top-color: var(--ed-border-2) !important;
  transition: background .12s ease;
}
body[data-investor="1"] div[style*="border-top:1px solid #1f2a44"]:hover {
  background: var(--ed-cream-3) !important;
}

/* ---------- 13. Stage pills — keep coloured, refine ---------- */
body[data-investor="1"] span[style*="border-radius:14px"][style*="font-weight:700"] {
  font-family: 'Inter', sans-serif !important;
  font-size: 10px !important;
  letter-spacing: 0.5px !important;
  text-transform: uppercase !important;
  padding: 4px 10px !important;
}

/* ---------- 14. Buttons on dashboard that link deep ---------- */
body[data-investor="1"] .btn.full {
  width: 100% !important;
}

/* ---------- 15. Promo strip at very top (ScopeCam v3 — Editorial banner) ---------- */
/* Redesign to editorial navy strip with subtle gold accent */
body[data-investor="1"] #bbo-v3-preview-banner,
body[data-investor="1"] .bbo-preview-banner {
  background: var(--ed-navy) !important;
  color: var(--ed-cream) !important;
  border-bottom: 1px solid var(--ed-gold) !important;
  font-family: 'Inter', sans-serif !important;
  letter-spacing: 0.6px !important;
  text-transform: uppercase !important;
  font-size: 11px !important;
  font-weight: 600 !important;
}

/* ---------- 16. Message-Sean floating bubble — dim the aqua ---------- */
body[data-investor="1"] [class*="msg-sean"] {
  filter: hue-rotate(-15deg) saturate(0.7);
}

/* ---------- 17. Section headings inside cards ---------- */
body[data-investor="1"] .card > div[style*="font-weight:600"][style*="margin-bottom"] {
  color: var(--ed-navy) !important;
}

/* ---------- 18. Empty states ---------- */
body[data-investor="1"] p[style*="text-align:center"].muted,
body[data-investor="1"] p[style*="text-align: center"].muted {
  font-style: italic !important;
  padding: 24px 12px !important;
  font-size: 14px !important;
}

/* ---------- 19. "Quick actions" tiles on dashboard ---------- */
body[data-investor="1"] main .card + div[style*="grid-template-columns"] > * {
  transition: transform .1s ease, box-shadow .12s ease;
}
body[data-investor="1"] main .card + div[style*="grid-template-columns"] > *:hover {
  transform: translateY(-1px);
  box-shadow: var(--ed-shadow-lg);
}

/* ---------- 20. Mobile tuning ---------- */
@media (max-width: 720px) {
  body[data-investor="1"] header h1 { font-size: 18px !important; }
  body[data-investor="1"] .card h2 { font-size: 20px !important; }
  body[data-investor="1"] div[style*="font-size:22px"][style*="font-weight:800"] { font-size: 22px !important; }
  body[data-investor="1"] a.btn[href*="#/view/"] { font-size: 11px !important; padding: 6px 12px !important; }
}

/* ---------- 21. Kill the promo-banner color if it clashes ---------- */
body[data-investor="1"] .bbo-preview-banner a,
body[data-investor="1"] .bbo-preview-banner button {
  color: var(--ed-gold-bright) !important;
}

/* ---------- 22. Deal analysis-request "New" badges ---------- */
body[data-investor="1"] span[style*="background:#3aa0ff"] {
  background: var(--ed-gold) !important;
  color: var(--ed-navy) !important;
}

/* ---------- 23. Tools marketplace dark tiles → cream + navy border ---------- */
body[data-investor="1"] div[style*="background:#0b1220"],
body[data-investor="1"] div[style*="background: #0b1220"],
body[data-investor="1"] div[style*="background:#0f172a"],
body[data-investor="1"] div[style*="background: #0f172a"] {
  background: var(--ed-card) !important;
  border-color: var(--ed-border) !important;
  color: var(--ed-ink) !important;
}
body[data-investor="1"] div[style*="background:#0b1220"] [style*="color:#e6ecff"],
body[data-investor="1"] div[style*="background: #0b1220"] [style*="color:#e6ecff"] {
  color: var(--ed-ink) !important;
}
