:root{--caritas-red:#c8102e;--caritas-red-dark:#9d0d24;--ink:#111;--muted:#666;--bg:#f5f5f5;--line:#dedede;--sidebar-width:260px}
*{box-sizing:border-box}body{background:var(--bg);color:var(--ink)}.app-shell{min-height:100vh}.sidebar{position:fixed;inset:0 auto 0 0;width:var(--sidebar-width);background:var(--ink);color:#fff;display:flex;flex-direction:column;z-index:1040;overflow-y:auto}.brand{height:175px;min-height:175px;display:flex;align-items:center;justify-content:center;padding:6px 15px;color:#fff;overflow:hidden}.brand-logo{display:block;width:230px;height:auto;max-width:none;flex:0 0 auto;filter:grayscale(1) brightness(0) invert(1)}.nav-section{padding:18px 24px 8px;color:#aaa;font-size:.7rem;font-weight:700;letter-spacing:.12em}.sidebar .nav-link{margin:2px 12px;padding:11px 14px;border-radius:8px;color:#ddd}.sidebar .nav-link i{width:26px;display:inline-block}.sidebar .nav-link:hover{background:#333;color:#fff}.sidebar .nav-link.active{background:var(--caritas-red);color:#fff;font-weight:600}.sidebar-footer{margin-top:auto;padding:20px 24px;border-top:1px solid #333}.sidebar-footer small{display:block;margin-top:4px;color:#aaa;line-height:1.35}.main-content{margin-left:var(--sidebar-width);min-height:100vh}.topbar{height:76px;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 30px}.content-wrap{padding:30px}.app-footer{padding:20px 30px;color:var(--muted);font-size:.85rem}.card{border:0;border-radius:10px;box-shadow:0 3px 16px rgba(0,0,0,.07)}.btn-primary{background:var(--caritas-red);border-color:var(--caritas-red)}.btn-primary:hover{background:var(--caritas-red-dark);border-color:var(--caritas-red-dark)}.text-primary{color:var(--caritas-red)!important}.stat-icon{width:48px;height:48px;display:grid;place-items:center;border-radius:8px;background:#f7dfe4;color:var(--caritas-red);font-size:1.35rem}.table>:not(caption)>*>*{padding:.9rem}.badge-soft{background:#f7dfe4;color:var(--caritas-red)}.form-check-input:checked{background-color:var(--caritas-red);border-color:var(--caritas-red)}.volunteer-timeline{position:relative}.timeline-event{display:grid;grid-template-columns:38px 1fr;gap:12px;position:relative;padding-bottom:22px}.timeline-event:last-child{padding-bottom:0}.timeline-event:not(:last-child)::before{content:"";position:absolute;left:18px;top:36px;bottom:0;width:2px;background:#ddd}.timeline-icon{width:38px;height:38px;border-radius:50%;display:grid;place-items:center;background:#f7dfe4;color:var(--caritas-red);z-index:1}.access-brand{display:flex;flex-direction:row;align-items:center;justify-content:flex-start;gap:14px;text-align:left;color:var(--caritas-red);font-size:1.15rem}.access-brand img{display:block;width:90px;height:82px;object-fit:contain;object-position:left center;flex:0 0 auto}.stat-link{transition:transform .18s ease,box-shadow .18s ease}.stat-link:hover{transform:translateY(-3px);box-shadow:0 8px 24px rgba(0,0,0,.14)}.dashboard-progress{height:9px;background:#e5e5e5}.documentation-summary{background:#f7dfe4}.documentation-ring{--progress:0;width:64px;height:64px;border-radius:50%;display:grid;place-items:center;background:conic-gradient(var(--caritas-red) calc(var(--progress)*1%),#ddd 0);position:relative;flex:0 0 auto}.documentation-ring::before{content:"";position:absolute;inset:7px;border-radius:50%;background:#fff}.documentation-ring span{position:relative;z-index:1;font-size:.8rem;font-weight:700;color:var(--caritas-red)}.dashboard-alerts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.dashboard-alerts>a{transition:transform .16s ease,box-shadow .16s ease}.dashboard-alerts>a:hover{transform:translateY(-2px);box-shadow:0 5px 14px rgba(0,0,0,.1)}.dashboard-notice{display:flex;align-items:center;gap:12px;color:var(--ink);border:1px solid #ddd}.dashboard-notice .notice-icon{width:42px;height:42px;border-radius:8px;display:grid;place-items:center;font-size:1.15rem;flex:0 0 auto;background:#f7dfe4;color:var(--caritas-red)}.dashboard-notice strong{display:block;font-size:1.2rem;line-height:1}.dashboard-notice small{display:block;margin-top:4px;color:var(--muted)}.notice-warning,.notice-attention,.notice-danger{background:#fff;border-color:#ddd}.notice-warning .notice-icon,.notice-attention .notice-icon,.notice-danger .notice-icon{background:#f7dfe4;color:var(--caritas-red)}
.sidebar{background:var(--caritas-red);color:#fff}.sidebar .nav-section{color:rgba(255,255,255,.78)}.sidebar .nav-link{color:#fff}.sidebar .nav-link:hover{background:var(--caritas-red-dark);color:#fff}.sidebar .nav-link.active{background:#fff;color:var(--caritas-red)}.sidebar-footer{border-top-color:rgba(255,255,255,.3)}.sidebar-footer small{color:rgba(255,255,255,.82)}
.card.p-4.mb-4{border:2px solid rgba(200,16,46,.42)}.card>h2.h5,.card .section-title{color:var(--caritas-red-dark);font-size:1.25rem;font-weight:750;background:linear-gradient(90deg,rgba(176,0,32,.09),transparent);border-bottom:2px solid rgba(176,0,32,.3);border-radius:5px;padding:.7rem .85rem;margin-left:-.25rem;margin-right:-.25rem}.subsection-title,.card h3.h6{color:#222!important;font-size:.98rem;font-weight:750;background:#f1f1f1;border-left:5px solid var(--caritas-red);border-bottom:1px solid #cfcfcf!important;border-radius:4px;padding:.65rem .85rem!important;margin-top:.65rem!important}
select option[data-activo="1"]{display:none}

/* Navegación adaptable: el panel se superpone solo en pantallas estrechas. */
.menu-toggle,.sidebar-close,.sidebar-backdrop{display:none}
@media (max-width:991.98px){
  .main-content{margin-left:0;min-width:0}
  .topbar{padding:0 16px;gap:12px}
  .topbar>div{min-width:0}
  .topbar>div strong,.topbar>div small{max-width:42vw;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .content-wrap{padding:20px 16px}
  .app-footer{padding:18px 16px}
  .menu-toggle{display:inline-flex;align-items:center;gap:6px;white-space:nowrap}
  .menu-toggle .bi{font-size:1.2rem;line-height:1}
  .sidebar{width:min(300px,calc(100vw - 48px));transform:translateX(-100%);visibility:hidden;transition:transform .22s ease,visibility .22s ease;z-index:1051;box-shadow:10px 0 28px rgba(0,0,0,.14)}
  .sidebar.is-open{transform:translateX(0);visibility:visible}
  .sidebar-backdrop:not([hidden]){display:block;position:fixed;inset:0;z-index:1050;background:rgba(0,0,0,.48);border:0;padding:0}
  .sidebar-close{display:grid;place-items:center;position:absolute;top:12px;right:12px;width:40px;height:40px;border:0;border-radius:8px;background:rgba(255,255,255,.18);color:#fff}
  .sidebar-close:hover,.sidebar-close:focus-visible{background:rgba(255,255,255,.3)}
  body.sidebar-open{overflow:hidden}
}
@media (max-width:575.98px){
  .topbar{height:64px}
  .topbar>div{gap:8px!important}
  .topbar>div strong,.topbar>div small{max-width:36vw;font-size:.75rem}
  .content-wrap{padding:16px 12px}
}
@media (prefers-reduced-motion:reduce){.sidebar{transition:none}}
.topbar>div:last-child{margin-left:auto}
/* Las pantallas aprovechan la cabecera para dejar más espacio al contenido. */
.topbar-with-heading{gap:20px;height:auto;min-height:76px;padding-top:10px;padding-bottom:10px}
.topbar-heading{min-width:0;flex:1;overflow-wrap:anywhere}
.topbar-heading h1{font-size:1.35rem;line-height:1.2;margin:0 0 3px}
.topbar-heading p{font-size:.85rem;line-height:1.35;color:var(--muted);margin:0}
@media (max-width:767.98px){
  .topbar-with-heading{flex-wrap:wrap;gap:10px}
  .topbar-with-heading .topbar-heading{order:3;flex:0 0 100%}
  .topbar-heading h1{font-size:1.15rem}
  .topbar-heading p{font-size:.8rem}
}
.informe-comparador{height:230px;overflow-x:auto;overflow-y:hidden;display:flex;border-bottom:1px solid #dee2e6;background:repeating-linear-gradient(to top,transparent 0,transparent 49px,#edf0f2 50px)}
.informe-opciones{position:relative;z-index:3}
.informe-opciones-panel{position:absolute;right:0;width:min(560px,calc(100vw - 48px));max-height:350px;overflow:auto;box-shadow:0 12px 25px rgba(0,0,0,.14)}
.informe-opcion-categoria{max-width:230px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.informe-leyenda-dimensiones{display:flex;flex-wrap:wrap;gap:12px}
.informe-leyenda-item:before{content:"";display:inline-block;width:10px;height:10px;margin-right:5px;border-radius:2px;background:currentColor}
.informe-columnas{display:grid;grid-template-columns:repeat(var(--numero-columnas),minmax(64px,1fr));gap:10px;width:max(100%,calc(var(--numero-columnas)*74px));height:100%;align-items:end}
.informe-columna{height:100%;min-width:0;display:flex;flex-direction:column;justify-content:end;align-items:center}
.informe-barras{height:185px;width:100%;display:flex;align-items:end;justify-content:center;gap:3px;border-bottom:1px solid #bfc5cc}
.informe-barra-vertical{position:relative;width:50%;max-width:36px;min-height:0;border-radius:3px 3px 0 0;background:currentColor}
.informe-valor-barra{position:absolute;bottom:100%;left:50%;transform:translateX(-50%);padding-bottom:3px;color:#343a40;font-size:.7rem;font-weight:700;line-height:1;white-space:nowrap}
.informe-color-edad{color:#b00020}
.informe-color-localidad{color:#2879a6}
.informe-color-programa{color:#7b56a7}
.informe-color-actividad{color:#278769}
.informe-columna-etiqueta{display:block;width:100%;height:42px;padding-top:5px;text-align:center;font-size:.72rem;line-height:1.1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

/* Gestión por ámbitos y navegación de fichas. */
.mi-ambito{border-top:4px solid var(--caritas-red,#b00020);box-shadow:0 5px 20px rgba(30,40,50,.04)}
.mi-ambito a.border:hover{background:#fff8f9;border-color:var(--caritas-red,#b00020)!important}
.table-responsive{overscroll-behavior-x:contain}
.table th{vertical-align:middle}
.table td a:focus-visible,.btn:focus-visible,summary:focus-visible{outline:3px solid #b00020;outline-offset:3px}
#datos-personales,#documentacion,#programas,#historial{scroll-margin-top:90px}
@media(max-width:767.98px){
  .content-wrap>.d-flex{flex-wrap:wrap;gap:12px}
  .table td,.table th{padding:12px;min-width:90px}
  .mi-ambito .fs-3{font-size:1.6rem!important}
}
.notification-button{width:2.5rem;height:2.5rem;border-radius:50%;display:grid;place-items:center}.notification-count{position:absolute;top:-.35rem;right:-.45rem;min-width:1.25rem;height:1.25rem;padding:0 .3rem;border-radius:1rem;background:var(--caritas-red);color:#fff;font-size:.68rem;font-weight:700;display:grid;place-items:center;border:2px solid #fff}.notification-menu{width:min(24rem,calc(100vw - 2rem));max-height:70vh;overflow:auto}.notification-menu .dropdown-item{white-space:normal;border-bottom:1px solid var(--bs-border-color)}
.min-w-0 {
    min-width: 0;
}
