.cr-calendar{--cr-border:#dfe3e8;--cr-bg:#fff;--cr-muted:#6b7280;--cr-text:#17202a;--cr-event-pad:8px;--cr-event-font:16px;font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:var(--cr-text);background:var(--cr-bg);font-size:16px}.cr-top{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:5px 8px;border-bottom:1px solid var(--cr-border);line-height:1.1}.cr-date-now{font-size:1.05em}.cr-clock{font-size:1.1em;font-weight:800;font-variant-numeric:tabular-nums}.cr-table-scroll{overflow-x:auto;-webkit-overflow-scrolling:touch}.cr-table{width:100%}.cr-head-transposed,.cr-person-row{display:grid}.cr-head-transposed{font-weight:800;border-bottom:1px solid var(--cr-border)}.cr-head-transposed>div{padding:7px 5px;border-right:1px solid var(--cr-border)}.cr-person-head{color:var(--cr-muted);display:flex;align-items:center;font-size:.72em;position:sticky;left:0;z-index:3;background:#fff}.cr-day-col{display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center}.cr-dayname{font-weight:900;font-size:.9em}.cr-daydate{font-size:.72em;color:var(--cr-muted);margin-top:1px}.cr-today-head{background:#fff7db}.cr-person-row{border-bottom:1px solid var(--cr-border);min-height:86px}.cr-person-name{padding:7px 5px;font-weight:900;font-size:.9em;line-height:1.05;overflow-wrap:anywhere;hyphens:auto;display:flex;align-items:center;border-right:2px solid var(--cr-border);background:#f7f8fa;position:sticky;left:0;z-index:2}.cr-cell{padding:5px;border-right:1px solid var(--cr-border);min-width:0}.cr-today-cell{background:#fffdf4}.cr-event{border-left:6px solid var(--cr-event-color,#8b949e);background:color-mix(in srgb,var(--cr-event-color,#8b949e) 9%,white);border-radius:7px;padding:var(--cr-event-pad);margin-bottom:5px;font-size:var(--cr-event-font)}.cr-event:last-child{margin-bottom:0}.cr-event-main{display:flex;gap:6px;align-items:flex-start}.cr-event-main>div{min-width:0}.cr-icon{font-size:1.12em;line-height:1}.cr-event-title{font-weight:850;line-height:1.08;overflow-wrap:anywhere}.cr-event-meta{font-size:.72em;color:var(--cr-muted);margin-top:2px}.cr-event-meta:empty{display:none}.cr-notes{font-size:.7em;margin:4px 0 0 25px;color:#4b5563;line-height:1.1}.cr-empty{display:flex;align-items:center;justify-content:center;height:100%;min-height:54px;color:#b0b6bd;font-size:1.15em}.cr-size-compact{--cr-event-pad:4px;--cr-event-font:13px}.cr-size-normal{--cr-event-pad:7px;--cr-event-font:15px}.cr-size-large{--cr-event-pad:10px;--cr-event-font:18px}@media(max-width:760px){.cr-calendar{font-size:14px}.cr-person-name{padding:5px}.cr-cell{padding:4px}.cr-notes{margin-left:0}}

/* Dimensione del singolo evento: sovrascrive la densità globale solo per l'evento scelto. */
.cr-event.cr-event-small{padding:4px;font-size:13px}
.cr-event.cr-event-normal{padding:7px;font-size:15px}
.cr-event.cr-event-large{padding:11px;font-size:19px}
.cr-event.cr-event-large .cr-event-title{line-height:1.12}

/* v0.7.2 - allineamento uniforme eventi */
.cr-event-main{display:grid;grid-template-columns:1.35em minmax(0,1fr);column-gap:6px;align-items:start}
.cr-icon{width:1.35em;min-width:1.35em;text-align:center;display:block;line-height:1.08}
.cr-event-title{text-transform:uppercase}
.cr-event-meta{margin-left:0}

/* v0.7.3 - leggibilità TV e allineamento icone */
.cr-person-name{text-transform:uppercase}
.cr-event-meta{color:#000;font-weight:600}
.cr-event-main{grid-template-columns:1.5em minmax(0,1fr);column-gap:7px;align-items:start}
.cr-icon{
  width:1.5em;
  min-width:1.5em;
  height:1.5em;
  font-size:1em;
  line-height:1.5em;
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  overflow:visible;
}
.cr-event-small .cr-icon{font-size:13px;width:19.5px;min-width:19.5px;height:19.5px;line-height:19.5px}
.cr-event-normal .cr-icon{font-size:15px;width:22.5px;min-width:22.5px;height:22.5px;line-height:22.5px}
.cr-event-large .cr-icon{font-size:19px;width:28.5px;min-width:28.5px;height:28.5px;line-height:28.5px}

/* v0.7.4 - contenuto HTML nelle note */
.cr-notes p{margin:0 0 3px}.cr-notes p:last-child{margin-bottom:0}
.cr-notes ul,.cr-notes ol{margin:2px 0 3px 18px;padding:0}
.cr-notes li{margin:0 0 1px;padding:0}
.cr-notes strong{font-weight:800}.cr-notes em{font-style:italic}

/* v0.7.5 - più spazio ai giorni, persona ridotta al minimo */
.cr-person-name,.cr-person-head{box-sizing:border-box}
.cr-person-name{justify-content:center;text-align:center;padding:5px 3px;font-size:.82em;line-height:1.02;overflow-wrap:anywhere;word-break:normal}
.cr-person-head{justify-content:center;text-align:center;padding:5px 2px}
.cr-notes{white-space:normal}

/* v0.7.6 - note a tutta larghezza sotto intestazione evento */
.cr-notes{
  display:block;
  width:100%;
  box-sizing:border-box;
  margin:6px 0 0 0 !important;
  padding:0;
  line-height:1.16;
  white-space:normal;
  overflow-wrap:anywhere;
}
.cr-notes p{margin:0 0 2px 0}
.cr-notes p:last-child{margin-bottom:0}
.cr-notes ul,.cr-notes ol{margin:2px 0 2px 17px;padding:0}

/* v0.7.7 - leggibilità note */
.cr-notes{
  color:#000 !important;
  font-size:14px !important;
  line-height:1.2;
}
.cr-notes p,.cr-notes li,.cr-notes span,.cr-notes strong,.cr-notes em{
  color:#000 !important;
}
.cr-notes p{margin:0 0 3px 0}
.cr-notes br{display:block;content:"";margin:0}

/* v0.7.8 - colonna persone ultra-compatta */
.cr-person-name{
  justify-content:flex-start !important;
  text-align:left !important;
  padding-left:5px !important;
  padding-right:2px !important;
  font-size:.82em;
  white-space:normal;
}
.cr-person-head{
  padding:0 !important;
  min-width:0;
}


/* v0.8.3 - colore persona e separatori originali */
.cr-person-row{border-bottom:1px solid var(--cr-border)}
.cr-person-row .cr-person-name,
.cr-person-row .cr-cell{
  background:color-mix(in srgb,var(--cr-person-color,#fff) 18%,white);
}
.cr-person-row .cr-today-cell{
  background:color-mix(in srgb,var(--cr-person-color,#fff) 14%,#fffdf4);
}

/* v0.8.5 - navigazione settimane sotto il calendario */
.cr-week-nav{
  display:flex;
  justify-content:center;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
  padding:10px 4px 4px;
}
.cr-week-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:32px;
  padding:5px 10px;
  border:1px solid #c8c8c8;
  border-radius:6px;
  background:#fff;
  color:#111 !important;
  text-decoration:none !important;
  font-size:12px;
  font-weight:700;
  line-height:1;
}
.cr-week-btn:hover{background:#f3f3f3}
.cr-week-today{min-width:58px}

/* v1.1.0 - tema scuro dashboard */
.cr-calendar.cr-theme-dark{background:#15171a;color:#f3f4f6;--cr-border:#3b3f45}
.cr-theme-dark .cr-top{background:#15171a;color:#f5f5f5}
.cr-theme-dark .cr-head,.cr-theme-dark .cr-person-head,.cr-theme-dark .cr-day-col{background:#22252a!important;color:#f5f5f5!important;border-color:#3b3f45!important}
.cr-theme-dark .cr-person-row{border-color:#3b3f45!important}
.cr-theme-dark .cr-person-name,.cr-theme-dark .cr-cell{background:color-mix(in srgb,var(--cr-person-color,#555) 24%,#191b1f)!important;color:#f3f4f6!important;border-color:#3b3f45!important}
.cr-theme-dark .cr-today-head{background:#3a351d!important}
.cr-theme-dark .cr-today-cell{background:color-mix(in srgb,var(--cr-person-color,#555) 18%,#302d1d)!important}
.cr-theme-dark .cr-empty{color:#777}
.cr-theme-dark .cr-week-nav{background:#15171a}
.cr-theme-dark .cr-week-btn{background:#25282d;border-color:#4b5058;color:#f5f5f5!important}
.cr-theme-dark .cr-week-btn:hover{background:#30343a}
.cr-theme-dark .cr-event{box-shadow:0 1px 3px rgba(0,0,0,.45)}

/* v1.1.1 - Dark mode: contrasto e superficie completa */
html:has(.cr-calendar.cr-theme-dark),
body:has(.cr-calendar.cr-theme-dark){
  background:#111315 !important;
}
body:has(.cr-calendar.cr-theme-dark) #page,
body:has(.cr-calendar.cr-theme-dark) .site,
body:has(.cr-calendar.cr-theme-dark) .site-content,
body:has(.cr-calendar.cr-theme-dark) .content-area,
body:has(.cr-calendar.cr-theme-dark) main,
body:has(.cr-calendar.cr-theme-dark) article,
body:has(.cr-calendar.cr-theme-dark) .entry-content{
  background:#111315 !important;
}

.cr-calendar.cr-theme-dark{
  background:#111315 !important;
  color:#f7f7f7 !important;
  border:1px solid #3f444b !important;
  box-shadow:0 0 0 1px #090a0b inset;
}

.cr-theme-dark .cr-top{
  background:#17191c !important;
  color:#fff !important;
  border-color:#444950 !important;
}
.cr-theme-dark .cr-top *{color:#fff !important}

.cr-theme-dark .cr-head,
.cr-theme-dark .cr-person-head,
.cr-theme-dark .cr-day-col{
  background:#202328 !important;
  color:#fff !important;
  border-color:#444950 !important;
}
.cr-theme-dark .cr-head *,
.cr-theme-dark .cr-day-col *{
  color:#fff !important;
}
.cr-theme-dark .cr-today-head,
.cr-theme-dark .cr-day-col.cr-today-head{
  background:#45401f !important;
}

.cr-theme-dark .cr-person-row{
  border-color:#444950 !important;
}
.cr-theme-dark .cr-person-name{
  color:#fff !important;
  text-shadow:0 1px 1px rgba(0,0,0,.65);
}
.cr-theme-dark .cr-cell{
  border-color:#444950 !important;
}
.cr-theme-dark .cr-empty{
  color:#a7abb0 !important;
}

/* Le schede evento restano chiare: tutto il testo deve quindi essere scuro. */
.cr-theme-dark .cr-event,
.cr-theme-dark .cr-event *{
  color:#101214 !important;
}
.cr-theme-dark .cr-event-title{
  color:#111 !important;
  font-weight:800 !important;
}
.cr-theme-dark .cr-event-meta{
  color:#111 !important;
  font-weight:700 !important;
}
.cr-theme-dark .cr-notes,
.cr-theme-dark .cr-notes *{
  color:#111 !important;
}
.cr-theme-dark .cr-event{
  border-color:rgba(255,255,255,.16);
  box-shadow:0 1px 3px rgba(0,0,0,.55);
}

/* Navigazione completamente scura e leggibile */
.cr-theme-dark + .cr-week-nav,
.cr-theme-dark .cr-week-nav{
  background:#111315 !important;
  border-color:#111315 !important;
}
.cr-theme-dark + .cr-week-nav .cr-week-btn,
.cr-theme-dark .cr-week-btn{
  background:#24272b !important;
  color:#fff !important;
  border:1px solid #555b63 !important;
  box-shadow:none !important;
}
.cr-theme-dark + .cr-week-nav .cr-week-btn:hover,
.cr-theme-dark .cr-week-btn:hover{
  background:#34383e !important;
  color:#fff !important;
}

/* v1.1.3 - leggibilità eventi in Dark Mode */
.cr-calendar.cr-theme-dark .cr-event,
.cr-calendar.cr-theme-dark .cr-event *,
.cr-calendar.cr-theme-dark .cr-event-title,
.cr-calendar.cr-theme-dark .cr-event-meta,
.cr-calendar.cr-theme-dark .cr-notes,
.cr-calendar.cr-theme-dark .cr-notes p,
.cr-calendar.cr-theme-dark .cr-notes li,
.cr-calendar.cr-theme-dark .cr-notes span,
.cr-calendar.cr-theme-dark .cr-notes strong,
.cr-calendar.cr-theme-dark .cr-notes em,
.cr-calendar.cr-theme-dark .cr-notes a{
  color:#f7f7f7 !important;
}
.cr-calendar.cr-theme-dark .cr-event-title{
  font-weight:800 !important;
}
.cr-calendar.cr-theme-dark .cr-event-meta{
  color:#e3e6e8 !important;
  font-weight:700 !important;
}
.cr-calendar.cr-theme-dark .cr-notes,
.cr-calendar.cr-theme-dark .cr-notes *{
  color:#ffffff !important;
}

/* v1.1.4 - Dark Mode: testi eventi senza grassetto */
.cr-calendar.cr-theme-dark .cr-event,
.cr-calendar.cr-theme-dark .cr-event *,
.cr-calendar.cr-theme-dark .cr-event-title,
.cr-calendar.cr-theme-dark .cr-event-meta,
.cr-calendar.cr-theme-dark .cr-notes,
.cr-calendar.cr-theme-dark .cr-notes *{
  font-weight:400 !important;
}

/* v1.1.5 - Dark Mode: nessun grassetto in tutta la dashboard */
.cr-calendar.cr-theme-dark,
.cr-calendar.cr-theme-dark *,
.cr-calendar.cr-theme-dark *::before,
.cr-calendar.cr-theme-dark *::after,
.cr-calendar.cr-theme-dark + .cr-week-nav,
.cr-calendar.cr-theme-dark + .cr-week-nav *{
  font-weight:400 !important;
}

/* v1.1.6 - Dark Mode: conserva i colori originali dei Tipi evento */
.cr-calendar.cr-theme-dark .cr-event{
  background-color:var(--cr-event-bg, revert) !important;
}
/* Se il colore è già impostato inline dal plugin, deve avere priorità sul tema scuro. */
.cr-calendar.cr-theme-dark .cr-event[style]{
  background:var(--cr-event-bg, revert);
}

/* v1.1.7 - Dark Mode: scheda nera, colore tipo solo sulla linguetta sinistra */
.cr-calendar.cr-theme-dark .cr-event,
.cr-calendar.cr-theme-dark .cr-event[style]{
  background:#111315 !important;
  background-color:#111315 !important;
}
/* Non sovrascrivere border-left: resta quello colorato impostato dal Tipo evento. */
.cr-calendar.cr-theme-dark .cr-event,
.cr-calendar.cr-theme-dark .cr-event *{
  color:#f7f7f7 !important;
  font-weight:400 !important;
}

/* v1.1.8 - Dark Mode: linguetta laterale identica al colore del Tipo evento */
.cr-calendar.cr-theme-dark .cr-event,
.cr-calendar.cr-theme-dark .cr-event[style]{
  background:#111315 !important;
  background-color:#111315 !important;
  border-left-color:var(--cr-event-color,#8b949e) !important;
}

/* v1.2.0 - Lightbox eventi */
.cr-event{cursor:pointer}
.cr-event-lightbox{
  position:fixed; inset:0; z-index:999999;
  display:none; align-items:center; justify-content:center;
  padding:28px;
  background:rgba(0,0,0,.82);
  backdrop-filter:blur(3px);
}
.cr-event-lightbox.cr-open{display:flex}
.cr-event-lightbox-card{
  position:relative;
  width:min(760px,92vw);
  max-height:88vh;
  overflow:auto;
  box-sizing:border-box;
  padding:30px 34px;
  border-radius:14px;
  background:#fff;
  color:#111;
  border-left:8px solid #888;
  box-shadow:0 18px 70px rgba(0,0,0,.55);
}
.cr-event-lightbox-content{font-size:24px;line-height:1.35}
.cr-event-lightbox-content .cr-event{background:transparent!important;border:0!important;box-shadow:none!important;padding:0!important;font-size:inherit!important;cursor:default}
.cr-event-lightbox-content .cr-event-main{grid-template-columns:1.7em minmax(0,1fr);column-gap:12px}
.cr-event-lightbox-content .cr-icon{font-size:28px!important;width:1.7em!important;min-width:1.7em!important;height:1.7em!important;line-height:1.7em!important}
.cr-event-lightbox-content .cr-event-title{font-size:30px!important;line-height:1.15}
.cr-event-lightbox-content .cr-event-meta{font-size:19px!important;margin-top:3px}
.cr-event-lightbox-content .cr-notes{font-size:24px!important;line-height:1.35!important;margin-top:18px!important}
.cr-event-lightbox-close{
  position:absolute; top:8px; right:12px;
  width:44px; height:44px; padding:0;
  border:0; background:transparent; color:#222;
  font:400 38px/44px Arial,sans-serif;
  cursor:pointer;
}
.cr-event-lightbox.cr-dark .cr-event-lightbox-card{background:#111315;color:#f7f7f7;border:1px solid #4b5058;border-left-width:8px}
.cr-event-lightbox.cr-dark .cr-event-lightbox-card *,
.cr-event-lightbox.cr-dark .cr-event-lightbox-close{color:#f7f7f7!important;font-weight:400!important}
body.cr-lightbox-open{overflow:hidden}

/* v1.3.0 - Filtro tipi evento */
.cr-top{display:grid!important;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:center;position:relative}
.cr-top-date{justify-self:start;min-width:0}.cr-top>.cr-clock{justify-self:end}
.cr-filter-wrap{position:relative;justify-self:center}
.cr-filter-button{border:1px solid #c8cdd3;border-radius:7px;background:#f7f8fa;color:#17202a;padding:5px 13px;font:inherit;font-size:.78em;cursor:pointer}
.cr-filter-button.cr-filter-active::after{content:" •";font-size:1.25em}
.cr-filter-panel{position:absolute;z-index:10000;top:calc(100% + 7px);left:50%;transform:translateX(-50%);width:max-content;min-width:210px;max-width:min(90vw,360px);padding:9px;border:1px solid #cfd4da;border-radius:9px;background:#fff;color:#17202a;box-shadow:0 10px 30px rgba(0,0,0,.22)}
.cr-filter-panel[hidden]{display:none!important}
.cr-filter-option{display:flex;align-items:center;gap:8px;padding:6px 5px;cursor:pointer;white-space:nowrap}
.cr-filter-option input{margin:0}.cr-filter-dot{width:11px;height:11px;border-radius:50%;background:var(--cr-filter-color,#8b949e);flex:0 0 11px}
.cr-filter-actions{display:flex;justify-content:flex-end;border-bottom:1px solid #e2e5e9;padding:0 0 6px;margin-bottom:3px}
.cr-filter-all{border:0;background:transparent;color:inherit;cursor:pointer;font:inherit;font-size:.78em;padding:2px 4px}
.cr-event.cr-filter-hidden{display:none!important}
.cr-calendar.cr-theme-dark .cr-filter-button{background:#24272b!important;color:#f7f7f7!important;border-color:#555b63!important}
.cr-calendar.cr-theme-dark .cr-filter-panel{background:#1b1e22!important;color:#f7f7f7!important;border-color:#555b63!important}
.cr-calendar.cr-theme-dark .cr-filter-actions{border-color:#3d4248}
.cr-calendar.cr-theme-dark .cr-filter-button,.cr-calendar.cr-theme-dark .cr-filter-panel,.cr-calendar.cr-theme-dark .cr-filter-panel *{font-weight:400!important}

/* v1.4.0 - Allegati eventi */
.cr-lightbox-attachments{margin-top:22px;padding-top:14px;border-top:1px solid #d8dce1}
.cr-lightbox-attachments-title{font-size:18px;margin-bottom:8px}
.cr-lightbox-attachment{display:block;padding:7px 0;font-size:18px;text-decoration:none!important}
.cr-lightbox-attachment img{display:block;max-width:100%;max-height:52vh;object-fit:contain;border-radius:6px;margin-top:8px}
.cr-event-lightbox.cr-dark .cr-lightbox-attachments{border-color:#444}

/* v1.5.0 - Barra filtri rapidi */
.cr-filter-bar{display:flex;align-items:center;justify-content:center;gap:6px;position:relative;white-space:nowrap}
.cr-quick-filters{display:flex;align-items:center;gap:6px}
.cr-quick-filter-button{border:1px solid #c8cdd3;border-radius:7px;background:#f7f8fa;color:#17202a;padding:5px 10px;font:inherit;font-size:.78em;cursor:pointer}
.cr-quick-filter-button.cr-active{box-shadow:inset 0 0 0 2px var(--cr-quick-color,#777);border-color:var(--cr-quick-color,#777)}
.cr-calendar.cr-theme-dark .cr-quick-filter-button{background:#24272b!important;color:#f7f7f7!important;border-color:#555b63!important;font-weight:400!important}
.cr-calendar.cr-theme-dark .cr-quick-filter-button.cr-active{border-color:var(--cr-quick-color,#aaa)!important;box-shadow:inset 0 0 0 2px var(--cr-quick-color,#aaa)}

/* v1.5.1 - Visualizzatore immagini allegati sopra la lightbox */
.cr-attachment-viewer{position:fixed;inset:0;z-index:1000001;background:rgba(0,0,0,.94);display:flex;align-items:center;justify-content:center;padding:34px}
.cr-attachment-viewer[hidden]{display:none!important}
.cr-attachment-viewer-inner{position:relative;display:flex;align-items:center;justify-content:center;width:100%;height:100%}
.cr-attachment-viewer-image{display:block;max-width:96vw;max-height:92vh;object-fit:contain}
.cr-attachment-viewer-close{position:fixed;top:18px;right:24px;z-index:1000002;border:0;background:transparent;color:#fff;font-size:42px;line-height:1;cursor:pointer;padding:4px 10px}

/* v1.5.2 - Filtro persona cliccando sul nome */
.cr-person-filter{cursor:pointer;transition:filter .15s ease,box-shadow .15s ease}
.cr-person-filter:hover{filter:brightness(1.08)}
.cr-person-filter.cr-person-active{box-shadow:inset 4px 0 0 currentColor,inset 0 0 0 2px currentColor}
.cr-person-row.cr-person-hidden{display:none!important}
.cr-calendar.cr-theme-dark .cr-person-filter{font-weight:400!important}

/* v1.5.3 - Filtro giorno */
.cr-day-filter{cursor:pointer;transition:filter .15s ease,box-shadow .15s ease}
.cr-day-filter:hover{filter:brightness(1.08)}
.cr-day-filter.cr-day-active{box-shadow:inset 0 -4px 0 currentColor,inset 0 0 0 2px currentColor}
.cr-day-col.cr-day-hidden,.cr-cell.cr-day-hidden{display:none!important}
.cr-calendar.cr-theme-dark .cr-day-filter{font-weight:400!important}
