/* ===== Sidebar nuevo (propuesta): una sola columna, degradado Midnight navy, colapsable por el usuario ===== */
:root{ --sb-w:264px; --sb-wc:76px; }
.sb{ position:fixed; inset:0 auto 0 0; width:var(--sb-w); z-index:40; display:flex; flex-direction:column;
  background:linear-gradient(180deg,#0A1527 0%,#0D1F3C 55%,#12305A 100%); color:#9FB0C8; border-right:1px solid rgba(255,255,255,.06);
  transition:width .2s ease; font-family:var(--font, system-ui); }
.sb *{ box-sizing:border-box; }
.sb svg{ width:20px; height:20px; fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; flex-shrink:0; }
.sb-head{ display:flex; align-items:center; gap:10px; padding:18px 14px 14px 16px; }
.sb-logo{ width:34px; height:34px; border-radius:10px; background:#fff; display:grid; place-items:center; flex-shrink:0; }
.sb-logo img{ width:24px; height:24px; object-fit:contain; }
.sb-brand{ min-width:0; flex:1; }
.sb-brand b{ display:block; color:#F1F7FF; font-size:15px; font-weight:700; letter-spacing:-.01em; }
.sb-brand small{ display:block; color:#7F93AF; font-size:11.5px; margin-top:1px; white-space:nowrap; }
.sb-toggle{ width:28px; height:28px; border-radius:8px; border:1px solid rgba(255,255,255,.12); background:rgba(255,255,255,.04); color:#9FB0C8; cursor:pointer; display:grid; place-items:center; padding:0; }
.sb-toggle:hover{ color:#fff; background:rgba(255,255,255,.1); }
.sb-toggle svg{ width:16px; height:16px; }
.sb-nav{ flex:1; overflow-y:auto; overflow-x:hidden; padding:4px 12px 10px; scrollbar-width:none; }
.sb-nav::-webkit-scrollbar{ display:none; }
.sb-sec{ margin:18px 8px 6px; font-size:10.5px; letter-spacing:.09em; text-transform:uppercase; color:#5B7092; font-weight:600; white-space:nowrap; }
.sb-sec:first-child{ margin-top:6px; }
.sb-item{ display:flex; align-items:center; gap:12px; width:100%; height:40px; padding:0 10px; border:0; background:none; border-radius:10px;
  color:#9FB0C8; font:inherit; font-size:13.5px; font-weight:500; cursor:pointer; text-align:left; white-space:nowrap; }
.sb-item span{ flex:1; overflow:hidden; text-overflow:ellipsis; }
.sb-item:hover{ background:rgba(255,255,255,.06); color:#E6EEF8; }
.sb-item.active{ background:linear-gradient(90deg,rgba(45,212,191,.26),rgba(45,212,191,.07)); color:#ECFEFF; box-shadow:inset 0 0 0 1px rgba(45,212,191,.30); }
.sb-item.active > svg:first-child{ color:#5EEAD4; }
.sb-chev{ width:16px !important; height:16px !important; opacity:.7; transition:transform .18s ease; }
.sb-item.abierto .sb-chev{ transform:rotate(180deg); }
.sb-sub{ margin:2px 0 4px 21px; padding-left:10px; border-left:1px solid rgba(255,255,255,.09); }
.sb-sub .sb-item{ height:34px; font-size:13px; padding:0 10px; color:#8DA0BC; }
.sb-sub .sb-item.active{ background:rgba(45,212,191,.10); box-shadow:none; color:#7FF3E0; }
.sb-foot{ padding:12px; border-top:1px solid rgba(255,255,255,.07); display:flex; flex-direction:column; gap:10px; }
.sb-user{ display:flex; align-items:center; gap:10px; padding:2px 2px; }
.sb-avatar{ width:36px; height:36px; border-radius:50%; background:linear-gradient(135deg,#2DD4BF,#0EA5A4); color:#04201E; font-weight:700; font-size:13px; display:grid; place-items:center; flex-shrink:0; }
.sb-who{ min-width:0; flex:1; } .sb-who b{ display:block; color:#F1F7FF; font-size:13.5px; font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.sb-who small{ color:#7F93AF; font-size:11.5px; }
.sb-gear{ width:30px; height:30px; border-radius:8px; border:0; background:none; color:#8DA0BC; cursor:pointer; display:grid; place-items:center; padding:0; } .sb-gear:hover{ color:#fff; background:rgba(255,255,255,.08); }
.sb-seg{ display:grid; grid-template-columns:1fr 1fr; gap:2px; padding:3px; border-radius:10px; background:rgba(255,255,255,.06); }
.sb-seg button{ height:30px; border:0; border-radius:8px; background:none; color:#8DA0BC; font:inherit; font-size:12.5px; font-weight:500; cursor:pointer; display:flex; align-items:center; justify-content:center; gap:6px; }
.sb-seg button svg{ width:15px; height:15px; }
.sb-seg button.on{ background:rgba(255,255,255,.14); color:#fff; }
.sb-out{ height:38px; border-radius:10px; border:1px solid rgba(255,255,255,.12); background:none; color:#C6D3E6; font:inherit; font-size:13px; display:flex; align-items:center; justify-content:center; gap:8px; cursor:pointer; }
.sb-out:hover{ background:rgba(255,255,255,.07); color:#fff; }
/* colapsado */
.sb.col{ width:var(--sb-wc); }
.sb.col .sb-head{ flex-direction:column; padding:16px 0 10px; gap:10px; }
.sb.col .sb-brand, .sb.col .sb-item span, .sb.col .sb-chev, .sb.col .sb-sub, .sb.col .sb-who, .sb.col .sb-gear, .sb.col .sb-out span, .sb.col .sb-seg span{ display:none; }
.sb.col .sb-nav{ padding:4px 14px 10px; }
.sb.col .sb-sec{ height:1px; margin:12px 8px; padding:0; font-size:0; background:rgba(255,255,255,.08); }
.sb.col .sb-item{ justify-content:center; padding:0; height:44px; }
.sb.col .sb-foot{ align-items:center; padding:12px 10px; }
.sb.col .sb-seg{ grid-template-columns:1fr; width:44px; } .sb.col .sb-seg button:not(.on){ display:none; }
.sb.col .sb-out{ width:44px; padding:0; }
.sb.col .sb-user{ justify-content:center; }
/* contenido */
.app-shell .main{ margin-left:var(--sb-w); transition:margin-left .2s ease; }
.app-shell.sb-col .main{ margin-left:var(--sb-wc); }
.sb .sb-seg{ background:rgba(255,255,255,.06); border:0; padding:3px; gap:2px; }
.sb .sb-seg button.on{ background:rgba(255,255,255,.14); color:#fff; box-shadow:none; font-weight:500; }
.sb-item.en-ruta > svg:first-child{ color:#5EEAD4; } .sb-item.en-ruta{ color:#ECFEFF; }
.sb-item:focus-visible, .sb-toggle:focus-visible, .sb-seg button:focus-visible, .sb-out:focus-visible{ outline:2px solid #5EEAD4; outline-offset:-2px; }
.sb-out:hover{ color:#fff; border-color:rgba(255,255,255,.12); }
.sb-sub .sb-item span{ flex:1; }
.sb.col .sb-seg svg{ margin:0; }
@media (prefers-reduced-motion: reduce){ .sb, .app-shell .main{ transition:none; } }
/* celular: cajón deslizable, siempre expandido */
@media (max-width:900px){
  .sb{ width:min(300px,86vw); transform:translateX(-100%); transition:transform .22s ease; }
  .sb.open{ transform:translateX(0); }
  .app-shell .main, .app-shell.sb-col .main{ margin-left:0; }
  .sb-toggle{ display:none; }
}
/* modo oscuro de la app: Midnight navy */
:root[data-theme="dark"]{ --bg:#0A1426; --surface:#0F203B; --surface-alt:#132849; --border:#1F3860; --border-soft:rgba(255,255,255,.05); --text-dim:#9FB3CF; }
:root[data-theme="dark"] body{ background:linear-gradient(160deg,#07101E 0%,#0A1A31 50%,#0F2547 100%) fixed; }
:root[data-theme="dark"] .topbar{ background:rgba(10,20,38,.7); border-color:#1F3860; }

/* ===== Tarjetas de dashboard que llevan a su módulo ===== */
.flujo-paso.ir, .franja-i.ir{ cursor:pointer; transition:background .15s ease; }
.flujo-paso.ir:hover, .franja-i.ir:hover{ background:var(--surface-alt); }
.flujo-paso.ir:hover .flujo-l::after, .franja-i.ir:hover > span::after{ content:" ›"; color:var(--primary); }
.flujo-paso.ir:focus-visible, .franja-i.ir:focus-visible{ outline:2px solid var(--primary); outline-offset:-2px; }
