/* ─────────────────────────────────────────────
   SOLERA · Founders Hub 50+ · Identidad de foundershub50.com
   ───────────────────────────────────────────── */
:root {
  --bg: #09080a;
  --bg-2: #110e0f;
  --card: rgba(255,255,255,.035);
  --card-hover: rgba(255,255,255,.06);
  --border: rgba(255,150,110,.16);
  --border-strong: rgba(255,150,110,.38);
  --text: #f7f3f1;
  --muted: #b3aaa6;
  --dim: #7a706c;
  --accent: #ff5a36;
  --accent-2: #ff8a5c;
  --accent-3: #ffb547;
  --ok: #7fd6a4;
  --glow: rgba(255,90,54,.45);
  --radius: 22px;
  --font: "Space Grotesk", system-ui, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body { font-family: var(--font); background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
button, input, textarea { font-family: inherit; color: inherit; }
em { font-style: normal; background: linear-gradient(90deg, var(--accent-3), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }

.logo { display: flex; align-items: center; gap: 10px; white-space: nowrap; text-decoration: none; }
.logo b { font-size: 18px; font-weight: 700; letter-spacing: -0.01em; }
.logo b i { font-style: normal; color: var(--accent-2); }
.logo small { font-size: 11px; color: var(--dim); text-transform: uppercase; letter-spacing: .1em; }

.label { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); padding: 6px 14px; border-radius: 999px; background: var(--card); border: 1px solid var(--border); }
.label::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 13px 24px; border-radius: 999px; font-weight: 600; font-size: 15px; border: 1px solid transparent; cursor: pointer; transition: transform .15s, box-shadow .2s, background .2s; text-decoration: none; }
.btn:hover { transform: translateY(-2px); }
.btn-ember { background: linear-gradient(180deg, #ff7a55, var(--accent)); color: #fff; box-shadow: 0 8px 30px -8px var(--glow), inset 0 1px 0 rgba(255,255,255,.25); }
.btn-ink { background: var(--card); color: var(--text); border-color: var(--border-strong); }
.btn-ink:hover { background: var(--card-hover); }
.btn-sm { padding: 8px 16px; font-size: 13px; }

.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); position: relative; overflow: hidden; }
.card.glow::before { content: ""; position: absolute; width: 260px; height: 260px; left: -80px; top: -120px; background: radial-gradient(closest-side, rgba(255,90,54,.18), transparent); pointer-events: none; }

/* ── Login ── */
.login { min-height: 100%; display: grid; place-items: center; padding: 40px 20px; position: relative; overflow: hidden; }
.login::before { content: ""; position: absolute; left: 50%; top: -320px; width: 1100px; height: 800px; transform: translateX(-50%); background: radial-gradient(closest-side, rgba(255,90,54,.30), transparent); pointer-events: none; }
.login-box { position: relative; width: 100%; max-width: 420px; text-align: center; }
.login-box .logo { justify-content: center; margin-bottom: 28px; }
.login-box h1 { font-size: 40px; line-height: 1.1; letter-spacing: -0.02em; margin: 18px 0 10px; }
.login-box > p { color: var(--muted); margin-bottom: 30px; }
.login-card { padding: 32px; text-align: left; }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--dim); margin-bottom: 8px; }
.field input { width: 100%; padding: 13px 16px; border-radius: 14px; background: rgba(0,0,0,.35); border: 1px solid var(--border); font-size: 15px; outline: none; transition: border-color .2s; }
.field input:focus { border-color: var(--accent-2); }
.login-card .btn { width: 100%; margin-top: 6px; }
.error { color: #ff9c85; font-size: 14px; min-height: 20px; margin-top: 12px; }
.login-foot { margin-top: 24px; font-size: 13px; color: var(--dim); }

/* ── App ── */
.topbar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 24px; background: rgba(9,8,10,.82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--border); }
.topbar .who { display: flex; align-items: center; gap: 14px; font-size: 14px; color: var(--muted); }
.topbar .who strong { color: var(--text); }
.path-chip { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-2); padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border-strong); background: rgba(255,90,54,.08); }
.demo-chip { font-size: 12px; color: var(--accent-3); padding: 6px 12px; border-radius: 999px; border: 1px dashed rgba(255,181,71,.45); }
.link-btn { background: none; border: none; color: var(--dim); cursor: pointer; font-size: 13px; }
.link-btn:hover { color: var(--text); }

.layout { display: grid; grid-template-columns: 250px 1fr; min-height: calc(100% - 65px); }
.side { padding: 22px 16px; border-right: 1px solid var(--border); background: var(--bg-2); display: flex; flex-direction: column; gap: 18px; }
.side h4, .mini-h { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); font-weight: 600; }
.nav { display: flex; flex-direction: column; gap: 4px; margin-top: 10px; }
.nav button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border-radius: 14px; background: none; border: 1px solid transparent; cursor: pointer; text-align: left; font-size: 14px; color: var(--muted); transition: background .15s, color .15s; }
.nav button:hover { background: var(--card); color: var(--text); }
.nav button.active { background: linear-gradient(160deg, rgba(255,90,54,.22), rgba(255,255,255,.02)); border-color: var(--border-strong); color: var(--text); }
.nav .av { width: 28px; height: 28px; flex: none; border-radius: 9px; display: grid; place-items: center; font-size: 12px; font-weight: 700; background: #1a0f0c; border: 1px solid var(--border); color: var(--accent-2); }
.phase-box { margin-top: auto; padding: 20px 18px; }
.phase-box .big { font-size: 24px; font-weight: 700; margin: 6px 0 14px; letter-spacing: -0.01em; }
.bar { height: 6px; border-radius: 999px; background: rgba(255,255,255,.08); overflow: hidden; }
.bar span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--accent), var(--accent-3)); box-shadow: 0 0 12px var(--glow); }
.phase-box .pct { font-size: 12px; color: var(--dim); margin: 8px 0 16px; }
.metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 10px; border-top: 1px solid var(--border); padding-top: 16px; }
.metrics b { font-size: 20px; display: block; }
.metrics small { font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); }

.main { padding: 26px 28px 40px; overflow: auto; }
.view { display: none; }
.view.active { display: block; }
.head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 18px; flex-wrap: wrap; }
.head-row h1 { font-size: 30px; letter-spacing: -0.02em; line-height: 1.1; }
.head-row p { color: var(--muted); margin-top: 6px; }

/* Fases */
.phases { display: grid; grid-template-columns: repeat(var(--n, 5), minmax(0, 1fr)); gap: 12px; padding: 18px; margin-bottom: 18px; }
.ph { padding: 14px 14px 16px; border-radius: 16px; border: 1px solid transparent; }
.ph.current { border-color: var(--border-strong); background: linear-gradient(160deg, rgba(255,90,54,.18), rgba(255,255,255,.02)); box-shadow: 0 16px 40px -24px var(--glow); }
.ph-title { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15px; }
.ph-n { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; border: 1px solid var(--border-strong); color: var(--dim); flex: none; }
.ph.done .ph-n { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 0 12px var(--glow); }
.ph.current .ph-n { background: #1a0f0c; color: var(--accent-2); border-color: var(--accent-2); }
.ph-state { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); margin: 8px 0 10px; }
.ph.current .ph-state { color: var(--accent-2); }
.ph.done .ph-state { color: var(--ok); }
.ph ul { list-style: none; display: grid; gap: 6px; }
.ph li { display: flex; gap: 8px; font-size: 12.5px; color: var(--dim); line-height: 1.35; }
.ph li::before { content: ""; width: 12px; height: 12px; flex: none; margin-top: 2px; border-radius: 4px; border: 1px solid var(--border-strong); }
.ph li.ok { color: var(--muted); }
.ph li.ok::before { background: var(--accent); border-color: var(--accent); }

/* Fila chat + generado */
.row2 { display: grid; grid-template-columns: 1.6fr 1fr; gap: 18px; margin-bottom: 18px; }
.chat { display: flex; flex-direction: column; min-height: 380px; }
.chat-head { display: flex; align-items: center; gap: 14px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.stack { display: flex; }
.stack span { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; font-size: 12px; font-weight: 700; background: #1a0f0c; border: 1px solid var(--border-strong); color: var(--accent-2); margin-left: -6px; }
.stack span:first-child { margin-left: 0; }
.chat-head b { display: block; font-size: 15px; }
.chat-head small { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--ok); }
.msgs { flex: 1; padding: 18px 20px; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; max-height: 460px; }
.chat.full .msgs { max-height: none; min-height: 52vh; }
.msg { max-width: 88%; }
.msg .who-l { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-2); margin-bottom: 6px; font-weight: 600; }
.bubble { padding: 12px 16px; border-radius: 16px; background: rgba(255,255,255,.05); border: 1px solid var(--border); font-size: 14.5px; white-space: normal; }
.bubble p + p { margin-top: 8px; }
.bubble ul { margin: 6px 0 6px 18px; }
.bubble .agent-tag { color: var(--accent-2); font-weight: 700; }
.msg.user { align-self: flex-end; }
.msg.user .bubble { background: linear-gradient(180deg, #ff7a55, var(--accent)); border-color: transparent; color: #fff; }
.msg-actions { margin-top: 8px; display: flex; gap: 8px; }
.msg-actions button { font-size: 12px; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--border); background: none; color: var(--muted); cursor: pointer; }
.msg-actions button:hover { border-color: var(--border-strong); color: var(--text); }
.typing { color: var(--dim); font-size: 13px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 20px 14px; }
.chips button { font-size: 13px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--card); color: var(--muted); cursor: pointer; transition: border-color .15s, color .15s; }
.chips button:hover { border-color: var(--border-strong); color: var(--text); }
.composer { display: flex; gap: 10px; padding: 14px 16px; border-top: 1px solid var(--border); align-items: flex-end; }
.composer textarea { flex: 1; resize: none; min-height: 46px; max-height: 160px; padding: 12px 16px; border-radius: 16px; background: rgba(0,0,0,.35); border: 1px solid var(--border); font-size: 14.5px; outline: none; }
.composer textarea:focus { border-color: var(--accent-2); }
.send { width: 46px; height: 46px; border-radius: 50%; border: none; cursor: pointer; background: linear-gradient(180deg, #ff7a55, var(--accent)); color: #fff; font-size: 18px; box-shadow: 0 8px 24px -8px var(--glow); flex: none; }
.send:disabled { opacity: .5; cursor: default; }

.generated { padding: 24px; display: flex; flex-direction: column; background: linear-gradient(160deg, rgba(255,90,54,.30), rgba(255,138,92,.08) 60%, rgba(255,255,255,.02)); border-color: var(--border-strong); box-shadow: 0 30px 80px -40px var(--glow); }
.gen-top { display: flex; justify-content: space-between; align-items: center; }
.gen-top span:first-child { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: #ffc4ad; font-weight: 600; }
.tag { font-size: 10px; font-weight: 700; letter-spacing: .08em; padding: 3px 8px; border-radius: 6px; border: 1px solid var(--border-strong); color: var(--accent-2); }
.generated h3 { font-size: 22px; line-height: 1.2; margin: 14px 0 4px; letter-spacing: -0.01em; }
.generated .by { font-size: 13px; color: var(--muted); margin-bottom: 16px; }
.generated ul { list-style: none; display: grid; gap: 10px; margin-bottom: 20px; }
.generated li { display: flex; gap: 10px; font-size: 14px; }
.generated li::before { content: "→"; color: var(--accent-2); }
.generated .btn { margin-top: auto; align-self: flex-start; }

/* Tarjetas de módulos */
.row4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.mod { padding: 18px; }
.mod-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.mod-head b { font-size: 15px; flex: 1; }
.mod-head small { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); }
.mod-head .open { background: none; border: none; color: var(--dim); cursor: pointer; font-size: 15px; }
.mod-head .open:hover { color: var(--accent-2); }
.col-h { display: flex; justify-content: space-between; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); margin: 10px 0 6px; }
.task { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 12px; background: rgba(255,255,255,.03); border: 1px solid var(--border); font-size: 13px; margin-bottom: 6px; }
.task i { font-style: normal; width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; font-size: 11px; font-weight: 700; background: #1a0f0c; border: 1px solid var(--border-strong); color: var(--accent-2); flex: none; }
.dec { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.dec:last-child { border-bottom: none; }
.dec .st { font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 3px 8px; border-radius: 6px; flex: none; }
.st.pend { color: var(--accent-3); border: 1px solid rgba(255,181,71,.4); }
.st.ok { color: var(--ok); border: 1px solid rgba(127,214,164,.4); }
.dec small { color: var(--dim); font-size: 12px; display: block; }
.cap { margin-bottom: 12px; }
.cap-top { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 6px; }
.cap-top span:last-child { color: var(--dim); }
.doc { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 12px; font-size: 13px; cursor: pointer; border: 1px solid transparent; width: 100%; background: none; text-align: left; }
.doc:hover { background: var(--card-hover); border-color: var(--border); }
.doc span:first-child { flex: 1; }
.doc .tag { flex: none; }

.wide { max-width: 860px; }
.placeholder { padding: 40px; text-align: center; color: var(--muted); }
.placeholder h3 { color: var(--text); font-size: 20px; margin-bottom: 8px; }

/* Modal documento */
.modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,.65); backdrop-filter: blur(4px); display: none; align-items: center; justify-content: center; padding: 24px; z-index: 50; }
.modal-bg.open { display: flex; }
.modal { width: 100%; max-width: 720px; max-height: 86vh; display: flex; flex-direction: column; background: var(--bg-2); }
.modal-h { padding: 22px 26px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.modal-h h3 { font-size: 22px; line-height: 1.2; }
.modal-h small { color: var(--muted); font-size: 13px; }
.modal-b { padding: 22px 26px; overflow-y: auto; white-space: pre-wrap; color: var(--muted); font-size: 14.5px; line-height: 1.6; }
.modal-f { padding: 16px 26px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; }

@media (max-width: 1200px) { .row4 { grid-template-columns: repeat(2, 1fr); } .phases { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .side { border-right: none; border-bottom: 1px solid var(--border); }
  .phase-box { margin-top: 0; }
  .row2, .row4 { grid-template-columns: 1fr; }
  .phases { grid-template-columns: 1fr 1fr; }
  .topbar .demo-chip { display: none; }
}
.mod-head .nav { margin-top: 0; }
.path-chip, .demo-chip { white-space: nowrap; }
@media (max-width: 900px) {
  .topbar { padding: 12px 16px; }
  .topbar .who > span:not(.path-chip) { display: none; }
  .nav { flex-direction: row; overflow-x: auto; padding-bottom: 4px; }
  .nav button { width: auto; white-space: nowrap; flex: none; }
  .main { padding: 20px 16px 32px; }
  .head-row h1 { font-size: 24px; }
}
.layout > * { min-width: 0; }
@media (max-width: 900px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .topbar .logo small { display: none; }
  .phases, .row2 > *, .row4 > * { min-width: 0; }
}
@media (max-width: 560px) { .phases { grid-template-columns: 1fr; } }

/* Selector de caso (C-Level / Consulting / Founder) */
.switch { display: flex; gap: 4px; padding: 4px; border-radius: 999px; border: 1px solid var(--border); background: var(--card); }
.switch button { border: none; background: none; cursor: pointer; padding: 6px 12px; border-radius: 999px; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--dim); white-space: nowrap; }
.switch button:hover:not(:disabled) { color: var(--text); }
.switch button.active { background: linear-gradient(180deg, #ff7a55, var(--accent)); color: #fff; box-shadow: 0 6px 18px -8px var(--glow); }
.switch button:disabled { opacity: .45; cursor: default; }
/* CRM */
.deal { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.deal:last-child { border-bottom: none; }
.deal .ini { width: 28px; height: 28px; flex: none; border-radius: 8px; display: grid; place-items: center; font-size: 10px; font-weight: 700; background: #1a0f0c; border: 1px solid var(--border-strong); color: var(--accent-2); }
.deal .n { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.deal .v { font-weight: 600; flex: none; }
.st.work { color: var(--accent-2); border: 1px solid var(--border-strong); }
.st.cold { color: var(--dim); border: 1px solid var(--border); }
/* Canvas */
.canvas { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.blk { padding: 10px 8px; min-height: 52px; border-radius: 10px; font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: var(--dim); border: 1px solid var(--border); background: rgba(255,255,255,.02); line-height: 1.3; }
.blk.ok { color: #fff; border-color: transparent; background: linear-gradient(160deg, rgba(255,90,54,.55), rgba(255,138,92,.25)); }
.blk.work { color: var(--accent-2); border-color: var(--border-strong); background: rgba(255,90,54,.08); }
.legend { display: flex; gap: 14px; margin-top: 12px; font-size: 11px; color: var(--dim); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.mod.wide .canvas { gap: 10px; }
.mod.wide .blk { min-height: 90px; font-size: 12px; padding: 14px; }
@media (max-width: 900px) { .switch button { padding: 6px 9px; font-size: 11px; } }
.st { font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 3px 8px; border-radius: 6px; flex: none; }
.deal .st { font-size: 9px; padding: 2px 6px; }
.canvas { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.blk { overflow-wrap: anywhere; hyphens: auto; }
@media (max-width: 900px) {
  .topbar { flex-wrap: wrap; row-gap: 10px; }
  .topbar .who { width: 100%; justify-content: space-between; }
  .switch { overflow-x: auto; max-width: 100%; }
}
.blk { text-transform: none; letter-spacing: 0; font-size: 11px; padding: 8px 7px; overflow-wrap: normal; hyphens: manual; }
.legend { flex-wrap: wrap; gap: 6px 12px; }
.legend span { white-space: nowrap; }
