/* ===================== HOME / Launcher ===================== */
.home { display: grid; grid-template-columns: 340px 1fr; gap: 24px; align-items: start; }
.home .miespacio { order: 1; } .home .home-main { order: 2; }
@media (max-width: 1100px) { .home { grid-template-columns: 1fr; } }

.greeting h1 { font-size: 26px; letter-spacing: -.02em; }
.greeting .sub { color: var(--muted); margin-top: 4px; font-size: 13px; }
.greeting-row { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 20px; }
.role-badge { background: var(--green-l); color: var(--green-d); padding: 7px 14px; border-radius: 20px; font-size: 12px; font-weight: 700; white-space: nowrap; }

.banner-ger {
  background: linear-gradient(110deg, #0c1322, #16233b); color: #fff; border-radius: 16px;
  padding: 18px 22px; display: flex; align-items: center; justify-content: space-between;
  gap: 16px; margin-bottom: 26px; cursor: pointer; box-shadow: var(--shadow);
}
.banner-ger:hover { box-shadow: var(--shadow-lg); }
.banner-ger .b-ico { width: 40px; height: 40px; border-radius: 11px; background: rgba(255,255,255,.12); display: flex; align-items: center; justify-content: center; font-size: 19px; }
.banner-ger .b-txt b { font-size: 15px; } .banner-ger .b-txt p { color: var(--muted); font-size: 12px; margin-top: 2px; }
.banner-ger .b-cta { background: var(--card); color: var(--ink); padding: 9px 16px; border-radius: 10px; font-weight: 700; font-size: 13px; }

.section-label { display: flex; align-items: baseline; gap: 10px; margin: 4px 0 14px; }
.section-label h3 { font-size: 17px; } .section-label span { color: var(--muted); font-size: 12px; }

.modgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 760px) { .modgrid { grid-template-columns: 1fr 1fr; } }
.modcard {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 18px;
  cursor: pointer; transition: .18s; box-shadow: var(--shadow); display: flex; flex-direction: column;
}
.modcard:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--line); }
.modcard .m-ico { width: 40px; height: 40px; border-radius: 11px; display: flex; align-items: center; justify-content: center; font-size: 19px; color: #fff; margin-bottom: 14px; }
.modcard h4 { font-size: 15px; margin-bottom: 5px; }
.modcard .m-desc { color: var(--muted); font-size: 12.5px; line-height: 1.45; flex: 1; min-height: 50px; }
.modcard .m-kpis { display: flex; gap: 18px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); align-items: flex-end; }
.modcard .m-kpi b { font-size: 15px; } .modcard .m-kpi span { display: block; color: var(--muted); font-size: 11px; margin-top: 1px; }
.modcard .m-arrow { margin-left: auto; color: #cbd5e1; font-size: 16px; }
.modcard:hover .m-arrow { color: var(--green); }

/* Panel negro "Mi espacio" */
.miespacio {
  background: var(--ink-panel); color: #e2e8f0; border-radius: 18px; padding: 20px;
  position: sticky; top: 86px; box-shadow: var(--shadow-lg);
}
.miespacio .me-head { font-size: 15px; font-weight: 700; color: #fff; }
.miespacio .me-sub { color: var(--muted); font-size: 11px; margin-bottom: 16px; }
.me-action {
  width: 100%; text-align: left; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08);
  color: #e2e8f0; border-radius: 12px; padding: 12px 14px; margin-bottom: 9px; cursor: pointer;
  display: flex; align-items: center; gap: 12px; transition: .15s;
}
.me-action:hover { background: rgba(255,255,255,.1); border-color: rgba(34,197,94,.4); }
.me-action .a-ico { width: 32px; height: 32px; border-radius: 9px; display: flex; align-items: center; justify-content: center; font-size: 15px; flex-shrink: 0; }
.me-action b { font-size: 13px; color: #fff; display: block; } .me-action small { color: var(--muted); font-size: 11px; }
.me-perf { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; margin: 16px 0; }
.me-perf.me-perf-6 { grid-template-columns: repeat(3,1fr); }
@media (min-width: 900px) { .me-hero .me-perf.me-perf-6 { grid-template-columns: repeat(6,1fr); } }
.me-perf .p.p-alerta b { color: var(--red) !important; }
.me-perf .p.p-alerta { background: color-mix(in srgb, var(--red) 12%, transparent); }
.me-perf .p { background: rgba(255,255,255,.05); border-radius: 12px; padding: 12px 8px; text-align: center; }
.me-perf .p b { font-size: 18px; color: #fff; } .me-perf .p span { display: block; font-size: 10px; color: var(--muted); margin-top: 2px; }
.me-ia { background: rgba(124,58,237,.15); border: 1px solid rgba(124,58,237,.35); border-radius: 12px; padding: 12px; font-size: 12px; color: #ddd6fe; line-height: 1.5; }
.me-divider { height: 1px; background: rgba(255,255,255,.08); margin: 16px 0; }

/* ===================== Lanzador (drawer) ===================== */
.launcher-bg { position: fixed; inset: 0; background: rgba(11,18,32,.5); backdrop-filter: blur(3px); z-index: 50; display: flex; justify-content: center; align-items: flex-start; padding: 70px 20px 20px; }
.launcher { background: var(--card); border-radius: 18px; max-width: 920px; width: 100%; max-height: 82vh; overflow-y: auto; box-shadow: var(--shadow-lg); }
.launcher-head { display: flex; justify-content: space-between; align-items: center; padding: 20px 24px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--card); }
.launcher-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; padding: 20px 24px; }
@media (max-width: 720px) { .launcher-grid { grid-template-columns: repeat(2,1fr); } }
.launch-item { background: var(--bg); border: 1px solid var(--line); border-radius: 13px; padding: 16px; text-align: center; cursor: pointer; transition: .15s; }
.launch-item:hover { background: var(--green-l); border-color: var(--green); transform: translateY(-2px); }
.launch-item .li-ico { font-size: 24px; } .launch-item .li-name { font-size: 12.5px; font-weight: 600; margin-top: 8px; }

.fab { position: fixed; bottom: 26px; right: 26px; width: 54px; height: 54px; border-radius: 16px; background: var(--ink-panel); color: #fff; border: none; font-size: 20px; cursor: pointer; box-shadow: var(--shadow-lg); z-index: 40; transition: .15s; }
.fab:hover { background: var(--green-d); transform: scale(1.05); }

/* globo de chat corporativo (encima del de módulos) */
.chat-fab { position: fixed; bottom: 90px; right: 26px; width: 54px; height: 54px; border-radius: 50%; background: var(--green); color: #fff; border: none; font-size: 22px; cursor: pointer; box-shadow: var(--shadow-lg); z-index: 41; transition: .15s; }
.chat-fab:hover { background: var(--green-d); transform: scale(1.08); }
.chat-fab .badge-dot { background: var(--red); }
.chat-widget { position: fixed; bottom: 90px; right: 90px; width: 340px; height: 460px; background: var(--card); border-radius: 16px; box-shadow: var(--shadow-lg); z-index: 55; display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); }
.cw-head { padding: 13px 16px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; background: var(--ink-panel); color: #fff; }
.cw-head .modal-close { background: rgba(255,255,255,.12); color: #fff; }
.cw-body { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 12px; background: var(--bg); }
.cw-msg { display: flex; gap: 9px; }
.cw-av { width: 30px; height: 30px; border-radius: 50%; background: var(--green); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; flex-shrink: 0; }
.cw-bubble { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 9px 12px; font-size: 13px; flex: 1; }
.cw-meta { font-size: 10.5px; color: var(--muted); margin-bottom: 3px; }
.cw-tag { margin-top: 6px; font-size: 10px; color: var(--green-d); font-weight: 600; }
.cw-tarea { background: none; border: none; color: var(--green-d); font-size: 11px; cursor: pointer; padding: 0; font-weight: 600; }
.cw-reply { font-size: 12px; padding: 5px 0 0 10px; border-left: 2px solid var(--green-l); margin: 5px 0 0 2px; color: var(--muted); }
.cw-reply-in { width: 100%; font-size: 12px; padding: 6px 9px; }
.cw-foot { display: flex; gap: 7px; padding: 11px; border-top: 1px solid var(--line); }
.cw-foot input { flex: 1; }
@media (max-width: 480px) { .chat-widget { right: 12px; left: 12px; width: auto; } }

/* ===================== Marco de módulo ===================== */
.modframe-head { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.back-btn { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 9px 14px; cursor: pointer; font-size: 13px; font-weight: 600; transition: .15s; }
.back-btn:hover { background: var(--green-l); border-color: var(--green); }
.modframe-head h1 { font-size: 22px; }
.modframe-head .mh-ico { width: 38px; height: 38px; border-radius: 11px; display: flex; align-items: center; justify-content: center; font-size: 18px; color: #fff; }

/* ===================== Componentes (módulos) ===================== */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(180px,1fr)); gap: 16px; margin-bottom: 24px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 18px; box-shadow: var(--shadow); }
.kpi .label { color: var(--muted); font-size: 12px; margin-bottom: 6px; }
.kpi .value { font-size: 24px; font-weight: 700; }
.kpi .sub { font-size: 11px; color: var(--muted); margin-top: 4px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); margin-bottom: 20px; overflow: hidden; }
.card-head { padding: 16px 18px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card-head h2 { font-size: 16px; }
.card-body { padding: 8px 18px; }
/* las tablas (hijas directas) van a ras del borde, sin doble margen */
.card-body:has(> table) { padding: 4px 0; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 11px 18px; font-size: 13px; }
th { color: var(--muted); font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: .03em; }
tbody tr { border-top: 1px solid var(--line); }
tbody tr:hover { background: #fafbfc; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }

.badge { padding: 3px 9px; border-radius: 20px; font-size: 11px; font-weight: 600; display: inline-block; }
.badge.gray { background: var(--bg-soft); color: var(--muted); }
.badge.green { background: var(--green-l); color: var(--green-d); }
.badge.amber { background: #fef3c7; color: #92400e; }
.badge.red { background: #fee2e2; color: #991b1b; }
.badge.blue { background: #dbeafe; color: #1e40af; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 6px; }

.btn { background: var(--green); color: #fff; border: none; padding: 9px 16px; border-radius: 10px; cursor: pointer; font-size: 13px; font-weight: 600; transition: .15s; }
.btn:hover { background: var(--green-d); }
.btn.sm { padding: 6px 11px; font-size: 12px; }
.btn.outline { background: var(--card); color: var(--green-d); border: 1px solid var(--green); }
.btn.outline:hover { background: var(--green-l); }
.btn.gray { background: #475569; } .btn.gray:hover { background: #334155; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field.full { grid-column: 1 / -1; }
label { font-size: 12px; color: var(--muted); font-weight: 600; }
select, input, textarea { border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; font-size: 13px; font-family: inherit; background: var(--card); }
select:focus, input:focus, textarea:focus { outline: 2px solid var(--green-l); border-color: var(--green); }

.progress { height: 8px; background: var(--line); border-radius: 6px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--green); transition: width .4s; }

.rent-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.rent-row:last-child { border-bottom: none; }
.rent-big { font-size: 30px; font-weight: 800; }

.modal-bg { position: fixed; inset: 0; background: rgba(11,18,32,.5); display: flex; align-items: center; justify-content: center; z-index: 90; padding: 20px; }
.modal { background: var(--card); border-radius: 16px; max-width: 760px; width: 100%; max-height: 88vh; overflow-y: auto; position: relative; box-shadow: var(--shadow-lg); }
.modal-close { background: var(--bg-soft); border: none; width: 30px; height: 30px; border-radius: 8px; cursor: pointer; font-size: 14px; }
.modal > .modal-close { position: absolute; top: 14px; right: 14px; }
#modal-body { padding: 26px; }
.hidden { display: none !important; }

.toast { position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%); background: var(--ink-panel); color: #fff; padding: 14px 20px; border-radius: 12px; font-size: 13px; max-width: 460px; z-index: 130; box-shadow: var(--shadow-lg); }
.toast.ok { background: var(--green-d); } .toast.err { background: var(--red); }

.muted { color: var(--muted); }
.mt { margin-top: 16px; }
.flex { display: flex; gap: 10px; align-items: center; }
.flex-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.section-title { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 700; margin: 18px 0 8px; }
.empty { padding: 34px 20px; text-align: center; color: var(--muted); font-size: 13px; line-height: 1.5; }
.empty .empty-ico { display: block; font-size: 30px; margin-bottom: 8px; opacity: .8; }
.hint { background: var(--green-l); color: var(--green-d); padding: 10px 14px; border-radius: 10px; font-size: 12px; margin-bottom: 16px; }

/* Captura dirigida por catálogo */
.cap-layout { display: grid; grid-template-columns: 240px 1fr; gap: 18px; align-items: start; }
@media (max-width: 900px) { .cap-layout { grid-template-columns: 1fr; } }
.cap-tables { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 10px; box-shadow: var(--shadow); position: sticky; top: 80px; max-height: 80vh; overflow-y: auto; }
.cap-tables-title { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; padding: 8px 10px; }
.cap-tab { width: 100%; text-align: left; background: none; border: none; border-radius: 9px; padding: 9px 11px; cursor: pointer; font-size: 12.5px; color: var(--ink); display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.cap-tab:hover { background: var(--bg); }
.cap-tab.active { background: var(--green-l); color: var(--green-d); font-weight: 600; }
.cap-tab b { background: rgba(0,0,0,.08); border-radius: 10px; padding: 1px 8px; font-size: 11px; }
.cap-tab.active b { background: var(--green); color: #fff; }
.cap-form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 680px) { .cap-form { grid-template-columns: 1fr; } }

.kanban { display: grid; grid-template-columns: repeat(4,1fr); gap: 14px; align-items: start; }
.kcol { background: var(--bg-soft); border-radius: 12px; padding: 10px; min-height: 120px; }
.kcol-head { font-size: 12px; font-weight: 700; color: var(--muted); padding: 4px 6px 10px; }
.kcard { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 10px; margin-bottom: 8px; box-shadow: var(--shadow); }
.mini-sel { font-size: 11px; padding: 3px 6px; border-radius: 6px; }
@media (max-width: 900px) { .kanban { grid-template-columns: 1fr 1fr; } }

/* ===================== Mi Espacio (portal del colaborador) ================= */
.me-av { border-radius: 50%; object-fit: cover; border: 2px solid #fff; box-shadow: var(--shadow); background: #e2e8f0; }
.me-av-ph { display: inline-block; border-radius: 50%; text-align: center; font-weight: 700;
  color: #fff; background: linear-gradient(135deg, #16a34a, #15803d); }

/* Encabezado del colaborador */
.me-hero { display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 18px 20px; background: linear-gradient(135deg, #0f172a, #1e293b); color: #e2e8f0; border: none; }
.me-hero-l { display: flex; align-items: center; gap: 14px; }
.me-hero-l h2 { color: #fff; margin: 0; }
.me-hero-l span { color: var(--muted); font-size: 13px; }
.me-hero .me-perf .p b { color: #fff; }
.me-hero .me-perf .p span { color: var(--muted); }

/* Checador */
.chec-card { padding: 16px 18px; }
.chec-top { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; }
.chec-state { display: flex; align-items: center; gap: 12px; padding: 10px 16px; border: 2px solid;
  border-radius: 12px; background: var(--bg-soft); }
.chec-state b { display: block; font-size: 15px; }
.chec-state small { color: var(--muted); font-size: 12px; }
.chec-dot { width: 12px; height: 12px; border-radius: 50%; animation: pulse 1.6s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .4; } }
.chec-estados { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.chec-btn { border: 1.5px solid var(--line); background: var(--card); border-radius: 10px; padding: 8px 12px;
  font-size: 13px; cursor: pointer; transition: .15s; }
.chec-btn:hover { border-color: var(--cc); }
.chec-btn.on { background: var(--cc); color: #fff; border-color: var(--cc); box-shadow: var(--shadow); }
.chec-note { margin-top: 14px; font-size: 12px; color: var(--muted); background: #fffbeb;
  border: 1px solid #fde68a; border-radius: 10px; padding: 10px 12px; line-height: 1.5; }

/* Grid de sub-módulos de Mi Espacio */
.mi-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; margin-bottom: 8px; }
.mi-card { text-align: left; background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 16px; cursor: pointer; transition: .15s; display: flex; flex-direction: column; gap: 6px; }
.mi-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: var(--line); }
.mi-ico { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; font-size: 20px; }
.mi-card h4 { margin: 6px 0 0; font-size: 15px; }
.mi-card p { margin: 0; font-size: 12.5px; color: var(--muted); }
.mi-arrow { margin-top: 4px; font-size: 12.5px; color: var(--green); font-weight: 600; }

/* Meta vs logro */
.metarow { margin-bottom: 13px; }
.metarow-top { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 5px; }
.metarow-top small { color: var(--muted); }
.metabar { height: 9px; background: var(--bg-soft); border-radius: 6px; overflow: hidden; }
.metabar i { display: block; height: 100%; border-radius: 6px; transition: width .5s; }

.mini-kpi { display: flex; justify-content: space-between; align-items: baseline; padding: 7px 0; border-bottom: 1px dashed var(--line); }
.mini-kpi b { font-size: 18px; } .mini-kpi span { font-size: 12px; color: var(--muted); }

/* Consejos IA */
.ia-tip { display: flex; gap: 12px; align-items: flex-start; background: var(--bg-soft); border: 1px solid var(--line);
  border-radius: 10px; padding: 11px 13px; }
.ia-tip-ico { font-size: 20px; } .ia-tip b { font-size: 13px; } .ia-tip p { margin: 3px 0 0; font-size: 13px; color: var(--ink); line-height: 1.45; }

/* Avisos */
.aviso { display: flex; gap: 10px; align-items: flex-start; padding: 10px 18px; border-top: 1px solid var(--line); }
.aviso span { font-size: 16px; } .aviso p { margin: 0; font-size: 13px; line-height: 1.45; }
.aviso.a-urgente { background: #fef2f2; } .aviso.a-accion { background: #fffbeb; }

/* Cumpleaños */
.cumple { display: flex; align-items: center; gap: 11px; padding: 9px 6px; border-bottom: 1px solid var(--line); }
.cumple:last-child { border-bottom: none; }
.cumple.hoy { background: #f0fdf4; border-radius: 10px; }
.cumple-info { flex: 1; } .cumple-info b { font-size: 13.5px; display: block; } .cumple-info small { color: var(--muted); font-size: 12px; }

/* Panel derecho: filas de solicitudes / prefill RH */
.rh-prefill { display: flex; gap: 12px; align-items: center; background: #f0fdf4; border: 1px solid #bbf7d0;
  border-radius: 12px; padding: 12px; }
.rh-prefill b { display: block; } .rh-prefill small { display: block; color: var(--muted); font-size: 12px; }
.sol-row { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13px; }

/* Panel “Mi espacio” del inicio: extras */
.me-mini { display: grid; gap: 8px; }
.me-mini-c { display: flex; justify-content: space-between; align-items: center; font-size: 12.5px; color: #cbd5e1; }
.me-mini-c b { color: #fff; font-size: 14px; }
.me-avisos { display: grid; gap: 7px; }
.me-aviso { display: flex; gap: 8px; align-items: flex-start; font-size: 12px; color: #cbd5e1; }
.me-aviso p { margin: 0; line-height: 1.4; }
.me-cumples { display: grid; gap: 8px; }
.me-cumple { display: flex; align-items: center; gap: 9px; }
.me-cumple b { color: #fff; font-size: 12.5px; display: block; } .me-cumple small { color: var(--muted); font-size: 11px; }
.me-cumple > div { flex: 1; }
.me-felic { background: #16a34a; color: #fff; border: none; border-radius: 8px; padding: 5px 10px; font-size: 11.5px; cursor: pointer; }
.me-felic:hover { background: #15803d; }
.me-empty { color: var(--muted); font-size: 12px; text-align: center; padding: 14px 10px; }

/* Login: usuario con foto */
.lg-user { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.lg-user img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; border: 2px solid var(--green-l); }
.lg-av-ph { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; font-weight: 700;
  color: #fff; background: linear-gradient(135deg, #16a34a, #15803d); }
.lg-user b { display: block; font-size: 14px; } .lg-user small { color: var(--muted); font-size: 12px; }

@media (max-width: 900px) { .me-hero { flex-direction: column; align-items: flex-start; } }

/* ---- Checador: dos relojes ---- */
.mi-ico { color: #fff; }
.chec-clocks { display: flex; gap: 12px; flex-wrap: wrap; }
.chec-clock { display: flex; align-items: center; gap: 11px; padding: 10px 16px; border-radius: 12px;
  border: 2px solid; background: var(--bg-soft); min-width: 190px; }
.chec-clock.jor { border-color: #16a34a; }
.chec-clock.jor.pausado { border-color: #f59e0b; background: #fffbeb; }
.chec-clock.act { border-color: var(--cc); background: color-mix(in srgb, var(--cc) 8%, #fff); }
.chec-clock .cc-ico { font-size: 20px; }
.chec-clock b { display: block; font-size: 20px; font-variant-numeric: tabular-nums; letter-spacing: .5px; }
.chec-clock small { color: var(--muted); font-size: 12px; }
.chec-hint { margin-top: 12px; font-size: 12px; color: var(--muted); line-height: 1.5; }

/* ---- Paneles: OC / vacaciones / falla ---- */
.oc-total { margin-top: 10px; padding: 10px 12px; background: #f0fdf4; border: 1px solid #bbf7d0;
  border-radius: 10px; font-size: 14px; }
.vac-saldo { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.vac-saldo > div { background: var(--bg-soft); border: 1px solid var(--line); border-radius: 10px; padding: 10px; text-align: center; }
.vac-saldo b { display: block; font-size: 20px; color: var(--green-d); } .vac-saldo span { font-size: 11px; color: var(--muted); }
.vac-half { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 13px; color: var(--ink); }
.sla-box { margin-top: 12px; padding: 10px 12px; background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 10px; font-size: 13px; }
.field.mt, .mt { margin-top: 10px; }

/* ---- Mis equipos (diagnóstico del agente) ---- */
.equipo-card { display: flex; gap: 14px; align-items: center; padding: 12px 16px; border-top: 1px solid var(--line); }
.equipo-ico { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; font-size: 20px; background: var(--bg-soft); }
.equipo-meta { flex: 1; } .equipo-meta b { display: block; } .equipo-meta small { color: var(--muted); font-size: 12px; }
.equipo-bars { display: flex; gap: 14px; }
.ebar { min-width: 74px; } .ebar span { font-size: 11px; color: var(--muted); } .ebar .eb { height: 6px; background: var(--bg-soft); border-radius: 4px; margin-top: 3px; overflow: hidden; }
.ebar .eb i { display: block; height: 100%; }
.salud-badge { padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.salud-Buena { background: #dcfce7; color: #15803d; } .salud-Regular { background: #fef3c7; color: #b45309; } .salud-Crítica { background: #fee2e2; color: #b91c1c; }

/* ---- Copiloto de Mi Espacio ---- */
.cop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.cop-btn { display: flex; gap: 11px; align-items: flex-start; text-align: left; background: var(--bg-soft);
  border: 1px solid var(--line); border-radius: 12px; padding: 12px; cursor: pointer; transition: .15s; }
.cop-btn:hover { border-color: #a78bfa; background: #faf5ff; transform: translateY(-1px); }
.cop-btn:disabled { opacity: .55; cursor: wait; }
.cop-ico { font-size: 20px; }
.cop-btn b { font-size: 13.5px; display: block; } .cop-btn small { font-size: 12px; color: var(--muted); }
.cop-out { margin-top: 12px; padding: 12px 14px; background: #faf5ff; border: 1px solid #e9d5ff;
  border-radius: 10px; font-size: 13.5px; }
.cop-out ul { margin: 8px 0 0 18px; line-height: 1.7; }

/* ---- Adjuntos (subir archivos) ---- */
.adj-drop { display: block; border: 1.5px dashed #cbd5e1; border-radius: 10px; padding: 12px; text-align: center;
  cursor: pointer; color: var(--muted); font-size: 13px; transition: .15s; margin-top: 4px; }
.adj-drop:hover { border-color: var(--green); background: #f0fdf4; color: var(--green-d); }
.adj-drop input { display: none; }
.adj-list { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.adj-item { display: flex; align-items: center; justify-content: space-between; gap: 8px;
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; }
.adj-link { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); font-size: 13px; overflow: hidden; }
.adj-link img { width: 34px; height: 34px; border-radius: 6px; object-fit: cover; }
.adj-doc { font-size: 20px; }
.adj-item button { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 13px; }
.adj-item button:hover { color: var(--red); }

/* ---- Panel: opciones avanzadas colapsable ---- */
.panel-adv { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 10px; }
.padv-head { width: 100%; display: flex; justify-content: space-between; align-items: center; background: var(--bg-soft);
  border: 1px solid var(--line); border-radius: 10px; padding: 11px 14px; cursor: pointer; font-weight: 600; font-size: 13.5px; }
.padv-head:hover { background: var(--bg-soft); }

/* ---- Permiso: con/sin goce ---- */
.goce-toggle { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 4px; }
.goce-op { display: flex; align-items: center; gap: 6px; border: 1.5px solid var(--line); border-radius: 10px;
  padding: 10px 12px; cursor: pointer; font-size: 13px; }
.goce-op.on { border-color: var(--green); background: #f0fdf4; }
.goce-op input { accent-color: var(--green); }

/* ---- Mis solicitudes: tarjetas ---- */
.sol-card { border: 1px solid var(--line); border-radius: 10px; padding: 11px 13px; margin-bottom: 8px; }
.sol-meta { color: var(--muted); font-size: 12.5px; margin-top: 3px; }
.sol-adj { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 7px; }
.sol-adj a { font-size: 12px; color: var(--green-d); text-decoration: none; background: #f0fdf4; border: 1px solid #bbf7d0;
  border-radius: 6px; padding: 3px 8px; }

/* ---- Checador compacto en el panel oscuro del inicio ---- */
.chec-mini { margin: 4px 0 6px; }
.cm-clocks { display: flex; gap: 8px; margin-bottom: 10px; }
.cm-clock { flex: 1; display: flex; align-items: center; gap: 9px; background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.12); border-radius: 11px; padding: 9px 11px; }
.cm-clock.pausado { border-color: rgba(245,158,11,.6); background: rgba(245,158,11,.08); }
.cm-clock.act { border-color: var(--cc); background: rgba(255,255,255,.06); }
.cm-clock b { color: #fff; font-size: 17px; font-variant-numeric: tabular-nums; display: block; letter-spacing: .5px; }
.cm-clock small { color: var(--muted); font-size: 11px; }
.cm-dot { width: 10px; height: 10px; border-radius: 50%; animation: pulse 1.6s infinite; }
.cm-ico { font-size: 17px; }
.cm-estados { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.cm-est { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14); color: #cbd5e1;
  border-radius: 8px; padding: 6px 9px; font-size: 11.5px; cursor: pointer; transition: .15s; }
.cm-est:hover { border-color: var(--cc); color: #fff; }
.cm-est.on { background: var(--cc); border-color: var(--cc); color: #fff; }
.cm-btn { width: 100%; background: #22c55e; color: #fff; border: none; border-radius: 10px;
  padding: 11px; font-size: 14px; font-weight: 600; cursor: pointer; }
.cm-btn:hover { background: #16a34a; }
.cm-btn.red { background: #ef4444; } .cm-btn.red:hover { background: #dc2626; }

/* ============================ CHAT CORPORATIVO ============================ */
.chatwrap { display: grid; grid-template-columns: 260px 1fr; gap: 0; height: calc(100vh - 210px);
  min-height: 480px; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--card); }
/* --- sidebar --- */
.chat-side { background: #0f172a; color: #cbd5e1; display: flex; flex-direction: column; overflow-y: auto; }
.chat-side-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 14px 8px; color: #fff; }
.chat-newg { background: rgba(255,255,255,.1); border: none; color: #fff; width: 26px; height: 26px; border-radius: 7px; cursor: pointer; font-size: 16px; }
.chat-newg:hover { background: rgba(255,255,255,.2); }
.chat-search { padding: 0 12px 10px; }
.chat-search input { width: 100%; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); color: #e2e8f0; border-radius: 8px; padding: 7px 10px; font-size: 12.5px; }
.chat-sec { padding: 10px 14px 4px; font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); }
.ch-item { width: 100%; display: flex; align-items: center; gap: 8px; background: none; border: none; color: #cbd5e1;
  padding: 7px 12px; cursor: pointer; font-size: 13.5px; text-align: left; }
.ch-item:hover { background: rgba(255,255,255,.06); }
.ch-item.active { background: #2563eb; color: #fff; }
.ch-hash { opacity: .6; } .ch-name { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .ch-name small { opacity: .6; }
.ch-badge { background: #ef4444; color: #fff; font-size: 11px; border-radius: 10px; padding: 1px 7px; font-weight: 700; }
.ch-badge.urg { animation: pulse 1.4s infinite; }
.ch-av { position: relative; display: inline-flex; }
.ch-pres { position: absolute; right: -1px; bottom: -1px; width: 9px; height: 9px; border-radius: 50%; background: #64748b; border: 2px solid #0f172a; }
.ch-pres.on { background: #22c55e; }
/* --- main --- */
.chat-main { display: flex; flex-direction: column; background: var(--card); min-width: 0; }
.chat-head { padding: 12px 18px; border-bottom: 1px solid var(--line); display: flex; align-items: center; }
.chat-head-l { display: flex; align-items: center; gap: 6px; } .chat-head-l b { font-size: 15px; } .chat-head-l small { color: var(--muted); }
.chat-head-hash { color: var(--muted); font-size: 16px; }
.chat-msgs { flex: 1; overflow-y: auto; padding: 10px 18px; }
.chat-div { text-align: center; margin: 14px 0; position: relative; }
.chat-div span { background: var(--card); padding: 0 12px; font-size: 11.5px; color: var(--muted); position: relative; z-index: 1; }
.chat-div::before { content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: var(--line); }
.chat-msg { display: flex; gap: 10px; padding: 4px 8px; border-radius: 8px; position: relative; }
.chat-msg:hover { background: var(--bg-soft); }
.chat-msg.agr { padding-top: 1px; padding-bottom: 1px; }
.chat-msg.urg { background: #fef2f2; }
.cm-av { width: 36px; flex-shrink: 0; }
.cm-gutter { width: 36px; flex-shrink: 0; font-size: 10px; color: transparent; text-align: center; padding-top: 3px; }
.chat-msg.agr:hover .cm-gutter { color: var(--muted); }
.cm-body { flex: 1; min-width: 0; }
.cm-meta { display: flex; align-items: center; gap: 8px; } .cm-meta b { font-size: 13.5px; } .cm-meta span { font-size: 11px; color: var(--muted); }
.cm-urg { background: #fee2e2; color: #b91c1c; font-size: 10px; padding: 1px 6px; border-radius: 6px; font-weight: 700; }
.cm-text { font-size: 14px; line-height: 1.45; word-wrap: break-word; }
.mention { background: #dbeafe; color: #1d4ed8; border-radius: 4px; padding: 0 3px; font-weight: 600; }
.hashtag { color: #2563eb; font-weight: 600; }
.msg-adj { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.msg-img img { max-width: 220px; max-height: 180px; border-radius: 10px; border: 1px solid var(--line); }
.msg-file { display: inline-flex; align-items: center; gap: 6px; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; font-size: 12.5px; text-decoration: none; color: var(--ink); }
.msg-reacs { display: flex; gap: 5px; margin-top: 5px; flex-wrap: wrap; }
.msg-reac { background: var(--bg-soft); border: 1px solid var(--line); border-radius: 12px; padding: 1px 8px; font-size: 12px; cursor: pointer; }
.msg-reac.yo { background: #dbeafe; border-color: #93c5fd; }
.msg-sug { margin-top: 6px; background: #faf5ff; border: 1px solid #e9d5ff; border-radius: 8px; padding: 6px 10px; font-size: 12.5px; }
.msg-sug button { background: #7c3aed; color: #fff; border: none; border-radius: 6px; padding: 3px 9px; font-size: 12px; cursor: pointer; margin-left: 4px; }
.msg-tarea { display: inline-block; margin-top: 6px; background: #dcfce7; color: #15803d; border-radius: 8px; padding: 3px 10px; font-size: 12px; cursor: pointer; }
.msg-replies { margin-top: 6px; border-left: 2px solid var(--line); padding-left: 10px; display: flex; flex-direction: column; gap: 4px; }
.msg-reply { display: flex; align-items: center; gap: 6px; font-size: 12.5px; } .msg-reply b { font-size: 12.5px; }
.msg-replybox { margin-top: 6px; } .msg-replybox input { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; font-size: 13px; }
.msg-acc { position: absolute; top: -10px; right: 12px; display: none; gap: 2px; background: var(--card); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); padding: 2px; }
.chat-msg:hover .msg-acc { display: flex; }
.msg-acc button { background: none; border: none; cursor: pointer; font-size: 15px; padding: 3px 5px; border-radius: 6px; }
.msg-acc button:hover { background: var(--bg-soft); }
/* --- composer --- */
.chat-compose { border-top: 1px solid var(--line); padding: 10px 14px; }
.chat-adj { display: flex; flex-wrap: wrap; gap: 6px; }
.chat-adj:not(:empty) { margin-bottom: 8px; }
.chat-adj-chip { background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 8px; padding: 3px 8px; font-size: 12px; }
.chat-adj-chip button { background: none; border: none; color: var(--muted); cursor: pointer; margin-left: 4px; }
.chat-hint { background: #faf5ff; border: 1px solid #e9d5ff; border-radius: 8px; padding: 6px 10px; font-size: 12.5px; margin-bottom: 8px; color: #6b21a8; }
.chat-comp-row { display: flex; align-items: flex-end; gap: 8px; }
.chat-attach { cursor: pointer; font-size: 18px; padding: 6px; } .chat-attach input { display: none; }
#chat-input { flex: 1; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-size: 14px; resize: none; font-family: inherit; max-height: 120px; }
.chat-urg-btn { background: var(--bg-soft); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; cursor: pointer; }
.chat-urg-btn.on { background: #fee2e2; border-color: #fca5a5; }
/* --- búsqueda --- */
#chat-buscar-res { flex: 1; overflow-y: auto; padding: 10px 18px; }
.chat-bres-head { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.chat-bres { border: 1px solid var(--line); border-radius: 8px; padding: 9px 12px; margin-bottom: 6px; cursor: pointer; font-size: 13px; }
.chat-bres:hover { background: var(--bg-soft); } .chat-bres small { color: var(--muted); }
/* --- modales chat --- */
.emoji-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; }
.emoji-btn { font-size: 22px; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 8px; padding: 6px; cursor: pointer; }
.emoji-btn:hover { background: #e2e8f0; }
.cg-list { max-height: 180px; overflow-y: auto; border: 1px solid var(--line); border-radius: 8px; padding: 8px; }
.cg-op { display: block; padding: 4px 2px; font-size: 13px; cursor: pointer; }
/* --- widget extras --- */
.cw-expand { background: none; border: none; color: #fff; cursor: pointer; font-size: 15px; }
.cw-reac { background: rgba(0,0,0,.05); border: 1px solid var(--line); border-radius: 10px; font-size: 12px; padding: 0 5px; cursor: pointer; }
@media (max-width: 760px) { .chatwrap { grid-template-columns: 1fr; } .chat-side { display: none; } }

/* ---- Chat: botón y vista de Análisis IA ---- */
.chat-anal-btn { width: calc(100% - 24px); margin: 4px 12px 14px; background: linear-gradient(135deg, #7c3aed, #6d28d9);
  color: #fff; border: none; border-radius: 10px; padding: 10px; font-size: 13px; cursor: pointer; font-weight: 600; }
.chat-anal-btn:hover { filter: brightness(1.1); }
.cana-wrap { max-width: 900px; }
.cana-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.cana-kpi { background: var(--bg-soft); border: 1px solid var(--line); border-radius: 12px; padding: 12px; text-align: center; }
.cana-kpi b { display: block; font-size: 22px; } .cana-kpi span { font-size: 12px; color: var(--muted); }
.cana-consejo { display: flex; gap: 12px; align-items: flex-start; background: var(--card); border: 1px solid var(--line);
  border-radius: 10px; padding: 12px 14px; margin-bottom: 8px; }
.cana-ico { font-size: 22px; }
.cana-consejo b { font-size: 13.5px; } .cana-consejo p { margin: 3px 0 0; font-size: 13px; line-height: 1.45; color: var(--ink); }
.cana-imp { font-size: 10.5px; padding: 1px 7px; border-radius: 10px; margin-left: 6px; font-weight: 700; text-transform: uppercase; }
.cana-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
.bmini { margin-bottom: 9px; }
.bmini-top { display: flex; justify-content: space-between; font-size: 12.5px; margin-bottom: 3px; }
.bmini-bar { height: 8px; background: var(--bg-soft); border-radius: 5px; overflow: hidden; }
.bmini-bar i { display: block; height: 100%; background: linear-gradient(90deg, #7c3aed, #a78bfa); border-radius: 5px; }
@media (max-width: 760px) { .cana-kpis { grid-template-columns: 1fr 1fr; } .cana-cols { grid-template-columns: 1fr; } }

/* ---- Panel de módulos personalizable (estilo iPhone) ---- */
.mod-edit-btn { background: var(--bg-soft); border: 1px solid var(--line); border-radius: 20px; padding: 5px 14px;
  font-size: 12.5px; cursor: pointer; color: var(--ink); font-weight: 600; }
.mod-edit-btn:hover { background: #e2e8f0; }
.modhint { font-size: 12px; color: var(--muted); margin: 2px 0 12px; }
.modcard { position: relative; }
.modcard { touch-action: manipulation; }
.mod-remove { position: absolute; top: -7px; left: -7px; width: 22px; height: 22px; border-radius: 50%;
  background: #ef4444; color: #fff; border: 2px solid #fff; font-size: 12px; cursor: pointer; display: none;
  z-index: 3; line-height: 1; box-shadow: var(--shadow); }
.modgrid.editing .mod-remove { display: block; }
.modgrid.editing .modcard { animation: jiggle .35s infinite; cursor: grab; }
.modgrid.editing .modcard:nth-child(even) { animation-delay: .12s; }
.modgrid.editing .modcard:nth-child(3n) { animation-delay: .06s; }
.modgrid.editing .modcard .m-arrow { display: none; }
.modcard.dragging { opacity: .45; transform: scale(1.04); box-shadow: var(--shadow-lg); animation: none !important; }
@keyframes jiggle {
  0% { transform: rotate(-.7deg); } 50% { transform: rotate(.7deg); } 100% { transform: rotate(-.7deg); }
}

/* ---- Selector de vista cuadros/lista + KPIs en rojo ---- */
.mod-tools { display: flex; gap: 8px; align-items: center; }
.vista-tog { display: inline-flex; border: 1px solid var(--line); border-radius: 20px; overflow: hidden; background: var(--card); }
.vista-tog button { background: none; border: none; padding: 5px 12px; cursor: pointer; font-size: 15px; color: var(--muted); }
.vista-tog button.on { background: var(--ink-panel); color: #fff; }
.m-kpi.alerta b { color: var(--red); }
.m-kpi.alerta span { color: var(--red); opacity: .85; }
.mod-alertdot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--red); margin-left: 6px; vertical-align: middle; animation: pulse 1.5s infinite; }
.modcard.tiene-alerta { border-color: #fecaca; }

/* ---- Vista de lista ---- */
.modlist { display: flex; flex-direction: column; gap: 8px; }
.modrow { display: flex; flex-direction: row !important; align-items: center; gap: 14px; padding: 12px 16px; text-align: left; }
.modrow .m-ico { width: 40px; height: 40px; flex-shrink: 0; }
.modrow-main { flex: 1; min-width: 0; }
.modrow-main h4 { margin: 0; font-size: 15px; }
.modrow-main .m-desc { margin: 2px 0 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.modrow-kpis { display: flex; gap: 20px; flex-shrink: 0; }
.modrow-kpis .m-kpi b { font-size: 17px; }
.modrow .m-arrow { color: var(--muted); }
@media (max-width: 720px) { .modrow-main .m-desc { display: none; } .modrow-kpis { gap: 12px; } }

/* ---- Edición (jiggle) válida en cuadros y lista (por id) ---- */
#modgrid.editing .mod-remove { display: block; }
#modgrid.editing .modcard { animation: jiggle .35s infinite; cursor: grab; }
#modgrid.editing .modcard:nth-child(even) { animation-delay: .12s; }
#modgrid.editing .modcard:nth-child(3n) { animation-delay: .06s; }
#modgrid.editing .modcard.dragging { animation: none !important; }

/* ============================ RECURSOS HUMANOS ============================ */
.rh-kpis { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-bottom: 14px; }
.rh-kpi { background: var(--bg-soft); border: 1px solid var(--line); border-radius: 12px; padding: 12px; text-align: center; }
.rh-kpi b { display: block; font-size: 22px; } .rh-kpi span { font-size: 12px; color: var(--muted); }
.rh-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; border-bottom: 1px solid var(--line); }
.rh-tab { background: none; border: none; padding: 9px 14px; cursor: pointer; font-size: 13.5px; color: var(--muted); border-bottom: 2px solid transparent; }
.rh-tab.active { color: var(--ink); border-bottom-color: var(--green); font-weight: 600; }
.rh-tab:hover { color: var(--ink); }
/* directorio */
.rh-dir-head { margin-bottom: 14px; }
.rh-dir-head input { width: 100%; max-width: 420px; border: 1px solid var(--line); border-radius: 10px; padding: 9px 14px; font-size: 14px; }
.rh-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.rh-card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px; cursor: pointer; transition: .15s; }
.rh-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: var(--line); }
.rh-card-top { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; }
.rh-av { position: relative; }
.rh-card-id b { display: block; font-size: 15px; } .rh-card-id small { display: block; font-size: 12px; color: var(--ink); } .rh-card-id small.muted { color: var(--muted); }
.rh-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.rh-chip { font-size: 11px; padding: 2px 9px; border-radius: 20px; font-weight: 600; }
.rh-chip.gray { background: var(--bg-soft); color: var(--muted); }
.rh-scorerow { display: flex; justify-content: space-between; font-size: 12.5px; margin-bottom: 4px; }
.rh-alerts { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.rh-alert { font-size: 11px; color: var(--red); background: #fef2f2; border: 1px solid #fecaca; border-radius: 8px; padding: 2px 7px; }
/* perfil */
.rh-perfil-head { display: flex; align-items: center; gap: 18px; padding: 18px 20px; }
.rh-ph-id { flex: 1; } .rh-ph-id h2 { margin: 0; } .rh-ph-id > span { color: var(--muted); font-size: 13.5px; }
.rh-ph-meta { margin-top: 8px; font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.rh-ph-score { text-align: center; } .rh-ph-score b { display: block; font-size: 28px; } .rh-ph-score span { font-size: 11px; color: var(--muted); }
.rh-meta { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin-bottom: 10px; }
.rh-meta-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 7px; }
.rh-meta-sub { font-size: 12px; color: var(--muted); margin-top: 5px; }
.rh-score-total { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); font-size: 13.5px; text-align: right; }
.rh-retro { border-left: 3px solid var(--line); padding: 8px 12px; margin: 8px 0; }
.rh-retro p { margin: 5px 0 0; font-size: 13.5px; line-height: 1.45; }
.rh-stars { color: #f59e0b; font-size: 14px; }
.lnk { background: none; border: none; color: var(--green-d); cursor: pointer; font-size: 12px; padding: 0 4px; text-decoration: underline; }
.lnk.red { color: var(--red); }
@media (max-width: 720px) { .rh-kpis { grid-template-columns: repeat(3, 1fr); } }

/* ---- RH: vista de equipo en vivo ---- */
.rh-live-head { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.rh-live-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--red); animation: pulse 1.4s infinite; }
.rh-live-name { display: flex; align-items: center; gap: 8px; }
.rh-live-name b { font-size: 13.5px; }

/* ---- CRM: detalle de negocio / timeline ---- */
.neg-meta { color: var(--muted); font-size: 13px; }
.neg-badges { margin-top: 6px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.neg-total { margin-top: 10px; font-size: 13px; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; }
.neg-linea { display: flex; justify-content: space-between; font-size: 13px; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.neg-actbar { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.act-btn { background: var(--bg-soft); border: 1px solid var(--line); border-radius: 8px; padding: 5px 10px; font-size: 12px; cursor: pointer; }
.act-btn:hover { background: #e2e8f0; }
.neg-timeline { display: flex; flex-direction: column; gap: 4px; }
.tl-item { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.tl-ico { font-size: 16px; } .tl-body { flex: 1; }
.tl-top { display: flex; justify-content: space-between; gap: 8px; } .tl-top b { font-size: 13px; } .tl-top span { font-size: 11px; color: var(--muted); }
.tl-body p { margin: 3px 0 0; font-size: 12.5px; color: var(--ink); }
.ct-fields { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }

/* ---- CRM: toolbar limpio + config de etapas ---- */
.crm-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.crm-tools { display: flex; gap: 8px; align-items: center; }
.crm-tools input, .crm-tools select { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; font-size: 13px; }
.crm-tools #crm-buscar { min-width: 200px; }
.btn.sm.outline { padding: 6px 12px; }
.et-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.et-row .et-nom { flex: 1; border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; font-size: 13px; }
.et-row .et-prob { width: 58px; border: 1px solid var(--line); border-radius: 8px; padding: 7px 6px; font-size: 13px; text-align: center; }

/* ---- CRM: Mi cartera ---- */
.cartera-total { font-size: 14px; } .cartera-total b { font-size: 20px; color: var(--green-d); }
.cartera-row { display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-top: 1px solid var(--line); cursor: pointer; }
.cartera-row:hover { background: var(--bg-soft); }
.cartera-cli { flex: 1; } .cartera-cli b { display: block; font-size: 13.5px; } .cartera-cli small { display: block; font-size: 12px; }
.cartera-val { text-align: right; } .cartera-val b { font-size: 13.5px; } .cartera-val small { display: block; font-size: 11px; }
.cartera-arrow { color: var(--muted); }

/* ---- Ventas: contrato ---- */
.contrato-txt { background: var(--bg-soft); border: 1px solid var(--line); border-radius: 8px; padding: 12px; font-size: 12px;
  white-space: pre-wrap; max-height: 240px; overflow-y: auto; font-family: ui-monospace, monospace; line-height: 1.5; }
details summary { cursor: pointer; }

/* ============================ MAPEADOR DE PROCESOS ======================== */
.proc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.proc-card { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; cursor: pointer; transition: .15s; }
.proc-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: var(--line); }
.proc-thumb { height: 120px; background: repeating-linear-gradient(0deg, #f8fafc, #f8fafc 19px, #eef2f7 20px), repeating-linear-gradient(90deg, #f8fafc, #f8fafc 19px, #eef2f7 20px); border-bottom: 1px solid var(--line); display: grid; place-items: center; padding: 8px; }
.proc-card-body { padding: 12px 14px; } .proc-card-body b { display: block; } .proc-card-body small { display: block; }
.proc-card-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; }
.proc-del { position: absolute; top: 8px; right: 8px; width: 22px; height: 22px; border-radius: 50%; background: rgba(255,255,255,.9); border: 1px solid var(--line); cursor: pointer; font-size: 11px; color: var(--muted); }
.proc-del:hover { color: var(--red); border-color: var(--red); }
.proc-plantillas { display: grid; gap: 8px; }
.proc-plant { text-align: left; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; cursor: pointer; }
.proc-plant:hover { border-color: #a78bfa; background: #faf5ff; }
.proc-plant b { display: block; } .proc-plant small { color: var(--muted); }
/* --- editor --- */
.proc-topbar { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.proc-nombre { font-size: 16px; font-weight: 700; border: 1px solid transparent; border-radius: 8px; padding: 6px 10px; min-width: 220px; }
.proc-nombre:hover, .proc-nombre:focus { border-color: var(--line); }
.proc-topbar select { border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; font-size: 13px; }
.proc-wrap { display: grid; grid-template-columns: 190px 1fr; gap: 12px; height: calc(100vh - 230px); min-height: 460px; }
.proc-palette { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px; overflow-y: auto; }
.proc-pal-title { font-size: 11px; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; letter-spacing: .4px; }
.proc-pal-item { display: flex; align-items: center; gap: 9px; padding: 7px 8px; border-radius: 9px; cursor: grab; font-size: 13px; user-select: none; }
.proc-pal-item:hover { background: var(--bg-soft); }
.proc-pal-ico { width: 30px; height: 26px; display: grid; place-items: center; border-radius: 7px; border: 1.5px solid; font-size: 13px; }
.proc-pal-hint { font-size: 11px; color: var(--muted); margin-top: 14px; line-height: 1.5; }
.proc-canvas { border: 1px solid var(--line); border-radius: 12px; overflow: auto; background:
  radial-gradient(circle, #e2e8f0 1px, transparent 1px) 0 0 / 20px 20px, #fbfcfe; position: relative; }
.proc-surface { position: relative; width: 1800px; height: 1300px; }
.proc-edges { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.proc-edge { fill: none; stroke: #64748b; stroke-width: 2; pointer-events: stroke; cursor: pointer; }
.proc-edge:hover { stroke: var(--red); }
.proc-edge.tmp { stroke-dasharray: 5 4; stroke: #2563eb; }
#proc-nodes { position: absolute; inset: 0; }
.nodo { position: absolute; display: grid; place-items: center; border: 2px solid var(--nc); background: var(--nbg);
  border-radius: 12px; cursor: grab; user-select: none; font-size: 12.5px; color: var(--ink); text-align: center; box-shadow: var(--shadow); }
.nodo:active { cursor: grabbing; }
.nodo.sel { box-shadow: 0 0 0 3px #2563eb55; }
.nodo.hover { box-shadow: 0 0 0 3px #16a34a66; }
.nodo-in { padding: 4px 8px; position: relative; z-index: 1; line-height: 1.2; }
.forma-circle { border-radius: 50%; font-size: 11.5px; }
.forma-pill { border-radius: 999px; }
.forma-rect2 { box-shadow: inset 0 0 0 3px var(--nbg), 0 0 0 1px var(--nc); }
.forma-diamond { background: transparent; border: none; box-shadow: none; }
.forma-diamond::before { content: ''; position: absolute; inset: 10px; background: var(--nbg); border: 2px solid var(--nc); transform: rotate(45deg); border-radius: 4px; box-shadow: var(--shadow); }
.forma-diamond.sel::before { box-shadow: 0 0 0 3px #2563eb55; }
.forma-para { background: transparent; border: none; box-shadow: none; }
.forma-para::before { content: ''; position: absolute; inset: 0; background: var(--nbg); border: 2px solid var(--nc); transform: skewX(-16deg); border-radius: 6px; box-shadow: var(--shadow); }
.forma-doc { border-radius: 10px 10px 4px 18px; }
.nodo-port { position: absolute; bottom: -7px; left: 50%; transform: translateX(-50%); width: 13px; height: 13px;
  border-radius: 50%; background: #2563eb; border: 2px solid #fff; cursor: crosshair; opacity: 0; transition: opacity .1s; z-index: 3; }
.nodo:hover .nodo-port { opacity: 1; }
.nodo-mod { position: absolute; top: -8px; right: -8px; background: var(--card); border: 1px solid var(--line); border-radius: 50%; width: 20px; height: 20px; display: grid; place-items: center; font-size: 11px; z-index: 2; }
.proc-ghost { position: fixed; z-index: 9999; pointer-events: none; background: var(--card); border: 2px dashed #8b5cf6; border-radius: 10px; padding: 6px 12px; font-size: 12px; transform: translate(-50%,-50%); opacity: .9; }
@media (max-width: 760px) { .proc-wrap { grid-template-columns: 1fr; } .proc-palette { display: none; } }

/* ===================== AUTOMATIZACIÓN (constructor visual) ===================== */
/* Toggle switch */
.switch { position: relative; display: inline-block; width: 40px; height: 22px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider { position: absolute; cursor: pointer; inset: 0; background: #cbd5e1; border-radius: 999px; transition: .2s; }
.switch .slider::before { content: ""; position: absolute; height: 16px; width: 16px; left: 3px; top: 3px; background: var(--card); border-radius: 50%; transition: .2s; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.switch input:checked + .slider { background: var(--green, #16a34a); }
.switch input:checked + .slider::before { transform: translateX(18px); }

/* KPIs (reusa estética de proc) */
.proc-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 4px 0 6px; }
.proc-kpi { background: var(--card, #fff); border: 1px solid var(--line, #e2e8f0); border-radius: 12px; padding: 14px 16px; }
.proc-kpi-v { font-size: 24px; font-weight: 700; line-height: 1.1; }
.proc-kpi-l { font-size: 12px; color: var(--muted, #64748b); margin-top: 2px; }

.proc-empty { text-align: center; padding: 48px 20px; color: var(--muted, #64748b); }
.proc-empty h3 { margin: 8px 0 4px; color: var(--ink, #0f172a); }
.proc-card-nombre { cursor: pointer; }
.proc-card-nombre:hover { color: var(--brand, #1565C0); }
.proc-card-meta { font-size: 13px; color: var(--muted, #64748b); margin: 6px 0 8px; }
.proc-badge { display: inline-block; background: #eef2ff; color: #4338ca; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; }
.proc-thumb-empty { display: flex; align-items: center; justify-content: center; height: 100%; color: var(--muted); font-size: 13px; }

/* Plantillas */
.proc-tpl-list { display: flex; flex-direction: column; gap: 10px; }
.proc-tpl { border: 1px solid var(--line, #e2e8f0); border-radius: 12px; padding: 14px 16px; cursor: pointer; transition: .15s; }
.proc-tpl:hover { border-color: var(--brand, #1565C0); background: var(--bg-soft); transform: translateY(-1px); }
.proc-tpl b { margin-right: 8px; }

/* Copiloto */
.proc-copilot { display: flex; flex-direction: column; gap: 10px; }
.crm-cop-card { display: flex; align-items: center; gap: 14px; background: var(--card, #fff); border: 1px solid var(--line, #e2e8f0); border-radius: 12px; padding: 14px 16px; }
.crm-cop-ico { font-size: 26px; width: 46px; height: 46px; display: flex; align-items: center; justify-content: center; background: var(--bg-soft); border-radius: 12px; flex: none; }

/* Panel: pills de datos y cajas */
.auto-pills { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; margin-top: 6px; }
.auto-pills-lbl { font-size: 11px; color: var(--muted, #64748b); margin-right: 2px; }
.auto-pill { font-size: 11px; font-weight: 600; background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; border-radius: 999px; padding: 2px 9px; cursor: pointer; font-family: inherit; }
.auto-pill:hover { background: #dbeafe; }
.auto-pill.static { cursor: default; background: var(--bg-soft); color: var(--muted); border-color: var(--line); }
.auto-fieldbox { background: var(--bg-soft); border: 1px solid var(--line, #e2e8f0); border-radius: 10px; padding: 10px 12px; margin-top: 10px; font-size: 13px; }
.auto-fieldbox code { background: #eef2ff; color: #4338ca; padding: 1px 5px; border-radius: 5px; font-size: 12px; }
.auto-ruta { border: 1px solid var(--line, #e2e8f0); border-radius: 10px; padding: 10px; margin-top: 8px; background: #faf5ff; }
.linklike { background: none; border: none; color: var(--brand, #1565C0); cursor: pointer; font-size: 13px; font-family: inherit; padding: 0; }
.linklike:hover { text-decoration: underline; }

/* Log de ejecución flotante sobre el lienzo */
.auto-runlog { position: absolute; right: 16px; bottom: 16px; width: 380px; max-width: calc(100% - 32px); max-height: 46%; overflow: auto; background: var(--card, #fff); border: 1px solid var(--line, #e2e8f0); border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.18); z-index: 20; }
.auto-runlog-head { padding: 10px 14px; font-weight: 700; font-size: 13px; border-bottom: 1px solid var(--line, #e2e8f0); background: var(--bg-soft); position: sticky; top: 0; }
.auto-runlog-head.err { color: #b91c1c; }
.auto-runlog-body { padding: 8px 14px 12px; }
.auto-logline { font-size: 12.5px; line-height: 1.6; color: var(--muted); padding: 2px 0; border-bottom: 1px dashed #f1f5f9; }
.auto-logline.hdr { font-weight: 700; color: var(--ink); margin-top: 6px; }
@media (max-width: 720px) { .proc-kpis { grid-template-columns: repeat(2, 1fr); } .auto-runlog { width: auto; left: 16px; } }

/* ===================== OPERACIONES / PROYECTOS (PSA) ===================== */
.op-board { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; align-items: start; }
.op-col { background: var(--bg, #f6f8fb); border: 1px solid var(--line, #e2e8f0); border-radius: 12px; overflow: hidden; }
.op-col-head { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 13px; padding: 10px 12px; background: var(--card, #fff); border-top: 3px solid var(--line); }
.op-col-n { margin-left: auto; background: var(--bg-soft); color: var(--muted); border-radius: 999px; padding: 1px 9px; font-size: 12px; }
.op-col-body { padding: 8px; display: flex; flex-direction: column; gap: 8px; min-height: 40px; }
.op-card { background: var(--card, #fff); border: 1px solid var(--line, #e2e8f0); border-radius: 10px; padding: 11px 12px; cursor: pointer; transition: .15s; }
.op-card:hover { border-color: var(--brand, #1565C0); box-shadow: 0 4px 14px rgba(0,0,0,.07); transform: translateY(-1px); }
.op-card .me-av, .op-card .me-av-ph { margin-right: -6px; border: 2px solid #fff; }
.op-dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 4px; }
.rent-big { font-size: 30px; font-weight: 800; margin: 6px 0 10px; }
.rent-row { display: flex; justify-content: space-between; padding: 5px 0; border-bottom: 1px dashed var(--line, #e2e8f0); font-size: 13px; }
/* barra de utilización con marca de meta */
.op-util-track { position: relative; height: 10px; background: var(--bg-soft); border-radius: 999px; overflow: hidden; margin-top: 3px; }
.op-util-track.big { height: 14px; overflow: visible; }
.op-util-track > span { display: block; height: 100%; border-radius: 999px; }
.op-util-meta { position: absolute; top: -3px; width: 2px; height: calc(100% + 6px); background: #0f172a; opacity: .55; }
.op-cap-row { display: grid; grid-template-columns: 200px 1fr 210px; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px dashed var(--line, #e2e8f0); }
.op-cap-name { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; }
.op-cap-num { display: flex; flex-direction: column; align-items: flex-end; font-size: 11.5px; }
.op-cap-num b { font-size: 15px; }
/* Gantt-lite de fases */
.op-gantt { display: flex; flex-direction: column; gap: 7px; }
.op-gantt-row { display: grid; grid-template-columns: 240px 1fr 46px; align-items: center; gap: 10px; }
.op-gantt-lbl { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.op-gantt-track { background: var(--bg-soft); border-radius: 6px; height: 22px; }
.op-gantt-bar { height: 22px; border-radius: 6px; color: #fff; font-size: 12px; display: flex; align-items: center; justify-content: center; min-width: 22px; }
.op-gantt-pct { font-size: 11.5px; text-align: right; }
.op-risk { border: 1px solid var(--line, #e2e8f0); border-radius: 10px; padding: 11px 13px; margin-bottom: 9px; background: var(--card); }
.op-team-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 10px; max-height: 160px; overflow: auto; }
.op-chip { font-size: 12.5px; display: flex; align-items: center; gap: 5px; }
.op-chip input { width: auto; }
@media (max-width: 900px) { .op-board { grid-template-columns: 1fr 1fr; } .op-dash-grid { grid-template-columns: 1fr; } .op-cap-row { grid-template-columns: 130px 1fr; } .op-cap-num { grid-column: 1 / -1; align-items: flex-start; } .op-gantt-row { grid-template-columns: 130px 1fr 40px; } }

/* variantes de color para rh-chip (CRM: tipo de cuenta, ciclo) */
.rh-chip.green{background:#dcfce7;color:#15803d}
.rh-chip.blue{background:#dbeafe;color:#1d4ed8}
.rh-chip.red{background:#fee2e2;color:#b91c1c}
.rh-chip.amber{background:#fef3c7;color:#b45309}

/* análisis de rentabilidad en el detalle de venta */
.venta-analisis{background:var(--bg-soft);border:1px solid var(--line,#e2e8f0);border-radius:10px;padding:11px 13px;margin:10px 0}

/* radar de vencimientos ISO */
.iso-bandas{display:grid;grid-template-columns:repeat(5,1fr);gap:10px}
.iso-banda{border:1px solid var(--line,#e2e8f0);border-left-width:4px;border-radius:10px;padding:10px 12px;text-align:center}
.iso-banda b{display:block;font-size:22px;font-weight:800;line-height:1}
.iso-banda span{font-size:11.5px;color:var(--muted,#64748b)}
@media(max-width:720px){.iso-bandas{grid-template-columns:repeat(2,1fr)}}

/* marcas en config */
.marca-row{display:flex;align-items:center;gap:10px;padding:10px 0;border-bottom:1px dashed var(--line,#e2e8f0)}
.marca-swatch{width:22px;height:22px;border-radius:6px;border:1px solid rgba(0,0,0,.1);flex:none}

/* carga y bienestar del equipo (Tareas) */
.carga-box{background:var(--card,#fff);border:1px solid var(--line,#e2e8f0);border-radius:12px;padding:10px 14px;margin-bottom:14px}
.carga-box summary{cursor:pointer;font-weight:600;font-size:13.5px}
.carga-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:10px;margin-top:10px}
.carga-card{background:var(--bg,#f8fafc);border:1px solid var(--line,#e2e8f0);border-radius:10px;padding:9px 11px}

/* búsqueda global (UX) */
.search{position:relative}
.gsearch-res{position:absolute;top:calc(100% + 6px);left:0;right:0;min-width:320px;background:var(--card);border:1px solid var(--line,#e2e8f0);border-radius:12px;box-shadow:0 12px 32px rgba(0,0,0,.14);z-index:60;max-height:70vh;overflow:auto;padding:6px}
.gsearch-item{display:flex;gap:10px;align-items:center;padding:8px 10px;border-radius:8px;cursor:pointer}
.gsearch-item:hover{background:var(--panel,#f4f7f5)}
.gsearch-item span{font-size:18px;width:24px;text-align:center}
.gsearch-item b{font-size:13px;display:block}
.gsearch-item small{font-size:11px;color:var(--muted,#64748b)}
.gsearch-empty{padding:12px;color:var(--muted,#64748b);font-size:13px;text-align:center}

/* feedback IA */
.ia-fb{display:flex;gap:2px}
.ia-fb-btn{background:none;border:none;cursor:pointer;font-size:14px;opacity:.6;padding:2px}
.ia-fb-btn:hover{opacity:1}

/* ===================== CENTRO DE INTELIGENCIA (agentes ML) ===================== */
.jefe-card{background:linear-gradient(180deg,#f0fdf4,#fff);border:1px solid #bbf7d0;border-radius:16px;padding:20px 22px;margin-bottom:18px}
.jefe-head{display:flex;gap:18px;align-items:center}
.jefe-ring{flex:none}
.jefe-cruz{display:flex;flex-wrap:wrap;gap:10px;margin-top:14px}
.jefe-cruz-item{flex:1;min-width:240px;background:var(--card);border:1px solid var(--line);border-radius:11px;padding:10px 13px}
.jefe-cruz-item b{display:block;font-size:13px;margin-bottom:2px}
.jefe-cruz-item span{font-size:12.5px;color:var(--ink2,#3c4b45)}
.jefe-prio{margin-top:14px}
.jefe-prio-item{display:flex;gap:11px;align-items:center;background:var(--card);border:1px solid var(--line);border-radius:10px;padding:10px 13px;margin-bottom:7px;font-size:13px;transition:.12s}
.jefe-prio-item:hover{border-color:var(--green);box-shadow:0 3px 10px rgba(0,0,0,.05)}
.jefe-prio-ico{font-size:18px;width:26px;text-align:center;flex:none}
.agentes-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:12px;margin:12px 0 6px}
.agente-card{background:var(--card,#fff);border:1px solid var(--line);border-radius:13px;padding:14px 16px;cursor:pointer;transition:.15s}
.agente-card:hover{border-color:var(--brand,#1565C0);box-shadow:0 5px 16px rgba(0,0,0,.07);transform:translateY(-1px)}
.agente-top{display:flex;gap:11px;align-items:center}
.agente-top b{font-size:13.5px;display:block}
.agente-consejo{font-size:12px;background:var(--bg-soft);border-left:3px solid var(--amber,#f59e0b);border-radius:6px;padding:6px 9px;margin-top:4px}
.agente-pred{font-size:12px;color:#7c3aed;margin-top:6px}

/* BI y Reportes: narrativa y pivote */
.rep-narr{margin-top:12px}
.rep-narr p{margin:6px 0;font-size:13.5px}
.rep-consejo{background:#f0fdf4;border-left:4px solid var(--green,#16a34a);border-radius:8px;padding:10px 14px;margin:14px 0;font-size:13.5px}
table.pivot{min-width:520px}
table.pivot th,table.pivot td{padding:8px 12px;border-bottom:1px solid var(--line,#e2e8f0);font-size:12.5px}
table.pivot thead th{background:var(--panel2,#eef2f0);position:sticky;top:0}
table.pivot .pivot-tot td{border-top:2px solid var(--line);font-weight:700;background:var(--bg-soft)}

/* Paleta de comandos (Cmd/Ctrl+K) */
.cmdk-bg{position:fixed;inset:0;background:rgba(15,23,42,.4);backdrop-filter:blur(2px);z-index:200;display:flex;align-items:flex-start;justify-content:center;padding-top:12vh}
.cmdk{width:min(600px,92vw);background:var(--card);border-radius:14px;box-shadow:0 24px 60px rgba(0,0,0,.3);overflow:hidden}
.cmdk-input,#cmdk-input{width:100%;border:none;border-bottom:1px solid var(--line,#e2e8f0);padding:16px 18px;font-size:15px;outline:none;font-family:inherit}
.cmdk-list{max-height:52vh;overflow:auto;padding:6px}
.cmdk-grp{font-size:10.5px;text-transform:uppercase;letter-spacing:.08em;color:var(--muted,#64748b);font-weight:700;padding:8px 10px 4px}
.cmdk-item{display:flex;align-items:center;gap:10px;padding:9px 11px;border-radius:8px;cursor:pointer;font-size:13.5px}
.cmdk-item span{font-size:16px;width:22px;text-align:center}
.cmdk-item.sel{background:var(--accent-soft,#dcfce7)}
.cmdk-empty{padding:18px;text-align:center;color:var(--muted,#64748b);font-size:13px}
.cmdk-foot{border-top:1px solid var(--line,#e2e8f0);padding:8px 14px;font-size:11px;color:var(--muted,#64748b)}

/* RBAC admin */
.rbac-roles{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:10px}
.rbac-role{border:1px solid var(--line,#e2e8f0);border-radius:11px;padding:11px 13px;cursor:pointer;transition:.14s}
.rbac-role:hover{border-color:var(--brand,#1565C0);box-shadow:0 3px 10px rgba(0,0,0,.06)}
table.rbac-matrix th,table.rbac-matrix td{padding:6px 10px;text-align:center;font-size:12px;border-bottom:1px solid var(--line,#e2e8f0)}
table.rbac-matrix td:first-child,table.rbac-matrix th:first-child{text-align:left}
table.rbac-matrix input{width:auto;cursor:pointer}
.rbac-assign{display:grid;grid-template-columns:1fr 1fr;gap:6px}

/* barra del programador (automatización) */
.sched-bar{display:flex;align-items:center;gap:6px;flex-wrap:wrap;background:#f0fdf4;border:1px solid #bbf7d0;border-radius:10px;padding:9px 14px;margin:10px 0;font-size:12.5px}

/* Onboarding: checklist + tour */
.onb-card{background:linear-gradient(180deg,#eff6ff,#fff);border:1px solid #bfdbfe;border-radius:14px;padding:15px 18px;margin:14px 0}
.onb-bar{height:8px;background:#dbeafe;border-radius:5px;overflow:hidden;margin:9px 0 12px}
.onb-bar i{display:block;height:100%;background:var(--brand,#1565C0)}
.onb-steps{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:8px}
.onb-step{display:flex;gap:9px;align-items:center;background:var(--card);border:1px solid var(--line,#e2e8f0);border-radius:10px;padding:9px 11px;cursor:pointer;font-size:12.5px}
.onb-step.done{opacity:.6;cursor:default}
.onb-step span{font-size:15px}
.onb-step b{display:block}.onb-step small{color:var(--muted,#64748b)}
.tour-ov{position:fixed;inset:0;z-index:210}
.tour-spot{position:fixed;border-radius:12px;box-shadow:0 0 0 9999px rgba(15,23,42,.6);transition:.25s;pointer-events:none}
.tour-pop{position:fixed;width:300px;background:var(--card);border-radius:12px;padding:15px 17px;box-shadow:0 16px 40px rgba(0,0,0,.28);z-index:211}
.tour-pop b{font-size:14px}.tour-pop p{font-size:12.5px;color:var(--ink2,#3c4b45);margin:6px 0 12px}
.tour-foot{display:flex;justify-content:space-between;align-items:center;font-size:12px;color:var(--muted)}
