:root{
  --ls-bg:#07111f;
  --ls-bg-2:#091728;
  --ls-sidebar:#06101c;
  --ls-panel:#0d1c2e;
  --ls-panel-2:#102238;
  --ls-panel-3:#132941;
  --ls-line:#233a54;
  --ls-line-soft:#172c42;
  --ls-text:#f4f8ff;
  --ls-muted:#96a9bf;
  --ls-blue:#2780ff;
  --ls-blue-2:#0f61d8;
  --ls-cyan:#45a3ff;
  --ls-green:#39d56f;
  --ls-yellow:#f5b91f;
  --ls-red:#ff554c;
  --ls-purple:#a64cf4;
  --ls-teal:#19c9c0;
  --ls-orange:#ff7a32;
  --ls-shadow:0 20px 60px rgba(0,0,0,.24);
  --ls-radius:16px;
  --ls-sidebar-w:258px;
  --ls-topbar-h:72px;
}

/* Oculta las barras laterales heredadas. El nuevo shell es el único menú visual. */
.app>.sidebar,
.staff-module-shell>#staffSidebarHost,
.ops-app>#staffSidebarHost{display:none!important}

html{background:var(--ls-bg)!important;color-scheme:dark}
body.latido-unified-shell{
  margin:0!important;
  min-height:100vh;
  background:
    radial-gradient(circle at 72% -8%,rgba(32,102,199,.12),transparent 30%),
    linear-gradient(180deg,#081426 0%,#06111f 100%)!important;
  color:var(--ls-text)!important;
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif!important;
  overflow-x:hidden;
}
body.latido-unified-shell *,body.latido-unified-shell *::before,body.latido-unified-shell *::after{box-sizing:border-box}
body.latido-unified-shell a{color:inherit}
body.latido-unified-shell button,body.latido-unified-shell input,body.latido-unified-shell select,body.latido-unified-shell textarea{font:inherit}
body.latido-unified-shell .hidden{display:none!important}

/* Lienzo general */
body.latido-unified-shell>.app,
body.latido-unified-shell .app.staff-module-shell,
body.latido-unified-shell .ops-app{display:block!important;min-height:100vh!important;background:transparent!important}
body.latido-unified-shell>.app>main,
body.latido-unified-shell .staff-module-main,
body.latido-unified-shell .ops-main,
body.latido-unified-shell>main,
body.latido-unified-shell .profile-wrap,
body.latido-unified-shell .vol-portal-wrap{
  margin-left:var(--ls-sidebar-w)!important;
  width:auto!important;
  max-width:none!important;
  min-width:0!important;
  padding-top:calc(var(--ls-topbar-h) + 24px)!important;
}
body.latido-unified-shell>.app>main,
body.latido-unified-shell .staff-module-main,
body.latido-unified-shell .ops-main{padding-left:24px!important;padding-right:24px!important;padding-bottom:42px!important}
body.latido-unified-shell .users-wrap,
body.latido-unified-shell .weekly-services-wrap,
body.latido-unified-shell .attendance-reports-wrap,
body.latido-unified-shell .notifications-wrap,
body.latido-unified-shell .critical-wrap,
body.latido-unified-shell .excuse-wrap,
body.latido-unified-shell .chat-wrap,
body.latido-unified-shell .profile-wrap,
body.latido-unified-shell .vol-portal-wrap,
body.latido-unified-shell .ops-container{
  width:min(1440px,100%)!important;
  max-width:1440px!important;
  margin-left:auto!important;
  margin-right:auto!important;
}

/* Sidebar global */
.latido-shell-sidebar{
  position:fixed;inset:0 auto 0 0;width:var(--ls-sidebar-w);z-index:5000;
  background:linear-gradient(180deg,#06111f 0%,#071525 100%);
  border-right:1px solid #14283e;
  display:flex;flex-direction:column;padding:18px 14px 14px;
  overflow-y:auto;overflow-x:hidden;scrollbar-width:thin;scrollbar-color:#27425f transparent;
}
.latido-shell-brand{display:flex;align-items:center;gap:11px;padding:3px 7px 16px;border-bottom:1px solid #172a3d;margin-bottom:12px;text-decoration:none}
.latido-shell-brand-mark{width:43px;height:43px;flex:0 0 43px;display:grid;place-items:center}
.latido-shell-brand-mark svg{width:43px;height:43px;display:block}
.latido-shell-brand-copy strong{display:block;font-size:1.08rem;letter-spacing:-.02em;color:#fff}
.latido-shell-brand-copy span{display:block;font-size:.71rem;color:#9eb0c4;margin-top:2px}
.latido-shell-nav{display:grid;gap:3px;padding-bottom:16px}
.latido-shell-section{margin:14px 9px 5px;color:#7f93aa;font-weight:800;font-size:.64rem;letter-spacing:.09em;text-transform:uppercase}
.latido-shell-link{position:relative;display:flex;align-items:center;gap:11px;padding:10px 11px;border-radius:9px;color:#d2dce8!important;font-size:.83rem;text-decoration:none!important;transition:.16s ease;border:1px solid transparent;background:transparent;cursor:pointer;width:100%;text-align:left}
.latido-shell-link:hover{background:#0c2035;color:#fff!important}
.latido-shell-link.active{background:linear-gradient(90deg,rgba(31,112,236,.29),rgba(23,78,143,.23));color:#fff!important;border-color:#17457c}
.latido-shell-link.active::before{content:"";position:absolute;left:-14px;top:6px;bottom:6px;width:3px;border-radius:0 3px 3px 0;background:#2e82ff;box-shadow:0 0 14px rgba(46,130,255,.7)}
.latido-shell-icon{width:20px;height:20px;display:grid;place-items:center;color:#a9b9ca;flex:0 0 20px}
.latido-shell-link.active .latido-shell-icon{color:#4a99ff}
.latido-shell-icon svg{width:19px;height:19px;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.latido-shell-link .latido-shell-badge{margin-left:auto;min-width:20px;height:20px;padding:0 6px;border-radius:999px;display:grid;place-items:center;background:#153657;color:#cfe4ff;font-size:.65rem;font-weight:800}
.latido-shell-sidebar-bottom{margin-top:auto;padding-top:12px;border-top:1px solid #172a3d}
.latido-shell-status{border:1px solid #1f364d;background:#0a1a2a;border-radius:10px;padding:9px 10px;color:#8ea3b8;font-size:.66rem;line-height:1.45}
.latido-shell-status .dot{display:inline-block;width:7px;height:7px;background:#30d56e;border-radius:50%;margin-right:7px;box-shadow:0 0 0 5px rgba(48,213,110,.08)}
.latido-shell-collapse{margin-top:9px;margin-left:auto;width:31px;height:31px;border:1px solid #20364d;background:#081827;color:#91a8be;border-radius:8px;cursor:pointer;display:grid;place-items:center}

/* Topbar global */
.latido-shell-topbar{
  position:fixed;left:var(--ls-sidebar-w);right:0;top:0;height:var(--ls-topbar-h);z-index:4900;
  display:flex;align-items:center;justify-content:space-between;gap:18px;
  padding:12px 24px;background:rgba(6,17,31,.94);border-bottom:1px solid #14283e;
  backdrop-filter:blur(18px);box-shadow:0 8px 30px rgba(0,0,0,.12)
}
.latido-shell-heading{min-width:0;display:flex;align-items:center;gap:11px}
.latido-shell-page-icon{width:36px;height:36px;border-radius:50%;background:#10233a;border:1px solid #18314c;color:#dce8f5;display:grid;place-items:center;flex:0 0 36px}
.latido-shell-page-icon svg{width:19px;height:19px;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.latido-shell-heading h1{margin:0!important;color:#f4f8ff!important;font-size:clamp(1.08rem,1.8vw,1.45rem)!important;letter-spacing:-.025em!important;line-height:1.15!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.latido-shell-heading p{margin:4px 0 0!important;color:#93a8bd!important;font-size:.73rem!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:760px}
.latido-shell-actions{display:flex;align-items:center;gap:8px;flex:0 0 auto}
.latido-shell-icon-btn{width:38px;height:38px;border-radius:50%;border:1px solid transparent;background:transparent;color:#b6c5d5;display:grid;place-items:center;cursor:pointer;position:relative;transition:.15s}
.latido-shell-icon-btn:hover{border-color:#233a53;background:#0c1c2e;color:#fff}
.latido-shell-icon-btn svg{width:19px;height:19px;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.latido-shell-notification-count{position:absolute;right:-2px;top:-4px;background:#ff4949;color:#fff;min-width:18px;height:18px;padding:0 5px;border-radius:999px;display:grid;place-items:center;font-weight:900;font-size:.61rem;border:2px solid #07111f}
.latido-shell-user{position:relative;margin-left:3px;padding-left:12px;border-left:1px solid #21364d}
.latido-shell-user-trigger{border:0;background:transparent;color:#fff;display:flex;align-items:center;gap:9px;padding:3px 4px;cursor:pointer;border-radius:10px;text-align:left}
.latido-shell-user-trigger:hover{background:#0c1c2e}
.latido-shell-avatar{width:35px;height:35px;border-radius:50%;display:grid;place-items:center;background:linear-gradient(135deg,#267bff,#1752bd);color:#fff;font-size:.72rem;font-weight:900;box-shadow:0 8px 20px rgba(20,95,210,.22);flex:0 0 35px}
.latido-shell-avatar img{width:100%;height:100%;display:block;object-fit:cover;border-radius:inherit;background:#0b1f33}
.latido-shell-user-copy{min-width:0;max-width:210px}
.latido-shell-user-copy b{display:block;color:#fff;font-size:.75rem;line-height:1.2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.latido-shell-user-copy span{display:block;color:#8ea3b9;font-size:.62rem;margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.latido-shell-user-chevron{color:#7f95aa;font-size:.68rem;margin-left:1px}
.latido-shell-user-menu{position:absolute;right:0;top:calc(100% + 10px);width:255px;border:1px solid #294159;background:linear-gradient(160deg,#102239,#081827);border-radius:13px;box-shadow:0 26px 70px rgba(0,0,0,.42);padding:8px;display:none}
.latido-shell-user.open .latido-shell-user-menu{display:block}
.latido-shell-menu-head{padding:10px 11px 11px;border-bottom:1px solid #21374e;margin-bottom:5px}
.latido-shell-menu-head small{display:block;color:#7f96ad;font-size:.59rem;text-transform:uppercase;letter-spacing:.08em;font-weight:800}
.latido-shell-menu-head b{display:block;color:#fff;font-size:.78rem;margin-top:4px}
.latido-shell-menu-head span{display:block;color:#8ea4b9;font-size:.64rem;margin-top:2px}
.latido-shell-menu-item{width:100%;border:0;background:transparent;color:#ced9e5!important;display:flex;align-items:center;gap:9px;border-radius:8px;padding:10px 11px;text-decoration:none!important;cursor:pointer;font-size:.72rem;font-weight:700;text-align:left}
.latido-shell-menu-item:hover{background:#11263e;color:#fff!important}
.latido-shell-menu-item.danger{color:#ff8d89!important}.latido-shell-menu-item.danger:hover{background:rgba(255,85,76,.1)}
.latido-shell-menu-item svg{width:17px;height:17px;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}

/* Búsqueda global */
.latido-shell-search-backdrop{position:fixed;inset:0;z-index:7000;background:rgba(0,7,17,.72);backdrop-filter:blur(6px);display:none;place-items:start center;padding:12vh 20px 20px}
.latido-shell-search-backdrop.open{display:grid}
.latido-shell-search{width:min(680px,100%);border:1px solid #2b4660;background:linear-gradient(160deg,#102239,#081827);border-radius:15px;box-shadow:0 34px 100px rgba(0,0,0,.5);overflow:hidden}
.latido-shell-search-input{display:flex;align-items:center;gap:10px;padding:13px 15px;border-bottom:1px solid #22394f}
.latido-shell-search-input svg{width:20px;height:20px;stroke:#8fa6bd;fill:none;stroke-width:1.8}
.latido-shell-search-input input{flex:1;border:0;outline:0;background:transparent!important;color:#fff!important;font-size:.91rem!important;box-shadow:none!important;padding:0!important;min-height:0!important}
.latido-shell-search-results{max-height:420px;overflow:auto;padding:8px}
.latido-search-result{display:flex;align-items:center;gap:10px;padding:10px 11px;border-radius:9px;color:#cbd8e4;text-decoration:none!important}
.latido-search-result:hover,.latido-search-result.active{background:#102945;color:#fff}
.latido-search-result svg{width:18px;height:18px;stroke:#70acff;fill:none;stroke-width:1.8;flex:0 0 18px}
.latido-search-result small{margin-left:auto;color:#71869a;font-size:.58rem;text-transform:uppercase;letter-spacing:.06em}
.latido-shell-search-empty{padding:22px;text-align:center;color:#8399ae;font-size:.72rem}

/* Oculta cabeceras / acciones heredadas redundantes. Conservamos sus controles internos importantes. */
body.latido-unified-shell .topbar{display:none!important}
body.latido-unified-shell .profile-topbar{display:none!important}
body.latido-unified-shell .ops-header{display:none!important}
body.latido-unified-shell .users-toolbar>.actions,
body.latido-unified-shell .weekly-main-toolbar>.actions,
body.latido-unified-shell .critical-header>.actions,
body.latido-unified-shell .reports-toolbar>.actions{display:none!important}
body.latido-unified-shell .notification-host{display:none!important}
body.latido-unified-shell .theme-toggle-btn{display:none!important}

/* Estética transversal de módulos */
body.latido-unified-shell .users-toolbar,
body.latido-unified-shell .notifications-toolbar,
body.latido-unified-shell .critical-header,
body.latido-unified-shell .chat-page-head{
  background:transparent!important;border:0!important;box-shadow:none!important;padding:0!important;margin:0 0 18px!important
}
body.latido-unified-shell .users-toolbar h1,
body.latido-unified-shell .notifications-toolbar h1,
body.latido-unified-shell .critical-header h1,
body.latido-unified-shell .chat-page-head h1{display:none!important}
body.latido-unified-shell .users-toolbar .overline,
body.latido-unified-shell .notifications-toolbar .overline,
body.latido-unified-shell .critical-header .overline{display:none!important}
body.latido-unified-shell .users-toolbar>div:first-child>p,
body.latido-unified-shell .notifications-toolbar>div:first-child>p,
body.latido-unified-shell .critical-header .critical-brand>div>p{display:none!important}

body.latido-unified-shell .card,
body.latido-unified-shell .weekly-selector-card,
body.latido-unified-shell .weekly-self-status,
body.latido-unified-shell .report-control-card,
body.latido-unified-shell .excuse-filter-card,
body.latido-unified-shell .service-request-admin-card,
body.latido-unified-shell .profile-card,
body.latido-unified-shell .vol-welcome-card,
body.latido-unified-shell .portal-availability-section,
body.latido-unified-shell .service-request-section,
body.latido-unified-shell .excuse-portal-section,
body.latido-unified-shell .ops-panel,
body.latido-unified-shell .ops-kpi,
body.latido-unified-shell .ops-banner,
body.latido-unified-shell .ops-assignment-hero{
  background:linear-gradient(150deg,#0f2033,#0a1828)!important;
  border:1px solid #253c54!important;
  color:var(--ls-text)!important;
  box-shadow:0 12px 30px rgba(0,0,0,.12)!important;
  border-radius:16px!important;
}
body.latido-unified-shell .card h2,
body.latido-unified-shell .card h3,
body.latido-unified-shell .card h4,
body.latido-unified-shell .profile-card h2,
body.latido-unified-shell .weekly-selector-card h2{color:#f2f7fd!important}
body.latido-unified-shell .muted,
body.latido-unified-shell .card p,
body.latido-unified-shell .field-help,
body.latido-unified-shell small{color:#91a6bb}

body.latido-unified-shell .input,
body.latido-unified-shell input:not([type="checkbox"]):not([type="radio"]),
body.latido-unified-shell select,
body.latido-unified-shell textarea{
  background:#081827!important;color:#edf4fb!important;border-color:#2b465f!important;border-radius:9px!important;outline:none!important
}
body.latido-unified-shell .input:focus,
body.latido-unified-shell input:focus,
body.latido-unified-shell select:focus,
body.latido-unified-shell textarea:focus{border-color:#3387e8!important;box-shadow:0 0 0 3px rgba(51,135,232,.12)!important}
body.latido-unified-shell input::placeholder,body.latido-unified-shell textarea::placeholder{color:#688097!important}

body.latido-unified-shell .btn,
body.latido-unified-shell button.btn{
  border-radius:8px!important;border:1px solid #29445f!important;background:#102239!important;color:#dce8f4!important;box-shadow:none!important;transition:.16s ease!important
}
body.latido-unified-shell .btn:hover{background:#15304e!important;transform:translateY(-1px)}
body.latido-unified-shell .btn.primary,
body.latido-unified-shell .btn.navy,
body.latido-unified-shell button.primary{
  background:linear-gradient(180deg,#1676f3,#0d57c8)!important;border-color:#2b81f5!important;color:#fff!important;box-shadow:0 9px 20px rgba(17,99,220,.18)!important
}
body.latido-unified-shell .btn.danger{border-color:#8c3b43!important;color:#ffaaa7!important;background:rgba(131,42,49,.18)!important}

body.latido-unified-shell .table-wrap{border:1px solid #223b53!important;border-radius:13px!important;background:#091827!important;overflow:auto!important}
body.latido-unified-shell table{color:#dce7f2!important;background:transparent!important;border-collapse:collapse}
body.latido-unified-shell table thead th{background:#0d2033!important;color:#91a8bf!important;border-color:#213950!important;text-transform:uppercase;font-size:.65rem;letter-spacing:.04em}
body.latido-unified-shell table tbody td{background:#091a2b!important;color:#d7e1ec!important;border-color:#1d344a!important}
body.latido-unified-shell table tbody tr:hover td{background:#0d2136!important}

body.latido-unified-shell .modal,
body.latido-unified-shell .notification-confirm-backdrop{background:rgba(0,7,17,.76)!important;backdrop-filter:blur(5px)}
body.latido-unified-shell .modal-box,
body.latido-unified-shell .notification-confirm-box{background:linear-gradient(160deg,#0f2237,#091827)!important;border:1px solid #2d4760!important;color:#eef5fc!important;box-shadow:0 32px 90px rgba(0,0,0,.48)!important;border-radius:15px!important}

/* Tarjetas de resumen ya existentes */
body.latido-unified-shell .stats,
body.latido-unified-shell .portal-kpis,
body.latido-unified-shell .excuse-kpis,
body.latido-unified-shell .notifications-summary,
body.latido-unified-shell .critical-stats{gap:13px!important}
body.latido-unified-shell .stats article,
body.latido-unified-shell .portal-kpis article,
body.latido-unified-shell .excuse-kpis article,
body.latido-unified-shell .notifications-summary article,
body.latido-unified-shell .critical-stats article{
  background:linear-gradient(145deg,#102238,#0b1a2b)!important;border:1px solid #263d55!important;color:#fff!important;border-radius:16px!important;box-shadow:0 12px 28px rgba(0,0,0,.12)!important
}
body.latido-unified-shell .stats article b,
body.latido-unified-shell .portal-kpis article b,
body.latido-unified-shell .excuse-kpis article b,
body.latido-unified-shell .notifications-summary article b{color:#fff!important}

/* Secciones hero existentes: las hacemos coherentes con el sistema oscuro */
body.latido-unified-shell .hero,
body.latido-unified-shell .weekly-hero,
body.latido-unified-shell .reports-hero,
body.latido-unified-shell .critical-hero,
body.latido-unified-shell .profile-hero-card{
  background:linear-gradient(115deg,#0c2a4e,#0c1f38)!important;border:1px solid #1b4f83!important;color:#fff!important;box-shadow:0 18px 45px rgba(0,0,0,.16)!important;border-radius:16px!important
}
body.latido-unified-shell .hero h2,
body.latido-unified-shell .weekly-hero h2,
body.latido-unified-shell .reports-hero h2,
body.latido-unified-shell .critical-hero h2,
body.latido-unified-shell .profile-hero-card h1{color:#fff!important}
body.latido-unified-shell .hero p,
body.latido-unified-shell .weekly-hero p,
body.latido-unified-shell .reports-hero p,
body.latido-unified-shell .critical-hero p,
body.latido-unified-shell .profile-hero-card p{color:#bfd1e4!important}

/* Chat */
body.latido-unified-shell .chat-shell,
body.latido-unified-shell .chat-conversations,
body.latido-unified-shell .chat-room-panel,
body.latido-unified-shell .chat-room-head,
body.latido-unified-shell .chat-composer{background:#091827!important;border-color:#223b53!important;color:#eaf2fa!important}
body.latido-unified-shell .chat-conversation-item{background:#0b1b2d!important;border-color:#20394f!important;color:#dbe6f0!important}
body.latido-unified-shell .chat-conversation-item.active{background:#12345d!important;border-color:#2b7de0!important}
body.latido-unified-shell .chat-message-bubble{background:#10243a!important;color:#eaf1f8!important;border-color:#223e58!important}
body.latido-unified-shell .chat-message.own .chat-message-bubble{background:#124a8b!important;border-color:#256ec0!important;color:#fff!important}

/* Portal de voluntario, mismo lenguaje visual con navegación apropiada */
body.latido-unified-shell.volunteer-portal-page .vol-portal-header{display:none!important}
body.latido-unified-shell .profile-account-card,
body.latido-unified-shell .availability-summary-box,
body.latido-unified-shell .portal-service-card,
body.latido-unified-shell .portal-report-card,
body.latido-unified-shell .excuse-card{background:#0a1a2b!important;border-color:#243d55!important;color:#e8f0f8!important}

/* Perfil */
body.latido-unified-shell.profile-page{padding-top:0!important}
body.latido-unified-shell.profile-page .profile-wrap{padding-left:24px!important;padding-right:24px!important;padding-bottom:42px!important}

/* Ops pages: mantienen sus componentes exactos, solo adoptan el shell global */
body.latido-unified-shell.ops-page .ops-main{padding-top:calc(var(--ls-topbar-h) + 24px)!important}
body.latido-unified-shell.ops-page .ops-container{margin:0 auto!important}

/* Evita que acciones redundantes queden flotando en páginas simples */
body.latido-unified-shell.users-page:not(.notifications-page) .users-toolbar>.actions{display:none!important}

@media(max-width:1080px){
  :root{--ls-sidebar-w:78px}
  .latido-shell-sidebar{padding-left:9px;padding-right:9px}
  .latido-shell-brand-copy,.latido-shell-link>span:not(.latido-shell-icon):not(.latido-shell-badge),.latido-shell-section,.latido-shell-status{display:none}
  .latido-shell-brand{justify-content:center;padding-left:0;padding-right:0}.latido-shell-link{justify-content:center;padding:10px}.latido-shell-link.active::before{left:-9px}
  .latido-shell-user-copy{display:none}.latido-shell-user{padding-left:8px}.latido-shell-heading p{max-width:400px}
}
@media(max-width:720px){
  :root{--ls-sidebar-w:64px;--ls-topbar-h:64px}
  .latido-shell-sidebar{width:64px;padding:10px 7px}.latido-shell-brand-mark,.latido-shell-brand-mark svg{width:38px;height:38px}.latido-shell-link{padding:9px}
  .latido-shell-topbar{padding:9px 12px}.latido-shell-page-icon{display:none}.latido-shell-heading p{display:none}.latido-shell-heading h1{font-size:1rem!important}
  .latido-shell-user{border-left:0;padding-left:0}.latido-shell-user-trigger{padding:2px}.latido-shell-user-chevron{display:none}
  .latido-shell-actions{gap:2px}.latido-shell-icon-btn{width:34px;height:34px}
  body.latido-unified-shell>.app>main,body.latido-unified-shell .staff-module-main,body.latido-unified-shell .ops-main,body.latido-unified-shell>main,body.latido-unified-shell .profile-wrap,body.latido-unified-shell .vol-portal-wrap{padding-left:12px!important;padding-right:12px!important}
}

/* Estado contraído manual */
html.latido-shell-compact{--ls-sidebar-w:78px}
html.latido-shell-compact .latido-shell-sidebar{padding-left:9px;padding-right:9px}
html.latido-shell-compact .latido-shell-brand-copy,
html.latido-shell-compact .latido-shell-link>span:not(.latido-shell-icon):not(.latido-shell-badge),
html.latido-shell-compact .latido-shell-section,
html.latido-shell-compact .latido-shell-status{display:none}
html.latido-shell-compact .latido-shell-brand{justify-content:center;padding-left:0;padding-right:0}
html.latido-shell-compact .latido-shell-link{justify-content:center;padding:10px}
html.latido-shell-compact .latido-shell-link.active::before{left:-9px}
html.latido-shell-compact .latido-shell-collapse{margin-left:auto;margin-right:auto;transform:rotate(180deg)}

body.latido-unified-shell.users-page:not(.notifications-page) .users-toolbar{display:none!important}
body.latido-unified-shell.weekly-services-page .weekly-main-toolbar{display:none!important}
body.latido-unified-shell.attendance-reports-page .reports-toolbar{display:none!important}
body.latido-unified-shell.critical-area-page .critical-header{display:none!important}

/* Ajustes específicos de componentes claros que antes dependían del modo oscuro heredado */
body.latido-unified-shell .segment,
body.latido-unified-shell .report-mode-tabs,
body.latido-unified-shell .critical-tabs,
body.latido-unified-shell .filters,
body.latido-unified-shell .notifications-filterbar{background:transparent!important;color:#dce7f2!important;border-color:#223b53!important}
body.latido-unified-shell .segment button,
body.latido-unified-shell .report-mode-tabs button,
body.latido-unified-shell .critical-tabs button{background:#0b1a2a!important;color:#b9c8d7!important;border-color:#294159!important}
body.latido-unified-shell .segment button.active,
body.latido-unified-shell .report-mode-tabs button.active,
body.latido-unified-shell .critical-tabs button.active{background:linear-gradient(180deg,#174a90,#123b73)!important;color:#fff!important;border-color:#276bc7!important}
body.latido-unified-shell .info-banner,
body.latido-unified-shell .auth-error,
body.latido-unified-shell .profile-message{border-radius:11px!important;background:#0c2948!important;border-color:#1c5c97!important;color:#d7ebff!important}
body.latido-unified-shell .empty{color:#89a0b7!important;background:#0a1929!important;border-color:#223b53!important}

/* Login: mismo lenguaje visual, sin navegación porque todavía no existe una sesión. */
body.auth-page{
  margin:0!important;min-height:100vh!important;background:radial-gradient(circle at 18% 15%,rgba(34,109,210,.18),transparent 28%),linear-gradient(135deg,#07111f,#091728)!important;color:#eef5fc!important;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif!important
}
body.auth-page .auth-shell{background:transparent!important;box-shadow:0 28px 90px rgba(0,0,0,.32)!important;border:1px solid #223a53!important;border-radius:20px!important;overflow:hidden!important}
body.auth-page .auth-brand-panel{background:linear-gradient(155deg,#0a294b,#071828)!important;color:#fff!important;border:0!important}
body.auth-page .auth-brand-panel p,body.auth-page .auth-foot,body.auth-page .login-subtitle{color:#9fb3c8!important}
body.auth-page .auth-card{background:linear-gradient(155deg,#102238,#091827)!important;color:#eef5fc!important;border:0!important}
body.auth-page .auth-card h2,body.auth-page .auth-card label{color:#f5f9fd!important}
body.auth-page .account-type-card{background:#0a1b2d!important;border:1px solid #27425d!important;color:#dbe7f2!important;border-radius:12px!important}
body.auth-page .account-type-card small{color:#8ea5bb!important}
body.auth-page .account-type-card.active{background:linear-gradient(160deg,#123b6a,#10294a)!important;border-color:#2d79d1!important;box-shadow:inset 0 0 0 1px rgba(70,150,255,.15)!important}
body.auth-page .input{background:#081827!important;color:#edf4fb!important;border-color:#2b465f!important;border-radius:9px!important}
body.auth-page .btn.primary{background:linear-gradient(180deg,#1676f3,#0d57c8)!important;border-color:#2b81f5!important;color:#fff!important;border-radius:9px!important}
body.auth-page .theme-toggle-btn{display:none!important}

/* Componentes históricos del Gestor principal adaptados al mismo sistema visual */
body.latido-unified-shell .mini-person,
body.latido-unified-shell .kpi,
body.latido-unified-shell .week-buttons button,
body.latido-unified-shell .choice-cards button,
body.latido-unified-shell .rule-box>div,
body.latido-unified-shell .schedule-day,
body.latido-unified-shell .shift-row,
body.latido-unified-shell .schedule-group,
body.latido-unified-shell .export-bar,
body.latido-unified-shell .profile-stat,
body.latido-unified-shell .detail-grid>div,
body.latido-unified-shell .profile-subbox,
body.latido-unified-shell .master-stats article,
body.latido-unified-shell .availability-color-legend>div,
body.latido-unified-shell .availability-status-row,
body.latido-unified-shell .profile-readonly-grid>div,
body.latido-unified-shell .portal-empty-good,
body.latido-unified-shell .master-export-note,
body.latido-unified-shell .rule-summary,
body.latido-unified-shell .vacancy-search-panel{
  background:#0b1b2d!important;border-color:#243d55!important;color:#dce7f2!important;box-shadow:none!important
}
body.latido-unified-shell .shift-title,
body.latido-unified-shell .avail-editor-row>div:first-child{background:#0d2033!important;color:#e7eff7!important}
body.latido-unified-shell .schedule-day h4,
body.latido-unified-shell .rule-box b,
body.latido-unified-shell .master-stats b{color:#f2f7fd!important}
body.latido-unified-shell .person-chip{background:#12345d!important;color:#d9eaff!important;border:1px solid #245489!important}
body.latido-unified-shell .schedule-group.new .person-chip{background:#10394d!important;color:#bcefff!important;border-color:#1e607d!important}
body.latido-unified-shell .person-chip.vacant{background:#3c2527!important;color:#ffb6b2!important;border-color:#754044!important}
body.latido-unified-shell .choice-cards button.active,
body.latido-unified-shell .week-buttons button.active{background:#153f70!important;border-color:#347fd2!important;color:#fff!important}
body.latido-unified-shell .badge.old{background:#17345a!important;color:#c9ddff!important}
body.latido-unified-shell .badge.new{background:#123b4d!important;color:#b7efff!important}
body.latido-unified-shell .badge.green{background:#123c2b!important;color:#9be2ba!important}
body.latido-unified-shell .badge.red{background:#402326!important;color:#ffaaa7!important}
body.latido-unified-shell .badge.amber{background:#453815!important;color:#ffe09a!important}
body.latido-unified-shell .badge.gray{background:#243142!important;color:#bac7d4!important}
body.latido-unified-shell .badge.blue{background:#173d70!important;color:#c9e2ff!important}

/* Excusas */
body.latido-unified-shell .excuse-card,
body.latido-unified-shell .excuse-description,
body.latido-unified-shell .excuse-privacy-note,
body.latido-unified-shell .excuse-review-box,
body.latido-unified-shell .excuse-appeal-box,
body.latido-unified-shell .appeal-body,
body.latido-unified-shell .excuse-service-meta span,
body.latido-unified-shell .excuse-service-meta b{
  background:#0b1b2d!important;border-color:#243d55!important;color:#d6e2ed!important
}
body.latido-unified-shell .excuse-card h3,body.latido-unified-shell .excuse-card b{color:#f3f7fb!important}

/* Reportes, notificaciones y listados */
body.latido-unified-shell .notification-card,
body.latido-unified-shell .staff-report-card,
body.latido-unified-shell .portal-notice,
body.latido-unified-shell .portal-my-report,
body.latido-unified-shell .portal-service,
body.latido-unified-shell .service-request-card,
body.latido-unified-shell .critical-person-card,
body.latido-unified-shell .weekly-day-card,
body.latido-unified-shell .weekly-shift-card{
  background:#0b1b2d!important;border-color:#243d55!important;color:#dce7f2!important
}
body.latido-unified-shell .notification-card.unread{background:#0d2948!important;border-color:#245f9b!important}

/* Loader del chat */
body.latido-unified-shell .chat-room-loading{background:rgba(7,17,31,.82)!important;color:#a8bed3!important}

/* Mantiene el área de contenido con respiración similar a las referencias */
body.latido-unified-shell .dashboard-grid,
body.latido-unified-shell .portal-grid,
body.latido-unified-shell .users-grid{gap:14px!important}
body.latido-unified-shell hr,body.latido-unified-shell .soft-hr{border-color:#22394f!important}

/* Estado previo a la carga de sesión: evita el destello blanco entre páginas. */
body.latido-shell-page{background:#07111f!important;color:#f4f8ff!important}

/* ==========================================================
   LAYOUT FIX v2 · 2026-08-16
   Corrige recortes causados por el shell fijo, modales altos y
   páginas cuyo contenedor principal era también el wrapper centrado.
   ========================================================== */

/* Los <main> que son a la vez el wrapper de la página no deben volver
   a centrarse sobre todo el viewport, porque eso los mete detrás del sidebar. */
body.latido-unified-shell > main.users-wrap,
body.latido-unified-shell > main.profile-wrap,
body.latido-unified-shell > main.vol-portal-wrap{
  margin-left:var(--ls-sidebar-w)!important;
  margin-right:0!important;
  width:calc(100% - var(--ls-sidebar-w))!important;
  max-width:none!important;
  min-width:0!important;
  padding:calc(var(--ls-topbar-h) + 24px) 24px 48px!important;
}

/* Los contenedores anidados sí pueden centrarse dentro del lienzo ya desplazado. */
body.latido-unified-shell .staff-module-main > .users-wrap,
body.latido-unified-shell .staff-module-main > .notifications-wrap,
body.latido-unified-shell .staff-module-main > .critical-wrap,
body.latido-unified-shell .staff-module-main > .excuse-wrap,
body.latido-unified-shell .staff-module-main > .chat-wrap,
body.latido-unified-shell .ops-main > .ops-container{
  margin-left:auto!important;
  margin-right:auto!important;
  width:min(1440px,100%)!important;
  max-width:1440px!important;
}

/* Tablas: el card nunca crece más que su columna; la tabla desplaza dentro del card. */
body.latido-unified-shell .card,
body.latido-unified-shell .table-wrap,
body.latido-unified-shell .users-grid > *{min-width:0!important;max-width:100%!important}
body.latido-unified-shell .table-wrap{width:100%!important;overscroll-behavior:contain}
body.latido-unified-shell table.users-table{min-width:760px;width:100%}
body.latido-unified-shell .filters{grid-template-columns:repeat(auto-fit,minmax(180px,1fr))!important;align-items:end}

/* En pantallas intermedias el formulario de usuarios pasa arriba de la tabla.
   Es preferible una página algo más larga a una tabla amputada, concepto exótico. */
@media(max-width:1380px){
  body.latido-unified-shell .users-grid{grid-template-columns:1fr!important}
  body.latido-unified-shell .user-form-card{position:static!important}
}

/* Modales del gestor: viven dentro del área útil bajo el topbar y al lado del sidebar. */
body.latido-unified-shell .modal{
  inset:var(--ls-topbar-h) 0 0 var(--ls-sidebar-w)!important;
  z-index:4850!important;
  padding:16px!important;
  overflow:auto!important;
  overscroll-behavior:contain;
}
body.latido-unified-shell .modal-box,
body.latido-unified-shell .confirm-box{
  width:min(720px,calc(100vw - var(--ls-sidebar-w) - 32px))!important;
  max-width:100%!important;
  max-height:calc(100dvh - var(--ls-topbar-h) - 32px)!important;
  overflow:auto!important;
  scrollbar-width:thin;
  scrollbar-color:#34536f transparent;
}
body.latido-unified-shell .large-modal{width:min(960px,calc(100vw - var(--ls-sidebar-w) - 32px))!important}
body.latido-unified-shell .profile-box,
body.latido-unified-shell .master-profile-box{width:min(1040px,calc(100vw - var(--ls-sidebar-w) - 32px))!important}
body.latido-unified-shell .master-export-box{
  width:min(900px,calc(100vw - var(--ls-sidebar-w) - 32px))!important;
  padding:20px!important;
}
body.latido-unified-shell .master-export-box .modal-head{
  position:sticky;top:-20px;z-index:4;
  margin:-20px -20px 14px!important;padding:18px 20px 14px!important;
  background:linear-gradient(180deg,#0f2237 0%,#0d1d30 88%,rgba(13,29,48,.96) 100%)!important;
}
body.latido-unified-shell .master-export-scopes{grid-template-columns:repeat(2,minmax(0,1fr))!important}
body.latido-unified-shell .master-export-format-actions{grid-template-columns:repeat(2,minmax(0,1fr))!important}
body.latido-unified-shell .master-export-scope,
body.latido-unified-shell .master-export-format{min-width:0!important}

/* Selector manual de la lista semanal. Antes ocupaba el viewport completo y peleaba
   con el shell fijo; ahora usa exactamente el mismo lienzo útil que el resto. */
body.latido-unified-shell .manual-picker-modal{
  inset:var(--ls-topbar-h) 0 0 var(--ls-sidebar-w)!important;
  z-index:4850!important;
  padding:16px!important;
}
body.latido-unified-shell .manual-picker-panel{
  width:min(920px,calc(100vw - var(--ls-sidebar-w) - 32px))!important;
  max-width:100%!important;
  max-height:calc(100dvh - var(--ls-topbar-h) - 32px)!important;
  border-radius:16px!important;
}
body.latido-unified-shell .manual-picker-head{padding:18px 20px 14px!important}
body.latido-unified-shell .manual-picker-search-wrap{margin:14px 20px 8px!important}
body.latido-unified-shell .manual-picker-summary{padding-left:20px!important;padding-right:20px!important}
body.latido-unified-shell .manual-picker-results{padding:6px 20px 20px!important}

@media(max-width:760px){
  body.latido-unified-shell > main.users-wrap,
  body.latido-unified-shell > main.profile-wrap,
  body.latido-unified-shell > main.vol-portal-wrap{
    padding:calc(var(--ls-topbar-h) + 16px) 12px 34px!important;
  }
  body.latido-unified-shell .modal,
  body.latido-unified-shell .manual-picker-modal{padding:10px!important}
  body.latido-unified-shell .modal-box,
  body.latido-unified-shell .confirm-box,
  body.latido-unified-shell .large-modal,
  body.latido-unified-shell .profile-box,
  body.latido-unified-shell .master-profile-box,
  body.latido-unified-shell .master-export-box,
  body.latido-unified-shell .manual-picker-panel{
    width:calc(100vw - var(--ls-sidebar-w) - 20px)!important;
    max-height:calc(100dvh - var(--ls-topbar-h) - 20px)!important;
  }
  body.latido-unified-shell .master-export-scopes,
  body.latido-unified-shell .master-export-format-actions,
  body.latido-unified-shell .manual-picker-results{grid-template-columns:1fr!important}
}

/* ==========================================================
   MARCA GLOBAL v2
   ========================================================== */
.latido-shell-brand{display:grid!important;grid-template-columns:1fr!important;gap:2px!important;align-items:start!important;padding:2px 5px 14px!important}
.latido-shell-brand-image{display:block;width:198px;height:auto;max-height:61px;object-fit:contain;object-position:left center}
.latido-shell-brand-mark{display:none!important}
.latido-shell-brand-copy{display:none!important}
.latido-shell-brand-subtitle{display:block;color:#8fa5ba;font-size:.65rem;margin:0 0 0 4px;line-height:1}
html.latido-shell-compact .latido-shell-brand{display:flex!important;justify-content:center!important;padding-left:0!important;padding-right:0!important}
html.latido-shell-compact .latido-shell-brand-image,
html.latido-shell-compact .latido-shell-brand-subtitle{display:none!important}
html.latido-shell-compact .latido-shell-brand-mark{display:grid!important}
@media(max-width:1080px){
  .latido-shell-brand{display:flex!important;justify-content:center!important;padding-left:0!important;padding-right:0!important}
  .latido-shell-brand-image,.latido-shell-brand-subtitle{display:none!important}
  .latido-shell-brand-mark{display:grid!important}
}

/* ==========================================================
   LOGIN PROFESIONAL v2
   ========================================================== */
body.auth-page.portal-auth-page{
  padding:28px!important;
  background:
    radial-gradient(circle at 13% 14%,rgba(35,118,226,.20),transparent 30%),
    radial-gradient(circle at 86% 82%,rgba(255,79,104,.10),transparent 28%),
    linear-gradient(135deg,#050d18 0%,#071525 46%,#091b30 100%)!important;
  color:#edf5ff!important;
}
body.auth-page .dual-login-shell{
  width:min(1100px,96vw)!important;
  min-height:660px!important;
  grid-template-columns:minmax(420px,.95fr) minmax(430px,1.05fr)!important;
  border-radius:24px!important;
  border:1px solid #1f3852!important;
  background:#081726!important;
  box-shadow:0 38px 110px rgba(0,0,0,.46)!important;
}
body.auth-page .auth-brand-panel{
  position:relative!important;
  padding:48px 46px!important;
  align-items:flex-start!important;
  text-align:left!important;
  justify-content:center!important;
  background:
    radial-gradient(circle at 22% 18%,rgba(35,118,226,.18),transparent 29%),
    radial-gradient(circle at 84% 82%,rgba(255,79,104,.11),transparent 25%),
    linear-gradient(155deg,#07182b 0%,#08223c 58%,#071a2d 100%)!important;
  border-right:1px solid #1e3852!important;
  overflow:hidden!important;
}
body.auth-page .auth-brand-panel:after{
  content:"";position:absolute!important;right:-145px!important;bottom:-170px!important;width:390px!important;height:390px!important;border-radius:50%!important;
  border:1px solid rgba(73,153,255,.14)!important;box-shadow:0 0 0 56px rgba(73,153,255,.025),0 0 0 112px rgba(73,153,255,.018)!important;pointer-events:none
}
body.auth-page .auth-brand-panel img{
  width:min(340px,92%)!important;height:auto!important;max-height:130px!important;object-fit:contain!important;object-position:left center!important;
  margin:0 0 25px!important;filter:drop-shadow(0 13px 30px rgba(0,0,0,.2))!important
}
body.auth-page .auth-brand-pill{
  margin:0 0 16px!important;padding:7px 10px!important;border-radius:999px!important;
  background:rgba(41,128,255,.12)!important;border:1px solid rgba(72,151,255,.28)!important;color:#8ec2ff!important;font-size:.61rem!important;font-weight:900!important;letter-spacing:.12em!important
}
body.auth-page .auth-brand-panel h1{margin:0 0 12px!important;font-size:clamp(1.9rem,3vw,2.65rem)!important;line-height:1.05!important;letter-spacing:-.04em!important;color:#fff!important;max-width:430px!important}
body.auth-page .auth-brand-panel>p{margin:0!important;max-width:430px!important;color:#a9bdd2!important;font-size:.84rem!important;line-height:1.65!important}
body.auth-page .login-feature-list{display:grid;gap:10px;width:100%;margin:28px 0 0;padding:0;list-style:none;position:relative;z-index:1}
body.auth-page .login-feature-list li{display:flex;align-items:center;gap:10px;color:#c8d7e7;font-size:.72rem}
body.auth-page .login-feature-list span{width:27px;height:27px;border:1px solid #264866;background:#0b2947;border-radius:8px;display:grid;place-items:center;color:#62a9ff;font-size:.75rem;flex:0 0 27px}
body.auth-page .login-security-note{width:100%!important;margin-top:26px!important;padding:12px 13px!important;border:1px solid #23435f!important;background:rgba(6,22,39,.58)!important;color:#9fb5c9!important;border-radius:10px!important;font-size:.67rem!important;line-height:1.5!important;position:relative;z-index:1}
body.auth-page .dual-login-card{
  padding:52px 56px!important;justify-content:center!important;
  background:linear-gradient(160deg,#102238 0%,#091827 62%,#081624 100%)!important;color:#edf5ff!important
}
body.auth-page .login-card-kicker{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:30px;color:#7891aa;font-size:.65rem;font-weight:800;letter-spacing:.08em;text-transform:uppercase}
body.auth-page .login-card-kicker .online{display:flex;align-items:center;gap:7px;color:#8da7bf;text-transform:none;letter-spacing:0;font-weight:700}
body.auth-page .login-card-kicker .online:before{content:"";width:7px;height:7px;border-radius:50%;background:#35d66d;box-shadow:0 0 0 5px rgba(53,214,109,.08)}
body.auth-page .dual-login-card .overline{color:#5fa7ff!important;font-size:.62rem!important;letter-spacing:.13em!important;margin-bottom:7px!important}
body.auth-page .dual-login-card h2{margin:0 0 7px!important;color:#fff!important;font-size:2rem!important;letter-spacing:-.035em!important}
body.auth-page .login-subtitle{margin:0 0 22px!important;color:#94a9bd!important;font-size:.78rem!important}
body.auth-page .account-type-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important;margin:0 0 23px!important}
body.auth-page .account-type-card{min-height:116px!important;padding:15px!important;border-radius:13px!important;background:#0a1a2b!important;border:1px solid #263f58!important;color:#e0e9f2!important;box-shadow:none!important}
body.auth-page .account-type-card:hover{transform:translateY(-2px)!important;border-color:#3b6690!important;background:#0c2136!important}
body.auth-page .account-type-card.active{background:linear-gradient(155deg,#123a66,#0d2948)!important;border-color:#2b7de0!important;box-shadow:0 0 0 2px rgba(43,125,224,.10)!important}
body.auth-page .account-icon{width:34px;height:34px;border-radius:10px;display:grid!important;place-items:center;background:#112c49;color:#65aaff;font-size:1rem!important;margin:0 0 9px!important}
body.auth-page .account-type-card.active .account-icon{background:#1769c9;color:#fff}
body.auth-page .account-type-card b{color:#fff!important;font-size:.78rem!important;margin:0 0 5px!important}
body.auth-page .account-type-card small{color:#8fa4b8!important;font-size:.66rem!important;line-height:1.45!important}
body.auth-page .dual-login-card .field{margin:13px 0!important}
body.auth-page .dual-login-card .field label{display:block;margin:0 0 6px!important;color:#c9d7e5!important;font-size:.68rem!important;font-weight:800!important}
body.auth-page .dual-login-card .input{min-height:48px!important;padding:11px 13px!important;border-radius:10px!important;background:#071624!important;border:1px solid #2a455f!important;color:#fff!important}
body.auth-page .dual-login-card .input:hover{border-color:#355978!important}
body.auth-page .dual-login-card .field-help{display:block;color:#738ba2!important;font-size:.61rem!important;margin-top:5px!important}
body.auth-page .login-main-btn{min-height:50px!important;margin-top:12px!important;border-radius:10px!important;font-size:.78rem!important;font-weight:900!important;letter-spacing:.01em!important}
body.auth-page .dual-login-card .auth-foot{margin-top:20px!important;padding-top:17px!important;border-top:1px solid #20384f!important;color:#71889f!important;font-size:.64rem!important;line-height:1.5!important}
body.auth-page .dual-login-card .auth-error{background:rgba(164,48,55,.16)!important;border:1px solid #763840!important;color:#ffaaa7!important}

@media(max-width:920px){
  body.auth-page .dual-login-shell{grid-template-columns:1fr!important;width:min(620px,96vw)!important;min-height:auto!important}
  body.auth-page .auth-brand-panel{padding:30px 34px!important;border-right:0!important;border-bottom:1px solid #1e3852!important}
  body.auth-page .auth-brand-panel img{width:250px!important;max-height:95px!important;margin-bottom:16px!important}
  body.auth-page .auth-brand-panel h1{font-size:1.8rem!important}
  body.auth-page .login-feature-list{display:none!important}
  body.auth-page .login-security-note{margin-top:16px!important}
  body.auth-page .dual-login-card{padding:34px!important}
}
@media(max-width:520px){
  body.auth-page.portal-auth-page{padding:10px!important}
  body.auth-page .auth-brand-panel{padding:24px!important}
  body.auth-page .auth-brand-panel img{width:220px!important}
  body.auth-page .auth-brand-panel h1{font-size:1.55rem!important}
  body.auth-page .auth-brand-panel>p{font-size:.73rem!important}
  body.auth-page .dual-login-card{padding:26px 22px!important}
  body.auth-page .account-type-grid{grid-template-columns:1fr!important}
  body.auth-page .account-type-card{min-height:auto!important}
}

/* =========================================================
   DARK INSTITUCIONAL FIJO · 2026-08-16
   El modo claro deja de formar parte del producto. Estas reglas son una
   última barrera contra estilos heredados con superficies blancas.
   ========================================================= */
html,
html[data-theme="dark"],
html[data-theme="light"]{
  color-scheme:dark!important;
  background:#07111f!important;
}

/* Aun si una pestaña antigua deja data-theme=light antes del JS, el shell
   no cambia de identidad visual. */
html[data-theme="light"] body,
html[data-theme="dark"] body{
  background:#07111f!important;
}

/* Login: el logotipo horizontal debe conservar su transparencia y proporción.
   Anula de forma explícita logo-circular.css y latido-elegant.css. */
body.auth-page .auth-brand-panel img[src*="logo_latido_h"]{
  width:min(360px,94%)!important;
  height:auto!important;
  min-width:0!important;
  min-height:0!important;
  max-width:360px!important;
  max-height:145px!important;
  aspect-ratio:auto!important;
  object-fit:contain!important;
  object-position:left center!important;
  border-radius:0!important;
  clip-path:none!important;
  -webkit-clip-path:none!important;
  background:transparent!important;
  border:0!important;
  outline:0!important;
  padding:0!important;
  box-shadow:none!important;
  filter:drop-shadow(0 12px 24px rgba(0,0,0,.22))!important;
  margin:0 0 24px!important;
}

/* El selector de apariencia ya no existe; oculta cualquier resto procedente
   de una versión HTML almacenada en caché. */
#latidoThemeToggle,
.appearance-card,
.theme-toggle-btn,
.theme-toggle-profile{display:none!important}

/* Contraste reforzado de tablas críticas. */
html[data-theme="dark"] #masterTable td,
html[data-theme="dark"] #masterTable td *,
html[data-theme="dark"] #volunteerTable td,
html[data-theme="dark"] #volunteerTable td *,
html[data-theme="dark"] .master-table td,
html[data-theme="dark"] .users-table td{
  color:#dce9f7!important;
}
html[data-theme="dark"] #masterTable td b,
html[data-theme="dark"] #masterTable .vol-name,
html[data-theme="dark"] #masterTable .vol-name b,
html[data-theme="dark"] #volunteerTable td b,
html[data-theme="dark"] #volunteerTable .vol-name,
html[data-theme="dark"] #volunteerTable .vol-name b{
  color:#f7fbff!important;
}
html[data-theme="dark"] #masterTable td small,
html[data-theme="dark"] #volunteerTable td small{
  color:#9eb4ca!important;
}

/* Evita superficies blancas en los dos módulos donde el legado era más
   agresivo incluso mientras termina de cargar theme-toggle.css. */
html[data-theme="dark"] .master-hub,
html[data-theme="dark"] .master-hub-card,
html[data-theme="dark"] .master-area-hub,
html[data-theme="dark"] .weekly-selector-card,
html[data-theme="dark"] .week-board,
html[data-theme="dark"] .week-days-list,
html[data-theme="dark"] .week-day-row,
html[data-theme="dark"] .week-shift-card{
  color:#edf5ff!important;
}

/* ===== Fotos institucionales Staff globales ===== */
.staff-photo-avatar,.staff-inline-avatar,.ops-person-avatar.staff-photo,.presence-person-avatar.staff-photo{
  display:grid;place-items:center;overflow:hidden;border-radius:50%;background:linear-gradient(135deg,#267bff,#1752bd);
  color:#fff;font-weight:900;flex:0 0 auto;border:1px solid rgba(115,178,255,.22);
}
.staff-photo-avatar img,.staff-inline-avatar img,.ops-person-avatar.staff-photo img,.presence-person-avatar.staff-photo img{
  width:100%;height:100%;display:block;object-fit:cover;border-radius:inherit;background:#0b1f33;
}
.staff-inline-person{display:flex;align-items:center;gap:10px;min-width:0}
.staff-inline-avatar{width:34px;height:34px;font-size:.66rem}
.staff-inline-person-copy{min-width:0}
.staff-inline-person-copy b,.staff-inline-person-copy small{display:block}
.ops-person-avatar.staff-photo{width:46px;height:46px;border-radius:15px}
.presence-person-avatar.staff-photo{width:46px;height:46px}
.presence-table-person{display:flex;align-items:center;gap:9px}
.presence-table-person .staff-inline-avatar{width:30px;height:30px}
