/* ===================================================================
   app.css — Legacy applicativo (non coperto da bootstrap-custom.css)
   Calendar, Catalogo corsi, Keyword, Price list, Form specifici
   =================================================================== */

/* --- Calendar (non intaccato) --- */
.calendar-page{width:100%}.calendar-toolbar{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;margin-bottom:14px}.calendar-actions{display:flex;align-items:center;gap:16px;flex-wrap:wrap}.calendar-nav-actions,.calendar-view-actions,.calendar-report-actions{display:flex;gap:6px;align-items:center}.calendar-view-actions,.calendar-report-actions{padding-left:16px;border-left:1px solid #cbdccd}.calendar-layout{display:grid;grid-template-columns:minmax(0,1fr) 270px;gap:12px;align-items:start}.calendar-main{min-width:0}.calendar-filters{margin:0 0 12px;position:sticky;top:12px;background:#f8fbf9;border-color:#c9ddcf}.calendar-filters .form-grid{display:grid;grid-template-columns:1fr;gap:8px}.calendar-filters p{margin:0}.calendar-filters label{font-size:13px;color:#123f2b}.calendar-filters .actions{margin-top:10px}.calendar-shell{background:#fff;border:1px solid #dbe7df;border-radius:8px;overflow-x:hidden;overflow-y:visible;box-shadow:0 8px 22px rgba(20,34,27,.05)}.calendar-grid{display:grid;position:relative}.calendar-head{position:sticky;top:0;background:#f8fbf9;z-index:3;border-bottom:1px solid #dbe7df;padding:10px;text-align:center;font-weight:800}.calendar-time{background:#fbfdfc;border-right:1px solid #dbe7df;border-bottom:1px solid #eef3ef;padding:8px;color:#647067;font-size:13px;text-align:right;z-index:1}.calendar-cell{border-right:1px solid #eef3ef;border-bottom:1px solid #eef3ef;padding:5px;background:#fff;min-height:0}.calendar-cell.today{background:#f0f8f2}.calendar-add-slot{position:relative;text-decoration:none}.calendar-add-slot:hover{background:#edf7f0}.calendar-add-slot:hover:after{content:"+";position:absolute;right:6px;top:4px;color:#166534;font-weight:900;font-size:18px}.calendar-event{display:block;margin:4px 5px;padding:7px 8px;border-radius:6px;background:#dff3e6;border-left:4px solid #166534;color:#17351f;font-size:12px;line-height:1.25;text-decoration:none;z-index:2;overflow:hidden;box-shadow:0 4px 10px rgba(20,34,27,.08)}.calendar-event strong{display:block;font-size:13px;color:#102a18;margin-bottom:2px}.calendar-event-line{display:block;margin-top:2px}.calendar-event-line.event-bold{font-weight:800}.calendar-event-line.event-bold-italic{font-weight:800;font-style:italic}.calendar-event-line.event-italic{font-style:italic}.calendar-event-main{display:block;color:inherit;text-decoration:none}.calendar-event-actions{display:flex;gap:5px;align-items:center;flex-wrap:wrap;margin-top:6px}.calendar-event-actions form{margin:0}.calendar-duplicate,.calendar-delete{display:inline-block;padding:3px 6px;border-radius:5px;background:rgba(255,255,255,.72);color:#102a18;text-decoration:none;font-weight:700;font-size:12px;line-height:1.2}.calendar-delete{border:0;background:rgba(185,28,28,.88);color:#fff;cursor:pointer}.month-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr))}.month-day{min-height:132px;border-right:1px solid #eef3ef;border-bottom:1px solid #eef3ef;padding:6px;background:#fff;min-width:0}.month-day.out{background:#f7f9f8;color:#8a948e}.month-day.today{background:#f0f8f2}.month-date{font-weight:800;margin-bottom:5px}.month-add{display:inline-block;margin-bottom:4px;color:#166534;font-size:12px;font-weight:800;text-decoration:none}.month-add:hover{text-decoration:underline}.month-day .calendar-event{position:static;margin:4px 0;padding:5px 6px}@media (max-width:1100px){.calendar-layout{grid-template-columns:1fr}.calendar-filters{position:static;order:-1}.calendar-view-actions,.calendar-report-actions{padding-left:0;border-left:0}}

/* --- Flash messages (unico non coperto da bootstrap-custom) --- */
.flash{margin-bottom:10px;padding:8px 10px;border-radius:6px;background:#e9f5e9;border:1px solid #bad8c0}.flash.error{background:#fff1f2;border-color:#fecdd3}.dashboard-target-section{display:none}.dashboard-target-section:target{display:block}
.hidden{display:none!important}

/* --- Item detail grid (inventario) --- */
.item-detail-grid{display:grid;grid-template-columns:1fr 280px;gap:20px;align-items:start}.item-detail-main table{width:100%}.item-detail-main th{white-space:nowrap;width:160px}@media (max-width:720px){.item-detail-grid{grid-template-columns:1fr}}

/* --- Catalogo corsi (non intaccato, troppo specifico) --- */
.catalog-card{border-radius:12px;overflow:hidden;border:1px solid rgba(255,255,255,.5);background:rgba(255,255,255,.65);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);box-shadow:0 8px 32px rgba(22,101,52,.08)}.catalog-head{display:flex;align-items:center;gap:10px;background:rgba(22,101,52,.85);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);color:#fff;padding:14px 20px}.catalog-head h1{margin:0;color:#fff;font-family:Georgia,serif;font-size:23px}.catalog-check{width:18px;height:18px;border:2px solid rgba(255,255,255,.9);border-radius:4px;display:inline-flex;align-items:center;justify-content:center;font-weight:900;font-size:13px}.catalog-card .panel{border:0;border-radius:0;box-shadow:none;padding:0;background:#f7fbf8}.catalog-card h2{display:none}.accordion-list{display:flex;flex-direction:column;gap:0}.accordion-item{border:0;border-top:1px solid #c8dfcf;border-radius:0;background:#f8faf7;overflow:hidden}.accordion-item summary{cursor:pointer;list-style:none;padding:15px 20px;background:#f8faf7;font-weight:800;color:#123f2b}.accordion-item summary::-webkit-details-marker{display:none}.accordion-item summary:before{content:"+";display:inline-flex;width:16px;height:16px;align-items:center;justify-content:center;margin-right:10px;border-radius:3px;border:2px solid #166534;color:#166534;font-weight:900;font-size:12px}.accordion-item[open] summary:before{content:"-"}.accordion-body{padding:12px 18px 16px 46px;background:rgba(230,244,234,.5);backdrop-filter:blur(4px);-webkit-backdrop-filter:blur(4px);border-top:1px solid rgba(200,223,207,.5);box-shadow:inset 7px 0 0 rgba(183,216,192,.4)}.accordion-body>p.muted{margin:4px 0 12px;color:#54705d}
.course-list{display:flex;flex-direction:column;gap:10px;margin:0;background:transparent;border:0;border-radius:8px;padding:10px}.course-item{border:1px solid rgba(159,200,173,.4);border-radius:8px;background:rgba(248,252,249,.55);overflow:hidden;box-shadow:0 1px 4px rgba(18,63,43,.04)}.course-item summary{display:flex;align-items:center;gap:10px;cursor:pointer;list-style:none;padding:12px 14px;background:rgba(248,252,249,.3);font-weight:900;color:#123f2b}.course-item summary::-webkit-details-marker{display:none}.course-item summary:before{content:"+"!important;display:inline-flex;width:16px;height:16px;align-items:center;justify-content:center;border-radius:3px;border:2px solid #166534;color:#166534;font-size:12px;font-weight:900;flex:0 0 auto;background:rgba(255,255,255,.45)}.course-item[open] summary:before{content:"-"!important}.course-meta{margin-left:auto;display:inline-flex;gap:9px;flex-wrap:wrap;font-weight:800}.course-pill{display:inline-block;border-radius:999px;background:rgba(236,252,226,.85);border:1px solid #a9d88e;color:#123f2b;padding:4px 10px;font-size:12px;line-height:1}.course-detail{padding:10px 14px 14px;border-top:1px solid rgba(184,215,194,.4);background:rgba(237,248,240,.55);color:#284f32}.course-description{color:#284f32;margin:5px 0;font-weight:700}.course-facts{display:flex;flex-wrap:wrap;gap:7px 12px;margin-bottom:7px}.course-facts .course-fact{display:inline-flex;align-items:center;gap:4px;font-size:13px;color:#54705d}.course-facts .course-fact strong{color:#123f2b;font-weight:800}.course-keywords{display:flex;flex-wrap:wrap;gap:5px}.course-keyword{display:inline-block;border-radius:999px;background:#fff;border:1px solid #b8d7c1;padding:4px 9px;font-size:11px;color:#2f6f55}.course-price-box{margin-top:9px;padding:9px 11px;background:rgba(255,255,255,.55);border:1px solid rgba(200,223,207,.5);border-radius:6px;font-size:13px}.course-price-box .muted{display:block;margin-bottom:4px;font-weight:700}.course-actions{display:flex;gap:6px;flex-wrap:wrap;margin-top:10px}.catalog-course-detail-box{background:rgba(255,255,255,.55);border:1px solid #dbe7df;border-radius:7px;padding:10px 12px;margin-top:8px}.catalog-course-detail-box h3{font-size:15px;margin:0 0 6px;color:#0d3323}

.keyword-filter{padding:12px 18px;border-bottom:1px solid rgba(200,223,207,.4);background:rgba(238,248,241,.6);backdrop-filter:blur(4px);-webkit-backdrop-filter:blur(4px);display:grid;grid-template-columns:120px 1fr;gap:10px 14px;align-items:start}.keyword-filter strong{color:#123f2b}.keyword-chips{display:flex;flex-wrap:wrap;gap:6px}.keyword-chip,.keyword-clear{display:inline-flex;align-items:center;gap:5px;border:1px solid #b8d8c1;border-radius:999px;padding:5px 10px;background:#fff;color:#123f2b;text-decoration:none;font-size:13px;font-weight:700}.keyword-chip span{font-size:11px;color:#4d6b55}.keyword-chip.active{background:rgba(22,101,52,.85);color:#fff;border-color:rgba(22,101,52,.5);backdrop-filter:blur(4px)}.keyword-chip.active span{color:#dff4e5}.keyword-clear{border-radius:6px;background:#f8fbf9;color:#6b2d12}@media (max-width:820px){.keyword-filter{display:block}.keyword-filter strong{display:block;margin-bottom:8px}}

.catalog-tree-toolbar{display:flex;justify-content:space-between;gap:12px;align-items:flex-start;padding:0 12px 10px}.catalog-tree-toolbar h2{margin-top:12px}.catalog-branch-tools{margin-left:auto;display:inline-flex;gap:6px;align-items:center;flex-wrap:wrap}.catalog-head .catalog-branch-tools{margin-left:auto}summary .catalog-branch-tools{float:right;margin-left:12px}.catalog-branch-tools button{padding:4px 8px;font-size:12px;border-radius:5px;background:#166534;color:#fff}.catalog-branch-tools button.secondary{background:#475569}
.catalog-search{margin-bottom:20px}.catalog-search-grid{display:grid;grid-template-columns:minmax(280px,1fr) minmax(220px,360px) auto auto;gap:10px;align-items:end}.catalog-search-grid p{margin:0}.catalog-search-actions{display:flex;gap:6px;align-items:end;padding-bottom:1px}.catalog-keyword-filter{margin:12px -12px -12px;border-top:1px solid #dbe7df;border-bottom:0;border-radius:0 0 8px 8px}.catalog-results{padding:0;overflow:hidden}.catalog-inline-actions{display:none;margin-left:auto;gap:6px;align-items:center}.accordion-item[open]>summary .catalog-inline-actions,.catalog-head .catalog-inline-actions{display:inline-flex}.catalog-inline-actions button{border:1px solid rgba(255,255,255,.75);background:rgba(255,255,255,.88);color:#123f2b;border-radius:6px;padding:4px 7px;font-size:12px;font-weight:900;cursor:pointer}.catalog-inline-actions button:hover{background:#fff}.catalog-select{display:inline-flex;align-items:center;justify-content:center;margin:0;cursor:pointer}.catalog-select input{width:17px;height:17px;margin:0;accent-color:#166534;cursor:pointer}.catalog-inline-actions .catalog-select{background:rgba(255,255,255,.88);border:1px solid rgba(255,255,255,.75);border-radius:6px;padding:4px 6px}.catalog-course-select{flex:0 0 auto}.course-title{min-width:0}.catalog-results .accordion-item>summary,.catalog-card .accordion-item>summary,.catalog-head{display:flex;align-items:center;gap:10px}.catalog-head h1{flex:0 1 auto}

.course-keyword-filters{margin-bottom:12px}.course-keyword-filters .catalog-search-grid{grid-template-columns:minmax(260px,1fr) auto auto}.course-keyword-check label{display:flex;align-items:center;gap:7px;margin:0;padding:7px 0;font-weight:800;white-space:nowrap}.course-keyword-editor{padding:0;overflow:hidden}.course-keyword-summary{display:flex;align-items:center;gap:12px;padding:10px 12px;border-bottom:1px solid #dbe7df;background:#f8fbf9}.course-keyword-table-wrap{overflow:auto;max-height:calc(100vh - 260px)}.course-keyword-editor table{table-layout:fixed;min-width:1240px}.course-keyword-editor thead th{position:sticky;top:0;z-index:3;background:#dceee3}.course-keyword-editor thead tr.course-keyword-filter-row th{top:33px;z-index:2;background:#dceee3;padding:4px}.course-keyword-editor thead tr.course-keyword-filter-row select{width:100%;min-width:0;font-size:12px;padding:4px 6px;background:#fff}.course-keyword-editor tbody tr:nth-child(odd) td{background:#ffffff}.course-keyword-editor tbody tr:nth-child(even) td{background:#f1f8f3}.course-keyword-editor tbody tr:hover td{background:#e6f3eb}.course-keyword-editor th:nth-child(1),.course-keyword-editor td:nth-child(1){width:145px}.course-keyword-editor th:nth-child(2),.course-keyword-editor td:nth-child(2){width:170px}.course-keyword-editor th:nth-child(3),.course-keyword-editor td:nth-child(3){width:195px}.course-keyword-editor th:nth-child(4),.course-keyword-editor td:nth-child(4){width:250px}.course-code-input{width:100%;min-width:0;font-size:13px;padding:4px 6px}.course-keyword-grid{display:grid;grid-template-columns:repeat(4,minmax(120px,1fr));gap:5px 10px}.course-keyword-grid label{display:flex;align-items:center;gap:6px;margin:0;font-size:13px;font-weight:700;color:#123f2b}.course-keyword-grid input[type=checkbox]{width:16px;height:16px;accent-color:#166534;flex:0 0 auto}.course-keyword-grid span{min-width:0;overflow:hidden;text-overflow:ellipsis}.sticky-actions{position:sticky;bottom:0;margin:0;padding:10px 12px;background:#eef8f1;border-top:1px solid #cbd8cf;z-index:10}.course-keyword-card-list{display:grid;gap:10px;padding:12px;background:#f4f7f5}.course-keyword-card{border:1px solid #dbe7df;border-radius:8px;background:#fff;padding:10px}.course-keyword-filter-card{display:grid;grid-template-columns:minmax(220px,1fr) minmax(220px,1fr);gap:10px;background:#dceee3}.course-keyword-filter-card select{margin-top:5px}.course-keyword-main{display:grid;grid-template-columns:minmax(160px,1fr) minmax(160px,1fr) minmax(180px,220px) minmax(280px,2fr);gap:10px;align-items:end}.course-keyword-main .muted,.course-keyword-title .muted{display:block;font-size:12px;margin-bottom:3px}.course-keyword-main strong{display:block}.course-keyword-main label{margin:0}.course-keyword-bottom{margin-top:10px;padding-top:10px;border-top:1px solid #dbe7df}.course-keyword-card .course-keyword-grid{grid-template-columns:repeat(6,minmax(130px,1fr))}@media (max-width:1200px){.course-keyword-card .course-keyword-grid{grid-template-columns:repeat(4,minmax(130px,1fr))}.course-keyword-main{grid-template-columns:repeat(2,minmax(0,1fr))}}@media (max-width:760px){.course-keyword-filter-card,.course-keyword-main{grid-template-columns:1fr}.course-keyword-card .course-keyword-grid{grid-template-columns:1fr}}

/* --- Price list catalogo --- */
.price-list-panel{padding:10px 12px 12px;overflow:hidden;max-width:none;width:100%}.price-list-caption{margin:0 0 10px;color:#40584a}.price-list-caption strong{font-weight:900;color:#0d3323}.price-list-panel .table-wrap{overflow-x:auto}.price-list-matrix{width:100%;border-collapse:collapse;min-width:1180px;table-layout:fixed}.price-list-matrix th{background:#e6f1e9;color:#0d3323;border:1px solid #c8dfcf;padding:5px 6px;text-align:center;font-weight:900;font-size:13px}.price-list-group-row th{background:#d7eadc;font-size:15px}.price-list-sub-row th{background:#eaf5ed;font-size:12px}.price-list-matrix td{border:1px solid #dbe7df;padding:4px 5px;background:#fff}.price-list-matrix th.band-a,.price-list-matrix td.band-a{background:#f3fbf5}.price-list-matrix th.band-b,.price-list-matrix td.band-b{background:#eef8f1}.price-list-matrix th.band-c,.price-list-matrix td.band-c{background:#e8f4ed}.price-list-matrix th.band-d,.price-list-matrix td.band-d{background:#e2f0e8}.price-list-matrix thead th.band-a{background:#dcefe1}.price-list-matrix thead th.band-b{background:#d6eadc}.price-list-matrix thead th.band-c{background:#d0e6d6}.price-list-matrix thead th.band-d{background:#cae0d0}

/* --- Form entity-courses (catalogo) --- */
.wide-page .entity-form.entity-courses,.entity-form.entity-courses{max-width:none}.entity-form.entity-courses .form-grid{grid-template-columns:repeat(36,minmax(0,1fr));align-items:start;overflow-x:auto}.entity-form.entity-courses .form-field{grid-column:span 8;margin:0}.entity-form.entity-courses .form-span-short{grid-column:span 4}.entity-form.entity-courses .form-span-labelwide{grid-column:span 5}.entity-form.entity-courses .form-span-medium{grid-column:span 8}.entity-form.entity-courses .form-span-halfwide{grid-column:span 6}.entity-form.entity-courses .form-span-wide{grid-column:span 12}.entity-form.entity-courses .form-span-twocol{grid-column:span 18}.entity-form.entity-courses .form-span-huge{grid-column:span 12}.entity-form.entity-courses .form-span-codewide{grid-column:span 8}.entity-form.entity-courses .form-span-titlewide{grid-column:span 24}.entity-form.entity-courses .form-span-full{grid-column:1/-1}.entity-form.entity-courses .form-span-flag,.entity-form.entity-courses .form-span-flagwide{align-self:stretch;background:#f4faf6;border:1px solid #dbe7df;border-radius:7px;padding:8px 10px;min-height:58px}.entity-form.entity-courses .form-span-flag{grid-column:span 4}.entity-form.entity-courses .form-span-flagwide{grid-column:span 4}.entity-form.entity-courses .form-span-flag label,.entity-form.entity-courses .form-span-flagwide label{margin:0 0 6px;white-space:nowrap}.entity-form.entity-courses .form-span-flag .check-line,.entity-form.entity-courses .form-span-flagwide .check-line{display:flex;justify-content:center;margin:0}.entity-form.entity-courses input,.entity-form.entity-courses select,.entity-form.entity-courses textarea{width:100%;min-width:0}.entity-form.entity-courses textarea{resize:vertical;line-height:1.35}.entity-form.entity-courses .field-type-checkbox{align-self:end}.entity-form.entity-courses .field-custom_keywords{grid-column:1/-1;display:block;width:1600px!important;min-width:1600px!important;max-width:1600px!important}.entity-form.entity-courses .field-custom_keywords>.multi-check-grid{display:grid!important;position:relative!important;width:1600px!important;min-width:1600px!important;max-width:1600px!important;height:150px!important;max-height:150px!important;padding-right:28px!important;grid-template-columns:repeat(7,minmax(120px,1fr))!important;overflow-y:scroll!important;overflow-x:hidden!important;scrollbar-gutter:stable both-edges;border:1px solid #cbd8cf!important;border-right:1px solid #cbd8cf!important;box-shadow:none!important;background:#f8fbf9!important;scrollbar-color:#166534 #e8f4ed;scrollbar-width:auto}.entity-form.entity-courses .field-custom_keywords>.multi-check-grid:before{content:""!important;position:sticky!important;top:0!important;right:0!important;grid-column:8!important;grid-row:1/span 999!important;justify-self:end!important;align-self:stretch!important;width:18px!important;height:130px!important;border-radius:999px!important;background:linear-gradient(#e8f4ed,#e8f4ed)!important;box-shadow:inset 0 22px 0 #8b8f8c!important;pointer-events:none!important}.entity-form.entity-courses .field-custom_keywords>.multi-check-grid::-webkit-scrollbar{width:18px!important}.entity-form.entity-courses .field-custom_keywords>.multi-check-grid::-webkit-scrollbar-track{background:#e8f4ed!important}.entity-form.entity-courses .field-custom_keywords>.multi-check-grid::-webkit-scrollbar-thumb{background:#166534!important;border-radius:999px;border:4px solid #e8f4ed}.entity-form.entity-courses .field-custom_keywords>.multi-check-grid label{min-width:0!important}.entity-form.entity-courses .field-custom_keywords>.multi-check-grid span{display:block!important;min-width:0!important;white-space:normal!important;overflow:visible!important;text-overflow:clip!important}

/* --- Form price category + preview --- */
.entity-form.entity-courses .form-span-pricecategory{grid-column:1/span 8;background:#f4faf6;border:1px solid #c8dfcf;border-right:0;border-radius:8px 0 0 8px;padding:12px 12px 10px;margin-top:8px;margin-right:-10px;min-height:110px}.entity-form.entity-courses .form-span-pricepreview{grid-column:span 28;background:#f4faf6;border:1px solid #c8dfcf;border-left:0;border-radius:0 8px 8px 0;padding:12px 12px 10px;margin-top:8px;margin-left:-10px;min-height:110px}.course-price-preview-title{display:none}.course-price-preview{display:contents}.course-price-preview .muted{display:inline-block;white-space:nowrap;font-size:14px;font-weight:400;line-height:1.25;margin:0 0 6px 8px;color:#647067;vertical-align:baseline}.course-price-lines{display:grid;grid-template-columns:repeat(4,150px);gap:8px;align-items:stretch;margin-top:4px}.course-price-lines div{background:#fff;border:1px solid #dbe7df;border-radius:6px;padding:7px 9px;min-height:40px}.course-price-lines strong{display:block;color:#0d3323;margin-bottom:3px}.course-price-lines span{display:block;font-weight:700}.entity-form.entity-courses .field-_price_preview>label{font-weight:900;margin:0 0 2px;display:inline-block}@media (max-width:900px){.entity-form.entity-courses .form-span-pricecategory,.entity-form.entity-courses .form-span-pricepreview{grid-column:1/-1;border:1px solid #c8dfcf;border-radius:8px;min-height:0;margin-left:0;margin-right:0}.course-price-lines{grid-template-columns:1fr}.course-price-preview .muted{white-space:normal;margin-left:0;display:block}}

.catalog-price-toggle label{display:flex;align-items:center;gap:7px;margin:0;padding:7px 0;font-weight:800;white-space:nowrap}.catalog-course-prices{background:rgba(255,255,255,.22);border:1px solid #c8dfcf;border-radius:8px;padding:10px 12px;margin:0 0 12px}.catalog-course-prices-head{display:flex;gap:8px;align-items:baseline;margin-bottom:8px}.catalog-course-prices-head strong{font-weight:900;color:#0d3323}.catalog-course-prices-head span{font-size:14px;color:#647067}.catalog-course-price-row{display:grid;grid-template-columns:180px minmax(0,1fr);gap:10px;align-items:start;margin-top:8px}.catalog-course-price-category{font-weight:900;color:#0d3323;padding-top:7px}.catalog-course-price-lines{display:grid;grid-template-columns:repeat(4,150px);gap:8px}.catalog-course-price-lines div{background:rgba(255,255,255,.22);border:1px solid #dbe7df;border-radius:6px;padding:7px 9px}.catalog-course-price-lines strong{display:block;color:#0d3323;margin-bottom:3px}.catalog-course-price-lines span{display:block;font-weight:700}@media (max-width:980px){.catalog-course-price-row{grid-template-columns:1fr}.catalog-course-price-lines{grid-template-columns:1fr}.catalog-course-prices-head{display:block}}

/* --- Form course_durations, platform_years --- */
.entity-form.entity-course_durations,.entity-form.entity-platform_years{max-width:760px;width:760px;padding:12px}.entity-form.entity-course_durations .form-grid,.entity-form.entity-platform_years .form-grid{display:grid;grid-template-columns:repeat(4,130px);gap:8px 12px;align-items:end}.entity-form.entity-course_durations .form-field,.entity-form.entity-platform_years .form-field{margin:0}.entity-form.entity-course_durations input,.entity-form.entity-platform_years input{width:130px;min-width:0}.entity-form.entity-course_durations .actions,.entity-form.entity-platform_years .actions{margin-top:10px}@media (max-width:900px){.entity-form.entity-course_durations,.entity-form.entity-platform_years{width:100%;max-width:none}.entity-form.entity-course_durations .form-grid,.entity-form.entity-platform_years .form-grid{grid-template-columns:repeat(2,130px)}}

/* --- Checkbox grids (inventory, keywords) --- */
.check-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:6px 12px;align-content:start}.check-grid label,.check-line{display:flex;align-items:center;gap:7px;margin:0;font-weight:700}.check-grid input,.check-line input{flex:0 0 auto}.multi-check-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:6px 12px;max-height:220px;overflow:auto;padding:8px;border:1px solid #cbd8cf;border-radius:6px;background:#f8fbf9}.multi-check-grid label{display:flex;align-items:center;gap:7px;margin:0;font-weight:700;color:#123f2b}.multi-check-grid input[type=checkbox]{width:17px;height:17px;flex:0 0 auto;accent-color:#166534}.multi-check-search{margin:0 0 8px;max-width:420px}

/* --- Keyword tabs (catalogo) --- */
.keyword-tabs{width:1600px;max-width:1600px;border:1px solid #cbd8cf;border-radius:7px;background:#f8fbf9;overflow:hidden}.keyword-tab-nav{display:flex;gap:4px;flex-wrap:wrap;align-items:flex-end;padding:8px 8px 0;background:#edf7f0;border-bottom:1px solid #cbd8cf}.keyword-tab-separator{width:22px;height:28px;margin:0 6px;border-left:2px solid #b8d2c0}.keyword-tab-shell{display:inline-flex;align-items:center;gap:7px;border:1px solid #cbd8cf;border-bottom:0;border-radius:7px 7px 0 0;background:#dfeee4;color:#123f2b;padding:0 10px;white-space:nowrap}.keyword-tab-shell.active{background:#166534;color:#fff;border-color:#166534}.keyword-tab-button{border:0;background:transparent;color:inherit;padding:8px 2px;font-weight:900;cursor:pointer;white-space:nowrap;min-width:0}.keyword-tab-button.active{background:transparent;color:inherit}.keyword-tab-search{display:flex;gap:4px;align-items:center;margin:0 0 6px auto}.keyword-tab-search input{width:260px;padding:7px 9px}.keyword-tab-search button{min-width:38px;padding:7px 10px}.keyword-tab-panel{display:none;padding:10px 12px}.keyword-tab-panel.active{display:block}.keyword-tab-select-row{display:inline-flex;align-items:center;gap:7px;margin:0 0 8px;font-weight:900;color:#123f2b}.keyword-tab-select-row input{width:17px;height:17px;accent-color:#166534}.keyword-tab-grid{display:grid;grid-template-columns:repeat(7,minmax(120px,1fr));gap:8px 18px}.keyword-tab-grid label{display:flex;align-items:center;gap:7px;margin:0;font-weight:700;color:#123f2b;min-width:0}.keyword-tab-grid label[hidden]{display:none!important}.keyword-tab-grid input[type=checkbox]{width:17px;height:17px;flex:0 0 auto;accent-color:#166534}.keyword-tab-grid span{display:block;min-width:0;white-space:normal;overflow:visible;text-overflow:clip}.keyword-tab-grid .muted{grid-column:1/-1;margin:0}@media (max-width:1200px){.keyword-tabs{width:100%;max-width:100%}.keyword-tab-grid{grid-template-columns:repeat(4,minmax(130px,1fr))}.keyword-tab-search{margin-left:0}}@media (max-width:700px){.keyword-tab-grid{grid-template-columns:1fr}}

/* --- Keyword accordion (catalogo) --- */
.keyword-accordion-list{width:1600px;max-width:1600px;display:flex;flex-direction:column;gap:8px}.keyword-accordion{border:1px solid #cbd8cf;border-radius:7px;background:#f8fbf9;overflow:hidden}.keyword-accordion summary{cursor:pointer;list-style:none;padding:10px 12px;background:#e7f2ea;font-weight:900;color:#123f2b}.keyword-accordion summary::-webkit-details-marker{display:none}.keyword-accordion summary:before{content:"+";display:inline-flex;width:16px;height:16px;align-items:center;justify-content:center;margin-right:8px;border:2px solid #166534;border-radius:3px;color:#166534;font-size:12px;font-weight:900}.keyword-accordion[open] summary:before{content:"-"}.keyword-accordion-grid{display:grid;grid-template-columns:repeat(7,minmax(120px,1fr));gap:8px 18px;padding:10px 12px}.keyword-accordion-grid label{display:flex;align-items:center;gap:7px;margin:0;font-weight:700;color:#123f2b;min-width:0}.keyword-accordion-grid input[type=checkbox]{width:17px;height:17px;flex:0 0 auto;accent-color:#166534}.keyword-accordion-grid span{display:block;min-width:0;white-space:normal;overflow:visible;text-overflow:clip}@media (max-width:1200px){.keyword-accordion-list{width:100%;max-width:100%}.keyword-accordion-grid{grid-template-columns:repeat(4,minmax(130px,1fr))}}@media (max-width:700px){.keyword-accordion-grid{grid-template-columns:1fr}}

/* --- Keyword usage (catalogo) --- */
.keyword-usage summary{cursor:pointer;list-style:none;display:inline-flex;align-items:center;gap:6px;font-weight:800;color:#123f2b}.keyword-usage summary::-webkit-details-marker{display:none}.keyword-usage summary:before{content:"+";display:inline-flex;width:15px;height:15px;align-items:center;justify-content:center;border:1px solid #166534;border-radius:3px;font-size:12px}.keyword-usage[open] summary:before{content:"-"}.keyword-usage ul{margin:6px 0 0 23px;padding:0;max-height:180px;overflow:auto;text-align:left}.keyword-usage li{margin:2px 0}

/* --- Keyword groups form --- */
.entity-form.entity-keyword_groups .field-keywords{grid-column:1/-1!important;display:block!important;width:100%!important;max-width:none!important}.entity-form.entity-keyword_groups .field-keywords>.multi-check-grid{display:grid!important;width:100%!important;min-width:960px!important;max-width:none!important;height:520px!important;max-height:520px!important;min-height:520px!important;grid-template-columns:repeat(5,minmax(170px,1fr))!important;overflow-y:auto!important;overflow-x:hidden!important;scrollbar-gutter:stable!important}.entity-form.entity-keyword_groups .field-keywords>.multi-check-grid label{min-width:0!important}.entity-form.entity-keyword_groups .field-keywords>.multi-check-grid span{display:block!important;white-space:normal!important;overflow:visible!important;text-overflow:clip!important}.entity-form.entity-keyword_groups .field-keywords .multi-check-search{width:520px!important;max-width:520px!important}

/* --- Form keyword_groups layout --- */
.wide-page .entity-form.entity-keyword_groups,.entity-form.entity-keyword_groups{max-width:none;width:100%;box-sizing:border-box}.entity-form.entity-keyword_groups .form-grid{grid-template-columns:repeat(12,minmax(0,1fr));align-items:start}.entity-form.entity-keyword_groups .field-name{grid-column:span 4}.entity-form.entity-keyword_groups .field-keywords{grid-column:1/-1}@media (max-width:760px){.entity-form.entity-keyword_groups .form-grid{grid-template-columns:1fr}.entity-form.entity-keyword_groups .field-name{grid-column:1/-1}}

/* --- Entity-table specific widths --- */
.entity-table.entity-courses table{table-layout:fixed;min-width:900px}.entity-table.entity-courses th,.entity-table.entity-courses td{white-space:normal;overflow:hidden;text-overflow:ellipsis;padding:5px 6px;font-size:13px}.entity-table.entity-courses .field-macroarea_id{width:118px}.entity-table.entity-courses .field-area_id{width:118px}.entity-table.entity-courses .field-sosor_code{width:92px}.entity-table.entity-courses .field-title{width:210px}.entity-table.entity-courses .field-level{width:76px}.entity-table.entity-courses .field-typology{width:86px}.entity-table.entity-courses .field-modules_count{width:62px;text-align:right}.entity-table.entity-courses .field-duration_hours{width:58px;text-align:right}.entity-table.entity-courses .field-in_pdf_catalog{width:66px;text-align:center}.entity-table.entity-courses .field-actions{width:76px;min-width:76px}.entity-table.entity-courses .table-filter-form input,.entity-table.entity-courses .table-filter-form select{min-width:0;width:100%;font-size:11px;padding:3px 4px}.entity-table.entity-courses tbody tr[style] .field-actions{background:inherit}.entity-table.entity-keywords{table-layout:fixed;min-width:620px}.entity-table.entity-keywords .field-active{width:70px;text-align:center}.entity-table.entity-keywords .field-keyword{width:220px}.entity-table.entity-keywords .field-usage_count{width:auto}.keyword-toggle-form{margin:0;display:inline-flex;align-items:center;justify-content:center}.keyword-toggle-form input[type=checkbox]{width:18px;height:18px;accent-color:#166534;cursor:pointer}

/* --- Small entity tables --- */
.entity-table.entity-macroareas,.entity-table.entity-course_typologies,.entity-table.entity-course_levels,.entity-table.entity-course_durations,.entity-table.entity-platform_years,.entity-table.entity-keyword_groups{max-width:980px;width:auto;display:inline-block;vertical-align:top;padding:8px 10px}.entity-table.entity-macroareas table,.entity-table.entity-course_typologies table,.entity-table.entity-course_levels table,.entity-table.entity-course_durations table,.entity-table.entity-platform_years table,.entity-table.entity-keyword_groups table{width:auto;min-width:420px}.entity-table.entity-macroareas th,.entity-table.entity-macroareas td,.entity-table.entity-course_typologies th,.entity-table.entity-course_typologies td,.entity-table.entity-course_levels th,.entity-table.entity-course_levels td,.entity-table.entity-course_durations th,.entity-table.entity-course_durations td,.entity-table.entity-platform_years th,.entity-table.entity-platform_years td,.entity-table.entity-keyword_groups th,.entity-table.entity-keyword_groups td{padding:4px 7px;font-size:13px}.entity-table.entity-macroareas input,.entity-table.entity-macroareas select{font-size:13px;padding:4px 6px}.entity-table.entity-keyword_groups{max-width:960px!important}.entity-table.entity-keyword_groups table{min-width:900px!important}.entity-table.entity-keyword_groups .field-name{width:130px}.entity-table.entity-keyword_groups .field-keywords{min-width:620px!important;width:620px}.entity-table.entity-keyword_groups .field-actions{width:96px}

/* --- Catalogo inline table --- */
.catalog-inline-table{display:block!important;width:100%!important;max-width:none!important;padding:0!important;overflow:auto!important;max-height:calc(100vh - 220px)}.catalog-inline-table table{width:100%!important;min-width:720px!important;table-layout:auto}.catalog-inline-table th,.catalog-inline-table td{padding:7px 9px!important;font-size:14px!important;line-height:1.35!important}.catalog-inline-table thead th{background:#e4f0e8}.catalog-inline-new td{background:#eef8f0!important}.catalog-inline-input{width:100%;min-width:180px;padding:6px 8px!important;font-size:14px!important}.catalog-inline-input.color{min-width:64px;width:72px;padding:2px!important}.catalog-inline-table .field-actions{width:105px;min-width:105px}.catalog-inline-table .row-actions{display:flex;gap:6px;align-items:center;white-space:nowrap}.catalog-inline-table .row-actions form{margin:0}.catalog-inline-table .row-actions button{padding:6px 10px}.catalog-inline-table.entity-macroareas .field-description{min-width:360px}.catalog-inline-table.entity-macroareas .field-color{width:120px;min-width:120px}.catalog-inline-table.entity-keyword_groups .field-keywords{min-width:320px}

/* --- Compact code panel --- */
.compact-code-panel{max-width:1180px;padding:10px 12px}.compact-code-filter{display:flex;gap:6px;align-items:center;margin:0 0 10px}.compact-code-filter input{width:180px;min-width:0;padding:5px 7px}.compact-code-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:6px}.compact-code-item{display:flex;align-items:center;justify-content:space-between;gap:8px;border:1px solid #dbe7df;background:#f8fbf9;border-radius:6px;padding:6px 8px;min-height:34px}.compact-code-actions{display:inline-flex;gap:4px;align-items:center;flex:0 0 auto}.compact-code-actions form{margin:0}.compact-code-actions .icon-btn{width:32px;height:32px;padding:0}

/* --- Table form (bookings) --- */
.table-form{overflow:visible}.table-form table{width:100%;table-layout:fixed}.table-form th,.table-form td{padding:5px}.table-form label{margin:0}.table-form textarea{min-height:34px;resize:vertical}.table-form input,.table-form select,.table-form textarea{min-width:0;width:100%;padding:5px 6px;font-size:13px}.table-form input[type=checkbox]{width:18px;height:18px;accent-color:#166534}.table-form th.field-date,.table-form td.field-date{width:12%}.table-form th.field-time,.table-form td.field-time{width:9%}.table-form th.field-relation,.table-form td.field-relation{width:15%}.table-form th.field-checkbox,.table-form td.field-checkbox{width:64px;text-align:center}.table-form th.field-textarea,.table-form td.field-textarea{width:17%}.table-form th.field-actions,.table-form td.field-actions{width:44px;white-space:nowrap;text-align:center}.table-form tr.is-hidden{display:none}.table-form tr.saved-row td{background:#f3f8f5;color:#496254}.row-add{width:28px;height:28px;padding:0;border-radius:50%;font-size:18px;line-height:1}.row-add[disabled]{opacity:.35;cursor:not-allowed}.table-form th.field-keyword,.table-form td.field-keyword{width:32ch;max-width:32ch}.table-form td.field-keyword input{max-width:30ch}.table-form.entity-custom_keywords table{width:auto;min-width:0}.table-form.entity-custom_keywords th.field-keyword,.table-form.entity-custom_keywords td.field-keyword{width:32ch;max-width:32ch}.table-form.entity-custom_keywords th.field-checkbox,.table-form.entity-custom_keywords td.field-checkbox{width:64px}.table-form.entity-custom_keywords th.field-actions,.table-form.entity-custom_keywords td.field-actions{width:44px}.table-form.entity-custom_keywords td.field-keyword input{width:30ch;max-width:30ch}.entity-table.entity-custom_keywords table{width:auto;min-width:0;table-layout:fixed}.entity-table.entity-custom_keywords .field-keyword{width:32ch;max-width:32ch}.entity-table.entity-custom_keywords .field-keyword input{width:30ch;max-width:30ch}.entity-table.entity-custom_keywords .field-active{width:82px;max-width:82px;text-align:center}.entity-table.entity-custom_keywords .field-actions{width:96px;max-width:96px}

/* --- Other utility --- */
.password-inline{display:grid;grid-template-columns:minmax(0,1fr) 34px;gap:6px;align-items:center}.mail-test-grid{display:grid;grid-template-columns:minmax(190px,1fr) minmax(180px,1fr) minmax(280px,2fr) auto;gap:10px;align-items:end}.mail-test-grid .actions{margin:0;align-self:end}.mail-test-grid textarea{min-height:38px;resize:vertical}.icon-action{width:34px;height:34px;padding:0;display:inline-flex;align-items:center;justify-content:center}@media (max-width:1000px){.mail-test-grid{grid-template-columns:1fr}}
.catalog-report-actions{display:flex;flex-wrap:wrap;gap:8px 10px;align-items:center;margin-top:16px}.catalog-report-actions button.secondary{background:#475569;color:#fff;border:0;border-radius:6px;padding:8px 10px;font-weight:700;cursor:pointer}.catalog-action-separator{width:2px;height:34px;background:#b8d5c1;margin:0 16px}.catalogo-admin-subtype{margin-top:6px;padding-left:8px;border-left:2px solid var(--accent,#2563eb);display:flex;align-items:center;gap:8px;flex-wrap:wrap}

/* --- Generic entity form keywords wide --- */
.entity-form .field-keywords{grid-column:1/-1!important;display:block!important;width:100%!important;max-width:none!important}.entity-form .field-keywords .multi-check-search{display:block;width:100%!important;max-width:640px!important}.entity-form .field-keywords .multi-check-grid{display:grid!important;width:100%!important;min-width:0!important;max-width:none!important;height:260px!important;max-height:260px!important;grid-template-columns:repeat(6,minmax(140px,1fr))!important;overflow-y:scroll!important;overflow-x:hidden!important;scrollbar-gutter:stable both-edges;border:2px solid #8fbfa2!important;border-right:14px solid #e8f4ed!important;scrollbar-color:#166534 #e8f4ed;scrollbar-width:thin}.entity-form .field-keywords .multi-check-grid::-webkit-scrollbar{width:14px!important}.entity-form .field-keywords .multi-check-grid::-webkit-scrollbar-track{background:#e8f4ed!important}.entity-form .field-keywords .multi-check-grid::-webkit-scrollbar-thumb{background:#166534!important;border-radius:999px;border:3px solid #e8f4ed}.entity-form .field-keywords .multi-check-grid label{min-width:0}.entity-form .field-keywords .multi-check-grid span{white-space:normal;overflow:visible;text-overflow:clip}@media (min-width:1500px){.entity-form .field-keywords .multi-check-grid{grid-template-columns:repeat(8,minmax(130px,1fr))!important}}@media (max-width:900px){.entity-form .field-keywords .multi-check-grid{grid-template-columns:repeat(2,minmax(130px,1fr))!important}}@media (max-width:560px){.entity-form .field-keywords .multi-check-grid{grid-template-columns:1fr!important}}

/* --- Catalogo card filters --- */
.catalog-card-filters{display:flex;flex-wrap:wrap;gap:8px 10px;align-items:end;margin-bottom:10px;padding:8px 10px}

/* --- Base label/input legacy (mantenuto per compatibilita $) --- */
label{display:block;font-weight:700;margin:4px 0 3px;font-size:14px}
select[multiple]{min-height:110px}.field-multi-relation+small{display:block;margin-top:4px}
input[type=checkbox]{width:auto}
.keyword-formula{grid-column:2;margin-top:8px;padding:7px 9px;border:1px solid #c8dfcf;border-radius:6px;background:#f8fbf9;color:#123f2b}.keyword-formula code{white-space:normal;color:#0f2f20;background:transparent;font-weight:800}
.keyword-operator{display:inline-flex;align-items:center;justify-content:center;min-width:18px;height:28px;color:#123f2b;font-weight:900}.keyword-operator-and{margin:0 8px;font-size:18px}.keyword-operator-or{margin:0 2px;color:#557160}
.catalog-keyword-filter .keyword-chips{display:flex;flex-wrap:wrap;align-content:flex-start;resize:vertical;overflow-y:scroll;overflow-x:hidden;min-height:72px;height:72px;max-height:none;padding:8px 10px;border:1px solid #c8dfcf;border-radius:6px;background:#fff;box-sizing:border-box;scrollbar-gutter:stable}.keyword-usage-count{display:inline-block;margin-left:6px;color:#60756a;font-size:12px;font-weight:400;white-space:nowrap}.keyword-usage-count::before{content:"("}.keyword-usage-count::after{content:")"}
.catalog-keyword-filter{grid-template-columns:120px minmax(0,1fr)}.catalog-keyword-filter .keyword-chips,.catalog-keyword-filter .keyword-formula{grid-column:2;width:100%;box-sizing:border-box}.catalog-card-panel.entity-custom_keywords{display:block!important;width:100%!important;max-width:none!important}.catalog-card-panel.entity-custom_keywords .catalog-card-grid{display:grid!important;width:100%!important;grid-template-columns:repeat(auto-fill,minmax(260px,1fr))!important;gap:7px!important}.catalog-card-panel.entity-custom_keywords .catalog-card-item{min-width:0!important}

/* Calendar: keep actions visible even when events are shorter than one hour. */
.calendar-grid .calendar-event{position:relative}.calendar-grid .calendar-event .calendar-event-main{max-height:calc(100% - 28px);overflow:hidden}.calendar-grid .calendar-event .calendar-event-actions{position:absolute;left:8px;right:8px;bottom:5px;z-index:5;margin-top:0;flex-wrap:nowrap}.calendar-grid .calendar-event .calendar-duplicate,.calendar-grid .calendar-event .calendar-delete{white-space:nowrap;box-shadow:0 1px 4px rgba(16,42,24,.18)}
