/*
Theme Name: itccapp
Author: Indigo Srls
Version: 1.0
Text Domain: itccapp
*/

/* ===== Design tokens ===== */
:root {
	--bg: #ffffff;
	--panel: #f4f4f4;
	--medium-blue: #335D83;
	--light-blue: #D9E0E7;
	--dark-blue: #003464;
	--ink: #1f2a37;
	--muted: #6b7280;
	--brand: #0b3954;            /* blu scuro per topbar/CTA */
	--accent: #1C6128;           /* verde */
	--accent-2: #DC0B21;         /* rosso */
	--border: #e5e7eb;
	--radius: 16px;
	--shadow: 0 8px 24px rgba(17, 24, 39, .06);
}

* {
	box-sizing: border-box;
}

a {
	color: var(--ink);
}

a:focus,
button:focus,
input:focus {
    outline: 0 !important;
	/*box-shadow: 0 0 0 3px rgba(21, 156, 228, 0.4);*/
	border-radius: 0;
}

html {
	min-height: 100%;
	background: var(--bg);
}

body {
	min-height: 100%;
	margin: 0;
	color: var(--ink);
	background: var(--bg);
	font-family: "Lexend", sans-serif;
	font-optical-sizing: auto;
	font-weight: 400;
	font-style: normal;
	font-size: 1.6rem;
	line-height: 2rem;
}

@supports (height: 100dvh) {
	.site { min-height: 100dvh; }
}




/* niente scroll sotto al menu aperto */
html.menu-open,
html.menu-open body { overflow: hidden; }

.nav-toggle {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}


#logoLogin {
	margin: 50px auto;
	width: 128px;
	height: auto;
}

.amem-form.amem-form-type-login,
.amem-form.amem-form-type-passwordreset {
	max-width: 366px;
	margin: 30px auto 50px;
}
.acf-form.amem-form-type-registration {
	max-width: 792px;
	margin: 30px auto 50px;
}

.amem-input input {
	border: 1px solid #CECECE;
	background: #F8F8F8;
	color: #000;
	padding: 15px !important;
	border-radius: 2px;
}
.iti__flag-container + input {
	padding-left: 50px !important;
}
.acf-field .acf-label {
	margin: 0 0 5px;
}
.acf-btn {
	background: var(--dark-blue) !important;
	color: #fff !important;
	padding: 15px !important;
	border: 0;
	min-width: 115px;
	justify-content: center;
}
.amem-submit .amem-center {
	text-align: right;
}
.amem-submit .amem-forgotpwd-wrap.amem-center {
	text-align: left;
	margin-top: 30px;
}
.amem-submit .amem-forgotpwd-wrap.amem-center a {
	color: var(--dark-blue);
}

.amem-field {
	border: 0 !important;
}
.amem-submit {
	padding: 16px;
}


.amem-notice {
	text-align: center;
	margin: 50px auto 100px;
}

.floatingBut {
	position: absolute;
	top: 24px;
	right: 24px;
}
.btn {
	background: var(--dark-blue) !important;
	color: #fff !important;
	padding: 15px !important;
	border: 0;
	border-radius: 6px;
	min-width: 115px;
	justify-content: center;
}
.btn.green {
	background: var(--accent) !important;
}
.btn:hover,
.btn.green:hover,
.acf-btn:hover {
	background: var(--accent-2) !important;
}
.btn:focus {
	border-radius: 6px !important;
}


h1 {
	font-size: 3rem;
	line-height: 3.6rem;
	color: var(--dark-blue);
}

.grid h1 {
	font-weight: 400;
	font-size: 3.6rem;
	line-height: 4rem;
	margin-top: 0;
}

h2 {
	font-weight: 700;
	font-size: 2.3rem;
	line-height: 4rem;
	margin: 30px 0 20px;
	color: var(--brand);
}


#colophon {
	color: #fff;
	background: var(--dark-blue);
	font-size: 1.4rem;
	line-height: 1.8rem;
	padding: 30px 0;
}
#colophon a {
	color: #fff;
}


/* ===== Layout base ===== */
.site {
	display: grid;
	grid-template-columns: 280px 1fr;
	grid-template-rows: auto 1fr;
	min-height: 100%;
}

.sidebar {
	grid-row: 1 / span 2;
	grid-column: 1;
	background: var(--dark-blue);
	color: #fff;
	position: relative;
	box-shadow: 5px 0 15px rgba(0,0,0,0.16);
}

.topbar {
	grid-row: 1;
	grid-column: 2;
	background: #fff;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 10px 34px;
}

.content {
	grid-row: 2;
	grid-column: 2;
	padding: 34px;
}

/* ===== Sidebar ===== */
.sidebar__brand {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 26px 26px;
	background: var(--light-blue);
}

.brand {
	display: inline-flex;
	align-items: center;
}
.brand:focus {
	background: transparent !important;
}

.sidebar__close {
	display: none;
}

.sidebar__nav {
}

.menu {
	list-style: none;
	margin: 0;
	padding: 0;
}
.menu li {
	margin: 0;
}
.menu li:first-child .menu__link {
	margin-top: 0;
}
.menu li:last-child .menu__link {
	color: #fff;
	background: inherit;
	margin-top: 40px;
	text-transform: uppercase;
	font-size: 1.4rem;
}

.menu__link {
	display: block;
	padding: 16px 26px;
	margin: 1px 0 0 0;
	text-decoration: none;
	color: #fff;
	background: var(--medium-blue);
}

.menu__link:hover {
	background: rgba(255, 255, 255, .08);
}

.menu__link.is-active {
	background: var(--panel);
	color: #000;
}

/* ===== Topbar ===== */
.hamburger {
	display:none;            /* viene mostrato solo sotto 920px */
	position:relative;
	width:40px;
	height:40px;
	border:2px solid var(--ink);
	border-radius:30px;
	background:var(--light-blue);         /* bottone chiaro, come nel mockup */
	cursor:pointer;
}
.hamburger::before,
.hamburger::after{
	content:"";
	position:absolute;
	left:50%;
	top:50%;
	width:20px;
	height:2px;
	background:var(--ink);
	transform:translate(-50%,-50%);
	transition:transform .2s ease, box-shadow .2s ease, opacity .2s ease;
}
/* le 3 linee: middle (before) + top/bottom via box-shadow */
.hamburger::before{
	box-shadow:
		0 -6px 0 0 var(--ink), /* top */
		0  6px 0 0 var(--ink); /* bottom */
}

/* stato focus/hover */
.hamburger:hover{ border-color: var(--brand); }
.hamburger:focus-visible{ outline:3px solid #8ecae6; outline-offset:2px; }

/* Mostra il bottone su mobile */
@media (max-width:920px){
	.hamburger{ display:inline-block; }
}

/* Stato “aperto”: trasforma in X */
.nav-toggle:checked ~ .topbar .hamburger{
	background:#fff;
}
.nav-toggle:checked ~ .topbar .hamburger::before{
	transform:translate(-50%,-50%) rotate(45deg);
	box-shadow:none;
}
.nav-toggle:checked ~ .topbar .hamburger::after{
	transform:translate(-50%,-50%) rotate(-45deg);
	opacity:1;
}

.topbar__left {
	display: flex;
	align-items: center;
	gap: 12px;
}

.course {
	display: flex;
	align-items: center;
	gap: 8px;
}

.course__label {
	color: var(--muted);
}

.course__badge {
	font-weight: 700;
}

.topbar__right {
	display: flex;
	align-items: center;
	gap: 12px;
}
.topbar__right a {
	color: #000000;
	text-decoration: none;
}

.avatar {
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: radial-gradient(circle at 35% 35%, #ccd7e6, #90a3bf);
}

/* ===== Grid dashboard =====
.home .grid,
.page-id-15 .grid {
	display: grid;
	gap: 24px;
	grid-template-columns: 1.4fr 1fr;
	grid-template-areas:
		"xl kpi"
		"comm mats";
}

.card {
	background: var(--panel);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	overflow: hidden;
}

.card--xl {
	grid-area: xl;
}

.card--kpi {
	grid-area: kpi;
}

.grid > .card:nth-of-type(3) {
	grid-area: comm;
}

.grid > .card:nth-of-type(4) {
	grid-area: mats;
}

.card__header {
	padding: 18px 20px 0;
}

.card__eyebrow {
	margin: 0;
	font-size: .95rem;
	text-transform: none;
	letter-spacing: .2px;
	color: var(--muted);
}

.card__body {
	padding: 12px 20px 20px;
}

.display {
	font-size: clamp(1.6rem, 1.4rem + 1.8vw, 2.4rem);
	margin: .25rem 0 .5rem;
}

.lead {
	font-weight: 700;
	margin: .25rem 0 .75rem;
}

.muted {
	color: var(--muted);
}

.kpi {
	font-weight: 800;
	font-size: clamp(2rem, 1.2rem + 4vw, 3.2rem);
	color: var(--ink);
	margin: .5rem 0 .25rem;
}

.btn-link {
	display: inline-block;
	margin-top: .5rem;
	text-decoration: none;
	color: var(--accent);
	font-weight: 700;
}

.btn-link:hover {
	text-decoration: underline;
} */

/* Timeline (comunicazioni) */
.timeline {
	list-style: none;
	margin: 0;
	padding: 0;
}

.timeline__item {
	padding: 12px 0 12px 22px;
	position: relative;
	border-top: 1px solid var(--border);
}

.timeline__item:first-child {
	border-top: 0;
}

.timeline__item::before {
	content: "";
	position: absolute;
	left: 0;
	top: 18px;
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: #9ca3af;
}

.timeline__item--alert::before {
	background: var(--accent-2);
}

.timeline__item--ok::before {
	background: var(--accent);
}

.timeline__title {
	font-weight: 700;
}

.timeline__desc {
	font-size: .95rem;
}

/* Files (materiali) */
.files {
	list-style: none;
	margin: 0;
	padding: 0;
}

.file {
	display: flex;
	gap: 10px;
	align-items: center;
	padding: 10px 0;
	text-decoration: none;
	color: inherit;
	border-top: 1px solid var(--border);
}

.file:first-child {
	border-top: 0;
}

.file__icon {
	width: 18px;
	height: 22px;
	background: conic-gradient(from 0turn, #ef4444 0 25%, #ef4444 25% 100%);
	clip-path: polygon(0 0, 80% 0, 100% 20%, 100% 100%, 0 100%);
}

.file__label {
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}









body:not(.home) .section-content {
	background: var(--panel);
	border-radius: 17px;
	margin: 0;
	padding: 40px;
	box-sizing: border-box;
}

.grid-form {
	display: grid;
	gap: 0 24px;
	grid-template-columns: 1fr 1fr;
	
}

input {
	border: 1px solid #CECECE !important;
	background: #F8F8F8 !important;
	color: #000;
	padding: 15px !important;
	border-radius: 2px;
}
input[disabled] {
	background: #DBDBDB !important;
}


.itc-notice {
	background: var(--accent);
	color: #fff;
	padding: 20px;
	margin-bottom: 24px;
}
.itc-notice.err {
	background: var(--accent-2);
}




.acf-notice.-error.acf-error-message.-dismiss {
	background: #c00;
	padding: 10px;
	text-align: center;
	color: #fff;
}
.acf-notice.-error.acf-error-message {
	color: #c00;
}
.acf-notice.-error.acf-error-message p {
	margin: 0;
}




.section-content table {
	
}
.section-content table th {
	background: #5F9068;
	color: #fff;
	font-weight: 700;
	border-left: 1px solid var(--panel);
	padding: 10px 20px;
}
.section-content table td {
	border-left: 1px solid var(--panel);
	padding: 10px 20px;
}

.section-content table tr:nth-child(odd),
.section-content table tbody tr:nth-child(odd) {
	background: #fff;
}
.section-content table tr:nth-child(even),
.section-content table tbody tr:nth-child(even) {
	background: #f8f8f8;
}

.section-content .itc-badge {
	color: var(--accent);
}
.section-content .itc-badge.itc-badge--ko {
	color: var(--accent-2);
}
.itc-badge--pending {
    color: #856404;
}



.itc-pres-agg {
	margin-bottom: 40px;
}
.itc-pres-agg__perc {
	font-size: 3.6rem;
	line-height: 4rem;
}
.itc-pres-agg__text {
	font-size: 2.6rem;
	line-height: 4rem;
}






/* ================================
   MODAL BASE
   ================================ */
.itc-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.itc-modal.is-open {
    display: flex;
}

.itc-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
}

/* ================================
   MODAL DIALOG
   ================================ */
.itc-modal__dialog {
    position: relative;
    background: #fff;
    width: 90%;
    max-width: 900px;
    padding: 40px;
    border-radius: 20px;
    max-height: 90vh;
    overflow-y: auto;
    z-index: 2;

    box-shadow: 0px 8px 22px rgba(0, 0, 0, 0.15);
    animation: itcModalFade 0.18s ease-out;
}

/* Animazione */
@keyframes itcModalFade {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ================================
   CLOSE BUTTON
   ================================ */
.itc-modal__close {
    position: absolute;
    top: 18px;
    right: 22px;
    font-size: 38px;
    border: none;
    background: transparent;
    cursor: pointer;
    color: #333;
    padding: 0;
}

/* ================================
   MODAL CONTENT
   ================================ */
.itc-modal__meta {
    font-size: 16px;
    margin-bottom: 10px;
    color: #333;
    font-weight: 500;
}

.itc-modal__sep {
    margin: 0 6px;
}

.itc-modal__title {
    margin: 0 0 20px;
    font-size: 26px;
    font-weight: 700;
    color: #003464;
}

.itc-modal__body p {
    font-size: 16px;
    line-height: 1.45;
    margin-bottom: 14px;
}

.itc-modal__body h3 {
    margin-top: 24px;
    margin-bottom: 6px;
    font-size: 18px;
    font-weight: 700;
}

.itc-modal__text p {
    margin-top: 0;
    margin-bottom: 12px;
}

/* ================================
   HIDDEN BLOCKS (non visibili)
   ================================ */
.itc-lesson-hidden {
    display: none;
}





@media (min-width: 920px) {
	#itc-calendario-years,
	#itc-mat-years,
	#itc-comm-years,
	.itc-presenze__topbar,
	.itc-calendario__years-form select.itc-select {
		float: right;
		margin-top: -60px;
		width: inherit;
		max-width: 100%;
		min-width: 200px;
	}
}

.itc-presenze__topbar,
.itc-calendario__topbar {
    margin-bottom: 20px;
}

.itc-presenze__years-form select.itc-select,
#itc-calendario-years,
#itc-mat-years,
#itc-comm-years,
#itc_registro_classe {
    padding: 10px 12px;
    border-radius: 7px;
    border: 1px solid #D3D3D3;
    font-size: 15px;
    min-width: 220px;
    background: #fff url("data:image/svg+xml;utf8,<svg fill='black' width='20' height='20' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'><path d='M5 7l5 5 5-5H5z'/></svg>") no-repeat right 10px center;
    appearance: none;
    cursor: pointer;
	color: var(--brand);
}



.itc-registro__topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.itc-registro__info span {
    font-size: 16px;
}

.itc-registro__sep {
    margin: 0 8px;
}

.itc-registro__class-form .itc-select {
    min-width: 260px;
}
.itc-table__actions {
    text-align: center;
    width: 60px;
}
.itc-registro__edit {
    text-decoration: none;
    font-size: 18px;
}




/* ============================
   MODAL BASE
   ============================ */
.itc-modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s ease, visibility .25s ease;
}

.itc-modal[aria-hidden="false"] {
    opacity: 1;
    visibility: visible;
}

.itc-modal-open {
    overflow: hidden;
}

/* ============================
   BACKDROP
   ============================ */
.itc-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .45);
}

/* ============================
   DIALOG
   ============================ */
.itc-modal__dialog {
    position: relative;
    background: #fff;
    max-width: 680px;
    width: 90%;
    border-radius: 14px;
    padding: 30px 40px;
    z-index: 2;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow:
        0 8px 24px rgba(0,0,0,.15),
        0 3px 7px rgba(0,0,0,.08);
}

/* ============================
   CLOSE BUTTON
   ============================ */
.itc-modal__close {
    position: absolute;
    top: 14px;
    right: 14px;
    background: none;
    border: none;
	line-height: 12px;
    line-height: 1;
    cursor: pointer;
    padding: 4px 6px;
    color: #333;
}

.itc-modal__close:hover {
    opacity: .6;
}

/* ============================
   TITOLI
   ============================ */
.itc-modal__title {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 25px;
    color: #003464;
}

/* ============================
   FORM
   ============================ */
.itc-form--modal .itc-form__group {
    margin-bottom: 20px;
}

.itc-label {
    font-weight: 600;
    display: block;
    margin-bottom: 6px;
}

.itc-input,
.itc-select {
    width: 100%;
    padding: 10px 12px;
    border-radius: 6px;
    border: 1px solid #ccc;
    font-size: 15px;
}

.itc-form__actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 25px;
}

.itc-btn--ghost {
    background: #fff;
    border: 1px solid #003464;
    color: #003464;
}

.itc-btn--ghost:hover {
    background: #f5f7fa;
}

/* Icona matita */
.itc-icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.itc-icon--edit::before {
    content: "✎";
    font-size: 18px;
    color: #003464;
}




/* Link “finto testo” sul titolo della lezione */
.itc-link {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    font: inherit;
    color: #173f6d;
    text-decoration: underline;
    cursor: pointer;
}

.itc-link--underline:hover {
    text-decoration: none;
}

/* Icona matitina nelle note */
.itc-icon-btn {
    background: none;
    border: none;
    padding: 0 0.25rem;
    margin: 0;
    font: inherit;
    cursor: pointer;
    line-height: 1;
    color: #666;
}

.itc-icon-btn:hover {
    color: #222;
}

/* Per evitare che il contenuto della cella “Note” salti */
.itc-note-inline {
    display: inline-block;
    margin-right: 0.25rem;
}



.reg-lez__th--azioni,
.reg-lez__td--azioni {
    text-align: center;
    width: 60px;
}

.reg-lez__edit {
    border: none;
    background: none;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
}

.reg-lez__edit-icon {
    font-size: 16px;
}



.itc-form__field {
	margin-bottom: 20px;
}



.itc-button--ghost {
	border: 0;
	padding: 0;
	margin: 0;
	background: transparent;
	text-decoration: underline;
	cursor: pointer;
	text-align: left;
}




.itc-mat__col--actions {
    width: 80px;
    text-align: center;
}

.itc-mat__actions {
    display: flex;
    gap: .5rem;
    justify-content: center;
}

.itc-mat__icon {
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    cursor: pointer;
}

/* Qui poi ci metti le tue icone SVG / background */
.itc-mat__icon--download { /* icona download attiva */ }
.itc-mat__icon--info { /* icona info */ }

.itc-mat__icon--disabled {
    opacity: .35;
    cursor: default;
}





.itc-mat__filters {
    margin: 1.5rem 0;
    background: #333;       /* nero come mockup */
    color: #fff;
    padding: 15px 20px;
    border-radius: 17px;
}

.itc-mat__filters-inner {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.itc-mat__filters-label {
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.itc-mat__filters-field .itc-select {
    min-width: 140px;
}






.itc-mat__form select {
	width: 100%;
	padding: 10px 12px;
	border-radius: 6px;
	border: 1px solid #ccc;
	font-size: 15px;
}
.itc-mat__form {
    margin: 1.5rem 0;
    padding: 1.5rem;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,.06);
}

.itc-mat__form-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem 1.5rem;
}

.itc-mat__form-field--full {
    grid-column: 1 / -1;
}

.itc-mat__form-field label {
    display: block;
    margin-bottom: .25rem;
}

.itc-mat__form-field input[type="text"],
.itc-mat__form-field input[type="file"],
.itc-mat__form-field select {
    width: 100%;
}

.itc-mat__form-actions {
    margin-top: 1rem;
    text-align: right;
}




.itc-mat__upload {
	float: right;
    margin-top: -60px;
}
.itc-mat__upload svg {
	margin-left: 10px;
}

.itc-mat__pagination {
    margin-top: 24px;
}

.itc-mat__pagination .page-numbers {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.itc-mat__pagination .page-numbers li {
    margin: 0;
}

.itc-mat__pagination .page-numbers a,
.itc-mat__pagination .page-numbers span {
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    border: 1px solid #d8dee8;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #12395f;
    text-decoration: none;
    font-weight: 600;
}

.itc-mat__pagination .page-numbers .current {
    background: #12395f;
    border-color: #12395f;
    color: #fff;
}

.itc-mat__pagination .page-numbers a:hover {
    border-color: #12395f;
}





/* ===== Avvisi / Comunicazioni ===== */

.itc-comm {
}

/* Lista a griglia (due colonne desktop, una su mobile) */
.itc-comm__list {
    margin-top: 4rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 4rem 5rem;
}

/* Card singola */
.itc-comm__item {
    position: relative;
    padding: 0 0 0 2rem;
    overflow: hidden;
}

/* Barra verticale colorata a sinistra */
.itc-comm__item::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    border-radius: 999px;
    background: #2f8b4b; /* default (docente) */
}

.itc-comm__item--seg::before {
    background: #d43737; /* segreteria = rosso */
}

.itc-comm__item--doc::before {
    background: #2f8b4b; /* docente = verde */
}

/* Riga meta in alto (data + badge) */
.itc-comm__meta {
    display: flex;
    align-items: center;
    margin-bottom: 0.6rem;
    gap: 0.8rem;
}

.itc-comm__date {
    font-size: 1.4rem;
    font-weight: 200;
    color: #6d6d6d;
}

/* Badge autore / avviso segreteria */
.itc-comm__badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.8rem;
    border-radius: 999px;
    font-size: 1.4rem;
    font-weight: 200;
    line-height: 1.2;
    white-space: nowrap;
    background: var(--brand);
    color: #ffffff;
}

.itc-comm__badge--seg {
    background: var(--brand); /* blu per "Avviso segreteria" */
}

.itc-comm__badge--doc {
    background: var(--brand); /* stesso stile per docente (puoi cambiare se vuoi differenziarli) */
}

/* Titolo comunicazione */
.itc-comm__title {
    font-size: 1.8rem;
    line-height: 1.4;
    font-weight: 700;
    color: #003464;
    margin: 0.4rem 0 0.4rem;
}

/* Testo riassunto */
.itc-comm__excerpt {
    font-size: 1.6rem;
    line-height: 1.5;
    color: #4a4a4a;
    margin: 0;
}

/* Link eventuale */
.itc-comm__link {
    margin-top: 0.8rem;
    font-size: 0.85rem;
}

.itc-comm__link a {
    text-decoration: underline;
    color: #003464;
    font-weight: 500;
}

/* Responsive: su schermi piccoli una colonna sola */
@media (max-width: 768px) {
    .itc-comm__list {
        grid-template-columns: 1fr;
        gap: 1.6rem;
    }

    .itc-comm__item {
        padding: 1.4rem 1.6rem;
    }
}





/* Clickarea per rendere cliccabile tutta la card */
.itc-comm__item {
    position: relative;
}

.itc-comm__clickarea {
    position: absolute;
    inset: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    padding: 0;
}

/* Non coprire i link interni */
.itc-comm__link a {
    position: relative;
    z-index: 1;
}

/* ===== MODALE AVVISI ===== */

.itc-comm__modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.itc-comm__modal.is-open {
    display: flex;
}

.itc-comm__modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.35);
}

.itc-comm__modal-dialog {
    position: relative;
    z-index: 1;
    max-width: 720px;
    width: calc(100% - 3rem);
    max-height: calc(100vh - 4rem);
    background: #ffffff;
    border-radius: 1.6rem;
    padding: 4rem 5rem;
    overflow-y: auto;
    box-shadow: 0 18px 40px rgba(0,0,0,0.18);
}

.itc-comm__modal-close {
    position: absolute;
    top: 0.8rem;
    right: 1rem;
    border: 0;
    background: transparent;
    font-size: 3rem;
    line-height: 1;
    cursor: pointer;
    color: #555;
}

.itc-comm__modal-content {
    margin-top: 0.6rem;
}

/* Meta nel popup */
.itc-comm__popup-meta {
    display: flex;
    align-items: center;
    /* justify-content: space-between; */
    gap: 0.8rem;
    margin-bottom: 0.8rem;
}

.itc-comm__popup-title {
    font-size: 2rem;
    font-weight: 700;
    color: #003464;
    margin: 0 0 0.8rem;
}

.itc-comm__popup-body {
    font-size: 1.8rem;
    line-height: 2rem;;
    color: #333;
}

.itc-comm__popup-body p:last-child {
    margin-bottom: 0;
}

.itc-comm__popup-link {
    margin-top: 1rem;
}

.itc-comm__popup-link a {
    text-decoration: underline;
    color: #003464;
    font-weight: 500;
}

/* Evita scroll sotto al modale */
.itc-comm--modal-open {
    overflow: hidden;
}

@media (max-width: 600px) {
    .itc-comm__modal-dialog {
        padding: 1.6rem 1.4rem;
        border-radius: 1.2rem;
    }
}








/* === LAYOUT GENERALE DASHBOARD =============================== */

.itc-dash {
    padding: 32px 40px 40px;
}

.itc-dash__header {
    margin-bottom: 24px;
}

.itc-dash__year {
    font-size: 14px;
    font-weight: 500;
    color: #003464;
    margin-bottom: 4px;
}

.itc-dash__title {
    font-size: 30px;
    line-height: 1.2;
    font-weight: 700;
    color: #003464;
}

/* Griglia 2 x 2 come nel mockup */
.itc-dash__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-auto-rows: minmax(0, auto);
    gap: 24px 24px;
}

/* Per il docente se vuoi una variante puoi usare un modificatore
.itc-dash__grid--docente { ... }
*/

/* === CARDS ==================================================== */

.itc-card {
    background: #f4f4f4;
    border-radius: 20px;
    padding: 24px 28px;
	grid-column: 1 / 1;
    grid-row: 1 / 1;
}

/* Card grande "Prossima lezione" che occupa tutta la larghezza sinistra */
.itc-dash__card--next {
    grid-column: 1 / 2;
    grid-row: 1 / 2;
}

/* Card presenza a destra in alto */
.itc-dash__card--presence {
    grid-column: 2 / 3;
    grid-row: 1 / 2;
}

/* Comunicazioni recenti in basso a sinistra */
.itc-dash__card--com {
    grid-column: 1 / 2;
    grid-row: 2 / 3;
}

/* Materiali recenti in basso a destra */
.itc-dash__card--mat {
    grid-column: 2 / 3;
    grid-row: 2 / 3;
}

/* === TIPOGRAFIA INTERNA ======================================= */

.itc-dash__kicker {
    font-size: 1.4rem;
    font-weight: 600;
    color: #003464;
    margin-bottom: 8px;
}

.itc-dash__bigtitle {
    font-size: 2.8rem;
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 4px;
    color: #333;
}

.itc-dash__subtitle {
    font-size: 1.8rem;
    font-weight: 500;
    margin: 0 0 12px;
    color: #333;
}

.itc-dash__meta {
    font-size: 1.4rem;
    color: #555;
    margin: 0;
}

.itc-dash__meta--light {
    margin-top: 2px;
    color: #777;
}

.itc-dash__empty {
    font-size: 1.4rem;
    color: #777;
}

.itc-dash__link a {
    display: inline-block;
    margin-top: 12px;
    font-size: 1.4rem;
    font-weight: 500;
    color: #1c6128;
    text-decoration: none;
}

.itc-dash__link a:hover {
    text-decoration: underline;
}

/* === PRESENZA PERSONALE ======================================= */

.itc-dash__card--presence .itc-dash__bigtitle {
    font-size: 2.6rem;
    color: #1c6128;
}

/* === LISTE: COMUNICAZIONI & MATERIALI ======================== */

.itc-dash__list {
    list-style: none;
    margin: 12px 0 0;
    padding: 0;
}

.itc-dash__list-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 1.4rem;
    padding: 8px 0;
    border-bottom: 1px solid rgba(0,0,0,0.04);
}

.itc-dash__list-item:last-child {
    border-bottom: none;
}

/* Barra colorata a sinistra per le comunicazioni */
.itc-dash__list--com .itc-dash__list-item::before {
    content: "";
    display: inline-block;
    width: 4px;
    height: 32px;
    border-radius: 999px;
    margin-right: 6px;
    background: #c62828; /* rosso base */
}

/* variante "positiva" se vuoi usare una classe aggiuntiva */
.itc-dash__list-item--ok::before {
    background: #1c6128;
}

.itc-dash__list-date {
    flex: 0 0 auto;
    color: #777;
    font-size: 13px;
    margin-right: 6px;
}

.itc-dash__list-title {
    flex: 1 1 auto;
    font-weight: 600;
    color: #333;
    text-decoration: none;
}

.itc-dash__list-title:hover {
    text-decoration: underline;
}

.itc-dash__list-meta {
    flex: 0 0 auto;
    font-size: 13px;
    color: #777;
}

/* Icona tipo file (PDF / DOC ecc.) per i materiali recenti */
.itc-dash__fileext {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 32px;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    margin-right: 6px;
    background: #b71c1c; /* rosso pdf di default */
}

/* se vuoi distinguere con classi tipo .itc-dash__fileext--doc ecc. */
.itc-dash__fileext--doc { background: #1c6128; }

/* === RESPONSIVE =============================================== */

@media (max-width: 1024px) {
    .itc-dash__grid {
        grid-template-columns: 1fr;
        grid-auto-rows: auto;
    }

    .itc-dash__card--next,
    .itc-dash__card--presence,
    .itc-dash__card--com,
    .itc-dash__card--mat {
        grid-column: 1 / -1;
        grid-row: auto;
    }
}

@media (max-width: 600px) {
    .itc-dash {
        padding: 24px 16px 32px;
    }

    .itc-card {
        padding: 20px 18px;
    }

    .itc-dash__bigtitle {
        font-size: 22px;
    }

    .itc-dash__subtitle {
        font-size: 16px;
    }
}




















/* ===== Responsiveness ===== */
@media (max-width: 1100px) {
	.grid {
		grid-template-columns: 1fr;
		grid-template-areas:
			"xl"
			"kpi"
			"comm"
			"mats";
	}
}

@media (max-width: 920px) {
	.site {
		grid-template-columns: 1fr;
		grid-template-rows: 56px auto;
		display: block;
	}

	.topbar {
		position: sticky;
		top: 0;
		z-index: 900;
	}

	.hamburger {
		display: inline-block;
	}

	.sidebar__close {
		display: block;
		width: 28px;
		height: 28px;
		position: absolute;
		right: 12px;
		top: 12px;
		border: 2px solid #fff;
		border-radius: 8px;
		cursor: pointer;
		background: linear-gradient(#fff, #fff) center / 18px 2px no-repeat;
	}

	/* toggle on */
	.nav-toggle:checked ~ .sidebar {
		transform: translateX(0);
	}
	
	
	/* Sidebar: slide-in da sinistra */
	.sidebar{
		position: fixed;
		inset: 0 auto 0 0;
		width: 280px;
		transform: translateX(-100%);
		transition: transform .25s ease, box-shadow .25s ease;
		z-index: 1000;
		box-shadow: 0 0 0 rgba(0,0,0,0);
	}
	.nav-toggle:checked ~ .sidebar{
		transform: translateX(0);
		box-shadow: 8px 0 24px rgba(0,0,0,.18);
	}

	/* Spostiamo a destra topbar + contenuto quando il menu è aperto */
	.topbar,
	.content{
		transition: transform .25s ease;
		will-change: transform;
	}

	.nav-toggle:checked ~ .topbar,
	.nav-toggle:checked ~ .content{
		transform: translateX(280px); /* uguale alla larghezza sidebar */
	}

	/* Assicuriamo che la X/hamburger resti sopra tutto */
	.topbar{ z-index: 1200; }
	.hamburger{ z-index: 1300; }

	/* (Opzionale) leggera velatura sul contenuto mentre il menu è aperto,
	   SENZA bloccare i click (la X resta cliccabile) */
	.nav-toggle:checked ~ .topbar::after,
	.nav-toggle:checked ~ .content::after{
		content:"";
		position: fixed;
		inset: 0;
		background: rgba(3,22,43,.20);
		pointer-events: none;
	}
	
	
	
	#logoLogin {
    	margin: 100px auto 20px;
	}
	
	.amem-form .acf-fields>.acf-field {
    	width: 100% !important;
	}
	.acf-field .acf-label {
		margin: 0 0 5px;
	}
	#colophon,
	#colophon .textRight {
		text-align: center;
	}
	
	.content {
		padding: 20px;
	}
	.itc-dash {
        padding: 0;
    }
	.topbar {
		padding: 10px 20px;
	}
	
	body:not(.home) .section-content {
		padding: 20px;
	}
	.grid h1 {
	    font-size: 2.6rem;
    	line-height: 3rem;
	}
	
	
	
	.grid-form {
    	display: block;
	}
	
	.itc-mat__filters-inner .itc-mat__filters-field {
		width: 100%;
	}
	
}

/* ===== A11y/focus ===== */
:focus-visible {
	outline: 3px solid #8ecae6;
	outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
	* {
		animation: none !important;
		transition: none !important;
	}
}





/*
*
*
* // da qui partono le formattazioni per le tabelle su mobile.
*
*
*/

@media (max-width: 600px) {

    /* Nascondo l'header, trasformo le righe in card */
    .itc-table--calendario thead {
        display: none;
    }

    .itc-table--calendario tbody,
    .itc-table--calendario tr,
    .itc-table--calendario td {
        display: block;
        width: 100%;
    }

    .itc-table--calendario tbody tr {
        margin-bottom: 1.4rem;
        border-radius: 12px;
        background: #fff;
        overflow: hidden;
        border: 1px solid #e5e7eb;
    }

    .itc-table--calendario tbody td {
        padding: 8px 14px;
        border-bottom: 1px solid #f3f4f6;
    }

    .itc-table--calendario tbody td:last-child {
        border-bottom: 0;
    }

    /* Label a sinistra, valore a destra */
    .itc-table--calendario tbody td::before {
        content: "";
        display: block;
        font-weight: 600;
        color: #555;
        font-size: 1.3rem;
        margin-bottom: 2px;
    }

    .itc-table--calendario tbody td:nth-child(1)::before { content: "Data"; }
    .itc-table--calendario tbody td:nth-child(2)::before { content: "Orario"; }
    .itc-table--calendario tbody td:nth-child(3)::before { content: "Materia"; }
    .itc-table--calendario tbody td:nth-child(4)::before { content: "Titolo lezione"; }
    .itc-table--calendario tbody td:nth-child(5)::before { content: "Docente"; }
    .itc-table--calendario tbody td:nth-child(6)::before { content: "Note"; }

    /* Riga "vuota": nessuna label, solo messaggio centrato */
    .itc-table--calendario td.itc-table__empty {
        text-align: center;
        border-bottom: 0;
    }
    .itc-table--calendario td.itc-table__empty::before {
        content: "";
        display: none;
    }
}


@media (max-width: 600px) {

    .itc-table--presenze thead {
        display: none;
    }

    .itc-table--presenze tbody,
    .itc-table--presenze tr,
    .itc-table--presenze td {
        display: block;
        width: 100%;
    }

    .itc-table--presenze tbody tr {
        margin-bottom: 1.4rem;
        border-radius: 12px;
        background: #fff;
        overflow: hidden;
        border: 1px solid #e5e7eb;
    }

    .itc-table--presenze tbody td {
        padding: 8px 14px;
        border-bottom: 1px solid #f3f4f6;
    }

    .itc-table--presenze tbody td:last-child {
        border-bottom: 0;
    }

    .itc-table--presenze tbody td::before {
        content: "";
        display: block;
        font-weight: 600;
        color: #555;
        font-size: 1.3rem;
        margin-bottom: 2px;
    }

    .itc-table--presenze tbody td:nth-child(1)::before { content: "Data"; }
    .itc-table--presenze tbody td:nth-child(2)::before { content: "Materia"; }
    .itc-table--presenze tbody td:nth-child(3)::before { content: "Docente"; }
    .itc-table--presenze tbody td:nth-child(4)::before { content: "Stato"; }
    .itc-table--presenze tbody td:nth-child(5)::before { content: "Entrata"; }
    .itc-table--presenze tbody td:nth-child(6)::before { content: "Uscita"; }

    .itc-table--presenze td.itc-table__empty {
        text-align: center;
        border-bottom: 0;
    }
    .itc-table--presenze td.itc-table__empty::before {
        content: "";
        display: none;
    }
}


@media (max-width: 600px) {

    /* Niente header tabellare */
    .itc-docs__table thead {
        display: none;
    }

    /* Trasformo le righe in blocchi/card */
    .itc-docs__table tbody,
    .itc-docs__table tr,
    .itc-docs__table td {
        display: block;
        width: 100%;
    }

    .itc-docs__table tbody tr {
        margin-bottom: 1.4rem;
        border-radius: 12px;
        background: #fff;
        overflow: hidden;
        border: 1px solid #e5e7eb;
    }

    .itc-docs__table tbody td {
        padding: 8px 14px;
        border-bottom: 1px solid #f3f4f6;
    }

    .itc-docs__table tbody td:last-child {
        border-bottom: 0;
    }

    /* Label sopra al valore */
    .itc-docs__table tbody td::before {
        content: "";
        display: block;
        font-weight: 600;
        color: #555;
        font-size: 1.3rem;
        margin-bottom: 2px;
    }

    /* Colonne: Data, Titolo, Tipo, Descrizione, Azioni */
    .itc-docs__table tbody td:nth-child(1)::before { content: "Data"; }
    .itc-docs__table tbody td:nth-child(2)::before { content: "Titolo"; }
    .itc-docs__table tbody td:nth-child(3)::before { content: "Tipo"; }
    .itc-docs__table tbody td:nth-child(4)::before { content: "Descrizione"; }
    .itc-docs__table tbody td:nth-child(5)::before { content: "Azioni"; }

    /* Colonna azioni: destra */
    .itc-docs__table td.itc-mat__col--actions {
        text-align: right;
    }

    /* Riga "nessun documento" */
    .itc-docs__table td.itc-table__empty {
        text-align: center;
        border-bottom: 0;
    }
    .itc-docs__table td.itc-table__empty::before {
        content: "";
        display: none;
    }
}



@media (max-width: 600px) {

    /* Nascondiamo l'header della tabella */
    .itc-mat__table thead {
        display: none;
    }

    /* Righe diventano blocchi */
    .itc-mat__table tbody,
    .itc-mat__table tr,
    .itc-mat__table td {
        display: block;
        width: 100%;
    }

    .itc-mat__table tbody tr {
        margin-bottom: 1.4rem;
        border-radius: 12px;
        background: #fff;
        overflow: hidden;
        border: 1px solid #e5e7eb;
    }

    .itc-mat__table tbody td {
        padding: 8px 14px;
        border-bottom: 1px solid #f3f4f6;
    }

    .itc-mat__table tbody td:last-child {
        border-bottom: 0;
    }

    /* Label prima del contenuto */
    .itc-mat__table tbody td::before {
        content: "";
        display: block;
        font-weight: 600;
        color: #555;
        font-size: 1.3rem;
        margin-bottom: 2px;
    }

    /* Labels per colonna */
    .itc-mat__table tbody td:nth-child(1)::before { content: "Data"; }
    .itc-mat__table tbody td:nth-child(2)::before { content: "Titolo"; }
    .itc-mat__table tbody td:nth-child(3)::before { content: "Tipo"; }
    .itc-mat__table tbody td:nth-child(4)::before { content: "Lezione/modulo"; }
    .itc-mat__table tbody td:nth-child(5)::before { content: "Docente"; }
    .itc-mat__table tbody td:nth-child(6)::before { content: "Azioni"; }

    /* Colonna azioni allineata a destra */
    .itc-mat__table td.itc-mat__col--actions {
        text-align: right;
    }

    /* Caso "nessun materiale" */
    .itc-mat__table td.itc-table__empty {
        text-align: center;
        border-bottom: 0;
    }
    .itc-mat__table td.itc-table__empty::before {
        content: "";
        display: none;
    }
}





