:root { --sidebar-w: 240px; }
#sidebar { width: var(--sidebar-w); background: #1b1f3b !important; min-height: 100vh; transition: margin .2s; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
#wrapper.toggled #sidebar { margin-left: calc(var(--sidebar-w) * -1); }
#sidebar .nav-link { color: rgba(255,255,255,.8); border-radius: .375rem; padding: .4rem .75rem; font-size: .92rem; }
#sidebar .nav-link:hover, #sidebar .nav-link.active { color: #fff; background: rgba(255,255,255,.15); }
#sidebar .nav-header { color: rgba(255,255,255,.5); font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; padding: .9rem .75rem .25rem; }
#page-content { background: #f5f6fa; min-width: 0; }
.table-sm td, .table-sm th { vertical-align: middle; }
@media (max-width: 768px) { #sidebar { position: fixed; z-index: 1030; margin-left: calc(var(--sidebar-w) * -1); } #wrapper.toggled #sidebar { margin-left: 0; } }
.sticky-head thead th { position: sticky; top: 0; background: #fff; z-index: 1; }

/* ===== Portale utente ===== */
.app-tile { border: 1px solid #e3e6ef; border-top: 4px solid var(--app-colore, #0d6efd); border-radius: .6rem; transition: transform .15s, box-shadow .15s; }
.app-tile:hover { transform: translateY(-3px); box-shadow: 0 .6rem 1.2rem rgba(27,31,59,.12); }
.app-tile-icona { width: 52px; height: 52px; flex: 0 0 52px; border-radius: .6rem; display: flex; align-items: center; justify-content: center; font-size: 1.6rem; color: var(--app-colore, #0d6efd); background: color-mix(in srgb, var(--app-colore, #0d6efd) 12%, #fff); }
.app-tile-icona img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: .4rem; }
.app-tile .btn-app { color: #fff; background: var(--app-colore, #0d6efd); border-color: var(--app-colore, #0d6efd); }
.app-tile .btn-app:hover { filter: brightness(.92); color: #fff; }
.app-tile-bloccata { filter: grayscale(1); opacity: .6; border-top-color: #adb5bd; cursor: not-allowed; }
.app-tile-bloccata:hover { transform: none; box-shadow: none; }
.app-dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; }
.banner-carousel img { max-height: 320px; object-fit: cover; }
.news-card { transition: transform .15s, box-shadow .15s; }
.news-card:hover { transform: translateY(-2px); box-shadow: 0 .5rem 1rem rgba(27,31,59,.1); }
.news-copertina { height: 160px; object-fit: cover; }
.news-copertina-grande { max-height: 360px; object-fit: cover; }
.news-corpo img { max-width: 100%; height: auto; }
.notifica-non-letta { background: #f0f5ff; border-left: 3px solid #0d6efd; }
.badge-notifiche .badge { font-size: .65rem; }
.min-w-0 { min-width: 0; }
.login-card { border-radius: 1rem; overflow: hidden; }
.login-icona { display: inline-flex; width: 64px; height: 64px; border-radius: 50%; align-items: center; justify-content: center; font-size: 1.8rem; color: #fff; background: linear-gradient(135deg, #2d3a8c, #0d6efd); }
.login-banner img { max-height: 180px; object-fit: cover; }
