/* orbita.ai — negro absoluto, haces de luz azul y naranja, bordes que brillan. */
@font-face { font-family: Geist; font-weight: 400; src: url(fonts/geist-400.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: Geist; font-weight: 500; src: url(fonts/geist-500.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: Geist; font-weight: 600; src: url(fonts/geist-600.woff2) format("woff2"); font-display: swap; }

:root {
  /* Paleta */
  --void: #000000;      /* fondo */
  --space: #0A0A0D;     /* superficie */
  --hull: #111116;      /* superficie elevada */
  --hull-2: #1A1A21;    /* hover / inputs */
  --corona: #FF6A2B;    /* naranja: acción */
  --corona-hi: #FF9A5C;
  --ion: #4D8DFF;       /* azul: datos, enlaces */
  --plasma: #8B8FFF;    /* secundario */
  --nova: #34D399;      /* éxito */
  --flare: #FF4D6A;     /* peligro */
  --solar: #FBBF24;     /* aviso */
  --grad-corona: linear-gradient(100deg, #FF5A1F 0%, #FF8A3D 100%);
  --grad-orbit: linear-gradient(100deg, #2F6BFF 0%, #6AA2FF 100%);
  --grad-edge: linear-gradient(90deg, rgba(77,141,255,0) 0%, #4D8DFF 30%, #FF6A2B 70%, rgba(255,106,43,0) 100%);

  /* Roles */
  --bg: var(--void);
  --surface: var(--space);
  --surface-2: var(--hull);
  --border: rgba(255, 255, 255, .08);
  --border-strong: rgba(255, 255, 255, .16);
  --border-input: #5C5F70;
  --text: #F4F5F8;
  --text-muted: #9A9DAB;
  --accent: var(--corona);
  --on-accent: #FFFFFF;
  --danger: var(--flare);
  --danger-bg: rgba(255, 77, 106, .12);
  --warning: var(--solar);
  --warning-bg: rgba(251, 191, 36, .1);
  --success: var(--nova);

  --st-contactado: var(--plasma); --st-reunion: var(--ion); --st-propuesta: var(--corona);
  --st-ganado: var(--nova); --st-perdido: #55586A;

  --r-sm: 10px; --r-md: 12px; --r-lg: 16px; --r-pill: 999px;
  --shadow-card: 0 0 0 1px var(--border), 0 12px 40px rgba(0, 0, 0, .5);
  --shadow-pop: 0 0 0 1px var(--border-strong), 0 30px 90px rgba(0, 0, 0, .7);
  --glow: 0 8px 30px -8px rgba(255, 106, 43, .55);
  --font: Geist, system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: Geist, system-ui, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--font); color: var(--text); font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased;
  background: var(--void);
}
/* Haces de luz diagonales (azul y naranja), fijos detrás de todo */
body::before {
  content: ""; position: fixed; inset: -20%; pointer-events: none; z-index: 0; opacity: .55;
  background:
    linear-gradient(118deg, transparent 52%, rgba(77, 141, 255, .0) 54%, rgba(77, 141, 255, .55) 55.2%, rgba(77, 141, 255, 0) 57%, transparent 60%),
    linear-gradient(118deg, transparent 57%, rgba(255, 106, 43, .45) 58.4%, rgba(255, 106, 43, 0) 60.5%, transparent 64%),
    linear-gradient(118deg, transparent 62%, rgba(77, 141, 255, .3) 63.5%, rgba(77, 141, 255, 0) 66%),
    radial-gradient(900px 600px at 95% 0%, rgba(47, 107, 255, .22), transparent 60%),
    radial-gradient(800px 500px at 0% 100%, rgba(255, 90, 31, .16), transparent 60%);
  filter: blur(6px);
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--ion); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; font-family: var(--display); font-weight: 500; letter-spacing: -.025em; }
h1 { font-size: 32px; line-height: 1.1; }
h2 { font-size: 16px; }
h3 { font-size: 13px; }
.muted { color: var(--text-muted); }
.small { font-size: 12px; }
:focus-visible { outline: 2px solid var(--ion); outline-offset: 2px; }
::selection { background: rgba(255, 106, 43, .35); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #2A2B36; border-radius: 10px; border: 2px solid var(--void); }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- Layout ---------- */
.app { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; position: relative; z-index: 1; }
.nav { background: rgba(6, 6, 9, .78); backdrop-filter: blur(16px); border-right: 1px solid var(--border); color: var(--text-muted); padding: 22px 14px; display: flex; flex-direction: column; gap: 3px; position: sticky; top: 0; height: 100vh; }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 8px 24px; color: var(--text); text-decoration: none !important; }
.brand svg { width: 38px; height: 38px; flex: none; filter: drop-shadow(0 0 10px rgba(255, 106, 43, .35)); }
.brand span { font-family: var(--display); font-size: 19px; font-weight: 600; letter-spacing: -.02em; }
.brand span i { font-style: normal; background: var(--grad-corona); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nav .group { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: #6B6E7E; padding: 14px 12px 6px; font-weight: 700; }
.nav a.item { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: var(--r-md); text-decoration: none; font-weight: 600; color: var(--text-muted); border: 1px solid transparent; transition: background .15s, color .15s; }
.nav a.item:hover { background: var(--hull); color: var(--text); }
.nav a.item.active { background: linear-gradient(90deg, rgba(255, 106, 43, .18), rgba(255, 106, 43, .02)); border-color: rgba(255, 106, 43, .35); color: #fff; }
.nav a.item.active svg { color: var(--corona); }
.nav a.item.radar { background: linear-gradient(90deg, rgba(77, 141, 255, .12), rgba(139, 143, 255, .08)); border-color: rgba(77, 141, 255, .25); color: #fff; }
.nav a.item.radar svg { color: var(--ion); }
.nav a.item.radar.active { border-color: var(--ion); box-shadow: 0 0 18px rgba(77, 141, 255, .25); }
.nav a.item svg { width: 18px; height: 18px; flex: none; }
.nav .count { margin-left: auto; font-size: 11px; background: var(--hull-2); color: var(--text); padding: 1px 8px; border-radius: var(--r-pill); }
.nav a.item.active .count { background: var(--corona); color: var(--on-accent); }
.nav .spacer { flex: 1; }
.nav .foot { font-size: 11px; padding: 10px 12px; color: #6B6E7E; }

.main { min-width: 0; padding: 30px 34px 60px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.page-head .sub { color: var(--text-muted); margin-top: 6px; }
.eyebrow { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--ion); font-weight: 700; margin-bottom: 6px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ---------- Primitivas ---------- */
.btn { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--border-strong); border-radius: var(--r-pill); padding: 9px 16px; font-weight: 700; font-size: 13px; cursor: pointer; background: var(--hull); color: var(--text); transition: transform .08s, background .15s, box-shadow .15s; white-space: nowrap; text-decoration: none !important; }
.btn:hover { background: var(--hull-2); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--grad-corona); color: var(--on-accent); border-color: transparent; box-shadow: var(--glow); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.dark { background: var(--text); color: var(--void); border-color: var(--text); }
.btn.ion { background: var(--grad-orbit); color: #04121A; border-color: transparent; box-shadow: 0 0 22px rgba(77, 141, 255, .3); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--text-muted); }
.btn.ghost:hover { background: var(--hull); color: var(--text); }
.btn.danger { color: var(--flare); }
.btn.sm { padding: 6px 12px; font-size: 12px; }
.btn svg { width: 16px; height: 16px; }
.btn[disabled] { opacity: .45; pointer-events: none; }

.card { background: linear-gradient(180deg, rgba(17, 17, 22, .82), rgba(10, 10, 13, .82)); border-radius: var(--r-lg); box-shadow: var(--shadow-card); padding: 20px; backdrop-filter: blur(8px); }
.card-title { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }

.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field label { font-size: 12px; font-weight: 600; color: var(--text-muted); }
.input, select.input, textarea.input { border: 1px solid var(--border-input); border-radius: var(--r-sm); padding: 9px 11px; background: rgba(5, 6, 11, .6); width: 100%; min-width: 0; color: var(--text); }
.input::placeholder { color: #6B6E7E; }
select.input option { background: var(--space); }
textarea.input { resize: vertical; min-height: 70px; }
.input:focus { outline: none; border-color: var(--ion); box-shadow: 0 0 0 3px rgba(77, 141, 255, .18); }
input[type="date"].input::-webkit-calendar-picker-indicator { filter: invert(.8); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.span2 { grid-column: span 2; }

.chip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: var(--r-pill); font-size: 12px; font-weight: 600; background: var(--hull-2); color: var(--text); white-space: nowrap; border: 1px solid transparent; }
.chip .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.chip.st-contactado, .chip.ls-nuevo { background: rgba(139, 143, 255, .16); color: #C3C5FF; border-color: rgba(139, 143, 255, .35); }
.chip.st-reunion, .chip.ls-contactado { background: rgba(77, 141, 255, .12); color: var(--ion); border-color: rgba(77, 141, 255, .3); }
.chip.st-propuesta, .chip.ls-interesado { background: rgba(255, 106, 43, .14); color: var(--corona-hi); border-color: rgba(255, 106, 43, .35); }
.chip.st-ganado, .chip.ls-convertido, .chip.cs-activo { background: rgba(61, 220, 151, .13); color: var(--nova); border-color: rgba(61, 220, 151, .3); }
.chip.st-perdido, .chip.ls-descartado, .chip.cs-baja { background: rgba(90, 96, 136, .2); color: var(--text-muted); }
.chip.cs-pausado, .chip.warn { background: var(--warning-bg); color: var(--solar); border-color: rgba(255, 200, 87, .25); }
.chip.late { background: var(--danger-bg); color: #FF8A9C; border-color: rgba(255, 84, 112, .3); }
.chip.today { background: var(--text); color: var(--void); }
.chip.ion { background: rgba(77, 141, 255, .1); color: var(--ion); border-color: rgba(77, 141, 255, .25); }

.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tab { border: 1px solid var(--border-strong); background: transparent; color: var(--text-muted); padding: 6px 14px; border-radius: var(--r-pill); font-size: 13px; font-weight: 600; cursor: pointer; }
.tab:hover { color: var(--text); }
.tab.active { background: var(--text); color: var(--void); border-color: var(--text); }
.tab .n { opacity: .6; margin-left: 4px; }

.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.search { position: relative; flex: 1; min-width: 220px; max-width: 360px; }
.search input { padding-left: 34px; border-radius: var(--r-pill); }
.search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 16px; color: var(--text-muted); }

/* ---------- Tabla ---------- */
.table-wrap { background: rgba(10, 10, 13, .85); border-radius: var(--r-lg); box-shadow: var(--shadow-card); overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: #7A7D8E; padding: 13px 14px; border-bottom: 1px solid var(--border); white-space: nowrap; }
td { padding: 12px 14px; border-bottom: 1px solid rgba(255, 255, 255, .06); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr { cursor: pointer; transition: background .12s; }
tbody tr:hover td { background: rgba(77, 141, 255, .04); }
td .name { font-weight: 700; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }

.empty { text-align: center; padding: 48px 20px; color: var(--text-muted); }
.empty .big { font-family: var(--display); font-size: 15px; font-weight: 600; color: var(--text); margin: 14px 0 6px; }
.empty .orb { width: 64px; height: 64px; margin: 0 auto; filter: drop-shadow(0 0 16px rgba(255, 106, 43, .4)); }

/* ---------- Panel ---------- */
.hero { position: relative; overflow: hidden; background: linear-gradient(135deg, #0B0E18 0%, #090A10 55%, #160C08 100%); border: 1px solid var(--border-strong); border-radius: var(--r-lg); padding: 26px 28px; display: grid; grid-template-columns: 1.3fr repeat(3, 1fr); gap: 22px; margin-bottom: 18px; }
.hero::after { content: ""; position: absolute; right: -120px; top: -160px; width: 420px; height: 420px; border-radius: 50%; border: 1px solid rgba(77, 141, 255, .18); transform: rotate(-20deg) scaleY(.35); pointer-events: none; }
.hero::before { content: ""; position: absolute; right: -40px; top: -70px; width: 200px; height: 200px; border-radius: 50%; background: radial-gradient(circle at 60% 40%, transparent 55%, rgba(255, 106, 43, .35) 58%, transparent 72%); pointer-events: none; }
.hero > div { position: relative; z-index: 1; }
.hero .k { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--text-muted); }
.hero .v { font-family: var(--display); font-size: 28px; font-weight: 600; letter-spacing: -.03em; line-height: 1.15; margin-top: 8px; }
.hero .main-k .v { font-size: 42px; background: var(--grad-corona); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .d { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.dash { display: grid; grid-template-columns: 1.2fr 1fr; gap: 18px; }
.funnel-bar { display: grid; grid-template-columns: 96px 1fr 130px; gap: 12px; align-items: center; margin: 10px 0; }
.funnel-bar .bar { height: 22px; border-radius: var(--r-pill); background: rgba(255, 255, 255, .07); overflow: hidden; }
.funnel-bar .bar > div { height: 100%; border-radius: var(--r-pill); min-width: 6px; box-shadow: 0 0 14px currentColor; }
.funnel-bar .val { text-align: right; font-size: 12px; font-variant-numeric: tabular-nums; color: var(--text-muted); }
.funnel-bar .val b { color: var(--text); }
.list { display: flex; flex-direction: column; }
.list .row { display: flex; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid rgba(255, 255, 255, .06); }
.list .row:last-child { border-bottom: 0; }
.list .row .grow { flex: 1; min-width: 0; }
.list .row .t { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list .row.link { cursor: pointer; }
.list .row.link:hover .t { color: var(--ion); }
.alert { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; background: var(--warning-bg); border: 1px solid rgba(255, 200, 87, .25); color: var(--solar); padding: 11px 15px; border-radius: var(--r-md); margin-bottom: 16px; font-weight: 600; }
.alert.ok { background: rgba(61, 220, 151, .1); border-color: rgba(61, 220, 151, .3); color: var(--nova); }
.alert.info { background: rgba(77, 141, 255, .08); border-color: rgba(77, 141, 255, .25); color: var(--ion); }
.alert a { font-weight: 700; color: inherit; text-decoration: underline; }

/* ---------- Kanban ---------- */
.board { display: grid; grid-template-columns: repeat(5, minmax(196px, 1fr)); gap: 14px; overflow-x: auto; padding-bottom: 10px; align-items: start; }
.col { background: rgba(10, 10, 13, .72); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 10px; min-height: 320px; transition: background .15s, border-color .15s; }
.col.over { background: rgba(77, 141, 255, .06); border-color: var(--ion); }
.col-head { padding: 6px 6px 12px; }
.col-head .top { display: flex; align-items: center; gap: 8px; font-family: var(--display); font-size: 12.5px; font-weight: 600; }
.col-head .bullet { width: 9px; height: 9px; border-radius: 50%; box-shadow: 0 0 10px currentColor; }
.col-head .n { margin-left: auto; font-size: 12px; color: var(--text-muted); font-family: var(--font); }
.col-head .sum { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.dcard { background: var(--hull); border: 1px solid var(--border); border-radius: var(--r-md); padding: 12px; margin-bottom: 8px; cursor: grab; border-left: 3px solid transparent; transition: border-color .15s, transform .1s; }
.dcard:hover { border-color: var(--border-strong); transform: translateY(-1px); }
.dcard.dragging { opacity: .4; }
.dcard .t { font-weight: 700; line-height: 1.3; }
.dcard .co { font-size: 12px; color: var(--text-muted); }
.dcard .money { display: flex; gap: 8px; margin: 8px 0 6px; font-size: 12px; font-weight: 700; }
.dcard .meta { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; font-size: 11px; }
.dcard.rot { border-left-color: var(--solar); }
.add-card { width: 100%; justify-content: center; border-style: dashed; background: transparent; }

/* ---------- Drawer / modal ---------- */
.backdrop { position: fixed; inset: 0; background: rgba(2, 3, 8, .65); backdrop-filter: blur(3px); z-index: 40; animation: fade .15s; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 100vw); background: var(--space); border-left: 1px solid var(--border-strong); z-index: 50; box-shadow: var(--shadow-pop); display: flex; flex-direction: column; animation: slide .2s ease-out; }
.drawer-head { padding: 20px 22px 16px; border-bottom: 1px solid var(--border); display: flex; gap: 14px; align-items: flex-start; }
.drawer-head .grow { flex: 1; min-width: 0; }
.drawer-body { padding: 18px 22px 30px; overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: 20px; }
.modal { position: fixed; z-index: 60; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 40px); overflow-y: auto; background: var(--space); border: 1px solid var(--border-strong); border-radius: var(--r-lg); box-shadow: var(--shadow-pop); padding: 24px; animation: pop .15s; }
.modal.wide { width: min(880px, calc(100vw - 32px)); }
.modal h2 { margin-bottom: 6px; }
.modal .foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; flex-wrap: wrap; }
.x { border: 0; background: transparent; cursor: pointer; padding: 6px; border-radius: 8px; color: var(--text-muted); }
.x:hover { background: var(--hull-2); color: var(--text); }
.section-t { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; color: #7A7D8E; margin-bottom: 10px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
@keyframes fade { from { opacity: 0; } }
@keyframes slide { from { transform: translateX(30px); opacity: 0; } }
@keyframes pop { from { transform: translate(-50%, -48%); opacity: 0; } }

.logbox { background: linear-gradient(135deg, rgba(139, 143, 255, .1), rgba(77, 141, 255, .06)); border: 1px solid rgba(139, 143, 255, .25); border-radius: var(--r-md); padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.types { display: flex; gap: 6px; flex-wrap: wrap; }
.types button { border: 1px solid var(--border-strong); background: rgba(5, 6, 11, .5); color: var(--text-muted); padding: 4px 11px; border-radius: var(--r-pill); font-size: 12px; font-weight: 600; cursor: pointer; }
.types button:hover { color: var(--text); }
.types button.on { background: var(--text); color: var(--void); border-color: var(--text); }

.timeline { display: flex; flex-direction: column; }
.tl { display: grid; grid-template-columns: 30px 1fr; gap: 10px; padding: 8px 0; position: relative; }
.tl:not(:last-child)::before { content: ""; position: absolute; left: 14px; top: 38px; bottom: -6px; width: 1px; background: linear-gradient(var(--border-strong), transparent); }
.tl .ic { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; background: var(--hull-2); border: 1px solid var(--border); }
.tl .ic.llamada { border-color: var(--ion); } .tl .ic.email { border-color: var(--plasma); } .tl .ic.reunion { border-color: var(--corona); }
.tl .ic.whatsapp { border-color: var(--nova); } .tl .ic.nota { border-color: var(--solar); }
.tl .when { font-size: 11px; color: var(--text-muted); }

.task { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid rgba(255, 255, 255, .06); }
.task:last-child { border-bottom: 0; }
.task .grow { flex: 1; min-width: 0; }
.task.done .t { text-decoration: line-through; color: var(--text-muted); }
.check { width: 20px; height: 20px; border-radius: 6px; border: 2px solid var(--border-input); background: transparent; cursor: pointer; flex: none; display: grid; place-items: center; padding: 0; }
.check.on { background: var(--nova); border-color: var(--nova); }
.check svg { width: 12px; height: 12px; }

.kv { display: grid; grid-template-columns: 120px 1fr; gap: 7px 12px; font-size: 13px; }
.kv dt { color: var(--text-muted); }
.kv dd { margin: 0; overflow-wrap: anywhere; }

.co-head { display: flex; gap: 16px; align-items: center; }
.avatar { width: 50px; height: 50px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #23263A, #0A0A0D 70%); border: 1px solid var(--border-strong); display: grid; place-items: center; font-family: var(--display); font-weight: 600; font-size: 16px; flex: none; color: var(--corona-hi); box-shadow: inset -6px -6px 14px rgba(255, 106, 43, .18); }
.avatar.sm { width: 32px; height: 32px; font-size: 11px; }
.detail-grid { display: grid; grid-template-columns: 340px 1fr; gap: 18px; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 18px; }

.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); background: var(--text); color: var(--void); padding: 11px 18px; border-radius: var(--r-pill); z-index: 90; font-weight: 700; box-shadow: var(--shadow-pop); animation: fade .2s; max-width: calc(100vw - 32px); }
.toast.err { background: var(--flare); color: #fff; }

.drop { border: 2px dashed var(--border-input); border-radius: var(--r-md); padding: 28px; text-align: center; cursor: pointer; background: rgba(5, 6, 11, .5); display: block; }
.drop.over { background: rgba(77, 141, 255, .08); border-color: var(--ion); }
.map-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; margin: 14px 0; }
.preview { font-size: 12px; max-height: 220px; overflow: auto; border: 1px solid var(--border); border-radius: var(--r-sm); }
.preview td, .preview th { padding: 6px 8px; }
code { font-family: ui-monospace, Menlo, monospace; font-size: 12px; }

/* ---------- Radar (buscador de negocios) ---------- */
.radar-layout { display: grid; grid-template-columns: 290px 1fr; gap: 18px; align-items: start; }
.filters { position: sticky; top: 20px; display: flex; flex-direction: column; gap: 14px; }
.filters .card { padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: rgba(5, 6, 11, .6); border: 1px solid var(--border-input); border-radius: var(--r-pill); padding: 3px; }
.seg button { border: 0; background: transparent; color: var(--text-muted); border-radius: var(--r-pill); padding: 6px 8px; font-size: 12px; font-weight: 700; cursor: pointer; }
.seg button.on { background: var(--text); color: var(--void); }
.range-row { display: flex; gap: 8px; align-items: center; }
.range-row input[type=range] { flex: 1; accent-color: var(--corona); }
.range-row output { min-width: 42px; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.sector-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.sector-chips button { border: 1px solid var(--border-strong); background: transparent; color: var(--text-muted); padding: 3px 10px; border-radius: var(--r-pill); font-size: 11.5px; font-weight: 600; cursor: pointer; }
.sector-chips button:hover, .sector-chips button.on { color: var(--text); border-color: var(--ion); }
.results-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.results-head .grow { flex: 1; }
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.pcard { position: relative; background: linear-gradient(180deg, var(--hull), var(--space)); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; display: flex; flex-direction: column; transition: border-color .15s, transform .12s, box-shadow .15s; cursor: pointer; }
.pcard:hover { border-color: var(--border-strong); transform: translateY(-2px); box-shadow: 0 14px 40px rgba(0, 0, 0, .45); }
.pcard.sel { border-color: var(--corona); box-shadow: 0 0 0 1px var(--corona), var(--glow); }
.pcard.in-crm { opacity: .62; }
.pcard .ph { height: 120px; background: radial-gradient(circle at 70% 30%, rgba(139, 143, 255, .35), transparent 60%), linear-gradient(135deg, #13151F, #0A0A0D); background-size: cover; background-position: center; position: relative; }
.pcard .ph .ini { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--display); font-size: 30px; color: rgba(238, 240, 255, .25); }
.pcard .ph .pick { position: absolute; top: 10px; left: 10px; width: 24px; height: 24px; border-radius: 7px; border: 2px solid #fff; background: rgba(5, 6, 11, .55); display: grid; place-items: center; cursor: pointer; padding: 0; }
.pcard.sel .ph .pick { background: var(--corona); border-color: var(--corona); }
.pcard .ph .pick svg { width: 13px; height: 13px; }
.score { position: absolute; top: 10px; right: 10px; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font-family: var(--display); font-weight: 700; font-size: 14px; color: #fff; background: conic-gradient(var(--c, var(--corona)) calc(var(--p) * 1%), rgba(255, 255, 255, .12) 0); }
.score::before { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: rgba(5, 6, 11, .9); }
.score span { position: relative; }
.score.big { position: relative; top: auto; right: auto; flex: none; width: 74px; height: 74px; font-size: 20px; }
.score.big::before { inset: 6px; }
.pcard .bd { padding: 14px 15px 15px; display: flex; flex-direction: column; gap: 7px; flex: 1; }
.pcard .nm { font-weight: 800; font-size: 15px; line-height: 1.25; }
.pcard .cat { font-size: 12px; color: var(--text-muted); }
.stars { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; }
.stars .s { letter-spacing: 1px; color: var(--solar); }
.stars .s .off { color: #3A3C48; }
.stars .n { color: var(--text-muted); font-weight: 600; font-size: 12px; }
.tags { display: flex; gap: 5px; flex-wrap: wrap; }
.pcard .lines { font-size: 12px; color: var(--text-muted); display: flex; flex-direction: column; gap: 2px; }
.pcard .lines a { color: var(--ion); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pcard .ft { display: flex; gap: 6px; padding: 0 15px 14px; }
.map { height: 640px; border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--border-strong); }
.leaflet-container { background: #050507; font-family: var(--font); }
.leaflet-tile-pane { filter: invert(1) hue-rotate(195deg) brightness(.85) contrast(.9) saturate(.6); }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: var(--space); color: var(--text); border: 1px solid var(--border-strong); }
.leaflet-control-attribution { background: rgba(5, 6, 11, .7) !important; color: var(--text-muted) !important; }
.leaflet-control-attribution a { color: var(--ion) !important; }
.pin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 12px var(--c); background: var(--c); }
.review { border-top: 1px solid var(--border); padding: 12px 0; }
.review:first-child { border-top: 0; padding-top: 0; }
.review .who { display: flex; gap: 8px; align-items: center; font-weight: 700; font-size: 13px; }
.review .txt { font-size: 13px; color: #C9CBD4; margin-top: 4px; white-space: pre-line; }
.audit { display: flex; flex-direction: column; gap: 6px; }
.audit .ok, .audit .ko { display: flex; gap: 8px; font-size: 13px; }
.audit .ok::before { content: "✓"; color: var(--nova); font-weight: 800; }
.audit .ko::before { content: "✕"; color: var(--flare); font-weight: 800; }
.reasons { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.reasons div::before { content: "→ "; color: var(--corona); font-weight: 800; }
.photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.photos img { width: 100%; height: 90px; object-fit: cover; border-radius: 10px; border: 1px solid var(--border); }
.selbar { position: sticky; bottom: 16px; margin-top: 16px; display: flex; align-items: center; gap: 12px; background: rgba(17, 17, 22, .95); border: 1px solid var(--corona); border-radius: var(--r-pill); padding: 8px 8px 8px 18px; box-shadow: var(--glow), var(--shadow-pop); backdrop-filter: blur(10px); z-index: 20; }
.selbar .grow { flex: 1; font-weight: 700; }
.spinner { width: 46px; height: 46px; margin: 40px auto 10px; border-radius: 50%; border: 2px solid rgba(77, 141, 255, .15); border-top-color: var(--ion); animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.steps { margin: 6px 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.gcard { background: linear-gradient(135deg, rgba(77, 141, 255, .08), rgba(139, 143, 255, .06)); border: 1px solid rgba(77, 141, 255, .22); border-radius: var(--r-md); padding: 14px; display: flex; flex-direction: column; gap: 8px; }

/* ---------- Bordes de luz ---------- */
/* Botón principal: oscuro con borde degradado naranja→azul y resplandor naranja */
.btn.primary {
  background: linear-gradient(#0E0E12, #0E0E12) padding-box, linear-gradient(100deg, #FF6A2B, #FF9A5C 45%, #4D8DFF) border-box;
  border: 1px solid transparent; color: #fff; box-shadow: 0 10px 30px -10px rgba(255, 106, 43, .7), inset 0 1px 0 rgba(255, 255, 255, .06);
}
.btn.primary:hover { filter: none; background: linear-gradient(#16161C, #16161C) padding-box, linear-gradient(100deg, #FF6A2B, #FF9A5C 45%, #4D8DFF) border-box; }
.btn.ion {
  background: linear-gradient(#0E0E12, #0E0E12) padding-box, linear-gradient(100deg, #2F6BFF, #8BB4FF) border-box;
  border: 1px solid transparent; color: #fff; box-shadow: 0 10px 30px -10px rgba(77, 141, 255, .7);
}
.btn { border-radius: 12px; }
.btn.sm { border-radius: 10px; }
/* Línea de luz en el borde superior de tarjetas, héroe y columnas */
.card, .hero, .table-wrap, .gcard, .modal, .pcard { position: relative; }
.card::before, .hero::before, .table-wrap::before, .modal::before {
  content: ""; position: absolute; left: 12%; right: 12%; width: auto; top: -1px; height: 1px; background: var(--grad-edge); opacity: .9; pointer-events: none; border-radius: 0;
}
.hero { background: linear-gradient(180deg, rgba(20, 22, 32, .9), rgba(8, 8, 11, .9)); border-color: var(--border-strong); }
.hero::after { content: ""; position: absolute; inset: auto -10% -60% 30%; height: 220px; background: radial-gradient(closest-side, rgba(77, 141, 255, .22), transparent); border: 0; transform: none; width: auto; top: auto; right: auto; border-radius: 0; }
.hero .main-k .v { background: linear-gradient(100deg, #FFFFFF 10%, #FFB089 60%, #FF6A2B); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nav a.item.active { background: linear-gradient(90deg, rgba(255, 106, 43, .14), rgba(77, 141, 255, .06)); border-color: rgba(255, 255, 255, .12); box-shadow: inset 0 -1px 0 rgba(255, 106, 43, .5); }
.nav a.item.radar { background: transparent; border-color: rgba(77, 141, 255, .3); }
.brand svg { filter: drop-shadow(0 0 12px rgba(77, 141, 255, .45)); }
.brand span { font-weight: 600; letter-spacing: -.03em; }
.eyebrow { display: inline-block; padding: 4px 12px; border-radius: 999px; border: 1px solid rgba(77, 141, 255, .45); color: #CFE0FF; font-size: 10.5px; letter-spacing: .12em; background: rgba(77, 141, 255, .06); margin-bottom: 12px; }
.pcard:hover, .dcard:hover { border-color: rgba(77, 141, 255, .45); }
.pcard.sel { border-color: var(--corona); box-shadow: 0 0 0 1px var(--corona), 0 12px 40px -12px rgba(255, 106, 43, .6); }
.avatar { color: #fff; box-shadow: inset -6px -6px 14px rgba(255, 106, 43, .25), inset 4px 4px 12px rgba(77, 141, 255, .25); }

/* ---------- Limpieza: menos adornos, más aire ---------- */
body::before {
  inset: 0; filter: none; opacity: 1;
  background: radial-gradient(700px 420px at 100% 0%, rgba(47, 107, 255, .12), transparent 70%),
              radial-gradient(600px 380px at 0% 100%, rgba(255, 106, 43, .07), transparent 70%);
}
.card::before, .table-wrap::before, .modal::before { content: none; }
.card, .table-wrap, .col { background: #0B0B0E; box-shadow: none; border: 1px solid rgba(255, 255, 255, .07); backdrop-filter: none; }
.card { padding: 22px; border-radius: 16px; }
.main { padding: 36px 44px 64px; max-width: 1320px; }
.page-head { margin-bottom: 28px; }
h1 { font-size: 30px; }
.nav { background: #050507; backdrop-filter: none; padding: 22px 12px; gap: 2px; }
.brand { padding: 0 10px 30px; }
.brand span { font-size: 17px; font-weight: 500; letter-spacing: -.02em; }
.brand svg { width: 30px; height: 30px; filter: none; }
.nav a.item { padding: 9px 12px; font-weight: 500; border: 0; }
.nav a.item.active { background: rgba(255, 255, 255, .07); box-shadow: none; color: #fff; }
.nav a.item.active svg { color: #fff; }
.nav .count { background: rgba(255, 255, 255, .08); }
.nav a.item.active .count { background: var(--corona); color: #fff; }
.btn { background: #121217; border-color: rgba(255, 255, 255, .1); font-weight: 500; }
.btn.ghost { background: transparent; border-color: transparent; }
.tabs .tab { text-decoration: none !important; }
.tab { font-weight: 500; }
.link-more { font-size: 13px; color: var(--text-muted); }
.link-more:hover { color: var(--text); text-decoration: none; }
.hint { display: inline-block; margin-top: 14px; font-size: 13px; color: var(--solar); }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.kpi { background: #0B0B0E; border: 1px solid rgba(255, 255, 255, .07); border-radius: 16px; padding: 20px 22px; }
.kpi .k { font-size: 13px; color: var(--text-muted); }
.kpi .v { font-size: 30px; font-weight: 500; letter-spacing: -.03em; margin-top: 6px; line-height: 1.1; }
.kpi .d { font-size: 12px; color: var(--text-muted); margin-top: 6px; }
.kpi.main { position: relative; overflow: hidden; border-color: rgba(255, 255, 255, .12); }
.kpi.main::before { content: ""; position: absolute; left: 10%; right: 10%; top: -1px; height: 1px; background: var(--grad-edge); }
.kpi.main .v { background: linear-gradient(100deg, #FFFFFF 30%, #FFB089 75%, #FF6A2B); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero { background: #0B0B0E; border: 1px solid rgba(255, 255, 255, .07); }
.hero::before, .hero::after { content: none; }
.hero .main-k .v { font-size: 34px; }
.hero .v { font-family: var(--font); font-weight: 500; }
.hero .k { text-transform: none; letter-spacing: 0; font-weight: 400; font-size: 13px; }
.funnel-bar .bar { height: 8px; }
.funnel-bar .bar > div { box-shadow: none; }
.funnel-bar { margin: 14px 0; }
.section-t { text-transform: none; letter-spacing: 0; font-size: 13px; font-weight: 500; color: var(--text-muted); }
th { text-transform: none; letter-spacing: 0; font-size: 12px; font-weight: 500; }
.dash { gap: 14px; align-items: start; }
.dcard { background: #121217; }
.col-head .top { font-family: var(--font); font-weight: 500; font-size: 13.5px; }
.col-head .bullet { box-shadow: none; }
.eyebrow { margin-bottom: 10px; }
@media (max-width: 1180px) { .kpis { grid-template-columns: 1fr 1fr; } }
@media (max-width: 900px) { .main { padding: 20px 16px 50px; } }

/* ---------- Cristal líquido ---------- */
:root {
  --glass: rgba(255, 255, 255, .035);
  --glass-strong: rgba(255, 255, 255, .06);
  --glass-edge: rgba(255, 255, 255, .11);
  --glass-blur: blur(22px) saturate(170%);
  --glass-shine: inset 0 1px 0 rgba(255, 255, 255, .09), inset 0 0 0 1px rgba(255, 255, 255, .02);
  --spring: cubic-bezier(.2, .9, .25, 1.15);
}
/* Fondo: brasas naranjas abajo a la izquierda y azul abajo a la derecha, para que el cristal tenga algo que difuminar */
body::before {
  background:
    radial-gradient(900px 520px at 6% 108%, rgba(255, 90, 20, .30), transparent 62%),
    radial-gradient(900px 560px at 100% 104%, rgba(20, 110, 255, .30), transparent 62%),
    radial-gradient(600px 360px at 92% -8%, rgba(47, 107, 255, .12), transparent 70%);
}
.card, .kpi, .table-wrap, .col, .hero {
  background: var(--glass); border: 1px solid var(--glass-edge);
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-shine), 0 20px 50px -20px rgba(0, 0, 0, .7);
}
.nav { background: rgba(255, 255, 255, .02); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); border-right: 1px solid var(--glass-edge); }
.drawer, .modal { background: rgba(14, 14, 18, .72); -webkit-backdrop-filter: blur(30px) saturate(180%); backdrop-filter: blur(30px) saturate(180%); border-color: var(--glass-edge); box-shadow: var(--glass-shine), 0 40px 120px rgba(0, 0, 0, .7); }
.dcard, .pcard { background: rgba(255, 255, 255, .045); border-color: rgba(255, 255, 255, .09); box-shadow: var(--glass-shine); }
.btn { background: rgba(255, 255, 255, .05); border-color: rgba(255, 255, 255, .12); box-shadow: var(--glass-shine); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  transition: transform .35s var(--spring), background .2s, box-shadow .3s; }
.btn:hover { transform: translateY(-1px) scale(1.02); background: rgba(255, 255, 255, .09); }
.btn:active { transform: scale(.97); }
.input, select.input, textarea.input { background: rgba(255, 255, 255, .04); border-color: rgba(255, 255, 255, .14); }
.tab { background: rgba(255, 255, 255, .03); border-color: rgba(255, 255, 255, .1); transition: color .2s; }
.tab.active { background: rgba(255, 255, 255, .92); color: #050507; border-color: transparent; }
.nav a.item { transition: color .2s, background .2s; }
.nav { position: sticky; }
.nav a.item { position: relative; z-index: 1; }
.nav a.item.active { background: transparent; box-shadow: none; }
.nav-pill { position: absolute; left: 12px; right: 12px; top: 0; border-radius: var(--r-md); background: rgba(255, 255, 255, .08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 8px 24px -10px rgba(0, 0, 0, .9); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  transition: transform .55s var(--spring), height .3s, opacity .2s; pointer-events: none; z-index: 0; }
.main.enter { animation: vt-in .45s var(--spring) both; }
.dcard, .pcard, .kpi, .card { transition: transform .45s var(--spring), border-color .2s, box-shadow .3s; }
.dcard:hover, .pcard:hover { transform: translateY(-3px) scale(1.01); }
/* Texto con degradado azul → naranja para destacar */
.grad-text { background: linear-gradient(90deg, #12B5FF 0%, #18C2FF 30%, #9A8C8C 55%, #FF5A14 78%, #C75012 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Transiciones entre pantallas (View Transitions): fundido con desenfoque y la pastilla del menú que se desliza */
@keyframes vt-out { to { opacity: 0; filter: blur(8px); transform: scale(.985); } }
@keyframes vt-in { from { opacity: 0; filter: blur(10px); transform: scale(1.015); } }
/* Paneles y ventanas aparecen como gotas que se expanden */
.drawer { animation: drop-in .5s var(--spring); }
.modal { animation: pop-glass .45s var(--spring); }
@keyframes drop-in { from { transform: translateX(40px) scale(.97); opacity: 0; filter: blur(8px); } }
@keyframes pop-glass { from { transform: translate(-50%, -46%) scale(.92); opacity: 0; filter: blur(10px); } }
@media (prefers-reduced-motion: reduce) {
  *, ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; transition: none !important; }
}

/* ---------- Mensajes ---------- */
.inbox { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 14px; height: calc(100vh - 190px); min-height: 480px; }
.inbox-list { display: flex; flex-direction: column; overflow: hidden; padding: 16px; }
[data-convs] { overflow-y: auto; margin: 0 -6px; flex: 1; }
.inbox-list .search { flex: none; }
.conv { width: 100%; display: flex; gap: 10px; align-items: center; padding: 10px; border: 0; background: transparent; border-radius: 12px; cursor: pointer; text-align: left; color: var(--text); }
.conv:hover { background: rgba(255, 255, 255, .05); }
.conv.on { background: rgba(255, 255, 255, .09); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08); }
.conv .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.conv .top { display: flex; justify-content: space-between; gap: 8px; }
.conv .one { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.count-dot { background: var(--corona); color: #fff; font-size: 11px; font-weight: 600; min-width: 20px; height: 20px; border-radius: 10px; display: grid; place-items: center; padding: 0 6px; }
.inbox-thread { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.thread-head { display: flex; gap: 12px; align-items: center; padding: 16px 20px; border-bottom: 1px solid rgba(255, 255, 255, .07); }
.thread-head .grow { flex: 1; }
.bubbles { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.bubble { max-width: 72%; padding: 10px 14px; border-radius: 16px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .08); line-height: 1.45; }
.bubble.in { align-self: flex-start; border-bottom-left-radius: 6px; }
.bubble.out { align-self: flex-end; border-bottom-right-radius: 6px; background: linear-gradient(135deg, rgba(77, 141, 255, .22), rgba(255, 106, 43, .16)); border-color: rgba(255, 255, 255, .12); }
.bubble .meta { font-size: 11px; color: var(--text-muted); margin-top: 4px; text-align: right; }
.composer { display: flex; gap: 10px; padding: 14px 16px; border-top: 1px solid rgba(255, 255, 255, .07); align-items: flex-end; }
.composer textarea { min-height: 44px; resize: none; }
.inbox-thread .alert { margin: 0 16px 10px !important; }
.inbox-thread > .empty { margin: auto; }

/* ---------- Flujos ---------- */
.flow-layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 14px; align-items: start; }
.flow-side { padding: 18px; position: sticky; top: 20px; }
.flow-list { display: flex; flex-direction: column; gap: 4px; }
.flow-item { display: flex; gap: 10px; align-items: center; text-align: left; padding: 10px 12px; border-radius: 12px; border: 1px solid transparent; background: transparent; color: var(--text); cursor: pointer; font-weight: 500; }
.flow-item .grow { display: flex; flex-direction: column; }
.flow-item:hover { background: rgba(255, 255, 255, .05); }
.flow-item.on { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .1); }
.flow-item .dot { width: 8px; height: 8px; border-radius: 50%; background: #55586A; flex: none; }
.flow-item .dot.live { background: var(--nova); box-shadow: 0 0 10px var(--nova); }
.palette { display: flex; flex-direction: column; gap: 6px; }
.pal { display: flex; gap: 12px; align-items: center; text-align: left; padding: 10px 12px; border-radius: 12px; background: rgba(255, 255, 255, .03); border: 1px solid rgba(255, 255, 255, .07); color: var(--text); cursor: pointer; transition: transform .3s var(--spring), background .2s; }
.pal:hover { background: rgba(255, 255, 255, .07); transform: translateX(3px); }
.pal.on { border-color: var(--corona); background: rgba(255, 106, 43, .08); }
.pal > span:last-child { display: flex; flex-direction: column; }
.pi { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .08); flex: none; }
.pi.big { width: 44px; height: 44px; }
.flow-canvas { min-height: 560px; padding: 22px 26px; background-image: radial-gradient(rgba(255, 255, 255, .06) 1px, transparent 1px); background-size: 22px 22px; }
.canvas-head { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 24px; }
.name-in { font: 500 22px/1.2 var(--font); letter-spacing: -.02em; background: transparent; border: 1px solid transparent; border-radius: 10px; padding: 4px 8px; margin-left: -8px; color: var(--text); min-width: 0; flex: 1 1 320px; }
.name-in:hover, .name-in:focus { border-color: rgba(255, 255, 255, .14); outline: none; }
.flow-nodes { display: flex; flex-direction: column; align-items: center; }
.node { width: min(420px, 100%); padding: 14px 16px; border-radius: 16px; background: rgba(10, 10, 13, .85); border: 1px solid rgba(255, 255, 255, .1); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .07), 0 16px 40px -18px rgba(0, 0, 0, .9); cursor: pointer;
  transition: transform .45s var(--spring), border-color .2s; }
.node:hover { transform: translateY(-2px) scale(1.01); border-color: rgba(77, 141, 255, .5); }
.node.trig { border-color: rgba(255, 106, 43, .45); }
.node .nh { display: flex; gap: 10px; align-items: center; }
.node .nh .pi { width: 30px; height: 30px; }
.node .ns { color: var(--text-muted); margin: 6px 0 10px 40px; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nchips { display: flex; gap: 6px; margin-left: 40px; }
.nchip { font-size: 11.5px; padding: 3px 10px; border-radius: 999px; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .1); }
.nchip.live { color: var(--nova); border-color: rgba(52, 211, 153, .35); }
.ghost-node { border-style: dashed; color: var(--text-muted); text-align: center; background: transparent; box-shadow: none; cursor: default; }
.ghost-node:hover { transform: none; border-color: rgba(255, 255, 255, .1); }
.wire { height: 34px; width: 2px; position: relative; }
.wire span { position: absolute; inset: 0; background: linear-gradient(#FF6A2B, #4D8DFF); border-radius: 2px; box-shadow: 0 0 10px rgba(77, 141, 255, .5); }
.wire.faint span { opacity: .25; }
.switch { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px 5px 5px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .14); background: rgba(255, 255, 255, .04); color: var(--text); cursor: pointer; font-weight: 500; font-size: 13px; }
.switch span { width: 34px; height: 20px; border-radius: 999px; background: #2A2B36; position: relative; transition: background .2s; }
.switch span::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .35s var(--spring); }
.switch.on span { background: var(--nova); }
.switch.on span::after { transform: translateX(14px); }
@media (max-width: 1180px) { .flow-layout, .inbox { grid-template-columns: minmax(0, 1fr); height: auto; } .flow-side { position: static; } .inbox-thread { min-height: 520px; } }

/* ---------- Acceso ---------- */
#login { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 16px;
  background: radial-gradient(700px 420px at 10% 110%, rgba(255, 90, 20, .35), transparent 60%), radial-gradient(700px 420px at 95% 105%, rgba(20, 110, 255, .35), transparent 60%), #000; }
.login-card { width: min(380px, 100%); display: flex; flex-direction: column; gap: 14px; text-align: center; padding: 36px 30px; border-radius: 22px;
  background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .12); -webkit-backdrop-filter: blur(24px) saturate(170%); backdrop-filter: blur(24px) saturate(170%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 40px 120px rgba(0, 0, 0, .7); animation: pop-in .6s var(--spring); }
.login-orb { width: 72px; height: 72px; margin: 0 auto 4px; }
.login-err { color: #FF8A9C; font-size: 13px; min-height: 18px; }
@keyframes pop-in { from { transform: scale(.94); opacity: 0; filter: blur(8px); } }

/* ---------- LinkedIn ---------- */
.li-row { display: flex; gap: 8px; flex-wrap: wrap; }
.btn.li svg { color: #4D9EFF; }
.btn.li:hover { border-color: rgba(77, 158, 255, .5); }
.task-note { margin-top: 6px; font-size: 12.5px; color: var(--text-muted); background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .07); border-radius: 10px; padding: 8px 10px; white-space: pre-line; }

/* ---------- Buscar clientes (rediseño) ---------- */
.search-bar { display: flex; align-items: stretch; gap: 0; padding: 8px 8px 8px 20px; border-radius: 18px; }
.sb-field { display: flex; flex-direction: column; justify-content: center; padding: 6px 14px 6px 0; min-width: 110px; }
.sb-field.grow2 { flex: 1; }
.sb-field label { font-size: 11.5px; color: var(--text-muted); font-weight: 500; }
.sb-field input, .sb-field select { background: transparent; border: 0; color: var(--text); font: 500 15px/1.4 var(--font); padding: 2px 0; outline: none; min-width: 0; }
.sb-field select option { background: var(--space); }
.sb-sep { width: 1px; background: rgba(255, 255, 255, .1); margin: 8px 16px 8px 0; }
.sb-go { border-radius: 12px; padding: 0 22px; font-size: 14px; }
.r-stats { display: flex; align-items: center; gap: 26px; flex-wrap: wrap; padding: 4px 2px 16px; }
.r-stats > div:not(.grow):not(.r-prog) { display: flex; flex-direction: column; }
.r-stats b { font-size: 22px; font-weight: 500; letter-spacing: -.02em; line-height: 1.1; }
.r-stats span { font-size: 12px; color: var(--text-muted); }
.r-stats .hot b { color: var(--corona); }
.r-stats .grow { flex: 1; }
.r-prog { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--text-muted); }
.r-prog .bar { width: 160px; height: 6px; border-radius: 6px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.r-prog .bar > div { height: 100%; background: var(--grad-orbit); transition: width .4s var(--spring); }
.r-tools { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 12px; }
.r-tools .chips { display: flex; gap: 6px; flex-wrap: wrap; }
.fchip { border: 1px solid rgba(255, 255, 255, .12); background: rgba(255, 255, 255, .03); color: var(--text-muted); border-radius: 999px; padding: 6px 13px; font: 500 12.5px var(--font); cursor: pointer; transition: all .2s; }
.fchip:hover { color: var(--text); }
.fchip.on { background: rgba(255, 106, 43, .14); border-color: rgba(255, 106, 43, .5); color: #FFD2BC; }
.sm-select { width: auto; padding: 7px 10px; font-size: 13px; }
.plist { border-radius: 16px; border: 1px solid var(--glass-edge, rgba(255,255,255,.1)); background: rgba(255, 255, 255, .025); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); overflow: hidden; }
.phead, .prow { display: grid; grid-template-columns: 34px 130px minmax(200px, 1.3fr) minmax(180px, 1.2fr) 170px 96px; gap: 14px; align-items: center; padding: 12px 16px; }
.phead { font-size: 12px; color: var(--text-muted); border-bottom: 1px solid rgba(255, 255, 255, .07); padding-top: 10px; padding-bottom: 10px; }
.prow { border-bottom: 1px solid rgba(255, 255, 255, .05); cursor: pointer; transition: background .15s; }
.prow:last-child { border-bottom: 0; }
.prow:hover { background: rgba(255, 255, 255, .035); }
.prow.sel { background: rgba(255, 106, 43, .07); }
.prow.in-crm { opacity: .6; }
.prow input[type=checkbox], .phead input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--corona); }
.opp { display: flex; align-items: center; gap: 10px; }
.opp .score { position: relative; top: auto; right: auto; width: 40px; height: 40px; font-size: 13px; flex: none; }
.opp b { display: block; font-size: 13px; font-weight: 600; }
.conf { display: inline-flex; gap: 2px; vertical-align: middle; }
.conf i { width: 10px; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .14); display: block; }
.conf i.on { background: var(--nova); }
.biz { min-width: 0; }
.biz .nm { font-weight: 600; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.biz .small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.why { font-size: 12.5px; color: #FFC6A8; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sigs { display: flex; gap: 5px; flex-wrap: wrap; }
.sig { font-size: 11.5px; padding: 2px 8px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .1); background: rgba(255, 255, 255, .04); white-space: nowrap; display: inline-flex; align-items: center; gap: 5px; max-width: 170px; overflow: hidden; text-overflow: ellipsis; }
.sig.bad { color: #FF9AAA; border-color: rgba(255, 77, 106, .35); background: rgba(255, 77, 106, .08); }
.sig.warn { color: var(--solar); border-color: rgba(251, 191, 36, .3); background: rgba(251, 191, 36, .07); }
.sig.ok { color: var(--nova); border-color: rgba(52, 211, 153, .3); background: rgba(52, 211, 153, .07); }
.sig.none { color: var(--text-muted); border-style: dashed; }
.sig.wait { color: var(--ion); border-color: rgba(77, 141, 255, .35); }
.mini-spin { width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid rgba(77, 141, 255, .3); border-top-color: var(--ion); animation: spin .8s linear infinite; }
.cics { display: flex; gap: 4px; flex-wrap: wrap; }
.cic { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; color: var(--text-muted); border: 1px solid rgba(255, 255, 255, .08); background: rgba(255, 255, 255, .03); text-decoration: none !important; transition: color .15s, border-color .15s; }
.cic:hover { color: var(--text); border-color: rgba(77, 141, 255, .5); }
.cic svg { width: 14px; height: 14px; }
.blocks { display: flex; flex-direction: column; gap: 8px; }
.blk { display: grid; grid-template-columns: 140px 1fr 80px; gap: 10px; align-items: center; font-size: 13px; }
.blk .bar { height: 6px; border-radius: 6px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.blk .bar > div { height: 100%; background: linear-gradient(90deg, #FF6A2B, #FFB089); border-radius: 6px; }
.blk b { text-align: right; font-weight: 500; }
@media (max-width: 1180px) {
  .phead { display: none; }
  .prow { grid-template-columns: 26px 1fr; grid-template-areas: "c o" "c b" "c s" "c k" "c a"; gap: 8px; }
  .prow > .pick-row { grid-area: c; align-self: start; } .prow > .opp { grid-area: o; } .prow > .biz { grid-area: b; } .prow > .sigs { grid-area: s; } .prow > .cics { grid-area: k; } .prow > div:last-child { grid-area: a; }
  .search-bar { flex-wrap: wrap; padding: 12px; } .sb-sep { display: none; } .sb-field { flex: 1 1 140px; } .sb-go { flex: 1 1 100%; justify-content: center; padding: 12px; }
}

.mobile-top { display: none; }

@media (max-width: 1180px) {
  .hero { grid-template-columns: 1fr 1fr; }
  .dash, .detail-grid { grid-template-columns: minmax(0, 1fr); }
  .radar-layout { grid-template-columns: minmax(0, 1fr); }
  .filters { position: static; }
}
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .nav { position: fixed; z-index: 70; left: 0; top: 0; width: 260px; transform: translateX(-100%); transition: transform .2s; background: var(--space); }
  .nav.open { transform: none; }
  .mobile-top { display: flex; align-items: center; gap: 10px; background: rgba(8, 9, 18, .92); border-bottom: 1px solid var(--border); padding: 12px 16px; position: sticky; top: 0; z-index: 30; backdrop-filter: blur(12px); }
  .mobile-top .brand { padding: 0; }
  .main { padding: 20px 16px 50px; }
  .grid2, .grid3 { grid-template-columns: 1fr; }
  .span2 { grid-column: auto; }
  .board { grid-template-columns: repeat(5, 260px); }
  .map { height: 420px; }
}
