/**
 * Alice KPI shell — ispirato al KPI LAYOUT fatturazione.
 * Bootstrap 5 sotto; chrome proprio (sidebar, topbar, linguette, tile).
 */
:root {
    --alice-ink: #1a2b3c;
    --alice-muted: #5a6a7a;
    --alice-accent: #2f7ff0;
    --alice-sidebar: #15202b;
    --alice-mask: #f8f9fa;
    --alice-radius: 10px;
    --sidebar-w: 248px;
}
html, body { height: 100%; }
body.alice-kpi-shell {
    margin: 0;
    font-family: "Plus Jakarta Sans", system-ui, sans-serif;
    background: #eef2f6;
    color: var(--alice-ink);
}
#top-nav.alice-top-nav {
    position: sticky;
    top: 0;
    z-index: 1050;
    background: #1a2b3c !important;
    box-shadow: 0 4px 18px rgba(26, 43, 60, 0.2);
    padding-top: .15rem !important;
    padding-bottom: calc(.15rem + 2px) !important;
    font-family: "Plus Jakarta Sans", system-ui, sans-serif;
}
#top-nav.alice-top-nav .container-fluid {
    padding-left: 0;
    padding-right: 0;
}
#top-nav.alice-nav-guest .navbar-toggler,
#top-nav.alice-nav-guest .navbar-collapse { display: none !important; }
#top-nav .alice-nav-logo { height: 42px; width: auto; max-width: 160px; object-fit: contain; }
#top-nav .brand-sub {
    font-size: .62rem;
    font-weight: 800;
    letter-spacing: .12em;
    opacity: .45;
    color: #e8eef5;
}
#top-nav .navbar-brand {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    margin-right: .75rem;
    padding-top: 0;
    padding-bottom: 0;
    line-height: 1;
}
#top-nav .nav-link,
#top-nav .dropdown-item {
    font-family: "Plus Jakarta Sans", system-ui, sans-serif;
    font-weight: 600;
    letter-spacing: .02em;
    font-size: .8125rem;
    text-transform: none;
}
#top-nav .navbar-nav > .nav-item > .nav-link {
    color: rgba(255,255,255,.85) !important;
    border-radius: 6px;
    margin: 0 2px;
    padding: .35rem .42rem !important;
}
#top-nav .navbar-nav > .nav-item > .nav-link:hover,
#top-nav .navbar-nav > .nav-item > .nav-link.active,
#top-nav .navbar-nav > .nav-item > .nav-link.show {
    background: rgba(47, 127, 240, 0.22) !important;
    color: #fff !important;
}
#top-nav .dropdown-menu {
    border: 0;
    border-radius: 10px;
    box-shadow: 0 12px 28px rgba(26,43,60,.16);
    padding: .4rem 0;
}
#top-nav .dropdown-item {
    padding: .45rem 1rem;
    color: var(--alice-ink);
}
#top-nav .dropdown-item i { margin-right: .4rem; color: var(--alice-accent); }
#top-nav .dropdown-item:hover,
#top-nav .dropdown-item.active {
    background: rgba(47,127,240,.12);
    color: var(--alice-ink);
}
#top-nav .navbar-toggler { border-color: rgba(255,255,255,.2); }
.alice-main { margin-left: 0; min-height: calc(100% - 56px); display: flex; flex-direction: column; }
.topbar {
    position: sticky;
    top: var(--alice-nav-h, 48px);
    z-index: 1040;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 0;
    background: #fff;
    border-bottom: 1px solid #dee2e6;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.topbar .topbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}
body.fol-kpi-shell .topbar .page-title,
body.fol-kpi-shell .topbar .page-title a,
body.fol-kpi-shell-preview .topbar .page-title,
body.fol-kpi-shell-preview .topbar .page-title a,
body.alice-kpi-shell .topbar .page-title,
body.alice-kpi-shell .topbar .page-title a {
    font-family: "Plus Jakarta Sans", system-ui, sans-serif !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    letter-spacing: 0 !important;
    line-height: 1.3 !important;
    color: #6c757d !important;
    margin: 0 !important;
}
.topbar-right { display: flex; align-items: center; gap: 10px; }
.topbar-user, .fol-session-chip {
    font-family: "Plus Jakarta Sans", system-ui, sans-serif;
    font-size: 13px;
    font-weight: 700 !important;
}
.topbar-user { color: #6c757d; }
.topbar-user .topbar-user-ico,
.topbar-user .topbar-user-name {
    color: #1b8a3e;
}
.topbar-user a {
    color: #007bff;
    font-weight: 700 !important;
    text-decoration: none;
}
.topbar-user a i {
    color: #007bff;
}
.topbar-user a:hover { color: #0056b3; }
.topbar-user a:hover i { color: #0056b3; }
.content-area { padding: 20px 0; flex: 1; }
.alice-footer {
    padding: .7rem 1.4rem 1.1rem;
    font-size: .72rem;
    color: var(--alice-muted);
}
.alice-toolbar {
    position: sticky;
    top: calc(var(--alice-nav-h, 48px) + var(--alice-topbar-h, 42px));
    z-index: 1030;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .5rem 1rem;
    background: #fff;
    margin: 0 0 22px;
    padding: 12px 16px;
    border: 1px solid #e9ecef;
    border-radius: 0;
    box-shadow: 0 2px 6px rgba(0,0,0,.04);
}
.alice-toolbar-left {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .65rem 1.1rem;
    min-width: 0;
    flex: 1 1 auto;
}
.alice-toolbar-title {
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -.03em;
    color: var(--alice-ink);
    margin: 0;
}
.alice-toolbar-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .4rem;
    flex: 0 0 auto;
}
.alice-toolbar-actions .btn,
.alice-elenco-actions .btn,
.alice-filtro-shell .btn,
.alice-btn {
    font-family: "Plus Jakarta Sans", system-ui, sans-serif !important;
    font-weight: 700 !important;
    font-size: .72rem !important;
    letter-spacing: .04em !important;
    text-transform: uppercase !important;
    border-radius: 999px !important;
    padding: .45rem 1.05rem !important;
    line-height: 1.2 !important;
}
.alice-toolbar-actions .btn-secondary {
    background: #fff !important;
    color: #1a2b3c !important;
    border: 1px solid rgba(26, 43, 60, .18) !important;
}
.alice-toolbar-actions .btn-primary,
.alice-elenco-actions .btn-primary {
    background: linear-gradient(145deg, #3d8bfd, #2f6fd4) !important;
    border: none !important;
    color: #fff !important;
    box-shadow: 0 3px 10px rgba(47, 111, 212, .28) !important;
}
.alice-toolbar-actions .btn-outline-secondary,
.alice-elenco-actions .btn-outline-secondary,
.alice-filtro-shell .btn-outline-secondary {
    background: #fff !important;
    color: #5a6a7a !important;
    border: 1px solid rgba(26, 43, 60, .14) !important;
}
.fl-gamma-ico {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 18px !important;
    height: 18px !important;
    line-height: 0 !important;
}
.fl-gamma-ico svg { width: 18px !important; height: 18px !important; display: block; }
.alice-mask {
    background: var(--alice-mask);
    border: 1px solid rgba(26,43,60,.12);
    border-radius: 0 var(--alice-radius) var(--alice-radius) var(--alice-radius);
    padding: 1.1rem 1.15rem;
}
.alice-panel-tabs { display: flex; gap: 4px; border-bottom: 1px solid rgba(26,43,60,.12); }
.alice-panel-tab {
    display: inline-flex;
    align-items: center;
    height: 30px;
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--alice-ink);
    padding: 0 .95rem;
    border: 1px solid rgba(26,43,60,.14);
    border-bottom: none;
    border-radius: 10px 10px 0 0;
    background: linear-gradient(180deg, #f7f9fb 0%, #eef2f6 100%);
    text-decoration: none;
}
.alice-panel-tab.active, .alice-panel-tab:hover {
    background: #fff;
    color: var(--alice-accent);
}
.alice-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
    gap: 12px;
}
.alice-tile {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    min-height: 108px;
    padding: 16px;
    background: #fff;
    border: 1px solid rgba(26,43,60,.1);
    border-radius: 16px;
    text-decoration: none;
    color: var(--alice-ink);
    box-shadow: 0 8px 20px rgba(26,43,60,.04);
    transition: transform .12s ease, box-shadow .12s ease;
}
.alice-tile:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(26,43,60,.1);
    color: var(--alice-ink);
}
.alice-tile i { font-size: 1.45rem; color: var(--alice-accent); }
.alice-tile span { font-size: .78rem; font-weight: 700; letter-spacing: -.01em; line-height: 1.25; }
.alice-home-grid {
    display: grid;
    grid-template-columns: 1.4fr .9fr;
    gap: 18px;
}
@media (max-width: 992px) {
    .alice-home-grid { grid-template-columns: 1fr; }
    #top-nav .navbar-collapse {
        background: #15202b;
        margin: .5rem -1rem -.35rem;
        padding: .5rem 1rem 1rem;
        border-radius: 0 0 12px 12px;
    }
}
.alice-card {
    background: #fff;
    border: 1px solid rgba(26,43,60,.1);
    border-radius: 16px;
    padding: 1rem 1.1rem;
    box-shadow: 0 8px 20px rgba(26,43,60,.04);
}
.alice-card h2 {
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--alice-muted);
    margin-bottom: .8rem;
}
.scadenza-row {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    padding: .45rem 0;
    border-bottom: 1px solid rgba(26,43,60,.06);
    font-size: .82rem;
    text-decoration: none;
    color: inherit;
}
.scadenza-row:last-child { border-bottom: 0; }
.badge-stato { border-radius: 999px; font-weight: 700; font-size: .68rem; letter-spacing: .04em; text-transform: uppercase; padding: .28rem .55rem; }
.stato-in_corso { background: #e8f4ff; color: #1d5bb8; }
.stato-in_dimissione { background: #fff4d6; color: #8a6a00; }
.stato-chiuso { background: #eceff3; color: #4a5560; }
.stato-scadute { background: #fde8e8; color: #b42318; }
.stato-in_scadenza { background: #fff4d6; color: #8a6a00; }
.stato-aperte { background: #e7f7ee; color: #177245; }
.stato-chiuse { background: #e8f1fb; color: #2f5fa8; }
.alice-table { font-size: .84rem; }
.alice-table thead th {
    font-size: .68rem;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--alice-muted);
    border-bottom-color: rgba(26,43,60,.12);
}
.doc-label { font-size: .72rem; font-weight: 700; color: var(--alice-muted); margin-bottom: .2rem; }
.alice-group { font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: var(--alice-muted); margin: 1.15rem 0 .45rem; font-weight: 700; }
.alice-diario-zero { color: #b42318; font-weight: 700; }
.form-control, .form-select { border-color: rgba(26,43,60,.14); }
.form-control:focus, .form-select:focus { border-color: #2f7ff0; box-shadow: 0 0 0 .2rem rgba(47,127,240,.15); }
.fse-timeline { list-style: none; padding: 0; margin: 0; }
.fse-timeline li {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    padding: .55rem .2rem;
    border-bottom: 1px solid rgba(26,43,60,.06);
    font-size: .82rem;
}
.fse-timeline .done { font-weight: 700; color: var(--alice-ink); }
.fse-timeline .todo { color: #9aa7b4; }
.login-wrap {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 420px 1fr;
    margin: 0;
    font-family: "Plus Jakarta Sans", system-ui, sans-serif;
}
.login-side {
    background: linear-gradient(180deg, #15202b 0%, #1a2b3c 55%, #1e3348 100%);
    color: #e8eef5;
    padding: 48px 40px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.login-side h1 { font-weight: 800; letter-spacing: -.03em; font-size: 2rem; }
.login-side p { opacity: .7; }
.login-form-col {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eef2f6;
}
.login-card {
    width: min(420px, 92vw);
    background: #fff;
    border-radius: 18px;
    padding: 2rem 1.6rem;
    box-shadow: 0 16px 40px rgba(26,43,60,.08);
}
#top-nav .nav-link i,
#top-nav .dropdown-item i {
    margin-right: .35rem;
}
.alice-page {
    margin: 0;
    width: 100%;
    max-width: none;
}
/* Binario KPI: menu, prima e seconda toolbar, contenuto sulla stessa verticale. */
body.alice-kpi-shell.alice-menu-top.alice-width-default #top-nav.alice-top-nav,
body.alice-kpi-shell.alice-menu-top.alice-width-default .topbar,
body.alice-kpi-shell.alice-menu-top.alice-width-default .content-area,
body.alice-kpi-shell.alice-menu-side.alice-width-default .topbar,
body.alice-kpi-shell.alice-menu-side.alice-width-default .content-area {
    padding-left: calc((100% - 75%) / 2) !important;
    padding-right: calc((100% - 75%) / 2) !important;
}
body.alice-kpi-shell.alice-width-default .topbar { padding-right: calc((100% - 75%) / 2 - 10px) !important; }
body.alice-kpi-shell.alice-menu-top.alice-width-media #top-nav.alice-top-nav,
body.alice-kpi-shell.alice-menu-top.alice-width-media .topbar,
body.alice-kpi-shell.alice-menu-top.alice-width-media .content-area,
body.alice-kpi-shell.alice-menu-side.alice-width-media .topbar,
body.alice-kpi-shell.alice-menu-side.alice-width-media .content-area {
    padding-left: calc((100% - 80%) / 2) !important;
    padding-right: calc((100% - 80%) / 2) !important;
}
body.alice-kpi-shell.alice-width-media .topbar { padding-right: calc((100% - 80%) / 2 - 10px) !important; }
body.alice-kpi-shell.alice-menu-top.alice-width-larga #top-nav.alice-top-nav,
body.alice-kpi-shell.alice-menu-top.alice-width-larga .topbar,
body.alice-kpi-shell.alice-menu-top.alice-width-larga .content-area,
body.alice-kpi-shell.alice-menu-side.alice-width-larga .topbar,
body.alice-kpi-shell.alice-menu-side.alice-width-larga .content-area {
    padding-left: calc((100% - 87%) / 2) !important;
    padding-right: calc((100% - 87%) / 2) !important;
}
body.alice-kpi-shell.alice-width-larga .topbar { padding-right: calc((100% - 87%) / 2 - 10px) !important; }
body.alice-kpi-shell.alice-menu-top.alice-width-intera #top-nav.alice-top-nav,
body.alice-kpi-shell.alice-menu-top.alice-width-intera .topbar,
body.alice-kpi-shell.alice-menu-top.alice-width-intera .content-area,
body.alice-kpi-shell.alice-menu-side.alice-width-intera .topbar,
body.alice-kpi-shell.alice-menu-side.alice-width-intera .content-area {
    padding-left: calc((100% - 95%) / 2) !important;
    padding-right: calc((100% - 95%) / 2) !important;
}
body.alice-kpi-shell.alice-width-intera .topbar { padding-right: calc((100% - 95%) / 2 - 10px) !important; }
body.alice-kpi-shell.alice-menu-top #top-nav.alice-top-nav {
    padding-top: .15rem !important;
    padding-bottom: calc(.15rem + 2px) !important;
}
body.alice-kpi-shell .topbar { padding-top: 10px !important; padding-bottom: 10px !important; }
body.alice-kpi-shell .content-area { padding-top: 20px !important; padding-bottom: 20px !important; }
body.alice-width-default #top-nav .nav-link,
body.alice-width-default #top-nav .dropdown-item {
    font-size: calc(.8125rem - 1px);
}
@media (max-width: 992px) {
    body.alice-kpi-shell.alice-menu-top #top-nav.alice-top-nav,
    body.alice-kpi-shell .topbar,
    body.alice-kpi-shell .content-area {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
}
body.alice-bg-default .content-area { background: #eef2f6; }
body.alice-bg-classico .content-area {
    background-color: #f3f5f8;
    background-image:
        linear-gradient(rgba(26,43,60,.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(26,43,60,.045) 1px, transparent 1px);
    background-size: 18px 18px;
}
body.alice-bg-scuro .content-area { background: #1a2b3c; }
body.alice-bg-scuro .alice-footer,
body.alice-bg-scuro .topbar .page-title { color: #e8eef5; }
body.alice-bg-scuro .topbar {
    background: #15202b;
    border-bottom-color: rgba(255,255,255,.08);
}
body.alice-bg-scuro .topbar-user,
body.alice-bg-scuro .fol-session-chip { color: rgba(232,238,245,.7); }
body.alice-menu-side #sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--sidebar-w);
    background: linear-gradient(180deg, #15202b 0%, #1a2b3c 55%, #1e3348 100%);
    color: #e8eef5;
    box-shadow: 4px 0 24px rgba(26, 43, 60, 0.18);
    overflow-y: auto;
    z-index: 40;
}
body.alice-menu-side #sidebar .sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 16px 14px;
    border-bottom: 1px solid rgba(255,255,255,.06);
    text-decoration: none;
    color: inherit;
}
body.alice-menu-side #sidebar .alice-nav-logo { height: 42px; width: auto; max-width: 160px; }
body.alice-menu-side #sidebar nav ul { list-style: none; margin: 8px 0 24px; padding: 0; }
body.alice-menu-side #sidebar nav ul li > a {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 8px 1px;
    padding: 7px 14px;
    border-radius: 8px;
    color: rgba(232,238,245,.78);
    font-size: .75rem;
    font-weight: 600;
    text-decoration: none;
}
body.alice-menu-side #sidebar nav ul li > a:hover {
    background: rgba(47, 127, 240, 0.14);
    color: #fff;
}
body.alice-menu-side #sidebar nav ul li > a.active {
    background: #2f7ff0;
    color: #fff;
    box-shadow: 0 6px 16px rgba(47, 127, 240, 0.35);
    font-weight: 700;
}
body.alice-menu-side #sidebar .nav-section {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .62rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: rgba(232,238,245,.42);
    padding: .85rem 22px .25rem;
}
body.alice-menu-side .alice-main { margin-left: var(--sidebar-w); }
.login-in-app {
    min-height: 52vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 0 3rem;
}
.alert-consensi { background: #fde8ef; border: 1px solid #f3c0d0; color: #8a2048; border-radius: 10px; padding: .7rem 1rem; font-size: .84rem; }
.ldo-sheet { font-family: Tahoma, sans-serif; font-size: .92rem; color: #1a1a1a; }
.ldo-kicker { font-weight: 700; color: #1d4f7a; margin-bottom: .4rem; }
.ldo-title { font-weight: 700; text-align: center; margin: .8rem 0; }
.ldo-box { border-collapse: collapse; width: 100%; margin-bottom: .8rem; }
.ldo-box th, .ldo-box td { border: 1px solid #333; padding: .35rem .6rem; }
.ldo-box th { background: #bfbfbf; width: 40%; text-align: center; }
.ldo-pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: .6rem; margin: .6rem 0; }
.ldo-card { border: 1px solid #333; padding: .45rem .6rem .55rem; }
.ldo-card-h { background: #bfbfbf; font-weight: 700; text-align: center; margin: -.45rem -.6rem .45rem; padding: .3rem; }
.ldo-sec { font-weight: 700; margin: .9rem 0 .25rem; }
.ldo-body { white-space: pre-wrap; margin-bottom: .4rem; }
.ldo-firme { margin-top: 1.2rem; font-size: .85rem; }
.ldo-prefill {
    background: #f6f8fb;
    border: 1px solid #d5dde8;
    border-radius: 10px;
    padding: .6rem 1rem .85rem;
    font-size: .84rem;
}
.ldo-steps {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
    list-style: none;
    margin: 0 0 .55rem;
    padding: 0;
}
.ldo-steps li {
    flex: 1 1 160px;
    background: #fff;
    border: 1px solid #d5dde8;
    border-radius: 10px;
    padding: .45rem .7rem;
    font-size: .78rem;
    font-weight: 700;
    color: #7a8794;
}
.ldo-steps li.current { border-color: #2f7ff0; color: #1d4f7a; background: #eef5ff; }
.ldo-steps li.done { border-color: #9ad0b0; color: #177245; background: #eef8f2; }
.ldo-next {
    font-size: .88rem;
    margin: 0 0 .85rem;
    color: #1a2b3c;
}
.fse-sign-box {
    background: #fff;
    border: 1px solid #c5d8f5;
    border-radius: 12px;
    padding: 1rem 1.1rem 1.15rem;
    margin-bottom: 1rem;
}
.fse-sign-box h3 {
    font-size: 1.05rem;
    margin: 0 0 .55rem;
}
.fse-sign-box ol {
    margin: 0 0 .9rem;
    padding-left: 1.2rem;
    font-size: .88rem;
    color: #1a2b3c;
}
.fse-sign-box ol li { margin-bottom: .28rem; }
.fse-sign-upload {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    align-items: center;
    margin-top: .75rem;
}
.ldo-prefill summary { cursor: pointer; font-weight: 600; color: #1d4f7a; }
.ldo-prefill-body {
    white-space: pre-wrap;
    background: #fff;
    border: 1px solid #e4eaf1;
    border-radius: 6px;
    padding: .4rem .55rem;
    min-height: 2.4rem;
}
@media (max-width: 800px) {
    .login-wrap { grid-template-columns: 1fr; }
    .login-side { min-height: 180px; padding: 28px; }
}
.att-week {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
}
.att-week-day {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: .45rem .2rem;
    background: #fff;
    border: 1px solid rgba(26,43,60,.1);
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
}
.att-week-day span { font-size: .68rem; text-transform: uppercase; letter-spacing: .06em; color: var(--alice-muted); font-weight: 700; }
.att-week-day strong { font-size: 1.05rem; }
.att-week-day.is-on { border-color: #2f7ff0; background: #e8f1ff; }
.att-week-day.is-oggi span { color: #2f7ff0; }
.att-board {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 16px;
}
.att-col {
    background: #fff;
    border: 1px solid rgba(26,43,60,.1);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(26,43,60,.04);
    min-height: 280px;
}
.att-col-h {
    padding: .7rem 1rem;
    color: #fff;
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .07em;
    text-transform: uppercase;
}
.att-edu { background: #d97706; }
.att-inf { background: #2f5fa8; }
.att-oss { background: #2e7d4f; }
.att-col-body { padding: .55rem; }
.att-card {
    display: block;
    text-decoration: none;
    color: inherit;
    background: #f6f8fb;
    border-radius: 12px;
    padding: .7rem .8rem;
    margin-bottom: .5rem;
    border-left: 4px solid #c5ced8;
}
.att-card:hover { background: #eef3f8; }
.att-board .att-col:nth-child(1) .att-card { border-left-color: #d97706; }
.att-board .att-col:nth-child(2) .att-card { border-left-color: #2f5fa8; }
.att-board .att-col:nth-child(3) .att-card { border-left-color: #2e7d4f; }
.att-card.is-open { box-shadow: inset 0 0 0 2px rgba(47,127,240,.35); background: #fff; }
.att-time { font-size: .78rem; font-weight: 800; color: var(--alice-ink); }
.att-title { font-size: .92rem; font-weight: 700; margin: .15rem 0 .2rem; }
.att-meta { font-size: .75rem; color: var(--alice-muted); }
.att-ospiti {
    background: #fff;
    border: 1px dashed rgba(26,43,60,.14);
    border-radius: 10px;
    padding: .55rem;
    margin: -.2rem 0 .65rem;
}
.att-ospite { margin-bottom: .55rem; padding-bottom: .55rem; border-bottom: 1px solid rgba(26,43,60,.06); }
.att-ospite:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: 0; }
.att-ospite-name { font-size: .82rem; font-weight: 700; margin-bottom: .3rem; display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; }
.att-ospite-act { display: flex; flex-wrap: wrap; gap: .35rem; }
.att-multi {
    border: 1px solid rgba(26,43,60,.14);
    border-radius: 10px;
    background: #fff;
}
.att-multi-all { display: block; padding: .45rem .7rem; border-bottom: 1px solid rgba(26,43,60,.08); font-size: .8rem; font-weight: 700; }
.att-multi-list {
    max-height: 220px;
    overflow: auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: .15rem .8rem;
    padding: .45rem .7rem .6rem;
}
.att-multi-list label { font-size: .84rem; display: flex; gap: .4rem; align-items: center; }
@media (max-width: 992px) {
    .att-board, .att-week { grid-template-columns: 1fr; }
}
.prog-list { display: flex; flex-direction: column; gap: .5rem; }
.prog-row {
    display: grid;
    grid-template-columns: 90px 1fr auto;
    gap: .6rem;
    align-items: center;
    background: #fff;
    border: 1px solid rgba(26,43,60,.1);
    border-left: 4px solid #c5ced8;
    border-radius: 12px;
    padding: .65rem .8rem;
}
.prog-row.is-edu { border-left-color: #d97706; }
.prog-row.is-inf { border-left-color: #2f5fa8; }
.prog-row.is-oss { border-left-color: #2e7d4f; }
.prog-row.is-ter { border-left-color: #7c3aed; }
@media (max-width: 700px) {
    .prog-row { grid-template-columns: 1fr; }
}

/* Scheda edit + listati nested (U.O. / reparti): linguette pagina, elenco, azioni riga. */
.alice-edit-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    border-bottom: 1px solid rgba(26, 43, 60, .12);
    margin-bottom: 0;
}
.alice-edit-tab {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    height: 34px;
    padding: 0 .95rem;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--alice-ink);
    background: #eef2f6;
    border: 1px solid rgba(26, 43, 60, .10);
    border-bottom: none;
    border-radius: 6px 6px 0 0;
}
.alice-edit-tab i { color: var(--alice-accent); }
.alice-edit-tab:hover { background: #e4e9ef; color: var(--alice-ink); }
.alice-edit-tab.active {
    background: linear-gradient(145deg, #243447, #1a2b3c);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(26, 43, 60, .22);
    position: relative;
    z-index: 2;
    margin-bottom: -1px;
}
.alice-edit-tab.active i { color: #7eb6ff; }
.alice-edit-body {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, .125);
    border-top: 1px solid rgba(0, 0, 0, .125);
    border-radius: 0 6px 6px 6px;
    margin-top: -1px;
    padding: 1rem 1.05rem 1.15rem;
}
.alice-riquadro { margin-bottom: 1.05rem; }
.alice-edit-body .alice-elenco-shell { margin-top: .15rem; }
.alice-riquadro:last-child { margin-bottom: 0; }
.alice-riquadro .alice-panel-tabs {
    gap: 0;
    border-bottom: none;
}
.alice-riquadro .alice-panel-tab,
.alice-riquadro .alice-panel-tab.active,
.alice-riquadro .alice-panel-tab:hover {
    height: auto;
    color: #6c757d;
    background: #eef2f6;
    border: 1px solid rgba(0, 0, 0, .125);
    border-bottom: none;
    border-radius: .25rem .25rem 0 0;
    padding: .4rem .85rem;
}
.alice-riquadro .alice-panel-tab.active {
    background: #f8f9fa;
    color: #495057;
    border-color: rgba(0, 0, 0, .125) rgba(0, 0, 0, .125) transparent;
    margin-bottom: -1px;
    position: relative;
    z-index: 2;
}
.alice-riquadro .alice-panel-tab i { color: #2f7ff0; }
.alice-riquadro .alice-mask {
    margin-top: -1px;
    border-top-left-radius: 0;
}
.alice-hint {
    margin-top: .7rem;
    font-size: .8rem;
    color: var(--alice-muted);
}
.alice-filtro-shell .doc-label,
.alice-filtro-shell label {
    font-size: .72rem;
    text-transform: uppercase;
    color: #1a2b3c;
    font-weight: 700;
    letter-spacing: .04em;
    margin-bottom: .4rem;
}
.alice-filtro-shell .form-control-sm,
.alice-filtro-shell .form-select-sm {
    height: 31px;
    border-radius: 8px;
    border-color: rgba(26, 43, 60, .16);
}
.alice-edit-body-list {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 1rem 0 0;
}
.alice-elenco-shell { margin-bottom: 1rem; }
.alice-elenco-tabs-row {
    display: flex;
    flex-wrap: nowrap;
    align-items: flex-end;
    justify-content: space-between;
    width: 100%;
    gap: .75rem;
    border-bottom: 1px solid rgba(26, 43, 60, .12);
    margin: 0;
    padding: 0;
}
.alice-elenco-shell .alice-panel-tabs {
    display: flex;
    gap: 0;
    border-bottom: none;
}
.alice-elenco-shell .alice-panel-tab,
.alice-elenco-shell .alice-panel-tab.active,
.alice-elenco-shell .alice-panel-tab:hover {
    display: inline-flex;
    align-items: center;
    box-sizing: border-box;
    height: 30px;
    font-size: .72rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #1a2b3c;
    padding: 0 .95rem;
    border: 1px solid rgba(26, 43, 60, .14);
    border-bottom: none;
    border-radius: 10px 10px 0 0;
    background: linear-gradient(180deg, #f7f9fb 0%, #eef2f6 100%);
    margin-bottom: -1px;
    position: relative;
    z-index: 3;
}
.alice-elenco-shell .alice-panel-tab i { color: #2f7ff0; }
.alice-elenco-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .4rem;
    margin-left: auto;
    margin-right: 1px;
    margin-bottom: 2px;
}
.alice-elenco-bar {
    background: #fff;
    border: 1px solid rgba(26, 43, 60, .12);
    border-top: none;
    border-radius: 0 0 12px 12px;
    padding: .85rem 1rem 1rem;
    box-shadow: 0 8px 22px rgba(26, 43, 60, .08);
}
.alice-elenco-totali {
    font-size: .8rem;
    color: var(--alice-muted);
    margin-bottom: .55rem;
}
.alice-elenco-table thead th,
.alice-elenco-table tbody td {
    padding: .4rem .65rem;
    vertical-align: middle;
    text-align: left;
}
.alice-elenco-table thead th {
    background: linear-gradient(180deg, #243447, #1a2b3c);
    color: #fff;
    border-bottom: 0;
    font-size: .68rem;
    letter-spacing: .06em;
    text-transform: uppercase;
    font-weight: 700;
    white-space: nowrap;
}
.alice-elenco-table thead th.no-sort,
.alice-elenco-table tbody td.fatt-td-azioni {
    text-align: right;
}
.alice-elenco-table tbody tr:nth-child(even) { background: #f7f9fb; }
.alice-elenco-nome { font-weight: 700; }
.alice-inline-del {
    display: inline-flex;
    vertical-align: middle;
    margin: 0;
}
.alice-elenco-shell td.fatt-td-azioni {
    white-space: nowrap;
    vertical-align: middle;
    text-align: right;
}
.alice-elenco-shell td.fatt-td-azioni > a.btn,
.alice-elenco-shell td.fatt-td-azioni .alice-inline-del {
    vertical-align: middle;
}
.alice-elenco-shell td.fatt-td-azioni > a.btn,
.alice-elenco-shell td.fatt-td-azioni > button.btn,
.alice-elenco-shell td.fatt-td-azioni .alice-inline-del .btn {
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    margin: 0 .25rem 0 0;
    padding: 0;
    border-radius: 4px;
    border: 1px solid rgba(26, 43, 60, .12);
    background: #f4f7fa;
    color: #1a2b3c;
    line-height: 0;
    text-transform: none;
    letter-spacing: 0;
    font-size: inherit;
}
.alice-elenco-shell td.fatt-td-azioni > a.btn:last-child,
.alice-elenco-shell td.fatt-td-azioni .alice-inline-del:last-child .btn {
    margin-right: 0;
}
.alice-elenco-shell td.fatt-td-azioni > a.btn:hover,
.alice-elenco-shell td.fatt-td-azioni > button.btn:hover,
.alice-elenco-shell td.fatt-td-azioni .alice-inline-del .btn:hover {
    background: #1a2b3c;
    border-color: #1a2b3c;
    color: #fff;
}
.alice-elenco-shell td.fatt-td-azioni .btn-gamma-edit {
    color: #fff;
    background: #2f7ff0;
    border-color: #2f7ff0;
}
.alice-elenco-shell td.fatt-td-azioni .btn-gamma-edit:hover {
    color: #2f7ff0;
    background: #fff;
    border-color: rgba(47, 127, 240, .45);
}
.alice-elenco-shell td.fatt-td-azioni .btn-gamma-del {
    color: #fff;
    background: #e03535;
    border-color: #e03535;
}
.alice-elenco-shell td.fatt-td-azioni .btn-gamma-del:hover {
    color: #e03535;
    background: #fff;
    border-color: rgba(224, 53, 53, .45);
}
