/* ================================================================
   ProspectMap 3 · tema oscuro futurista
   ================================================================ */
:root {
  color-scheme: dark;
  --bg: #05070d; --bg2: #0a0f1c; --glass: rgba(148, 163, 255, .045); --glass2: rgba(148, 163, 255, .08);
  --line: rgba(148, 163, 255, .12); --line2: rgba(148, 163, 255, .22);
  --ink: #e8edf8; --muted: #8a95b0; --dim: #5d6782;
  --cyan: #22d3ee; --violet: #8b5cf6; --pink: #f472b6; --green: #34d399; --amber: #fbbf24; --red: #f87171; --blue: #60a5fa;
  --grad: linear-gradient(120deg, #22d3ee 0%, #6366f1 55%, #a855f7 100%);
  --glow: 0 0 0 1px rgba(34, 211, 238, .35), 0 8px 30px -6px rgba(34, 211, 238, .45);
  --r: 14px; --r-sm: 10px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Space Grotesk", "Inter", system-ui, sans-serif;
  --rail: 232px;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink); font: 14px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
body::before { /* rejilla + resplandores */
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(900px 500px at 85% -10%, rgba(139, 92, 246, .16), transparent 60%),
    radial-gradient(700px 500px at -10% 110%, rgba(34, 211, 238, .12), transparent 60%),
    linear-gradient(rgba(148, 163, 255, .035) 1px, transparent 1px) 0 0 / 44px 44px,
    linear-gradient(90deg, rgba(148, 163, 255, .035) 1px, transparent 1px) 0 0 / 44px 44px;
}
a { color: var(--cyan); }
h1, h2, h3, h4 { font-family: var(--display); letter-spacing: -.01em; margin: 0; }
h1 { font-size: 26px; } h2 { font-size: 19px; } h3 { font-size: 16px; } h4 { font-size: 14px; }
::selection { background: rgba(34, 211, 238, .3); }
::-webkit-scrollbar { width: 9px; height: 9px; } ::-webkit-scrollbar-thumb { background: rgba(148, 163, 255, .18); border-radius: 9px; }
.hidden { display: none !important; }
.muted { color: var(--muted); } .dim { color: var(--dim); } .small { font-size: 12px; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- controles ---------- */
input, select, textarea, button { font: inherit; color: inherit; }
input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]), select, textarea {
  width: 100%; padding: 10px 12px; border-radius: var(--r-sm); border: 1px solid var(--line);
  background: rgba(5, 8, 18, .6); color: var(--ink); transition: border-color .15s, box-shadow .15s;
}
input::placeholder, textarea::placeholder { color: var(--dim); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(34, 211, 238, .15); }
select option { background: #0b1020; }
textarea { resize: vertical; min-height: 90px; line-height: 1.55; }
input[type=range] { width: 100%; accent-color: var(--cyan); }
input[type=checkbox] { accent-color: var(--cyan); width: 16px; height: 16px; }
label.field { display: grid; gap: 6px; font-size: 12.5px; color: var(--muted); font-weight: 500; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.row { display: flex; gap: 8px; align-items: center; }
.row.wrap { flex-wrap: wrap; } .row.between { justify-content: space-between; } .row.end { justify-content: flex-end; }
.stack { display: grid; gap: 12px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 9px 14px; border-radius: var(--r-sm);
  border: 1px solid var(--line2); background: var(--glass); color: var(--ink); cursor: pointer; font-weight: 500;
  text-decoration: none; white-space: nowrap; transition: transform .12s, background .15s, border-color .15s, box-shadow .15s;
}
.btn:hover { background: var(--glass2); border-color: rgba(34, 211, 238, .5); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: progress; }
.btn.primary { background: var(--grad); border: 0; color: #fff; box-shadow: var(--glow); font-weight: 600; }
.btn.primary:hover { filter: brightness(1.1); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { color: var(--ink); background: var(--glass); }
.btn.danger:hover { border-color: var(--red); color: var(--red); }
.btn.sm { padding: 6px 10px; font-size: 12.5px; border-radius: 8px; }
.btn.lg { padding: 13px 18px; font-size: 15px; }
.btn.block { width: 100%; }
.btn svg { width: 16px; height: 16px; }

.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--glass); font-size: 12.5px; cursor: pointer; user-select: none; transition: all .15s; color: var(--ink); }
.chip:hover { border-color: var(--line2); }
.chip.on, .chip:has(input:checked) { background: rgba(34, 211, 238, .14); border-color: var(--cyan); color: #c9f6ff; box-shadow: 0 0 12px -4px var(--cyan); }
.chip input { display: none; }
.chip b { color: var(--muted); font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }

.pill { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 600; border: 1px solid; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }
.s-nuevo { color: #a5b4fc; border-color: rgba(165, 180, 252, .35); background: rgba(165, 180, 252, .08); }
.s-contactado { color: var(--blue); border-color: rgba(96, 165, 250, .35); background: rgba(96, 165, 250, .08); }
.s-interesado { color: var(--amber); border-color: rgba(251, 191, 36, .35); background: rgba(251, 191, 36, .08); }
.s-cliente { color: var(--green); border-color: rgba(52, 211, 153, .35); background: rgba(52, 211, 153, .08); }
.s-descartado { color: var(--dim); border-color: rgba(93, 103, 130, .4); background: transparent; }
.c-running { color: var(--green); border-color: rgba(52,211,153,.35); } .c-paused { color: var(--amber); border-color: rgba(251,191,36,.35); }
.c-draft { color: var(--muted); border-color: var(--line2); } .c-done { color: var(--cyan); border-color: rgba(34,211,238,.35); }
.m-sent { color: var(--green); } .m-pending, .m-sending { color: var(--muted); } .m-failed { color: var(--red); } .m-skipped { color: var(--dim); }

.card { background: linear-gradient(180deg, rgba(148, 163, 255, .06), rgba(148, 163, 255, .025)); border: 1px solid var(--line);
  border-radius: var(--r); padding: 16px; backdrop-filter: blur(12px); }
.card.hover:hover { border-color: var(--line2); }
.card-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; gap: 10px; }
.card-title h3 { display: flex; align-items: center; gap: 8px; }
.tip { border-left: 3px solid var(--cyan); background: rgba(34, 211, 238, .07); padding: 10px 12px; border-radius: 8px; margin: 10px 0; font-size: 13px; }
.warn { border-left: 3px solid var(--amber); background: rgba(251, 191, 36, .08); padding: 10px 12px; border-radius: 8px; margin: 10px 0; font-size: 13px; }
.err { border-left: 3px solid var(--red); background: rgba(248, 113, 113, .08); padding: 10px 12px; border-radius: 8px; font-size: 13px; }
.empty { text-align: center; color: var(--muted); padding: 30px 10px; }
.empty svg { width: 38px; height: 38px; opacity: .5; margin-bottom: 6px; }

/* ---------- estructura ---------- */
.shell { display: grid; grid-template-columns: var(--rail) 1fr; height: 100vh; }
.rail { border-right: 1px solid var(--line); background: rgba(6, 9, 18, .75); backdrop-filter: blur(16px); display: flex; flex-direction: column; padding: 16px 12px; gap: 4px; z-index: 5; }
.logo { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; font-family: var(--display); font-weight: 700; font-size: 18px; }
.logo-mark { width: 30px; height: 30px; flex: none; }
.nav { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: var(--muted); cursor: pointer; border: 1px solid transparent;
  background: none; text-align: left; width: 100%; font-weight: 500; position: relative; }
.nav svg { width: 19px; height: 19px; flex: none; }
.nav:hover { color: var(--ink); background: var(--glass); }
a.nav { text-decoration: none; }
.nav.active { color: #fff; background: linear-gradient(90deg, rgba(34, 211, 238, .14), rgba(139, 92, 246, .06)); border-color: rgba(34, 211, 238, .25); }
.nav.active::before { content: ""; position: absolute; left: -12px; top: 9px; bottom: 9px; width: 3px; border-radius: 3px; background: var(--grad); box-shadow: 0 0 12px var(--cyan); }
.nav .badge { margin-left: auto; font-size: 11px; padding: 1px 7px; border-radius: 99px; background: rgba(34, 211, 238, .15); color: var(--cyan); }
.rail .spacer { flex: 1; }
.rail .status { font-size: 11.5px; color: var(--dim); padding: 8px 12px; display: flex; align-items: center; gap: 7px; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); animation: pulse 2s infinite; }
@keyframes pulse { 50% { opacity: .4; } }

.stage { position: relative; min-width: 0; height: 100vh; overflow: hidden; }
.view { position: absolute; inset: 0; overflow-y: auto; }
.view.full { padding: 28px 32px 60px; }
.view-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.view-head p { margin: 6px 0 0; color: var(--muted); }
.split { display: grid; grid-template-columns: 430px 1fr; overflow: hidden; }
.side { border-right: 1px solid var(--line); background: rgba(6, 9, 18, .72); backdrop-filter: blur(16px); overflow-y: auto; min-height: 0; z-index: 2; }
.side-panel { padding: 20px 18px 40px; }
.side-panel > h2 { margin-bottom: 4px; }
.side-panel > p.muted { margin: 0 0 16px; font-size: 13px; }
#map { height: 100%; background: #0b0f19; }

.step { display: flex; align-items: center; gap: 10px; font-weight: 600; margin: 18px 0 9px; font-size: 13.5px; }
.step i { font-style: normal; width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; font-size: 12px; background: var(--grad); color: #fff; box-shadow: 0 0 14px -2px var(--cyan); }
.step .aside { margin-left: auto; font-weight: 400; font-size: 12px; }
.geo-results div { padding: 8px 10px; border-radius: 8px; cursor: pointer; font-size: 12.5px; color: var(--muted); }
.geo-results div:hover { background: var(--glass2); color: var(--ink); }
.range-val { font-family: var(--display); font-size: 15px; color: var(--cyan); }

/* filtros */
.fbox { margin-top: 16px; padding: 14px; border: 1px solid var(--line); border-radius: var(--r); background: rgba(10, 15, 28, .6); }
.fsum { font-size: 12.5px; color: var(--muted); margin-bottom: 10px; }
.fsum b { color: var(--ink); font-family: var(--display); font-size: 15px; }
.fgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 8px; }
.fgrid select { padding: 7px 9px; font-size: 12.5px; }
.fgrid select.f-yes { border-color: var(--green); color: #b4f5d8; background: rgba(52, 211, 153, .08); }
.fgrid select.f-no { border-color: var(--red); color: #fecaca; background: rgba(248, 113, 113, .08); }
.fgrid select.f-set { border-color: var(--cyan); background: rgba(34, 211, 238, .08); }
.fbox input[data-f=q] { padding: 7px 10px; font-size: 12.5px; }
.sector-head { display: flex; justify-content: space-between; align-items: baseline; margin: 10px 0 6px; font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.linkbtn { background: none; border: 0; color: var(--cyan); cursor: pointer; font-size: 12px; padding: 0; text-transform: none; letter-spacing: 0; font-weight: 500; }
.toolbar { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.progress { height: 4px; background: var(--line); border-radius: 4px; overflow: hidden; margin-top: 10px; }
.progress > div { height: 100%; width: 0; background: var(--grad); box-shadow: 0 0 10px var(--cyan); transition: width .25s; }

/* tarjetas de negocio */
.list { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 8px; }
.biz { padding: 12px 13px; border: 1px solid var(--line); border-radius: 12px; background: rgba(12, 17, 32, .65); transition: border-color .15s, background .15s; }
.biz:hover { border-color: var(--line2); background: rgba(16, 22, 40, .8); }
.biz.sel { border-color: rgba(34, 211, 238, .55); box-shadow: inset 3px 0 0 var(--cyan); }
.biz-top { display: flex; gap: 10px; align-items: flex-start; }
.biz h4 { font-size: 14px; cursor: pointer; display: flex; gap: 7px; align-items: center; flex-wrap: wrap; }
.biz h4:hover { color: var(--cyan); }
.biz .meta { color: var(--muted); font-size: 12px; margin-top: 2px; }
.biz .meta .sector { color: var(--cyan); font-weight: 500; }
.biz .contact { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 8px; font-size: 12.5px; }
.biz .contact a { color: var(--ink); text-decoration: none; border-bottom: 1px dashed var(--line2); }
.biz .contact a:hover { color: var(--cyan); }
.biz .contact .no { color: #f9a8a8; opacity: .75; }
.biz .actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; align-items: center; }
.biz textarea { min-height: 44px; margin-top: 8px; font-size: 12.5px; padding: 7px 9px; }
.biz .score { margin-left: auto; flex: none; }
.consent { font-size: 11px; padding: 1px 7px; border-radius: 6px; background: rgba(52, 211, 153, .12); color: var(--green); border: 1px solid rgba(52, 211, 153, .3); }
.saved-tag { color: var(--green); font-size: 12px; font-weight: 600; }

/* anillo de puntuación */
.ring { --v: 0; --c: var(--cyan); width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; position: relative;
  background: conic-gradient(var(--c) calc(var(--v) * 1%), rgba(148, 163, 255, .12) 0); font: 600 11.5px var(--display); }
.ring::before { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: #0b1020; }
.ring span { position: relative; }
.ring.lg { width: 92px; height: 92px; font-size: 22px; } .ring.lg::before { inset: 8px; }

/* barra de selección */
.selbar { position: sticky; top: 0; z-index: 3; margin: 12px -18px 0; padding: 10px 18px; background: rgba(8, 12, 24, .92); backdrop-filter: blur(10px);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.selbar .count { font-family: var(--display); font-weight: 600; }
.menu { position: relative; display: inline-block; }
.menu-pop { position: absolute; top: calc(100% + 6px); left: 0; min-width: 190px; background: #0d1324; border: 1px solid var(--line2); border-radius: 12px; padding: 6px;
  box-shadow: 0 20px 50px -10px rgba(0, 0, 0, .7); z-index: 50; display: none; }
.menu.open .menu-pop { display: grid; }
.menu-pop button { text-align: left; background: none; border: 0; padding: 8px 10px; border-radius: 8px; cursor: pointer; color: var(--ink); font-size: 13px; }
.menu-pop button:hover { background: var(--glass2); }

/* ---------- panel de inicio ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 14px; }
.kpi { position: relative; overflow: hidden; }
.kpi .lbl { color: var(--muted); font-size: 12px; font-weight: 500; display: flex; align-items: center; gap: 6px; }
.kpi .val { font: 700 30px/1.1 var(--display); margin-top: 8px; }
.kpi .sub { font-size: 12px; color: var(--dim); margin-top: 4px; }
.kpi::after { content: ""; position: absolute; right: -30px; top: -30px; width: 100px; height: 100px; border-radius: 50%; background: radial-gradient(var(--accent, rgba(34, 211, 238, .25)), transparent 70%); }
.dash { display: grid; grid-template-columns: 1.4fr 1fr; gap: 14px; }
.dash .col { display: grid; gap: 14px; align-content: start; }
.bars { display: grid; gap: 9px; }
.bar-row { display: grid; grid-template-columns: 120px 1fr 44px; align-items: center; gap: 10px; font-size: 12.5px; }
.bar-row .track { height: 8px; background: rgba(148, 163, 255, .08); border-radius: 8px; overflow: hidden; }
.bar-row .fill { height: 100%; border-radius: 8px; background: var(--grad); box-shadow: 0 0 10px -2px var(--cyan); transition: width .6s cubic-bezier(.2, .8, .2, 1); }
.bar-row .n { text-align: right; font-family: var(--display); font-weight: 600; }
.spark { display: flex; align-items: flex-end; gap: 5px; height: 130px; padding-top: 10px; }
.spark div { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 5px; height: 100%; justify-content: flex-end; }
.spark i { width: 100%; border-radius: 6px 6px 2px 2px; background: var(--grad); min-height: 3px; box-shadow: 0 0 12px -3px var(--violet); }
.spark span { font-size: 10px; color: var(--dim); }
.checklist { display: grid; gap: 8px; }
.check { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: rgba(10, 15, 28, .5); cursor: pointer; }
.check .tick { width: 22px; height: 22px; border-radius: 7px; border: 1px solid var(--line2); display: grid; place-items: center; font-size: 13px; }
.check.ok .tick { background: rgba(52, 211, 153, .15); border-color: var(--green); color: var(--green); }
.check:hover { border-color: var(--line2); }
.feed { display: grid; gap: 2px; }
.feed div { display: flex; gap: 10px; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 12.5px; }
.feed div:last-child { border: 0; }
.feed .t { margin-left: auto; color: var(--dim); font-size: 11.5px; }

/* ---------- campañas ---------- */
.camps { display: grid; gap: 12px; }
.camp { display: grid; grid-template-columns: 44px 1fr auto; gap: 14px; align-items: center; }
.camp .ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: rgba(34, 211, 238, .1); border: 1px solid rgba(34, 211, 238, .25); }
.camp .ico.wa { background: rgba(52, 211, 153, .1); border-color: rgba(52, 211, 153, .3); color: var(--green); }
.camp .ico svg { width: 21px; height: 21px; }
.camp h3 { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.camp .stats { display: flex; gap: 14px; font-size: 12px; color: var(--muted); margin-top: 6px; flex-wrap: wrap; }
.camp .stats b { color: var(--ink); font-family: var(--display); }
.camp .progress { margin-top: 9px; }
.camp .acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.stepper { display: flex; gap: 6px; margin-bottom: 18px; }
.stepper div { flex: 1; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); font-size: 12px; color: var(--muted); display: flex; gap: 8px; align-items: center; }
.stepper div b { width: 20px; height: 20px; border-radius: 6px; display: grid; place-items: center; background: var(--glass2); font-size: 11px; }
.stepper div.on { border-color: var(--cyan); color: var(--ink); background: rgba(34, 211, 238, .07); }
.stepper div.on b, .stepper div.ok b { background: var(--grad); color: #fff; }
.vars { display: flex; flex-wrap: wrap; gap: 5px; margin: 6px 0; }
.vars button { font: 12px ui-monospace, monospace; padding: 3px 8px; border-radius: 6px; border: 1px dashed var(--line2); background: none; color: var(--cyan); cursor: pointer; }
.vars button:hover { background: rgba(34, 211, 238, .1); }
.preview { white-space: pre-wrap; font-size: 13px; background: rgba(5, 8, 18, .7); border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
.preview .subj { font-weight: 600; margin-bottom: 8px; color: var(--cyan); }
.scorebar { display: flex; align-items: center; gap: 12px; }
.choice { display: grid; gap: 4px; padding: 14px; border-radius: 12px; border: 1px solid var(--line); background: rgba(10, 15, 28, .5); cursor: pointer; transition: all .15s; }
.choice:hover { border-color: var(--line2); }
.choice.on { border-color: var(--cyan); background: rgba(34, 211, 238, .08); box-shadow: 0 0 20px -8px var(--cyan); }
.choice b { font-family: var(--display); font-size: 14.5px; display: flex; gap: 8px; align-items: center; }
.choice span { font-size: 12.5px; color: var(--muted); }
.days { display: flex; gap: 5px; }
.days label { flex: 1; text-align: center; padding: 7px 0; border-radius: 8px; border: 1px solid var(--line); cursor: pointer; font-size: 12px; }
.days label:has(input:checked) { border-color: var(--cyan); background: rgba(34, 211, 238, .12); }
.days input { display: none; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.tbl th { text-align: left; color: var(--muted); font-weight: 500; padding: 8px; border-bottom: 1px solid var(--line2); position: sticky; top: 0; background: #0b1020; }
.tbl td { padding: 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl tr:hover td { background: rgba(148, 163, 255, .03); }
.wa-bubble { background: #0b3d2e; border: 1px solid rgba(52, 211, 153, .3); border-radius: 12px 12px 12px 3px; padding: 12px 14px; white-space: pre-wrap; font-size: 13.5px; }

/* ---------- competencia ---------- */
.lvl { font: 700 22px var(--display); }
.lvl.Baja, .lvl.Sin { color: var(--green); } .lvl.Media { color: var(--amber); } .lvl.Alta { color: var(--red); }
.mini-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mini-kpis .card { padding: 12px; }
.mini-kpis .val { font: 700 22px var(--display); }
.audit-list { display: grid; gap: 6px; }
.audit-list div { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; background: rgba(10, 15, 28, .55); font-size: 13px; }
.audit-list .ok { color: var(--green); } .audit-list .ko { color: var(--red); }
.audit-list .w { margin-left: auto; color: var(--dim); font-size: 11.5px; }

/* ---------- academia ---------- */
.ac-head { display: grid; grid-template-columns: auto 1fr; gap: 20px; align-items: center; }
.lessons { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.lesson { cursor: pointer; display: grid; gap: 8px; position: relative; }
.lesson:hover { border-color: rgba(34, 211, 238, .45); transform: translateY(-2px); }
.lesson { transition: all .18s; }
.lesson .mod { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--violet); font-weight: 600; }
.lesson .done-mark { position: absolute; top: 14px; right: 14px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: rgba(52, 211, 153, .15); color: var(--green); border: 1px solid var(--green); font-size: 13px; }
.reader { max-width: 760px; }
.reader .body { font-size: 15px; line-height: 1.7; }
.reader .body > :first-child { margin-top: 0; }
.reader .body h4 { margin: 22px 0 8px; font-size: 16px; color: var(--cyan); }
.reader .body pre { white-space: pre-wrap; background: rgba(5, 8, 18, .8); border: 1px solid var(--line); border-radius: 10px; padding: 14px; font-size: 13px; line-height: 1.6; }
.reader .body code { background: rgba(34, 211, 238, .1); color: var(--cyan); padding: 1px 6px; border-radius: 5px; font-size: 13px; }
.reader .body table { width: 100%; border-collapse: collapse; margin: 10px 0; font-size: 13.5px; }
.reader .body th, .reader .body td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; }
.reader .body th { background: var(--glass2); }

/* ---------- ajustes ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.tabs button { background: none; border: 0; padding: 10px 14px; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; font-weight: 500; }
.tabs button.on { color: var(--ink); border-bottom-color: var(--cyan); }
.settings { max-width: 760px; }
.presets { display: flex; gap: 6px; flex-wrap: wrap; }
.code { font: 12.5px ui-monospace, monospace; background: rgba(5, 8, 18, .8); border: 1px solid var(--line); padding: 8px 10px; border-radius: 8px; word-break: break-all; }

/* ---------- modal y avisos ---------- */
dialog.modal { border: 1px solid var(--line2); border-radius: 18px; padding: 0; width: min(640px, 94vw); max-height: 90vh; background: #0a0f1d; color: var(--ink);
  box-shadow: 0 30px 80px -10px rgba(0, 0, 0, .8), 0 0 0 1px rgba(34, 211, 238, .08); }
dialog.modal.wide { width: min(940px, 96vw); }
dialog.modal::backdrop { background: rgba(2, 4, 10, .7); backdrop-filter: blur(4px); }
.modal-in { padding: 22px 24px; overflow-y: auto; max-height: calc(90vh - 2px); }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; gap: 10px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }
.x { background: none; border: 0; color: var(--muted); font-size: 22px; cursor: pointer; line-height: 1; }
.toast { position: fixed; bottom: 22px; left: 50%; transform: translate(-50%, 20px); background: rgba(13, 19, 36, .95); border: 1px solid var(--line2); color: var(--ink);
  padding: 11px 18px; border-radius: 12px; opacity: 0; transition: all .25s; pointer-events: none; z-index: 9999; box-shadow: 0 10px 40px -10px #000; max-width: 90vw; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.bad { border-color: var(--red); }

/* ---------- mapa ---------- */
.leaflet-container { font: inherit; }
.leaflet-tile-pane { filter: invert(1) hue-rotate(195deg) brightness(.92) contrast(.92) saturate(.55); }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: #0d1324; color: var(--ink); border: 1px solid var(--line2); box-shadow: 0 10px 30px #000; }
.leaflet-popup-content { font-size: 13px; margin: 12px 14px; }
.leaflet-popup-content b { font-family: var(--display); font-size: 14px; }
.leaflet-control-zoom a { background: #0d1324 !important; color: var(--ink) !important; border-color: var(--line2) !important; }
.leaflet-control-attribution { background: rgba(5, 7, 13, .7) !important; color: var(--dim) !important; }
.leaflet-control-attribution a { color: var(--muted) !important; }
.marker-cluster-small, .marker-cluster-medium, .marker-cluster-large { background: rgba(34, 211, 238, .2) !important; }
.marker-cluster-small div, .marker-cluster-medium div, .marker-cluster-large div { background: rgba(34, 211, 238, .75) !important; color: #031018; font-weight: 700; }
.center-pin { width: 22px; height: 22px; border-radius: 50%; background: var(--cyan); border: 3px solid #fff; box-shadow: 0 0 0 6px rgba(34, 211, 238, .25), 0 0 24px var(--cyan); }
.map-legend { position: absolute; right: 12px; bottom: 26px; z-index: 500; background: rgba(8, 12, 24, .88); border: 1px solid var(--line2); border-radius: 10px; padding: 8px 12px; font-size: 12px; display: grid; gap: 4px; }
.map-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 7px; }

/* ---------- login y baja ---------- */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 20px; overflow: hidden; }
.auth-card { width: min(400px, 100%); padding: 34px 30px; border-radius: 22px; border: 1px solid var(--line2); background: rgba(10, 15, 29, .75); backdrop-filter: blur(20px);
  box-shadow: 0 40px 100px -20px rgba(0, 0, 0, .8), 0 0 60px -20px rgba(34, 211, 238, .3); display: grid; gap: 14px; position: relative; }
.auth-card::before { content: ""; position: absolute; inset: -1px; border-radius: 22px; padding: 1px; background: var(--grad); opacity: .5;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none; }
.auth-card h1 { font-size: 28px; }
.auth-card .logo { padding: 0; justify-content: center; font-size: 22px; }
.auth-card .logo-mark { width: 42px; height: 42px; }
.orbit { position: fixed; width: 720px; height: 720px; border-radius: 50%; border: 1px solid rgba(34, 211, 238, .12); left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 0; }
.orbit::before, .orbit::after { content: ""; position: absolute; inset: 90px; border-radius: 50%; border: 1px dashed rgba(139, 92, 246, .18); animation: spin 60s linear infinite; }
.orbit::after { inset: 200px; border-style: solid; border-color: rgba(34, 211, 238, .1); animation-duration: 90s; animation-direction: reverse; }
.orbit i { position: absolute; top: -5px; left: 50%; width: 10px; height: 10px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 20px var(--cyan); }
.orbit-wrap { position: fixed; inset: 0; animation: spin 40s linear infinite; z-index: 0; transform-origin: 50% 50%; pointer-events: none; }
.auth { position: relative; z-index: 1; }
@keyframes spin { to { transform: rotate(360deg); } }
.orbit-wrap .orbit { animation: none; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) { .dash { grid-template-columns: 1fr; } :root { --rail: 72px; } .rail .lbl, .logo span, .rail .status span, .nav .badge { display: none; } .nav { justify-content: center; } }
@media (max-width: 820px) {
  .shell { grid-template-columns: 1fr; grid-template-rows: 1fr 62px; }
  .rail { grid-row: 2; flex-direction: row; padding: 6px; border-right: 0; border-top: 1px solid var(--line); overflow-x: auto; }
  .rail .logo, .rail .spacer, .rail .status { display: none; }
  .nav { padding: 10px; } .nav.active::before { display: none; }
  .stage { height: calc(100vh - 62px); }
  .split { grid-template-columns: 1fr; grid-template-rows: 40vh 1fr; }
  .split #mapWrap { grid-row: 1; } .side { grid-row: 2; border-right: 0; border-top: 1px solid var(--line); }
  .view.full { padding: 18px 16px 40px; }
  .grid2, .grid3 { grid-template-columns: 1fr; }
  .camp { grid-template-columns: 1fr; } .camp .ico { display: none; } .camp .acts { justify-content: flex-start; }
}
