/* TeacherWidget V5128 – Sitzplan, Entwicklung, Schülerbeobachtung und Noten */
#twCMModal, #twCMModal * { box-sizing: border-box; }
#twCMModal {
  position: fixed; inset: 0; z-index: 2147483550; display: none;
  background: rgba(25, 20, 14, .72); padding: max(10px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left));
  font-family: Arial, Helvetica, sans-serif; color: #241c14;
}
#twCMModal.tw-cm-open { display: flex; }
.tw-cm-shell {
  position: relative;
  width: min(1440px, 100%); height: min(930px, 100%); margin: auto; overflow: hidden;
  background: #f7f1e8; border: 1px solid #d8ccb8; border-radius: 20px;
  box-shadow: 0 18px 56px rgba(0,0,0,.28); display: flex; flex-direction: column;
}
.tw-cm-header {
  flex: 0 0 auto; display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 12px 76px 12px 14px; background: #fffdf8; border-bottom: 1px solid #e2d6c3;
}
.tw-cm-title { font-size: 20px; font-weight: 900; margin-right: auto; }
.tw-cm-title small { display: block; margin-top: 2px; font-size: 11px; color: #6e6458; font-weight: 700; }
.tw-cm-header select, .tw-cm-header input, .tw-cm-control {
  min-height: 39px; border: 1px solid #d8ccb8; border-radius: 10px; background: #fff; color: #241c14;
  padding: 8px 10px; font: inherit;
}
.tw-cm-class-select { min-width: 160px; max-width: 260px; }
.tw-cm-button {
  min-height: 39px; border: 0; border-radius: 10px; padding: 8px 12px; cursor: pointer;
  background: #108b8b; color: #fff; font-size: 13px; font-weight: 900; touch-action: manipulation;
}
.tw-cm-button:hover { filter: brightness(.96); }
.tw-cm-button:focus-visible, .tw-cm-tab:focus-visible, .tw-cm-seat-card:focus-visible { outline: 3px solid rgba(45,123,220,.35); outline-offset: 2px; }
.tw-cm-button.secondary { background: #efe4d4; color: #4b4031; }
.tw-cm-button.blue { background: #2d7bdc; }
.tw-cm-button.purple { background: #6a4bdc; }
.tw-cm-button.danger { background: #f7d7d3; color: #8f2013; }
.tw-cm-button.compact { min-height: 31px; padding: 5px 8px; font-size: 11px; }
.tw-cm-close {
  position: absolute; top: 10px; right: 10px; z-index: 40;
  width: 52px; height: 52px; min-width: 52px; min-height: 52px; padding: 0;
  display: grid; place-items: center; border: 2px solid rgba(255,255,255,.92); border-radius: 50%;
  background: #b3261e; color: #fff; box-shadow: 0 8px 24px rgba(80,12,8,.34);
  font: 900 34px/1 Arial,Helvetica,sans-serif; cursor: pointer; touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.tw-cm-close:hover { filter: brightness(.96); transform: scale(1.03); }
.tw-cm-close:active { transform: scale(.94); }
.tw-cm-close:focus-visible { outline: 4px solid rgba(45,123,220,.48); outline-offset: 3px; }
.tw-cm-close span { display: block; transform: translateY(-1px); pointer-events: none; }
.tw-cm-tabs {
  flex: 0 0 auto; display: flex; gap: 6px; overflow-x: auto; padding: 8px 12px;
  background: #fffdf8; border-bottom: 1px solid #e2d6c3; scrollbar-width: thin;
}
.tw-cm-tab {
  flex: 0 0 auto; border: 1px solid #d8ccb8; border-radius: 999px; padding: 8px 13px;
  background: #fff; color: #4b4031; font-size: 13px; font-weight: 900; cursor: pointer;
}
.tw-cm-tab[aria-selected="true"] { background: #108b8b; border-color: #108b8b; color: #fff; }
.tw-cm-body { flex: 1 1 auto; min-height: 0; overflow: auto; padding: 12px; }
.tw-cm-status {
  flex: 0 0 auto; min-height: 30px; padding: 7px 14px; border-top: 1px solid #e2d6c3;
  background: #fffdf8; color: #5f574d; font-size: 12px; font-weight: 700;
}
.tw-cm-status[data-kind="ok"] { color: #147044; }
.tw-cm-status[data-kind="bad"] { color: #9a2a1c; }
.tw-cm-grid { display: grid; grid-template-columns: minmax(260px, 340px) minmax(0, 1fr); gap: 12px; align-items: start; }
.tw-cm-card { background: #fff; border: 1px solid #e2d6c3; border-radius: 15px; padding: 12px; box-shadow: 0 3px 12px rgba(0,0,0,.04); }
.tw-cm-card h2, .tw-cm-card h3 { margin: 0 0 9px; color: #3d3328; }
.tw-cm-card h2 { font-size: 17px; }
.tw-cm-card h3 { font-size: 14px; }
.tw-cm-muted { color: #6e6458; font-size: 12px; line-height: 1.4; }
.tw-cm-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; }
.tw-cm-field { display: block; min-width: 0; font-size: 12px; font-weight: 900; color: #5a4d3d; }
.tw-cm-field > input, .tw-cm-field > select, .tw-cm-field > textarea {
  width: 100%; margin-top: 4px; border: 1px solid #d8ccb8; border-radius: 9px; padding: 8px; background: #fff; color: #241c14; font: inherit;
}
.tw-cm-field > textarea { min-height: 94px; resize: vertical; }
.tw-cm-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 9px; align-items: center; }
.tw-cm-table-wrap { overflow: auto; max-height: calc(100vh - 285px); border: 1px solid #e5dac8; border-radius: 12px; background: #fff; }
.tw-cm-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.tw-cm-table th { position: sticky; top: 0; z-index: 1; background: #f3eadc; color: #4b4031; text-align: left; padding: 8px; border-bottom: 1px solid #d8ccb8; white-space: nowrap; }
.tw-cm-table td { padding: 7px 8px; border-bottom: 1px solid #eee5d8; vertical-align: middle; }
.tw-cm-table tr:last-child td { border-bottom: 0; }
.tw-cm-table input, .tw-cm-table textarea { width: 100%; min-width: 70px; border: 1px solid #d8ccb8; border-radius: 8px; padding: 6px; font: inherit; }
.tw-cm-table textarea { min-width: 150px; min-height: 34px; resize: vertical; }
.tw-cm-empty { padding: 28px 16px; text-align: center; color: #766b5e; font-weight: 700; }
.tw-cm-seat-toolbar { display: flex; gap: 7px; flex-wrap: wrap; align-items: center; margin-bottom: 9px; }
.tw-cm-seat-toolbar label { font-size: 12px; font-weight: 900; color: #5a4d3d; }
.tw-cm-seat-toolbar input { width: 66px; margin-left: 4px; }
.tw-cm-seat-stage {
  position: relative; width: 100%; min-height: 610px; overflow: hidden;
  border: 2px solid #cabaa2; border-radius: 16px; background-color: #fbf7ef;
  background-image: linear-gradient(rgba(130,105,75,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(130,105,75,.06) 1px, transparent 1px);
  background-size: 28px 28px; touch-action: none; user-select: none;
}
.tw-cm-board-front {
  position: absolute; left: 18%; right: 18%; top: 12px; height: 42px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center; background: #315e4e; color: #fff;
  border: 5px solid #9b7651; font-size: 13px; font-weight: 900; letter-spacing: .08em;
}
.tw-cm-seat-card {
  position: absolute; width: 128px; min-height: 62px; transform: translate(-50%, -50%);
  border: 1px solid #bfae95; border-radius: 12px; background: #fff; box-shadow: 0 4px 10px rgba(0,0,0,.10);
  padding: 8px 27px 8px 8px; text-align: left; color: #2f261c; cursor: grab; touch-action: none;
}
.tw-cm-seat-card:active { cursor: grabbing; box-shadow: 0 7px 18px rgba(0,0,0,.18); }
.tw-cm-seat-name { display: block; font-size: 12px; line-height: 1.18; font-weight: 900; overflow-wrap: anywhere; }
.tw-cm-seat-meta { display: block; margin-top: 3px; font-size: 10px; color: #776b5e; }
.tw-cm-seat-note {
  position: absolute; top: 5px; right: 5px; width: 22px; height: 22px; border: 0; border-radius: 50%;
  background: #efe4d4; color: #4b4031; cursor: pointer; font-size: 12px; font-weight: 900; padding: 0;
}
.tw-cm-seat-card[data-observed="true"] { border-color: #d28a28; }
.tw-cm-observation-list { display: grid; gap: 8px; }
.tw-cm-observation { border: 1px solid #e2d6c3; border-radius: 12px; padding: 10px; background: #fffdf8; }
.tw-cm-observation-head { display: flex; gap: 7px; align-items: center; flex-wrap: wrap; margin-bottom: 5px; }
.tw-cm-badge { display: inline-block; border-radius: 999px; padding: 3px 7px; background: #e7f3f3; color: #176969; font-size: 10px; font-weight: 900; }
.tw-cm-badge.concern { background: #fbe2df; color: #922b1d; }
.tw-cm-badge.positive { background: #e1f3e7; color: #166b3c; }
.tw-cm-observation-text { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13px; line-height: 1.42; }
.tw-cm-summary { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.tw-cm-summary > div { flex: 1 1 120px; background: #fff; border: 1px solid #e2d6c3; border-radius: 12px; padding: 10px; }
.tw-cm-summary strong { display: block; font-size: 20px; color: #108b8b; }
.tw-cm-import-row { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 7px; align-items: end; }
.tw-cm-file { max-width: 100%; font-size: 12px; }
.tw-cm-noscript { padding: 20px; }
@media (max-width: 820px) {
  #twCMModal { padding: 0; }
  .tw-cm-shell { height: 100%; border-radius: 0; border: 0; }
  .tw-cm-header { padding-right: 72px; }
  .tw-cm-close { top: max(10px, env(safe-area-inset-top)); right: max(10px, env(safe-area-inset-right)); }
  .tw-cm-title { width: 100%; }
  .tw-cm-class-select { flex: 1 1 140px; min-width: 0; }
  .tw-cm-grid { grid-template-columns: 1fr; }
  .tw-cm-table-wrap { max-height: none; }
  .tw-cm-seat-stage { min-height: 560px; }
  .tw-cm-seat-card { width: 112px; min-height: 58px; }
}
@media (prefers-reduced-motion: reduce) {
  #twCMModal *, #twCMModal *::before, #twCMModal *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

/* V5127 – Entwicklungsverläufe und optionale Punkteschlüssel */
.tw-cm-scale-panel {
  margin-top: 12px; padding: 12px; border: 1px solid #d8ccb8; border-radius: 13px; background: #fffaf2;
}
.tw-cm-scale-head, .tw-cm-development-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 10px;
}
.tw-cm-scale-config { grid-template-columns: minmax(180px, 260px) minmax(220px, 360px); }
.tw-cm-scale-grid { display: grid; grid-template-columns: repeat(5, minmax(100px, 1fr)); gap: 8px; }
.tw-cm-scale-error { margin-top: 8px; padding: 8px 10px; border-radius: 9px; background: #fbe2df; color: #922b1d; font-size: 12px; font-weight: 800; }
.tw-cm-table input[readonly] { background: #f0f5f5; color: #176969; font-weight: 900; text-align: center; }
.tw-cm-development-filter { min-width: 210px; }
.tw-cm-development-rating { color: #108b8b; }
.tw-cm-chart {
  display: block; width: 100%; min-width: 520px; height: auto; margin-top: 10px; overflow: visible;
  background: #fffdf8; border: 1px solid #e2d6c3; border-radius: 12px;
}
.tw-cm-chart-grid { stroke: #dfd4c4; stroke-width: 1; }
.tw-cm-chart-line { fill: none; stroke: #108b8b; stroke-width: 4; stroke-linejoin: round; stroke-linecap: round; }
.tw-cm-chart-point { fill: #fff; stroke: #108b8b; stroke-width: 4; }
.tw-cm-chart-label, .tw-cm-chart-date { fill: #6e6458; font-family: Arial,Helvetica,sans-serif; font-size: 11px; font-weight: 700; }
.tw-cm-chart-empty { min-height: 170px; display: flex; align-items: center; justify-content: center; padding: 20px; border: 1px dashed #cfbea5; border-radius: 12px; background: #fffdf8; color: #766b5e; font-size: 13px; font-weight: 700; text-align: center; }
@media (max-width: 980px) {
  .tw-cm-scale-grid { grid-template-columns: repeat(2, minmax(120px, 1fr)); }
}
@media (max-width: 620px) {
  .tw-cm-scale-config, .tw-cm-scale-grid { grid-template-columns: 1fr; }
  .tw-cm-chart { min-width: 460px; }
}


/* V512.9 – dauerhaft sichtbarer Klassenmanager-Schnellzugriff */
#twCMQuickLaunch{position:fixed;right:max(14px,env(safe-area-inset-right));bottom:max(14px,env(safe-area-inset-bottom));z-index:2147482500;display:flex;align-items:center;gap:7px;font-family:Arial,Helvetica,sans-serif;filter:drop-shadow(0 8px 18px rgba(0,0,0,.22))}
#twCMQuickLaunchBtn{min-height:58px;display:flex;align-items:center;gap:10px;border:2px solid rgba(255,255,255,.78);border-radius:16px;padding:9px 14px;background:#108b8b;color:#fff;cursor:pointer;font:inherit;text-align:left;touch-action:manipulation;box-shadow:0 5px 18px rgba(0,0,0,.18)}
#twCMQuickLaunchBtn>span:first-child{font-size:25px;line-height:1}#twCMQuickLaunchBtn strong{display:block;font-size:15px;line-height:1.15}#twCMQuickLaunchBtn small{display:block;margin-top:2px;font-size:10px;line-height:1.15;opacity:.9}
#twCMQuickLaunchBtn:hover{filter:brightness(.96);transform:translateY(-1px)}#twCMQuickLaunchBtn:focus-visible{outline:4px solid rgba(45,123,220,.38);outline-offset:3px}
#twCMBuildBadge{align-self:flex-end;border-radius:999px;padding:5px 8px;background:#241c14;color:#fff;font-size:10px;font-weight:900;letter-spacing:.04em;white-space:nowrap}
@media(max-width:560px){#twCMQuickLaunch{right:8px;bottom:max(8px,env(safe-area-inset-bottom))}#twCMQuickLaunchBtn{min-height:50px;padding:8px 10px;border-radius:14px}#twCMQuickLaunchBtn small{display:none}#twCMBuildBadge{font-size:9px;padding:4px 6px}}
@media print{#twCMQuickLaunch{display:none!important}}

/* V513.0 – moderneres Klassenmanager-Design, Sitzplan-Objekte und Fachübersichten */
#twCMModal{
  background:
    radial-gradient(circle at top left, rgba(55,138,255,.18), transparent 30%),
    radial-gradient(circle at top right, rgba(16,139,139,.18), transparent 28%),
    linear-gradient(180deg, rgba(8,15,32,.82), rgba(22,26,41,.86));
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.tw-cm-shell{
  background: linear-gradient(180deg, rgba(255,255,255,.92), rgba(246,249,255,.94));
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 28px;
  box-shadow: 0 24px 60px rgba(3,8,20,.34);
}
.tw-cm-header,.tw-cm-tabs,.tw-cm-status{
  background: rgba(255,255,255,.78);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.tw-cm-title{font-size:22px;color:#17233b}
.tw-cm-title small{color:#5e6e8d;font-size:12px}
.tw-cm-card.tw-cm-modern-card{
  background: linear-gradient(180deg, rgba(255,255,255,.92), rgba(247,250,255,.95));
  border:1px solid rgba(194,208,232,.7);
  border-radius:22px;
  box-shadow:0 14px 36px rgba(27,39,78,.08);
}
.tw-cm-button{
  border-radius: 14px;
  background: linear-gradient(135deg,#0b8ec9,#108b8b);
  box-shadow: 0 8px 18px rgba(16,139,139,.18);
}
.tw-cm-button.blue{background:linear-gradient(135deg,#3777ff,#2d7bdc)}
.tw-cm-button.purple{background:linear-gradient(135deg,#7d53f6,#5b3dda)}
.tw-cm-button.secondary{background:rgba(238,242,250,.95);color:#23314f;box-shadow:none;border:1px solid rgba(191,204,226,.85)}
.tw-cm-button.danger{background:linear-gradient(135deg,#ffe6e2,#ffd5d0);color:#8f2013;box-shadow:none}
.tw-cm-tab{border:1px solid rgba(188,202,229,.9);background:rgba(255,255,255,.84);color:#2a3857}
.tw-cm-tab[aria-selected="true"]{background:linear-gradient(135deg,#3777ff,#108b8b);border-color:transparent;box-shadow:0 10px 22px rgba(55,119,255,.18)}
.tw-cm-field>input,.tw-cm-field>select,.tw-cm-field>textarea,.tw-cm-header select,.tw-cm-header input,.tw-cm-control,.tw-cm-table input,.tw-cm-table textarea{
  border:1px solid rgba(191,204,226,.85);
  border-radius:14px;
  background:#fff;
}
.tw-cm-table th{background:rgba(240,245,255,.96);color:#23314f}
.tw-cm-table td{border-bottom:1px solid rgba(225,232,246,.95)}
.tw-cm-summary>div{background:linear-gradient(180deg,#fff,#f6f9ff);border-color:rgba(191,204,226,.9)}
.tw-cm-summary strong{color:#1d63dd}
.tw-cm-student-head{display:flex;justify-content:space-between;gap:10px;align-items:center;flex-wrap:wrap}
.tw-cm-subject-chip-row{display:flex;gap:6px;flex-wrap:wrap;align-items:flex-start}
.tw-cm-subject-chip{display:inline-flex;flex-direction:column;gap:1px;padding:6px 10px;border-radius:14px;background:linear-gradient(180deg,#edf5ff,#f7fbff);border:1px solid rgba(191,204,226,.92);color:#23405e;font-size:11px;line-height:1.15;max-width:100%}
.tw-cm-subject-chip b{font-size:11px}
.tw-cm-subject-chip small{font-size:10px;color:#5f7492}
.tw-cm-student-table-wrap{max-height:calc(100vh - 260px)}
.tw-cm-inline-subjects{display:flex;gap:4px;flex-wrap:wrap;margin-top:5px}
.tw-cm-inline-subjects .tw-cm-subject-chip{padding:3px 7px;border-radius:10px;font-size:10px}
.tw-cm-inline-subjects .tw-cm-subject-chip small{display:none}
.tw-cm-seat-shell{padding:14px}
.tw-cm-seat-layout{display:grid;grid-template-columns:minmax(0,1fr) 280px;gap:12px;align-items:start}
.tw-cm-seat-stage-wrap{min-width:0}
.tw-cm-seat-stage-modern{
  min-height:700px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.92), rgba(242,247,255,.88)),
    linear-gradient(rgba(98,126,180,.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(98,126,180,.08) 1px, transparent 1px);
  background-size:auto,32px 32px,32px 32px;
  border:1px solid rgba(188,202,229,.95);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8), 0 10px 24px rgba(37,53,94,.08);
}
.tw-cm-seat-card{
  width:136px;min-height:70px;padding:10px 30px 10px 10px;
  border:1px solid rgba(153,171,205,.95);
  border-radius:18px;
  background:linear-gradient(180deg,#fff,#f6f9ff);
  box-shadow:0 10px 22px rgba(26,40,72,.14);
}
.tw-cm-seat-card[data-selected="true"],.tw-cm-room-object[data-selected="true"]{outline:3px solid rgba(55,119,255,.35);outline-offset:2px}
.tw-cm-seat-name{font-size:12px;color:#1e2b49}
.tw-cm-seat-meta{font-size:10px;color:#617391}
.tw-cm-seat-note,.tw-cm-seat-rotate{
  position:absolute;display:grid;place-items:center;width:24px;height:24px;border-radius:50%;font-size:12px;font-weight:900;cursor:pointer;
}
.tw-cm-seat-note{top:5px;right:5px;background:#e9f5ee;color:#146c3e}
.tw-cm-seat-rotate{right:5px;bottom:5px;background:#eef3ff;color:#2350aa}
.tw-cm-room-object{
  position:absolute;display:flex;align-items:center;justify-content:center;transform-origin:center center;
  border-radius:16px;border:1px solid rgba(117,144,186,.95);
  background:linear-gradient(180deg, rgba(255,255,255,.96), rgba(239,245,255,.94));
  box-shadow:0 10px 18px rgba(25,41,77,.10); color:#20314f; font-weight:900; text-align:center;
}
.tw-cm-room-board{background:linear-gradient(180deg,#21493b,#315e4e);color:#fff;border:4px solid #8b6f50}
.tw-cm-room-door{background:linear-gradient(180deg,#f5e7d7,#e5c7a2)}
.tw-cm-room-window{background:linear-gradient(180deg,#e8f7ff,#d7efff);color:#24637a}
.tw-cm-room-projector{background:linear-gradient(180deg,#f8fafc,#e7eef7)}
.tw-cm-room-label{padding:0 10px;pointer-events:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%}
.tw-cm-room-resize{position:absolute;right:4px;bottom:4px;width:14px;height:14px;border-radius:4px;background:#3777ff;box-shadow:0 0 0 2px rgba(255,255,255,.9)}
.tw-cm-room-delete{position:absolute;top:4px;right:4px;width:22px;height:22px;border:0;border-radius:50%;background:rgba(255,255,255,.9);color:#a3271c;font-weight:900;cursor:pointer}
.tw-cm-seat-inspector{
  position:sticky;top:0;background:linear-gradient(180deg,#fff,#f6f9ff);
  border:1px solid rgba(191,204,226,.85);border-radius:20px;padding:14px;min-height:180px;box-shadow:0 10px 24px rgba(25,41,77,.08)
}
.tw-cm-inspector-title{font-size:12px;text-transform:uppercase;letter-spacing:.08em;color:#5e7492;font-weight:900}
.tw-cm-inspector-name{font-size:18px;font-weight:900;color:#1e2b49;margin:4px 0 12px}
.tw-cm-seat-inspector-empty{min-height:150px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;color:#617391;gap:8px}
.tw-cm-seat-inspector-empty small{font-size:12px;line-height:1.4;max-width:220px}
.tw-cm-grade-template-bar{display:flex;gap:7px;flex-wrap:wrap;align-items:center;margin-top:10px}
@media (max-width: 980px){
  .tw-cm-seat-layout{grid-template-columns:1fr}
  .tw-cm-seat-inspector{position:static}
}
@media (max-width: 820px){
  .tw-cm-seat-stage-modern{min-height:620px}
  .tw-cm-seat-card{width:122px;min-height:66px}
}

/* V513.2 – Schülerakte, Dashboard, Abhaklisten, Schnellerfassung, Historie und Berichte */
.tw-cm-kicker{display:block;margin-bottom:3px;color:#3973c7;font-size:11px;font-weight:900;letter-spacing:.08em;text-transform:uppercase}
.tw-cm-file-header,.tw-cm-dashboard-head,.tw-cm-quick-head,.tw-cm-checklist-head,.tw-cm-history-head{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.tw-cm-file-header h2,.tw-cm-dashboard-head h2,.tw-cm-quick-head h2,.tw-cm-checklist-head h2{margin:0;color:#17233b}
.tw-cm-file-summary{margin-top:12px}
.tw-cm-file-grid{display:grid;grid-template-columns:minmax(0,1.75fr) minmax(300px,.75fr);gap:12px;margin-top:12px;align-items:start}
.tw-cm-file-main,.tw-cm-file-side{display:grid;gap:12px;min-width:0}
.tw-cm-file-subject{background:linear-gradient(180deg,rgba(255,255,255,.96),rgba(246,249,255,.98));border:1px solid rgba(194,208,232,.75);border-radius:22px;padding:13px;box-shadow:0 12px 28px rgba(27,39,78,.07)}
.tw-cm-file-subject>header{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:9px}
.tw-cm-file-subject h3{margin:0;color:#223554}.tw-cm-file-subject header span{color:#687a97;font-size:11px}.tw-cm-file-subject header strong{font-size:20px;color:#1d63dd}
.tw-cm-file-entry-list{display:grid;gap:7px;max-height:360px;overflow:auto}
.tw-cm-file-entry{display:grid;gap:4px;padding:9px 10px;border:1px solid rgba(204,216,237,.85);border-radius:14px;background:#fbfdff;color:#263650;font-size:12px;line-height:1.4}
.tw-cm-file-entry[data-state="missing"]{background:#fff1ef;border-color:#f2b8b0}.tw-cm-file-entry[data-state="late"]{background:#fff7e9;border-color:#eccd8b}.tw-cm-file-entry[data-state="done"]{background:#eefaf3;border-color:#a9dfbd}
.tw-cm-file-entry-head{display:flex;gap:8px;align-items:center;justify-content:space-between}.tw-cm-file-entry span{white-space:pre-wrap;overflow-wrap:anywhere}
.tw-cm-dashboard-grid{display:grid;grid-template-columns:minmax(250px,.7fr) minmax(0,1.3fr);gap:12px;margin-top:12px}
.tw-cm-grade-distribution{display:grid;gap:9px}.tw-cm-grade-dist{display:grid;grid-template-columns:70px 34px minmax(80px,1fr);gap:8px;align-items:center;font-size:12px;color:#334663}
.tw-cm-grade-dist strong{font-size:15px;color:#1d63dd}.tw-cm-grade-dist i{display:block;height:10px;border-radius:999px;background:linear-gradient(90deg,#3777ff var(--value),#e6edf8 var(--value));box-shadow:inset 0 0 0 1px rgba(158,178,211,.4)}
.tw-cm-checklist-create{display:grid;grid-template-columns:2fr 1fr 1fr 1fr auto;gap:8px;align-items:end}.tw-cm-checklist-counts{display:flex;gap:6px;flex-wrap:wrap}.tw-cm-checklist-counts span{padding:5px 8px;border-radius:999px;background:#edf3fb;color:#435a79;font-size:11px;font-weight:900}.tw-cm-checklist-counts span[data-state="done"]{background:#e5f7ed;color:#176c40}.tw-cm-checklist-counts span[data-state="missing"]{background:#fde7e3;color:#963023}.tw-cm-checklist-counts span[data-state="late"]{background:#fff2d8;color:#8b5b08}
.tw-cm-table tr[data-check-state="missing"] td{background:#fff7f5}.tw-cm-table tr[data-check-state="late"] td{background:#fffaf0}.tw-cm-table tr[data-check-state="done"] td{background:#f5fcf8}
.tw-cm-quick-select{max-width:620px}.tw-cm-quick-title{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;margin-bottom:10px}.tw-cm-quick-title h3{margin:0}.tw-cm-quick-title span{color:#677a98;font-size:12px}
.tw-cm-history-panel{margin:12px 0;padding:12px;border:1px solid rgba(191,204,226,.85);border-radius:16px;background:linear-gradient(180deg,#f9fbff,#f3f7fd)}.tw-cm-history-head h3{margin:0}.tw-cm-history-list{display:grid;gap:6px;margin-top:9px;max-height:180px;overflow:auto}.tw-cm-history-item{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:7px 8px;border:1px solid rgba(205,216,235,.9);border-radius:12px;background:#fff}.tw-cm-history-item div{display:grid;gap:2px}.tw-cm-history-item b{font-size:11px;color:#263955}.tw-cm-history-item span{font-size:10px;color:#687a97}
.tw-cm-report-controls{display:grid;grid-template-columns:minmax(180px,1fr) 150px 150px minmax(250px,1.4fr) auto auto auto;gap:8px;align-items:end}.tw-cm-report-checks{display:flex;gap:8px;flex-wrap:wrap;padding:8px 10px;border:1px solid rgba(191,204,226,.85);border-radius:14px;background:#fff;min-height:42px;align-items:center}.tw-cm-report-checks label{font-size:11px;font-weight:800;color:#425673}.tw-cm-report-preview{background:#fff;border:1px solid rgba(190,204,228,.9);border-radius:18px;padding:22px;min-height:300px}.tw-cm-report-document{max-width:980px;margin:auto;color:#17233b;line-height:1.45}.tw-cm-report-document>header{padding-bottom:14px;border-bottom:3px solid #108b8b}.tw-cm-report-document h1{margin:0 0 4px}.tw-cm-report-document h2{margin:0;color:#315e7c}.tw-cm-report-document section{margin:20px 0}.tw-cm-report-document table{width:100%;border-collapse:collapse;font-size:12px}.tw-cm-report-document th,.tw-cm-report-document td{border:1px solid #d2dceb;padding:6px;text-align:left;vertical-align:top}.tw-cm-report-document th{background:#eef4ff}.tw-cm-report-document li{margin:7px 0}.tw-cm-report-document li span{display:block}.tw-cm-report-document footer{margin-top:24px;color:#6b7c97;font-size:11px}
@media(max-width:1180px){.tw-cm-report-controls{grid-template-columns:repeat(3,minmax(0,1fr))}.tw-cm-report-checks{grid-column:1/-1}.tw-cm-checklist-create{grid-template-columns:repeat(2,minmax(0,1fr))}.tw-cm-checklist-create .tw-cm-button{align-self:end}}
@media(max-width:980px){.tw-cm-file-grid,.tw-cm-dashboard-grid{grid-template-columns:1fr}.tw-cm-file-side{grid-template-columns:repeat(2,minmax(0,1fr))}.tw-cm-report-controls{grid-template-columns:1fr 1fr}.tw-cm-report-checks{grid-column:1/-1}}
@media(max-width:700px){.tw-cm-file-side,.tw-cm-checklist-create,.tw-cm-report-controls{grid-template-columns:1fr}.tw-cm-report-checks{grid-column:auto}.tw-cm-report-preview{padding:12px}.tw-cm-grade-dist{grid-template-columns:64px 30px minmax(60px,1fr)}}

/* ---- Passwortschutz-Overlay ---- */
#twCMPwOverlay{position:fixed;inset:0;background:rgba(20,26,36,.55);display:none;align-items:center;justify-content:center;padding:16px;z-index:2147483647}
#twCMPwOverlay.is-open{display:flex}
.tw-cm-pw-card{background:#fff;border-radius:18px;max-width:360px;width:100%;padding:20px;box-shadow:0 24px 60px rgba(0,0,0,.35)}
.tw-cm-pw-card h3{margin:0 0 8px;font-size:17px;color:#213d64}
.tw-cm-pw-msg{margin:0 0 12px;font-size:13px;color:#5a6b83;line-height:1.4}
.tw-cm-pw-msg.err{color:#8f2013;font-weight:800}
.tw-cm-pw-input{width:100%;box-sizing:border-box;border:1px solid #cdd8e6;border-radius:10px;padding:10px 11px;font-size:15px;margin-bottom:9px}
.tw-cm-pw-row{display:flex;gap:8px;margin-top:4px}
.tw-cm-pw-row .tw-cm-button{flex:1}
