:root { --brand: #1d414d; --brand-2: #2a6474; }
body { background: #f4f6f9; font-size: .92rem; }
.bg-brand { background: var(--brand); }
.text-brand { color: var(--brand); }
.btn-primary { --bs-btn-bg: var(--brand-2); --bs-btn-border-color: var(--brand-2); --bs-btn-hover-bg: var(--brand); --bs-btn-hover-border-color: var(--brand); }
.sidebar { width: 250px; flex: 0 0 250px; min-height: calc(100vh - 56px); background: #fff; border-right: 1px solid #e3e7ee; }
@media (min-width: 992px) { .sidebar { position: sticky; top: 56px; height: calc(100vh - 56px); overflow-y: auto; } }
.menu-group { font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; color: #8792a2; margin: .9rem .5rem .25rem; font-weight: 600; }
.menu-link { display: block; padding: .38rem .6rem; border-radius: .4rem; color: #2b3445; text-decoration: none; font-size: .87rem; }
.menu-link:hover { background: #eef3f9; }
.menu-link.active { background: var(--brand-2); color: #fff; }
.menu-link i { width: 1.2rem; display: inline-block; }
.main { min-width: 0; }
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 1rem; flex-wrap: wrap; }
.clause { font-size: .75rem; background: #e6eef8; color: var(--brand); padding: .25rem .6rem; border-radius: 1rem; white-space: nowrap; }
.card { border: 1px solid #e3e7ee; box-shadow: 0 1px 2px rgba(0,0,0,.03); }
.kpi { background: #fff; border: 1px solid #e3e7ee; border-left: 4px solid var(--brand-2); border-radius: .5rem; padding: .7rem .9rem; height: 100%; }
.kpi-danger { border-left-color: #d62d20; } .kpi-warn { border-left-color: #f07c22; }
.kpi-v { font-size: 1.6rem; font-weight: 700; line-height: 1.1; }
.kpi-l { font-size: .75rem; color: #6c7686; }
.badge.nivel { color: #fff; text-shadow: 0 0 2px rgba(0,0,0,.35); }
.swatch { display: inline-block; width: .9rem; height: .9rem; border-radius: .2rem; vertical-align: middle; border: 1px solid rgba(0,0,0,.15); }
.kv-label { font-size: .72rem; text-transform: uppercase; color: #8792a2; letter-spacing: .03em; }
.kv-val { white-space: normal; }
.heatmap { border-collapse: separate; border-spacing: 3px; margin: 0 auto; }
.heatmap td { width: 64px; height: 56px; text-align: center; vertical-align: middle; border-radius: 4px; color: #fff; text-shadow: 0 0 3px rgba(0,0,0,.45); font-size: .7rem; }
.heatmap td .cnt { font-weight: 700; font-size: 1rem; display: block; }
.heatmap td .codes a { color: #fff; text-decoration: none; font-size: .65rem; }
.heatmap td .codes { max-height: 2.2em; overflow: hidden; line-height: 1.1; }
.heatmap th { font-size: .7rem; text-align: center; color: #4b5565; font-weight: 600; }
.heatmap th small { display: block; font-weight: 400; font-size: .6rem; color: #8792a2; }
.heatmap .axis-y { width: 70px; text-align: right; padding-right: 4px; }
.factores-box { max-height: 220px; overflow-y: auto; border: 1px solid #dee2e6; border-radius: .375rem; padding: .5rem .75rem; background: #fff; }
.login-wrap { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 1rem; background: linear-gradient(135deg, #1d414d, #2a6474); }
.login-card { width: 100%; max-width: 400px; }
.login-wrap > .text-muted { color: rgba(255,255,255,.75) !important; }
.report { background: #fff; padding: 2rem; border: 1px solid #e3e7ee; border-radius: .5rem; }
.report-cover { border-bottom: 3px solid var(--brand); padding-bottom: .75rem; margin-bottom: 1rem; }
.report .sec { color: var(--brand); border-bottom: 1px solid #dee2e6; padding-bottom: .25rem; margin-top: 1.5rem; }
@media print {
  body { background: #fff; font-size: 10pt; }
  .main { padding: 0 !important; }
  .report { border: 0; padding: 0; }
  .card { box-shadow: none; }
  .avoid-break, table { page-break-inside: avoid; }
  a { text-decoration: none; color: inherit; }
  .badge, .heatmap td, th[style] { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
/* Bow-tie (6.4.2 · 6.4.3) */
.bowtie { display: grid; grid-template-columns: 1fr 1fr minmax(140px, .8fr) 1fr 1fr; gap: .5rem; align-items: center; }
.bt-col { display: flex; flex-direction: column; gap: .35rem; }
.bt-h { font-size: .7rem; text-transform: uppercase; color: #8792a2; font-weight: 600; letter-spacing: .03em; margin-bottom: .1rem; }
.bt-item, .bt-ctrl { border: 1px solid #dfe5ee; border-radius: .4rem; padding: .35rem .5rem; font-size: .8rem; background: #fff; }
.bt-item small, .bt-ctrl small { display: block; color: #8792a2; font-size: .68rem; }
.bt-ctrl { border-left: 3px solid #2e9e5b; background: #f3faf6; }
.bt-pos { border-left: 3px solid #2a6474; }
.bt-event { background: #1d414d; color: #fff; border-radius: 50%; aspect-ratio: 1; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 1rem; font-size: .8rem; }
.bt-event .bt-h { color: #cfe0f3; }
@media (max-width: 992px) { .bowtie { grid-template-columns: 1fr; } .bt-event { border-radius: .5rem; aspect-ratio: auto; } }
.kpi-mini { font-size: 1.3rem; font-weight: 700; }
.trend-bar { position: relative; min-width: 46px; font-weight: 600; z-index: 0; }
.trend-bar::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: var(--w); background: var(--c); opacity: .35; border-radius: 3px; z-index: -1; }

/* Marca SipMan Soluciones */
.brand-icon { height: 34px; width: 34px; object-fit: contain; }
.login-logo { width: 190px; max-width: 70%; height: auto; }
.login-logo-sm { width: 120px; height: auto; margin-bottom: .25rem; }
.report-logo { width: 130px; height: auto; }
.print-brand { align-items: center; gap: 1rem; border-bottom: 2px solid var(--brand); padding-bottom: .5rem; margin-bottom: 1rem; }
.print-brand img { width: 110px; height: auto; }
.print-brand span { font-size: .8rem; color: #555; }
.menu-link:hover { background: #e8f0f2; }
.clause { background: #e3edef; }

/* Diagnóstico de cumplimiento */
.gauge { width: 140px; aspect-ratio: 1; margin: 0 auto; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(var(--c) calc(var(--p) * 1%), #e9ecef 0); }
.gauge span { width: 104px; aspect-ratio: 1; border-radius: 50%; background: #fff; display: grid; place-items: center; font-size: 1.6rem; font-weight: 700; color: var(--brand); }
.gauge-sm { width: 84px; } .gauge-sm span { width: 62px; font-size: 1rem; }
.base-mark { position: absolute; top: -3px; bottom: -3px; width: 3px; background: #343a40; border-radius: 2px; transform: translateX(-1px); }
@media print { .gauge { -webkit-print-color-adjust: exact; print-color-adjust: exact; } }

.diag-tabla textarea { min-width: 150px; font-size: .78rem; }
.diag-tabla td { vertical-align: top; }
@media print { .diag-tabla textarea, .diag-tabla select, .diag-tabla input { border: 0; resize: none; padding: 0; background: transparent; } }

/* Ayuda en línea */
.panel-ayuda { --bs-offcanvas-width: 520px; }
.ayuda-cuerpo { font-size: .88rem; }
.ayuda-cuerpo ol, .ayuda-cuerpo ul { padding-left: 1.2rem; }
.ayuda-cuerpo li { margin-bottom: .3rem; }
.ayuda-sub { font-weight: 600; color: var(--brand); margin: .9rem 0 .35rem; }
.ayuda-norma { background: #eef4f5; border-left: 4px solid var(--brand-2); border-radius: .35rem; padding: .5rem .75rem .25rem; margin: .5rem 0; }
.ayuda-norma .ayuda-sub { margin-top: 0; }
.ayuda-norma ul { list-style: none; padding-left: 0; }
.ayuda-campos dt { font-weight: 600; } .ayuda-campos dd { margin: 0 0 .4rem; color: #495057; }
.sec-ayuda { color: var(--brand); border-bottom: 2px solid #e3edef; padding-bottom: .3rem; scroll-margin-top: 70px; }
.ruta-num { flex: 0 0 28px; height: 28px; border-radius: 50%; background: var(--brand-2); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .85rem; }
.accordion-item.ayuda-item { scroll-margin-top: 70px; }
@media print { .accordion-collapse { display: block !important; } }
.mc-svg { width: 100%; height: auto; max-height: 260px; }
.ishikawa-svg, .pareto-svg, .mapa-causal-svg { width: 100%; height: auto; }
.mapa-causal-svg { max-height: 560px; }
.mapa-causal-svg a, .mapa-causal-svg a text { text-decoration: none; }
.radar-svg { width: 100%; height: auto; max-height: 520px; }
.familia-card:hover { border-color: #2a6474; box-shadow: 0 2px 8px rgba(29,65,77,.12); }
.radar-svg a, .radar-svg a text { text-decoration: none; }

/* ---------- v3.1 · Mapa de procesos (ISO 9001 4.4) ---------- */
.mapa-procesos{display:grid;grid-template-columns:44px 1fr 44px;gap:10px;align-items:stretch}
.mp-lado{writing-mode:vertical-rl;transform:rotate(180deg);text-align:center;font-size:.78rem;font-weight:600;color:#1d414d;background:#eef3f6;border-radius:8px;padding:8px 4px}
.mp-salida{transform:none}
.mp-centro{display:flex;flex-direction:column;gap:10px}
.mp-banda{border-radius:10px;padding:10px 12px;background:#f7f9fb;border:1px solid #e3e7ee}
.mp-banda.mp-estr{background:#eef4fb}.mp-banda.mp-misi{background:#eef8f2}.mp-banda.mp-apoy{background:#fbf6ec}.mp-banda.mp-eval{background:#f4f0fa}
.mp-titulo{font-size:.78rem;font-weight:700;text-transform:uppercase;letter-spacing:.04em;color:#495057;margin-bottom:6px}
.mp-cajas{display:flex;flex-wrap:wrap;gap:8px}
.mp-caja{display:flex;flex-direction:column;gap:2px;min-width:180px;max-width:240px;flex:1 1 180px;background:#fff;border:1px solid #d6dde6;border-top:5px solid #c9d1db;border-radius:8px;padding:8px 10px;text-decoration:none;color:inherit;transition:box-shadow .15s}
.mp-caja:hover{box-shadow:0 2px 10px rgba(0,0,0,.12)}
.mp-cod{font-size:.72rem;color:#6c757d;font-weight:600}.mp-nom{font-weight:600;font-size:.9rem;line-height:1.2}
.mp-meta{display:flex;flex-wrap:wrap;gap:6px;align-items:center;font-size:.75rem;color:#495057}.mp-dueno{font-size:.72rem;color:#6c757d}
/* Ciclo de la gestión del riesgo en la ficha */
.ciclo-riesgo{display:flex;flex-wrap:wrap;gap:6px}
.ciclo-paso{flex:1 1 170px;display:flex;gap:8px;align-items:center;padding:7px 10px;border:1px solid #d6dde6;border-radius:8px;background:#fff;text-decoration:none;color:inherit;font-size:.82rem;line-height:1.2}
.ciclo-paso.activo{box-shadow:0 0 0 2px #2a6474 inset}
.ciclo-num{flex:0 0 28px;height:28px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-weight:700;background:#e9ecef;color:#495057}
.ciclo-ok .ciclo-num{background:#198754;color:#fff}.ciclo-alerta .ciclo-num{background:#dc3545;color:#fff}.ciclo-alerta{border-color:#f1aeb5;background:#fff5f5}.ciclo-na .ciclo-num{background:#adb5bd;color:#fff}
/* Guía normativa en pantalla */
.guia-norma>summary{cursor:pointer;list-style:none}.guia-norma>summary::-webkit-details-marker{display:none}
.guia-norma[open]>summary{border-bottom:1px solid #e3e7ee}
.marca-esperado{position:absolute;top:-3px;bottom:-3px;width:3px;background:#212529;border-radius:2px}
.kpi-v.small-v{font-size:1.15rem}
.pendientes li{padding:3px 0;border-bottom:1px dashed #eef0f3}
@media print{.mapa-procesos{grid-template-columns:30px 1fr 30px}.mp-caja{break-inside:avoid}}

/* ===== v3.2 · Gantt, calendario, seguimientos e indicadores ===== */
.leyenda { display: inline-flex; align-items: center; gap: .3rem; margin-right: .6rem; }
.leyenda .sw { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.gantt { overflow-x: auto; font-size: .78rem; --g-izq: 610px; }
.g-row { display: grid; grid-template-columns: var(--g-izq) minmax(480px, 1fr); border-bottom: 1px solid #eef0f3; min-width: calc(var(--g-izq) + 480px); }
.g-row:hover:not(.g-cab) { background: #f1f5f9; }
.g-izq { display: grid; grid-template-columns: 86px minmax(0, 1fr) 112px 82px 82px 76px; align-items: center; position: sticky; left: 0; z-index: 4; background-color: #fff; border-right: 2px solid #cbd5e1; min-width: 0; }
.g-row:hover:not(.g-cab) .g-izq { background-color: #f1f5f9; }
.g-izq > div { min-width: 0; padding: 4px 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-right: 1px solid #eef0f3; height: 100%; display: flex; align-items: center; }
.g-izq > div:last-child { border-right: 0; }
.g-izq > div > * { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.g-cod { font-weight: 600; }
.g-act { display: -webkit-box !important; -webkit-box-orient: vertical; -webkit-line-clamp: 2; white-space: normal !important; line-height: 1.25; height: auto !important; max-height: 2.5em; padding-block: 0 !important; margin-block: 4px; align-self: center; border-right: 0 !important; box-shadow: 1px 0 0 #eef0f3; }
.g-resp { color: #4b5563; display: block !important; line-height: 20px; }
.g-ini, .g-fin { justify-content: flex-end; text-overflow: clip !important; font-variant-numeric: tabular-nums; }
.g-av { justify-content: flex-end; gap: 5px; padding-left: 4px !important; font-variant-numeric: tabular-nums; }
.g-avbar { flex: 0 0 30px; height: 6px; background: #e5e7eb; border-radius: 3px; overflow: hidden; display: inline-block; }
.g-avbar > span { display: block; height: 100%; background: #0f766e; }
.g-span { grid-column: 1 / span 3; display: block !important; line-height: 20px; font-weight: 600; }
.g-cab-anio .g-span { grid-column: 1 / -1; color: #475569; font-weight: 600; }
.g-sub { color: #6b7280; font-weight: 400; }
.g-der { position: relative; min-height: 28px; overflow: hidden; }
.g-cab { background: #f1f5f9; font-weight: 600; position: sticky; top: 0; z-index: 5; }
.g-cab .g-izq { background-color: #f1f5f9; }
.g-cab .g-der { min-height: 26px; }
.g-cab-anio { top: 0; border-bottom: 1px solid #cbd5e1; }
.g-cab-anio + .g-cab { top: 27px; border-bottom: 2px solid #cbd5e1; }
.g-mes, .g-anio { position: absolute; top: 0; bottom: 0; display: flex; align-items: center; justify-content: center; border-left: 1px solid #cbd5e1; text-transform: capitalize; white-space: nowrap; overflow: hidden; }
.g-anio { color: #1e3a5f; }
.g-colmes { position: absolute; top: 0; bottom: 0; border-left: 1px solid #e5e7eb; }
.g-colmes-alt { background: rgba(148, 163, 184, .08); }
.g-cab .g-colmes-alt { background: #e9eef4; }
.g-grupo { background: #eef2f7; border-top: 1px solid #d5dde8; }
.g-grupo .g-izq { background-color: #eef2f7; }
.g-grupo .g-izq > div { border-right-color: #dde3ec; }
.g-lin { position: absolute; top: 0; bottom: 0; border-left: 1px dashed #e5e7eb; }
.g-hoy { position: absolute; top: 0; bottom: 0; border-left: 2px solid #dc2626; z-index: 1; }
.g-bar { position: absolute; top: calc(50% - 7px); height: 14px; border-radius: 4px; background: color-mix(in srgb, var(--c) 30%, white); border: 1px solid var(--c); overflow: hidden; z-index: 1; text-decoration: none; }
.g-bar-grupo { top: calc(50% - 4px); height: 8px; border-radius: 2px; background: var(--c); opacity: .55; }
.g-bar-grupo .g-txt { display: none; }
.g-fill { position: absolute; left: 0; top: 0; bottom: 0; background: var(--c); }
.g-txt { position: relative; color: #111827; font-size: .68rem; padding-left: 3px; line-height: 12px; font-weight: 600; text-shadow: 0 0 2px #fff; }
.g-vencida { border: 2px solid #dc2626; }
.g-terminada { opacity: .5; }
.g-corte-izq { border-top-left-radius: 0; border-bottom-left-radius: 0; border-left-style: dashed; }
.g-corte-der { border-top-right-radius: 0; border-bottom-right-radius: 0; border-right-style: dashed; }
.g-row-venc .g-act { color: #b91c1c; }
.g-seg, .g-seg-ley { position: absolute; top: calc(50% - 11px); width: 3px; height: 22px; background: #111827; border-radius: 1px; z-index: 3; transform: translateX(-1px); }
.g-prox, .g-prox-ley { position: absolute; top: calc(50% - 5px); width: 10px; height: 10px; border: 2px solid #0369a1; border-radius: 50%; background: #fff; z-index: 3; transform: translateX(-5px); }
.g-prox-venc { border-color: #dc2626; }
.g-hito, .g-hito-ley { position: absolute; top: calc(50% - 5px); width: 11px; height: 11px; background: #475569; transform: translateX(-5px) rotate(45deg); z-index: 3; }
.g-hito-ok { background: #15803d; }
.g-hito-venc { background: #dc2626; }
.g-seg-ley, .g-prox-ley, .g-hito-ley { position: relative; display: inline-block; top: 2px; transform: none; vertical-align: baseline; }
.g-seg-ley { height: 12px; }
.g-hito-ley { transform: rotate(45deg); }
.calendario { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid #e5e7eb; border-radius: 6px; overflow: hidden; background: #fff; }
.cal-cab { background: #f1f5f9; font-weight: 600; text-align: center; padding: 4px; font-size: .8rem; border-bottom: 1px solid #e5e7eb; }
.cal-dia { min-width: 0; min-height: 110px; border-right: 1px solid #eef0f3; border-bottom: 1px solid #eef0f3; padding: 3px; font-size: .72rem; }
.cal-fuera { background: #fafafa; color: #9ca3af; }
.cal-hoy { background: #eff6ff; }
.cal-hoy .cal-num { background: #1d4ed8; color: #fff; border-radius: 10px; padding: 0 6px; display: inline-block; }
.cal-num { font-weight: 600; margin-bottom: 2px; }
.cal-ev { display: block; border-left: 3px solid var(--c); background: color-mix(in srgb, var(--c) 10%, white); color: #1f2937; padding: 1px 3px; margin-bottom: 2px; border-radius: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-decoration: none; }
.cal-ev.ev-vencido { border-left-color: #dc2626; background: #fef2f2; color: #991b1b; }
.cal-ev.ev-hecho { opacity: .7; }
.cal-ev.ev-suave { background: transparent; color: #6b7280; }
.cal-ev.ev-seg { font-style: italic; }
.cal-mas { font-size: .7rem; }
.seg-item { border-left: 4px solid #9ca3af; }
.seg-success { border-left-color: #15803d; } .seg-warning { border-left-color: #d97706; } .seg-danger { border-left-color: #dc2626; }
code.formula { background: #f1f5f9; color: #1e3a8a; padding: 2px 6px; border-radius: 4px; white-space: pre-wrap; }
.ind-svg { width: 100%; height: auto; max-height: 260px; }
@media print { .gantt { overflow: visible; --g-izq: 470px; } .g-row { min-width: 0; grid-template-columns: var(--g-izq) 1fr; } .g-izq { position: static; grid-template-columns: 80px minmax(0,1fr) 90px 0 66px 52px; } .g-ini { display: none !important; } .cal-dia { min-height: 80px; } }

/* ===== Identidad SipMan Soluciones en toda la interfaz ===== */
.brand-logo { height: 34px; width: auto; }
.brand-sep { display: inline-block; width: 1px; height: 26px; background: rgba(255,255,255,.45); margin: 0 .35rem; }
.menu-marca { padding: .35rem .25rem .6rem; border-bottom: 1px solid #e3e7ee; }
.menu-marca img { max-width: 190px; width: 100%; height: auto; }
.page-head > :first-child { padding-left: 56px; min-height: 46px; background: url(img/logo-icono.png) left top / 46px 46px no-repeat; }
form.card::before, form.form-marca::before, .card-marca::before {
  content: ""; display: block; height: 30px; margin: -.25rem 0 .75rem; padding-bottom: .5rem;
  background: url(img/logo-horizontal.png) right center / auto 26px no-repeat; border-bottom: 1px solid #edf0f3;
}
form.card.py-2::before, form.card.d-print-none.py-2::before { display: none; }
.footer-logo { height: 26px; width: auto; }
.login-card { border-top: 4px solid #19414d; }
.login-logo { width: 220px; }
@media print { .page-head > :first-child { padding-left: 0; background: none; } form.card::before, form.form-marca::before, .card-marca::before { display: none; } }

/* ===== v3.4 · Asistente normativo (chat) ===== */
.panel-asistente { --bs-offcanvas-width: 560px; }
.as-chat { display: flex; flex-direction: column; height: 100%; min-height: 0; background: #f8fafc; }
.as-chat-pagina { height: calc(100vh - 190px); min-height: 520px; border: 1px solid #e3e7ee; border-radius: 10px; overflow: hidden; background: #f8fafc; }
.as-log { position: relative; flex: 1 1 auto; overflow-y: auto; padding: 14px 14px 6px; }
.as-msg { display: flex; margin-bottom: 12px; }
.as-user { justify-content: flex-end; }
.as-burbuja { max-width: 92%; padding: 10px 13px; border-radius: 12px; font-size: .86rem; line-height: 1.45; box-shadow: 0 1px 2px rgba(15, 23, 42, .06); }
.as-user .as-burbuja { background: var(--brand-2); color: #fff; border-bottom-right-radius: 3px; white-space: pre-wrap; }
.as-bot .as-burbuja { background: #fff; border: 1px solid #e3e7ee; border-bottom-left-radius: 3px; position: relative; padding-left: 46px; min-height: 44px; }
.as-bot .as-burbuja::before { content: ""; position: absolute; left: 9px; top: 9px; width: 28px; height: 28px; border-radius: 50%; background: #fff url(img/logo-icono.png) center / 24px 24px no-repeat; border: 1px solid #e3e7ee; }
.as-burbuja p:last-child { margin-bottom: 0; }
.as-burbuja ol, .as-burbuja ul { padding-left: 1.2rem; margin-bottom: .5rem; }
.as-burbuja li { margin-bottom: 2px; }
.as-titulo { font-weight: 700; color: var(--brand); font-size: .95rem; margin-bottom: 6px; }
.as-sub { font-weight: 600; color: #334155; margin: 8px 0 3px; font-size: .82rem; }
.as-ruta { background: #eef6f8; border: 1px solid #cfe3e8; border-radius: 8px; padding: 6px 9px; margin: 6px 0 8px; font-size: .82rem; }
.as-ruta-lbl { color: #2a6474; font-weight: 600; }
.as-ruta strong { color: #1d414d; font-weight: 600; }
.as-flecha { color: #94a3b8; }
.as-ir { white-space: nowrap; margin-left: 4px; font-size: .78rem; }
.as-sec { border-left: 3px solid #cbd5e1; padding: 2px 0 2px 10px; margin: 10px 0; }
.as-sec-tit { font-weight: 600; color: #1e293b; }
.as-norma { background: #fffbeb; border: 1px solid #fde68a; border-radius: 8px; padding: 6px 9px; margin-top: 8px; }
.as-norma ul { margin-bottom: 0; }
.as-norma-linea { font-size: .79rem; color: #57534e; background: #fffbeb; border-radius: 6px; padding: 4px 7px; margin-top: 4px; }
.as-norma .clause, .as-norma-linea .clause { margin-right: 3px; }
.as-quien { font-size: .82rem; color: #475569; }
.as-cierre { background: #f1f5f9; border-radius: 8px; padding: 6px 9px; margin-top: 8px; }
.as-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.as-chips-tit { width: 100%; font-size: .75rem; color: #64748b; margin-top: 4px; }
.as-chip { border: 1px solid #b6d4dc; background: #f0f7f9; color: #1d414d; border-radius: 999px; padding: 3px 10px; font-size: .78rem; text-align: left; cursor: pointer; }
.as-chip:hover { background: #dcedf1; }
.as-ejemplos { display: flex; flex-wrap: wrap; gap: 6px; }
.as-temas details { margin-bottom: 3px; } .as-temas summary { cursor: pointer; font-weight: 600; }
.as-util { margin-top: 8px; font-size: .75rem; color: #64748b; display: flex; align-items: center; gap: 4px; }
.as-util button { border: 0; background: none; color: #64748b; padding: 0 3px; }
.as-util button:hover { color: var(--brand-2); }
.as-form { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid #e3e7ee; background: #fff; align-items: flex-end; }
.as-input { resize: none; font-size: .88rem; max-height: 140px; }
.btn-brand { background: var(--brand-2); color: #fff; } .btn-brand:hover { background: var(--brand); color: #fff; }
.as-pie { display: flex; justify-content: space-between; gap: 8px; padding: 0 12px 8px; background: #fff; font-size: .7rem; color: #94a3b8; }
.as-pensando .as-burbuja { display: flex; gap: 4px; align-items: center; }
.as-pensando span { width: 7px; height: 7px; border-radius: 50%; background: #94a3b8; animation: as-punto 1s infinite ease-in-out; }
.as-pensando span:nth-child(2) { animation-delay: .15s; } .as-pensando span:nth-child(3) { animation-delay: .3s; }
@keyframes as-punto { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
@media print { .as-form, .as-pie, .as-util, .as-chips { display: none !important; } .as-chat-pagina { height: auto; } .as-log { overflow: visible; } }

/* Botones flotantes de Ayuda y Asistente (esquina inferior derecha, sobre todas las pantallas) */
.botones-flotantes { position: fixed; right: 22px; bottom: 22px; z-index: 1040; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.btn-flotante { display: inline-flex; align-items: center; gap: 8px; border: 0; border-radius: 999px; padding: 10px 16px 10px 12px; font-weight: 600; font-size: .9rem;
  box-shadow: 0 6px 18px rgba(15, 23, 42, .22), 0 1px 3px rgba(15, 23, 42, .18); transition: transform .15s ease, box-shadow .15s ease; }
.btn-flotante i { font-size: 1.15rem; line-height: 1; }
.btn-flotante:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(15, 23, 42, .28); }
.btn-flotante:focus-visible { outline: 3px solid #fbbf24; outline-offset: 2px; }
.btn-asistente { background: var(--brand-2); color: #fff; padding: 13px 20px 13px 16px; font-size: .95rem; }
.btn-asistente i { font-size: 1.35rem; }
.btn-asistente:hover { background: var(--brand); color: #fff; }
.btn-ayuda { background: #fff; color: var(--brand); border: 1px solid #cfe3e8; }
.btn-ayuda:hover { background: #f0f7f9; }
body:has(.offcanvas.show) .botones-flotantes { display: none; }
.main { padding-bottom: 110px !important; }
@media (max-width: 575.98px) { .botones-flotantes { right: 14px; bottom: 14px; } .btn-flotante span { display: none; } .btn-flotante { padding: 12px; } .btn-asistente { padding: 15px; } }

/* v3.7.1 · Menú lateral plegable: + muestra las opciones del grupo, − las oculta */
.menu-herr .btn-link { font-size: .72rem; color: #6b7686; text-decoration: none; }
.menu-herr .btn-link:hover { color: var(--brand-2); }
.menu-sec { margin: 0; }
.menu-sec > summary.menu-group { list-style: none; cursor: pointer; display: flex; align-items: center; gap: .4rem; margin: .15rem 0; padding: .45rem .5rem; border-radius: .4rem; user-select: none; }
.menu-sec > summary.menu-group::-webkit-details-marker { display: none; }
.menu-sec > summary.menu-group::before { content: "+"; display: inline-flex; align-items: center; justify-content: center; width: 1.05rem; height: 1.05rem; border: 1px solid #c3cad5; border-radius: .25rem; font-size: .85rem; line-height: 1; color: #4d5868; background: #fff; flex: 0 0 auto; }
.menu-sec[open] > summary.menu-group::before { content: "\2212"; border-color: var(--brand-2); color: var(--brand-2); }
.menu-sec > summary.menu-group:hover { background: #eef3f9; color: #2b3445; }
.menu-sec > summary.menu-group:focus-visible { outline: 2px solid var(--brand-2); outline-offset: 1px; }
.menu-sec > summary .menu-cuenta { margin-left: auto; font-size: .65rem; color: #9aa4b2; font-weight: 500; }
.menu-sec[data-activo] > summary.menu-group { color: var(--brand-2); }
.menu-sec > .menu-items { padding: 0 0 .35rem .35rem; }

/* v3.9.4 · Marca RiskMan junto a la de SipMan (docs/marca/MARCA_RISKMAN.md): solo dos tintas, sin recolorear ni deformar; ancho mínimo 120 px en pantalla */
.rm-logo-barra { height: 30px; width: auto; margin: 0 .35rem; }
.rm-isotipo-barra { height: 30px; width: 30px; }
.menu-marca-rm { padding: .1rem .25rem .6rem; border-bottom: 1px solid #e3e7ee; }
.menu-marca-rm img { height: 34px; width: auto; max-width: 100%; }
.rm-logo-pie { height: 30px; width: auto; }
.rm-logo-ingreso { height: 48px; width: auto; max-width: 80%; margin-top: .75rem; }
.rm-logo-mfa { height: 30px; width: auto; margin: .25rem 0; }
.rm-logo-informe { height: 40px; width: auto; }
.print-brand img.rm-logo-impresion { width: auto; height: 30px; }
@media print { .rm-logo-informe, .rm-logo-impresion { -webkit-print-color-adjust: exact; print-color-adjust: exact; } }
.menu-marca:has(+ .menu-marca-rm) { border-bottom: 0; padding-bottom: .2rem; margin-bottom: .25rem !important; }
