* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg: #0f1114; --panel: #181b20; --panel2: #212530; --line: #2c313c;
  --input: #12151a;
  --text: #e6e8ec; --muted: #8b94a3;
  --accent: #00c8b0; --accent-d: #3ad9c4; --accent-soft: #0c322e; --accent-ink: #04201d;
  --blue: #4d9fff; --cyan: #37c6e8; --coral: #ff7a68; --pink: #ff5fa2;
  --green: #43c47b; --warn: #e0a63a; --danger: #ff6b6b;
  --shadow: 0 1px 3px rgba(0,0,0,.5), 0 1px 2px rgba(0,0,0,.35);
}
body { font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--text); height: 100vh; overflow: hidden; }
.hidden { display: none !important; }
.err { color: var(--danger); font-size: 13px; min-height: 16px; }

/* login */
.login { display:flex; align-items:center; justify-content:center; height:100vh; }
.login-box { background: var(--panel); padding: 34px; border-radius: 14px; width: 330px; display:flex; flex-direction:column; gap:12px; box-shadow: var(--shadow); border:1px solid var(--line); align-items:stretch; }
.login-logo { width: 180px; align-self:center; }
.login-sub { text-align:center; color: var(--accent); font-weight:700; letter-spacing:2px; font-size:12px; margin-top:-6px; margin-bottom:6px; }
.login-box h1 { font-size: 18px; text-align:center; color: var(--text); }
.login-box input { padding: 11px 13px; border-radius: 9px; border:1px solid var(--line); background: var(--input); color: var(--text); font-size: 14px; }
.login-box input:focus { outline:2px solid var(--accent-soft); border-color: var(--accent); }
.login-box button { padding: 11px; border-radius: 9px; background: var(--accent); border:0; color:var(--accent-ink); cursor:pointer; font-weight:700; font-size:14px; }
.login-box button:hover { background: var(--accent-d); }

/* app */
#app { height:100vh; display:flex; flex-direction:column; }
header { display:flex; align-items:center; gap:10px; padding: 11px 18px; background: var(--panel); border-bottom:1px solid var(--line); box-shadow: var(--shadow); z-index:5; }
.brand-logo { height: 34px; display:block; }
.brand-tag { color: var(--accent); font-weight:800; letter-spacing:2px; font-size:12px; margin-left:2px; }
.grow { flex:1; }
header button { background: var(--panel2); color: var(--text); border:1px solid var(--line); border-radius:8px; padding:7px 12px; cursor:pointer; font-size:13px; }
header button:hover { border-color: var(--accent); color: var(--accent-d); }
header button.iconbtn { padding:7px 10px; }

.board { flex:1; display:flex; gap:12px; padding:16px; overflow-x:auto; align-items:flex-start; background: var(--bg); }
.col { background: var(--panel); border:1px solid var(--line); border-radius:12px; width: 276px; min-width:276px; max-height:100%; display:flex; flex-direction:column; box-shadow: var(--shadow); }
.col-head { padding:11px 13px; font-size:13px; font-weight:700; display:flex; justify-content:space-between; align-items:center; border-bottom:1px solid var(--line); border-left:4px solid var(--accent); border-radius:12px 0 0 0; }
.col-head .count { color: var(--muted); font-weight:600; background: var(--panel2); border-radius:20px; padding:1px 9px; font-size:12px; }
.col-list { padding:9px; overflow-y:auto; flex:1; min-height:44px; display:flex; flex-direction:column; gap:9px; }
.card { background: var(--panel2); border:1px solid var(--line); border-radius:10px; padding:11px; cursor:pointer; font-size:13px; transition: border-color .12s, box-shadow .12s; }
.card:hover { border-color: var(--accent); box-shadow: 0 2px 10px rgba(0,200,176,.18); }
.card .name { font-weight:700; margin-bottom:3px; color: var(--text); }
.card .sub { color: var(--muted); font-size:12px; line-height:1.4; }
.card .meta { display:flex; gap:6px; margin-top:7px; flex-wrap:wrap; }
.badge { font-size:11px; padding:2px 7px; border-radius:6px; background: var(--panel); color: var(--muted); font-weight:600; }
.badge.wait { background:rgba(224,166,58,.16); color:var(--warn); }
.badge.human { background:rgba(67,196,123,.16); color:var(--green); }
.badge.urgent { background:rgba(255,107,107,.18); color:var(--danger); }
.badge.full { background: var(--accent-soft); color: var(--accent-d); }
.sortable-ghost { opacity:.35; }

/* pulso de atencion (item 2) */
@keyframes pulseYellow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(224,166,58,0); }
  50% { box-shadow: 0 0 0 4px rgba(224,166,58,.35); }
}
@keyframes pulseRed {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,107,107,0); }
  50% { box-shadow: 0 0 0 5px rgba(255,107,107,.5); }
}
.card.attn-yellow { border-color: var(--warn); animation: pulseYellow 1.8s ease-in-out infinite; }
.card.attn-red { border-color: var(--danger); animation: pulseRed 1.2s ease-in-out infinite; }
.card.attn-yellow:hover, .card.attn-red:hover { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) { .card.attn-yellow, .card.attn-red { animation: none; } }

/* drawer */
.drawer { position:fixed; inset:0; z-index:50; }
.drawer-backdrop { position:absolute; inset:0; background:rgba(0,0,0,.55); }
.drawer-panel { position:absolute; right:0; top:0; height:100%; width: 740px; max-width:97vw; background: var(--bg); border-left:1px solid var(--line); overflow-y:auto; padding: 22px; box-shadow: -4px 0 24px rgba(0,0,0,.5); }
.drawer-close { position:absolute; top:12px; right:16px; background:none; border:0; color:var(--muted); font-size:26px; cursor:pointer; line-height:1; }
.drawer h2 { font-size:18px; margin-bottom:3px; color: var(--text); }
.drawer .tel { color:var(--muted); font-size:13px; margin-bottom:18px; }
.grid2 { display:grid; grid-template-columns: 1fr 1fr; gap:22px; }
@media (max-width: 780px) { .grid2 { grid-template-columns: 1fr; } }
.section { margin-bottom:20px; background: var(--panel); border:1px solid var(--line); border-radius:10px; padding:14px; box-shadow: var(--shadow); }
.section h3 { font-size:11px; text-transform:uppercase; letter-spacing:.6px; color:var(--accent-d); margin-bottom:10px; font-weight:700; }
.field { margin-bottom:9px; }
.field label { display:block; font-size:11px; color:var(--muted); margin-bottom:3px; font-weight:600; }
.field input, .field select, .field textarea { width:100%; padding:8px 10px; background:var(--input); border:1px solid var(--line); border-radius:7px; color:var(--text); font-size:13px; font-family:inherit; }
.field input:focus, .field select:focus, .field textarea:focus { outline:2px solid var(--accent-soft); border-color: var(--accent); }
.field textarea { min-height:62px; resize:vertical; }
.btn { padding:8px 13px; border-radius:8px; border:1px solid var(--line); background:var(--panel2); color:var(--text); cursor:pointer; font-size:13px; }
.btn:hover { border-color: var(--accent); }
.btn.primary { background:var(--accent); border:0; color:var(--accent-ink); font-weight:700; }
.btn.ok { background:var(--green); border:0; color:#04220f; font-weight:700; }
.btn.sm { padding:5px 10px; font-size:12px; }

.archivos { display:grid; grid-template-columns: repeat(auto-fill, minmax(92px,1fr)); gap:8px; }
.arch { border:1px solid var(--line); border-radius:8px; overflow:hidden; background:var(--panel2); font-size:11px; }
.arch img { width:100%; height:84px; object-fit:cover; display:block; cursor:pointer; }
.arch .lbl { padding:5px 6px; color:var(--muted); line-height:1.3; }
.arch .doc { height:84px; display:flex; align-items:center; justify-content:center; font-size:26px; background: var(--panel); }

.chat { border:1px solid var(--line); border-radius:9px; background: var(--bg); height:360px; overflow-y:auto; padding:11px; display:flex; flex-direction:column; gap:7px; }
.msg { max-width:80%; padding:8px 11px; border-radius:11px; font-size:13px; line-height:1.4; white-space:pre-wrap; word-break:break-word; }
.msg.cliente { align-self:flex-start; background:var(--panel2); border:1px solid var(--line); }
.msg.bot { align-self:flex-end; background: var(--accent-soft); }
.msg.humano { align-self:flex-end; background:rgba(67,196,123,.16); }
.msg .who { font-size:10px; color:var(--muted); margin-bottom:2px; font-weight:600; }
.msg img { max-width:210px; border-radius:7px; margin-top:5px; display:block; }
.replybar { display:flex; gap:8px; margin-top:9px; }
.replybar textarea { flex:1; min-height:46px; padding:8px 10px; background:var(--input); color:var(--text); border:1px solid var(--line); border-radius:8px; font-family:inherit; font-size:13px; }
.modo { display:flex; align-items:center; gap:9px; margin-top:9px; font-size:12px; color:var(--muted); }
.toast { position:fixed; bottom:18px; left:50%; transform:translateX(-50%); background: var(--text); color:var(--bg); padding:9px 17px; border-radius:9px; font-size:13px; z-index:99; box-shadow: var(--shadow); font-weight:600; }

/* metricas */
.metrics { flex:1; overflow-y:auto; padding:18px; background: var(--bg); }
.stats { display:grid; grid-template-columns: repeat(auto-fill, minmax(150px,1fr)); gap:11px; margin-bottom:18px; }
.stat { background: var(--panel); border:1px solid var(--line); border-radius:11px; padding:13px 14px; box-shadow: var(--shadow); }
.stat-v { font-size:21px; font-weight:800; color: var(--text); line-height:1.15; }
.stat-l { font-size:11px; color: var(--muted); margin-top:4px; font-weight:600; text-transform:uppercase; letter-spacing:.4px; }
.stat-h { font-size:10px; color: var(--muted); margin-top:2px; }
.mgrid { display:grid; grid-template-columns: repeat(auto-fit, minmax(320px,1fr)); gap:14px; }
.mpanel { background: var(--panel); border:1px solid var(--line); border-radius:12px; padding:15px 16px; box-shadow: var(--shadow); }
.mpanel h3 { font-size:11px; text-transform:uppercase; letter-spacing:.6px; color: var(--accent-d); margin-bottom:12px; font-weight:700; }
.mempty { color: var(--muted); font-size:13px; }
.bar-row { display:flex; align-items:center; gap:9px; margin-bottom:7px; font-size:12px; }
.bar-lbl { width:120px; min-width:120px; color: var(--text); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.bar-track { flex:1; background: var(--panel2); border-radius:6px; height:14px; overflow:hidden; }
.bar-fill { height:100%; background: var(--accent); border-radius:6px; min-width:2px; }
.bar-n { min-width:64px; text-align:right; color: var(--muted); font-weight:600; }
.wkchart { display:flex; align-items:flex-end; gap:6px; height:150px; padding-top:14px; }
.wkcol { flex:1; display:flex; flex-direction:column; align-items:center; height:100%; justify-content:flex-end; gap:3px; }
.wkbar { width:100%; max-width:34px; background: var(--accent); border-radius:4px 4px 0 0; min-height:2px; transition: height .2s; }
.wkbar.alt { background: var(--cyan); }
.wkn { font-size:10px; color: var(--muted); font-weight:700; }
.wkx { font-size:10px; color: var(--muted); }
.mfoot { margin-top:14px; font-size:11px; color: var(--muted); }

/* cotizaciones */
.cotsec .cot-head { display:flex; align-items:center; justify-content:space-between; margin-bottom:12px; }
.cotsec .cot-head h3 { margin:0; }
a.btn { display:inline-block; text-decoration:none; }
.cot-row { border:1px solid var(--line); border-radius:9px; padding:11px; margin-bottom:9px; background:var(--panel2); }
.cot-row-top { display:flex; align-items:center; gap:9px; }
.cot-folio { font-weight:700; font-size:13px; }
.cot-total { margin-left:auto; font-weight:800; font-size:14px; }
.cot-badge { font-size:10px; font-weight:700; padding:2px 7px; border-radius:6px; text-transform:uppercase; letter-spacing:.4px; background: var(--panel); color: var(--muted); }
.cot-badge.b-enviada { background:rgba(77,159,255,.16); color: var(--blue); }
.cot-badge.b-aceptada { background:rgba(67,196,123,.16); color: var(--green); }
.cot-badge.b-rechazada { background:rgba(255,107,107,.16); color: var(--danger); }
.cot-badge.b-vencida { background:rgba(224,166,58,.16); color: var(--warn); }
.cot-meta { display:flex; gap:12px; font-size:11px; color: var(--muted); margin:7px 0; flex-wrap:wrap; }
.cot-acts { display:flex; gap:6px; flex-wrap:wrap; }
.cot-editor { display:flex; flex-direction:column; gap:10px; }
.cot-tbl { width:100%; border-collapse:collapse; font-size:12px; }
.cot-tbl th { text-align:left; color: var(--muted); font-size:10px; text-transform:uppercase; padding:4px; }
.cot-tbl td { padding:3px 4px; }
.cot-tbl input { width:100%; padding:6px 7px; background:var(--input); color:var(--text); border:1px solid var(--line); border-radius:6px; font-size:12px; font-family:inherit; }
.cot-tbl .i-cant, .cot-tbl .i-pu { max-width:90px; }
.cot-tbl .i-uni { max-width:70px; }
.cot-tbl .i-imp { text-align:right; white-space:nowrap; color: var(--muted); font-weight:600; }
.cot-tbl .i-del { background:none; border:0; color: var(--danger); font-size:16px; cursor:pointer; line-height:1; }
.cot-opts { display:flex; gap:12px; flex-wrap:wrap; }
.cot-opts label { font-size:11px; color: var(--muted); display:flex; flex-direction:column; gap:3px; font-weight:600; }
.cot-opts input { padding:6px 8px; background:var(--input); color:var(--text); border:1px solid var(--line); border-radius:6px; font-size:12px; max-width:130px; }
.cot-editor textarea { width:100%; min-height:52px; padding:8px 10px; background:var(--input); color:var(--text); border:1px solid var(--line); border-radius:7px; font-family:inherit; font-size:12px; resize:vertical; }
.cot-tot { margin-left:auto; width:220px; font-size:12px; }
.cot-tot div { display:flex; justify-content:space-between; padding:3px 0; }
.cot-tot .g { border-top:2px solid var(--line); margin-top:3px; padding-top:6px; font-size:15px; }
.cot-bar { display:flex; gap:8px; justify-content:flex-end; }

/* ===== nav + vistas (kommo features) ===== */
#nav { display:flex; gap:2px; margin-left:12px; }
.navbtn { background:transparent; border:0; color:var(--muted); padding:7px 11px; border-radius:7px; cursor:pointer; font-size:13px; }
.navbtn:hover { color:var(--text); background:var(--panel2); }
.navbtn.active { color:var(--accent-d); background:var(--accent-soft); font-weight:600; }
.view { flex:1; overflow-y:auto; padding:18px; background:var(--bg); }

/* etiquetas */
.card-tags, .lead-tags { display:flex; gap:5px; flex-wrap:wrap; margin-top:7px; }
.lead-tags { margin-bottom:16px; }
.tag { font-size:11px; font-weight:600; padding:2px 8px; border-radius:20px; color:#0b0d10; white-space:nowrap; position:relative; }
.tag-x { cursor:pointer; opacity:.6; font-weight:700; }
.tag-x:hover { opacity:1; }
.tag-add { background:var(--panel2); color:var(--muted); cursor:pointer; border:1px dashed var(--line); }
.tag-menu { position:absolute; top:110%; left:0; z-index:20; background:var(--panel); border:1px solid var(--line); border-radius:9px; box-shadow:var(--shadow); min-width:170px; padding:5px; }
.tag-opt { padding:6px 9px; font-size:12px; color:var(--text); cursor:pointer; border-radius:6px; }
.tag-opt:hover { background:var(--panel2); }

/* tareas */
.tarea-form { display:flex; flex-direction:column; gap:7px; margin:8px 0; }
.tarea-form input, .tarea-form select { padding:7px 9px; background:var(--input); color:var(--text); border:1px solid var(--line); border-radius:7px; font-size:12px; font-family:inherit; }
.tarea-row { display:flex; align-items:flex-start; gap:9px; padding:8px 0; border-bottom:1px solid var(--line); }
.tarea-row.done { opacity:.5; }
.tarea-row.done .tarea-tit { text-decoration:line-through; }
.tarea-row.venc .tarea-tit { color:var(--danger); }
.tarea-row input[type=checkbox] { margin-top:2px; }
.tarea-mid { flex:1; }
.tarea-tit { font-size:13px; }
.tarea-meta { display:flex; gap:9px; flex-wrap:wrap; font-size:11px; color:var(--muted); margin-top:2px; }
.tarea-lead { color:var(--accent-d); cursor:pointer; }
.tarea-del { background:none; border:0; color:var(--muted); cursor:pointer; font-size:15px; }
.tarea-del:hover { color:var(--danger); }

/* linea de tiempo */
.timeline { display:flex; flex-direction:column; gap:2px; margin-top:10px; }
.tl-row { display:flex; gap:9px; padding:6px 0; border-bottom:1px solid var(--line); }
.tl-ic { width:18px; text-align:center; flex-shrink:0; }
.tl-body { flex:1; }
.tl-txt { font-size:12px; line-height:1.4; }
.tl-meta { font-size:10px; color:var(--muted); margin-top:1px; }

/* plantilla picker en respuesta */
.plbar { margin-top:9px; }
.plsel { width:100%; padding:7px 9px; background:var(--input); color:var(--text); border:1px solid var(--line); border-radius:7px; font-size:12px; }
.pl-preview { font-size:12px; color:var(--muted); margin:6px 0; white-space:pre-wrap; line-height:1.4; }

/* vista lista */
.lista-bar { display:flex; gap:8px; flex-wrap:wrap; margin-bottom:12px; }
.lista-bar input, .lista-bar select { padding:8px 10px; background:var(--input); color:var(--text); border:1px solid var(--line); border-radius:7px; font-size:12px; }
.lista-wrap { overflow-x:auto; border:1px solid var(--line); border-radius:10px; }
.lista-tbl { width:100%; border-collapse:collapse; font-size:12px; background:var(--panel); }
.lista-tbl th { text-align:left; padding:9px 11px; color:var(--muted); font-size:10px; text-transform:uppercase; letter-spacing:.4px; border-bottom:1px solid var(--line); cursor:pointer; white-space:nowrap; }
.lista-tbl td { padding:9px 11px; border-bottom:1px solid var(--line); }
.lista-tbl tbody tr { cursor:pointer; }
.lista-tbl tbody tr:hover { background:var(--panel2); }
.lista-tbl tr.row-red td:first-child { box-shadow:inset 3px 0 0 var(--danger); }
.lista-tbl tr.row-yellow td:first-child { box-shadow:inset 3px 0 0 var(--warn); }

/* bandeja de conversaciones */
#inbox.view { padding:12px; overflow:hidden; display:flex; }
.inbox { display:flex; gap:12px; width:100%; height:100%; }
.inbox-list { width:330px; min-width:330px; display:flex; flex-direction:column; background:var(--panel); border:2px solid var(--accent); border-radius:12px; overflow:hidden; }
.inbox-list-title { padding:10px 13px; font-size:11px; font-weight:800; text-transform:uppercase; letter-spacing:.6px; color:var(--accent-d); border-bottom:1px solid var(--line); background:var(--accent-soft); }
.inbox-filtros { display:flex; flex-wrap:wrap; gap:4px; padding:9px 10px; border-bottom:1px solid var(--line); }
.inbox-fbtn { background:transparent; border:1px solid var(--line); color:var(--muted); padding:4px 8px; border-radius:20px; cursor:pointer; font-size:11px; }
.inbox-fbtn.active { background:var(--accent-soft); color:var(--accent-d); border-color:var(--accent); font-weight:600; }
.inbox-items { flex:1; overflow-y:auto; padding:6px; }
.inbox-item { display:flex; align-items:flex-start; gap:8px; padding:10px; margin-bottom:6px; border:1px solid var(--line); border-radius:9px; cursor:pointer; background:var(--bg); transition:border-color .12s; }
.inbox-item:hover { border-color:var(--accent); }
.inbox-item.sel { border-color:var(--accent); background:var(--accent-soft); box-shadow:0 0 0 1px var(--accent) inset; }
.inbox-dot { width:8px; min-width:8px; height:8px; border-radius:50%; margin-top:4px; }
.inbox-dot.none { background:var(--line); }
.inbox-dot.red { background:var(--danger); }
.inbox-dot.yellow { background:var(--warn); }
.inbox-dot.human { background:var(--green); }
.inbox-item-mid { flex:1; min-width:0; }
.inbox-item-top { display:flex; align-items:baseline; gap:6px; justify-content:space-between; }
.inbox-item-name { font-weight:700; font-size:13px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; flex:1; }
.inbox-item-prev { font-size:12px; color:var(--muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; margin:3px 0; }
.inbox-item-time { font-size:10px; color:var(--muted); white-space:nowrap; }
.canal-badge { display:inline-block; font-size:9px; font-weight:800; padding:1px 6px; border-radius:5px; text-transform:uppercase; letter-spacing:.3px; white-space:nowrap; }
.canal-badge.wa { background:rgba(37,211,102,.18); color:#25d366; }
.canal-badge.fb { background:rgba(0,132,255,.20); color:#4d9fff; }
.canal-badge.ig { background:rgba(214,41,118,.20); color:#ff5fa2; }
.canal-badge.em { background:var(--panel2); color:var(--muted); }
.canal-badge.tg { background:rgba(41,171,226,.20); color:#37c6e8; }
.inbox-main { flex:1; display:flex; flex-direction:column; min-width:0; background:var(--panel); border:1px solid var(--line); border-radius:12px; overflow:hidden; }
.inbox-empty { margin:auto; color:var(--muted); font-size:13px; }
.inbox-head { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:12px 16px; border-bottom:1px solid var(--line); background:var(--panel2); }
.inbox-head-name { font-weight:700; font-size:15px; display:flex; align-items:center; gap:8px; }
.inbox-head-sub { font-size:12px; color:var(--muted); margin-top:2px; }
.inbox-head-actions { display:flex; gap:6px; flex-wrap:wrap; }
.inbox-chat { flex:1; height:auto; border:0; border-radius:0; background:var(--bg); }
.inbox-foot { padding:10px 14px 14px; border-top:1px solid var(--line); background:var(--panel2); }
.inbox-foot .plsel { margin-bottom:7px; }
@media (max-width:720px) {
  .inbox-list { width:150px; min-width:150px; }
  .inbox-item-prev, .inbox-item-time { display:none; }
}

/* ===== manual de usuario ===== */
.manual-wrap { max-width: 820px; margin: 0 auto; }
.manual-bar { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:16px; padding-bottom:10px; border-bottom:1px solid var(--line); }
.manual-meta { font-size:12px; color: var(--muted); }
.manual-doc { line-height:1.6; font-size:14px; color: var(--text); }
.manual-doc h1 { font-size:22px; margin:0 0 6px; }
.manual-doc h2 { font-size:18px; margin:26px 0 8px; padding-top:14px; border-top:1px solid var(--line); }
.manual-doc h3 { font-size:15px; margin:18px 0 6px; color: var(--accent-d); }
.manual-doc h4 { font-size:13px; margin:14px 0 4px; text-transform:uppercase; letter-spacing:.4px; color: var(--muted); }
.manual-doc p { margin:8px 0; }
.manual-doc ul, .manual-doc ol { margin:8px 0 8px 22px; }
.manual-doc li { margin:3px 0; }
.manual-doc code { background: var(--panel2); padding:1px 5px; border-radius:4px; font-size:12.5px; }
.manual-doc pre { background: var(--input); border:1px solid var(--line); border-radius:8px; padding:11px 13px; overflow-x:auto; margin:10px 0; }
.manual-doc pre code { background:none; padding:0; }
.manual-doc a { color: var(--accent-d); }
.manual-doc hr { border:0; border-top:1px solid var(--line); margin:20px 0; }
.manual-doc table { width:100%; border-collapse:collapse; margin:12px 0; font-size:13px; }
.manual-doc th, .manual-doc td { border:1px solid var(--line); padding:7px 10px; text-align:left; vertical-align:top; }
.manual-doc th { background: var(--panel2); color: var(--muted); font-size:11px; text-transform:uppercase; letter-spacing:.4px; }
.manual-doc blockquote { margin:12px 0; padding:8px 14px; border-left:3px solid var(--accent); background: var(--panel2); border-radius:0 8px 8px 0; }
.manual-doc blockquote p { margin:4px 0; font-size:13px; color: var(--muted); }

/* ===== buscador global (header) ===== */
.hsearch { position:relative; margin-left:12px; }
.hsearch input { width:230px; padding:7px 11px; background:var(--input); color:var(--text); border:1px solid var(--line); border-radius:8px; font-size:13px; }
.hsearch input:focus { outline:2px solid var(--accent-soft); border-color:var(--accent); width:300px; }
.hsearch-results { position:absolute; top:calc(100% + 6px); left:0; width:380px; max-height:70vh; overflow-y:auto; background:var(--panel); border:1px solid var(--line); border-radius:10px; box-shadow:var(--shadow); z-index:60; padding:5px; }
.sr-group { font-size:10px; text-transform:uppercase; letter-spacing:.5px; color:var(--muted); font-weight:700; padding:8px 9px 4px; }
.sr-row { display:flex; align-items:center; gap:8px; padding:7px 9px; border-radius:7px; cursor:pointer; }
.sr-row:hover { background:var(--panel2); }
.sr-row.sr-dim { cursor:default; opacity:.6; }
.sr-row.sr-dim:hover { background:none; }
.sr-dot { width:9px; height:9px; border-radius:50%; flex-shrink:0; }
.sr-mid { min-width:0; flex:1; }
.sr-label { font-size:13px; color:var(--text); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.sr-sub { font-size:11px; color:var(--muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.sr-empty { padding:12px; font-size:13px; color:var(--muted); }

/* ===== buscador del manual ===== */
.manual-search { display:flex; align-items:center; gap:6px; margin-bottom:14px; }
.manual-search input { flex:1; max-width:320px; padding:7px 10px; background:var(--input); color:var(--text); border:1px solid var(--line); border-radius:7px; font-size:13px; }
.manual-hitcount { font-size:12px; color:var(--muted); }
.manual-doc mark.mhit { background:rgba(224,166,58,.35); color:inherit; border-radius:2px; }
.manual-doc mark.mhit.act { background:var(--warn); color:#141414; }
