/* Main containers share the dashboard's M3 extra-large corners; nested cards use large. */
.ui-card.m3e-card{--_m3e-card-shape:var(--m3e-sys-shape-corner-extra-large)}
.m3e-card:is(.event,.recording-item,.booking-card,.announcement-item,.notification-item){--_m3e-card-shape:var(--m3e-sys-shape-corner-large)}
.catalog-toolbar,.booking-shortcuts,.course-detail-cover,.service-overview-art,.service-card-art{border-radius:var(--m3e-sys-shape-corner-large-increased)}
.account-dialog-panel.m3e-dialog__container,.moodle-confirmation{border-radius:var(--m3e-sys-shape-corner-extra-large)}
.demo-native>article.m3e-card{border-radius:var(--m3e-sys-shape-corner-extra-large)}
.catalog-card,.content-course-card{overflow:hidden}

/* Home > Courses: intrinsic rows prevent charts and counters escaping fixed legacy tracks. */
.courses-dashboard{display:grid;grid-template-columns:minmax(320px,.85fr) minmax(0,1.65fr);gap:20px;width:100%;height:auto;min-height:0;align-items:start}
.course-overview-column{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:auto auto;gap:20px;align-content:start;min-width:0;height:auto}
.courses-dashboard .card{height:auto;min-height:0;max-height:none;grid-column:auto;grid-row:auto;flex:none;padding:24px}
.course-summary-card{display:flex;flex-direction:column;gap:0}
.course-summary-card .stat-boxes{flex:none;min-height:118px;margin-top:16px}
.course-summary-card .total{flex:none;margin-top:12px}
.course-summary-card .progress-line{flex:none}
.year-progress-card{display:flex;flex-direction:column;gap:16px}
.year-progress-heading,.completed-courses-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin:0}
.year-progress-heading>div,.completed-courses-heading>div{min-width:0;flex:1}
.year-progress-heading h2,.completed-courses-heading h2{font-size:22px}
.year-progress-heading p,.completed-courses-heading p{font-size:14px;color:var(--text-secondary);margin-top:8px}
.year-progress-heading .metric-box,.completed-courses-heading .metric-box{flex:none}
.year-chart{flex:none;height:200px;min-height:200px;margin-top:0;gap:4px}
.year-chart .year-axis{height:100%;padding-bottom:38px;flex:0 0 24px;width:24px;justify-content:space-between}
.year-chart .bars{padding-inline:0;gap:16px}
.year-chart .bar-wrap{gap:8px}
.year-chart .bar-column{flex:1;height:auto;min-height:0}
.year-chart .week-label{flex:0 0 30px;height:30px;min-height:30px}
.completed-courses-card{display:flex;flex-direction:column;gap:20px}
.completed-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:none;grid-auto-rows:auto;gap:16px;flex:none;height:auto;min-height:0;align-content:start;margin:0}
.completed-grid .event{display:flex;flex-direction:column;min-height:200px;height:auto;padding:20px;gap:12px}
.completed-grid .event h3{margin:0}
.completed-grid .event p{margin:0;margin-top:auto;font-size:12px}

/* Communication pages contain only real rows and grow with their content. */
.communication-dashboard{width:100%;height:auto;min-height:0}
.communication-card{height:auto;min-height:0;max-height:none;padding:24px;gap:20px;display:flex;flex-direction:column}
.communication-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:24px;margin:0}
.communication-heading>div:first-child{flex:1;min-width:0}
.communication-heading h2{font-size:24px;margin-top:4px}
.communication-heading p{font-size:14px;color:var(--text-secondary);margin-top:8px;max-width:70ch}
.communication-count,.notification-heading-actions .metric-box{flex:none}
.notification-heading-actions{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:0}
.communication-filters{display:flex;gap:6px;flex-wrap:wrap;margin:0}
.announcement-list,.notification-list{display:grid;grid-template-rows:none;grid-auto-rows:auto;gap:12px;flex:none;min-height:0;margin-top:0}
.announcement-item,.notification-item{width:100%;height:auto;min-height:0;max-height:none;align-items:start;padding:16px;gap:16px}
.announcement-item{grid-template-columns:52px minmax(0,1fr)}
.announcement-date{width:52px;height:auto;min-height:64px;padding:8px;align-content:center}
.announcement-date strong{line-height:1.1}
.announcement-date span{margin-top:4px}
.announcement-copy,.notification-copy{display:grid;gap:8px;align-content:start;min-width:0}
.announcement-meta,.notification-meta{gap:8px;flex-wrap:wrap;line-height:1.5}
.announcement-copy h3,.notification-title{display:block;font-size:18px;line-height:1.4;margin:0;overflow-wrap:anywhere}
.announcement-copy p,.notification-description{display:block;font-size:14px;line-height:1.6;margin:0;overflow-wrap:anywhere}
.notification-item{grid-template-columns:8px minmax(0,1fr);text-align:left;align-content:start}
.notification-item .notification-dot{margin-top:9px}
.communication-card .settings-inline-status{margin:0}
.mark-all-read.m3e-button{font-size:12px;min-height:36px;padding-inline:14px}

/* More compact catalog cards: four at normal desktop sizes, five on Full HD. */
.course-catalog{display:grid;grid-template-columns:repeat(auto-fit,minmax(245px,1fr));gap:16px;align-items:stretch}
.catalog-card{width:100%;min-width:0}
.catalog-card .catalog-cover{height:112px;min-height:112px;flex:0 0 112px}
.catalog-card .catalog-cover>.m3e-icon{font-size:48px}
.catalog-card-body{padding:18px;gap:12px}
.catalog-card h3{font-size:21px}
.catalog-card p{font-size:13px;line-height:1.6}
.catalog-card-footer{font-size:11px;line-height:1.5}

@media(min-width:1600px){.course-catalog{grid-template-columns:repeat(5,minmax(0,1fr))}}
@media(min-width:1200px) and (max-width:1599px){.course-catalog{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(min-width:701px) and (max-width:1199px){
 .courses-dashboard{grid-template-columns:minmax(0,1fr)}
 .course-overview-column{grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:auto;align-items:start}
 .communication-heading{flex-wrap:wrap}
 .notification-heading-actions{width:100%;justify-content:space-between}
 .course-catalog{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:700px){
 .courses-dashboard{display:grid;grid-template-columns:minmax(0,1fr);gap:16px}
 .course-overview-column{grid-template-columns:minmax(0,1fr);grid-template-rows:auto auto;gap:16px}
 .courses-dashboard .card,.communication-card{padding:20px}
 .completed-grid{grid-template-columns:minmax(0,1fr);gap:12px}
 .completed-grid .event{min-height:190px;padding:16px}
 .year-progress-heading h2,.completed-courses-heading h2{font-size:20px}
 .year-progress-heading .metric-box,.completed-courses-heading .metric-box{padding:6px 10px}
 .year-progress-heading .metric-box strong,.completed-courses-heading .metric-box strong{font-size:24px}
 .communication-heading{display:flex;flex-direction:column;gap:16px}
 .communication-heading h2{font-size:22px}
 .notification-heading-actions{width:100%;justify-content:space-between;gap:10px}
 .notification-heading-actions .metric-box{padding:8px 12px}
 .notification-heading-actions .metric-box strong{font-size:24px}
 .mark-all-read.m3e-button{min-height:40px;flex:1;padding-inline:10px}
 .announcement-item,.notification-item{padding:16px;gap:12px}
 .announcement-item{grid-template-columns:40px minmax(0,1fr)}
 .announcement-date{width:40px;min-height:56px;padding:6px}
 .announcement-date strong{font-size:22px}
 .announcement-copy h3,.notification-title{font-size:17px}
 .notification-meta time{font-size:11px}
 .course-catalog{grid-template-columns:minmax(0,1fr);gap:16px}
 .catalog-card .catalog-cover{height:120px;min-height:120px;flex-basis:120px}
}
