/* ============ Base ============ */
:root {
  --accent: #f5b942;
  --accent-ink: #1a1405;
  --accent-soft: rgba(245, 185, 66, 0.16);
  --navy: #0b1226;
  --navy-2: #121b36;
  --navy-3: #1c2750;
  --bg: #f4f5fa;
  --card: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e6e8f0;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.05), 0 8px 24px rgba(15, 23, 42, 0.05);
  --side: 248px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.45;
  touch-action: manipulation;
}
h1, h2, h3, h4, p { margin: 0; }
h1 { font-size: 26px; letter-spacing: -0.02em; }
h2 { font-size: 20px; letter-spacing: -0.01em; }
h3 { font-size: 16.5px; }
h4 { font-size: 14px; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.hidden { display: none !important; }
.mt { margin-top: 18px; }
.mt-lg { margin-top: 30px; margin-bottom: 14px; }
.ic { display: inline-flex; flex: none; }
.boot { padding: 40px; text-align: center; color: var(--muted); }
.stack { display: flex; flex-direction: column; gap: 16px; }
.print-only { display: none !important; }

/* ============ Layout ============ */
.shell { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); min-height: 100vh; }
.topbar { display: none; }
.sidebar {
  background: var(--navy);
  color: #aab4cc;
  padding: 20px 14px;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.sidebar .grow { flex: 1; }
.brand-row { display: flex; align-items: center; gap: 12px; padding: 0 6px 22px; color: #fff; }
.brand-row small { display: block; color: #8c98b6; font-size: 12px; }
.brand-logo { border-radius: 12px; object-fit: contain; background: #fff; flex: none; }
.brand-logo.default { display: inline-flex; align-items: center; justify-content: center; background: var(--accent); color: var(--accent-ink); }
.nav { display: flex; flex-direction: column; gap: 4px; }
.nav-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; min-height: 46px; font-weight: 500; }
.nav-item:hover { background: var(--navy-2); color: #fff; }
.nav-item.on { background: var(--navy-3); color: #fff; }
.nav-item.on .ic { color: var(--accent); }
.sync-pill { display: none; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 10px; font-size: 12.5px; background: var(--navy-2); }
.sync-pill.off, .sync-pill.busy { display: flex; }
.sync-pill.off { color: #fbbf24; }
.user-card { background: var(--navy-2); border-radius: 16px; padding: 14px; display: flex; flex-direction: column; gap: 2px; color: #fff; }
.user-card small { color: #8c98b6; }
.link-btn { margin-top: 10px; background: none; border: 0; padding: 0; color: #aab4cc; display: inline-flex; gap: 8px; align-items: center; cursor: pointer; font-size: 13px; text-align: left; }
.link-btn:hover { color: #fff; }

.main { min-width: 0; }
.page { max-width: 1120px; margin: 0 auto; padding: 28px 28px 90px; }
.page.narrow { max-width: 820px; }
.page-head { margin-bottom: 20px; }
.page-head.row { display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.page-head p { margin-top: 4px; }
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); margin-bottom: 14px; font-weight: 500; min-height: 36px; }
.back:hover { color: var(--ink); }
.sec-row { display: flex; align-items: baseline; justify-content: space-between; margin: 28px 0 14px; }
.link { color: var(--accent); filter: brightness(0.78); font-weight: 600; display: inline-flex; gap: 6px; align-items: center; }
.sec-title { margin-bottom: 14px; }
.sec-title p { font-size: 13.5px; margin-top: 2px; }
.sec-label { font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }

/* ============ Tarjetas ============ */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card.pad, .pad { padding: 20px; }
.pad-h { padding: 18px 20px 6px; }
.empty, .empty-big { color: var(--muted); }
.empty { padding: 10px 2px; }
.empty-big { text-align: center; padding: 34px 20px; }
.pill { display: inline-block; background: var(--accent-soft); color: var(--ink); padding: 2px 10px; border-radius: 99px; font-size: 12.5px; font-weight: 700; }

/* Hero */
.hero {
  border-radius: 28px;
  padding: 28px;
  color: #fff;
  background: radial-gradient(700px 260px at 100% 0%, var(--accent-soft), transparent 70%), linear-gradient(135deg, #0b1226, #101a38);
  box-shadow: var(--shadow);
}
.hero-hi { color: var(--accent); font-weight: 600; margin-bottom: 6px; }
.hero h1 { font-size: 30px; max-width: 640px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 24px; }
.stat { background: rgba(255, 255, 255, 0.07); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 18px; padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; }
.stat .ic { color: var(--accent); }
.stat b { font-size: 30px; line-height: 1.1; }
.stat span:last-child { color: #aab4cc; font-size: 13.5px; }

/* Tarjetas de herramienta */
.tool-grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.tool-card {
  position: relative;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 22px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: transform 0.15s, box-shadow 0.15s;
}
.tool-card::after { content: ""; position: absolute; top: -34px; right: -34px; width: 120px; height: 120px; border-radius: 50%; background: var(--tc-soft); pointer-events: none; }
.tool-card:hover, .tool-card:focus-visible { transform: translateY(-2px); box-shadow: var(--shadow); outline: none; }
.tool-card .tool-ico { margin-bottom: 8px; }
.tool-cat { font-size: 11.5px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--tc); }
.tool-card p { color: var(--muted); font-size: 14px; flex: 1; }
.tool-go { color: var(--tc); font-weight: 700; display: inline-flex; gap: 6px; align-items: center; margin-top: 8px; }
.tool-ico { display: inline-flex; align-items: center; justify-content: center; border-radius: 14px; flex: none; }

/* Listas */
.rec-list { overflow: hidden; }
.rec-row { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-bottom: 1px solid var(--line); min-height: 64px; }
.rec-row:last-child { border-bottom: 0; }
.rec-row:hover { background: #f8f9fd; }
.rec-main { flex: 1; min-width: 0; }
.rec-sum { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13.5px; }
.rec-date { font-size: 13px; white-space: nowrap; }
.avatar { width: 42px; height: 42px; border-radius: 50%; background: var(--accent-soft); color: var(--ink); font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.avatar.big { width: 56px; height: 56px; font-size: 18px; }
.client-title { display: flex; align-items: center; gap: 14px; }
.search { position: relative; margin-bottom: 14px; }
.search .ic { position: absolute; left: 14px; top: 13px; color: var(--muted); }
.search .input { padding-left: 42px; }
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 20px; align-items: start; }

/* ============ Formularios ============ */
.input {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  font: inherit;
  font-size: 16px;
  color: inherit;
}
textarea.input { resize: vertical; line-height: 1.4; }
.input:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }
.input.compact { min-height: 34px; padding: 4px 8px; font-size: 14px; width: auto; max-width: 240px; }
.ghost-input { border-color: transparent; background: transparent; }
.ghost-input:hover { background: #f4f5fa; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field-label { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.hint { font-size: 12.5px; color: var(--muted); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 14px 0; }
.form-error { color: #b91c1c; font-size: 14px; min-height: 20px; margin: 8px 0; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border: 0; border-radius: 12px;
  font-weight: 600; cursor: pointer; white-space: nowrap;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.primary:not(:disabled):hover { filter: brightness(0.95); }
.btn.ghost { background: #eceef6; }
.btn.ghost:hover { background: #e2e5f0; }
.btn.danger { background: #dc2626; color: #fff; }
.btn.danger-ghost, .danger-ghost { background: #fef2f2; color: #b91c1c; }
.btn.small { min-height: 36px; padding: 0 12px; font-size: 14px; }
.btn.block { width: 100%; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.icon-btn { background: none; border: 0; width: 40px; height: 40px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; color: var(--muted); flex: none; }
.icon-btn.small { width: 34px; height: 34px; }
.icon-btn:hover { background: #eef0f6; color: var(--ink); }

input[type="range"] { width: 100%; height: 30px; accent-color: var(--tc, var(--accent)); }
.range { display: flex; align-items: center; gap: 12px; }
.range-val { min-width: 48px; text-align: right; font-variant-numeric: tabular-nums; }
input.check { width: 24px; height: 24px; accent-color: #16a34a; flex: none; }
input.toggle { appearance: none; -webkit-appearance: none; width: 48px; height: 28px; border-radius: 99px; background: #cbd5e1; position: relative; cursor: pointer; transition: background 0.15s; flex: none; }
input.toggle::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform 0.15s; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
input.toggle:checked { background: var(--accent); }
input.toggle:checked::after { transform: translateX(20px); }
.meter { height: 8px; background: #eceef6; border-radius: 99px; overflow: hidden; flex: 1; }
.meter.big { height: 14px; }
.meter > span { display: block; height: 100%; border-radius: 99px; transition: width 0.25s; }

/* ============ Modal y aviso ============ */
.overlay { position: fixed; inset: 0; background: rgba(11, 18, 38, 0.55); display: flex; align-items: center; justify-content: center; z-index: 100; padding: 16px; }
.modal { background: #fff; border-radius: 22px; width: min(480px, 100%); max-height: 90vh; display: flex; flex-direction: column; box-shadow: 0 30px 80px rgba(0,0,0,.35); }
.modal.wide { width: min(720px, 100%); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px 4px; }
.modal-body { padding: 10px 20px 16px; overflow: auto; display: flex; flex-direction: column; gap: 14px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 12px 20px 18px; }
.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.pick-item { display: flex; align-items: center; gap: 12px; text-align: left; padding: 12px; background: #fff; border: 1px solid var(--line); border-radius: 14px; cursor: pointer; min-height: 64px; }
.pick-item:hover { border-color: var(--tc); background: #fafbff; }
.pick-item small { display: block; }
#toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); background: var(--navy); color: #fff; padding: 12px 20px; border-radius: 12px; opacity: 0; transition: all 0.25s; pointer-events: none; z-index: 200; box-shadow: var(--shadow); }
#toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ============ Acceso ============ */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: radial-gradient(900px 500px at 50% -10%, #1c2a5a, transparent 70%), var(--navy); }
.login-card { background: #fff; border-radius: 24px; padding: 30px; width: min(420px, 100%); box-shadow: 0 30px 80px rgba(0,0,0,.4); }
.login-card .brand-row { color: var(--ink); padding: 0 0 20px; }
.login-card .brand-row small { color: var(--muted); }
.login-card h1 { font-size: 24px; margin-bottom: 6px; }
.login-card form { margin: 18px 0 8px; }
.code-input { text-align: center; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 600; min-height: 50px; }
.login-card details { margin-top: 14px; font-size: 14px; }
.login-card summary { cursor: pointer; min-height: 32px; display: flex; align-items: center; }
.demo-note { margin-top: 16px; font-size: 12.5px; text-align: center; color: #92400e; background: #fef3c7; padding: 6px 10px; border-radius: 8px; }

/* ============ Ajustes ============ */
.page.narrow .card { margin-bottom: 16px; }
.color-row { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatch { width: 38px; height: 38px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1px var(--line); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; color: #fff; padding: 0; }
.swatch.on { box-shadow: 0 0 0 2px var(--ink); }
.color-input { width: 44px; height: 44px; padding: 0; border: 0; background: none; cursor: pointer; }
.logo-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.logo-prev img { width: 56px; height: 56px; object-fit: contain; border-radius: 12px; background: #f4f5fa; border: 1px solid var(--line); }
.switch-list { margin-top: 10px; }
.switch-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); cursor: pointer; min-height: 56px; }
.switch-row:last-child { border-bottom: 0; }
.sw-name { flex: 1; display: flex; flex-direction: column; }
.info-list { list-style: none; padding: 0; margin: 12px 0 0; }
.info-list li { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid var(--line); gap: 12px; }
.info-list li span { color: var(--muted); }

/* ============ Sesion (registro) ============ */
.record-head { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.record-title { flex: 1; min-width: 200px; }
.record-meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 4px; }
.record-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.save-status { font-size: 13px; min-width: 76px; text-align: right; }
.print-head { align-items: center; gap: 12px; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 2px solid var(--ink); }

/* ============ Herramientas ============ */
.tool-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.sticky-col { position: sticky; top: 20px; }
.chart-box .chart { width: 100%; height: auto; max-width: 520px; display: block; margin: 0 auto; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; justify-content: center; font-size: 13px; color: var(--muted); margin-top: 6px; }
.legend i, .wl-bar-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; }
.gap-item { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.gap-item span:nth-child(2) { flex: 1; }
.gap-n { width: 24px; height: 24px; border-radius: 50%; background: var(--accent-soft); font-size: 13px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.wheel-rows { display: flex; flex-direction: column; gap: 12px; }
.wheel-row { border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; }
.wheel-row-head { display: flex; gap: 6px; align-items: center; }
.wheel-row-head .input { font-weight: 600; }
.range-line { display: grid; grid-template-columns: 64px 1fr; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.range-line.goal { --tc: #6366f1; }
.range-line:first-of-type { --tc: #e0a100; }
.list-editor ul { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.list-editor li { display: flex; align-items: center; gap: 4px; }
.add-row { display: flex; gap: 8px; }

/* Exito vs fracaso */
.wl-verdict { font-weight: 700; font-size: 17px; margin-bottom: 12px; }
.wl-verdict.win { color: #15803d; }
.wl-verdict.loss { color: #b91c1c; }
.wl-bar { position: relative; display: flex; height: 38px; border-radius: 99px; overflow: hidden; background: #e5e7eb; }
.wl-bar span { display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; transition: width 0.4s; }
.wl-bar .w { background: #16a34a; }
.wl-bar .l { background: #dc2626; }
.wl-bar.empty .w, .wl-bar.empty .l { background: #d1d5db; }
.wl-bar .mid { position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; background: rgba(255,255,255,.85); }
.wl-bar-legend { display: flex; justify-content: space-between; margin-top: 8px; font-size: 13.5px; color: var(--muted); }
.wl-bullets { margin: 14px 0 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; }
.wl-areas { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.wl-row { display: grid; grid-template-columns: 1fr minmax(100px, 160px) 1fr; align-items: center; gap: 10px; }
.wl-side { display: flex; align-items: center; gap: 8px; }
.wl-side.left { justify-content: flex-end; }
.wl-fill { height: 18px; border-radius: 6px; min-width: 0; transition: width 0.4s; }
.wl-n { font-weight: 700; font-size: 13px; min-width: 14px; text-align: center; }
.wl-label { text-align: center; font-size: 13px; font-weight: 600; line-height: 1.2; }
.wl-label.topw::before { content: "★ "; color: #16a34a; }
.wl-label.topl::after { content: " ⚠"; color: #dc2626; }
.wl-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.wl-col-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.wl-col-head h3 { flex: 1; }
.wl-ico { width: 32px; height: 32px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; color: #fff; }
.wl-add { display: flex; flex-direction: column; gap: 8px; padding-bottom: 16px; border-bottom: 1px dashed var(--line); margin-bottom: 14px; }
.wl-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.wl-meta .input { flex: 1; min-width: 120px; }
.wl-list { display: flex; flex-direction: column; gap: 10px; }
.wl-entry { border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 8px; border-left: 4px solid var(--tc); }
.wl-entry.win { background: #f0fdf4; }
.wl-entry.loss { background: #fef2f2; }
.wl-entry .input { background: rgba(255,255,255,.8); }

/* DISC */
.disc-progress { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; font-size: 13px; color: var(--muted); }
.disc-bars { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
.disc-bar { display: grid; grid-template-columns: 30px 1fr 46px 110px; align-items: center; gap: 10px; }
.disc-k { width: 30px; height: 30px; border-radius: 8px; color: #fff; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }
.disc-type { border-top: 4px solid var(--tc); background: #fafbff; border-radius: 14px; padding: 16px; margin-top: 14px; }
.disc-type h4 { display: flex; align-items: center; gap: 10px; font-size: 17px; margin-bottom: 4px; }
.disc-type .dot { width: 26px; height: 26px; border-radius: 8px; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 14px; }
.disc-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 12px; font-size: 14px; }
.disc-cols ul { margin: 6px 0 0; padding-left: 18px; }
.disc-questions { display: flex; flex-direction: column; gap: 22px; }
.q-text { font-weight: 600; margin-bottom: 10px; display: flex; gap: 10px; }
.q-n { flex: none; width: 26px; height: 26px; border-radius: 50%; background: #ede9fe; color: #6d28d9; font-size: 13px; display: inline-flex; align-items: center; justify-content: center; }
.q-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.q-opt { text-align: left; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer; min-height: 48px; line-height: 1.3; }
.q-opt:hover { border-color: #c4b5fd; }
.q-opt.sel { border-color: #7c3aed; background: #f5f3ff; font-weight: 600; }

/* FODA */
.swot-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.swot-q { border-top: 4px solid var(--tc); }
.swot-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.swot-head > div { flex: 1; }
.swot-letter { width: 36px; height: 36px; border-radius: 10px; color: #fff; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }

/* 5W2H */
.progress-line { display: flex; align-items: center; gap: 12px; }
.act-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.act-n { width: 26px; height: 26px; border-radius: 50%; background: #dcfce7; color: #166534; font-size: 13px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.act-title { flex: 1; font-weight: 700; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.act.done .act-title { text-decoration: line-through; color: var(--muted); }
.act.done { background: #f8fdf9; }
.act-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.act-grid .field.wide { grid-column: 1 / -1; }

/* SMART */
.goal-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.goal-head .sec-label { flex: 1; }
.smart-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 14px; }
.smart-field { display: grid; grid-template-columns: 34px 1fr; gap: 4px 10px; align-items: center; }
.smart-field .input { grid-column: 1 / -1; }
.smart-letter { width: 34px; height: 34px; border-radius: 10px; background: #fee2e2; color: #b91c1c; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }
.ms-box { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.ms-row { display: flex; align-items: center; gap: 8px; width: 100%; }

/* GROW */
.grow-tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.grow-tab { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1.5px solid var(--line); background: #fff; border-radius: 14px; cursor: pointer; text-align: left; min-height: 60px; }
.grow-tab.on { background: var(--tc); border-color: var(--tc); color: #fff; }
.grow-letter { width: 34px; height: 34px; border-radius: 10px; background: color-mix(in srgb, var(--tc) 16%, white); color: var(--tc); font-weight: 800; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.grow-tab.on .grow-letter { background: rgba(255,255,255,.22); color: #fff; }
.grow-name { display: flex; flex-direction: column; font-weight: 700; line-height: 1.2; }
.grow-name small { font-weight: 500; opacity: .75; }
.grow-nav { display: flex; justify-content: space-between; margin-top: 20px; }

/* ===== El Filtro del Exito ===== */
.ft-wrap { display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr); gap: 16px; align-items: stretch; }
.ft-funnel { position: sticky; top: 16px; }
.ft-svg, .mq-svg, .bl-svg { width: 100%; height: auto; display: block; }
.ft-lab { font-size: 12px; font-weight: 700; fill: var(--ink); paint-order: stroke; stroke: #fff; stroke-width: 3px; stroke-linejoin: round; }
.ft-pct { font-size: 22px; font-weight: 800; fill: #1a1405; paint-order: stroke; stroke: rgba(255,255,255,.75); stroke-width: 4px; }
.ft-pulse { animation: ftp 1.6s ease-in-out infinite; }
@keyframes ftp { 50% { opacity: .3; } }
.ft-head { display: grid; grid-template-columns: minmax(0, 1fr) 170px; gap: 10px; }
.ft-big { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.ft-big b { font-size: 46px; line-height: 1; color: var(--c); }
.ft-big span { color: var(--muted); font-weight: 600; }
.ft-item { border-left: 5px solid var(--tc, var(--line)); display: flex; flex-direction: column; gap: 10px; transition: border-color .3s, background .3s; }
.ft-item.weak { background: color-mix(in srgb, var(--tc) 6%, white); }
.ft-item-h { display: flex; gap: 12px; }
.ft-item-h p { font-size: 13.5px; margin-top: 2px; }
.ft-n { width: 34px; height: 34px; border-radius: 10px; background: var(--tc); color: #fff; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; flex: none; }

/* ===== Cree en Ti Mismo ===== */
.card.bl-scene { padding: 0; overflow: hidden; }
.bl-stats { display: grid; grid-template-columns: repeat(3, 1fr); text-align: center; padding: 14px 10px 8px; }
.bl-stats b { display: block; font-size: 26px; }
.bl-stats span { color: var(--muted); font-size: 13px; }
.bl-quote { margin: 0; padding: 4px 20px 18px; text-align: center; color: var(--muted); font-style: italic; font-size: 14px; }
.bl-lab { font-size: 12px; font-weight: 700; fill: #0f172a; paint-order: stroke; stroke: rgba(255,255,255,.85); stroke-width: 3px; stroke-linejoin: round; }
.bl-float { animation: blf 7s ease-in-out infinite alternate; }
@keyframes blf { from { transform: translateX(-8px); } to { transform: translateX(8px); } }
.bl-rays { animation: blr 60s linear infinite; }
@keyframes blr { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .bl-float, .bl-rays, .ft-pulse { animation: none; } }
.bl-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.bl-chip { border: 1.5px dashed var(--line); background: #fff; border-radius: 99px; padding: 6px 12px; cursor: pointer; font-size: 13.5px; min-height: 36px; }
.bl-chip:hover { border-color: var(--accent); background: var(--accent-soft); }
.bl-doubt summary, .mq-info summary { list-style: none; cursor: pointer; }
.bl-doubt summary::-webkit-details-marker, .mq-info summary::-webkit-details-marker { display: none; }
.bl-doubt summary { display: flex; align-items: center; gap: 10px; }
.bl-cloud-ic { font-size: 22px; }
.bl-doubt-title { flex: 1; font-weight: 700; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bl-dots { display: inline-flex; gap: 4px; }
.bl-dots i { width: 10px; height: 10px; border-radius: 50%; background: #e5e7eb; transition: background .3s; }
.bl-dots i.on { background: #16a34a; }
.bl-body { display: flex; flex-direction: column; gap: 14px; margin-top: 16px; border-top: 1px dashed var(--line); padding-top: 16px; }
.bl-step { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 14px; background: #f8f9fc; border-left: 4px solid #e5e7eb; transition: background .3s, border-color .3s; }
.bl-step.done { border-left-color: #16a34a; background: #f0fdf4; }
.bl-step-h { display: flex; gap: 10px; }
.bl-step-h p { font-size: 13px; margin-top: 1px; }
.bl-n { width: 26px; height: 26px; border-radius: 50%; background: #0b1226; color: #fff; font-weight: 800; font-size: 13px; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.bl-step.done .bl-n { background: #16a34a; }
.bl-seg { display: flex; flex-wrap: wrap; gap: 6px; }
.bl-seg-b { border: 1.5px solid var(--line); background: #fff; border-radius: 99px; padding: 6px 14px; cursor: pointer; font-weight: 600; min-height: 38px; }
.bl-seg-b.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.bl-auth { display: flex; flex-direction: column; gap: 6px; }

/* ===== Mapa de Libertad Financiera ===== */
.mq-wrap { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 16px; align-items: stretch; }
.mq-left > .stack { position: sticky; top: 16px; }
.mq-legend { display: flex; justify-content: center; gap: 18px; color: var(--muted); font-size: 13px; margin-top: 6px; }
.mq-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; }
.mq-legend i.solid { background: var(--muted); }
.mq-legend i.ring { border: 2px dashed var(--muted); }
.mq-bar { display: grid; grid-template-columns: minmax(0, 1fr) 46px; gap: 2px 10px; align-items: center; margin-bottom: 10px; }
.mq-bar-l { grid-column: 1 / -1; font-size: 13px; color: var(--muted); font-weight: 600; }
.mq-track { height: 16px; background: #e5e7eb; border-radius: 99px; overflow: hidden; }
.mq-track i { display: block; height: 100%; border-radius: 99px; transition: width .4s; }
.mq-bar b { text-align: right; }
.mq-tabs { margin-bottom: 14px; }
.mq-row { display: grid; grid-template-columns: 14px 118px minmax(0, 1fr); align-items: center; gap: 10px; padding: 4px 0; }
.mq-dot { width: 12px; height: 12px; border-radius: 50%; }
.mq-control { margin-top: 18px; padding-top: 16px; border-top: 1px dashed var(--line); }
.mq-plan { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.mq-step { display: grid; grid-template-columns: 26px minmax(0, 1fr) 26px 140px 34px; gap: 8px; align-items: center; padding: 8px; border-radius: 12px; background: #f8f9fc; border-left: 4px solid var(--tc); }
.mq-step.done .ghost-input { text-decoration: line-through; opacity: .6; }
.mq-tag { display: inline-flex; width: 26px; height: 26px; border-radius: 8px; color: #fff; font-weight: 800; font-size: 13px; align-items: center; justify-content: center; flex: none; }
.mq-info { border: 1px solid var(--line); border-left: 4px solid var(--tc); border-radius: 14px; padding: 12px 14px; }
.mq-info summary { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.mq-info ul { margin: 10px 0 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; }

@media (max-width: 1100px) {
  .ft-wrap, .mq-wrap { grid-template-columns: minmax(0, 1fr); }
  .ft-funnel, .mq-left > .stack { position: static; }
  .ft-funnel { max-width: 460px; margin: 0 auto; }
}
@media (max-width: 640px) {
  .ft-head { grid-template-columns: minmax(0, 1fr); }
  .mq-step { grid-template-columns: 26px minmax(0, 1fr) 26px 34px; }
  .mq-step input[type="date"] { grid-column: 2 / 4; }
  .mq-row { grid-template-columns: 14px 96px minmax(0, 1fr); }
  .bl-stats b { font-size: 22px; }
}

/* ============ Adaptacion tablet / movil ============ */
@media (max-width: 1100px) {
  .tool-grid, .two-col, .wl-cols { grid-template-columns: minmax(0, 1fr); }
  .sticky-col { position: static; }
}
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .topbar { display: flex; align-items: center; padding: 12px 16px; background: var(--navy); position: sticky; top: 0; z-index: 20; }
  .topbar .brand-row { padding: 0; }
  .sidebar { position: fixed; inset: auto 0 0 0; height: auto; flex-direction: row; padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); z-index: 30; border-top: 1px solid var(--navy-3); }
  .sidebar > .brand-row, .sidebar .user-card, .sidebar .grow { display: none; }
  .sync-pill.off, .sync-pill.busy { position: fixed; bottom: 78px; left: 50%; transform: translateX(-50%); background: var(--navy); color: #fbbf24; z-index: 31; }
  .nav { flex-direction: row; width: 100%; justify-content: space-around; }
  .nav-item { flex-direction: column; gap: 2px; font-size: 11.5px; padding: 6px 10px; min-height: 52px; flex: 1; justify-content: center; }
  .page { padding: 18px 16px 120px; }
  #toast { bottom: 90px; }
  .hero h1 { font-size: 24px; }
}
@media (max-width: 640px) {
  .stats { grid-template-columns: 1fr; }
  .form-grid, .act-grid, .smart-grid, .swot-grid, .q-opts, .disc-cols { grid-template-columns: minmax(0, 1fr); }
  .grow-tabs { grid-template-columns: 1fr 1fr; }
  .disc-bar { grid-template-columns: 30px 1fr 42px; }
  .disc-bar .muted { display: none; }
  .rec-date { display: none; }
  .wl-row { grid-template-columns: 1fr 90px 1fr; }
}

/* ============ Impresion / PDF ============ */
@media print {
  body { background: #fff; }
  .sidebar, .topbar, .no-print, .btn, .icon-btn, .wl-add, #toast { display: none !important; }
  .print-only { display: flex !important; }
  .shell { display: block; }
  .page { padding: 0; max-width: none; }
  .card { box-shadow: none; break-inside: avoid; }
  .sticky-col { position: static; }
  .tool-grid, .wl-cols, .swot-grid { grid-template-columns: 1fr 1fr; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
