/* Calendari operativi — layout condiviso (docenze, hub, sicurezza, attrezzature) */
.tec-calendario-docenze,
.tec-calendario-agenda,
.tec-calendario-hub,
.tec-calendario-sicurezza,
.tec-calendario-attrezzature,
.tec-calendario-presenze {
    --tec-sidebar: #2F3437;
    --tec-primary: #1FA3B3;
    --tec-primary-dark: #167d8a;
    --tec-primary-soft: #E8F7FA;
    --tec-hub: #64288F;
    --tec-hub-dark: #4a1d68;
    --tec-hub-soft: #F3EBF8;
    --tec-sicurezza: #FE940D;
    --tec-sicurezza-dark: #d67d00;
    --tec-sicurezza-soft: #FFF6E8;
    --tec-red: #FF1313;
    --tec-red-dark: #cc0f0f;
    --tec-red-soft: #FFF1F1;
    --tec-bg: #F4F7FA;
    --tec-card: #FFFFFF;
    --tec-border: #D9E2EA;
    --tec-text: #172033;
    --tec-muted: #667085;
    --tec-radius: 18px;
    --tec-shadow: 0 12px 35px rgba(15, 23, 42, .08);
}

.tec-page {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
}

.tec-topbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.tec-breadcrumb {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--tec-muted);
    text-decoration: none;
    font-size: .86rem;
    margin-bottom: 10px;
}

.tec-breadcrumb:hover {
    color: var(--tec-primary-dark);
}

.tec-title-wrap h1 {
    margin: 0;
    font-size: clamp(1.45rem, 2vw, 2rem);
    line-height: 1.1;
    font-weight: 750;
    letter-spacing: -.03em;
}

.tec-title-wrap p {
    margin: .55rem 0 0;
    max-width: 920px;
    color: var(--tec-muted);
    font-size: .94rem;
    line-height: 1.45;
}

.tec-title-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 11px;
    border-radius: 999px;
    background: var(--tec-primary-soft);
    color: var(--tec-primary-dark);
    font-size: .78rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.tec-title-badge::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--tec-primary);
    box-shadow: 0 0 0 4px rgba(31, 163, 179, .16);
}

.tec-title-badge-hub {
    background: var(--tec-hub-soft);
    color: var(--tec-hub-dark);
}

.tec-title-badge-hub::before {
    background: var(--tec-hub);
    box-shadow: 0 0 0 4px rgba(100, 40, 143, .14);
}

.tec-title-badge-sicurezza {
    background: var(--tec-sicurezza-soft);
    color: var(--tec-sicurezza-dark);
}

.tec-title-badge-sicurezza::before {
    background: var(--tec-sicurezza);
    box-shadow: 0 0 0 4px rgba(254, 148, 13, .14);
}

.tec-title-badge-attrezzature {
    background: var(--tec-red-soft);
    color: var(--tec-red-dark);
}

.tec-title-badge-attrezzature::before {
    background: var(--tec-red);
    box-shadow: 0 0 0 4px rgba(255, 19, 19, .13);
}

.tec-title-badge-presenze {
    background: #E8F6EF;
    color: #007a3f;
}

.tec-title-badge-presenze::before {
    background: #00954F;
    box-shadow: 0 0 0 4px rgba(0, 149, 79, .14);
}

.tec-actions-panel {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
    min-width: min(480px, 100%);
}

.tec-btn {
    border: 1px solid var(--tec-border);
    background: #fff;
    color: var(--tec-text);
    border-radius: 13px;
    padding: 10px 13px;
    font-size: .86rem;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    box-shadow: 0 7px 18px rgba(15, 23, 42, .04);
    transition: .18s ease;
    white-space: nowrap;
    cursor: pointer;
}

.tec-btn:hover {
    transform: translateY(-1px);
    border-color: rgba(31, 163, 179, .45);
    color: var(--tec-primary-dark);
    box-shadow: 0 12px 24px rgba(15, 23, 42, .08);
}

.tec-btn-primary {
    background: linear-gradient(135deg, var(--tec-primary), var(--tec-primary-dark));
    color: #fff;
    border-color: transparent;
}

.tec-btn-primary:hover {
    color: #fff;
}

.tec-calendario-hub .tec-btn-primary {
    background: linear-gradient(135deg, var(--tec-hub), var(--tec-hub-dark));
}

.tec-calendario-sicurezza .tec-btn-primary {
    background: linear-gradient(135deg, var(--tec-sicurezza), var(--tec-sicurezza-dark));
    color: #111827;
}

.tec-calendario-sicurezza .tec-btn-primary:hover {
    color: #111827;
}

.tec-calendario-attrezzature .tec-btn-primary {
    background: linear-gradient(135deg, var(--tec-red), var(--tec-red-dark));
}

.tec-calendario-presenze .tec-btn-primary {
    background: linear-gradient(135deg, #00954F, #007a3f);
}

.tec-btn .ico {
    width: 22px;
    height: 22px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(31, 163, 179, .12);
    color: var(--tec-primary-dark);
    font-size: .78rem;
    flex: 0 0 auto;
    font-weight: 800;
}

.tec-btn-primary .ico {
    background: rgba(255, 255, 255, .18);
    color: #fff;
}

.tec-calendario-sicurezza .tec-btn-primary .ico {
    color: #111827;
}

.tec-page .tec-dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
    gap: 16px;
    margin-bottom: 16px;
    align-items: stretch;
}

.tec-card {
    background: rgba(255, 255, 255, .92);
    border: 1px solid rgba(217, 226, 234, .95);
    border-radius: var(--tec-radius);
    box-shadow: var(--tec-shadow);
}

.tec-card-inner {
    padding: 16px;
}

.tec-section-label {
    margin: 0 0 12px;
    color: #475467;
    font-size: .74rem;
    text-transform: uppercase;
    letter-spacing: .09em;
    font-weight: 800;
}

/* Collegamenti rapidi — card orizzontali (icona sx, testo dx) */
.tec-cal-nav {
    display: block;
    width: 100%;
}

.tec-cal-nav__grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 10px;
    width: 100%;
}

.tec-calendario-docenze .tec-cal-nav__grid,
.tec-calendario-agenda .tec-cal-nav__grid,
.tec-calendario-hub .tec-cal-nav__grid,
.tec-calendario-sicurezza .tec-cal-nav__grid,
.tec-calendario-attrezzature .tec-cal-nav__grid,
.tec-calendario-presenze .tec-cal-nav__grid,
.tec-calendario-vdc .tec-cal-nav__grid,
.tec-calendario-docenti .tec-cal-nav__grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

.tec-main-content a.tec-cal-nav__card,
a.tec-cal-nav__card {
    position: relative;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-start;
    gap: 11px;
    padding: 13px;
    min-height: 74px;
    min-width: 0;
    border: 1px solid var(--tec-border);
    border-radius: 16px;
    background: #fff;
    text-decoration: none;
    color: var(--tec-text);
    overflow: hidden;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
    box-shadow: 0 7px 18px rgba(15, 23, 42, .04);
}

.tec-main-content a.tec-cal-nav__card:hover,
.tec-main-content a.tec-cal-nav__card:focus,
.tec-main-content a.tec-cal-nav__card:visited,
a.tec-cal-nav__card:hover,
a.tec-cal-nav__card:focus,
a.tec-cal-nav__card:visited {
    text-decoration: none;
    color: var(--tec-text);
}

.tec-main-content a.tec-cal-nav__card strong,
.tec-main-content a.tec-cal-nav__card small {
    text-decoration: none;
    color: inherit;
}

.tec-main-content a.tec-cal-nav__card strong {
    color: var(--tec-text);
}

.tec-main-content a.tec-cal-nav__card small {
    color: var(--tec-muted);
}

a.tec-cal-nav__card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 26px rgba(15, 23, 42, .08);
    border-color: rgba(31, 163, 179, .35);
}

a.tec-cal-nav__card::after {
    content: "";
    position: absolute;
    right: -20px;
    bottom: -35px;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    opacity: .11;
    pointer-events: none;
}

a.tec-cal-nav__card.is-active {
    box-shadow: 0 8px 20px rgba(15, 23, 42, .06);
}

.tec-cal-nav__icon {
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: .95rem;
    line-height: 1;
}

.tec-cal-nav__text {
    display: block;
    min-width: 0;
    flex: 1 1 auto;
}

.tec-cal-nav__text strong {
    display: block;
    font-size: .92rem;
    line-height: 1.15;
    font-weight: 700;
    color: var(--tec-text);
}

.tec-cal-nav__text small {
    display: block;
    margin-top: 3px;
    color: var(--tec-muted);
    font-size: .75rem;
    line-height: 1.25;
}

a.tec-cal-nav__card--presenze .tec-cal-nav__icon {
    background: rgba(0, 149, 79, .12);
    color: #00954F;
}

a.tec-cal-nav__card--presenze::after {
    background: #00954F;
}

a.tec-cal-nav__card--presenze.is-active {
    border-color: rgba(0, 149, 79, .28);
    background: linear-gradient(180deg, #fff 0%, #f3fbf7 100%);
}

a.tec-cal-nav__card--hub .tec-cal-nav__icon {
    background: rgba(100, 40, 143, .12);
    color: #64288F;
}

a.tec-cal-nav__card--hub::after {
    background: #64288F;
}

a.tec-cal-nav__card--hub.is-active {
    border-color: rgba(100, 40, 143, .28);
    background: linear-gradient(180deg, #fff 0%, #faf5fc 100%);
}

a.tec-cal-nav__card--sicurezza .tec-cal-nav__icon {
    background: rgba(254, 148, 13, .14);
    color: #d67d00;
}

a.tec-cal-nav__card--sicurezza::after {
    background: #FE940D;
}

a.tec-cal-nav__card--sicurezza.is-active {
    border-color: rgba(254, 148, 13, .35);
    background: linear-gradient(180deg, #fff 0%, #fffaf3 100%);
}

a.tec-cal-nav__card--docenti .tec-cal-nav__icon {
    background: rgba(180, 83, 9, .14);
    color: #b45309;
}

a.tec-cal-nav__card--docenti::after {
    background: #b45309;
}

a.tec-cal-nav__card--docenti.is-active {
    border-color: rgba(180, 83, 9, .28);
    background: linear-gradient(180deg, #fff 0%, #fff7ed 100%);
}

a.tec-cal-nav__card--attrezzature .tec-cal-nav__icon {
    background: rgba(255, 19, 19, .1);
    color: #FF1313;
}

a.tec-cal-nav__card--attrezzature::after {
    background: #FF1313;
}

a.tec-cal-nav__card--attrezzature.is-active {
    border-color: rgba(255, 19, 19, .28);
    background: linear-gradient(180deg, #fff 0%, #fff7f7 100%);
}

a.tec-cal-nav__card--formazione .tec-cal-nav__icon {
    background: rgba(31, 163, 179, .12);
    color: #1FA3B3;
}

a.tec-cal-nav__card--formazione::after {
    background: #1FA3B3;
}

a.tec-cal-nav__card--formazione.is-active {
    border-color: rgba(31, 163, 179, .35);
    background: linear-gradient(180deg, #fff 0%, #f2fafb 100%);
}

.tec-legend-list {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.tec-legend-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 9px 10px;
    border-radius: 13px;
    background: #fff;
    border: 1px solid var(--tec-border);
    font-size: .86rem;
    color: #344054;
}

.tec-legend-left {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
}

.tec-dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: var(--c);
    box-shadow: 0 0 0 4px rgba(31, 163, 179, .12);
    flex: 0 0 auto;
}

.tec-legend-note {
    color: var(--tec-muted);
    font-size: .72rem;
    white-space: nowrap;
}

.tec-calendar-shell {
    overflow: hidden;
}

.tec-calendar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--tec-border);
    background: linear-gradient(180deg, rgba(255, 255, 255, .95), rgba(248, 251, 253, .95));
}

.tec-calendar-head strong {
    font-size: 1rem;
}

.tec-calendar-status {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--tec-muted);
    font-size: .83rem;
}

.tec-calendar-status::before {
    content: "";
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #22C55E;
    box-shadow: 0 0 0 4px rgba(34, 197, 94, .14);
}

.tec-calendar-status-hub::before {
    background: var(--tec-hub);
    box-shadow: 0 0 0 4px rgba(100, 40, 143, .14);
}

.tec-calendar-status-sicurezza::before {
    background: var(--tec-sicurezza);
    box-shadow: 0 0 0 4px rgba(254, 148, 13, .14);
}

.tec-calendar-status-docenti::before {
    background: #b45309;
    box-shadow: 0 0 0 4px rgba(180, 83, 9, .14);
}

.tec-calendar-status-red::before {
    background: var(--tec-red);
    box-shadow: 0 0 0 4px rgba(255, 19, 19, .13);
}

.tec-calendar-status-presenze::before {
    background: #00954F;
    box-shadow: 0 0 0 4px rgba(0, 149, 79, .14);
}

.tec-calendar-shell > [id^="calendario"] {
    padding: 12px;
    background: #fff;
    min-height: 680px;
}

.tec-calendario-page-alert {
    margin-bottom: 16px;
}

.fc {
    font-size: .87rem;
    --fc-border-color: #E4EAF0;
    --fc-page-bg-color: #fff;
    --fc-neutral-bg-color: #F8FAFC;
    --fc-today-bg-color: rgba(31, 163, 179, .08);
    --fc-button-bg-color: #fff;
    --fc-button-border-color: #D9E2EA;
    --fc-button-text-color: #344054;
    --fc-button-hover-bg-color: #F2F7F9;
    --fc-button-hover-border-color: #BFD6DD;
    --fc-button-active-bg-color: #1FA3B3;
    --fc-button-active-border-color: #1FA3B3;
}

.tec-calendario-hub .fc {
    --fc-today-bg-color: rgba(100, 40, 143, .08);
    --fc-button-active-bg-color: var(--tec-hub);
    --fc-button-active-border-color: var(--tec-hub);
}

.tec-calendario-sicurezza .fc {
    --fc-today-bg-color: rgba(254, 148, 13, .08);
    --fc-button-active-bg-color: var(--tec-sicurezza);
    --fc-button-active-border-color: var(--tec-sicurezza);
}

.tec-calendario-attrezzature .fc {
    --fc-today-bg-color: rgba(255, 19, 19, .055);
    --fc-button-active-bg-color: var(--tec-red);
    --fc-button-active-border-color: var(--tec-red);
}

.tec-calendario-presenze .fc {
    --fc-today-bg-color: rgba(0, 149, 79, .08);
    --fc-button-active-bg-color: #00954F;
    --fc-button-active-border-color: #00954F;
}

.fc .fc-toolbar {
    gap: 10px;
    margin-bottom: 12px !important;
    align-items: center;
}

.fc .fc-toolbar-title {
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: -.02em;
    color: #101828;
}

.fc .fc-button {
    border-radius: 11px !important;
    padding: 7px 11px !important;
    font-weight: 700 !important;
    text-transform: none !important;
    box-shadow: none !important;
}

/*
 * Tab month/week/day attivi: sfondo tema (viola Hub, arancio Sicurezza, …)
 * vs testo scuro (--fc-button-text-color) = contrasto insufficiente.
 * Forziamo testo bianco; --fc-button-text-color copre anche regole FC caricate dopo.
 */
.fc .fc-button.fc-button-active,
.fc .fc-button-primary:not(:disabled).fc-button-active,
.fc .fc-button-primary:not(:disabled):active,
.fc .fc-button-primary:not(:disabled).fc-button-active:focus,
.fc .fc-button-primary:not(:disabled):active:focus {
    --fc-button-text-color: #fff;
    color: #fff !important;
}

.tec-calendario-hub .fc .fc-button.fc-button-active,
.tec-calendario-sicurezza .fc .fc-button.fc-button-active,
.tec-calendario-attrezzature .fc .fc-button.fc-button-active,
.tec-calendario-presenze .fc .fc-button.fc-button-active,
.tec-calendario-docenze .fc .fc-button.fc-button-active,
.tec-calendario-agenda .fc .fc-button.fc-button-active {
    --fc-button-text-color: #fff;
    color: #fff !important;
}

.fc .fc-daygrid-day-number {
    color: #344054;
    font-weight: 700;
    padding: 8px;
    text-decoration: none;
}

.fc .fc-col-header-cell-cushion {
    padding: 10px 4px;
    color: #475467;
    text-transform: uppercase;
    font-size: .72rem;
    letter-spacing: .08em;
    text-decoration: none;
}

.fc .fc-daygrid-day-frame {
    min-height: 118px;
}

.calendario-event-detail {
    font-size: .72rem;
    line-height: 1.28;
    white-space: normal;
    padding: 1px 2px;
}

.calendario-event-detail strong {
    font-size: .75rem;
    letter-spacing: .01em;
}

.fc-event {
    border-radius: 10px !important;
    border-width: 0 !important;
    padding: 3px 5px !important;
    margin: 2px 5px !important;
    box-shadow: 0 6px 14px rgba(15, 23, 42, .13);
    overflow: hidden;
}

.fc-event.fc-event-vdc {
    background: #DBECEF !important;
    border-color: #9ec9d4 !important;
    color: #0f3d4a !important;
}

.fc-event.fc-event-presenza,
.fc-event.fc-event-presenze,
.fc-event.fc-event-art37 {
    background: #00954F !important;
    border-color: #007a3f !important;
    color: #fff !important;
}

.fc-event.fc-event-elearning {
    background: #01A1DD !important;
    border-color: #0188b8 !important;
    color: #fff !important;
}

.fc-event.fc-event-hub {
    background: #64288F !important;
    border-color: #4a1d68 !important;
    color: #fff !important;
}

.fc-event.fc-event-sicurezza {
    background: #FE940D !important;
    border-color: #d67d00 !important;
    color: #111827 !important;
}

.fc-event.fc-event-docenti {
    background: #b45309 !important;
    border-color: #92400e !important;
    color: #fff !important;
}

.fc-event.fc-event-attrezzature {
    background: #FF1313 !important;
    border-color: #cc0f0f !important;
    color: #fff !important;
}

.conv-eml-link {
    color: #fff;
    text-decoration: underline;
    font-size: .7rem;
}

.conv-eml-link:hover {
    color: #fff;
    opacity: .9;
}

.tec-hint {
    color: var(--tec-muted);
    font-size: .84rem;
    margin: 13px 3px 0;
}

.tec-modal-content {
    border: 0;
    border-radius: 22px;
    box-shadow: 0 25px 70px rgba(15, 23, 42, .22);
    overflow: hidden;
}

.tec-modal-header {
    background: linear-gradient(135deg, #2F3437, #3D474B);
    color: #fff;
    border: 0;
    padding: 18px 20px;
}

.tec-modal-header .modal-title {
    color: #fff;
}

.tec-modal-body {
    padding: 20px;
    background: #F8FAFC;
}

.sim-riga-corso {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    padding: 10px;
    border: 1px solid var(--tec-border);
    border-radius: 14px;
    background: #fff;
}

@media (max-width: 1200px) {
    .tec-topbar {
        flex-direction: column;
    }

    .tec-actions-panel {
        justify-content: flex-start;
        min-width: 0;
    }

    .tec-page .tec-dashboard-grid {
        grid-template-columns: 1fr;
    }

    .tec-cal-nav__grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .tec-cal-nav__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .tec-actions-panel {
        display: grid;
        grid-template-columns: 1fr 1fr;
        width: 100%;
    }

    .tec-btn {
        justify-content: center;
        width: 100%;
    }

    .tec-calendar-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .tec-calendar-shell > [id^="calendario"] {
        padding: 8px;
        min-height: 620px;
    }

    .fc .fc-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .fc .fc-toolbar-chunk {
        display: flex;
        justify-content: center;
        flex-wrap: wrap;
    }
}

@media (max-width: 520px) {
    .tec-cal-nav__grid,
    .tec-actions-panel {
        grid-template-columns: 1fr;
    }

    .tec-legend-item {
        align-items: flex-start;
        flex-direction: column;
    }

    .tec-legend-note {
        white-space: normal;
    }
}

.tec-calendario-agenda .tec-agenda-filter .tec-card-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
}

.tec-calendario-agenda .tec-agenda-filter {
    position: relative;
    z-index: 5;
}

.tec-calendario-agenda .tec-agenda-comm-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    position: relative;
    z-index: 6;
    pointer-events: auto;
}

.tec-calendario-agenda .tec-agenda-comm-btn {
    appearance: none;
    border: 1px solid var(--tec-border, #d0d7de);
    background: #fff;
    color: #1f2937;
    font-weight: 600;
    font-size: .85rem;
    line-height: 1.2;
    padding: .45rem .85rem;
    border-radius: 999px;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease, color .15s ease;
    pointer-events: auto;
    position: relative;
    z-index: 7;
}

.tec-calendario-agenda .tec-agenda-comm-btn:hover {
    border-color: #1fa3b3;
    color: #0f766e;
}

.tec-calendario-agenda .tec-agenda-comm-btn.is-active {
    background: #1fa3b3;
    border-color: #1fa3b3;
    color: #fff;
}

.tec-calendario-agenda .tec-agenda-select {
    min-width: min(360px, 100%);
    max-width: 420px;
    border-radius: 12px;
    border-color: var(--tec-border);
    font-weight: 600;
}

.tec-calendario-agenda .tec-hint {
    margin-top: 14px;
    color: #344054;
    font-size: .86rem;
    line-height: 1.45;
}

/* Agenda commerciali — hero e contrasto testi */
.tec-calendario-agenda .tec-hero-badges {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.tec-calendario-agenda .tec-hero-badges .tec-title-badge {
    margin-bottom: 0;
}

.tec-calendario-agenda .tec-title-badge-outlook {
    background: #e8f4fd;
    color: #0b5cab;
}

.tec-calendario-agenda .tec-title-badge-outlook::before {
    background: #0078d4;
    box-shadow: 0 0 0 4px rgba(0, 120, 212, .16);
}

.tec-calendario-agenda .tec-hero-lead {
    margin: .55rem 0 0;
    max-width: 920px;
    color: #1e293b;
    font-size: .94rem;
    line-height: 1.5;
}

.tec-calendario-agenda .tec-hero-meta {
    margin: .65rem 0 0;
    max-width: 920px;
    padding: 10px 14px;
    border-radius: 12px;
    border: 1px solid #dbeafe;
    background: #f8fbff;
    color: #334155;
    font-size: .86rem;
    line-height: 1.5;
}

.tec-calendario-agenda .tec-hero-meta--warn {
    border-color: #fde68a;
    background: #fffbeb;
    color: #92400e;
}

.tec-calendario-agenda .tec-hero-lead strong,
.tec-calendario-agenda .tec-hero-meta strong {
    color: #0f172a;
    font-weight: 700;
}

.tec-calendario-agenda .tec-hero-meta code {
    font-size: .82em;
    color: #0f172a;
}

.tec-calendario-agenda .tec-calendar-head .text-muted {
    color: #475467 !important;
}

.tec-calendario-agenda .tec-calendar-head strong {
    color: #0f172a;
}

.tec-calendario-agenda .tec-calendar-status {
    color: #344054;
    font-weight: 600;
}

.tec-calendario-agenda .tec-section-label {
    color: #0f172a;
    font-weight: 700;
}

.tec-calendario-agenda .tec-agenda-legend-items {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 20px;
}

.tec-calendario-agenda .tec-agenda-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #1e293b;
    font-size: .86rem;
    font-weight: 600;
}

.tec-calendario-agenda .tec-agenda-swatch {
    width: 14px;
    height: 14px;
    border-radius: 4px;
    flex-shrink: 0;
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, .12);
}

.tec-calendario-agenda .tec-agenda-swatch-portale { background: #0d9488; }
.tec-calendario-agenda .tec-agenda-swatch-synced {
    background: #38bdf8;
    box-shadow: inset 0 0 0 2px #0284c7;
}
.tec-calendario-agenda .tec-agenda-swatch-sal { background: #b45309; }
.tec-calendario-agenda .tec-agenda-swatch-blocco { background: #475569; }
.tec-calendario-agenda .tec-agenda-swatch-outlook { background: #0078d4; }
.tec-calendario-agenda .tec-agenda-swatch-errore {
    background: #0d9488;
    box-shadow: inset 0 0 0 2px #dc2626;
}

.tec-calendario-agenda .fc-event,
.tec-calendario-agenda .fc-event .fc-event-title,
.tec-calendario-agenda .fc-event .fc-event-time {
    color: #fff !important;
    text-shadow: 0 1px 0 rgba(0, 0, 0, .35);
}

.tec-calendario-agenda .fc-event.agenda-graph-synced {
    background-color: #38bdf8 !important;
    box-shadow: inset 0 0 0 2px #0284c7;
    border-color: #0284c7 !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.tec-calendario-agenda .fc-daygrid-event.agenda-graph-synced,
.tec-calendario-agenda .fc-timegrid-event.agenda-graph-synced {
    display: block !important;
    min-height: 1.35em;
}

.tec-calendario-agenda .fc-event.agenda-graph-sync-error {
    box-shadow: inset 0 0 0 2px #dc2626;
}

.tec-calendario-agenda .fc-col-header-cell-cushion,
.tec-calendario-agenda .fc-daygrid-day-number,
.tec-calendario-agenda .fc-timegrid-slot-label-cushion {
    color: #344054;
    font-weight: 600;
}

/* Hero hub — Calendari operativi */
.fs-calendario-page .hero--calendario {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
}

.fs-calendario-page .hero--calendario .hero-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
    width: 100%;
}

.fs-calendario-page .hero-actions {
    align-items: flex-start;
    min-width: min(480px, 100%);
}

.fs-calendario-page .hero-actions .tec-btn {
    flex: 0 0 auto;
}

.fs-calendario-page .hero h1.tec-panel-title-row {
    font-size: clamp(1.45rem, 2vw, 1.75rem);
}

.fs-calendario-page .hero-cal-body {
    width: 100%;
    margin-top: 14px;
    padding-top: 16px;
    border-top: 1px solid rgba(217, 226, 234, .85);
}

.fs-calendario-page .hero-cal-nav-block {
    margin-bottom: 0;
}

.fs-calendario-page .hero-cal-nav-block .tec-section-label {
    margin-bottom: 8px;
}

.fs-calendario-page .hero-cal-nav-block .tec-cal-nav__grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 10px;
    width: 100%;
}

.fs-calendario-page .hero-cal-nav-block a.tec-cal-nav__card {
    position: relative;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-start;
    gap: 11px;
    padding: 13px;
    min-height: 74px;
    min-width: 0;
    border: 1px solid var(--tec-border);
    border-radius: 16px;
    background: #fff;
    text-decoration: none;
    color: var(--tec-text);
    overflow: hidden;
    box-shadow: 0 7px 18px rgba(15, 23, 42, .04);
    transition: .18s ease;
}

.fs-calendario-page .hero-cal-nav-block a.tec-cal-nav__card:hover,
.fs-calendario-page .hero-cal-nav-block a.tec-cal-nav__card:focus,
.fs-calendario-page .hero-cal-nav-block a.tec-cal-nav__card:visited {
    text-decoration: none;
    color: var(--tec-text);
}

.fs-calendario-page .hero-cal-nav-block a.tec-cal-nav__card::after {
    content: "";
    position: absolute;
    right: -20px;
    bottom: -35px;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    opacity: .11;
    pointer-events: none;
}

.fs-calendario-page .hero-cal-nav-block .tec-cal-nav__icon {
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: .95rem;
    line-height: 1;
}

.fs-calendario-page .hero-cal-nav-block .tec-cal-nav__text {
    display: block;
    min-width: 0;
    flex: 1 1 auto;
}

.fs-calendario-page .hero-cal-nav-block a.tec-cal-nav__card strong {
    display: block;
    font-size: .92rem;
    line-height: 1.15;
    font-weight: 700;
    color: var(--tec-text);
}

.fs-calendario-page .hero-cal-nav-block a.tec-cal-nav__card small {
    display: block;
    margin-top: 3px;
    font-size: .75rem;
    line-height: 1.25;
    color: var(--tec-muted);
}

.fs-calendario-page .hero-cal-nav-block a.tec-cal-nav__card--presenze .tec-cal-nav__icon { background: rgba(0, 149, 79, .12); color: #00954F; }
.fs-calendario-page .hero-cal-nav-block a.tec-cal-nav__card--presenze::after { background: #00954F; }
.fs-calendario-page .hero-cal-nav-block a.tec-cal-nav__card--presenze.is-active { border-color: rgba(0, 149, 79, .28); background: linear-gradient(180deg, #fff, #f3fbf7); }

.fs-calendario-page .hero-cal-nav-block a.tec-cal-nav__card--vdc .tec-cal-nav__icon { background: rgba(14, 116, 144, .14); color: #0e7490; }
.fs-calendario-page .hero-cal-nav-block a.tec-cal-nav__card--vdc::after { background: #0e7490; }
.fs-calendario-page .hero-cal-nav-block a.tec-cal-nav__card--vdc.is-active { border-color: rgba(14, 116, 144, .28); background: linear-gradient(180deg, #fff, #f0fafa); }

.fs-calendario-page .hero-cal-nav-block a.tec-cal-nav__card--hub .tec-cal-nav__icon { background: rgba(100, 40, 143, .12); color: #64288F; }
.fs-calendario-page .hero-cal-nav-block a.tec-cal-nav__card--hub::after { background: #64288F; }
.fs-calendario-page .hero-cal-nav-block a.tec-cal-nav__card--hub.is-active { border-color: rgba(100, 40, 143, .28); background: linear-gradient(180deg, #fff, #faf5fc); }

.fs-calendario-page .hero-cal-nav-block a.tec-cal-nav__card--sicurezza .tec-cal-nav__icon { background: rgba(254, 148, 13, .14); color: #d67d00; }
.fs-calendario-page .hero-cal-nav-block a.tec-cal-nav__card--sicurezza::after { background: #FE940D; }
.fs-calendario-page .hero-cal-nav-block a.tec-cal-nav__card--sicurezza.is-active { border-color: rgba(254, 148, 13, .35); background: linear-gradient(180deg, #fff, #fffaf3); }

.fs-calendario-page .hero-cal-nav-block a.tec-cal-nav__card--docenti .tec-cal-nav__icon { background: rgba(180, 83, 9, .14); color: #b45309; }
.fs-calendario-page .hero-cal-nav-block a.tec-cal-nav__card--docenti::after { background: #b45309; }
.fs-calendario-page .hero-cal-nav-block a.tec-cal-nav__card--docenti.is-active { border-color: rgba(180, 83, 9, .28); background: linear-gradient(180deg, #fff, #fff7ed); }

.fs-calendario-page .hero-cal-nav-block a.tec-cal-nav__card--attrezzature .tec-cal-nav__icon { background: rgba(255, 19, 19, .1); color: #FF1313; }
.fs-calendario-page .hero-cal-nav-block a.tec-cal-nav__card--attrezzature::after { background: #FF1313; }
.fs-calendario-page .hero-cal-nav-block a.tec-cal-nav__card--attrezzature.is-active { border-color: rgba(255, 19, 19, .28); background: linear-gradient(180deg, #fff, #fff7f7); }

.fs-calendario-page .hero-cal-nav-block a.tec-cal-nav__card--formazione .tec-cal-nav__icon { background: rgba(31, 163, 179, .12); color: #1FA3B3; }
.fs-calendario-page .hero-cal-nav-block a.tec-cal-nav__card--formazione::after { background: #1FA3B3; }
.fs-calendario-page .hero-cal-nav-block a.tec-cal-nav__card--formazione.is-active { border-color: rgba(31, 163, 179, .35); background: linear-gradient(180deg, #fff, #f2fafb); }

@media (max-width: 1200px) {
    .fs-calendario-page .hero-cal-nav-block .tec-cal-nav__grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .fs-calendario-page .hero-actions {
        min-width: 100%;
        justify-content: flex-start;
    }

    .fs-calendario-page .hero-cal-nav-block .tec-cal-nav__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 520px) {
    .fs-calendario-page .hero-cal-nav-block .tec-cal-nav__grid {
        grid-template-columns: 1fr;
    }
}

/* Calendari — intestazione e griglia fisse allo scroll */
.fs-calendario-page .tec-calendar-shell--sticky {
    overflow: visible !important;
}

.fs-calendario-page .tec-calendar-shell--sticky [id^="calendario"],
.fs-calendario-page .tec-calendar-shell--sticky [id^="calendario"] .fc,
.fs-calendario-page .tec-calendar-shell--sticky [id^="calendario"] .fc-view-harness,
.fs-calendario-page .tec-calendar-shell--sticky [id^="calendario"] .fc-view-harness-active,
.fs-calendario-page .tec-calendar-shell--sticky [id^="calendario"] .fc-scroller-harness,
.fs-calendario-page .tec-calendar-shell--sticky [id^="calendario"] .fc-scroller,
.fs-calendario-page .tec-calendar-shell--sticky [id^="calendario"] .fc-scrollgrid,
.fs-calendario-page .tec-calendar-shell--sticky [id^="calendario"] .fc-scrollgrid-liquid {
    overflow: visible !important;
}

.fs-calendario-page .tec-calendar-shell--sticky .tec-calendar-head {
    position: sticky;
    top: var(--tec-cal-sticky-offset, var(--tec-headbar-height, 58px));
    z-index: 36;
    background: linear-gradient(180deg, #fff 0%, #f8fbfd 100%);
    box-shadow: 0 1px 0 var(--tec-border);
}

.fs-calendario-page .tec-calendar-shell--sticky [id^="calendario"] .fc-header-toolbar {
    position: sticky;
    top: calc(var(--tec-cal-sticky-offset, var(--tec-headbar-height, 58px)) + var(--tec-cal-head-h, 52px));
    z-index: 35;
    margin: 0;
    padding: 10px 0 8px;
    background: #fff;
    box-shadow: 0 1px 0 var(--tec-border);
}

.fs-calendario-page .tec-calendar-shell--sticky [id^="calendario"] .fc-scrollgrid {
    border-collapse: separate;
    border-spacing: 0;
}

.fs-calendario-page .tec-calendar-shell--sticky [id^="calendario"] .fc-scrollgrid-section-header {
    position: sticky;
    top: calc(
        var(--tec-cal-sticky-offset, var(--tec-headbar-height, 58px)) +
        var(--tec-cal-head-h, 52px) +
        var(--tec-cal-toolbar-h, 46px)
    );
    z-index: 34;
}

.fs-calendario-page .tec-calendar-shell--sticky [id^="calendario"] .fc-col-header-cell,
.fs-calendario-page .tec-calendar-shell--sticky [id^="calendario"] .fc-timegrid-axis-frame {
    position: sticky;
    top: calc(
        var(--tec-cal-sticky-offset, var(--tec-headbar-height, 58px)) +
        var(--tec-cal-head-h, 52px) +
        var(--tec-cal-toolbar-h, 46px)
    );
    z-index: 34;
    background: var(--fc-page-bg-color, #fff) !important;
    box-shadow: 0 1px 0 var(--fc-border-color, #e4eaf0);
}

.fs-calendario-page .tec-calendar-shell--sticky [id^="calendario"] .fc-col-header-cell .fc-scrollgrid-sync-inner,
.fs-calendario-page .tec-calendar-shell--sticky [id^="calendario"] .fc-timegrid-axis-cushion {
    background: inherit;
}

.fs-calendario-page .tec-calendar-shell--sticky [id^="calendario"] .fc-timegrid-header {
    position: sticky;
    top: calc(
        var(--tec-cal-sticky-offset, var(--tec-headbar-height, 58px)) +
        var(--tec-cal-head-h, 52px) +
        var(--tec-cal-toolbar-h, 46px)
    );
    z-index: 34;
    background: #fff;
}
