/* CRM Jagen. Barra lateral azul marino de la marca, contenido claro y denso; el embudo es la pieza que destaca. */
:root {
  color-scheme: light;
  --navy: #0b1326; --navy-2: #131d36; --cyan: #00e0f0; --paper: #f2f4f8; --surface: #ffffff; --line: #dde3ec; --line-2: #eef1f6;
  --text: #121a2c; --text-2: #3b475c; --muted: #5d6a82; --link: #0b6e8c; --focus: #00b8c8;
  --good: #136a3b; --good-bg: #e1f4e8; --warn: #0d5c66; --warn-bg: #dcf3f5; --bad: #a3271f; --bad-bg: #fde7e4;
  --blue: #1b4f96; --blue-bg: #e3edfb; --violet: #57399a; --violet-bg: #ece6fa; --orange: #8f4208; --orange-bg: #fde9d9;
  --c-nuevo: #3b6cf6; --c-intento: #a9b4c6; --c-seg: #19b9c6; --c-reunion: #7c6cf0; --c-prop: #f2994a; --c-ganado: #2fb67a; --c-perdido: #ef6b62;
  --accent: #1d3566; --accent-2: #284884; --data: #3b6cf6; --data-soft: #c9d8fd; --track: #edf1f8;
  --font: "Roboto", "Segoe UI", system-ui, sans-serif; --font-cond: "Roboto Condensed", "Arial Narrow", "Roboto", sans-serif;
  --r: 8px; --shadow: 0 1px 2px rgba(11,19,38,.07); --shadow-2: 0 12px 40px rgba(11,19,38,.22);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font: 14px/1.45 var(--font); color: var(--text); background: var(--paper); -webkit-font-smoothing: antialiased; }
h1, h2, h3 { margin: 0; line-height: 1.2; text-wrap: balance; }
h2 { font: 600 15px/1.25 var(--font); }
h3 { font: 600 13px/1.2 var(--font); color: var(--text-2); }
a { color: var(--link); }
[hidden] { display: none !important; }
.muted { color: var(--muted); } .right { margin-left: auto; } .error { color: var(--bad); min-height: 1.4em; margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
input, select, textarea { border: 1px solid var(--line); border-radius: 6px; padding: 6px 9px; background: var(--surface); min-width: 0; }
input:hover, select:hover, textarea:hover { border-color: #c3ccd9; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
input:disabled, select:disabled, textarea:disabled { background: var(--line-2); color: var(--text-2); }
.btn { border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 6px 12px; cursor: pointer; white-space: nowrap; font-weight: 500; text-decoration: none; color: var(--text); display: inline-flex; align-items: center; gap: 6px; }
.btn:hover { border-color: #b6c0cf; background: #fafbfd; } .btn:disabled { opacity: .5; cursor: default; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 1px 2px rgba(11,19,38,.28); } .btn.primary:hover { background: var(--accent-2); border-color: var(--accent-2); }
.btn.danger { color: var(--bad); } .btn.sm { padding: 4px 9px; font-size: 13px; }
.tag { display: inline-block; padding: 1px 8px; border-radius: 99px; font-size: 12px; background: var(--line-2); color: var(--text-2); white-space: nowrap; }
.tag.warn { background: var(--warn-bg); color: var(--warn); } .tag.bad { background: var(--bad-bg); color: var(--bad); } .tag.good { background: var(--good-bg); color: var(--good); }

/* Inicio de sesión */
.login { min-height: 100%; display: grid; grid-template-columns: 1.1fr 1fr; background: var(--surface); }
.login-art { background: var(--navy); color: #fff; padding: 56px; display: flex; flex-direction: column; justify-content: flex-end; gap: 28px; }
.login-art p { font: 600 34px/1.1 var(--font-cond); margin: 0; max-width: 12em; }
.login-rail { display: flex; flex-direction: column; gap: 6px; width: min(360px, 100%); }
.login-rail i { display: block; height: 14px; border-radius: 3px; background: var(--cyan); opacity: .9; width: calc(var(--w, 1) * 100%); }
.login-rail i:nth-child(1) { width: 100%; } .login-rail i:nth-child(2) { width: 68%; opacity: .75; } .login-rail i:nth-child(3) { width: 44%; opacity: .6; } .login-rail i:nth-child(4) { width: 26%; opacity: .45; } .login-rail i:nth-child(5) { width: 12%; background: #fff; opacity: 1; }
.login-card { padding: 56px; display: grid; gap: 14px; align-content: center; justify-items: start; max-width: 480px; }
.login-card h1 { font: 700 26px/1.15 var(--font-cond); } .login-card form { display: grid; gap: 8px; width: 100%; max-width: 320px; }
.brand-mark { width: 44px; height: 44px; border-radius: 10px; background: var(--navy); color: var(--cyan); display: grid; place-items: center; font: 700 24px var(--font-cond); }
.brand-mark.sm { width: 26px; height: 26px; border-radius: 6px; font-size: 16px; background: var(--cyan); color: var(--navy); }

/* Estructura */
.shell { display: grid; grid-template-columns: 216px minmax(0, 1fr); height: 100%; }
.sidebar { background: var(--navy); color: #c9d3e3; display: flex; flex-direction: column; padding: 14px 10px; gap: 14px; min-height: 0; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 9px; font: 600 17px var(--font-cond); color: #fff; padding: 2px 6px; }
.brand-logo { display: block; width: 92px; height: auto; margin: 4px 0 6px; }
.login-logo { display: block; width: 168px; height: auto; margin-bottom: auto; }
.nav { display: grid; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 10px; color: #c9d3e3; text-decoration: none; padding: 7px 9px; border-radius: 6px; border-left: 2px solid transparent; }
.nav a:hover { background: var(--navy-2); color: #fff; }
.nav a.on { background: var(--navy-2); color: #fff; border-left-color: var(--cyan); font-weight: 500; }
.nav svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.nav a.on svg { stroke: var(--cyan); }
.nav-sep { font-size: 12px; color: #7f8ca6; padding: 12px 11px 3px; }
.side-foot { margin-top: auto; border-top: 1px solid #222d49; padding: 12px 6px 2px; display: grid; gap: 8px; }
.who { display: grid; gap: 1px; } .user-name { color: #fff; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .role { font-size: 12px; color: #9aa8c1; }
.side-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.sidebar .btn.ghost { background: transparent; border-color: #2a3654; color: #c9d3e3; } .sidebar .btn.ghost:hover { background: var(--navy-2); color: #fff; }
.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; overflow-y: auto; }
.page-head { display: flex; align-items: baseline; gap: 10px; padding: 16px 20px 8px; flex-wrap: wrap; }
.page-head h1 { font: 700 24px/1.1 var(--font-cond); letter-spacing: -.005em; } .count { color: var(--muted); }
.filters { display: flex; gap: 8px; align-items: center; padding: 4px 20px 12px; flex-wrap: wrap; }
.filters input[type=search] { flex: 1 1 260px; max-width: 400px; }
.view { padding: 0 20px 24px; outline: none; }
.banner { background: var(--blue-bg); color: var(--blue); padding: 8px 12px; border-radius: 6px; margin-bottom: 12px; }

/* Embudo: la barra que resume el tablero */
.rail { display: flex; gap: 3px; margin-bottom: 12px; }
.rail button { border: 0; padding: 0; background: none; cursor: pointer; min-width: 44px; text-align: left; display: grid; gap: 4px; }
.rail .seg { height: 8px; border-radius: 2px; background: var(--c); }
.rail .lbl { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .rail .lbl b { color: var(--text); font: 600 13px var(--font-cond); }
.rail button:hover .lbl { color: var(--text); }
.s-nuevo { --c: var(--c-nuevo); } .s-intento { --c: var(--c-intento); } .s-seg { --c: var(--c-seg); } .s-reunion { --c: var(--c-reunion); } .s-prop { --c: var(--c-prop); } .s-ganado { --c: var(--c-ganado); } .s-perdido { --c: var(--c-perdido); }

/* Tablero */
.board { display: flex; gap: 10px; overflow-x: auto; align-items: flex-start; padding-bottom: 12px; scroll-behavior: smooth; }
.col { flex: 0 0 256px; background: #e7ebf2; border-radius: var(--r); display: flex; flex-direction: column; max-height: calc(100vh - 210px); border-top: 3px solid var(--c); }
.col.over { outline: 2px dashed var(--focus); outline-offset: -2px; background: #dff6f8; }
.col-head { padding: 9px 12px 6px; display: flex; justify-content: space-between; gap: 8px; align-items: baseline; font-weight: 500; }
.col-head .n { font: 600 14px var(--font-cond); color: var(--muted); }
.col-body { padding: 2px 8px 8px; overflow-y: auto; display: grid; gap: 6px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; box-shadow: var(--shadow); cursor: pointer; display: grid; gap: 2px; text-align: left; width: 100%; }
.card:hover { border-color: #b9c3d2; } .card[draggable=true] { cursor: grab; } .card.dragging { opacity: .4; }
.card .name { font-weight: 500; overflow-wrap: anywhere; } .card .sub { color: var(--text-2); font-size: 13px; overflow-wrap: anywhere; }
.card .meta { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; font-size: 12px; color: var(--muted); margin-top: 3px; }
.more { border: 0; background: transparent; color: var(--link); padding: 6px; cursor: pointer; }
.pill { padding: 1px 8px 1px 7px; border-radius: 99px; font-size: 12px; white-space: nowrap; display: inline-flex; align-items: center; gap: 5px; background: var(--line-2); color: var(--text-2); }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--c); }

/* Paneles y tablas */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; margin-bottom: 12px; }
.panel > h2 { margin-bottom: 10px; display: flex; gap: 8px; align-items: baseline; }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; padding: 7px 10px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
th { font: 500 12.5px var(--font); color: var(--muted); white-space: nowrap; border-bottom-color: var(--line); background: var(--surface); position: sticky; top: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
tr.click, td.click { cursor: pointer; } tr.click:hover td { background: #f6f8fb; }
tr.total td { font-weight: 600; background: #f6f8fb; }
.grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); align-items: start; } .grid .panel { margin-bottom: 0; }
.kpis { display: grid; gap: 0; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin-bottom: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.kpi { padding: 12px 16px; border-right: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); margin: 0 -1px -1px 0; display: grid; gap: 2px; align-content: start; }
.kpi b { font: 600 26px/1.1 var(--font-cond); font-variant-numeric: tabular-nums; } .kpi span { color: var(--muted); font-size: 12.5px; } .kpi b + span + b { margin-top: 8px; }
.bar-row { display: grid; grid-template-columns: minmax(120px, 230px) 1fr 48px; gap: 10px; align-items: center; padding: 3px 0; }
.bar { height: 10px; background: var(--track); border-radius: 99px; overflow: hidden; } .bar i { display: block; height: 100%; background: var(--c, var(--data)); border-radius: 99px; }
.list-item { display: flex; gap: 10px; align-items: center; padding: 8px 4px; border: 0; border-bottom: 1px solid var(--line-2); cursor: pointer; background: none; width: 100%; text-align: left; }
.list-item:last-of-type { border-bottom: 0; } .list-item:hover { background: #f6f8fb; } .list-item .grow { flex: 1; min-width: 0; overflow-wrap: anywhere; } .list-item.sel { background: #e2f7f9; }
.empty { color: var(--muted); padding: 10px 4px; margin: 0; }
.chart { width: 100%; height: auto; } .chart rect { fill: var(--data-soft); } .chart text { font-size: 11px; fill: var(--muted); font-family: var(--font); }
.analysis { border-left: 3px solid var(--cyan); } .analysis p { margin: 6px 0; max-width: 90ch; } .analysis ul { margin: 4px 0; padding-left: 20px; max-width: 90ch; }
.split { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 12px; align-items: start; } .split .side { position: sticky; top: 8px; max-height: calc(100vh - 120px); overflow-y: auto; }
.form-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: end; } .form-row .field { flex: 1 1 150px; }

/* Ficha */
.scrim { position: fixed; inset: 0; background: rgba(11,19,38,.38); z-index: 9; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 100%); background: var(--surface); z-index: 10; box-shadow: var(--shadow-2); display: flex; flex-direction: column; }
.drawer-head { padding: 16px 18px 12px; display: flex; gap: 12px; align-items: flex-start; }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--navy); color: var(--cyan); display: grid; place-items: center; font: 600 16px var(--font-cond); flex: none; }
.drawer-head h2 { font: 700 20px/1.15 var(--font-cond); overflow-wrap: anywhere; }
.drawer-top { padding: 0 18px 12px; display: flex; gap: 8px; flex-wrap: wrap; }
.tabs { display: flex; gap: 2px; padding: 0 12px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabs button { border: 0; background: none; padding: 8px 10px; cursor: pointer; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; font-weight: 500; }
.tabs button:hover { color: var(--text); } .tabs button.on { color: var(--accent); border-bottom-color: var(--accent); }
.drawer-body { padding: 16px 18px; overflow-y: auto; display: grid; gap: 16px; align-content: start; flex: 1; }
#d-extra { display: grid; gap: 16px; } #d-extra:empty { display: none; }
.drawer-foot { padding: 10px 18px; border-top: 1px solid var(--line); display: flex; gap: 8px; align-items: center; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.field { display: grid; gap: 3px; } .field.full { grid-column: 1 / -1; } .field label { font-size: 12.5px; color: var(--muted); }
.field textarea { min-height: 90px; resize: vertical; } .check { display: flex; gap: 8px; align-items: center; color: var(--text) !important; font-size: 14px !important; }
.facts { display: grid; grid-template-columns: 130px 1fr; gap: 5px 12px; margin: 0; } .facts dt { color: var(--muted); } .facts dd { margin: 0; overflow-wrap: anywhere; }
.facts.wide { grid-template-columns: minmax(160px, 250px) 1fr; } .facts dt.sec { grid-column: 1 / -1; font-weight: 600; color: var(--text); margin-top: 8px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.box { background: #f7f9fc; border: 1px solid var(--line); border-radius: var(--r); padding: 12px; margin-top: 6px; display: grid; gap: 8px; }
.box p, .box ul { margin: 0; } .box ul { padding-left: 18px; } .box .big { font: 600 20px var(--font-cond); }
.box hr { border: 0; border-top: 1px solid var(--line); width: 100%; margin: 4px 0; } .box textarea, .modal-card select { width: 100%; }
.note { white-space: pre-wrap; overflow-wrap: anywhere; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 10px; }
table.mini td { padding: 4px 8px 4px 0; border: 0; } details summary { cursor: pointer; color: var(--link); }
.chat { max-height: 340px; overflow-y: auto; display: grid; gap: 6px; padding: 2px; }
.msg { max-width: 86%; padding: 7px 10px; border-radius: 10px 10px 10px 2px; white-space: pre-wrap; overflow-wrap: anywhere; background: var(--surface); border: 1px solid var(--line); justify-self: start; }
.msg.out { justify-self: end; background: var(--navy); border-color: var(--navy); color: #fff; border-radius: 10px 10px 2px 10px; } .msg.out .msg-meta { color: #a9b6cf; }
.msg-meta { font-size: 11.5px; color: var(--muted); margin-bottom: 2px; }

.modal { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; background: rgba(11,19,38,.45); padding: 16px; }
.modal-card { background: var(--surface); border-radius: 10px; padding: 20px; width: min(480px, 100%); display: grid; gap: 12px; box-shadow: var(--shadow-2); }
.modal-card h2 { font: 700 19px var(--font-cond); } .modal-card p { margin: 0; } .modal-card .actions { justify-content: flex-end; }
.toasts { position: fixed; bottom: 16px; right: 16px; display: grid; gap: 8px; z-index: 30; width: min(420px, calc(100% - 32px)); }
.toast { background: var(--navy); color: #fff; padding: 10px 14px; border-radius: 6px; box-shadow: var(--shadow-2); border-left: 3px solid var(--cyan); }
.toast.bad { border-left-color: #ff7a70; } .toast.warn { border-left-color: #ffc94d; }

@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); }
  .sidebar { flex-direction: row; align-items: center; padding: 8px 10px; gap: 8px; overflow-x: auto; overflow-y: hidden; }
  .brand-logo { width: 68px; margin: 0; } .login-logo { width: 120px; margin-bottom: 18px; } .nav-sep, .who { display: none; } .nav { display: flex; } .nav a { border-left: 0; border-bottom: 2px solid transparent; padding: 6px 9px; white-space: nowrap; } .nav a.on { border-bottom-color: var(--cyan); }
  .side-foot { margin: 0 0 0 auto; border: 0; padding: 0; } .side-actions { flex-wrap: nowrap; }
  .login { grid-template-columns: 1fr; } .login-art { padding: 28px 24px; } .login-art p { font-size: 24px; } .login-card { padding: 28px 24px; }
  .split { grid-template-columns: 1fr; } .split .side { position: static; max-height: 240px; } .facts.wide { grid-template-columns: 1fr; }
  .page-head, .filters { padding-left: 14px; padding-right: 14px; } .view { padding: 0 14px 20px; }
}
@media (max-width: 560px) { .fields { grid-template-columns: 1fr; } .col { flex-basis: 82vw; max-height: none; } .bar-row { grid-template-columns: 110px 1fr 40px; } .rail .lbl { display: none; } .rail button { min-width: 10px; } }
@media (prefers-reduced-motion: reduce) { .board { scroll-behavior: auto; } }

/* Tablero: las etapas abiertas caben en la pantalla; las cerradas quedan como tiras; la barra de embudo recibe leads */
.board { gap: 8px; }
.col { flex: 1 1 0; min-width: 146px; }
.col-name { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.col-x { border: 0; background: none; color: var(--muted); cursor: pointer; padding: 0 4px; border-radius: 4px; font-size: 16px; line-height: 1; } .col-x:hover { background: #d5dbe6; color: var(--text); }
.col.strip { flex: 0 0 38px; min-width: 38px; background: #e7ebf2; }
.strip-btn { border: 0; background: none; cursor: pointer; width: 100%; height: 100%; min-height: 260px; padding: 8px 0; display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--text-2); }
.strip-btn b { font: 600 14px var(--font-cond); color: var(--text); } .strip-btn span { writing-mode: vertical-rl; white-space: nowrap; font-weight: 500; }
.strip-btn:hover { background: #dde3ed; }
.card { position: relative; } .card:focus-visible { outline: 2px solid var(--focus); }
.mv { position: absolute; top: 6px; right: 6px; border: 1px solid var(--line); background: var(--surface); border-radius: 5px; font-size: 12px; padding: 1px 7px; cursor: pointer; color: var(--text-2); opacity: 0; }
.card:hover .mv, .card:focus-within .mv, .mv:focus-visible { opacity: 1; } .mv:hover { border-color: var(--navy); color: var(--text); }
@media (hover: none) { .mv { opacity: 1; } }
.board-tip { margin: -4px 0 10px; font-size: 13px; }
.rail button { border-radius: 6px; padding: 4px; margin: -4px; }
.col.strip.over { background: #dff6f8; outline: 2px dashed var(--focus); outline-offset: -2px; }
.stage-list { display: grid; gap: 4px; }
.stage { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); background: var(--surface); border-radius: 6px; padding: 8px 10px; cursor: pointer; text-align: left; font-weight: 500; }
.stage:hover:not(:disabled) { border-color: var(--navy); background: #f6f8fb; } .stage:disabled { opacity: .5; cursor: default; }
.stage .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--c); flex: none; }
@media (max-width: 560px) { .col { flex: 0 0 82vw; } .col.strip { flex: 0 0 38px; } }

/* Destinos al arrastrar: aparece encima, con el nombre completo de cada etapa, sin mover el tablero */
.dropbar { display: none; position: fixed; top: 8px; left: 236px; right: 20px; z-index: 7; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-2); padding: 10px 12px; gap: 8px; flex-wrap: wrap; align-items: center; }
.is-dragging .dropbar { display: flex; }
.dropbar .chip { display: inline-flex; align-items: center; gap: 7px; padding: 9px 12px; border: 1.5px dashed #9fb0c7; border-radius: 8px; font-weight: 500; background: #f7f9fc; }
.dropbar .chip i { width: 9px; height: 9px; border-radius: 50%; background: var(--c); }
.dropbar .chip.over { border-style: solid; border-color: var(--navy); background: #dff6f8; }
@media (max-width: 860px) { .dropbar { left: 10px; right: 10px; top: 52px; } }
/* Gráficas */
.hbar { display: grid; grid-template-columns: minmax(90px, 38%) 1fr auto; gap: 10px; align-items: center; padding: 4px 0; }
.hbar .hl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .hbar .bar { height: 12px; border-radius: 99px; } .hbar .bar i { border-radius: 99px; }
.hbar .hv { font: 600 14px var(--font-cond); text-align: right; font-variant-numeric: tabular-nums; display: grid; } .hbar .hv small, .fv small { font: 400 11.5px var(--font); color: var(--muted); }
.funnel { display: grid; gap: 6px; } .fstep { display: grid; grid-template-columns: minmax(90px, 150px) 1fr minmax(90px, auto); gap: 10px; align-items: center; }
.fbar { display: flex; justify-content: center; background: var(--track); border-radius: 8px; height: 26px; } .fbar i { display: block; height: 100%; background: #2a49c9; border-radius: 8px; }
.fstep:nth-child(2) .fbar i { background: #3b6cf6; } .fstep:nth-child(3) .fbar i { background: #2f9be8; } .fstep:nth-child(4) .fbar i { background: #19b9c6; } .fstep:nth-child(5) .fbar i { background: var(--c-ganado); }
.fv { display: grid; text-align: right; } .fv b { font: 600 15px var(--font-cond); }
.share { display: flex; height: 22px; border-radius: 4px; overflow: hidden; gap: 2px; } .share i { display: block; min-width: 3px; }
.legend { display: flex; gap: 6px 16px; flex-wrap: wrap; margin-top: 10px; } .legend span { display: inline-flex; align-items: center; gap: 6px; } .legend i { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.chart .grid-l { stroke: var(--line-2); stroke-width: 1; } .chart .line { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linejoin: round; } .chart .dot { fill: var(--surface); stroke: var(--accent); stroke-width: 2; }
.tblwrap { margin-bottom: 12px; } .tblwrap > summary { padding: 8px 2px; font-weight: 500; } .tblwrap[open] > summary { margin-bottom: 6px; }

.col-body { grid-template-columns: minmax(0, 1fr); } .col-head { font-size: 13.5px; align-items: flex-start; } .col-head .n { margin-left: auto; }
.card { min-width: 0; overflow: hidden; } .card .meta .tag { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.chart rect { fill: var(--data-soft); }

/* Tablero con la estructura de GoHighLevel: una columna ancha por etapa, desplazamiento de lado */
.board-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.board-bar #b-pipe { font-weight: 500; min-width: 240px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.seg-toggle { display: inline-flex; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: var(--surface); }
.seg-toggle a { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; color: var(--text-2); text-decoration: none; font-weight: 500; }
.seg-toggle a.on { background: var(--accent); color: #fff; } .seg-toggle svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; }
.board { gap: 12px; overflow-x: auto; align-items: stretch; padding-bottom: 14px; min-height: calc(100vh - 200px); }
.col { flex: 0 0 var(--w, 290px); min-width: 0; max-height: calc(100vh - 190px); position: relative; background: #e9edf3; border-top: 3px solid var(--c); }
.col-head { display: block; padding: 10px 12px 8px; background: var(--surface); border: 1px solid var(--line); border-top: 0; border-radius: 0 0 6px 6px; margin: 0 0 8px; }
.col-title { display: flex; align-items: flex-start; gap: 8px; } .col-name { flex: 1; font: 600 14.5px/1.25 var(--font); overflow-wrap: anywhere; }
.col-sub { color: var(--muted); font-size: 13px; margin-top: 2px; }
.col-x { border: 1px solid var(--line); background: var(--surface); width: 22px; height: 22px; border-radius: 5px; padding: 0; font-size: 15px; line-height: 1; color: var(--muted); cursor: pointer; }
.col-x:hover { border-color: var(--navy); color: var(--text); background: var(--surface); }
.col-body { padding: 0 8px 10px; gap: 8px; }
.col-resize { position: absolute; top: 0; right: -7px; width: 12px; height: 100%; cursor: col-resize; z-index: 2; touch-action: none; }
.col-resize::after { content: ""; position: absolute; left: 5px; top: 0; bottom: 0; width: 2px; background: transparent; } .col-resize:hover::after { background: var(--focus); }
.col.strip { flex: 0 0 44px; min-width: 44px; } .strip-btn { min-height: 320px; } .strip-btn i { font-style: normal; font-size: 16px; color: var(--muted); }
.card { padding: 10px 12px; gap: 6px; overflow: hidden; cursor: pointer; }
.c-title { font: 600 14.5px/1.25 var(--font); overflow-wrap: anywhere; }
.c-fields { margin: 0; display: grid; gap: 3px; font-size: 13px; } .c-fields div { display: flex; gap: 6px; min-width: 0; }
.c-fields dt { color: var(--muted); white-space: nowrap; } .c-fields dd { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.c-compact { display: flex; flex-wrap: wrap; gap: 4px 6px; font-size: 13px; } .c-compact span { background: var(--line-2); border-radius: 4px; padding: 1px 6px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c-foot { display: flex; gap: 12px; align-items: center; border-top: 1px solid var(--line-2); padding-top: 7px; margin-top: 2px; color: var(--muted); }
.qa { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; color: var(--muted); text-decoration: none; cursor: pointer; } .qa:hover { color: var(--text); }
.qa svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; } .qa b { font-weight: 500; } .qa b.late { color: var(--bad); }
/* Zonas de cierre: aparecen abajo solo mientras se arrastra un lead */
.statusbar { display: none; position: fixed; left: 236px; right: 20px; bottom: 14px; z-index: 7; gap: 12px; }
.is-dragging .statusbar { display: flex; }
.zone { flex: 1; display: grid; justify-items: center; gap: 1px; padding: 14px 10px; border: 2px dashed var(--c); border-radius: 10px; background: var(--surface); box-shadow: var(--shadow-2); }
.zone b { font: 600 16px var(--font-cond); color: var(--text); } .zone small { color: var(--muted); } .zone.over { border-style: solid; background: #dff6f8; }
.modal-card.wide { width: min(600px, 100%); } .pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 6px 12px; } .pick label { display: flex; gap: 7px; align-items: center; }
@media (max-width: 860px) { .statusbar { left: 10px; right: 10px; } }
@media (max-width: 560px) { .col { flex: 0 0 84vw; } .col.strip { flex: 0 0 44px; } .board-bar #b-pipe { min-width: 0; flex: 1 1 100%; } }
.col-body { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; overflow-y: auto; }
.col-body > .card, .col-body > .more, .col-body > .empty { flex: 0 0 auto; }
.statusbar { bottom: 30px; }

/* Tareas, notas, línea de tiempo, lote */
.task { display: flex; gap: 10px; align-items: center; padding: 6px 2px; border-bottom: 1px solid var(--line-2); } .task:last-of-type { border-bottom: 0; } .task .grow { flex: 1; min-width: 0; overflow-wrap: anywhere; } .task.done .grow { text-decoration: line-through; color: var(--muted); }
.linkish { border: 0; background: none; padding: 0; text-align: left; cursor: pointer; font-weight: 500; } .linkish:hover { color: var(--link); }
.noteitem { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; white-space: pre-wrap; overflow-wrap: anywhere; }
.timeline { gap: 0; } .tl { display: grid; grid-template-columns: 132px 1fr; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--line-2); overflow-wrap: anywhere; } .tl:last-child { border-bottom: 0; } .tl-when { color: var(--muted); font-size: 12.5px; }
.bulk { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 2px 0 12px; border-bottom: 1px solid var(--line-2); margin-bottom: 8px; }
.filters select#f-list { max-width: 220px; }

/* Tareas del equipo (F-0103) */
ul.plain { list-style: none; margin: 0 0 6px; padding: 0; display: grid; gap: 5px; } ul.plain li { overflow-wrap: anywhere; }
td.wrap { white-space: normal; min-width: 220px; max-width: 420px; overflow-wrap: anywhere; }
select.prio { padding: 3px 6px; border-radius: 99px; font-size: 12.5px; } select.prio, .tag.prio { font-weight: 600; border-color: transparent; background: var(--pb); color: var(--pc); } select.prio option { background: var(--surface); color: var(--text); font-weight: 400; }
.prio.p-Hoy { --pb: #fde4e1; --pc: #b3261e; } .prio.p-Alta { --pb: #fde6d6; --pc: #a8480a; } .prio.p-Media { --pb: #e0e9fe; --pc: #1f47b8; } .prio.p-Baja { --pb: #e9edf3; --pc: #4b5870; } .prio.p-Completado { --pb: #dcf4e8; --pc: #14693f; }
html[data-theme="dark"] select.prio, html[data-theme="dark"] .tag.prio { background: var(--pb); color: var(--pc); border-color: transparent; }
html[data-theme="dark"] .prio.p-Hoy { --pb: #4a2220; --pc: #ffa39b; } html[data-theme="dark"] .prio.p-Alta { --pb: #4a2c18; --pc: #ffb787; } html[data-theme="dark"] .prio.p-Media { --pb: #1b2f63; --pc: #a9c5ff; } html[data-theme="dark"] .prio.p-Baja { --pb: #212b42; --pc: #b8c2d6; } html[data-theme="dark"] .prio.p-Completado { --pb: #133a2c; --pc: #7fe6b0; }

/* Automatizaciones (vista de las hojas) */
table.sheet td { vertical-align: top; white-space: normal; overflow-wrap: anywhere; min-width: 90px; max-width: 520px; } table.sheet td.lbl { font-weight: 500; min-width: 180px; max-width: 340px; }
.pre { white-space: pre-wrap; } .longcell { white-space: pre-wrap; max-height: 7.6em; overflow: hidden; min-width: 300px; -webkit-mask-image: linear-gradient(#000 60%, transparent); mask-image: linear-gradient(#000 60%, transparent); } .longcell.open { max-height: none; -webkit-mask-image: none; mask-image: none; }
.longcell + .actions { margin-top: 6px; justify-content: flex-start; }
details.panel > summary { cursor: pointer; list-style: revert; } details.panel > summary h2 { display: inline; }

/* Celdas amarillas de las hojas (para llenar) y botones de Make */
.yel { background: #f7faff; border: 1px solid #c3d0e6; border-radius: 8px; padding: 6px 9px; width: 100%; min-width: 120px; font: inherit; color: #1a1f2e; } textarea.yel { min-width: 300px; resize: vertical; } select.yel { width: auto; max-width: 100%; }
.yel:hover { border-color: #9fb3d6; } .yel:focus { outline: 0; border-color: var(--accent); background: #fff; box-shadow: 0 0 0 3px rgba(29,53,102,.18); } label.yel.chk { display: inline-flex; gap: 6px; align-items: center; width: auto; min-width: 0; cursor: pointer; }
.yelkey { display: inline-block; width: 12px; height: 12px; background: #f7faff; border: 1px solid #c3d0e6; border-radius: 3px; vertical-align: -1px; }
.abar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; } .abar .muted { flex-basis: 100%; }

/* Cronograma de tareas */
.gantt { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; } .g-row { display: grid; grid-template-columns: 300px minmax(640px, 1fr); border-bottom: 1px solid var(--line-2); min-height: 34px; } .g-row:last-child { border-bottom: 0; }
.g-name { padding: 6px 10px; display: flex; flex-direction: column; justify-content: center; min-width: 0; border-right: 1px solid var(--line); background: var(--surface); position: sticky; left: 0; z-index: 2; font-size: 13px; }
.g-desc { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .g-name .muted { font-size: 12px; } .g-group .g-name { flex-direction: row; align-items: center; justify-content: flex-start; gap: 8px; font-weight: 600; } .g-group { background: var(--paper); } .g-group .g-name { background: var(--paper); }
.g-head { position: sticky; top: 0; z-index: 3; background: var(--surface); min-height: 30px; } .g-head .g-name { font-weight: 600; color: var(--muted); font-size: 12.5px; }
.g-track { position: relative; overflow: hidden; } .g-week { position: absolute; top: 0; bottom: 0; padding: 7px 6px; font-size: 12px; color: var(--muted); border-left: 1px solid var(--line-2); white-space: nowrap; overflow: hidden; }
.g-line { position: absolute; top: 0; bottom: 0; border-left: 1px solid var(--line-2); } .g-today { position: absolute; top: 0; bottom: 0; border-left: 2px solid var(--cyan); z-index: 1; }
.g-bar { position: absolute; top: 9px; height: 16px; border-radius: 99px; border: 0; padding: 0; cursor: pointer; background: var(--data); min-width: 6px; z-index: 1; } .g-bar:hover, .g-bar:focus-visible { filter: brightness(1.15); outline: 2px solid var(--cyan); outline-offset: 1px; }
.g-bar.p-Hoy { background: #ef6b62; } .g-bar.p-Alta { background: #f58a4b; } .g-bar.p-Media { background: #3b6cf6; } .g-bar.p-Baja { background: #a9b4c6; } .g-bar.p-Completado { background: #2fb67a; }
.g-bar.open { background-image: repeating-linear-gradient(135deg, rgba(255,255,255,.28) 0 6px, transparent 6px 12px); } .g-bar.late { box-shadow: 0 0 0 2px var(--bad); }
.g-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--text-2); margin: 4px 0 10px; } .g-legend span { display: inline-flex; gap: 6px; align-items: center; } .g-legend .g-bar { position: static; width: 22px; height: 12px; cursor: default; } .g-legend .g-today { position: static; height: 14px; }

/* Facturación */
.bar.two { display: flex; } .bar.two i { border-radius: 0; } .bar.two.due .b2 { background: var(--bad); } .bar.two.due i { background: #f58a4b; } .bar.two.due .b2 { background: #ef6b62; } .bar.two.paid .b2 { background: #2fb67a; } .bar.two.paid i { background: #f58a4b; } .bar.two.fee i { background: #3b6cf6; }

/* Buscador de lead con lista desplazable */
.combo { position: relative; } .combo input { width: 100%; }
.combo-list { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 4px); max-height: 320px; overflow-y: auto; overscroll-behavior: contain; background: #fff; border: 1px solid var(--line, #d5dae3); border-radius: 8px; box-shadow: 0 10px 28px rgba(10, 20, 45, .16); }
.combo-n { position: sticky; top: 0; background: #f4f6fa; padding: 6px 12px; font-size: 12px; color: #5b6577; border-bottom: 1px solid #e3e7ee; }
.combo-o { padding: 9px 12px; cursor: pointer; font-size: 14px; } .combo-o:hover, .combo-o.on { background: #e8f6fb; }
.combo-e { padding: 12px; color: #5b6577; font-size: 14px; }

/* Campañas: encargo listo para copiar */
.encargo { white-space: pre-wrap; word-break: break-word; font: 13px/1.5 var(--font); background: #f6f8fc; border: 1px solid var(--line); border-radius: 8px; padding: 14px; margin: 8px 0 0; max-height: 460px; overflow: auto; }

/* Formularios largos: el cuadro se desplaza por dentro y los botones quedan a la vista */
.modal-card { max-height: calc(100vh - 32px); overflow-y: auto; overscroll-behavior: contain; } .modal-card > .actions { position: sticky; bottom: -18px; background: var(--surface); padding: 12px 0; margin-bottom: -12px; }

/* ---------- Modo oscuro (se activa con el interruptor de la barra lateral) ---------- */
.theme-sw { display: flex; align-items: center; gap: 9px; margin-top: 10px; padding: 0; border: 0; background: none; color: #c9d3e3; font: inherit; font-size: 13px; cursor: pointer; }
.theme-sw .track { position: relative; width: 36px; height: 20px; border-radius: 99px; background: #2a3654; transition: background .15s; flex: none; }
.theme-sw .track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; }
.theme-sw[aria-checked="true"] .track { background: #b6f24a; } .theme-sw[aria-checked="true"] .track::after { transform: translateX(16px); background: #0b1326; }
.theme-sw:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 6px; }
@media (prefers-reduced-motion: reduce) { .theme-sw .track, .theme-sw .track::after { transition: none; } }

html[data-theme="dark"] {
  color-scheme: dark;
  --paper: #060b18; --surface: #0d1629; --line: #1e2a45; --line-2: #162039; --navy: #0a1122; --navy-2: #16213d;
  --text: #f1f4fb; --text-2: #c7d0e3; --muted: #8b98b3; --link: #62c9f2; --focus: #3ddcf0;
  --good: #7be3ab; --good-bg: #12352a; --warn: #7fe3ee; --warn-bg: #0f3a42; --bad: #ff9c94; --bad-bg: #42201f;
  --blue: #9dc1ff; --blue-bg: #16284f; --violet: #c3b6ff; --violet-bg: #2a2352; --orange: #ffb98a; --orange-bg: #42291a;
  --accent: #2f6bff; --accent-2: #4a80ff; --data: #3f73ff; --data-soft: #28407f; --track: #141e36;
  --shadow: 0 1px 2px rgba(0,0,0,.4); --shadow-2: 0 18px 50px rgba(0,0,0,.6); --lime: #b6f24a;
}
html[data-theme="dark"] body { background: radial-gradient(1200px 500px at 60% -10%, #0e1a36 0%, var(--paper) 60%) fixed; }
html[data-theme="dark"] .sidebar { background: #080e1d; border-right: 1px solid var(--line); }
html[data-theme="dark"] .panel, html[data-theme="dark"] .kpi, html[data-theme="dark"] .card, html[data-theme="dark"] .modal-card { background: linear-gradient(180deg, #0f1930 0%, #0b1325 100%); border-color: var(--line); }
html[data-theme="dark"] .panel { border-radius: 14px; }
html[data-theme="dark"] input, html[data-theme="dark"] select, html[data-theme="dark"] textarea { background: #0a1223; color: var(--text); border-color: #24314f; }
html[data-theme="dark"] input::placeholder, html[data-theme="dark"] textarea::placeholder { color: #6f7c97; }
html[data-theme="dark"] input:hover, html[data-theme="dark"] select:hover, html[data-theme="dark"] textarea:hover { border-color: #3a4a70; }
html[data-theme="dark"] .btn { background: #111b33; border-color: #26345a; color: var(--text); } html[data-theme="dark"] .btn:hover { background: #17233f; border-color: #3a4a70; }
html[data-theme="dark"] .btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 2px 10px rgba(47,107,255,.35); } html[data-theme="dark"] .btn.primary:hover { background: var(--accent-2); border-color: var(--accent-2); }
html[data-theme="dark"] .tabs button.on { color: #fff; border-bottom-color: var(--lime); }
html[data-theme="dark"] .seg-toggle { background: #111b33; border-color: #26345a; } html[data-theme="dark"] .seg-toggle a.on { background: var(--lime); color: #0b1326; }
html[data-theme="dark"] .tag { background: #1a2542; color: var(--text-2); } html[data-theme="dark"] .tag.warn { background: var(--warn-bg); color: var(--warn); } html[data-theme="dark"] .tag.bad { background: var(--bad-bg); color: var(--bad); } html[data-theme="dark"] .tag.good { background: var(--good-bg); color: var(--good); }
html[data-theme="dark"] .pill { background: #1a2542; color: var(--text-2); }
/* Cifras: tarjetas separadas, costos en cian y clientes en verde lima */
html[data-theme="dark"] .kpis { background: none; border: 0; gap: 12px; overflow: visible; } html[data-theme="dark"] .kpi { border: 1px solid var(--line); border-radius: 14px; margin: 0; padding: 14px 18px; }
html[data-theme="dark"] .kpi b { color: #fff; } html[data-theme="dark"] #cost-row .kpi b { color: #3ddcf0; font-size: 22px; } html[data-theme="dark"] .kpis:not(#cost-row) .kpi:last-child b { color: var(--lime); }
/* Tablero */
html[data-theme="dark"] .col, html[data-theme="dark"] .col.strip { background: #0a1122; border: 1px solid var(--line); border-top: 3px solid var(--c); }
html[data-theme="dark"] .col.over, html[data-theme="dark"] .col.strip.over, html[data-theme="dark"] .zone.over, html[data-theme="dark"] .dropbar .chip.over { background: #0f3a42; }
html[data-theme="dark"] .card:hover { border-color: #3a4a70; } html[data-theme="dark"] .col-x:hover, html[data-theme="dark"] .strip-btn:hover { background: #1a2542; }
html[data-theme="dark"] .dropbar .chip { background: #0f1930; border-color: #34446a; } html[data-theme="dark"] .stage:hover:not(:disabled) { background: #17233f; border-color: #3a4a70; }
/* Tablas, listas y cajas */
html[data-theme="dark"] tr.click:hover td, html[data-theme="dark"] tr.total td, html[data-theme="dark"] .list-item:hover { background: #131d36; } html[data-theme="dark"] .list-item.sel { background: #0f3a42; }
html[data-theme="dark"] .box, html[data-theme="dark"] .encargo { background: #0a1223; border-color: var(--line); color: var(--text); }
html[data-theme="dark"] .yel { background: #0a1223; border-color: #2a3a60; color: var(--text); } html[data-theme="dark"] .yel:hover { border-color: #3f5488; }
html[data-theme="dark"] .yel:focus { background: #0c162b; border-color: #4a80ff; box-shadow: 0 0 0 3px rgba(74,128,255,.25); } html[data-theme="dark"] .yelkey { background: #0a1223; border-color: #2a3a60; }
html[data-theme="dark"] .combo-list { background: #0f1930; border-color: #26345a; box-shadow: var(--shadow-2); } html[data-theme="dark"] .combo-n { background: #0a1223; color: var(--muted); border-bottom-color: var(--line); }
html[data-theme="dark"] .combo-o:hover, html[data-theme="dark"] .combo-o.on { background: #17233f; } html[data-theme="dark"] .combo-e { color: var(--muted); }
html[data-theme="dark"] .modal { background: rgba(2,5,12,.7); } html[data-theme="dark"] .modal-card > .actions { background: #0b1325; }
html[data-theme="dark"] .toast { background: #17233f; border: 1px solid #2a3a60; border-left: 3px solid var(--cyan); }
/* Gráficas y barras */
html[data-theme="dark"] .fbar { background: #0f1930; } html[data-theme="dark"] .fbar i { background: linear-gradient(90deg, #2a49e8, #3f73ff); }
html[data-theme="dark"] .fstep:nth-child(2) .fbar i { background: linear-gradient(90deg, #3f73ff, #4f9bff); } html[data-theme="dark"] .fstep:nth-child(3) .fbar i { background: linear-gradient(90deg, #4f9bff, #45b8f5); }
html[data-theme="dark"] .fstep:nth-child(4) .fbar i { background: linear-gradient(90deg, #2fc7e0, #3ddcf0); } html[data-theme="dark"] .fstep:nth-child(5) .fbar i { background: var(--lime); }
html[data-theme="dark"] .chart .line { stroke: #3ddcf0; } html[data-theme="dark"] .chart .dot { fill: #0d1629; stroke: #3ddcf0; } html[data-theme="dark"] .chart .grid-l { stroke: #1a2542; }
html[data-theme="dark"] .analysis { border-left-color: var(--lime); }
html[data-theme="dark"] .login { background: var(--paper); } html[data-theme="dark"] .login-art { background: #080e1d; border-right: 1px solid var(--line); }
html[data-theme="dark"] .demo-flag { background: #0f2716; color: #b6f24a; }
html[data-theme="dark"] a { color: var(--link); } html[data-theme="dark"] a.btn { color: var(--text); } html[data-theme="dark"] a.btn.primary { color: #fff; } html[data-theme="dark"] .nav a { color: #c9d3e3; } html[data-theme="dark"] .nav a.on { color: #fff; }
html[data-theme="dark"] #cp-review h3, html[data-theme="dark"] #cp-review ~ .panel h3 { color: var(--text-2); }

/* Barra lateral en ventanas bajas: el menú se desplaza por dentro y el pie (usuario, botones y modo oscuro) queda siempre completo */
@media (min-width: 861px) {
  .sidebar { overflow: hidden; padding-bottom: 16px; } .sidebar > * { flex-shrink: 0; }
  .sidebar .nav { flex: 1 1 auto; min-height: 0; overflow-y: auto; align-content: start; scrollbar-width: thin; scrollbar-color: #2a3654 transparent; }
  .side-foot { margin-top: 0; } .theme-sw { margin-top: 2px; margin-bottom: 2px; }
}

.btn .ico { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------- Revisión general: alineación y espaciado ---------- */
.btn { vertical-align: middle; }
.tabs button { display: inline-flex; align-items: center; gap: 6px; } .tab-ico { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.list-item { flex-wrap: wrap; } .list-item .grow { flex: 1 1 190px; } .list-item .pill, .list-item .tag { flex: none; }
table.sheet.two { table-layout: fixed; width: 100%; } table.sheet.two td { max-width: none; } table.sheet.two td.lbl { width: 46%; }
td.act { position: sticky; right: 0; background: var(--surface); white-space: nowrap; box-shadow: -8px 0 8px -8px rgba(11,19,38,.12); } tr.click:hover td.act { background: #f6f8fb; }
html[data-theme="dark"] td.act { background: #0d1629; } html[data-theme="dark"] tr.click:hover td.act { background: #131d36; }
.panel > p.muted:last-child, .panel > p.empty:last-child { margin-bottom: 0; }
@media (max-width: 860px) { .split { grid-template-columns: minmax(0, 1fr); } table.sheet.two td.lbl { width: 40%; } }
table.cobros th, table.cobros td { padding-left: 6px; padding-right: 6px; } table.cobros td:first-child { min-width: 170px; } table.cobros td:nth-child(4), table.cobros td:nth-child(5) { white-space: nowrap; }

/* Buscador general, contador de alertas, encabezados de sección y agenda */
.gsearch { width: 300px; max-width: 100%; align-self: center; } .gsearch input { width: 100%; }
.g-box { left: auto; right: 0; width: 440px; max-width: calc(100vw - 28px); max-height: min(70vh, 480px); z-index: 60; }
.g-box .combo-o { line-height: 1.35; overflow-wrap: anywhere; } .g-box .combo-o b { font-weight: 500; } .g-box .combo-o .muted { font-size: 12.5px; }
.nav-n { margin-left: auto; min-width: 20px; padding: 0 6px; border-radius: 99px; background: #ef6b62; color: #fff; font: 600 11.5px/18px var(--font); text-align: center; }
.hello { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; } .hello .grow { flex: 1 1 260px; min-width: 0; }
.sec-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 20px 0 10px; } .sec-head h2 { font: 700 19px/1.2 var(--font-cond); margin: 0; flex: 1 1 auto; }
.task .when { flex: 0 0 108px; color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.panel h3 { margin-top: 12px; } .panel h2 + h3 { margin-top: 4px; }
details.fold > summary { cursor: pointer; font-weight: 600; } details.fold[open] > summary { margin-bottom: 8px; }
.panel details:not(.fold) { margin-top: 10px; } .panel details:not(.fold) > summary { cursor: pointer; color: var(--muted); }
@media (max-width: 860px) { .gsearch { flex: 1 1 100%; order: 5; width: auto; } .g-box { left: 0; right: 0; width: auto; } .nav-n { margin-left: 6px; } #freshness { margin-left: auto; } .task .when { flex-basis: 92px; } }
#d-tabs { gap: 0; padding: 0 10px; } #d-tabs button { padding: 8px 8px; font-size: 13.5px; }
.form-row .field input, .form-row .field select { height: 36px; }
.task.stack { flex-wrap: wrap; row-gap: 6px; } .task.stack .grow { flex: 1 1 100%; }
.panel .sec-head h2 { font: inherit; font-weight: 600; font-size: 15px; }
/* Celular: los formularios de dos columnas se apilan (dato arriba, campo abajo) y nada se sale de la pantalla */
@media (max-width: 560px) {
  table.sheet.two, table.sheet.two tbody, table.sheet.two tr { display: block; width: 100%; }
  table.sheet.two td, table.sheet.two td.lbl, table.sheet.two th { display: block; width: 100%; min-width: 0; max-width: none; box-sizing: border-box; }
  table.sheet.two td.lbl { padding-bottom: 2px; border-bottom: 0; } table.sheet.two td.lbl + td { padding-top: 2px; }
  table.sheet th { white-space: normal; } table.sheet input, table.sheet select, table.sheet textarea { max-width: 100%; box-sizing: border-box; }
  table.sheet.two input:not([type=checkbox]), table.sheet.two select, table.sheet.two textarea { width: 100%; }
  .tl { grid-template-columns: 1fr; gap: 2px; }
  .board-bar #b-pipe, .board-bar > select[aria-label="Embudo"] { display: none; }
}
/* Automatizaciones del bot de Telegram */
.bot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px 16px; margin-top: 12px; }
.bot-a { display: flex; flex-direction: column; gap: 6px; align-items: stretch; } .bot-a .btn { text-align: center; white-space: normal; } .bot-a .muted { font-size: 12.5px; line-height: 1.4; }
.bad-text { color: #b3261e; } html[data-theme="dark"] .bad-text { color: #ff9a92; }
.res-grid { grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); align-items: start; } @media (max-width: 560px) { .res-grid { grid-template-columns: minmax(0, 1fr); } }
.pick label input { flex: none; }
/* Ficha del lead en celular: nada se sale a lo ancho */
.drawer .box { min-width: 0; overflow-wrap: anywhere; } .drawer .tag { white-space: normal; } .drawer-body > div { min-width: 0; max-width: 100%; }
