.portal-layout-switch{
 display:none;
 align-items:center;
 gap:3px;
 padding:4px;
 border:1px solid var(--line);
 border-radius:11px;
 background:#f0f3f7
}
body[data-current-role="teacher"] .portal-layout-switch{display:flex}
.portal-layout-option{
 min-height:34px;
 display:inline-flex;
 align-items:center;
 justify-content:center;
 padding:6px 10px;
 border-radius:8px;
 color:var(--muted);
 font-size:11px;
 font-weight:800;
 text-decoration:none;
 white-space:nowrap
}
.portal-layout-option:hover{background:#fff;color:var(--ink)}
html[data-kw-layout="modern"] .portal-layout-modern,
html[data-kw-layout="classic"] .portal-layout-classic{
 background:#fff;
 color:var(--brand);
 box-shadow:0 1px 3px rgba(0,0,0,.08)
}
.modern-material-library{display:none}

html[data-kw-layout="modern"] body[data-current-role="teacher"]{
 --modern-nav-width:232px;
 --modern-top-offset:var(--kw-modern-top-offset,79px)
}
html[data-kw-layout="modern"] body[data-current-role="teacher"] .topbar{
 backdrop-filter:none
}
html[data-kw-layout="modern"] body[data-current-role="teacher"] .topbar-inner{
 max-width:none;
 min-height:79px;
 padding-left:22px;
 padding-right:22px
}
html[data-kw-layout="modern"] body[data-current-role="teacher"] .role-menu-wrap{
 position:fixed;
 z-index:24;
 top:var(--modern-top-offset);
 bottom:0;
 left:0;
 width:var(--modern-nav-width);
 overflow:auto;
 border-top:0;
 border-right:1px solid #d6deea;
 background:#13263d;
 box-shadow:4px 0 18px rgba(18,35,58,.08)
}
html[data-kw-layout="modern"] body[data-current-role="teacher"] .role-menu{
 width:100%;
 max-width:none;
 min-height:100%;
 margin:0;
 padding:22px 13px;
 display:flex;
 flex-direction:column;
 align-items:stretch;
 gap:5px;
 overflow:visible
}
html[data-kw-layout="modern"] body[data-current-role="teacher"] .role-menu-label{
 margin:0 5px 11px;
 color:#9fb0c2
}
html[data-kw-layout="modern"] body[data-current-role="teacher"] .role-menu button{
 width:100%;
 min-height:45px;
 flex:0 0 auto;
 padding:10px 12px;
 border:0;
 border-radius:10px;
 color:#e8eef6;
 font-size:13px;
 font-weight:750;
 text-align:left
}
html[data-kw-layout="modern"] body[data-current-role="teacher"] .role-menu button:hover{
 background:#203c58;
 color:#fff
}
html[data-kw-layout="modern"] body[data-current-role="teacher"] .role-menu button.active{
 padding-left:16px;
 border-color:transparent;
 background:#294b6c;
 color:#fff;
 box-shadow:inset 4px 0 0 #27b99a
}
html[data-kw-layout="modern"] body[data-current-role="teacher"] .teacher-class-menu{width:100%}
html[data-kw-layout="modern"] body[data-current-role="teacher"] .teacher-class-menu summary{
 width:100%;
 min-height:45px;
 padding:12px;
 border:0;
 color:#e8eef6;
 font-size:13px;
 text-align:left
}
html[data-kw-layout="modern"] body[data-current-role="teacher"] .teacher-class-menu[open] summary,
html[data-kw-layout="modern"] body[data-current-role="teacher"] .teacher-class-menu.active summary{
 padding-left:16px;
 background:#294b6c;
 color:#fff;
 box-shadow:inset 4px 0 0 #27b99a
}
html[data-kw-layout="modern"] body[data-current-role="teacher"] .teacher-class-submenu{
 position:static;
 min-width:0;
 margin:4px 0 7px 10px;
 padding:4px 0 4px 8px;
 background:transparent;
 border:0;
 border-left:1px solid #49627c;
 border-radius:0;
 box-shadow:none
}
html[data-kw-layout="modern"] body[data-current-role="teacher"] .teacher-class-submenu button{
 min-height:36px;
 padding:7px 10px;
 color:#c8d5e3;
 font-size:12px
}
html[data-kw-layout="modern"] body[data-current-role="teacher"] #appMain{
 width:auto;
 max-width:none;
 margin:0 0 0 var(--modern-nav-width);
 padding:26px 30px 64px
}
html[data-kw-layout="modern"] body[data-current-role="teacher"] #teacherView>.hero{
 align-items:flex-start;
 margin-bottom:16px;
 padding:0 2px
}
html[data-kw-layout="modern"] body[data-current-role="teacher"] #teacherView>.hero h2{
 font-size:30px;
 letter-spacing:-.03em
}
html[data-kw-layout="modern"] body[data-current-role="teacher"] #teacherView>.hero>div:last-child{
 display:none
}
html[data-kw-layout="modern"] body[data-current-role="teacher"] .card{
 border-radius:14px;
 box-shadow:0 1px 2px rgba(20,30,50,.035)
}
html[data-kw-layout="modern"] body[data-current-role="teacher"] .section-title{
 margin-top:21px
}
body[data-current-role="teacher"] #teacherSubjects>:not(#modernMaterialLibrary){
 display:none!important
}
body[data-current-role="teacher"] #modernMaterialLibrary{
 display:block
}
.modern-material-head{
 display:flex;
 align-items:flex-end;
 justify-content:space-between;
 gap:16px;
 margin-bottom:15px
}
.modern-material-head h3{margin:0 0 4px;font-size:23px}
.modern-material-head p{margin:0;color:var(--muted);font-size:13px}
.modern-material-principle{
 max-width:420px;
 padding:10px 12px;
 border:1px solid #c8d8f4;
 border-radius:11px;
 background:#f6f9ff;
 color:#36506d;
 font-size:12px;
 line-height:1.45
}
.modern-material-kpis{
 display:grid;
 grid-template-columns:repeat(4,minmax(0,1fr));
 gap:9px;
 margin-bottom:13px
}
.modern-material-kpis>div{
 display:flex;
 align-items:baseline;
 gap:8px;
 padding:11px 13px;
 border:1px solid var(--line);
 border-radius:12px;
 background:#fff
}
.modern-material-kpis b{font-size:22px;line-height:1;color:var(--brand)}
.modern-material-kpis span{color:var(--muted);font-size:11px;font-weight:800}
.modern-material-kpis .needs-attention{border-color:#f0d5a3;background:#fffaf1}
.modern-material-kpis .needs-attention b{color:var(--warn)}
.modern-add-panel{
 margin-bottom:14px;
 padding:0;
 overflow:hidden
}
.modern-add-panel>summary{
 list-style:none;
 display:flex;
 align-items:center;
 justify-content:space-between;
 gap:12px;
 padding:15px 17px;
 cursor:pointer
}
.modern-add-panel>summary::-webkit-details-marker{display:none}
.modern-add-panel>summary span:first-child{display:grid;gap:2px}
.modern-add-panel>summary b{color:var(--brand);font-size:15px}
.modern-add-panel>summary small{color:var(--muted);font-size:11px}
.modern-summary-action{color:var(--brand);font-size:11px;font-weight:850}
.modern-add-panel[open] .modern-summary-action{font-size:0}
.modern-add-panel[open] .modern-summary-action::after{content:"Zwiń";font-size:11px}
.modern-material-upload{
 display:grid;
 grid-template-columns:minmax(190px,.8fr) minmax(230px,1.2fr);
 gap:14px;
 padding:16px 17px 17px;
 border-top:1px solid var(--line);
 background:#fbfcfe
}
.modern-upload-fields,
.modern-class-picker{
 min-width:0
}
.modern-upload-fields h4,
.modern-class-picker h4{
 margin:0 0 10px;
 font-size:15px
}
.modern-field{
 display:grid;
 gap:5px;
 margin-top:10px
}
.modern-field:first-of-type{margin-top:0}
.modern-field label{
 color:var(--muted);
 font-size:11px;
 font-weight:800
}
.modern-material-file{
 width:100%;
 min-height:48px;
 padding:10px;
 border:1px dashed #aac0e6;
 border-radius:10px;
 background:#f8fbff
}
.modern-class-picker-head{
 display:flex;
 align-items:flex-start;
 justify-content:space-between;
 gap:10px
}
.modern-class-picker-actions{
 display:flex;
 gap:5px;
 flex-wrap:wrap
}
.modern-class-picker-actions .btn{
 min-height:34px;
 padding:6px 8px;
 font-size:11px
}
.modern-class-choices{
 display:grid;
 grid-template-columns:repeat(2,minmax(0,1fr));
 gap:8px;
 margin-top:10px
}
.modern-class-choice{
 display:grid;
 grid-template-columns:auto minmax(0,1fr);
 gap:9px;
 align-items:start;
 min-height:58px;
 padding:10px;
 border:1px solid var(--line);
 border-radius:10px;
 background:#fbfcfe;
 cursor:pointer
}
.modern-class-choice:has(input:checked){
 border-color:#a9c0ee;
 background:#f3f7ff
}
.modern-class-choice input{margin-top:3px}
.modern-class-choice b{display:block;font-size:13px}
.modern-class-choice span{display:block;margin-top:2px;color:var(--muted);font-size:10px;line-height:1.35}
.modern-upload-footer{
 grid-column:1/-1;
 display:flex;
 align-items:center;
 justify-content:flex-end;
 gap:10px;
 padding-top:2px
}
.modern-material-status{
 margin-right:auto;
 color:var(--muted);
 font-size:12px
}
.modern-material-status.error{color:var(--bad)}
.modern-filter-panel{
 margin-bottom:14px;
 padding:15px
}
.modern-search-field{display:grid;gap:5px}
.modern-search-field label,
.modern-filter-grid label{
 color:var(--muted);
 font-size:10px;
 font-weight:850;
 text-transform:uppercase;
 letter-spacing:.05em
}
.modern-search-field .input{
 min-height:48px;
 padding-left:14px;
 border-color:#b7c8e7;
 font-size:14px
}
.modern-filter-grid{
 display:grid;
 grid-template-columns:repeat(5,minmax(0,1fr)) auto;
 gap:8px;
 align-items:end;
 margin-top:10px
}
.modern-filter-grid>div{display:grid;gap:4px;min-width:0}
.modern-filter-grid .input{min-height:42px;font-size:11px;padding:8px}
.modern-clear-filters{min-height:42px;white-space:nowrap}
.modern-library-toolbar{
 display:flex;
 align-items:center;
 justify-content:space-between;
 gap:12px;
 margin:22px 0 10px
}
.modern-library-toolbar h3{margin:0;font-size:18px}
.modern-library-toolbar span{color:var(--muted);font-size:12px}
.modern-material-list{display:grid;gap:10px}
.modern-material-item{
 padding:0;
 overflow:hidden
}
.modern-material-main{
 display:grid;
 grid-template-columns:48px minmax(0,1fr) auto;
 gap:12px;
 align-items:center;
 padding:14px 15px
}
.modern-material-icon{
 width:46px;
 height:46px;
 display:grid;
 place-items:center;
 border-radius:12px;
 background:var(--soft);
 color:var(--brand);
 font-size:11px;
 font-weight:900
}
.modern-material-title{font-weight:850}
.modern-material-copy{min-width:0}
.modern-material-meta{
 margin-top:3px;
 color:var(--muted);
 font-size:11px;
 line-height:1.45
}
.modern-material-paths{
 display:grid;
 gap:3px;
 margin-top:7px
}
.modern-material-path{
 color:#53647b;
 font-size:10px;
 line-height:1.35
}
.modern-assignment-chips{
 display:flex;
 gap:5px;
 flex-wrap:wrap;
 margin-top:7px
}
.modern-assignment-chip{
 display:inline-flex;
 align-items:center;
 min-height:25px;
 padding:4px 8px;
 border-radius:999px;
 background:#eef4ff;
 color:#1747b0;
 font-size:10px;
 font-weight:800
}
.modern-assignment-chip.unassigned{
 background:#fff4df;
 color:var(--warn)
}
.modern-material-actions{
 display:flex;
 gap:6px;
 flex-wrap:wrap;
 justify-content:flex-end
}
.modern-material-actions .btn{min-height:38px;padding:7px 10px}
.modern-assignment-editor{
 border-top:1px solid var(--line);
 background:#fbfcfe
}
.modern-assignment-editor summary{
 padding:11px 15px;
 cursor:pointer;
 color:var(--brand);
 font-size:12px;
 font-weight:850
}
.modern-assignment-editor-body{
 padding:0 15px 14px
}
.modern-assignment-editor .modern-class-choices{
 grid-template-columns:repeat(3,minmax(0,1fr))
}
.modern-assignment-editor-actions{
 display:flex;
 align-items:center;
 justify-content:flex-end;
 gap:8px;
 margin-top:10px
}
.modern-empty{
 padding:28px;
 border:1px dashed #b9c7dc;
 border-radius:13px;
 background:#fbfdff;
 color:var(--muted);
 text-align:center
}
.student-start-guide{
 margin-bottom:20px;
 padding:18px;
 border:1px solid #c7d7f7;
 border-radius:18px;
 background:linear-gradient(135deg,#f8fbff 0%,#eef4ff 62%,#f7f4ff 100%);
 box-shadow:0 8px 24px rgba(36,94,234,.07)
}
.student-start-head{
 display:flex;
 align-items:flex-start;
 justify-content:space-between;
 gap:18px;
 margin-bottom:14px
}
.student-start-head h3{margin:2px 0 3px;font-size:21px;letter-spacing:-.02em}
.student-start-head p{margin:0;color:var(--muted);font-size:12px}
.student-first-steps{
 max-width:470px;
 display:flex;
 justify-content:flex-end;
 gap:6px;
 flex-wrap:wrap
}
.student-first-steps span{
 display:inline-flex;
 align-items:center;
 min-height:29px;
 padding:5px 8px;
 border:1px solid #cad7ed;
 border-radius:999px;
 background:#fff;
 color:#53647b;
 font-size:10px;
 font-weight:800
}
.student-first-steps span.done{border-color:#b7e3c4;background:#edf9f1;color:var(--good)}
.student-start-grid{
 display:grid;
 grid-template-columns:1.15fr 1fr 1fr;
 gap:10px
}
.student-start-card{
 min-width:0;
 padding:14px;
 border:1px solid rgba(171,194,241,.85);
 border-radius:14px;
 background:rgba(255,255,255,.9)
}
.student-start-card.primary{
 border-color:#245eea;
 background:#173f9b;
 color:#fff
}
.student-start-card h4{margin:5px 0 5px;font-size:16px;line-height:1.25}
.student-start-card p{margin:3px 0 11px;color:var(--muted);font-size:11px;line-height:1.4}
.student-start-card.primary p{color:#dfe8ff}
.student-start-card.primary .student-start-label{color:#bcd0ff}
.student-start-card.primary .btn.primary{background:#fff;border-color:#fff;color:#173f9b}
.student-start-label{
 display:block;
 color:var(--brand);
 font-size:10px;
 font-weight:900;
 letter-spacing:.07em;
 text-transform:uppercase
}
.student-start-list{display:grid;gap:4px;margin:7px 0 9px}
.student-start-list button{
 width:100%;
 display:grid;
 grid-template-columns:auto minmax(0,1fr);
 gap:7px;
 align-items:center;
 padding:6px 0;
 border:0;
 border-bottom:1px solid var(--line);
 background:transparent;
 color:var(--ink);
 text-align:left
}
.student-start-list button:last-child{border-bottom:0}
.student-start-list button span{color:var(--brand);font-size:9px;font-weight:900}
.student-start-list button b{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px}
.student-access-chips{display:flex;gap:5px;flex-wrap:wrap;margin:9px 0 11px}
.student-access-chips span{padding:4px 7px;border-radius:999px;background:#eef4ff;color:#1747b0;font-size:9px;font-weight:850}
.student-material-search{
 display:grid;
 grid-template-columns:minmax(180px,.65fr) minmax(260px,1.35fr);
 gap:14px;
 align-items:center;
 margin-bottom:11px;
 padding:14px
}
.student-material-search label{display:grid;gap:2px}
.student-material-search label span{color:var(--muted);font-size:11px;font-weight:400}
.student-material-search>div{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:7px}
.student-material-search .input{min-height:46px;border-color:#b7c8e7}
.student-search-results{padding-top:2px;padding-bottom:2px}
.quiz-material-picker{
 display:grid;
 gap:7px;
 margin-top:5px;
 padding:11px;
 border:1px solid #bfd0ef;
 border-radius:12px;
 background:#f8fbff
}
.quiz-material-search-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:7px}
.quiz-material-search-row .input{min-height:44px;border-color:#aec2e7}
.quiz-material-selection-summary{
 display:grid;
 gap:2px;
 padding:9px 10px;
 border-left:4px solid var(--brand);
 border-radius:8px;
 background:#fff
}
.quiz-material-selection-summary b{color:var(--ink)}
.quiz-material-selection-summary span{color:var(--muted)}
body.high-contrast .portal-layout-switch,
body.high-contrast .modern-material-principle,
body.high-contrast .modern-class-choice,
body.high-contrast .modern-material-file,
body.high-contrast .modern-assignment-editor,
body.high-contrast .student-start-guide,
body.high-contrast .student-start-card{
 background:#000!important;
 color:#fff!important;
 border-color:#fff!important
}
body.high-contrast .modern-assignment-chip{background:#000;color:#ffdf00;border:1px solid #ffdf00}

@media(max-width:1180px){
 .portal-layout-switch{order:10}
 html[data-kw-layout="modern"] body[data-current-role="teacher"]{--modern-nav-width:205px}
 .modern-assignment-editor .modern-class-choices{grid-template-columns:repeat(2,minmax(0,1fr))}
 .modern-filter-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media(max-width:980px){
 html[data-kw-layout="modern"] body[data-current-role="teacher"] .topbar-inner{min-height:0}
 html[data-kw-layout="modern"] body[data-current-role="teacher"] .role-menu-wrap{
 position:static;
 width:auto;
 overflow:visible;
 border-right:0;
 border-top:1px solid var(--line);
 background:#fff;
 box-shadow:none
 }
 html[data-kw-layout="modern"] body[data-current-role="teacher"] .role-menu{
 min-height:0;
 padding:7px 14px 9px;
 flex-direction:row;
 align-items:center;
 overflow-x:auto
 }
 html[data-kw-layout="modern"] body[data-current-role="teacher"] .role-menu-label{color:var(--muted);margin:0 3px 0 0}
 html[data-kw-layout="modern"] body[data-current-role="teacher"] .role-menu button{
 width:auto;
 min-height:40px;
 color:var(--muted);
 text-align:center
 }
 html[data-kw-layout="modern"] body[data-current-role="teacher"] .role-menu button:hover{background:var(--soft2);color:var(--ink)}
 html[data-kw-layout="modern"] body[data-current-role="teacher"] .role-menu button.active{
  padding-left:12px;
  background:var(--soft);
  color:var(--brand);
  box-shadow:inset 0 -3px 0 var(--brand)
 }
 html[data-kw-layout="modern"] body[data-current-role="teacher"] .teacher-class-menu{width:auto}
 html[data-kw-layout="modern"] body[data-current-role="teacher"] .teacher-class-menu summary{
  width:auto;
  min-height:40px;
  padding:10px 12px;
  color:var(--muted);
  text-align:center
 }
 html[data-kw-layout="modern"] body[data-current-role="teacher"] .teacher-class-menu[open] summary,
 html[data-kw-layout="modern"] body[data-current-role="teacher"] .teacher-class-menu.active summary{
  padding-left:12px;
  background:var(--soft);
  color:var(--brand);
  box-shadow:inset 0 -3px 0 var(--brand)
 }
 html[data-kw-layout="modern"] body[data-current-role="teacher"] .teacher-class-submenu{
  position:static;
  min-width:190px;
  margin:5px 0 0;
  padding:7px;
  background:#fff;
  border:1px solid var(--line);
  border-radius:12px;
  box-shadow:0 12px 30px rgba(21,37,57,.18)
 }
 html[data-kw-layout="modern"] body[data-current-role="teacher"] .teacher-class-submenu button{
  min-height:38px;
  padding:8px 10px;
  color:var(--muted)
 }
 html[data-kw-layout="modern"] body[data-current-role="teacher"] #appMain{
 margin-left:0;
 padding:22px 18px 58px
 }
 .modern-material-upload{grid-template-columns:1fr}
 .modern-upload-footer{grid-column:auto}
 .student-start-head{flex-direction:column}
 .student-first-steps{max-width:none;justify-content:flex-start}
 .student-start-grid{grid-template-columns:1fr 1fr}
 .student-start-card.primary{grid-column:1/-1}
}
@media(max-width:700px){
 body[data-current-role="teacher"] .portal-layout-switch{width:100%;order:20}
 .portal-layout-option{flex:1}
 .modern-material-head{align-items:stretch;flex-direction:column}
 .modern-class-choices,
 .modern-assignment-editor .modern-class-choices{grid-template-columns:1fr}
 .modern-material-kpis{grid-template-columns:1fr 1fr}
 .modern-filter-grid{grid-template-columns:1fr}
 .modern-material-main{grid-template-columns:42px minmax(0,1fr)}
 .modern-material-actions{grid-column:1/-1;justify-content:flex-start}
 .modern-upload-footer{align-items:stretch;flex-direction:column}
 .modern-upload-footer .btn{width:100%}
 .student-start-guide{padding:14px}
 .student-start-grid{grid-template-columns:1fr}
 .student-start-card.primary{grid-column:auto}
 .student-material-search{grid-template-columns:1fr}
 .student-material-search>div{grid-template-columns:1fr}
 .quiz-material-search-row{grid-template-columns:1fr}
}
