.ub-card #ubFilters select{min-width:140px;max-width:100%;padding:9px 12px;border:1px solid var(--border,#dce3ec);border-radius:8px;background:var(--panel,#fff);color:var(--text,#172b43);font:13px system-ui,sans-serif}
.ub-card .ub-scope{justify-content:flex-start;gap:16px}.ub-card .ub-scope label:first-child{min-width:240px}.ub-status{margin:0;padding:11px 16px;font-size:12px;line-height:1.6;color:#64748b;background:#f8fafc;border-top:1px solid #e2e8f0;border-bottom:1px solid #e2e8f0}.ub-status.ub-error{color:#b91c1c;background:#fef2f2}
.ub-matrix-wrap{max-height:calc(100dvh - 355px);min-height:180px;overscroll-behavior:contain}.ub-matrix tbody th strong{display:block;font-size:12px;font-weight:650;line-height:1.5;overflow-wrap:break-word}.ub-matrix tbody th small{display:block;font-size:10px;font-weight:400;color:#94a3b8;margin-top:2px}
.ub-matrix .lehrgang-matrix-courses th span{max-height:11rem}.ub-matrix .ub-cell{transition:background .12s}.ub-cell input[type=checkbox]{display:block;width:20px;height:20px;margin:auto;accent-color:#059669;cursor:pointer}.ub-cell input:focus-visible{outline:3px solid #93c5fd;outline-offset:3px}.ub-cell.ub-attended{background:#ecfdf5}.ub-cell.ub-pending{background:#eff6ff}.ub-cell input:disabled{cursor:wait;opacity:.6}
.ub-matrix tfoot th{position:sticky;left:0;z-index:1;min-width:13rem;width:13rem;max-width:17rem;text-align:left;background:#f1f5f9;font-size:11px;letter-spacing:0;text-transform:none}.ub-matrix tfoot td{font-size:12px;font-weight:700;background:#f8fafc;color:#475569}.ub-empty{padding:36px 20px;line-height:1.6}
@media(max-width:760px){.ub-card .ub-scope label:first-child{min-width:0}.ub-card #ubFilters select{width:100%}.ub-matrix-wrap{max-height:65dvh}.ub-matrix tfoot th{min-width:9rem;width:9rem;max-width:9rem}.ub-card .lehrgang-matrix-legend{font-size:11px}.ub-cell input[type=checkbox]{width:22px;height:22px}.ub-card .table-toolbar{gap:10px}}
/* Spalten behalten ihre Breite auch bei nur einer Übung. */
.ub-card .ub-matrix{--ub-name-width:208px;--ub-exercise-width:52px;table-layout:fixed;min-width:0;width:calc(var(--ub-name-width) + var(--ub-exercise-count) * var(--ub-exercise-width))}.ub-matrix .ub-person-column{width:var(--ub-name-width)}.ub-matrix .ub-exercise-column{width:var(--ub-exercise-width)}.ub-card .ub-matrix thead .lehrgang-matrix-groups th:first-child,.ub-card .ub-matrix tbody th,.ub-card .ub-matrix tfoot th{width:var(--ub-name-width);min-width:var(--ub-name-width);max-width:var(--ub-name-width);box-sizing:border-box}.ub-card .ub-matrix tbody th strong{overflow-wrap:anywhere}.ub-card .ub-matrix thead .lehrgang-matrix-courses th,.ub-card .ub-matrix td{width:var(--ub-exercise-width);min-width:var(--ub-exercise-width);max-width:var(--ub-exercise-width);box-sizing:border-box}@media(max-width:760px){.ub-card .ub-matrix{--ub-name-width:144px;--ub-exercise-width:46px}}

.ub-cell.ub-automatic{background:#e0f2fe}.ub-auto-legend{background:#e0f2fe;color:#0369a1}
.ub-card .ub-matrix{border-collapse:separate;border-spacing:0}
.ub-matrix-wrap{isolation:isolate;overflow:auto}
.ub-matrix thead th{position:sticky;z-index:3;background:#f1f5f9}
.ub-matrix thead .lehrgang-matrix-groups th{top:0;height:2.5rem;box-sizing:border-box}
.ub-matrix thead .lehrgang-matrix-courses th{top:2.5rem}
.ub-matrix tbody th,.ub-matrix tfoot th{position:sticky;left:0;z-index:2;background:#fff;box-shadow:2px 0 0 #cbd5e1}
.ub-matrix thead .lehrgang-matrix-groups th:first-child{left:0;z-index:5;background:#f1f5f9}
.ub-cell input[type=checkbox]{touch-action:none}
.attendance-dragging{user-select:none;-webkit-user-select:none;cursor:crosshair}
.ub-matrix .attendance-drag-preview{background:#dbeafe!important}
