:root{
  --dark:#102833;--soft:#173642;--main:#31546d;--teal:#2f8f9d;--mint:#8ed8c6;
  --sky:#6da9d8;--text:#213944;--muted:#657985;--border:#dce6ea;--bg:#f5f8fa;
  font-family:Arial,Helvetica,sans-serif;color:var(--text)
}
*{box-sizing:border-box}body{margin:0;background:var(--bg)}button,input,select{font:inherit}
.topbar{height:66px;background:var(--dark);color:#fff;display:flex;align-items:center;justify-content:space-between;padding:0 24px;position:sticky;top:0;z-index:10}
.topbar strong{font-size:19px}.topbar span{margin-left:14px;opacity:.72;font-size:14px}
.layout{display:grid;grid-template-columns:230px 1fr;min-height:calc(100vh - 66px)}
.sidebar{background:#fff;border-right:1px solid var(--border);padding:18px 12px}
.nav,.nav-disabled{width:100%;display:block;border:0;background:transparent;text-align:left;padding:12px 14px;border-radius:10px;color:var(--text);margin-bottom:4px}
.nav{cursor:pointer;background:transparent;color:var(--text);font-weight:400}
.nav:hover{background:#f1f5f6;color:var(--text)}
.nav.active{
  background:var(--dark);
  color:#fff;
  font-weight:700;
}
.nav.active:hover{
  background:var(--dark);
  color:#fff;
}
.nav-disabled{opacity:.45}.nav-disabled span{display:block;font-size:11px;margin-top:3px}
.content{padding:28px;min-width:0}.hidden{display:none!important}
.page-head{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;margin-bottom:20px}
h1{font-size:28px;margin:0 0 6px;color:var(--dark)}h2{color:var(--soft)}p{line-height:1.55}.page-head p{margin:0;color:var(--muted)}
.cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:14px;margin-bottom:20px}
.card,.panel{background:#fff;border:1px solid var(--border);border-radius:14px;padding:20px;box-shadow:0 4px 16px rgba(16,40,51,.04)}
.card strong{display:block;font-size:30px;color:var(--dark)}.card span{font-size:13px;color:var(--muted)}
.panel{max-width:820px}.panel h2{margin-top:0}
.btn{border:1px solid #cbd9df;background:#fff;color:var(--text);border-radius:9px;padding:9px 14px;cursor:pointer}.btn:hover{filter:brightness(.98)}
.btn.primary{border-color:var(--teal);background:var(--teal);color:#fff;font-weight:700}.btn.ghost{background:transparent;color:#fff;border-color:rgba(255,255,255,.35)}
.toolbar{display:flex;gap:10px;flex-wrap:wrap;background:#fff;border:1px solid var(--border);padding:12px;border-radius:12px 12px 0 0}
input,select{border:1px solid #cad9df;border-radius:8px;padding:9px 11px;background:#fff;min-height:40px;color:var(--text)}
.toolbar input{min-width:250px;flex:1}
.table-wrap{overflow:auto;background:#fff;border:1px solid var(--border);border-radius:12px}.toolbar+.table-wrap{border-top:0;border-radius:0 0 12px 12px}
table{width:100%;border-collapse:collapse;min-width:680px}th,td{padding:13px 14px;border-bottom:1px solid #edf2f4;text-align:left;font-size:14px}th{background:#fafcfd;color:#5a707c;font-size:12px;text-transform:uppercase;letter-spacing:.04em}
.badge{display:inline-block;padding:5px 8px;border-radius:999px;background:#edf5f6;font-size:12px}.badge.active{background:#e3f5ef;color:#23725f}.badge.expelled,.badge.archived{background:#f0f1f2;color:#67747a}
.link-btn{border:0;background:transparent;color:#237d89;cursor:pointer;font-weight:700}
dialog{border:0;border-radius:14px;padding:0;width:min(560px,calc(100vw - 30px));box-shadow:0 24px 70px rgba(16,40,51,.24)}dialog::backdrop{background:rgba(16,40,51,.45)}
#entity-form{padding:22px}.dialog-head,.dialog-actions{display:flex;align-items:center;justify-content:space-between;gap:12px}.dialog-head h2{margin:0}.dialog-actions{justify-content:flex-end;margin-top:20px}
.icon-btn{font-size:28px;border:0;background:transparent;cursor:pointer;color:var(--muted)}
.stack{display:grid;gap:13px;margin-top:18px}.stack label{display:grid;gap:6px;font-size:13px;font-weight:700;color:#49616d}.stack input,.stack select{width:100%}
.alert{border-radius:8px;padding:10px 12px;margin:12px 0}.alert.error{background:#fff0f0;color:#9c3030;border:1px solid #f0caca}
.login-page{display:grid;place-items:center;min-height:100vh;background:linear-gradient(140deg,#e8f4f4,#f8fbfc)}
.login-card{width:min(420px,calc(100vw - 30px));background:#fff;border:1px solid var(--border);border-radius:18px;padding:32px;box-shadow:0 18px 60px rgba(16,40,51,.11)}
.brand-mark{display:inline-flex;background:var(--dark);color:#fff;font-weight:800;padding:8px 11px;border-radius:9px;margin-bottom:18px}.login-card h1{margin-bottom:3px}.muted{color:var(--muted)}
@media(max-width:900px){.layout{grid-template-columns:1fr}.sidebar{display:flex;overflow:auto;border-right:0;border-bottom:1px solid var(--border);padding:9px;position:sticky;top:66px;z-index:9}.nav,.nav-disabled{width:auto;white-space:nowrap;margin:0 4px}.nav-disabled{display:none}.content{padding:18px}.cards{grid-template-columns:repeat(2,1fr)}}
@media(max-width:520px){.cards{grid-template-columns:1fr 1fr}.page-head{align-items:stretch;flex-direction:column}.topbar span{display:none}}

.alert.success{background:#e8f7ef;color:#236a52;border:1px solid #bfe5d2}.settings-panel{max-width:620px}

.badge.warning{background:#fff4dc;color:#8b6714}
.badge.danger{background:#fff0f0;color:#9c3030}
.import-panel{max-width:900px}
.import-form{display:flex;gap:12px;align-items:center;flex-wrap:wrap;margin-top:16px}
.import-form input[type=file]{min-width:320px;max-width:100%;height:auto}
.import-summary{grid-template-columns:repeat(4,minmax(140px,1fr));margin-top:20px}
.import-actions{max-width:none;display:flex;justify-content:space-between;align-items:center;gap:20px;margin-bottom:12px}
.issue-text{font-size:12px;color:#7c5050;margin-top:5px;max-width:440px}
@media(max-width:700px){.import-summary{grid-template-columns:1fr 1fr}.import-actions{align-items:stretch;flex-direction:column}.import-form input[type=file]{min-width:0;width:100%}}

.mini-tag{display:inline-block;margin:2px 3px 2px 0;padding:4px 7px;border-radius:999px;background:#edf7f7;color:#24737c;font-size:12px}
.actions-cell{white-space:nowrap}.actions-cell .link-btn{margin-right:8px}
.danger-link{color:#a44747}
.selector-panel{max-width:none;margin-bottom:18px}
.selector-grid{display:grid;grid-template-columns:minmax(180px,1fr) minmax(180px,1fr) auto;gap:12px;align-items:end}
.selector-grid label{display:grid;gap:6px;font-size:13px;font-weight:700;color:#49616d}
.eligible-result{margin-top:14px;padding:12px;border-radius:9px;background:#f6fafb;border:1px solid var(--border)}
.import-grid{display:grid;grid-template-columns:repeat(2,minmax(280px,1fr));gap:16px;margin-bottom:18px}
.import-grid .panel{max-width:none}
.template-link{display:inline-block;color:#237d89;font-weight:700;font-size:13px;margin:4px 0 6px}
@media(max-width:850px){.import-grid{grid-template-columns:1fr}.selector-grid{grid-template-columns:1fr}}

.primary-link{color:#237d89;font-weight:800}
.assignment-warning{padding:11px 12px;border-radius:9px;background:#fff4dc;border:1px solid #efd79d;color:#74571b;font-size:13px;line-height:1.4}
.assignment-help{padding:10px 12px;border-radius:9px;background:#f5fafb;border:1px solid var(--border);color:#60757f;font-size:12px;line-height:1.45}
#entity-form button[disabled]{opacity:.45;cursor:not-allowed}

/* v0.2.3: curriculum and student learning card */
.badge.update{background:#e9efff;color:#3c5f9e}
.badge.neutral{background:#edf2f4;color:#657985}
.text-danger{color:#a44747}
.curriculum-summary{grid-template-columns:repeat(auto-fit,minmax(140px,1fr))}
.readiness-panel{max-width:none;margin-bottom:18px}
.curriculum-import-form{align-items:flex-end}
.import-field{display:grid;gap:6px;min-width:220px;font-size:13px;font-weight:700;color:#49616d}
.import-field input,.import-field select{width:100%}
.student-list-hint{margin:10px 2px 0;font-size:13px}
.student-name-link{border:0;background:transparent;padding:0;color:#176d78;font-weight:800;cursor:pointer;text-align:left}
.student-name-link:hover{text-decoration:underline}
.student-card-dialog{width:min(1180px,calc(100vw - 24px));max-width:none;max-height:92vh;overflow:auto}
.student-card-shell{padding:22px}
.student-card-head{align-items:flex-start;margin-bottom:18px}
.student-card-head h2{font-size:25px;margin:3px 0 6px;color:var(--dark)}
.eyebrow{text-transform:uppercase;letter-spacing:.08em;font-size:11px;font-weight:800;color:var(--teal)}
.student-card-summary{grid-template-columns:repeat(auto-fit,minmax(135px,1fr));margin-bottom:18px}
.student-card-tabs{display:flex;gap:7px;overflow:auto;border-bottom:1px solid var(--border);margin:0 0 16px}
.student-tab{border:0;background:transparent;padding:11px 12px;color:var(--muted);font-weight:700;cursor:pointer;white-space:nowrap;border-bottom:3px solid transparent}
.student-tab.active{color:#176d78;border-bottom-color:var(--teal)}
.student-card-table{border-radius:10px;max-height:48vh}
.student-card-table table{min-width:900px}
.student-empty{padding:22px;background:#f7fafb;border:1px solid var(--border);border-radius:10px;color:var(--muted)}
.student-empty-cell{text-align:center!important;color:var(--muted);padding:28px!important}
.attendance-cards{grid-template-columns:repeat(auto-fit,minmax(130px,1fr));margin-top:4px}
.student-card-actions{border-top:1px solid var(--border);padding-top:16px;margin-top:18px}
@media(max-width:700px){.student-card-shell{padding:15px}.student-card-dialog{width:calc(100vw - 12px)}.student-card-summary{grid-template-columns:1fr 1fr}}


.head-actions{display:flex;gap:10px;flex-wrap:wrap;justify-content:flex-end}
.curriculum-toolbar{align-items:end}
.compact-field{display:grid;gap:6px;font-size:12px;font-weight:700;color:#506672;min-width:170px}
.compact-field select{min-width:170px}
.curriculum-plan-meta{display:flex;justify-content:space-between;align-items:flex-start;gap:20px;max-width:none}
.import-field-wide{grid-column:1/-1}
.student-year-picker{display:flex;gap:8px;align-items:center;margin-top:8px;font-size:12px;font-weight:700;color:#506672}
.student-year-picker select{min-width:160px}
.badge.update{background:#eef2ff;color:#4b5c9a}
.text-danger{color:#a33b3b}
.check-label{display:flex!important;align-items:center;gap:9px;font-weight:600}
.check-label input{width:auto!important}
.student-card-table table{min-width:1050px}
#student-tab-subjects .student-card-table table{min-width:1450px}
@media(max-width:800px){
  .head-actions{justify-content:flex-start}
  .curriculum-plan-meta{flex-direction:column}
  .student-year-picker{align-items:flex-start;flex-direction:column}
}


.contingent-table{min-width:1450px}
.contact-route-grid{display:grid;grid-template-columns:repeat(2,minmax(280px,1fr));gap:14px;margin-bottom:16px}
.contact-route-panel{max-width:none}
.contact-route-panel.route-ready{border-left:4px solid #2f8f9d}
.contact-route-panel.route-problem{border-left:4px solid #a44747}
.route-recipients{margin-top:12px;padding:10px 12px;background:#f6fafb;border-radius:9px}
.route-recipients hr{border:0;border-top:1px solid var(--border);margin:9px 0}
.contact-panel{max-width:none;margin-top:14px}
.contact-panel-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin-bottom:12px}
.contact-panel-head h3,.contact-route-panel h3{margin:0 0 5px}
.contact-data-row{display:grid;grid-template-columns:180px 1fr;gap:14px;padding:9px 0;border-bottom:1px solid var(--border)}
.contact-data-row:last-child{border-bottom:0}
#student-tab-payments .student-card-table table{min-width:1050px}
#student-tab-contacts table{min-width:980px}
#student-tab-notifications table{min-width:900px}
.student-card-summary{grid-template-columns:repeat(auto-fit,minmax(140px,1fr))}
@media(max-width:850px){
  .contact-route-grid{grid-template-columns:1fr}
  .contact-panel-head{flex-direction:column}
  .contact-data-row{grid-template-columns:1fr;gap:3px}
}


.guardian-student-match{
  min-width:320px;
  max-width:460px;
  width:100%;
}
.field-help{
  display:block;
  margin-top:5px;
  font-size:12px;
  color:#6a7d86;
  font-weight:400;
}


.notification-policy-panel{max-width:none;margin:14px 0}
.notification-policy-panel h3{margin:0 0 12px}
.notification-policy-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(260px,1fr));
  gap:12px;
}
.notification-policy-grid>div{
  padding:14px;
  border:1px solid var(--border);
  border-radius:10px;
  background:#f8fbfc;
}
.notification-policy-grid strong,
.notification-policy-grid span,
.notification-policy-grid small{display:block}
.notification-policy-grid span{margin:6px 0;font-weight:700;color:#31546d}
.notification-policy-grid small{line-height:1.45;color:#61747d}
.route-mini{margin-top:8px;padding-top:8px;border-top:1px solid var(--border)}
@media(max-width:850px){
  .notification-policy-grid{grid-template-columns:1fr}
}


.btn.danger{
  background:#fff4f4;
  border-color:#d7a1a1;
  color:#9b3434;
}
.btn.danger:hover{background:#fde8e8}
.dialog-actions-spread{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:14px;
}
.dialog-actions-right{
  display:flex;
  gap:10px;
  justify-content:flex-end;
  margin-left:auto;
}
@media(max-width:640px){
  .dialog-actions-spread{align-items:stretch;flex-direction:column}
  .dialog-actions-right{width:100%;margin-left:0}
  .dialog-actions-right .btn{flex:1}
}


/* v0.3.4: заметные действия удаления */
.danger-link{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:32px;
  padding:6px 10px;
  margin-left:6px;
  border:1px solid #d8a1a1 !important;
  border-radius:7px;
  background:#fff4f4 !important;
  color:#9b3434 !important;
  font-weight:700;
}
.danger-link:hover{
  background:#fde5e5 !important;
}
.build-version-marker{
  position:relative;
  z-index:20;
  width:100%;
  padding:7px 18px;
  background:#eef8f8;
  border-bottom:1px solid rgba(47,143,157,.22);
  color:#31546d;
  font-size:12px;
  font-weight:700;
  text-align:center;
  box-sizing:border-box;
}


/* v0.3.5 - постоянно видимый синхронизированный горизонтальный scrollbar */
.persistent-table-scrollbar{
  position:fixed;
  bottom:8px;
  z-index:2147483000;
  display:none;
  height:18px;
  overflow-x:scroll;
  overflow-y:hidden;
  box-sizing:border-box;
  border:1px solid rgba(16,40,51,.24);
  border-radius:8px;
  background:#ffffff;
  box-shadow:0 4px 16px rgba(16,40,51,.18);
}
.persistent-table-scrollbar.visible{display:block}
.persistent-table-scrollbar-inner{
  height:1px;
  min-width:100%;
}
.persistent-table-scrollbar::-webkit-scrollbar{height:14px}
.persistent-table-scrollbar::-webkit-scrollbar-track{
  background:#edf3f5;
  border-radius:7px;
}
.persistent-table-scrollbar::-webkit-scrollbar-thumb{
  background:#7895a0;
  border:2px solid #edf3f5;
  border-radius:7px;
}
.persistent-table-scrollbar::-webkit-scrollbar-thumb:hover{background:#5f7f8b}

.student-subject-tab-toolbar{
  display:flex;
  flex-direction:column;
  gap:4px;
  margin:0 0 12px;
}
.student-subject-groups{
  display:grid;
  gap:14px;
}
.student-subject-group{
  overflow:visible;
  border:1px solid var(--border);
  border-radius:12px;
  background:#fff;
}
.student-subject-group.has-debt{
  border-color:rgba(164,71,71,.34);
}
.student-subject-group-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:13px 15px;
  background:#f6fafb;
  border-radius:12px 12px 0 0;
}
.student-subject-group .table-wrap{
  border-left:0;
  border-right:0;
  border-bottom:0;
}
.student-subject-empty{
  padding:14px 15px;
  color:var(--muted);
}
.archived-tag{
  background:#eef0f1;
  color:#64747b;
}
.student-history-toggle{
  margin-top:9px;
  font-size:13px;
}
@media(max-width:700px){
  .student-subject-group-head{
    align-items:flex-start;
    flex-direction:column;
    gap:4px;
  }
}


/* При горизонтальной прокрутке первая колонка всегда остается слева. */
.table-wrap.has-horizontal-overflow table th:first-child,
.table-wrap.has-horizontal-overflow table td:first-child{
  position:sticky;
  left:0;
  min-width:max-content;
}
.table-wrap.has-horizontal-overflow table th:first-child{
  z-index:6;
  background:#f5f9fa;
  box-shadow:5px 0 8px -7px rgba(16,40,51,.55);
}
.table-wrap.has-horizontal-overflow table td:first-child{
  z-index:4;
  background:#ffffff;
  box-shadow:5px 0 8px -7px rgba(16,40,51,.45);
}
.table-wrap.has-horizontal-overflow table tbody tr:hover td:first-child{
  background:#f9fcfd;
}


/* v0.3.7 - строгий режим: только один горизонтальный ползунок */
html,
body{
  overflow-x:hidden !important;
}
html{
  scrollbar-gutter:stable;
}

.content,
.view,
.panel,
.student-card-shell,
.student-tab-panel,
.student-card-dialog,
dialog{
  max-width:100%;
  overflow-x:hidden !important;
}

/* Таблица остается программно прокручиваемой по scrollLeft,
   но собственный горизонтальный scrollbar браузер не рисует. */
.table-wrap{
  position:relative;
  overflow-x:hidden !important;
  overflow-y:auto;
  max-width:100%;
  overscroll-behavior-x:none;
}

/* Внешний постоянный scrollbar - единственный видимый горизонтальный scrollbar. */
.persistent-table-scrollbar{
  overflow-x:scroll !important;
  overflow-y:hidden !important;
}

/* Первая колонка широких таблиц фиксируется слева. */
.table-wrap.has-horizontal-overflow table th:first-child,
.table-wrap.has-horizontal-overflow table td:first-child{
  position:sticky !important;
  left:0 !important;
}



/* v0.4.0 - Работы и контрольные */
.works-table{min-width:1420px}
.work-title{margin-top:4px;font-size:13px;color:var(--muted)}
.work-engine-note{
  display:flex;
  flex-direction:column;
  gap:5px;
  max-width:none;
  margin:14px 0;
  border-left:4px solid var(--accent,#2f8f9d);
}
.wide-dialog{
  width:min(980px,calc(100vw - 24px));
  max-width:none;
  max-height:92vh;
  overflow-y:auto !important;
}
.work-detail-dialog{
  width:min(1240px,calc(100vw - 24px));
  max-width:none;
  max-height:92vh;
  overflow-y:auto !important;
}
.work-detail-dialog table{min-width:1120px}
.thread-dialog{
  width:min(880px,calc(100vw - 24px));
  max-width:none;
  max-height:92vh;
  overflow-y:auto !important;
}
.work-form-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
}
.work-form-grid label{
  display:flex;
  flex-direction:column;
  gap:6px;
}
.work-form-grid .check-label{
  flex-direction:row;
  align-items:center;
}
.work-title-field,
.work-description-field{
  grid-column:1/-1;
}
.work-description-field textarea,
#submission-form textarea,
#review-form textarea,
#work-message-form textarea{
  width:100%;
  box-sizing:border-box;
  resize:vertical;
}
.thread-attempts{
  display:grid;
  gap:9px;
  margin:12px 0 16px;
}
.thread-attempt{
  display:grid;
  grid-template-columns:auto auto 1fr;
  gap:8px 12px;
  align-items:center;
  padding:11px 12px;
  border:1px solid var(--border);
  border-radius:10px;
  background:#f8fbfc;
}
.thread-attempt>div{
  grid-column:1/-1;
  line-height:1.45;
}
.work-thread-messages{
  display:grid;
  gap:10px;
  margin:14px 0;
}
.work-message{
  padding:12px 14px;
  border:1px solid var(--border);
  border-radius:11px;
  background:#fff;
}
.work-message.student{border-left:4px solid #6da9d8}
.work-message.teacher{border-left:4px solid #2f8f9d;background:#f7fbfb}
.work-message-head{
  display:flex;
  justify-content:space-between;
  gap:12px;
  margin-bottom:6px;
  font-size:13px;
}
.thread-files{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:9px;
}
.thread-file{
  display:inline-flex;
  padding:6px 9px;
  border:1px solid var(--border);
  border-radius:7px;
  background:#fff;
  color:#31546d;
  text-decoration:none;
  font-size:13px;
  font-weight:700;
}
.work-message-form{
  display:grid;
  gap:10px;
  padding-top:14px;
  border-top:1px solid var(--border);
}
.work-message-form label{
  display:flex;
  flex-direction:column;
  gap:6px;
}
@media(max-width:760px){
  .work-form-grid{grid-template-columns:1fr}
  .work-title-field,.work-description-field{grid-column:auto}
  .thread-attempt{grid-template-columns:1fr}
  .thread-attempt>div{grid-column:auto}
  .work-message-head{flex-direction:column;gap:3px}
}


/* v0.4.1 - исправленное окно "Создать работу" */
#work-dialog.work-create-dialog{
  width:min(1080px, calc(100vw - 40px)) !important;
  max-width:1080px !important;
  min-width:min(760px, calc(100vw - 40px)) !important;
  max-height:calc(100vh - 40px) !important;
  margin:auto !important;
  padding:0 !important;
  overflow:hidden !important;
  border:0 !important;
  border-radius:16px !important;
  background:#ffffff !important;
  box-shadow:0 22px 70px rgba(16,40,51,.28) !important;
}

#work-dialog.work-create-dialog::backdrop{
  background:rgba(16,40,51,.42);
  backdrop-filter:blur(2px);
}

#work-dialog.work-create-dialog > form{
  display:flex !important;
  flex-direction:column !important;
  width:100% !important;
  max-width:none !important;
  max-height:calc(100vh - 40px) !important;
  min-height:0 !important;
  margin:0 !important;
  padding:0 !important;
  overflow:hidden !important;
  background:#fff !important;
}

#work-dialog .dialog-head{
  flex:0 0 auto;
  padding:22px 26px 16px !important;
  margin:0 !important;
  border-bottom:1px solid var(--border);
  background:#fff;
}

#work-dialog .dialog-head h2{
  margin:0 0 6px !important;
  font-size:24px !important;
  line-height:1.2 !important;
  white-space:normal !important;
  overflow:visible !important;
  text-overflow:clip !important;
}

#work-dialog .dialog-head p{
  margin:0 !important;
  line-height:1.45 !important;
  white-space:normal !important;
  overflow:visible !important;
  text-overflow:clip !important;
}

#work-dialog .work-form-section{
  flex:1 1 auto;
  min-height:0;
  overflow-y:auto !important;
  overflow-x:hidden !important;
  padding:20px 26px 24px;
}

#work-dialog .work-form-section-title{
  margin:0 0 14px;
  font-size:15px;
  font-weight:800;
  color:#31546d;
}

#work-dialog .work-form-grid{
  display:grid !important;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr) !important;
  gap:16px 18px !important;
  width:100% !important;
  min-width:0 !important;
}

#work-dialog .work-form-grid label{
  display:flex !important;
  flex-direction:column !important;
  gap:7px !important;
  min-width:0 !important;
  margin:0 !important;
  color:#213944;
  font-size:14px;
  font-weight:700;
}

#work-dialog .work-form-grid input,
#work-dialog .work-form-grid select,
#work-dialog .work-form-grid textarea{
  display:block !important;
  width:100% !important;
  min-width:0 !important;
  max-width:none !important;
  box-sizing:border-box !important;
  margin:0 !important;
}

#work-dialog .work-form-grid input,
#work-dialog .work-form-grid select{
  min-height:44px !important;
}

#work-dialog .work-form-grid textarea{
  min-height:120px !important;
  resize:vertical !important;
}

#work-dialog .work-audience-field,
#work-dialog .work-title-field,
#work-dialog .work-description-field{
  min-width:0 !important;
}

#work-dialog .work-title-field,
#work-dialog .work-description-field{
  grid-column:1 / -1 !important;
}

#work-dialog .work-checkbox{
  flex-direction:row !important;
  align-items:center !important;
  gap:9px !important;
  min-height:44px;
  padding:10px 12px;
  border:1px solid var(--border);
  border-radius:9px;
  background:#f8fbfc;
}

#work-dialog .work-checkbox input{
  width:auto !important;
  min-height:auto !important;
  flex:0 0 auto;
}

#work-dialog #work-form-error{
  flex:0 0 auto;
  margin:0 26px 12px !important;
}

#work-dialog .dialog-actions{
  flex:0 0 auto;
  display:flex !important;
  justify-content:flex-end !important;
  gap:10px !important;
  margin:0 !important;
  padding:16px 26px 20px !important;
  border-top:1px solid var(--border);
  background:#fff;
}

#work-dialog .dialog-actions .btn{
  min-width:130px;
}

@media(max-width:820px){
  #work-dialog.work-create-dialog{
    width:calc(100vw - 20px) !important;
    min-width:0 !important;
    max-width:calc(100vw - 20px) !important;
    max-height:calc(100vh - 20px) !important;
  }

  #work-dialog.work-create-dialog > form{
    max-height:calc(100vh - 20px) !important;
  }

  #work-dialog .work-form-grid{
    grid-template-columns:1fr !important;
  }

  #work-dialog .work-title-field,
  #work-dialog .work-description-field{
    grid-column:auto !important;
  }

  #work-dialog .dialog-head,
  #work-dialog .work-form-section{
    padding-left:18px !important;
    padding-right:18px !important;
  }

  #work-dialog .dialog-actions{
    padding-left:18px !important;
    padding-right:18px !important;
  }
}

@media(max-width:520px){
  #work-dialog .dialog-actions{
    flex-direction:column-reverse !important;
  }

  #work-dialog .dialog-actions .btn{
    width:100%;
  }
}


/* v0.4.3 - единая геометрия всех окон модуля "Работы и контрольные" */
.work-module-dialog{
  box-sizing:border-box !important;
  border:0 !important;
  border-radius:16px !important;
  background:#fff !important;
  box-shadow:0 22px 70px rgba(16,40,51,.28) !important;
  color:var(--text,#213944) !important;
}

.work-module-dialog::backdrop{
  background:rgba(16,40,51,.42);
  backdrop-filter:blur(2px);
}

#work-detail-dialog.work-module-dialog{
  width:min(1240px,calc(100vw - 40px)) !important;
  min-width:min(860px,calc(100vw - 40px)) !important;
  max-width:1240px !important;
  max-height:calc(100vh - 40px) !important;
  padding:0 !important;
  overflow-y:auto !important;
  overflow-x:hidden !important;
  margin:auto !important;
}

#submission-dialog.work-module-dialog,
#review-dialog.work-module-dialog{
  width:min(760px,calc(100vw - 40px)) !important;
  min-width:min(620px,calc(100vw - 40px)) !important;
  max-width:760px !important;
  max-height:calc(100vh - 40px) !important;
  padding:0 !important;
  overflow:hidden !important;
  margin:auto !important;
}

#work-thread-dialog.work-module-dialog{
  width:min(940px,calc(100vw - 40px)) !important;
  min-width:min(720px,calc(100vw - 40px)) !important;
  max-width:940px !important;
  max-height:calc(100vh - 40px) !important;
  padding:0 !important;
  overflow-y:auto !important;
  overflow-x:hidden !important;
  margin:auto !important;
}

#work-detail-dialog .dialog-head,
#submission-dialog .dialog-head,
#review-dialog .dialog-head,
#work-thread-dialog .dialog-head{
  display:flex !important;
  align-items:flex-start !important;
  justify-content:space-between !important;
  gap:18px !important;
  width:100% !important;
  box-sizing:border-box !important;
  margin:0 !important;
  padding:20px 24px 16px !important;
  border-bottom:1px solid var(--border);
  background:#fff;
}

#work-detail-dialog .dialog-head>div,
#submission-dialog .dialog-head>div,
#review-dialog .dialog-head>div,
#work-thread-dialog .dialog-head>div{
  flex:1 1 auto !important;
  min-width:0 !important;
}

#work-detail-dialog .dialog-head h2,
#submission-dialog .dialog-head h2,
#review-dialog .dialog-head h2,
#work-thread-dialog .dialog-head h2,
#work-detail-dialog .dialog-head p,
#submission-dialog .dialog-head p,
#review-dialog .dialog-head p,
#work-thread-dialog .dialog-head p,
#work-detail-meta,
#submission-dialog-meta,
#review-dialog-meta,
#work-thread-meta{
  white-space:normal !important;
  overflow:visible !important;
  text-overflow:clip !important;
  overflow-wrap:anywhere !important;
  word-break:normal !important;
  max-width:100% !important;
}

#work-detail-dialog .dialog-head h2,
#submission-dialog .dialog-head h2,
#review-dialog .dialog-head h2,
#work-thread-dialog .dialog-head h2{
  margin:0 0 6px !important;
  line-height:1.25 !important;
}

#submission-dialog>form,
#review-dialog>form{
  display:flex !important;
  flex-direction:column !important;
  width:100% !important;
  max-width:none !important;
  max-height:calc(100vh - 40px) !important;
  padding:0 !important;
  margin:0 !important;
  overflow:hidden !important;
}

#submission-dialog .stack,
#review-dialog .stack{
  flex:1 1 auto !important;
  min-height:0 !important;
  display:grid !important;
  grid-template-columns:1fr !important;
  gap:14px !important;
  padding:20px 24px !important;
  overflow-y:auto !important;
  overflow-x:hidden !important;
  box-sizing:border-box !important;
}

#submission-dialog .stack label,
#review-dialog .stack label,
#work-thread-dialog .work-message-form label{
  display:flex !important;
  flex-direction:column !important;
  gap:7px !important;
  min-width:0 !important;
  white-space:normal !important;
}

#submission-dialog input,
#submission-dialog select,
#submission-dialog textarea,
#review-dialog input,
#review-dialog select,
#review-dialog textarea,
#work-thread-dialog input,
#work-thread-dialog select,
#work-thread-dialog textarea{
  display:block !important;
  width:100% !important;
  min-width:0 !important;
  max-width:none !important;
  box-sizing:border-box !important;
}

#submission-dialog textarea,
#review-dialog textarea,
#work-thread-dialog textarea{
  resize:vertical !important;
}

#submission-dialog .dialog-actions,
#review-dialog .dialog-actions{
  flex:0 0 auto !important;
  display:flex !important;
  justify-content:flex-end !important;
  gap:10px !important;
  margin:0 !important;
  padding:16px 24px 20px !important;
  border-top:1px solid var(--border);
  background:#fff;
}

#work-detail-dialog #work-detail-summary{
  margin:16px 24px !important;
}

#work-detail-dialog .table-wrap{
  width:calc(100% - 48px) !important;
  max-width:calc(100% - 48px) !important;
  margin:0 24px 18px !important;
  box-sizing:border-box !important;
}

#work-detail-dialog .dialog-actions{
  margin:0 !important;
  padding:0 24px 20px !important;
}

.work-detail-resources{
  display:grid;
  gap:10px;
  padding:16px 24px 0;
}

.work-resource-card{
  display:grid;
  gap:7px;
  padding:12px 14px;
  border:1px solid var(--border);
  border-radius:10px;
  background:#f8fbfc;
  line-height:1.45;
  overflow-wrap:anywhere;
}

.work-resource-card a,
.student-work-resource-link{
  color:#31546d;
  font-weight:700;
  text-decoration:none;
}

.work-resource-card a:hover,
.student-work-resource-link:hover{
  text-decoration:underline;
}

.work-resource-mini{
  margin-top:4px;
  font-size:12px;
  color:#5c717c;
}

#work-thread-dialog .thread-attempts,
#work-thread-dialog .work-thread-messages,
#work-thread-dialog .work-message-form{
  margin-left:24px !important;
  margin-right:24px !important;
}

#work-thread-dialog .thread-attempts{
  margin-top:18px !important;
}

#work-thread-dialog .work-message-form{
  padding:16px 0 22px !important;
}

.work-existing-files{
  display:block;
  grid-column:1/-1 !important;
  padding:12px 14px;
  border:1px solid var(--border);
  border-radius:10px;
  background:#f8fbfc;
}

.work-existing-files.hidden{
  display:none !important;
}

.work-existing-files-title{
  margin-bottom:9px;
  font-weight:800;
  color:#31546d;
}

.work-existing-files-list{
  display:grid;
  gap:8px;
}

.work-existing-file-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  min-width:0;
}

.work-existing-file-row a{
  min-width:0;
  overflow-wrap:anywhere;
  color:#31546d;
  font-weight:700;
  text-decoration:none;
}

.student-work-resources{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  margin-top:7px;
}

.student-work-resource-link{
  display:inline-flex;
  padding:4px 7px;
  border:1px solid var(--border);
  border-radius:6px;
  background:#fff;
  font-size:12px;
}

@media(max-width:820px){
  #work-detail-dialog.work-module-dialog,
  #submission-dialog.work-module-dialog,
  #review-dialog.work-module-dialog,
  #work-thread-dialog.work-module-dialog{
    width:calc(100vw - 20px) !important;
    min-width:0 !important;
    max-width:calc(100vw - 20px) !important;
    max-height:calc(100vh - 20px) !important;
  }

  #submission-dialog>form,
  #review-dialog>form{
    max-height:calc(100vh - 20px) !important;
  }

  #work-detail-dialog .dialog-head,
  #submission-dialog .dialog-head,
  #review-dialog .dialog-head,
  #work-thread-dialog .dialog-head,
  #submission-dialog .stack,
  #review-dialog .stack{
    padding-left:16px !important;
    padding-right:16px !important;
  }

  #work-detail-dialog #work-detail-summary,
  #work-detail-dialog .work-detail-resources,
  #work-thread-dialog .thread-attempts,
  #work-thread-dialog .work-thread-messages,
  #work-thread-dialog .work-message-form{
    margin-left:16px !important;
    margin-right:16px !important;
  }

  #work-detail-dialog .work-detail-resources{
    padding-left:0 !important;
    padding-right:0 !important;
  }

  #work-detail-dialog .table-wrap{
    width:calc(100% - 32px) !important;
    max-width:calc(100% - 32px) !important;
    margin-left:16px !important;
    margin-right:16px !important;
  }

  #submission-dialog .dialog-actions,
  #review-dialog .dialog-actions,
  #work-detail-dialog .dialog-actions{
    padding-left:16px !important;
    padding-right:16px !important;
  }
}

@media(max-width:520px){
  #submission-dialog .dialog-actions,
  #review-dialog .dialog-actions{
    flex-direction:column-reverse !important;
  }

  #submission-dialog .dialog-actions .btn,
  #review-dialog .dialog-actions .btn{
    width:100%;
  }

  .work-existing-file-row{
    align-items:flex-start;
    flex-direction:column;
  }
}


/* v0.5.0 - Автоматические уведомления */
.notifications-table{min-width:1320px}
.notification-rules-table{min-width:1050px}

.notification-transport-alert{
  display:flex;
  flex-direction:column;
  gap:5px;
  margin:14px 0;
}
.notification-transport-alert.success-panel{
  border-left:4px solid #2f8f9d;
  background:#f3fbf8;
}
.notification-transport-alert.warning-panel{
  border-left:4px solid #d3a238;
  background:#fffaf0;
}
.notification-transport-alert.danger-panel{
  border-left:4px solid #b65a5a;
  background:#fff6f6;
}

.notification-tabs{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin:16px 0;
}
.notification-tab{
  border:1px solid var(--border);
  border-radius:9px;
  background:#fff;
  color:#31546d;
  padding:9px 13px;
  font:inherit;
  font-weight:700;
  cursor:pointer;
}
.notification-tab.active{
  background:#31546d;
  border-color:#31546d;
  color:#fff;
}
.notification-tab-panel{
  min-width:0;
}
.notification-toolbar{
  align-items:center;
}
.notification-toolbar input,
.notification-toolbar select{
  min-width:150px;
}
#notification-search{
  min-width:240px;
  flex:1 1 240px;
}

.notification-form-panel{
  max-width:1100px;
}
.notification-form-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:15px 18px;
}
.notification-form-grid>label{
  display:flex;
  flex-direction:column;
  gap:7px;
  min-width:0;
  font-weight:700;
}
.notification-form-grid input,
.notification-form-grid select,
.notification-form-grid textarea{
  width:100%;
  min-width:0;
  max-width:none;
  box-sizing:border-box;
}
.notification-form-grid input:not([type="checkbox"]),
.notification-form-grid select{
  min-height:44px;
}
.notification-form-grid textarea{
  resize:vertical;
  min-height:130px;
}
.notification-full{
  grid-column:1/-1;
}
.notification-form-grid .check-label{
  flex-direction:row;
  align-items:center;
}
.notification-form-grid .check-label input{
  width:auto;
}

.manual-actions{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}
.manual-preview{
  padding:12px 14px;
  border:1px solid var(--border);
  border-radius:10px;
  background:#f7fbfb;
  line-height:1.5;
}
.manual-preview details{margin-top:8px}
.manual-preview ul{margin:8px 0 0;padding-left:22px}

.smtp-test-box{
  margin-top:24px;
  padding-top:18px;
  border-top:1px solid var(--border);
}
.smtp-test-box h3{margin:0 0 10px}
.smtp-test-box .toolbar{margin-bottom:8px}

.switch-line{
  display:inline-flex;
  align-items:center;
  gap:7px;
  white-space:nowrap;
}

.notification-detail-dialog{
  width:min(860px,calc(100vw - 40px)) !important;
  max-width:860px !important;
  max-height:calc(100vh - 40px) !important;
  margin:auto !important;
  padding:0 !important;
  border:0 !important;
  border-radius:16px !important;
  overflow:hidden !important;
  background:#fff !important;
  box-shadow:0 22px 70px rgba(16,40,51,.28) !important;
}
.notification-detail-dialog::backdrop{
  background:rgba(16,40,51,.42);
  backdrop-filter:blur(2px);
}
.notification-detail-dialog .dialog-head{
  display:flex !important;
  align-items:flex-start !important;
  justify-content:space-between !important;
  gap:18px !important;
  padding:20px 24px 16px !important;
  margin:0 !important;
  border-bottom:1px solid var(--border);
}
.notification-detail-dialog .dialog-head>div{
  min-width:0;
  flex:1 1 auto;
}
.notification-detail-dialog .dialog-head h2,
.notification-detail-dialog .dialog-head div{
  white-space:normal !important;
  overflow-wrap:anywhere !important;
  text-overflow:clip !important;
}
.notification-detail-body{
  display:grid;
  gap:12px;
  max-height:calc(100vh - 210px);
  overflow-y:auto;
  overflow-x:hidden;
  padding:18px 24px;
}
.notification-detail-row{
  display:grid;
  gap:6px;
  min-width:0;
}
.notification-detail-row>div,
.notification-detail-row pre{
  min-width:0;
  overflow-wrap:anywhere;
}
.notification-detail-row pre{
  margin:0;
  padding:12px 14px;
  border:1px solid var(--border);
  border-radius:9px;
  background:#f8fbfc;
  white-space:pre-wrap;
  font:inherit;
  line-height:1.5;
}
.notification-detail-dialog .dialog-actions{
  display:flex !important;
  justify-content:flex-end !important;
  flex-wrap:wrap;
  gap:10px !important;
  margin:0 !important;
  padding:15px 24px 20px !important;
  border-top:1px solid var(--border);
}

@media(max-width:820px){
  .notification-form-grid{grid-template-columns:1fr}
  .notification-full{grid-column:auto}
  .notification-detail-dialog{
    width:calc(100vw - 20px) !important;
    max-width:calc(100vw - 20px) !important;
    max-height:calc(100vh - 20px) !important;
  }
  .notification-detail-body{
    max-height:calc(100vh - 190px);
  }
}
@media(max-width:520px){
  .notification-detail-dialog .dialog-actions{
    flex-direction:column-reverse !important;
  }
  .notification-detail-dialog .dialog-actions .btn{
    width:100%;
  }
  .manual-actions{
    flex-direction:column;
  }
  .manual-actions .btn{
    width:100%;
  }
}


/* v0.5.0 - шаблон автоматического письма */
#notification-template-dialog>form{
  display:flex !important;
  flex-direction:column !important;
  width:100% !important;
  max-width:none !important;
  max-height:calc(100vh - 40px) !important;
  margin:0 !important;
  padding:0 !important;
  overflow:hidden !important;
}
.notification-template-label{
  display:flex;
  flex-direction:column;
  gap:7px;
  min-width:0;
  font-weight:700;
}
.notification-template-label input,
.notification-template-label textarea{
  width:100%;
  min-width:0;
  max-width:none;
  box-sizing:border-box;
}
.notification-template-label textarea{
  resize:vertical;
  min-height:220px;
}


/* v0.5.1 - выбор отдельных обучающихся в ручной рассылке */
.manual-student-selector{
  display:block;
  padding:16px;
  border:1px solid var(--border);
  border-radius:12px;
  background:#f8fbfc;
}
.manual-student-selector.hidden{
  display:none !important;
}
.manual-student-selector-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  margin-bottom:14px;
}
.manual-student-count{
  flex:0 0 auto;
  padding:7px 10px;
  border:1px solid var(--border);
  border-radius:999px;
  background:#fff;
  color:#5c717c;
  font-weight:800;
  white-space:nowrap;
}
.manual-student-count.has-selection{
  background:#eef8f5;
  color:#2f6d63;
  border-color:rgba(47,143,157,.35);
}
.manual-student-filters{
  display:grid;
  grid-template-columns:minmax(150px,.7fr) minmax(180px,.9fr) minmax(240px,1.4fr);
  gap:10px 12px;
  margin-bottom:12px;
}
.manual-student-filters label{
  display:flex;
  flex-direction:column;
  gap:6px;
  min-width:0;
  font-weight:700;
}
.manual-student-filters input,
.manual-student-filters select{
  width:100%;
  min-width:0;
  min-height:42px;
  box-sizing:border-box;
}
.manual-student-selector-actions{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-bottom:12px;
}
.manual-student-list-head{
  display:grid;
  grid-template-columns:minmax(280px,1.4fr) minmax(220px,1fr) minmax(220px,1fr);
  gap:12px;
  padding:8px 12px;
  border:1px solid var(--border);
  border-bottom:0;
  border-radius:10px 10px 0 0;
  background:#eef4f6;
  color:#5c717c;
  font-size:12px;
  font-weight:800;
}
.manual-student-checkbox-list{
  max-height:420px;
  overflow-y:auto;
  overflow-x:hidden;
  border:1px solid var(--border);
  border-radius:0 0 10px 10px;
  background:#fff;
}
.manual-student-row{
  display:grid !important;
  grid-template-columns:minmax(280px,1.4fr) minmax(220px,1fr) minmax(220px,1fr);
  gap:12px !important;
  align-items:center;
  min-width:0;
  padding:10px 12px;
  margin:0 !important;
  border-bottom:1px solid var(--border);
  background:#fff;
  font-weight:400 !important;
  cursor:pointer;
}
.manual-student-row:last-child{
  border-bottom:0;
}
.manual-student-row:hover{
  background:#f8fbfc;
}
.manual-student-name-cell{
  display:flex;
  align-items:center;
  gap:9px;
  min-width:0;
}
.manual-student-name-cell input{
  width:auto !important;
  min-height:auto !important;
  flex:0 0 auto;
}
.manual-student-row>span{
  min-width:0;
  overflow-wrap:anywhere;
}
.manual-student-empty{
  padding:18px 12px;
  color:#5c717c;
  text-align:center;
}
#manual-student-visible-count{
  margin-top:8px;
  text-align:right;
}

@media(max-width:900px){
  .manual-student-filters{
    grid-template-columns:1fr 1fr;
  }
  .manual-student-search-label{
    grid-column:1/-1;
  }
  .manual-student-list-head{
    display:none;
  }
  .manual-student-row{
    grid-template-columns:1fr;
    gap:5px !important;
    padding:12px;
  }
  .manual-student-row>span:not(.manual-student-name-cell){
    padding-left:30px;
    color:#5c717c;
    font-size:13px;
  }
}
@media(max-width:560px){
  .manual-student-selector{
    padding:12px;
  }
  .manual-student-selector-head{
    flex-direction:column;
  }
  .manual-student-filters{
    grid-template-columns:1fr;
  }
  .manual-student-search-label{
    grid-column:auto;
  }
  .manual-student-selector-actions{
    flex-direction:column;
  }
  .manual-student-selector-actions .btn{
    width:100%;
  }
}


/* v0.6.0 - пользователи, роли и права */
.access-accounts-table{min-width:1320px}

.access-info-panel{
  display:flex;
  flex-direction:column;
  gap:6px;
  margin:14px 0;
  border-left:4px solid #2f8f9d;
  background:#f4fbfa;
}

.access-account-dialog{
  width:min(1120px,calc(100vw - 40px)) !important;
  min-width:min(820px,calc(100vw - 40px)) !important;
  max-width:1120px !important;
  max-height:calc(100vh - 40px) !important;
  margin:auto !important;
  padding:0 !important;
  border:0 !important;
  border-radius:16px !important;
  overflow:hidden !important;
  background:#fff !important;
  box-shadow:0 22px 70px rgba(16,40,51,.28) !important;
}
.access-account-dialog::backdrop,
.access-password-dialog::backdrop{
  background:rgba(16,40,51,.42);
  backdrop-filter:blur(2px);
}
.access-account-dialog>form{
  display:flex !important;
  flex-direction:column !important;
  width:100% !important;
  max-height:calc(100vh - 40px) !important;
  margin:0 !important;
  padding:0 !important;
  overflow:hidden !important;
}
.access-account-dialog .dialog-head,
.access-password-dialog .dialog-head{
  display:flex !important;
  justify-content:space-between !important;
  align-items:flex-start !important;
  gap:18px !important;
  margin:0 !important;
  padding:20px 24px 16px !important;
  border-bottom:1px solid var(--border);
}
.access-account-dialog .dialog-head>div,
.access-password-dialog .dialog-head>div{
  min-width:0;
  flex:1 1 auto;
}
.access-account-dialog .dialog-head h2,
.access-account-dialog .dialog-head p,
.access-password-dialog .dialog-head h2,
.access-password-dialog .dialog-head p{
  white-space:normal !important;
  overflow:visible !important;
  text-overflow:clip !important;
  overflow-wrap:anywhere !important;
}
.access-account-body{
  flex:1 1 auto;
  min-height:0;
  overflow-y:auto;
  overflow-x:hidden;
  padding:20px 24px;
}
.access-form-section{
  margin:0 0 22px;
  padding:0 0 20px;
  border-bottom:1px solid var(--border);
}
.access-form-section:last-of-type{
  border-bottom:0;
}
.access-form-section h3{
  margin:0 0 13px;
}
.access-form-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px 18px;
}
.access-form-grid label,
.access-profile-links label{
  display:flex;
  flex-direction:column;
  gap:7px;
  min-width:0;
  font-weight:700;
}
.access-form-grid input:not([type="checkbox"]),
.access-form-grid select,
.access-profile-links select{
  width:100%;
  min-width:0;
  min-height:44px;
  max-width:none;
  box-sizing:border-box;
}
.access-active-field{
  flex-direction:row !important;
  align-items:center;
  align-self:end;
  min-height:44px;
  padding:10px 12px;
  border:1px solid var(--border);
  border-radius:9px;
  background:#f8fbfc;
}
.access-active-field input{
  width:auto !important;
  min-height:auto !important;
}
.password-inline{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:8px;
}
.access-role-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px 12px;
}
.access-role-card{
  display:flex !important;
  flex-direction:column !important;
  gap:6px !important;
  padding:12px 14px;
  border:1px solid var(--border);
  border-radius:10px;
  background:#f8fbfc;
  cursor:pointer;
}
.access-role-card>span{
  display:flex;
  align-items:center;
  gap:8px;
  font-weight:800;
}
.access-role-card input{
  width:auto !important;
}
.access-role-card small{
  color:#5c717c;
  line-height:1.4;
}
.access-profile-links{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px 18px;
  margin-top:16px;
}
.access-section-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:14px;
  margin-bottom:12px;
}
.access-section-head h3{margin:0 0 5px}
.access-section-head p{margin:0}

.access-permissions-list{
  display:grid;
  gap:14px;
}
.access-permission-group{
  display:grid;
  gap:8px;
  padding:13px;
  border:1px solid var(--border);
  border-radius:10px;
}
.access-permission-group h4{
  margin:0 0 3px;
  color:#31546d;
}
.access-permission-item{
  display:grid !important;
  grid-template-columns:auto minmax(0,1fr);
  align-items:start;
  gap:9px !important;
  padding:9px 10px;
  margin:0 !important;
  border-radius:8px;
  background:#f8fbfc;
  cursor:pointer;
}
.access-permission-item input{
  width:auto !important;
  margin-top:3px !important;
}
.access-permission-item span{
  display:grid;
  gap:3px;
  min-width:0;
}
.access-permission-item small{
  color:#5c717c;
  line-height:1.35;
}
.access-full-permission{
  display:flex;
  flex-direction:column;
  gap:5px;
  padding:13px 14px;
  border:1px solid rgba(47,143,157,.28);
  border-radius:10px;
  background:#eef8f5;
}
.access-account-dialog .dialog-actions,
.access-password-dialog .dialog-actions{
  flex:0 0 auto !important;
  display:flex !important;
  justify-content:flex-end !important;
  gap:10px !important;
  margin:0 !important;
  padding:15px 24px 20px !important;
  border-top:1px solid var(--border);
  background:#fff;
}

.access-password-dialog{
  width:min(640px,calc(100vw - 40px)) !important;
  max-width:640px !important;
  max-height:calc(100vh - 40px) !important;
  margin:auto !important;
  padding:0 !important;
  border:0 !important;
  border-radius:16px !important;
  overflow:hidden !important;
  background:#fff !important;
  box-shadow:0 22px 70px rgba(16,40,51,.28) !important;
}
.access-password-dialog>form{
  display:flex;
  flex-direction:column;
  width:100%;
  margin:0;
}
.access-password-body{
  display:grid;
  gap:12px;
  padding:20px 24px;
}
.access-password-body label{
  display:flex;
  flex-direction:column;
  gap:7px;
  font-weight:700;
}
.access-password-body input{
  width:100%;
  min-width:0;
  min-height:44px;
  box-sizing:border-box;
}
.text-warning{color:#9a6c12}

/* Единый вход и ролевые кабинеты */
.role-login-card{
  width:min(480px,calc(100vw - 28px));
}
.login-help{
  margin:16px 0 0;
  color:#5c717c;
  font-size:13px;
  line-height:1.45;
}
.portal-page{
  min-height:100vh;
  margin:0;
  background:#f3f7f8;
  color:#213944;
  font-family:Arial,Helvetica,sans-serif;
}
.portal-topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
  padding:14px 24px;
  background:#fff;
  border-bottom:1px solid rgba(16,40,51,.12);
  position:sticky;
  top:0;
  z-index:20;
}
.portal-topbar>div:first-child{
  display:flex;
  align-items:center;
  gap:12px;
  min-width:0;
}
.portal-topbar>div:first-child>div:last-child{
  display:flex;
  flex-direction:column;
  gap:3px;
  min-width:0;
}
.portal-topbar span{
  color:#5c717c;
  font-size:13px;
  overflow-wrap:anywhere;
}
.portal-brand{
  width:48px;
  min-width:48px;
  height:48px;
  margin:0;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:13px;
}
.portal-topbar-actions{
  display:flex;
  align-items:center;
  gap:9px;
  flex:0 0 auto;
}
.portal-topbar-actions form{margin:0}
.portal-shell{
  width:min(1220px,calc(100% - 36px));
  margin:0 auto;
  padding:28px 0 48px;
}
.portal-hero{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:28px;
  padding:26px;
  border-radius:16px;
  background:#fff;
  box-shadow:0 9px 30px rgba(16,40,51,.07);
}
.portal-hero h1{
  margin:5px 0 9px;
  font-size:30px;
  line-height:1.15;
}
.portal-hero p{
  max-width:780px;
  margin:0;
  color:#5c717c;
  line-height:1.55;
}
.portal-role-badge{
  flex:0 0 auto;
  padding:9px 13px;
  border-radius:999px;
  background:#eef8f5;
  color:#2f6d63;
  font-weight:800;
}
.portal-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:14px;
  margin:16px 0;
}
.portal-card{
  display:flex;
  flex-direction:column;
  gap:7px;
  padding:18px;
  border:1px solid rgba(16,40,51,.1);
  border-radius:13px;
  background:#fff;
}
.portal-card span{
  color:#5c717c;
  font-size:13px;
}
.portal-card strong{
  font-size:21px;
}
.portal-panel{
  margin-top:16px;
  padding:20px;
  border:1px solid rgba(16,40,51,.1);
  border-radius:13px;
  background:#fff;
}
.portal-panel h2{
  margin:0 0 14px;
}
.portal-table-wrap{
  overflow-x:auto;
}
.portal-table-wrap table{
  width:100%;
  border-collapse:collapse;
  min-width:720px;
}
.portal-table-wrap th,
.portal-table-wrap td{
  padding:10px 12px;
  border-bottom:1px solid rgba(16,40,51,.1);
  text-align:left;
}
.portal-table-wrap th{
  color:#5c717c;
  font-size:12px;
}
.portal-empty{
  padding:18px;
  border-radius:10px;
  background:#f8fbfc;
  color:#5c717c;
}
.portal-permissions{
  display:flex;
  flex-wrap:wrap;
  gap:7px;
}
.portal-permissions span{
  padding:6px 9px;
  border:1px solid rgba(16,40,51,.12);
  border-radius:7px;
  background:#f8fbfc;
  font-size:13px;
}
.guardian-children{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
}
.guardian-child-card{
  display:grid;
  gap:7px;
  padding:14px;
  border:1px solid rgba(16,40,51,.1);
  border-radius:10px;
  background:#f8fbfc;
}
.guardian-child-card>span{
  color:#5c717c;
  font-size:13px;
}

@media(max-width:820px){
  .access-account-dialog{
    width:calc(100vw - 20px) !important;
    min-width:0 !important;
    max-width:calc(100vw - 20px) !important;
    max-height:calc(100vh - 20px) !important;
  }
  .access-account-dialog>form{
    max-height:calc(100vh - 20px) !important;
  }
  .access-form-grid,
  .access-role-grid,
  .access-profile-links{
    grid-template-columns:1fr;
  }
  .access-section-head{
    flex-direction:column;
  }
  .portal-topbar{
    align-items:flex-start;
    flex-direction:column;
  }
  .portal-topbar-actions{
    width:100%;
  }
  .portal-topbar-actions .btn,
  .portal-topbar-actions form{
    flex:1 1 0;
  }
  .portal-topbar-actions form .btn{
    width:100%;
  }
  .portal-grid{
    grid-template-columns:1fr;
  }
  .portal-hero{
    flex-direction:column;
  }
  .guardian-children{
    grid-template-columns:1fr;
  }
}
@media(max-width:560px){
  .access-account-body,
  .access-account-dialog .dialog-head,
  .access-password-body,
  .access-password-dialog .dialog-head{
    padding-left:16px !important;
    padding-right:16px !important;
  }
  .access-account-dialog .dialog-actions,
  .access-password-dialog .dialog-actions{
    padding-left:16px !important;
    padding-right:16px !important;
    flex-direction:column-reverse !important;
  }
  .access-account-dialog .dialog-actions .btn,
  .access-password-dialog .dialog-actions .btn{
    width:100%;
  }
  .password-inline{
    grid-template-columns:1fr;
  }
  .portal-shell{
    width:min(100% - 20px,1220px);
    padding-top:16px;
  }
  .portal-topbar{
    padding:12px 14px;
  }
  .portal-topbar-actions{
    flex-direction:column;
  }
}


.portal-role-switch{
  display:flex;
  flex-wrap:wrap;
  gap:7px;
}


/* v0.6.1 - безопасное переключение между учетными записями */
.login-autofill-trap{
  position:absolute !important;
  left:-10000px !important;
  top:-10000px !important;
  width:1px !important;
  height:1px !important;
  overflow:hidden !important;
  opacity:0 !important;
  pointer-events:none !important;
}
.login-switch-actions{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:9px;
}
@media(max-width:520px){
  .login-switch-actions{
    grid-template-columns:1fr;
  }
}


/* v0.6.2 - рабочий кабинет преподавателя */
.teacher-module-nav{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin:16px 0;
}
.teacher-nav-btn{
  display:inline-flex;
  align-items:center;
  gap:7px;
  min-height:42px;
  padding:9px 13px;
  border:1px solid rgba(16,40,51,.13);
  border-radius:10px;
  background:#fff;
  color:#31546d;
  font:inherit;
  font-weight:800;
  cursor:pointer;
}
.teacher-nav-btn:hover{
  background:#f4f9fa;
}
.teacher-nav-btn.active{
  background:#31546d;
  border-color:#31546d;
  color:#fff;
}
.teacher-nav-count{
  min-width:21px;
  height:21px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:0 6px;
  border-radius:999px;
  background:#fff;
  color:#31546d;
  font-size:12px;
}
.teacher-view.hidden{display:none !important}
.teacher-panel-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:18px;
  margin-bottom:14px;
}
.teacher-panel-head h2{margin:0 0 5px}
.teacher-panel-head p{margin:0}
.teacher-toolbar{
  display:flex;
  flex-wrap:wrap;
  gap:9px;
  margin:0 0 14px;
}
.teacher-toolbar input{
  flex:1 1 260px;
  min-width:220px;
}
.teacher-toolbar select{
  min-width:260px;
}
.teacher-toolbar input,
.teacher-toolbar select{
  min-height:42px;
  box-sizing:border-box;
}
.teacher-wide-table{min-width:1040px}
.teacher-actions{
  display:flex;
  flex-wrap:wrap;
  gap:7px;
}
.teacher-small-btn{
  min-height:34px !important;
  padding:6px 9px !important;
  white-space:nowrap;
}
.teacher-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:25px;
  padding:3px 8px;
  border-radius:999px;
  background:#eef3f5;
  color:#31546d;
  font-size:12px;
  font-weight:800;
}
.teacher-badge.success{
  background:#eef8f5;
  color:#2f6d63;
}
.teacher-badge.warning{
  background:#fff7e6;
  color:#95691a;
}
.teacher-badge.danger{
  background:#fff0f0;
  color:#a14444;
}
.portal-empty-cell{
  padding:20px !important;
  text-align:center !important;
  color:#5c717c;
}
.teacher-stat-card strong{
  font-size:26px;
}
.teacher-dialog{
  width:min(760px,calc(100vw - 40px)) !important;
  max-width:760px !important;
  max-height:calc(100vh - 40px) !important;
  margin:auto !important;
  padding:0 !important;
  border:0 !important;
  border-radius:16px !important;
  overflow:hidden !important;
  background:#fff !important;
  box-shadow:0 22px 70px rgba(16,40,51,.28) !important;
}
.teacher-dialog::backdrop{
  background:rgba(16,40,51,.42);
  backdrop-filter:blur(2px);
}
.teacher-large-dialog{
  width:min(980px,calc(100vw - 40px)) !important;
  max-width:980px !important;
}
.teacher-xlarge-dialog{
  width:min(1180px,calc(100vw - 40px)) !important;
  max-width:1180px !important;
}
.teacher-dialog>form{
  display:flex;
  flex-direction:column;
  width:100%;
  max-height:calc(100vh - 40px);
  margin:0;
  overflow:hidden;
}
.teacher-dialog .dialog-head{
  display:flex !important;
  justify-content:space-between !important;
  align-items:flex-start !important;
  gap:18px !important;
  margin:0 !important;
  padding:20px 24px 16px !important;
  border-bottom:1px solid rgba(16,40,51,.12);
}
.teacher-dialog .dialog-head>div{
  min-width:0;
  flex:1 1 auto;
}
.teacher-dialog .dialog-head h2,
.teacher-dialog .dialog-head p,
.teacher-dialog .dialog-head div{
  white-space:normal !important;
  overflow-wrap:anywhere !important;
  text-overflow:clip !important;
}
.teacher-dialog-body{
  min-height:0;
  max-height:calc(100vh - 190px);
  overflow-y:auto;
  overflow-x:hidden;
  padding:20px 24px;
}
.teacher-dialog .dialog-actions{
  display:flex !important;
  justify-content:flex-end !important;
  flex-wrap:wrap;
  gap:10px !important;
  margin:0 !important;
  padding:15px 24px 20px !important;
  border-top:1px solid rgba(16,40,51,.12);
  background:#fff;
}
.teacher-form-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px 18px;
}
.teacher-form-grid label{
  display:flex;
  flex-direction:column;
  gap:7px;
  min-width:0;
  font-weight:700;
}
.teacher-form-grid input:not([type="checkbox"]),
.teacher-form-grid select,
.teacher-form-grid textarea{
  width:100%;
  min-width:0;
  max-width:none;
  box-sizing:border-box;
}
.teacher-form-grid input:not([type="checkbox"]),
.teacher-form-grid select{
  min-height:44px;
}
.teacher-form-grid textarea{
  resize:vertical;
}
.teacher-form-grid .check-label{
  flex-direction:row;
  align-items:center;
}
.teacher-form-grid .check-label input{
  width:auto !important;
}
.teacher-full-field{
  grid-column:1/-1;
}
.teacher-two-columns{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:18px;
}
.teacher-two-columns>section{
  min-width:0;
}
.teacher-subhead{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
}
.teacher-subhead h3{margin:0}
.teacher-subject-chips{
  display:flex;
  flex-wrap:wrap;
  gap:7px;
  margin-bottom:18px;
}
.teacher-subject-chips span{
  padding:6px 9px;
  border:1px solid rgba(16,40,51,.12);
  border-radius:8px;
  background:#f8fbfc;
  font-size:13px;
  font-weight:700;
}
.teacher-card-list{
  display:grid;
  gap:8px;
}
.teacher-card-list article{
  display:grid;
  gap:4px;
  padding:10px 12px;
  border:1px solid rgba(16,40,51,.1);
  border-radius:9px;
  background:#f8fbfc;
}
.teacher-card-list article span,
.teacher-card-list article small{
  color:#5c717c;
}
.teacher-work-description{
  display:grid;
  gap:8px;
  margin-bottom:15px;
}
.teacher-work-description a,
.teacher-file-links a{
  color:#31546d;
  font-weight:700;
  text-decoration:none;
}
.teacher-file-links{
  display:flex;
  flex-wrap:wrap;
  gap:7px;
}
.teacher-file-links a{
  padding:6px 8px;
  border:1px solid rgba(16,40,51,.12);
  border-radius:7px;
  background:#f8fbfc;
}

@media(max-width:820px){
  .teacher-panel-head{
    flex-direction:column;
  }
  .teacher-panel-head .btn{
    width:100%;
  }
  .teacher-form-grid,
  .teacher-two-columns{
    grid-template-columns:1fr;
  }
  .teacher-full-field{
    grid-column:auto;
  }
  .teacher-dialog,
  .teacher-large-dialog,
  .teacher-xlarge-dialog{
    width:calc(100vw - 20px) !important;
    max-width:calc(100vw - 20px) !important;
    max-height:calc(100vh - 20px) !important;
  }
  .teacher-dialog>form{
    max-height:calc(100vh - 20px);
  }
}
@media(max-width:560px){
  .teacher-module-nav{
    display:grid;
    grid-template-columns:1fr;
  }
  .teacher-nav-btn{
    width:100%;
    justify-content:space-between;
  }
  .teacher-toolbar{
    display:grid;
    grid-template-columns:1fr;
  }
  .teacher-toolbar input,
  .teacher-toolbar select,
  .teacher-toolbar .btn{
    width:100%;
    min-width:0;
  }
  .teacher-dialog .dialog-head,
  .teacher-dialog-body,
  .teacher-dialog .dialog-actions{
    padding-left:16px !important;
    padding-right:16px !important;
  }
  .teacher-dialog .dialog-actions{
    flex-direction:column-reverse !important;
  }
  .teacher-dialog .dialog-actions .btn{
    width:100%;
  }
}


.teacher-submission-comment{
  margin-top:6px;
  padding:6px 8px;
  border-radius:7px;
  background:#f8fbfc;
  color:#5c717c;
  font-size:12px;
  line-height:1.4;
}
.teacher-submission-files{
  display:flex;
  flex-wrap:wrap;
  gap:5px;
  margin-top:6px;
}
.teacher-submission-files a{
  display:inline-flex;
  padding:4px 6px;
  border:1px solid rgba(16,40,51,.12);
  border-radius:6px;
  background:#fff;
  color:#31546d;
  font-size:12px;
  font-weight:700;
  text-decoration:none;
}

.teacher-review-submission{
  display:grid;
  gap:7px;
  padding:11px 12px;
  border:1px solid rgba(16,40,51,.12);
  border-radius:9px;
  background:#f8fbfc;
}


/* v0.6.3 - всегда доступный выход из ролевого кабинета */
.portal-fixed-logout{
  position:fixed !important;
  right:18px !important;
  bottom:18px !important;
  z-index:9999 !important;
  margin:0 !important;
  padding:0 !important;
}
.portal-fixed-logout-btn{
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  min-height:44px !important;
  padding:10px 15px !important;
  border:0 !important;
  border-radius:11px !important;
  background:#31546d !important;
  color:#fff !important;
  font:inherit !important;
  font-weight:800 !important;
  box-shadow:0 10px 28px rgba(16,40,51,.24) !important;
  cursor:pointer !important;
  white-space:nowrap !important;
}
.portal-fixed-logout-btn:hover{
  filter:brightness(.96);
}
@media(max-width:560px){
  .portal-fixed-logout{
    right:10px !important;
    bottom:10px !important;
    left:10px !important;
  }
  .portal-fixed-logout-btn{
    width:100% !important;
  }
  .portal-shell{
    padding-bottom:82px !important;
  }
}


/* v0.6.4 - фильтры и журнал выполнения работ преподавателя */
.teacher-journal-filters{
  display:grid;
  grid-template-columns:minmax(180px,.8fr) minmax(180px,.9fr) minmax(280px,1.5fr) minmax(180px,.8fr);
  gap:10px 12px;
  margin-bottom:14px;
}
.teacher-journal-filters label{
  display:flex;
  flex-direction:column;
  gap:6px;
  min-width:0;
  font-weight:700;
}
.teacher-journal-filters select{
  width:100%;
  min-width:0;
  min-height:42px;
  box-sizing:border-box;
}
.teacher-journal-meta{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:space-between;
  gap:8px 14px;
  margin:8px 0 12px;
  padding:11px 13px;
  border:1px solid rgba(16,40,51,.11);
  border-radius:9px;
  background:#f8fbfc;
}
.teacher-journal-meta span{
  color:#5c717c;
}
.teacher-journal-summary{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin:0 0 14px;
}
.teacher-journal-chip{
  display:inline-flex;
  align-items:center;
  gap:8px;
  min-height:36px;
  padding:7px 10px;
  border:1px solid rgba(16,40,51,.12);
  border-radius:9px;
  background:#fff;
  color:#31546d;
  font:inherit;
  cursor:pointer;
}
.teacher-journal-chip strong{
  min-width:23px;
  height:23px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:0 6px;
  border-radius:999px;
  background:#eef3f5;
}
.teacher-journal-chip.success{
  border-color:rgba(47,143,157,.28);
  background:#f4fbf9;
}
.teacher-journal-chip.warning{
  border-color:rgba(190,140,40,.28);
  background:#fffaf0;
}
.teacher-journal-chip.danger{
  border-color:rgba(170,70,70,.25);
  background:#fff6f6;
}
.teacher-journal-table{
  min-width:1180px;
}
.teacher-work-filters select{
  min-width:190px;
}

@media(max-width:980px){
  .teacher-journal-filters{
    grid-template-columns:1fr 1fr;
  }
}
@media(max-width:560px){
  .teacher-journal-filters{
    grid-template-columns:1fr;
  }
  .teacher-journal-meta{
    align-items:flex-start;
    flex-direction:column;
  }
  .teacher-journal-summary{
    display:grid;
    grid-template-columns:1fr 1fr;
  }
  .teacher-journal-chip{
    justify-content:space-between;
  }
}


/* v0.6.5 - зависимый выбор «Предмет -> Класс / группа» */
.teacher-dependent-filters select:disabled,
.teacher-journal-filters select:disabled,
#teacher-work-create-audience:disabled,
#teacher-work-student:disabled{
  opacity:.65;
  cursor:not-allowed;
  background:#f3f6f7;
}
.teacher-dependent-filters select:first-child,
.teacher-work-filters #teacher-work-subject-filter{
  font-weight:700;
}


/* v0.6.6 - входящие сдачи и восстановление существующих контрольных */
.teacher-incoming-block{
  margin-bottom:22px;
  padding-bottom:20px;
  border-bottom:1px solid rgba(16,40,51,.12);
}
.teacher-incoming-block .teacher-subhead{
  margin-bottom:12px;
}
.teacher-incoming-block .teacher-subhead>div{
  min-width:0;
}
.teacher-incoming-block .teacher-subhead h3{
  margin:0 0 4px;
}
.teacher-incoming-block .teacher-subhead p{
  margin:0;
}
.teacher-incoming-count{
  display:inline-flex;
  align-items:center;
  min-height:30px;
  padding:5px 9px;
  border-radius:999px;
  background:#eef8f5;
  color:#2f6d63;
  font-weight:800;
  white-space:nowrap;
}
.teacher-incoming-table{
  min-width:1180px;
}
.teacher-journal-divider{
  display:flex;
  flex-direction:column;
  gap:4px;
  margin:0 0 14px;
}
.teacher-journal-divider strong{
  font-size:17px;
}
.teacher-journal-divider span{
  color:#5c717c;
  line-height:1.45;
}


/* v0.6.7 - подробная карточка сдачи и предпросмотр файлов */
.teacher-incoming-head-actions{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
}
.teacher-submission-overview{
  display:grid;
  gap:20px;
}
.teacher-submission-facts{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:10px;
}
.teacher-submission-facts article{
  display:flex;
  flex-direction:column;
  gap:5px;
  min-width:0;
  padding:12px;
  border:1px solid rgba(16,40,51,.1);
  border-radius:10px;
  background:#f8fbfc;
}
.teacher-submission-facts article span:first-child{
  color:#5c717c;
  font-size:12px;
}
.teacher-submission-facts article strong{
  overflow-wrap:anywhere;
}
.teacher-submission-comment-block,
.teacher-submission-attachments,
.teacher-submission-result,
.teacher-attempt-history{
  padding-top:4px;
}
.teacher-submission-comment-block h3,
.teacher-submission-attachments h3,
.teacher-submission-result h3,
.teacher-attempt-history h3{
  margin:0 0 10px;
}
.teacher-submission-comment-block>div{
  padding:12px 14px;
  border-left:4px solid #2f8f9d;
  border-radius:8px;
  background:#f4fbfa;
  line-height:1.5;
}
.teacher-attachment-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
}
.teacher-attachment-card{
  display:flex;
  flex-direction:column;
  min-width:0;
  overflow:hidden;
  border:1px solid rgba(16,40,51,.12);
  border-radius:12px;
  background:#fff;
}
.teacher-attachment-preview{
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:280px;
  max-height:440px;
  overflow:hidden;
  background:#eef3f5;
}
.teacher-attachment-preview img{
  display:block;
  width:100%;
  height:100%;
  max-height:440px;
  object-fit:contain;
  background:#eef3f5;
}
.teacher-attachment-preview iframe{
  display:block;
  width:100%;
  height:390px;
  border:0;
  background:#fff;
}
.teacher-attachment-info{
  display:grid;
  gap:6px;
  padding:12px;
}
.teacher-attachment-info strong{
  overflow-wrap:anywhere;
}
.teacher-attachment-info span{
  color:#5c717c;
  font-size:12px;
}
.teacher-attachment-info .btn{
  justify-self:start;
}
.teacher-attachment-generic{
  flex-direction:row;
  align-items:center;
  padding:14px;
  gap:14px;
}
.teacher-generic-file-icon{
  width:70px;
  min-width:70px;
  height:86px;
  display:flex;
  align-items:center;
  justify-content:center;
  border:1px solid rgba(16,40,51,.12);
  border-radius:9px;
  background:#f8fbfc;
  color:#31546d;
  font-weight:800;
}
.teacher-attempt-list{
  display:grid;
  gap:9px;
}
.teacher-attempt-list article{
  display:grid;
  gap:6px;
  padding:11px 13px;
  border:1px solid rgba(16,40,51,.1);
  border-radius:9px;
  background:#f8fbfc;
}
.teacher-attempt-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
.teacher-attempt-teacher-comment{
  padding-top:5px;
  border-top:1px solid rgba(16,40,51,.08);
}

/* Демонстрация того, как выглядит фотография выполненной работы */
.teacher-demo-photo-wrap{
  padding:18px;
  background:linear-gradient(135deg,#d8dcde,#c4c9cc);
}
.teacher-demo-photo{
  width:min(100%,420px);
  transform:rotate(-1.2deg);
  filter:drop-shadow(0 12px 16px rgba(16,40,51,.22));
}
.teacher-demo-paper{
  min-height:430px;
  padding:32px 30px;
  box-sizing:border-box;
  background:
    repeating-linear-gradient(
      to bottom,
      #fffdf7 0,
      #fffdf7 27px,
      #cbd9e2 28px
    );
  border-radius:3px;
  color:#263c7b;
  font-family:"Comic Sans MS","Segoe Print",cursive;
}
.teacher-demo-paper-title{
  margin-bottom:25px;
  color:#2f3f62;
  font-family:Arial,Helvetica,sans-serif;
  font-weight:700;
  text-align:center;
}
.teacher-demo-handwriting{
  margin:20px 0;
  font-size:21px;
  line-height:1.45;
}

@media(max-width:900px){
  .teacher-submission-facts{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .teacher-attachment-grid{
    grid-template-columns:1fr;
  }
}
@media(max-width:560px){
  .teacher-incoming-head-actions{
    width:100%;
    justify-content:stretch;
  }
  .teacher-incoming-head-actions .btn{
    flex:1 1 100%;
  }
  .teacher-submission-facts{
    grid-template-columns:1fr;
  }
  .teacher-attachment-preview{
    min-height:220px;
  }
  .teacher-attachment-preview iframe{
    height:300px;
  }
  .teacher-demo-paper{
    min-height:360px;
    padding:24px 20px;
  }
  .teacher-demo-handwriting{
    font-size:18px;
  }
}


/* v0.6.9 - контекст обычной оценки и задолженности по предмету/классу */
.teacher-sync-note{
  display:flex;
  flex-direction:column;
  gap:5px;
  padding:11px 13px;
  border:1px solid rgba(47,143,157,.22);
  border-radius:9px;
  background:#f3fbfa;
}
.teacher-sync-note strong{
  color:#31546d;
}
.teacher-sync-note span{
  color:#5c717c;
  font-size:13px;
  line-height:1.45;
}
#teacher-grade-audience:disabled,
#teacher-grade-student:disabled{
  opacity:.65;
  cursor:not-allowed;
  background:#f3f6f7;
}
.teacher-debts-summary{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:8px 16px;
  min-height:0;
  margin:0 0 14px;
}
.teacher-debts-summary:not(:empty){
  padding:11px 13px;
  border:1px solid rgba(16,40,51,.11);
  border-radius:9px;
  background:#f8fbfc;
}
.teacher-debts-summary strong{
  color:#31546d;
}
.teacher-debts-summary span{
  color:#5c717c;
  font-size:13px;
}


/* v0.6.10 - карточка конкретной задолженности */
.teacher-debt-person-card{
  display:grid;
  gap:20px;
}
.teacher-debt-specific-work h3{
  margin:0 0 10px;
}


/* v0.6.11 - подсказка автоматического расчета среднего балла */
.teacher-field-hint{
  display:block;
  margin-top:5px;
  color:#5c717c;
  font-size:12px;
  line-height:1.35;
}


.teacher-grade-average-card{
  display:flex;
  flex-wrap:wrap;
  align-items:baseline;
  gap:6px 10px;
  margin:0 0 10px;
  padding:10px 12px;
  border:1px solid rgba(47,143,157,.18);
  border-radius:9px;
  background:#f4fbfa;
}
.teacher-grade-average-card span{
  color:#5c717c;
}
.teacher-grade-average-card strong{
  color:#31546d;
  font-size:22px;
}
.teacher-grade-average-card small{
  flex-basis:100%;
  color:#5c717c;
}


/* v0.6.12 - расписание и поурочное планирование */
.schedule-toolbar{
  display:grid;
  grid-template-columns:repeat(5,minmax(150px,1fr)) auto;
  gap:10px;
  align-items:end;
}
.schedule-toolbar .compact-field{
  display:flex;
  flex-direction:column;
  gap:5px;
  min-width:0;
  color:#5c717c;
  font-size:12px;
}
.schedule-toolbar select,
.schedule-toolbar input{
  width:100%;
}
.schedule-explanation{
  border-left:4px solid #2f8f9d;
}
.schedule-table{
  min-width:1280px;
}
.schedule-table td:nth-child(7){
  min-width:300px;
  white-space:normal;
}
.schedule-table td:nth-child(7) a{
  display:inline-block;
  margin-top:4px;
}
@media(max-width:1180px){
  .schedule-toolbar{
    grid-template-columns:repeat(3,minmax(160px,1fr));
  }
}
@media(max-width:760px){
  .schedule-toolbar{
    grid-template-columns:1fr;
  }
}


/* v0.6.13 - расписание 10-11 классов */
.schedule-import-main{max-width:none}
.schedule-import-form{
  display:grid;
  grid-template-columns:repeat(4,minmax(170px,1fr));
  gap:14px 16px;
  align-items:end;
  margin-top:16px;
}
.schedule-import-form label{
  display:grid;
  gap:6px;
  min-width:0;
  font-size:13px;
  font-weight:700;
  color:#49616d;
}
.schedule-import-form input,
.schedule-import-form select{
  width:100%;
  min-width:0;
  box-sizing:border-box;
}
.schedule-file-field{grid-column:span 2}
.schedule-import-form .btn{min-height:44px}
.schedule-preview-table td{vertical-align:top}
.schedule-week-panel{max-width:none}
.schedule-week-meta{
  margin:12px 0 14px;
  padding:10px 12px;
  border:1px solid var(--border);
  border-radius:9px;
  background:#f8fbfc;
  color:#49616d;
}
.schedule-week-grid{
  min-width:1080px;
  table-layout:fixed;
}
.schedule-week-grid th:first-child{
  width:110px;
  position:sticky;
  left:0;
  z-index:2;
  background:#f8fbfc;
}
.schedule-week-grid tbody th{
  vertical-align:top;
  text-align:left;
}
.schedule-week-grid tbody th span{
  display:block;
  margin-top:4px;
  color:var(--muted);
  font-size:11px;
  font-weight:500;
}
.schedule-week-grid td{
  min-width:180px;
  height:96px;
  padding:7px;
  vertical-align:top;
  background:#fff;
}
.schedule-empty-cell{
  text-align:center;
  color:#a4b1b7;
}
.schedule-cell-card{
  width:100%;
  min-height:80px;
  padding:9px 10px;
  border:1px solid rgba(49,84,109,.18);
  border-radius:10px;
  background:#f8fbfc;
  text-align:left;
  cursor:pointer;
  color:#213944;
}
.schedule-cell-card:hover{
  border-color:#2f8f9d;
  box-shadow:0 5px 16px rgba(16,40,51,.08);
}
.schedule-cell-card strong,
.schedule-cell-card span,
.schedule-cell-card small{
  display:block;
}
.schedule-cell-card span{
  margin-top:4px;
  color:#5c717c;
  font-size:12px;
}
.schedule-cell-card small{
  margin-top:5px;
  color:#31546d;
}
.schedule-cell-card.electronic{
  background:#f3fbfa;
  border-color:rgba(47,143,157,.32);
}
.schedule-cell-card.mixed{
  background:#f5f8fc;
  border-color:rgba(109,169,216,.34);
}
.schedule-cell-marks{
  display:flex;
  gap:5px;
  flex-wrap:wrap;
  margin-top:7px;
}
.schedule-mini-mark{
  display:inline-flex !important;
  width:auto;
  padding:2px 6px;
  border-radius:999px;
  background:#e9f3f6;
  color:#31546d !important;
  font-size:10px !important;
  font-weight:700;
}
.lesson-card-dialog{
  width:min(900px,calc(100vw - 40px)) !important;
  max-width:900px !important;
  max-height:calc(100vh - 40px);
  padding:0 !important;
  overflow:hidden;
  border:0 !important;
  border-radius:16px !important;
  box-shadow:0 22px 70px rgba(16,40,51,.28) !important;
}
.lesson-card-dialog::backdrop{
  background:rgba(16,40,51,.42);
  backdrop-filter:blur(2px);
}
.lesson-card-dialog>form{
  display:flex;
  flex-direction:column;
  max-height:calc(100vh - 40px);
}
.lesson-card-dialog .dialog-head{
  padding:20px 24px 16px;
  border-bottom:1px solid var(--border);
}
.lesson-card-dialog .dialog-body{
  overflow-y:auto;
  padding:20px 24px;
}
.lesson-card-dialog .dialog-actions{
  margin:0;
  padding:16px 24px 20px;
  border-top:1px solid var(--border);
}
.lesson-card-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px 18px;
}
.lesson-card-grid label{
  display:grid;
  gap:6px;
  min-width:0;
  font-size:13px;
  font-weight:700;
  color:#49616d;
}
.lesson-card-grid input,
.lesson-card-grid select,
.lesson-card-grid textarea{
  width:100%;
  min-width:0;
  box-sizing:border-box;
}
.lesson-card-wide{grid-column:1/-1}
@media(max-width:900px){
  .schedule-import-form{grid-template-columns:1fr 1fr}
  .schedule-file-field{grid-column:span 2}
}
@media(max-width:620px){
  .schedule-import-form{grid-template-columns:1fr}
  .schedule-file-field{grid-column:auto}
  .lesson-card-grid{grid-template-columns:1fr}
  .lesson-card-wide{grid-column:auto}
}


/* v0.6.14 - оперативные изменения конкретного урока */
.lesson-card-actions{
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
}
.lesson-card-schedule-actions,
.lesson-card-save-actions{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.btn.danger{
  border-color:rgba(166,48,48,.28);
  color:#8f2f2f;
  background:#fff7f7;
}
.btn.danger:hover{
  background:#fbecec;
}
.lesson-change-dialog{
  width:min(720px,calc(100vw - 28px));
}
.lesson-change-grid{
  display:grid;
  gap:14px;
}
.lesson-change-wide{
  width:100%;
}
.lesson-change-row{
  display:grid;
  grid-template-columns:1.4fr 1fr 1fr;
  gap:10px;
}
.lesson-change-history-panel{
  margin-top:6px;
  padding-top:12px;
  border-top:1px solid rgba(16,40,51,.11);
}
.lesson-change-history{
  display:grid;
  gap:8px;
}
.lesson-change-history-item{
  padding:10px 12px;
  border:1px solid rgba(16,40,51,.10);
  border-radius:9px;
  background:#f8fbfc;
}
.lesson-change-history-head{
  display:flex;
  justify-content:space-between;
  gap:12px;
  margin-bottom:4px;
}
.lesson-change-history-item small{
  display:block;
  margin-top:4px;
  color:#5c717c;
}
.schedule-cell-card.moved{
  outline:2px dashed rgba(49,84,109,.24);
}
@media (max-width:700px){
  .lesson-change-row{
    grid-template-columns:1fr;
  }
  .lesson-card-actions{
    align-items:stretch;
  }
  .lesson-card-schedule-actions,
  .lesson-card-save-actions{
    width:100%;
  }
}


/* v0.6.15 - навигация и автоматическое переключение недель */
.schedule-week-nav{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  align-items:flex-end;
}
#schedule-today-btn.active{
  font-weight:700;
}
@media (max-width:700px){
  .schedule-week-nav{
    width:100%;
  }
  .schedule-week-nav .btn{
    flex:1 1 100%;
  }
}


/* v0.6.16 - исправленная просторная карточка переноса/замены/отмены урока */
.lesson-change-dialog{
  width:min(900px,calc(100vw - 40px)) !important;
  max-width:900px !important;
  max-height:calc(100vh - 40px);
  padding:0 !important;
  overflow:hidden !important;
  border:0 !important;
  border-radius:16px !important;
  box-shadow:0 22px 70px rgba(16,40,51,.28) !important;
}
.lesson-change-dialog::backdrop{
  background:rgba(16,40,51,.42);
  backdrop-filter:blur(2px);
}
.lesson-change-dialog > form{
  display:flex;
  flex-direction:column;
  width:100%;
  max-height:calc(100vh - 40px);
  min-width:0;
}
.lesson-change-dialog .dialog-head{
  flex:0 0 auto;
  align-items:flex-start;
  padding:22px 28px 18px;
  border-bottom:1px solid var(--border);
  background:#fff;
}
.lesson-change-dialog .dialog-head > div:first-child{
  min-width:0;
  padding-right:12px;
}
.lesson-change-dialog .dialog-head h2{
  margin:2px 0 6px;
  line-height:1.25;
}
.lesson-change-dialog #lesson-change-meta{
  line-height:1.45;
  overflow-wrap:anywhere;
}
.lesson-change-dialog .dialog-body{
  flex:1 1 auto;
  min-height:0;
  overflow-y:auto !important;
  overflow-x:hidden !important;
  padding:24px 28px 26px;
}
.lesson-change-grid{
  display:grid;
  grid-template-columns:1fr;
  gap:22px !important;
}
.lesson-change-wide{
  width:100%;
  min-width:0;
  box-sizing:border-box;
}
#lesson-replace-fields,
#lesson-move-fields{
  width:100%;
  min-width:0;
}
#lesson-replace-fields:not(.hidden),
#lesson-move-fields:not(.hidden){
  display:grid;
  gap:22px;
}
.lesson-change-dialog label{
  display:grid;
  grid-template-columns:minmax(0,1fr);
  gap:8px;
  min-width:0;
  margin:0;
  color:#49616d;
  font-size:14px;
  font-weight:700;
  line-height:1.35;
}
.lesson-change-dialog input:not([type="checkbox"]),
.lesson-change-dialog select,
.lesson-change-dialog textarea{
  display:block;
  width:100%;
  min-width:0;
  box-sizing:border-box;
  margin:0;
  border:1px solid rgba(16,40,51,.18);
  border-radius:9px;
  background:#fff;
  color:var(--text);
  font:inherit;
  font-weight:400;
}
.lesson-change-dialog input:not([type="checkbox"]),
.lesson-change-dialog select{
  min-height:46px;
  padding:10px 12px;
}
.lesson-change-dialog textarea{
  min-height:112px;
  padding:11px 12px;
  line-height:1.5;
  resize:vertical;
}
.lesson-change-dialog input:focus,
.lesson-change-dialog select:focus,
.lesson-change-dialog textarea:focus{
  outline:2px solid rgba(47,143,157,.18);
  border-color:#2f8f9d;
}
.lesson-change-row{
  display:grid;
  grid-template-columns:minmax(240px,1.45fr) minmax(155px,.8fr) minmax(155px,.8fr) !important;
  gap:18px !important;
  align-items:start;
  width:100%;
  min-width:0;
}
.lesson-change-dialog .field-help{
  margin-top:0;
  line-height:1.45;
}
.lesson-change-dialog .alert{
  margin:0;
  padding:13px 15px;
  line-height:1.5;
}
.lesson-change-dialog .check-label{
  display:flex;
  align-items:flex-start;
  gap:10px;
  padding:13px 15px;
  border:1px solid rgba(16,40,51,.11);
  border-radius:9px;
  background:#f8fbfc;
  font-weight:600;
}
.lesson-change-dialog .check-label input[type="checkbox"]{
  flex:0 0 auto;
  width:18px;
  height:18px;
  margin:1px 0 0;
}
.lesson-change-dialog .dialog-actions{
  flex:0 0 auto;
  margin:0 !important;
  padding:17px 28px 21px;
  border-top:1px solid var(--border);
  background:#fff;
}
.lesson-change-dialog .dialog-actions .btn{
  min-height:42px;
  padding:9px 16px;
}

@media(max-width:780px){
  .lesson-change-dialog{
    width:min(680px,calc(100vw - 24px)) !important;
    max-height:calc(100vh - 24px);
  }
  .lesson-change-dialog > form{
    max-height:calc(100vh - 24px);
  }
  .lesson-change-row{
    grid-template-columns:1fr !important;
    gap:16px !important;
  }
  .lesson-change-dialog .dialog-head{
    padding:18px 18px 15px;
  }
  .lesson-change-dialog .dialog-body{
    padding:20px 18px 22px;
  }
  .lesson-change-dialog .dialog-actions{
    padding:14px 18px 18px;
  }
}

@media(max-width:520px){
  .lesson-change-dialog{
    width:calc(100vw - 16px) !important;
    max-height:calc(100vh - 16px);
    border-radius:13px !important;
  }
  .lesson-change-dialog > form{
    max-height:calc(100vh - 16px);
  }
  .lesson-change-grid{
    gap:18px !important;
  }
  .lesson-change-dialog .dialog-head{
    padding:16px 14px 13px;
  }
  .lesson-change-dialog .dialog-body{
    padding:17px 14px 20px;
  }
  .lesson-change-dialog .dialog-actions{
    display:grid;
    grid-template-columns:1fr;
    gap:9px;
    padding:13px 14px 16px;
  }
  .lesson-change-dialog .dialog-actions .btn{
    width:100%;
  }
}


.lesson-change-dialog .lesson-cancel-info{
  display:grid;
  gap:6px;
  padding:16px 18px;
  border:1px solid rgba(164,71,71,.20);
  border-radius:10px;
  background:#fff8f8;
  color:#5d4545;
  line-height:1.5;
}
.lesson-change-dialog .lesson-cancel-info strong{
  color:#8f2f2f;
  font-size:14px;
}
.lesson-change-dialog .lesson-cancel-info span{
  font-size:13px;
}
.lesson-change-dialog .lesson-cancel-info.hidden{
  display:none !important;
}


/* v0.6.17 - отдельная строка навигации по неделям */
.schedule-toolbar-main{
  display:grid !important;
  grid-template-columns:minmax(220px,1fr) minmax(220px,1fr) minmax(220px,1fr);
  gap:16px !important;
  align-items:end;
  width:100%;
  margin-bottom:14px;
}
.schedule-toolbar-main .compact-field{
  min-width:0;
}
.schedule-week-nav-row{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:12px;
  width:100%;
  margin:0 0 14px;
  padding:12px;
  box-sizing:border-box;
  border:1px solid rgba(16,40,51,.10);
  border-radius:12px;
  background:#f7fafb;
}
.schedule-week-nav-btn{
  min-height:44px;
  width:100%;
  padding:10px 14px;
  border-radius:9px;
  border:1px solid transparent;
  cursor:pointer;
  font:inherit;
  font-weight:700;
  line-height:1.25;
  transition:background .16s ease,border-color .16s ease,box-shadow .16s ease,transform .16s ease;
}
.schedule-week-nav-btn:hover{
  transform:translateY(-1px);
}
.schedule-week-prev{
  background:#eef3f6;
  border-color:#cfdbe1;
  color:#31546d;
}
.schedule-week-prev:hover{
  background:#e4edf1;
  border-color:#b9cbd3;
}
.schedule-week-today{
  background:#2f8f9d;
  border-color:#2f8f9d;
  color:#fff;
  box-shadow:0 5px 14px rgba(47,143,157,.18);
}
.schedule-week-today:hover{
  background:#277e8a;
  border-color:#277e8a;
}
.schedule-week-today.active{
  box-shadow:0 0 0 3px rgba(142,216,198,.35),0 5px 14px rgba(47,143,157,.20);
}
.schedule-week-next{
  background:#eaf3fa;
  border-color:#c8dced;
  color:#31546d;
}
.schedule-week-next:hover{
  background:#deedf8;
  border-color:#b7d2e7;
}
.schedule-week-meta{
  margin-top:0 !important;
}

@media(max-width:860px){
  .schedule-toolbar-main{
    grid-template-columns:1fr 1fr !important;
  }
  .schedule-toolbar-main .compact-field:last-child{
    grid-column:1/-1;
  }
}
@media(max-width:640px){
  .schedule-toolbar-main{
    grid-template-columns:1fr !important;
  }
  .schedule-toolbar-main .compact-field:last-child{
    grid-column:auto;
  }
  .schedule-week-nav-row{
    grid-template-columns:1fr;
    gap:9px;
    padding:10px;
  }
}


/* v0.6.28 - все пункты боковой навигации равноправны.
   Темным становится только текущий .nav.active. */
.sidebar .nav-priority,
.sidebar .nav-priority-secondary{
  background:transparent;
  color:var(--text);
  font-weight:400;
  border:0;
  border-left:0;
}
.sidebar .nav-priority:hover,
.sidebar .nav-priority-secondary:hover{
  background:#f1f5f6;
  color:var(--text);
}
.sidebar .nav-priority.active,
.sidebar .nav-priority-secondary.active{
  background:var(--dark);
  color:#fff;
  font-weight:700;
}
.sidebar .nav-settings{
  margin-top:12px;
  border-top:1px solid rgba(16,40,51,.10);
  border-radius:0 0 10px 10px;
  padding-top:14px;
}

/* v0.6.18 - замена предмета конкретного урока */
.lesson-subject-btn{
  background:#f2f7fb;
  border-color:#c8dceb;
  color:#31546d;
}
.lesson-subject-btn:hover{
  background:#e7f1f8;
}
#lesson-subject-fields:not(.hidden){
  display:grid;
  gap:20px;
}
.lesson-subject-info{
  display:grid;
  gap:5px;
  padding:15px 17px;
  border:1px solid rgba(109,169,216,.28);
  border-radius:10px;
  background:#f4f9fd;
  color:#405e70;
  line-height:1.45;
}
.lesson-subject-info strong{
  color:#31546d;
  font-size:14px;
}
.lesson-subject-info span{
  font-size:13px;
}


/* v0.6.19 - персональное расписание преподавателя */
.teacher-schedule-nav-btn{
  border-color:rgba(47,143,157,.25);
  background:#f4fbfa;
}
.teacher-schedule-panel{
  max-width:none !important;
}
.teacher-schedule-topline{
  display:grid;
  grid-template-columns:minmax(220px,320px) minmax(240px,360px);
  gap:14px;
  margin-bottom:12px;
}
.teacher-schedule-topline label{
  display:grid;
  gap:6px;
  color:#49616d;
  font-size:13px;
  font-weight:700;
}
.teacher-schedule-topline input,
.teacher-schedule-topline select{
  width:100%;
  min-width:0;
  box-sizing:border-box;
}
.teacher-schedule-week-nav{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:10px;
  padding:11px;
  margin:0 0 13px;
  border:1px solid rgba(16,40,51,.10);
  border-radius:11px;
  background:#f7fafb;
}
.teacher-schedule-week-btn{
  min-height:42px;
  border:1px solid transparent;
  border-radius:9px;
  padding:9px 12px;
  cursor:pointer;
  font:inherit;
  font-weight:800;
}
.teacher-schedule-prev{
  background:#eef3f6;
  border-color:#cfdbe1;
  color:#31546d;
}
.teacher-schedule-today{
  background:#2f8f9d;
  border-color:#2f8f9d;
  color:#fff;
}
.teacher-schedule-today.active{
  box-shadow:0 0 0 3px rgba(142,216,198,.34);
}
.teacher-schedule-next{
  background:#eaf3fa;
  border-color:#c8dced;
  color:#31546d;
}
.teacher-schedule-meta{
  margin:2px 0 12px;
  color:#5c717c;
  line-height:1.45;
}
.teacher-schedule-grid{
  min-width:1120px !important;
  table-layout:fixed;
}
.teacher-schedule-grid th:first-child{
  width:72px;
}
.teacher-schedule-grid thead th:not(:first-child){
  min-width:205px;
}
.teacher-schedule-grid thead th span{
  display:block;
  margin-top:3px;
  color:#70848e;
  font-size:12px;
  font-weight:600;
}
.teacher-schedule-grid td{
  vertical-align:top;
  padding:8px;
  background:#fff;
}
.teacher-schedule-empty{
  text-align:center;
  color:#a2b0b6;
}
.teacher-schedule-card{
  position:relative;
  display:grid;
  gap:6px;
  min-height:116px;
  margin:0 0 7px;
  padding:11px 12px;
  box-sizing:border-box;
  border:1px solid rgba(16,40,51,.11);
  border-left:4px solid #6da9d8;
  border-radius:10px;
  background:#fbfdfe;
}
.teacher-schedule-card:last-child{margin-bottom:0}
.teacher-schedule-mode-electronic{
  border-left-color:#8ed8c6;
  background:#f6fcfa;
}
.teacher-schedule-mode-mixed{
  border-left-color:#2f8f9d;
  background:#f4fbfb;
}
.teacher-schedule-card-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:8px;
}
.teacher-schedule-card-head strong{
  color:#173642;
  line-height:1.3;
}
.teacher-schedule-card-head span{
  flex:0 0 auto;
  padding:3px 7px;
  border-radius:999px;
  background:#edf3f5;
  color:#31546d;
  font-size:11px;
  font-weight:800;
}
.teacher-schedule-time{
  color:#31546d;
  font-size:12px;
  font-weight:800;
}
.teacher-schedule-mode{
  color:#2f8f9d;
  font-size:12px;
  font-weight:800;
}
.teacher-schedule-topic{
  font-size:12px;
  line-height:1.4;
}
.teacher-schedule-links{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
}
.teacher-schedule-links a{
  color:#176d78;
  font-size:12px;
  font-weight:800;
  text-decoration:none;
}
.teacher-schedule-links a:hover{text-decoration:underline}
.teacher-schedule-mark{
  justify-self:start;
  padding:3px 7px;
  border-radius:999px;
  background:#fff3d8;
  color:#81601a;
  font-size:11px;
  font-weight:800;
}
.teacher-schedule-summary{
  display:grid;
  grid-template-columns:repeat(4,minmax(110px,1fr));
  gap:10px;
  margin-top:13px;
}
.teacher-schedule-summary article{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:11px 13px;
  border:1px solid rgba(16,40,51,.10);
  border-radius:9px;
  background:#f8fbfc;
}
.teacher-schedule-summary span{
  color:#5c717c;
  font-size:12px;
}
.teacher-schedule-summary strong{
  color:#173642;
  font-size:20px;
}

/* v0.6.19 - формат при замене предмета */
#lesson-subject-fields label{
  min-width:0;
}

@media(max-width:760px){
  .teacher-schedule-topline{
    grid-template-columns:1fr;
  }
  .teacher-schedule-week-nav{
    grid-template-columns:1fr;
  }
  .teacher-schedule-summary{
    grid-template-columns:1fr 1fr;
  }
}
@media(max-width:480px){
  .teacher-schedule-summary{
    grid-template-columns:1fr;
  }
}

/* v0.6.20 - кабинет преподавателя: фильтры и карточка конкретного урока */
.teacher-schedule-topline{
  grid-template-columns:repeat(4,minmax(180px,1fr)) !important;
  align-items:end;
}
.teacher-schedule-card{
  cursor:pointer;
  transition:transform .14s ease,box-shadow .14s ease,border-color .14s ease;
}
.teacher-schedule-card:hover,
.teacher-schedule-card:focus{
  transform:translateY(-1px);
  border-color:rgba(47,143,157,.32);
  box-shadow:0 7px 18px rgba(16,40,51,.08);
  outline:none;
}
.teacher-lesson-dialog{
  width:min(940px,calc(100vw - 40px)) !important;
  max-width:940px !important;
}
.teacher-lesson-fixed-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:10px;
}
.teacher-lesson-fixed-grid>div{
  display:grid;
  gap:4px;
  min-width:0;
  padding:12px 13px;
  border:1px solid rgba(16,40,51,.10);
  border-radius:9px;
  background:#f8fbfc;
}
.teacher-lesson-fixed-grid span{
  color:#667b85;
  font-size:11px;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.025em;
}
.teacher-lesson-fixed-grid strong{
  color:#173642;
  overflow-wrap:anywhere;
}
.teacher-admin-links-panel{
  display:grid;
  gap:14px;
  padding:16px;
  border:1px solid rgba(47,143,157,.18);
  border-radius:11px;
  background:#f4fbfa;
}
.teacher-admin-links-panel h3{
  margin:0 0 4px;
  color:#31546d;
}
.teacher-admin-links-panel p{
  margin:0;
}
.teacher-admin-links-panel label{
  display:grid;
  gap:7px;
}
.teacher-readonly-link-row{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:9px;
  align-items:center;
}
.teacher-readonly-link-row input[readonly]{
  background:#eef3f5;
  color:#49616d;
  cursor:default;
}
.teacher-readonly-link-row .btn{
  white-space:nowrap;
  text-decoration:none;
}
.teacher-admin-note{
  display:grid;
  gap:7px;
  padding:13px 15px;
  border:1px solid rgba(109,169,216,.22);
  border-radius:9px;
  background:#f5f9fc;
  line-height:1.5;
}
.teacher-admin-note strong{
  color:#31546d;
}

@media(max-width:1050px){
  .teacher-schedule-topline{
    grid-template-columns:repeat(2,minmax(200px,1fr)) !important;
  }
  .teacher-lesson-fixed-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}
@media(max-width:620px){
  .teacher-schedule-topline{
    grid-template-columns:1fr !important;
  }
  .teacher-lesson-fixed-grid{
    grid-template-columns:1fr;
  }
  .teacher-readonly-link-row{
    grid-template-columns:1fr;
  }
  .teacher-readonly-link-row .btn{
    width:100%;
    text-align:center;
  }
}


/* v0.6.21 - материалы конкретного урока в кабинете преподавателя */
.teacher-lesson-materials-panel,
.admin-lesson-materials-panel{
  display:grid;
  gap:14px;
  padding:16px 18px;
  border:1px solid rgba(47,143,157,.18);
  border-radius:12px;
  background:#f8fbfc;
}
.teacher-lesson-materials-panel h3,
.admin-lesson-materials-panel h3{
  margin:0 0 4px;
  color:#31546d;
}
.teacher-lesson-materials-panel p,
.admin-lesson-materials-panel p{
  margin:0;
}
.teacher-lesson-materials-list,
.admin-lesson-materials-list{
  display:grid;
  gap:9px;
}
.teacher-lesson-material-item,
.admin-lesson-material-item{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:12px 13px;
  border:1px solid rgba(16,40,51,.10);
  border-radius:10px;
  background:#fff;
}
.teacher-lesson-material-main,
.admin-lesson-material-item>div:first-child{
  min-width:0;
}
.teacher-lesson-material-main strong,
.teacher-lesson-material-main span,
.teacher-lesson-material-main small,
.admin-lesson-material-item strong,
.admin-lesson-material-item span,
.admin-lesson-material-item small{
  display:block;
}
.teacher-lesson-material-main strong,
.admin-lesson-material-item strong{
  overflow-wrap:anywhere;
  color:#213944;
}
.teacher-lesson-material-main span,
.admin-lesson-material-item span{
  margin-top:4px;
  color:#667b85;
  font-size:12px;
}
.teacher-lesson-material-main small,
.admin-lesson-material-item small{
  margin-top:4px;
  color:#2f7f68;
  font-size:12px;
}
.teacher-lesson-material-actions,
.admin-lesson-material-actions{
  display:flex;
  flex-wrap:wrap;
  justify-content:flex-end;
  gap:7px;
  flex:0 0 auto;
}
.teacher-lesson-material-upload{
  display:grid;
  grid-template-columns:minmax(260px,1fr) auto auto;
  align-items:end;
  gap:12px;
  padding-top:4px;
}
.teacher-material-file-field{
  display:grid;
  gap:6px;
}
.teacher-material-file-field input[type="file"]{
  width:100%;
  min-height:44px;
  box-sizing:border-box;
}
.teacher-material-visibility{
  display:flex !important;
  flex-direction:row !important;
  align-items:center;
  gap:8px !important;
  min-height:44px;
  padding:0 4px;
  white-space:nowrap;
  font-weight:600 !important;
}
.teacher-material-visibility input[type="checkbox"]{
  width:18px;
  height:18px;
  flex:0 0 auto;
}
#teacher-lesson-material-upload-status{
  grid-column:1/-1;
  min-height:18px;
}
.teacher-lesson-material-actions .btn.danger{
  color:#9b3434;
  border-color:#d8a1a1;
  background:#fff5f5;
}

@media(max-width:820px){
  .teacher-lesson-material-upload{
    grid-template-columns:1fr;
    align-items:stretch;
  }
  .teacher-material-visibility{
    white-space:normal;
  }
  #teacher-lesson-material-upload-status{
    grid-column:auto;
  }
}

@media(max-width:620px){
  .teacher-lesson-material-item,
  .admin-lesson-material-item{
    align-items:stretch;
    flex-direction:column;
  }
  .teacher-lesson-material-actions,
  .admin-lesson-material-actions{
    justify-content:stretch;
    width:100%;
  }
  .teacher-lesson-material-actions .btn,
  .admin-lesson-material-actions .btn{
    flex:1 1 auto;
    text-align:center;
  }
}


/* v0.6.22 - запись урока отделена от видеоматериала */
.teacher-recording-panel{
  display:grid;
  gap:8px;
  padding:14px 16px;
  border:1px solid rgba(109,169,216,.22);
  border-radius:10px;
  background:#f5f9fc;
}
.teacher-recording-panel strong{
  color:#31546d;
}
.teacher-recording-panel p{
  margin:0;
}


/* v0.6.23 - рабочий контур конкретного урока преподавателя */
.teacher-lesson-fixed-grid{
  grid-template-columns:repeat(5,minmax(0,1fr));
}

.teacher-lesson-action-panel,
.teacher-lesson-context-section{
  display:grid;
  gap:13px;
  padding:16px 18px;
  border:1px solid rgba(47,143,157,.16);
  border-radius:12px;
  background:#fbfdfd;
}

.teacher-lesson-action-panel h3,
.teacher-lesson-context-section h3{
  margin:0 0 4px;
  color:#31546d;
}

.teacher-lesson-action-panel p,
.teacher-lesson-context-section p{
  margin:0;
}

.teacher-lesson-action-buttons{
  display:flex;
  flex-wrap:wrap;
  gap:9px;
}

.teacher-complete-btn{
  background:#eef8f2;
  border-color:#b8d8c3;
  color:#2f7250;
  font-weight:700;
}

.teacher-complete-btn:hover{
  background:#e4f3e9;
}

.teacher-lesson-context-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
}

.teacher-lesson-context-list{
  display:grid;
  gap:9px;
}

.teacher-lesson-context-item,
.teacher-lesson-grade-item{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:12px 13px;
  border:1px solid rgba(16,40,51,.10);
  border-radius:10px;
  background:#fff;
}

.teacher-lesson-context-item>div,
.teacher-lesson-grade-item>div{
  min-width:0;
}

.teacher-lesson-context-item strong,
.teacher-lesson-context-item span,
.teacher-lesson-context-item small,
.teacher-lesson-grade-item strong,
.teacher-lesson-grade-item span,
.teacher-lesson-grade-item small{
  display:block;
  overflow-wrap:anywhere;
}

.teacher-lesson-context-item span,
.teacher-lesson-grade-item span{
  margin-top:3px;
  color:#607681;
  font-size:13px;
}

.teacher-lesson-context-item small,
.teacher-lesson-grade-item small{
  margin-top:4px;
  color:#70848e;
}

.teacher-lesson-grade-item b{
  flex:0 0 auto;
  min-width:38px;
  padding:7px 10px;
  border-radius:9px;
  background:#eaf6f5;
  color:#176d78;
  text-align:center;
  font-size:18px;
}

.teacher-context-filter{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:14px;
  margin-bottom:12px;
  padding:12px 14px;
  border:1px solid rgba(109,169,216,.24);
  border-radius:11px;
  background:#f2f7fb;
}

.teacher-context-filter>div{
  display:grid;
  gap:3px;
}

.teacher-context-filter strong{
  color:#31546d;
}

.teacher-context-filter span{
  color:#5f7480;
  font-size:13px;
}

.teacher-schedule-completed{
  background:#eaf6ef !important;
  color:#2f7250 !important;
}

@media(max-width:1050px){
  .teacher-lesson-fixed-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}

@media(max-width:700px){
  .teacher-lesson-action-buttons{
    display:grid;
    grid-template-columns:1fr;
  }

  .teacher-lesson-action-buttons .btn{
    width:100%;
  }

  .teacher-lesson-context-head,
  .teacher-context-filter{
    align-items:stretch;
    flex-direction:column;
  }

  .teacher-lesson-context-item,
  .teacher-lesson-grade-item{
    align-items:stretch;
    flex-direction:column;
  }

  .teacher-lesson-context-item>.btn{
    width:100%;
  }

  .teacher-lesson-grade-item b{
    align-self:flex-start;
  }
}

@media(max-width:620px){
  .teacher-lesson-fixed-grid{
    grid-template-columns:1fr;
  }
}


/* v0.6.24 - автоматическое завершение урока и статус «не состоялся» */
.teacher-not-held-btn,
.lesson-not-held-btn{
  background:#fff6eb;
  border-color:#e6c39a;
  color:#9a5a1f;
  font-weight:700;
}
.teacher-not-held-btn:hover,
.lesson-not-held-btn:hover{
  background:#ffefd9;
}
.teacher-not-held-info,
.lesson-not-held-info{
  display:grid;
  gap:5px;
  padding:14px 16px;
  border:1px solid rgba(190,112,42,.24);
  border-radius:10px;
  background:#fff8ef;
  color:#76502d;
  line-height:1.45;
}
.teacher-not-held-info strong,
.lesson-not-held-info strong{
  color:#8a4d19;
}
.teacher-schedule-not-held{
  background:#fff0e1 !important;
  color:#9a5a1f !important;
}
.schedule-cell-card.not-held{
  border-color:rgba(190,112,42,.34) !important;
  background:#fffaf4 !important;
}
.schedule-mini-mark-alert{
  background:#fff0df !important;
  color:#934f16 !important;
}


/* v0.6.26 - поурочное планирование */
.nav-priority-secondary{border-left:0}
.lesson-plan-import-panel{margin-bottom:14px}
.lesson-plan-import-form{display:grid;grid-template-columns:minmax(240px,.8fr) minmax(320px,1.6fr) auto;gap:12px;align-items:end;margin-top:14px}
.lesson-plan-import-form label{display:grid;gap:6px;font-weight:700}
.lesson-plan-import-form select,.lesson-plan-import-form input{width:100%;box-sizing:border-box;min-height:44px}
.lesson-plan-rule-note{display:grid;gap:5px;padding:13px 15px;border:1px solid rgba(47,143,157,.18);border-radius:10px;background:#f3faf9;color:#526f78}
.lesson-plan-rule-note strong{color:#176d78}
.lesson-plan-compare-panel{margin-top:14px;margin-bottom:14px}
.lesson-plan-preview-table td:nth-child(6){min-width:280px;white-space:normal}
.lesson-plan-preview-table td:nth-child(5){min-width:220px;white-space:normal}
.lesson-plan-active-panel{margin-top:14px}
.lesson-plan-items-dialog{width:min(1100px,calc(100vw - 40px))!important;max-width:1100px!important}
.warning-text{color:#8a5a20}
@media(max-width:900px){.lesson-plan-import-form{grid-template-columns:1fr}.lesson-plan-import-form .btn{width:100%}}


/* v0.6.27 - предметно-годовая схема поурочного планирования */
.lesson-plan-registry-filter,
.lesson-plan-registry-panel,
.lesson-plan-subject-panel{
  margin-bottom:14px;
}

.lesson-plan-registry-toolbar{
  display:grid;
  grid-template-columns:minmax(220px,1fr) minmax(220px,1fr) auto;
  gap:12px;
  align-items:end;
}
.lesson-plan-registry-toolbar .compact-field{
  min-width:0;
}
.lesson-plan-registry-toolbar select{
  width:100%;
}

.lesson-plan-registry-table td,
.lesson-plan-registry-table th{
  vertical-align:top;
}
.lesson-plan-registry-table td:first-child{
  min-width:220px;
}
.lesson-plan-registry-table td:nth-child(2),
.lesson-plan-registry-table td:nth-child(3){
  min-width:210px;
}
.lesson-plan-registry-table td:nth-child(6){
  min-width:190px;
}

.lesson-plan-subject-panel{
  scroll-margin-top:18px;
}
.lesson-plan-subject-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
  margin:12px 0;
}
.lesson-plan-source-card{
  display:grid;
  gap:5px;
  padding:13px 15px;
  border:1px solid rgba(16,40,51,.10);
  border-radius:10px;
  background:#fafcfd;
}
.lesson-plan-source-card span{
  color:#6b7f89;
  font-size:12px;
}
.lesson-plan-source-card strong{
  color:#213944;
  overflow-wrap:anywhere;
}

.lesson-plan-subject-actions{
  display:flex;
  align-items:end;
  gap:10px;
  margin:14px 0;
}
.lesson-plan-subject-actions .lesson-plan-import-form{
  flex:1 1 auto;
  display:grid;
  grid-template-columns:minmax(300px,1fr) auto;
  gap:10px;
  align-items:end;
  margin:0;
}
.lesson-plan-subject-actions .lesson-plan-file-field{
  min-width:0;
}

.lesson-plan-preview-check,
.lesson-plan-preview-rows,
.lesson-plan-current-block{
  margin-top:14px;
  padding-top:14px;
  border-top:1px solid rgba(16,40,51,.10);
}

.lesson-plan-preview-check h3,
.lesson-plan-preview-rows h3,
.lesson-plan-current-block h3{
  margin:0 0 4px;
}

.lesson-plan-year-table td,
.lesson-plan-year-table th{
  vertical-align:top;
}
.lesson-plan-year-table td:nth-child(3){
  min-width:280px;
  white-space:normal;
}
.lesson-plan-year-table td:nth-child(5){
  min-width:150px;
}
.lesson-plan-year-table td:nth-child(8){
  min-width:200px;
  white-space:normal;
}

@media(max-width:900px){
  .lesson-plan-registry-toolbar{
    grid-template-columns:1fr 1fr;
  }
  .lesson-plan-registry-toolbar .btn{
    grid-column:1/-1;
  }
  .lesson-plan-subject-grid{
    grid-template-columns:1fr;
  }
  .lesson-plan-subject-actions{
    align-items:stretch;
    flex-direction:column;
  }
  .lesson-plan-subject-actions .lesson-plan-import-form{
    width:100%;
  }
}
@media(max-width:650px){
  .lesson-plan-registry-toolbar,
  .lesson-plan-subject-actions .lesson-plan-import-form{
    grid-template-columns:1fr;
  }
  .lesson-plan-registry-toolbar .btn{
    grid-column:auto;
  }
  .lesson-plan-subject-actions .btn,
  .lesson-plan-subject-actions .lesson-plan-import-form .btn{
    width:100%;
  }
}


/* v0.6.29 - загрузка расписания: все поля на одной линии */
@media(min-width:1181px){
  .schedule-import-form{
    grid-template-columns:
      minmax(150px,.9fr)
      minmax(145px,.85fr)
      minmax(145px,.85fr)
      minmax(190px,1.15fr)
      minmax(260px,1.65fr)
      auto !important;
    gap:12px !important;
    align-items:start !important;
  }
  .schedule-import-form label{
    display:grid !important;
    grid-template-rows:18px 44px minmax(42px,auto);
    gap:6px !important;
    align-content:start;
  }
  .schedule-import-form input,
  .schedule-import-form select{
    height:44px !important;
    min-height:44px !important;
  }
  .schedule-file-field{
    grid-column:auto !important;
  }
  .schedule-import-form > .btn{
    height:44px !important;
    min-height:44px !important;
    margin-top:24px !important;
    white-space:nowrap;
  }
}

/* v0.6.29 - общий план параллели */
.lesson-plan-class-line,
.lesson-plan-assignment-line{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin:0 0 5px;
  white-space:nowrap;
}
.lesson-plan-class-line:last-child,
.lesson-plan-assignment-line:last-child{
  margin-bottom:0;
}
.lesson-plan-registry-table td:nth-child(4),
.lesson-plan-registry-table td:nth-child(5){
  min-width:190px;
}
.lesson-plan-year-table td:nth-child(5),
.lesson-plan-year-table td:nth-child(6){
  min-width:230px;
}


/* v0.6.30 - предметы справочника, которых нет отдельной строкой в учебном плане */
.directory-only-note{
  display:inline-block;
  color:#8a5b22;
  font-size:12px;
  font-weight:700;
  line-height:1.35;
}


/* v0.6.35 - номер поурочного урока, активные ссылки, административные видео */
.lesson-link-edit-row{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:9px;
  align-items:center;
}
.lesson-link-edit-row .btn{white-space:nowrap}
.admin-lesson-video-panel{
  display:grid;
  gap:11px;
  padding:15px 16px;
  border:1px solid rgba(47,143,157,.16);
  border-radius:11px;
  background:#fbfdfd;
}
.admin-lesson-video-panel h3{margin:0 0 4px;color:#31546d}
.admin-lesson-video-panel p{margin:0}
.admin-lesson-recording-panel{
  border-color:rgba(109,169,216,.24);
  background:#f7fafc;
}
.lesson-video-upload-row{
  display:grid;
  grid-template-columns:minmax(220px,1fr) auto;
  gap:9px;
  align-items:center;
}
.lesson-video-upload-row .muted{grid-column:1/-1}
.teacher-schedule-plan-no{
  margin-top:6px;
  color:#31546d;
  font-size:12px;
  font-weight:700;
}
.teacher-editable-link-row input:not([readonly]){background:#fff}
@media(max-width:620px){
  .lesson-link-edit-row,.lesson-video-upload-row{grid-template-columns:1fr}
  .lesson-link-edit-row .btn,.lesson-video-upload-row .btn{
    width:100%;
    text-align:center;
  }
}


/* v0.6.36 - предмет снаружи, номер и тема внутри карточки */


/* v0.6.37 - единая геометрия открывающихся карточек и форм */
:root{
  --dialog-control-height:44px;
  --dialog-field-gap:7px;
  --dialog-row-gap:16px;
  --dialog-column-gap:18px;
}

/* Однотипные поля во всех основных диалогах начинаются на одной высоте. */
.lesson-card-grid,
.lesson-change-grid,
.teacher-form-grid,
#work-dialog .work-form-grid,
.notification-form-grid,
.access-form-grid{
  align-items:start !important;
  row-gap:var(--dialog-row-gap) !important;
  column-gap:var(--dialog-column-gap) !important;
}

.lesson-card-grid>label,
.lesson-change-grid>label,
.teacher-form-grid>label:not(.check-label),
#work-dialog .work-form-grid>label:not(.work-checkbox),
.notification-form-grid>label:not(.check-label),
.access-form-grid>label:not(.check-label){
  display:grid !important;
  align-self:start !important;
  justify-self:stretch !important;
  margin:0 !important;
  gap:var(--dialog-field-gap) !important;
  min-width:0 !important;
}

.field-caption{
  display:flex;
  align-items:flex-end;
  min-height:20px;
  margin:0;
  padding:0;
  line-height:1.25;
  font:inherit;
  color:inherit;
}

.lesson-card-grid input:not([type="checkbox"]):not([type="file"]),
.lesson-card-grid select,
.lesson-change-grid input:not([type="checkbox"]):not([type="file"]),
.lesson-change-grid select,
.teacher-form-grid input:not([type="checkbox"]):not([type="file"]),
.teacher-form-grid select,
#work-dialog .work-form-grid input:not([type="checkbox"]):not([type="file"]),
#work-dialog .work-form-grid select,
.notification-form-grid input:not([type="checkbox"]):not([type="file"]),
.notification-form-grid select,
.access-form-grid input:not([type="checkbox"]):not([type="file"]),
.access-form-grid select{
  height:var(--dialog-control-height) !important;
  min-height:var(--dialog-control-height) !important;
  max-height:var(--dialog-control-height) !important;
  margin:0 !important;
  box-sizing:border-box !important;
}

.lesson-link-edit-row{
  display:grid !important;
  grid-template-columns:minmax(0,1fr) auto !important;
  gap:10px !important;
  align-items:start !important;
}
.lesson-link-edit-row>.btn{
  min-height:var(--dialog-control-height) !important;
  height:var(--dialog-control-height) !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  margin:0 !important;
  box-sizing:border-box !important;
}
.lesson-link-edit-row>.btn.hidden{display:none !important}

.lesson-video-upload-row{
  display:grid !important;
  grid-template-columns:minmax(0,1fr) auto !important;
  gap:10px !important;
  align-items:start !important;
}
.lesson-video-upload-row input[type="file"]{
  min-height:var(--dialog-control-height) !important;
  box-sizing:border-box !important;
  margin:0 !important;
}
.lesson-video-upload-row>.btn{
  min-height:var(--dialog-control-height) !important;
  margin:0 !important;
}
.lesson-video-upload-row>.muted{
  grid-column:1/-1;
  margin-top:-3px;
}

.admin-lesson-context-section,
.admin-lesson-teacher-note{
  border:1px solid rgba(16,40,51,.12);
  border-radius:12px;
  background:#fff;
  padding:16px;
  box-sizing:border-box;
}
.admin-lesson-context-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:14px;
  margin-bottom:12px;
}
.admin-lesson-context-head h3,
.admin-lesson-teacher-note h3{
  margin:0 0 5px;
  font-size:16px;
  color:#213944;
}
.admin-lesson-context-head p{margin:0}
.admin-lesson-context-count{
  min-width:38px;
  height:38px;
  padding:0 10px;
  border-radius:999px;
  background:#eaf5f6;
  color:#31546d;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:800;
  box-sizing:border-box;
}
.admin-lesson-context-list{
  display:grid;
  gap:9px;
}
.admin-lesson-context-item,
.admin-lesson-grade-item{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:14px;
  padding:11px 12px;
  border:1px solid rgba(16,40,51,.10);
  border-radius:10px;
  background:#f9fbfc;
}
.admin-lesson-context-item>div:first-child,
.admin-lesson-grade-item>div:first-child{
  display:grid;
  gap:3px;
  min-width:0;
}
.admin-lesson-context-item span,
.admin-lesson-grade-item span,
.admin-lesson-context-item small,
.admin-lesson-grade-item small{
  color:#5c717c;
}
.admin-lesson-context-badges{
  display:flex;
  flex-wrap:wrap;
  justify-content:flex-end;
  gap:6px;
  flex:0 0 auto;
}
.badge.danger-soft{
  background:#fff0ed;
  color:#a44332;
}
.admin-lesson-grade-item>b{
  min-width:38px;
  height:38px;
  padding:0 8px;
  border-radius:9px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:#eaf5f6;
  color:#213944;
  font-size:17px;
}
.admin-lesson-teacher-note>div{
  white-space:pre-wrap;
  color:#31546d;
}

@media(max-width:620px){
  .lesson-link-edit-row,
  .lesson-video-upload-row{
    grid-template-columns:1fr !important;
  }
  .lesson-link-edit-row>.btn,
  .lesson-video-upload-row>.btn{
    width:100% !important;
  }
  .admin-lesson-context-head,
  .admin-lesson-context-item,
  .admin-lesson-grade-item{
    align-items:flex-start;
    flex-direction:column;
  }
  .admin-lesson-context-badges{justify-content:flex-start}
}

/* v0.6.37 - однотипная геометрия для остальных диалогов со stack-полями */
dialog form .stack{
  align-items:start !important;
  gap:var(--dialog-row-gap) !important;
}
dialog form .stack>label:not(.check-label){
  align-self:start !important;
  margin:0 !important;
  gap:var(--dialog-field-gap) !important;
  min-width:0 !important;
}
dialog form .stack input:not([type="checkbox"]):not([type="file"]),
dialog form .stack select{
  width:100% !important;
  height:var(--dialog-control-height) !important;
  min-height:var(--dialog-control-height) !important;
  max-height:var(--dialog-control-height) !important;
  margin:0 !important;
  box-sizing:border-box !important;
}
dialog form .stack textarea{
  width:100% !important;
  margin:0 !important;
  box-sizing:border-box !important;
  resize:vertical;
}
.work-message-form label{
  display:grid;
  gap:var(--dialog-field-gap);
  align-self:start;
  margin:0;
}
.work-message-form textarea,
.work-message-form input[type="file"]{
  width:100%;
  box-sizing:border-box;
  margin:0;
}
.student-year-picker select{
  min-height:var(--dialog-control-height) !important;
  height:var(--dialog-control-height) !important;
  box-sizing:border-box;
  margin:0 !important;
}

.teacher-readonly-link-row{
  align-items:start !important;
}
.teacher-readonly-link-row input:not([type="checkbox"]),
.teacher-readonly-link-row .btn{
  min-height:var(--dialog-control-height) !important;
  height:var(--dialog-control-height) !important;
  box-sizing:border-box !important;
  margin:0 !important;
}
.teacher-readonly-link-row .btn{
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
}
.teacher-readonly-link-row .btn.hidden{display:none !important}

/* v0.6.38 - единая логика поиска и безопасного удаления у преподавателя */
.teacher-toolbar .btn{
  min-height:42px;
  box-sizing:border-box;
}
.teacher-filter-actions{
  display:flex;
  align-items:flex-end;
  gap:8px;
  min-height:100%;
}
.teacher-filter-actions .btn{
  min-height:42px;
}
.teacher-danger-btn{
  border-color:rgba(164,71,71,.35) !important;
  color:#8f3f3f !important;
  background:#fffafa !important;
}
.teacher-danger-btn:hover{
  background:#fff2f2 !important;
}
.teacher-incoming-filters{
  margin-bottom:14px;
}
@media (max-width:900px){
  .teacher-filter-actions{
    grid-column:1/-1;
  }
}
.admin-lesson-grade-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
  flex-wrap:wrap;
}
.admin-lesson-grade-actions>b{
  min-width:38px;
  height:38px;
  padding:0 8px;
  border-radius:9px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:#eaf5f6;
  color:#213944;
  box-sizing:border-box;
}

/* v0.6.39 - коммуникация преподавателя с обучающимися */
.teacher-bulk-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 12px 0;
  min-height: 42px;
}
.teacher-select-col {
  width: 42px;
  min-width: 42px;
  text-align: center !important;
  vertical-align: middle !important;
}
.teacher-select-col input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
  vertical-align: middle;
}
.teacher-message-recipient-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 76px;
  padding: 14px 16px;
  border: 1px solid var(--border, #d9e3e8);
  border-radius: 12px;
  background: #f7fafb;
  box-sizing: border-box;
}
.teacher-message-history-body {
  max-width: 360px;
  white-space: pre-wrap;
  line-height: 1.45;
}
#teacher-message-dialog .teacher-form-grid > label,
#teacher-message-dialog .teacher-message-recipient-card {
  align-self: stretch;
}
#teacher-message-dialog input,
#teacher-message-dialog select {
  min-height: 44px;
  box-sizing: border-box;
}
#teacher-message-dialog textarea {
  box-sizing: border-box;
  width: 100%;
}
@media (max-width: 760px) {
  .teacher-bulk-actions {
    align-items: stretch;
  }
  .teacher-bulk-actions .btn {
    width: 100%;
  }
}


/* v0.6.40 - строка email-адресов получателей перед отправкой */
.teacher-message-recipient-top {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}
.teacher-message-to-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  width: 100%;
  margin-top: 8px;
  white-space: nowrap;
}
.teacher-message-to-row > strong {
  flex: 0 0 auto;
}
#teacher-message-to-emails {
  display: block;
  min-width: 0;
  flex: 1 1 auto;
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  padding-bottom: 3px;
  scrollbar-width: thin;
}


/* v0.6.41 - рабочая область преподавателя для администратора и архив */
.admin-teacher-workspace-banner{
  display:flex;align-items:center;justify-content:space-between;gap:18px;
  padding:16px 18px;margin:0 0 18px;border:1px solid rgba(47,143,157,.28);
  background:#eef8f8;border-radius:14px;box-sizing:border-box;
}
.admin-teacher-workspace-banner>div{display:flex;flex-direction:column;gap:5px;min-width:0}
.admin-teacher-workspace-banner strong{color:#173642;font-size:16px}
.admin-teacher-workspace-banner span{color:#5c717c;font-size:13px}
.teacher-login-state{margin-top:5px;font-size:12px}
.teacher-archive-tag{background:#f4eeee!important;color:#7b5555!important}
.teacher-admin-actions{min-width:210px}
.teacher-archive-toggle{align-self:center;margin:0}
.teacher-transfer-dialog{width:min(720px,calc(100vw - 32px))}
.teacher-transfer-assignment-list{display:flex;flex-direction:column;gap:8px}
.teacher-transfer-assignment{display:flex!important;align-items:center!important;gap:10px;min-height:42px;padding:9px 12px;border:1px solid var(--border,#d9e3e8);border-radius:10px;background:#fafcfd;box-sizing:border-box}
.teacher-transfer-assignment input{width:18px!important;height:18px!important;min-height:18px!important;margin:0!important;flex:0 0 auto}
.teacher-transfer-grid{align-items:start}
.teacher-transfer-grid>label{align-self:start}
.teacher-transfer-grid input,.teacher-transfer-grid select{height:44px!important;min-height:44px!important;box-sizing:border-box!important}
.teacher-transfer-archive-row{align-items:flex-start!important}
@media(max-width:760px){.admin-teacher-workspace-banner{flex-direction:column;align-items:stretch}.admin-teacher-workspace-banner .btn{width:100%}}


/* v0.6.43 - scoped lists and audit */
.work-scope-toolbar,
.notification-scope-toolbar{
  border-radius:12px;
  align-items:center;
}
.work-scope-toolbar select,
.notification-scope-toolbar select{
  height:40px;
  min-height:40px;
}
.notification-scope-panel{max-width:none;margin-bottom:16px}
.notification-scope-panel .toolbar{border:0;padding:0;background:transparent}
.audit-toolbar{border:0;padding:0;background:transparent;align-items:end}
.audit-toolbar .compact-field{min-width:150px}
.audit-toolbar .compact-field input,
.audit-toolbar .compact-field select{width:100%;height:40px;min-height:40px}
.audit-toolbar .audit-search-field{min-width:250px;flex:1 1 250px}
.audit-table{min-width:1250px}
.audit-id{max-width:180px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.audit-change-details{margin-top:6px;max-width:320px}
.audit-change-details summary{cursor:pointer;color:#237d89;font-weight:700}
.audit-change-details pre{white-space:pre-wrap;word-break:break-word;max-height:180px;overflow:auto;background:#f6f9fa;border:1px solid var(--border);border-radius:8px;padding:8px;font-size:11px}
@media(max-width:760px){
  .work-scope-toolbar select,.work-scope-toolbar .btn,
  .notification-scope-toolbar select,.notification-scope-toolbar .btn{width:100%}
  .audit-toolbar .compact-field,.audit-toolbar .audit-search-field,.audit-toolbar .btn{width:100%;min-width:0}
}

/* v0.6.45 - карточка контингента с представителями и права администрации */
.student-entity-dialog{
  width:min(1040px,calc(100vw - 32px));
}
.student-main-fields,
.embedded-guardian-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px 16px;
  align-items:start;
}
.student-main-fields>label,
.embedded-guardian-grid>label{
  display:grid;
  grid-template-rows:auto 44px;
  gap:7px;
  align-items:start;
  margin:0;
}
.student-main-fields input,
.student-main-fields select,
.embedded-guardian-grid input,
.embedded-guardian-grid select{
  width:100%;
  min-height:44px;
  box-sizing:border-box;
}
.embedded-guardians-section{
  margin-top:18px;
  display:grid;
  gap:14px;
}
.embedded-guardian-title{
  display:flex;
  flex-direction:column;
  gap:4px;
}
.embedded-guardian-card{
  border:1px solid rgba(16,40,51,.14);
  border-radius:14px;
  padding:16px;
  background:rgba(109,169,216,.06);
}
.embedded-guardian-head{
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:flex-start;
  margin-bottom:12px;
}
#access-staff-position{
  margin-top:14px;
}
#access-staff-position>label{
  max-width:620px;
}
@media (max-width:760px){
  .student-main-fields,
  .embedded-guardian-grid{grid-template-columns:1fr;}
  .embedded-guardian-head{flex-direction:column;}
}


/* v0.6.45 - выход со страницы обязательной смены пароля */
.change-password-exit-form{margin-top:12px;}
.change-password-exit-form .btn{width:100%;}


/* v0.6.46 - индивидуальный маршрут учебных получателей */
.contact-recipient-setting{align-items:center;gap:12px;flex-wrap:wrap}
.contact-recipient-setting>div{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.contact-recipient-setting select{min-width:280px}
@media(max-width:720px){.contact-recipient-setting>div{width:100%}.contact-recipient-setting select{min-width:0;width:100%}}


/* v0.6.47 - правила эскалации учебных уведомлений */
.notification-threshold{min-width:92px;max-width:120px;height:42px;}
.notification-escalation-example{margin:14px 0 18px;padding:12px 14px;border:1px solid rgba(16,40,51,.12);border-radius:12px;background:rgba(109,169,216,.10);line-height:1.5;}
.notification-attendance-note{margin-top:18px;}
.student-auto-recipient-note{grid-column:1/-1;padding:12px 14px;border-radius:12px;background:rgba(142,216,198,.15);border:1px solid rgba(47,143,157,.18);line-height:1.45;}
.notification-rules-table th,.notification-rules-table td{vertical-align:top;}

/* v0.6.48 - распознавание импорта контингента без обязательных заголовков */
.import-recognition-note{
  grid-column:1 / -1;
  padding:12px 14px;
  border:1px solid rgba(47,143,157,.28);
  border-radius:12px;
  background:rgba(142,216,198,.12);
  line-height:1.45;
}
.import-recognition-note div{margin-top:4px;color:var(--muted,#5c717c);}

/* v0.6.51 - диагностика SMTP и безопасная проверка правил уведомлений */
.smtp-diagnostic-state{margin-top:4px}
.smtp-diagnostic-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.smtp-diagnostic-card{display:flex;flex-direction:column;gap:5px;min-height:82px;padding:12px 14px;border:1px solid var(--border);border-radius:12px;background:#f8fbfc}
.smtp-diagnostic-card strong{font-size:13px;color:var(--muted)}
.smtp-diagnostic-card span{font-weight:700}
.smtp-diagnostic-card small{color:var(--muted);overflow-wrap:anywhere}
.smtp-diagnostic-card.ok{border-left:4px solid #2f8f9d;background:#f3fbf8}
.smtp-diagnostic-card.bad{border-left:4px solid #b65a5a;background:#fff6f6}
.smtp-diagnostic-card.neutral{border-left:4px solid #d3a238;background:#fffaf0}
.smtp-diagnostic-message{margin-top:7px;overflow-wrap:anywhere}
.notification-preview-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px 18px}
.notification-preview-grid label{display:flex;flex-direction:column;gap:7px;font-weight:700;min-width:0}
.notification-preview-grid input,.notification-preview-grid select{width:100%;min-height:44px;box-sizing:border-box}
@media(max-width:760px){.smtp-diagnostic-grid,.notification-preview-grid{grid-template-columns:1fr}}


/* v0.6.52 - проверка правила: собственная активная область выбора предмета/класса/обучающегося внутри dialog */
#notification-rule-preview-dialog .notification-preview-grid select:disabled{opacity:.68;cursor:not-allowed;}
#notification-rule-preview-dialog .notification-preview-grid label{align-self:start;}

/* v0.6.59 - кабинет обучающегося: рабочее окно заданий */
.student-work-panel{margin-top:18px}.student-work-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}.student-work-head h2{margin:0 0 6px}.student-work-list{display:grid;gap:12px;margin-top:16px}.student-work-card{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:16px 18px;border:1px solid var(--border,#dce6eb);border-radius:16px;background:linear-gradient(180deg,#fff,#f6fafc)}.student-work-card-main{min-width:0}.student-work-card-top{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.student-work-card h3{margin:8px 0 6px;font-size:17px}.student-work-card-meta{display:flex;flex-wrap:wrap;gap:5px 14px;color:#5c717c;font-size:13px}.student-work-dialog{max-width:920px}.student-work-condition{padding:18px;border:1px solid rgba(16,40,51,.12);border-radius:16px;background:linear-gradient(180deg,#fff,#f7fbfd);margin-bottom:14px}.student-work-condition h3{margin:0 0 12px;font-size:17px}.student-work-prose{color:#425c68;line-height:1.65}.student-work-materials,.student-work-file-list{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}.student-work-submit-form{display:grid;gap:14px}.student-work-submit-form label{display:grid;gap:7px}.student-work-last-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.student-work-last-grid>div{padding:12px 14px;border-radius:12px;background:#eef6f9;display:grid;gap:4px}.student-work-last-grid span{color:#5c717c}.student-work-teacher-comment{margin-top:12px;padding:13px 15px;border-left:4px solid #2f8f9d;border-radius:12px;background:#edf8f5}.student-work-teacher-comment p{margin:7px 0 0}.student-work-actions{padding:0;margin-top:2px}
@media(max-width:720px){.student-work-head,.student-work-card{align-items:stretch;flex-direction:column}.student-work-card>.btn{width:100%}.student-work-last-grid{grid-template-columns:1fr}}

/* v0.6.59 - Объявления */
.announcement-audience-box{align-self:stretch;padding:14px 15px;border:1px solid var(--line,#d9e4ea);border-radius:12px;background:#f8fbfd;}
.announcement-audience-box>strong{display:block;margin-bottom:10px;color:#244b5a;font-size:13px;}
.announcement-check-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 12px;max-height:190px;overflow:auto;padding-right:4px;}
.announcement-check-grid label{display:flex;align-items:flex-start;gap:8px;min-width:0;margin:0;padding:8px 9px;border:1px solid rgba(49,84,109,.12);border-radius:10px;background:#fff;font-size:13px;line-height:1.4;cursor:pointer;}
.announcement-check-grid input{width:auto;min-height:0;margin-top:2px;flex:0 0 auto;}
.announcement-table-image{width:76px;height:48px;margin:0 0 7px;overflow:hidden;border:1px solid rgba(49,84,109,.12);border-radius:9px;background:#eef5f8;}
.announcement-table-image img{display:block;width:100%;height:100%;object-fit:cover;}
@media(max-width:720px){.announcement-check-grid{grid-template-columns:1fr;}}

/* v0.6.63 - выбор даты/времени объявления (унаследовано из v0.6.62) */
.announcement-date-field{align-self:stretch;min-width:0}
.announcement-date-field>.field-caption{display:block;margin-bottom:6px;color:#244b5a;font-size:13px}
.announcement-date-row{display:grid;grid-template-columns:minmax(0,1fr) 126px;gap:10px;align-items:end}
.announcement-date-row label{min-width:0;margin:0}
.announcement-date-row input[type="date"],.announcement-date-row input[type="time"]{width:100%}
@media(max-width:720px){.announcement-date-row{grid-template-columns:1fr 110px}}


/* v0.6.63 - сводное расписание и создание урока из пустой клетки */
.schedule-v063-heading{align-items:flex-start;gap:18px}
.schedule-v063-view-switch{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.schedule-v063-common-toolbar{margin-top:14px}
.schedule-v063-area{margin-top:16px}
.schedule-v063-board-tools{display:grid;grid-template-columns:repeat(3,minmax(170px,1fr)) auto;gap:10px;align-items:end;margin-bottom:12px;padding:12px;border:1px solid var(--line,#dce5e9);border-radius:14px;background:#f8fbfc}
.schedule-v063-board-tools label{display:grid;gap:6px;font-size:13px;color:#5c717c}
.schedule-v063-board-tools select{width:100%;min-height:40px;border:1px solid #cfdce2;border-radius:9px;background:#fff;padding:7px 9px}
.schedule-v063-check{display:flex!important;align-items:center;gap:7px;min-height:40px;color:#213944!important}
.schedule-v063-day-tabs{display:flex;gap:8px;flex-wrap:wrap;margin:8px 0 12px}
.schedule-v063-day-tabs button{display:grid;gap:2px;min-width:125px;padding:9px 12px;border:1px solid #cfdce2;border-radius:10px;background:#eef4f7;color:#31546d;text-align:left}
.schedule-v063-day-tabs button span{font-size:12px;color:#6b7f89}
.schedule-v063-day-tabs button.active{border-color:#2f8f9d;background:#e6f5f2;color:#173642}
.schedule-v063-day-tabs button.schedule-v063-add-saturday{border-style:dashed;align-content:center;text-align:center}
.schedule-v063-table-wrap{max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}
.schedule-v063-board-grid{width:max-content;min-width:100%;border-collapse:separate;border-spacing:0;table-layout:auto}
.schedule-v063-board-grid th,.schedule-v063-board-grid td{border-right:1px solid #dce5e9;border-bottom:1px solid #dce5e9;vertical-align:top}
.schedule-v063-board-grid thead th{padding:10px;background:#eaf4f7;color:#173642;text-align:left;position:sticky;top:0;z-index:2}
.schedule-v063-board-grid thead th:first-child{left:0;z-index:4;width:122px;min-width:122px}.schedule-v063-board-grid thead th:not(:first-child),.schedule-v063-board-grid tbody td{width:230px;min-width:230px}
.schedule-v063-board-grid tbody th{position:sticky;left:0;z-index:3;width:122px;min-width:122px;padding:10px;background:#f7fafb;color:#173642;text-align:left}
.schedule-v063-board-grid tbody th span{display:block;margin-top:5px;font-size:11px;font-weight:400;color:#6b7f89}
.schedule-v063-board-grid td{height:118px;padding:6px;background:#fff}
.schedule-v063-board-card{display:block;width:100%;margin:0 0 6px;padding:9px;border:1px solid rgba(49,84,109,.18);border-radius:10px;background:#f7fbfc;color:#213944;text-align:left}
.schedule-v063-board-card:hover{border-color:#2f8f9d;background:#f0f9f8}
/* v0.6.64 - электронное обучение в сводной ведомости заметно темнее обычного урока */
.schedule-v063-board-card.electronic{
  background:#dfeceb;
  border-color:rgba(49,111,116,.48);
  box-shadow:inset 4px 0 0 #4f7f84;
}
.schedule-v063-board-card.electronic:hover{
  background:#d4e6e4;
  border-color:#3f777c;
}
.schedule-v064-learning-mode{
  margin-top:5px !important;
  color:#3d696d !important;
  font-weight:700;
}
.schedule-v063-board-card.inactive{border-color:rgba(182,93,75,.28);background:#fff4f0}
.schedule-v063-board-card.electronic.inactive,
.schedule-v063-board-card.electronic.inactive:hover{
  border-color:rgba(182,93,75,.38);
  background:#fff4f0;
  box-shadow:inset 4px 0 0 #b65d4b;
}
.schedule-v063-board-card strong,.schedule-v063-board-card span,.schedule-v063-board-card small{display:block}
.schedule-v063-board-card strong{color:#173642}
.schedule-v063-board-card .schedule-v063-teacher{margin-top:5px;font-size:12px;color:#31546d}
.schedule-v063-board-card small{margin-top:4px;color:#6b7f89}
.schedule-v063-marks{display:flex!important;gap:4px;flex-wrap:wrap;margin-top:7px}
.schedule-v063-change-mark,.schedule-v063-danger-mark{display:inline-flex!important;width:auto;padding:3px 6px;border-radius:999px;font-size:10px}
.schedule-v063-change-mark{background:#fff0cc;color:#7a591d}.schedule-v063-danger-mark{background:#ffe4dc;color:#85473b}
.schedule-v063-empty-btn{display:flex;width:100%;min-height:92px;align-items:center;justify-content:center;padding:8px;border:1px dashed rgba(47,143,157,.35);border-radius:9px;background:#fbfefe;color:#6f9098;text-align:center}
.schedule-v063-empty-btn:hover{border-color:#2f8f9d;background:#edf8f6;color:#2f8f9d}
.schedule-v063-hidden-busy{display:flex;min-height:92px;align-items:center;justify-content:center;padding:8px;color:#85969e;font-size:12px;text-align:center}
.schedule-empty-cell .schedule-v063-empty-btn{min-height:78px}
.schedule-create-dialog .lesson-card-grid{grid-template-columns:1fr 1fr}
.schedule-create-dialog .span-2{grid-column:1/-1}
@media(max-width:900px){.schedule-v063-board-tools{grid-template-columns:1fr 1fr}.schedule-v063-view-switch{justify-content:flex-start}}
@media(max-width:620px){.schedule-v063-board-tools{grid-template-columns:1fr}.schedule-create-dialog .lesson-card-grid{grid-template-columns:1fr}.schedule-create-dialog .span-2{grid-column:auto}.schedule-v063-day-tabs button{min-width:calc(50% - 4px)}}

/* v0.6.63 - загрузка расписания находится только в разделе «Импорт» */
.import-grid .schedule-import-card-wide{
  grid-column:1 / -1;
}
.schedule-import-preview-in-import{
  margin-top:18px;
  padding-top:16px;
  border-top:1px solid var(--border);
}
.schedule-import-preview-panel{
  margin-top:12px;
}
.schedule-import-preview-panel h3{
  margin:0 0 6px;
  color:var(--dark);
}
@media(max-width:850px){
  .import-grid .schedule-import-card-wide{
    grid-column:auto;
  }
}


/* v0.6.63 fix - компактный импорт расписания без выхода за границы */
.import-grid .schedule-import-card-wide{
  grid-column:1 / -1;
  width:100%;
  min-width:0;
  max-width:none;
}
.schedule-import-main{
  width:100%;
  min-width:0;
  max-width:none;
}
.schedule-import-form.schedule-import-form-compact{
  display:block !important;
  width:100%;
  min-width:0;
  margin-top:16px;
}
.schedule-import-fields{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px 16px;
  width:100%;
  min-width:0;
}
.schedule-import-fields label{
  display:flex !important;
  flex-direction:column;
  gap:6px !important;
  min-width:0;
  margin:0;
  color:#49616d;
  font-size:13px;
  font-weight:700;
}
.schedule-import-fields input,
.schedule-import-fields select{
  display:block;
  width:100% !important;
  min-width:0 !important;
  max-width:100% !important;
  min-height:44px !important;
  height:auto !important;
  margin:0 !important;
  box-sizing:border-box;
}
.schedule-import-fields input[type="file"]{
  padding:7px 8px;
  overflow:hidden;
  background:#fff;
}
.schedule-import-fields input[type="file"]::file-selector-button{
  min-height:30px;
  margin:-2px 10px -2px -2px;
  padding:6px 11px;
  border:1px solid #c6d6dc;
  border-radius:7px;
  background:#eef5f7;
  color:#244b5a;
  font-weight:700;
  cursor:pointer;
}
.schedule-import-file-wide{
  grid-column:1 / -1 !important;
}
.schedule-import-actions{
  display:grid;
  grid-template-columns:minmax(0,1fr);
  gap:7px;
  width:100%;
  min-width:0;
  margin-top:16px;
}
.schedule-import-form.schedule-import-form-compact .schedule-import-submit{
  display:block;
  width:100% !important;
  min-width:0 !important;
  min-height:48px !important;
  height:auto !important;
  margin:0 !important;
  padding:11px 16px !important;
  white-space:normal !important;
  text-align:center;
}
.schedule-import-form.schedule-import-form-compact .field-help{
  display:block;
  min-height:0;
  color:#6b7f89;
  font-size:12px;
  font-weight:400;
  line-height:1.4;
}
.schedule-import-preview-in-import,
.schedule-import-preview-panel,
.schedule-import-preview-panel .table-wrap{
  width:100%;
  min-width:0;
  max-width:100%;
}
.schedule-import-preview-panel .table-wrap{
  overflow-x:auto;
}
#schedule-confirm-btn{
  flex:0 0 auto;
  max-width:100%;
  white-space:normal;
}
@media(max-width:760px){
  .schedule-import-fields{
    grid-template-columns:1fr;
  }
  .schedule-import-file-wide{
    grid-column:auto !important;
  }
  .schedule-import-preview-panel .panel-head-inline{
    align-items:stretch;
    flex-direction:column;
  }
  #schedule-confirm-btn{
    width:100%;
  }
}


/* v0.6.63 - импорт поурочного планирования снова виден по каждому предмету */
.lesson-plan-import-card-wide{grid-column:1 / -1;min-width:0}
.lesson-plan-import-registry-toolbar{
  display:grid;
  grid-template-columns:minmax(220px,1fr) minmax(180px,.7fr) auto;
  gap:12px;
  align-items:end;
  margin-top:14px;
}
.lesson-plan-import-registry-toolbar .import-field{min-width:0}
.lesson-plan-import-summary{margin-top:14px}
.lesson-plan-import-registry-wrap{margin-top:14px;max-width:100%}
.lesson-plan-import-registry-table{width:100%;min-width:820px}
.lesson-plan-import-registry-table th:last-child,
.lesson-plan-import-registry-table td:last-child{width:170px;text-align:right}
.lesson-plan-import-registry-table td:nth-child(1){min-width:180px}
.lesson-plan-import-registry-table td:nth-child(3){min-width:240px;white-space:normal}
.lesson-plan-import-help{display:block;margin-top:12px}
@media(max-width:900px){
  .lesson-plan-import-registry-toolbar{grid-template-columns:1fr 1fr}
  .lesson-plan-import-registry-toolbar .btn{grid-column:1 / -1;width:100%}
}
@media(max-width:600px){
  .lesson-plan-import-registry-toolbar{grid-template-columns:1fr}
  .lesson-plan-import-registry-toolbar .btn{grid-column:auto}
}

/* v0.6.65 - читаемый импорт расписания и прямое поурочное планирование по предметам */
.schedule-import-form.schedule-import-form-v065{
  display:grid !important;
  grid-template-columns:1fr !important;
  gap:16px !important;
  width:100% !important;
  min-width:0 !important;
  margin-top:16px !important;
}
.schedule-import-step{
  width:100%;
  min-width:0;
  padding:18px;
  border:1px solid var(--border);
  border-radius:14px;
  background:#f9fcfd;
}
.schedule-import-step-head{
  display:flex;
  align-items:flex-start;
  gap:12px;
  margin-bottom:15px;
}
.schedule-import-step-head>div{min-width:0}
.schedule-import-step-head h3{
  margin:1px 0 4px;
  color:var(--dark);
  font-size:17px;
}
.schedule-import-step-head p{margin:0}
.schedule-import-step-no{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex:0 0 30px;
  width:30px;
  height:30px;
  border-radius:50%;
  background:#31546d;
  color:#fff;
  font-weight:700;
}
.schedule-import-params{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px 16px;
  min-width:0;
}
.schedule-import-params label,
.schedule-import-file-box{
  display:flex !important;
  flex-direction:column;
  gap:6px !important;
  min-width:0;
  color:#49616d;
  font-size:13px;
  font-weight:700;
}
.schedule-import-params input,
.schedule-import-params select,
.schedule-import-file-box input{
  width:100% !important;
  min-width:0 !important;
  max-width:100% !important;
  min-height:44px !important;
  box-sizing:border-box;
  margin:0 !important;
}
.schedule-import-file-step{
  background:#f3f9fb;
}
.schedule-import-file-box{
  padding:14px;
  border:1px dashed #9bb7c3;
  border-radius:11px;
  background:#fff;
}
.schedule-import-file-box input[type="file"]{
  padding:8px;
  height:auto !important;
  background:#fff;
}
.schedule-import-file-box input[type="file"]::file-selector-button{
  min-height:34px;
  margin-right:10px;
  padding:7px 12px;
  border:1px solid #c6d6dc;
  border-radius:8px;
  background:#eef5f7;
  color:#244b5a;
  font-weight:700;
  cursor:pointer;
}
.schedule-import-form-v065 .schedule-import-submit{
  display:block !important;
  width:100% !important;
  min-height:48px !important;
  margin-top:12px !important;
  white-space:normal !important;
}

.lesson-plan-import-registry-table{min-width:980px}
.lesson-plan-import-registry-table th:last-child,
.lesson-plan-import-registry-table td:last-child{
  width:260px;
  min-width:260px;
  text-align:left;
}
.lesson-plan-import-action-cell .btn{
  width:100%;
  min-height:42px;
  white-space:normal;
  line-height:1.3;
}
.import-lesson-plan-dialog{
  width:min(1080px,calc(100vw - 36px)) !important;
  max-width:1080px !important;
  max-height:calc(100vh - 36px) !important;
  margin:auto !important;
  padding:0 !important;
  border:0 !important;
  border-radius:16px !important;
  overflow:hidden !important;
  background:#fff !important;
  box-shadow:0 22px 70px rgba(16,40,51,.28) !important;
}
.import-lesson-plan-dialog::backdrop{
  background:rgba(16,40,51,.46);
  backdrop-filter:blur(2px);
}
.import-lesson-plan-dialog .dialog-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  padding:20px 24px 16px;
  border-bottom:1px solid var(--border);
}
.import-lesson-plan-dialog .dialog-head>div{min-width:0}
.import-lesson-plan-dialog .dialog-head h2{
  margin:4px 0 5px;
  color:var(--dark);
  font-size:21px;
}
.import-lesson-plan-dialog .dialog-close{
  flex:0 0 38px;
  width:38px;
  height:38px;
  padding:0;
  border:1px solid var(--border);
  border-radius:9px;
  background:#f4f7f8;
  color:var(--dark);
  font-size:24px;
  line-height:1;
}
.import-lesson-plan-dialog-body{
  max-height:calc(100vh - 135px);
  padding:20px 24px 24px;
  overflow-y:auto;
  overflow-x:hidden;
}
.lesson-plan-direct-upload{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:12px;
  align-items:end;
  margin-bottom:14px;
  padding:15px;
  border:1px solid var(--border);
  border-radius:12px;
  background:#f8fbfc;
}
.lesson-plan-direct-file{
  display:flex;
  flex-direction:column;
  gap:6px;
  min-width:0;
  color:#49616d;
  font-size:13px;
  font-weight:700;
}
.lesson-plan-direct-file input[type="file"]{
  width:100%;
  min-width:0;
  min-height:44px;
  padding:7px;
  border:1px solid var(--border);
  border-radius:9px;
  background:#fff;
}
.lesson-plan-direct-check,
.lesson-plan-direct-rows{
  margin-top:16px;
}
.lesson-plan-direct-check h3,
.lesson-plan-direct-rows h3{
  margin:0 0 8px;
  color:var(--dark);
}
.lesson-plan-direct-check .table-wrap,
.lesson-plan-direct-rows .table-wrap{
  max-width:100%;
  overflow-x:auto;
}

@media(max-width:760px){
  .schedule-import-params{grid-template-columns:1fr}
  .schedule-import-step{padding:14px}
  .lesson-plan-direct-upload{grid-template-columns:1fr}
  .lesson-plan-direct-upload .btn{width:100%}
  .import-lesson-plan-dialog{
    width:calc(100vw - 18px) !important;
    max-width:calc(100vw - 18px) !important;
    max-height:calc(100vh - 18px) !important;
  }
  .import-lesson-plan-dialog .dialog-head,
  .import-lesson-plan-dialog-body{
    padding-left:16px;
    padding-right:16px;
  }
}

/* v0.6.70 - отменённый урок освобождает клетку сводного расписания */
.schedule-v070-cell-free{background:#fbfefe!important}
.schedule-v063-empty-btn.schedule-v070-free-slot{
  min-height:92px;
  border-width:2px;
  border-color:rgba(47,143,157,.5);
  background:#f2faf8;
  color:#315f67;
  font-weight:700;
}
.schedule-v063-empty-btn.schedule-v070-free-slot:hover{
  border-color:#2f8f9d;
  background:#e7f6f2;
  color:#236f79;
}
.schedule-v070-inactive-history{
  display:flex;
  width:100%;
  align-items:center;
  gap:7px;
  margin-top:6px;
  padding:6px 8px;
  border:1px solid rgba(182,93,75,.2);
  border-radius:8px;
  background:#fff8f5;
  color:#79574f;
  text-align:left;
  font-size:11px;
}
.schedule-v070-inactive-history span{
  flex:0 0 auto;
  padding:2px 5px;
  border-radius:999px;
  background:#ffe8e1;
  color:#87483d;
  font-weight:700;
}
.schedule-v070-inactive-history strong{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  color:#715a54;
  font-size:11px;
}

/* v0.6.83 - фотографии обучающихся */
.student-photo-panel{display:flex;gap:18px;align-items:center;margin:0 0 18px;padding:14px 16px;border:1px solid var(--line);border-radius:14px;background:#f8fbfc}
.student-photo-frame,.teacher-student-photo-frame{width:96px;height:120px;flex:0 0 96px;border-radius:12px;overflow:hidden;background:#e8f1f4;border:1px solid var(--line);display:flex;align-items:center;justify-content:center;color:var(--muted);font-size:13px}
.student-photo-frame img,.teacher-student-photo-frame img{width:100%;height:100%;object-fit:cover;display:block}
.student-photo-actions{display:grid;gap:8px;min-width:0}.student-photo-actions input[type=file]{max-width:420px}
.student-personal-file-actions{display:flex;flex-direction:column;gap:10px;margin-left:auto;align-self:flex-start;min-width:190px}
.student-personal-file-actions .student-action-title{font-size:14px;color:#31546d;margin-bottom:2px}
.student-personal-file-actions .btn{white-space:normal}
@media(max-width:700px){.student-photo-panel{flex-wrap:wrap}.student-personal-file-actions{width:100%;margin-left:0;flex-direction:row;flex-wrap:wrap}.student-personal-file-actions .btn{flex:1 1 170px}}
.teacher-student-identity{display:flex;align-items:center;gap:14px;margin:0 0 16px;padding:12px;border:1px solid var(--line);border-radius:12px;background:#f8fbfc}
.teacher-student-photo-frame{width:78px;height:98px;flex-basis:78px}
.teacher-assignment-groups{display:grid;gap:7px}.teacher-assignment-grade{padding:7px 9px;border-radius:9px;background:#f4f8fa;border:1px solid var(--line)}.teacher-assignment-grade>strong{display:block;margin-bottom:4px;color:var(--dark)}.teacher-assignment-line{font-size:13px;line-height:1.45}.teacher-assignment-groups .muted{font-size:12px}
@media(max-width:700px){.student-photo-panel{align-items:flex-start}.student-photo-frame{width:78px;height:98px;flex-basis:78px}}

.teacher-student-list-person{display:flex;align-items:center;gap:9px}.teacher-student-list-photo{width:38px;height:46px;flex:0 0 38px;border-radius:7px;object-fit:cover;border:1px solid var(--line);background:#eef4f6}.teacher-student-list-photo-empty{display:flex;align-items:center;justify-content:center;font-size:9px;color:var(--muted)}
.student-list-person{display:flex;align-items:center;gap:9px}.student-list-photo{width:36px;height:44px;flex:0 0 36px;border-radius:7px;object-fit:cover;border:1px solid var(--line);background:#eef4f6}.student-list-photo-empty{display:flex;align-items:center;justify-content:center;color:var(--muted);font-size:9px}

/* ==========================================================================
   v0.6.85 - единый дизайн административной панели и кабинета преподавателя
   Визуальный язык страницы "Учебный день": мягкая сине-зелёная палитра,
   светлые поверхности, тонкие границы, спокойная типографика без тяжёлого
   жирного начертания.
   ========================================================================== */

:root{
  --dark:#102833;
  --soft:#173642;
  --dark-soft:#173642;
  --main:#31546d;
  --text:#213944;
  --muted:#5c717c;
  --teal:#2f8f9d;
  --mint:#8ed8c6;
  --sky:#6da9d8;
  --gold:#c69a49;
  --danger:#b65d4b;
  --border:rgba(16,40,51,.12);
  --line:rgba(16,40,51,.12);
  --bg:#eef6fb;
  --surface:#ffffff;
  --surface-soft:#f7fbfd;
  --surface-blue:#f3f8fc;
  --surface-mint:#f3fbf8;
  --shadow-soft:0 10px 28px rgba(16,40,51,.055);
  --shadow-dialog:0 24px 80px rgba(16,40,51,.26);
}

/* Общая типографика */
html{
  background:#eef6fb;
}
body,
button,
input,
select,
textarea,
table,
dialog{
  font-family:Arial,"Helvetica Neue",Helvetica,sans-serif !important;
}
body{
  color:var(--text);
  background:
    radial-gradient(circle at 96% 4%,rgba(109,169,216,.12),transparent 29%),
    radial-gradient(circle at 4% 94%,rgba(142,216,198,.13),transparent 28%),
    linear-gradient(180deg,#f2f8fc,#edf6fb) !important;
}
body *,
.portal-page *{
  font-weight:400;
}
h1,h2,h3,h4,h5,h6,
strong,b,
.card strong,
.portal-card strong,
.teacher-stat-card strong,
.teacher-schedule-summary strong,
.teacher-schedule-card-head strong{
  font-weight:500 !important;
}
h1,h2,h3,h4,h5,h6{
  letter-spacing:.005em;
}
.muted{
  color:var(--muted) !important;
}
.build-version-marker{
  display:none !important;
}

/* --------------------------- ADMIN: шапка --------------------------- */
.topbar{
  min-height:72px !important;
  height:auto !important;
  padding:12px 24px !important;
  color:var(--text) !important;
  background:
    radial-gradient(circle at 90% 8%,rgba(47,143,157,.09),transparent 35%),
    linear-gradient(180deg,#fff,#f4f9fc) !important;
  border-bottom:1px solid var(--border) !important;
  box-shadow:0 8px 24px rgba(16,40,51,.045);
}
.topbar>div:first-child{
  min-width:0;
}
.admin-brand{
  display:flex;
  align-items:center;
  gap:12px;
}
.admin-brand-logo{
  width:48px;
  height:48px;
  flex:0 0 48px;
  object-fit:contain;
  border-radius:6px;
  background:#fff;
  box-shadow:0 2px 8px rgba(16,40,51,.10);
}
.admin-brand-copy{
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:2px;
}
.admin-brand-copy span{
  margin-left:0 !important;
}
.topbar strong{
  color:var(--main) !important;
  font-size:19px !important;
  letter-spacing:.02em;
}
.topbar span{
  color:var(--muted) !important;
  opacity:1 !important;
  font-size:12.5px !important;
}
.topbar .btn.ghost{
  color:var(--main) !important;
  background:#eef4f7 !important;
  border-color:rgba(49,84,109,.16) !important;
}

/* --------------------------- ADMIN: каркас --------------------------- */
.layout{
  grid-template-columns:252px minmax(0,1fr) !important;
  min-height:calc(100vh - 72px) !important;
  background:transparent !important;
}
.sidebar{
  position:sticky;
  top:72px;
  align-self:start;
  height:calc(100vh - 72px);
  overflow-y:auto;
  padding:16px 12px 24px !important;
  background:rgba(255,255,255,.86) !important;
  border-right:1px solid var(--border) !important;
  backdrop-filter:blur(8px);
}
.nav,.nav-disabled{
  margin:0 0 4px !important;
  padding:10px 12px !important;
  min-height:40px;
  border:1px solid transparent !important;
  border-radius:10px !important;
  color:var(--text) !important;
  font-size:13.5px !important;
  line-height:1.35;
}
.nav:hover,
.sidebar .nav-priority:hover,
.sidebar .nav-priority-secondary:hover{
  color:var(--main) !important;
  background:#f1f7f9 !important;
  border-color:rgba(47,143,157,.10) !important;
}
.nav.active,
.nav.active:hover,
.sidebar .nav-priority.active,
.sidebar .nav-priority-secondary.active{
  color:var(--dark-soft) !important;
  background:#e6f5f2 !important;
  border-color:rgba(47,143,157,.21) !important;
  box-shadow:inset 3px 0 0 var(--teal);
  font-weight:500 !important;
}
.sidebar .nav-settings{
  margin-top:12px !important;
  padding-top:12px !important;
  border-top:1px solid var(--border) !important;
}
.content{
  width:100%;
  max-width:1680px;
  min-width:0;
  padding:24px 28px 54px !important;
  margin:0 auto;
}

/* --------------------------- ADMIN: заголовки страниц --------------------------- */
.page-head{
  position:relative;
  display:flex;
  align-items:center !important;
  justify-content:space-between;
  gap:20px;
  margin:0 0 16px !important;
  padding:20px 22px !important;
  overflow:hidden;
  border:1px solid var(--border);
  border-radius:18px;
  background:
    radial-gradient(circle at 94% 8%,rgba(47,143,157,.09),transparent 34%),
    linear-gradient(180deg,#fff,#f3f8fc);
  box-shadow:var(--shadow-soft);
}
.page-head:before{
  content:"";
  position:absolute;
  inset:0 auto 0 0;
  width:4px;
  background:linear-gradient(180deg,var(--sky),var(--teal));
}
.page-head>div:first-child{
  min-width:0;
}
.page-head h1,
h1{
  margin:0 0 6px !important;
  color:var(--main) !important;
  font-size:24px !important;
  line-height:1.28 !important;
}
.page-head p{
  max-width:960px;
  margin:0 !important;
  color:var(--muted) !important;
  font-size:13.5px !important;
  line-height:1.55 !important;
}
h2{
  color:var(--dark-soft) !important;
  font-size:19px !important;
  line-height:1.35;
}
h3{
  color:var(--dark-soft) !important;
  font-size:16px !important;
}

/* --------------------------- Карточки / панели --------------------------- */
.cards{
  gap:12px !important;
  margin-bottom:16px !important;
}
.card,
.panel,
.selector-panel,
.readiness-panel,
.curriculum-plan-meta,
.eligible-result{
  border:1px solid var(--border) !important;
  border-radius:16px !important;
  background:rgba(255,255,255,.91) !important;
  box-shadow:var(--shadow-soft) !important;
}
.card{
  position:relative;
  min-height:96px;
  padding:17px 18px !important;
  overflow:hidden;
}
.card:before{
  content:"";
  position:absolute;
  left:0;
  top:0;
  bottom:0;
  width:3px;
  background:linear-gradient(180deg,var(--sky),var(--mint));
}
.card strong{
  display:block;
  margin-bottom:4px;
  color:var(--main) !important;
  font-size:25px !important;
  line-height:1.15;
}
.card span{
  color:var(--muted) !important;
  font-size:12.5px !important;
}
.panel{
  padding:18px 20px !important;
}
.panel h2{
  margin:0 0 10px !important;
}
.panel p{
  color:var(--muted);
  font-size:13.5px;
  line-height:1.6;
}

/* --------------------------- Кнопки --------------------------- */
.btn,
.teacher-nav-btn,
.teacher-schedule-week-btn,
.teacher-small-btn,
.link-btn{
  font-weight:400 !important;
}
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:40px;
  padding:8px 13px !important;
  border:1px solid rgba(49,84,109,.16) !important;
  border-radius:10px !important;
  background:#eef3f6 !important;
  color:var(--main) !important;
  box-shadow:none !important;
  text-decoration:none !important;
  transition:background .14s ease,border-color .14s ease,box-shadow .14s ease,transform .14s ease;
}
.btn:hover{
  filter:none !important;
  background:#e8f1f4 !important;
  border-color:rgba(47,143,157,.26) !important;
}
.btn.primary{
  color:#fff !important;
  background:var(--teal) !important;
  border-color:var(--teal) !important;
  box-shadow:0 5px 14px rgba(47,143,157,.16) !important;
  font-weight:500 !important;
}
.btn.primary:hover{
  background:#2a828f !important;
  border-color:#2a828f !important;
}
.btn.danger{
  color:#8e4a40 !important;
  background:#fff3ef !important;
  border-color:rgba(182,93,75,.25) !important;
}
.btn.danger:hover{
  background:#fdebe6 !important;
}
.btn.ghost{
  background:rgba(255,255,255,.08) !important;
}
.link-btn{
  color:#257984 !important;
}
.link-btn:hover{
  color:#1f6871 !important;
  text-decoration:underline;
}
.danger-link{
  color:#9a5549 !important;
}

/* --------------------------- Поля / фильтры --------------------------- */
input:not([type="checkbox"]):not([type="radio"]),
select,
textarea{
  min-height:42px;
  padding:9px 11px !important;
  border:1px solid rgba(49,84,109,.18) !important;
  border-radius:10px !important;
  background:#fff !important;
  color:var(--text) !important;
  box-shadow:none !important;
  outline:none;
}
textarea{
  line-height:1.5;
}
input:not([type="checkbox"]):not([type="radio"]):focus,
select:focus,
textarea:focus{
  border-color:rgba(47,143,157,.58) !important;
  box-shadow:0 0 0 3px rgba(47,143,157,.09) !important;
}
label,
.stack label,
.selector-grid label,
.import-field,
.compact-field,
.teacher-form-grid label,
.teacher-schedule-topline label,
.teacher-journal-filters label{
  color:#4d6570 !important;
  font-weight:400 !important;
  font-size:12.5px !important;
}
.toolbar,
.teacher-toolbar,
.curriculum-toolbar{
  gap:10px !important;
  margin:0 0 12px !important;
  padding:12px !important;
  border:1px solid var(--border) !important;
  border-radius:14px !important;
  background:rgba(255,255,255,.9) !important;
  box-shadow:0 7px 20px rgba(16,40,51,.035);
}
.toolbar+.table-wrap{
  border-top:1px solid var(--border) !important;
  border-radius:14px !important;
}

/* --------------------------- Таблицы --------------------------- */
.table-wrap,
.portal-table-wrap{
  border:1px solid var(--border) !important;
  border-radius:14px !important;
  background:#fff !important;
  box-shadow:0 7px 20px rgba(16,40,51,.035);
}
table{
  background:#fff;
}
th,td,
.portal-table-wrap th,
.portal-table-wrap td{
  padding:11px 12px !important;
  border-bottom:1px solid rgba(16,40,51,.075) !important;
  font-size:13px !important;
  line-height:1.45;
}
th,
.portal-table-wrap th{
  color:var(--dark-soft) !important;
  background:#eaf4f7 !important;
  text-transform:none !important;
  letter-spacing:0 !important;
  font-size:12.5px !important;
  font-weight:500 !important;
}
tbody tr:hover td{
  background:#fbfefd;
}
.table-wrap.has-horizontal-overflow table th:first-child,
.table-wrap.has-horizontal-overflow table td:first-child{
  box-shadow:4px 0 10px rgba(16,40,51,.025);
}

/* --------------------------- Статусы --------------------------- */
.badge,
.mini-tag,
.teacher-badge,
.teacher-nav-count,
.portal-role-badge,
.teacher-journal-chip,
.teacher-schedule-mark{
  font-weight:400 !important;
}
.badge,
.mini-tag,
.teacher-badge{
  border:1px solid rgba(49,84,109,.10);
}
.badge{
  padding:4px 8px !important;
  background:#edf5f7 !important;
  color:var(--main) !important;
}
.badge.active,
.teacher-badge.success{
  background:#e8f7f2 !important;
  color:#286f64 !important;
}
.badge.warning,
.teacher-badge.warning{
  background:#fff7e7 !important;
  color:#806326 !important;
}
.badge.danger,
.teacher-badge.danger{
  background:#fff1ed !important;
  color:#8b5045 !important;
}

/* --------------------------- Диалоги --------------------------- */
dialog,
.teacher-dialog,
.import-lesson-plan-dialog,
.student-card-dialog{
  border:0 !important;
  border-radius:18px !important;
  background:#f3f8fb !important;
  box-shadow:var(--shadow-dialog) !important;
  color:var(--text) !important;
}
dialog::backdrop,
.teacher-dialog::backdrop,
.import-lesson-plan-dialog::backdrop{
  background:rgba(16,40,51,.50) !important;
  backdrop-filter:blur(2px);
}
.dialog-head,
.teacher-dialog .dialog-head,
.import-lesson-plan-dialog .dialog-head{
  padding:18px 20px !important;
  border-bottom:1px solid var(--border) !important;
  background:
    radial-gradient(circle at 92% 8%,rgba(47,143,157,.08),transparent 35%),
    #fff !important;
}
.dialog-head h2,
.teacher-dialog .dialog-head h2,
.import-lesson-plan-dialog .dialog-head h2{
  color:var(--main) !important;
  font-size:20px !important;
  font-weight:500 !important;
}
.dialog-actions,
.teacher-dialog .dialog-actions{
  gap:8px !important;
  padding-top:14px;
}
.icon-btn,
.dialog-close{
  color:var(--dark-soft) !important;
  border:1px solid var(--border) !important;
  border-radius:10px !important;
  background:#f5f9fb !important;
  font-weight:400 !important;
}
.stack label{
  gap:6px !important;
}
.student-card-shell{
  background:#f3f8fb;
}
.student-card-tabs{
  gap:5px !important;
  border-bottom:1px solid var(--border) !important;
}
.student-tab{
  padding:9px 11px !important;
  color:var(--muted) !important;
  border-bottom:2px solid transparent !important;
  font-weight:400 !important;
}
.student-tab.active{
  color:var(--teal) !important;
  border-bottom-color:var(--teal) !important;
}
.student-name-link{
  color:#257984 !important;
  font-weight:500 !important;
}

/* --------------------------- Импорт / планирование --------------------------- */
.schedule-import-step,
.lesson-plan-direct-upload,
.lesson-plan-import-summary,
.assignment-help,
.eligible-result,
.student-empty,
.student-subject-group,
.teacher-card-list article,
.teacher-incoming-block,
.teacher-submission-comment-block,
.teacher-submission-attachments,
.teacher-submission-result,
.teacher-attempt-history{
  border:1px solid var(--border) !important;
  border-radius:14px !important;
  background:#f8fbfc !important;
  box-shadow:none !important;
}
.schedule-import-step{
  padding:16px !important;
}
.schedule-import-step-no{
  background:var(--main) !important;
  font-weight:500 !important;
}
.schedule-import-step-head h3{
  font-weight:500 !important;
}
.schedule-import-file-step{
  background:#f3f9fb !important;
}
.schedule-import-file-box{
  border-color:rgba(47,143,157,.28) !important;
  border-radius:12px !important;
}
.schedule-import-file-box input[type="file"]::file-selector-button{
  font-weight:400 !important;
}

/* --------------------------- Фото --------------------------- */
.student-photo-panel,
.teacher-student-identity{
  border:1px solid var(--border) !important;
  border-radius:16px !important;
  background:#f8fbfc !important;
}
.student-photo-frame,
.teacher-student-photo-frame,
.student-list-photo,
.teacher-student-list-photo{
  border-color:var(--border) !important;
  background:#eef4f7 !important;
}

/* ==========================================================================
   КАБИНЕТ ПРЕПОДАВАТЕЛЯ
   ========================================================================== */
.portal-page{
  background:
    radial-gradient(circle at 96% 4%,rgba(109,169,216,.12),transparent 29%),
    radial-gradient(circle at 5% 94%,rgba(142,216,198,.14),transparent 29%),
    linear-gradient(180deg,#f2f8fc,#edf6fb) !important;
  color:var(--text) !important;
}
.portal-topbar{
  min-height:72px;
  padding:12px 24px !important;
  border-bottom:1px solid var(--border) !important;
  background:
    radial-gradient(circle at 90% 8%,rgba(47,143,157,.08),transparent 34%),
    linear-gradient(180deg,#fff,#f4f9fc) !important;
  box-shadow:0 8px 24px rgba(16,40,51,.045);
}
.portal-brand{
  color:#fff !important;
  background:var(--main) !important;
  border-radius:11px !important;
  font-weight:500 !important;
  box-shadow:none !important;
}
.portal-topbar strong{
  color:var(--main) !important;
  font-size:15px !important;
  font-weight:500 !important;
}
.portal-topbar span{
  color:var(--muted) !important;
  font-size:12.5px !important;
}
.portal-topbar .btn.ghost{
  color:var(--main) !important;
  border-color:rgba(49,84,109,.16) !important;
  background:#eef4f7 !important;
}
.portal-shell{
  width:min(1440px,calc(100% - 40px)) !important;
  padding:22px 0 52px !important;
}
.portal-hero{
  position:relative;
  overflow:hidden;
  padding:21px 24px !important;
  border:1px solid var(--border) !important;
  border-radius:18px !important;
  background:
    radial-gradient(circle at 92% 10%,rgba(47,143,157,.10),transparent 34%),
    linear-gradient(180deg,#fff,#f3f8fc) !important;
  box-shadow:var(--shadow-soft) !important;
}
.portal-hero:before{
  content:"";
  position:absolute;
  inset:0 auto 0 0;
  width:4px;
  background:linear-gradient(180deg,var(--sky),var(--teal));
}
.portal-hero h1{
  margin:5px 0 8px !important;
  color:var(--main) !important;
  font-size:24px !important;
  line-height:1.28 !important;
  font-weight:500 !important;
}
.portal-hero p{
  color:var(--muted) !important;
  font-size:13.5px !important;
  line-height:1.55 !important;
}
.eyebrow{
  color:var(--teal) !important;
  font-size:11.5px !important;
  font-weight:400 !important;
  text-transform:uppercase;
  letter-spacing:.07em;
}
.portal-role-badge{
  padding:7px 11px !important;
  border:1px solid rgba(47,143,157,.14);
  background:#e7f7f3 !important;
  color:#286f64 !important;
  font-size:12px;
}
.portal-grid{
  gap:12px !important;
  margin:14px 0 !important;
}
.portal-card{
  position:relative;
  gap:5px !important;
  min-height:94px;
  padding:16px 17px !important;
  overflow:hidden;
  border:1px solid var(--border) !important;
  border-radius:16px !important;
  background:#fff !important;
  box-shadow:var(--shadow-soft);
}
.portal-card:before{
  content:"";
  position:absolute;
  inset:0 auto 0 0;
  width:3px;
  background:linear-gradient(180deg,var(--sky),var(--mint));
}
.portal-card span{
  color:var(--muted) !important;
  font-size:12.5px !important;
}
.portal-card strong{
  color:var(--main) !important;
  font-size:23px !important;
}
.portal-panel{
  margin-top:14px !important;
  padding:18px !important;
  border:1px solid var(--border) !important;
  border-radius:18px !important;
  background:rgba(255,255,255,.92) !important;
  box-shadow:var(--shadow-soft) !important;
}
.portal-panel h2{
  color:var(--dark-soft) !important;
  font-size:18px !important;
  font-weight:500 !important;
}
.portal-permissions span{
  padding:5px 8px !important;
  border:1px solid var(--border) !important;
  border-radius:9px !important;
  background:#f4f9fb !important;
  color:var(--muted);
  font-weight:400 !important;
  font-size:12px !important;
}

/* Навигация преподавателя */
.teacher-module-nav{
  gap:7px !important;
  margin:14px 0 !important;
  padding:10px;
  border:1px solid var(--border);
  border-radius:14px;
  background:rgba(255,255,255,.82);
  box-shadow:0 7px 20px rgba(16,40,51,.035);
}
.teacher-nav-btn{
  min-height:39px !important;
  padding:8px 11px !important;
  border:1px solid transparent !important;
  border-radius:9px !important;
  background:transparent !important;
  color:var(--main) !important;
  font-size:12.5px !important;
}
.teacher-nav-btn:hover{
  background:#f0f7f8 !important;
  border-color:rgba(47,143,157,.11) !important;
}
.teacher-nav-btn.active{
  color:var(--dark-soft) !important;
  background:#e5f5f1 !important;
  border-color:rgba(47,143,157,.20) !important;
  box-shadow:inset 0 -2px 0 var(--teal);
  font-weight:500 !important;
}
.teacher-nav-count{
  min-width:20px !important;
  height:20px !important;
  color:#fff !important;
  background:var(--teal) !important;
  font-size:11px !important;
}
.teacher-panel-head{
  margin-bottom:12px !important;
}
.teacher-panel-head h2{
  margin:0 0 4px !important;
  color:var(--dark-soft) !important;
  font-size:17.5px !important;
}
.teacher-panel-head p{
  color:var(--muted) !important;
  font-size:12.5px !important;
  line-height:1.5;
}

/* Таблицы преподавателя */
.portal-table-wrap{
  overflow:auto;
}
.portal-table-wrap table{
  min-width:720px;
}
.portal-table-wrap th{
  background:#eaf4f7 !important;
  color:var(--dark-soft) !important;
}
.portal-table-wrap td{
  color:var(--text);
}

/* Расписание преподавателя */
.teacher-schedule-topline{
  gap:10px !important;
  margin-bottom:10px !important;
}
.teacher-schedule-week-nav{
  gap:8px !important;
  padding:10px !important;
  margin-bottom:11px !important;
  border:1px solid var(--border) !important;
  border-radius:12px !important;
  background:#f8fbfc !important;
}
.teacher-schedule-week-btn{
  min-height:40px !important;
  padding:8px 10px !important;
  border-radius:9px !important;
}
.teacher-schedule-prev,
.teacher-schedule-next{
  color:var(--main) !important;
  background:#eef3f6 !important;
  border-color:rgba(49,84,109,.14) !important;
}
.teacher-schedule-today{
  color:#fff !important;
  background:var(--teal) !important;
  border-color:var(--teal) !important;
  box-shadow:0 5px 14px rgba(47,143,157,.15);
}
.teacher-schedule-meta{
  color:var(--muted) !important;
  font-size:12.5px;
}
.teacher-schedule-grid thead th{
  background:#eaf4f7 !important;
}
.teacher-schedule-grid td{
  background:#fff !important;
}
.teacher-schedule-card{
  gap:5px !important;
  min-height:106px !important;
  padding:9px 10px !important;
  border:1px solid rgba(49,84,109,.16) !important;
  border-left:3px solid var(--sky) !important;
  border-radius:10px !important;
  background:#f8fbfc !important;
  box-shadow:none !important;
}
.teacher-schedule-card:hover,
.teacher-schedule-card:focus{
  transform:none !important;
  border-color:rgba(47,143,157,.35) !important;
  box-shadow:0 5px 16px rgba(16,40,51,.07) !important;
}
.teacher-schedule-mode-electronic{
  border-left-color:var(--teal) !important;
  background:#edf8f6 !important;
}
.teacher-schedule-mode-mixed{
  border-left-color:var(--main) !important;
  background:#f2f7fb !important;
}
.teacher-schedule-card-head span,
.teacher-schedule-mark{
  font-weight:400 !important;
}
.teacher-schedule-time,
.teacher-schedule-mode,
.teacher-schedule-links a{
  font-weight:400 !important;
}
.teacher-schedule-summary{
  gap:8px !important;
}
.teacher-schedule-summary article{
  padding:10px 12px !important;
  border:1px solid var(--border) !important;
  border-radius:10px !important;
  background:#f8fbfc !important;
}
.teacher-schedule-summary strong{
  color:var(--main) !important;
  font-size:18px !important;
}

/* Формы / карточки преподавателя */
.teacher-form-grid{
  gap:12px 14px !important;
}
.teacher-subject-chips{
  gap:6px !important;
}
.teacher-subject-chips span{
  padding:5px 8px !important;
  border:1px solid var(--border) !important;
  border-radius:8px !important;
  background:#f3f9fb !important;
  color:var(--main);
  font-size:12px !important;
  font-weight:400 !important;
}
.teacher-card-list article{
  padding:10px 11px !important;
}
.teacher-work-description a,
.teacher-file-links a,
.teacher-attachment-info .btn{
  font-weight:400 !important;
}

/* Журнал / долги / результаты */
.teacher-journal-chip,
.teacher-grade-average-card,
.teacher-submission-facts article,
.teacher-debt-person-card,
.teacher-schedule-summary article{
  border:1px solid var(--border) !important;
  border-radius:12px !important;
  background:#f8fbfc !important;
  box-shadow:none !important;
}
.teacher-journal-chip strong,
.teacher-grade-average-card strong,
.teacher-submission-facts article strong{
  font-weight:500 !important;
}
.teacher-incoming-count{
  font-weight:500 !important;
}

/* Фиксированный выход - менее навязчивый */
.portal-fixed-logout{
  opacity:.78;
}
.portal-fixed-logout-btn{
  border:1px solid rgba(49,84,109,.14) !important;
  background:rgba(255,255,255,.94) !important;
  color:var(--main) !important;
  font-weight:400 !important;
  box-shadow:0 6px 18px rgba(16,40,51,.06) !important;
}

/* --------------------------- Login --------------------------- */
.login-page{
  background:
    radial-gradient(circle at 90% 10%,rgba(109,169,216,.15),transparent 30%),
    radial-gradient(circle at 10% 90%,rgba(142,216,198,.16),transparent 30%),
    linear-gradient(180deg,#f2f8fc,#edf6fb) !important;
}
.login-card{
  padding:28px !important;
  border:1px solid var(--border) !important;
  border-radius:18px !important;
  box-shadow:0 18px 50px rgba(16,40,51,.09) !important;
}
.brand-mark{
  background:var(--main) !important;
  font-weight:500 !important;
}
.login-card h1{
  color:var(--main) !important;
  font-size:24px !important;
  font-weight:500 !important;
}

/* --------------------------- Адаптивность --------------------------- */
@media(max-width:1100px){
  .layout{
    grid-template-columns:220px minmax(0,1fr) !important;
  }
  .content{
    padding-left:20px !important;
    padding-right:20px !important;
  }
}
@media(max-width:900px){
  .layout{
    grid-template-columns:1fr !important;
  }
  .sidebar{
    position:sticky !important;
    top:72px !important;
    z-index:9;
    display:flex !important;
    width:100%;
    height:auto !important;
    padding:8px !important;
    overflow-x:auto;
    overflow-y:hidden;
    border-right:0 !important;
    border-bottom:1px solid var(--border) !important;
  }
  .nav,.nav-disabled{
    width:auto !important;
    min-width:max-content;
    margin:0 3px !important;
  }
  .nav.active{
    box-shadow:inset 0 -3px 0 var(--teal) !important;
  }
  .content{
    padding:18px 14px 42px !important;
  }
  .page-head{
    align-items:flex-start !important;
  }
  .portal-topbar{
    padding:12px 14px !important;
  }
  .portal-shell{
    width:min(100% - 22px,1440px) !important;
  }
}
@media(max-width:700px){
  .page-head{
    flex-direction:column !important;
    padding:17px 16px !important;
  }
  .head-actions,
  .page-head>.btn,
  .page-head>.head-actions{
    width:100%;
  }
  .head-actions .btn,
  .page-head>.btn{
    flex:1 1 auto;
  }
  .toolbar,
  .teacher-toolbar{
    align-items:stretch;
    flex-direction:column;
  }
  .toolbar input,
  .toolbar select,
  .toolbar .btn,
  .teacher-toolbar input,
  .teacher-toolbar select,
  .teacher-toolbar .btn{
    width:100% !important;
    min-width:0 !important;
  }
  .portal-hero{
    padding:18px 16px !important;
  }
  .teacher-module-nav{
    flex-wrap:nowrap !important;
    overflow-x:auto;
  }
  .teacher-nav-btn{
    flex:0 0 auto;
    white-space:nowrap;
  }
}
@media(max-width:520px){
  .topbar{
    padding:10px 12px !important;
  }
  .topbar span{
    display:none !important;
  }
  .content{
    padding:14px 10px 38px !important;
  }
  .page-head h1,
  .portal-hero h1{
    font-size:21px !important;
  }
  .cards{
    grid-template-columns:1fr !important;
  }
  .portal-grid{
    grid-template-columns:1fr !important;
  }
}

/* v0.6.86 - жизненный цикл работ в кабинете обучающегося */
.student-work-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-top:18px}.student-work-summary-card{appearance:none;border:1px solid var(--border,#dce6eb);border-radius:16px;background:#fff;padding:15px 16px;text-align:left;display:grid;gap:3px;cursor:pointer;color:inherit;transition:transform .15s ease,border-color .15s ease,box-shadow .15s ease}.student-work-summary-card:hover{transform:translateY(-1px);border-color:#91b8c5;box-shadow:0 8px 22px rgba(16,40,51,.07)}.student-work-summary-card.active{border-color:#2f8f9d;box-shadow:0 0 0 2px rgba(47,143,157,.12)}.student-work-summary-card span{font-size:13px;font-weight:700;color:#536c78}.student-work-summary-card strong{font-size:28px;line-height:1.05;color:#173642}.student-work-summary-card small{font-size:12px;color:#78909a}.student-work-summary-overdue strong{color:#9c3f32}.student-work-tabs{display:flex;flex-wrap:wrap;gap:8px;margin:16px 0 4px;padding-bottom:2px}.student-work-tabs button{appearance:none;border:1px solid #d8e4e9;border-radius:999px;background:#f7fafb;color:#38535f;padding:8px 12px;font:inherit;font-size:13px;font-weight:700;cursor:pointer}.student-work-tabs button span{display:inline-grid;place-items:center;min-width:22px;height:22px;margin-left:5px;border-radius:999px;background:#e4eef2;font-size:12px}.student-work-tabs button.active{background:#173642;border-color:#173642;color:#fff}.student-work-tabs button.active span{background:rgba(255,255,255,.16);color:#fff}.student-work-card-overdue{border-color:#e8c8c2;background:linear-gradient(180deg,#fff,#fff8f6)}.student-work-card-action_required{border-color:#e6dcc4}.student-work-card-completed{background:linear-gradient(180deg,#fff,#f3faf7)}.student-work-grade-inline{font-weight:800;color:#256753}.student-work-history{display:grid;gap:12px}.student-work-history-item{padding:14px;border:1px solid #dfe8ec;border-radius:14px;background:#fff}.student-work-history-head{display:flex;justify-content:space-between;gap:12px;align-items:flex-start}.student-work-history-head>div{display:grid;gap:3px}.student-work-history-head span:not(.badge){font-size:12px;color:#718690}.student-work-history-answer{margin-top:12px}.student-work-history-answer p{margin:6px 0 0;line-height:1.55}.student-work-result-card{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.student-work-result-card>div{display:grid;gap:4px;padding:12px 14px;border-radius:12px;background:#eef8f4}.student-work-result-card span{font-size:12px;color:#627982}.student-work-result-card strong{font-size:16px;color:#205847}.student-work-result-card p{grid-column:1/-1;margin:0;padding:12px 14px;border-radius:12px;background:#f5faf8;line-height:1.55}.student-work-submit-form.hidden{display:none!important}
@media(max-width:900px){.student-work-summary{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:560px){.student-work-summary{grid-template-columns:1fr}.student-work-result-card{grid-template-columns:1fr}.student-work-result-card p{grid-column:1}.student-work-history-head{align-items:stretch;flex-direction:column}}

/* v0.6.89 - каникулы и периоды без регулярных занятий */
.schedule-breaks-panel{margin-top:18px}
.schedule-break-form{align-items:end;gap:12px;flex-wrap:wrap}
.schedule-break-form label{min-width:170px;flex:1 1 180px}
.schedule-breaks-list{display:grid;gap:10px;margin-top:14px}
.schedule-break-row{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px 14px;border:1px solid rgba(47,143,157,.2);border-radius:12px;background:#f8fbfc}
.schedule-break-row>div{display:grid;gap:3px}.schedule-break-row span,.schedule-break-row small{color:#5c717c}
.schedule-break-cell{background:#f3fbfa!important}.schedule-break-cell-label{padding:7px 9px;border-radius:9px;background:#e7f7f3;color:#276b76;font-size:12px;font-weight:700;text-align:center}
@media(max-width:760px){.schedule-break-row{align-items:flex-start;flex-direction:column}.schedule-break-row .btn{width:100%}}
.schedule-variants-current{margin-top:16px}.schedule-variants-current h3{margin:0 0 8px}.schedule-variants-list{display:grid;gap:8px}.schedule-variant-chip{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:9px 11px;border:1px solid rgba(49,84,109,.16);border-radius:10px;background:#f8fbfc}.schedule-variant-chip-main{display:grid;gap:2px;min-width:0}.schedule-variant-chip span{font-size:12px;color:#5c717c}.schedule-variant-latest{border-color:rgba(47,143,157,.35);background:#f5fbfb}.schedule-import-delete-btn{flex:0 0 auto}.schedule-import-delete-btn:disabled{opacity:.45;cursor:not-allowed}

/* v0.6.91 - явные действия «Открыть» / «Скачать» для файлов работ */
.teacher-file-item{
  display:inline-grid;
  grid-template-columns:minmax(120px,1fr) auto auto;
  align-items:center;
  gap:6px;
  max-width:100%;
  padding:5px 6px;
  border:1px solid rgba(16,40,51,.12);
  border-radius:8px;
  background:#fff;
}
.teacher-file-name{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#31546d;font-size:12px;font-weight:700}
.teacher-file-item a{display:inline-flex!important;align-items:center;justify-content:center;padding:4px 7px!important;border-radius:6px!important;text-decoration:none!important;font-size:11px!important;font-weight:700!important}
.teacher-file-open{background:#e8f6f3!important;border:1px solid rgba(47,143,157,.24)!important;color:#276b76!important}
.teacher-file-download{background:#f2f5f7!important;border:1px solid rgba(49,84,109,.16)!important;color:#31546d!important}
@media(max-width:620px){.teacher-file-item{grid-template-columns:1fr auto auto;width:100%}}
.student-work-file-item{display:grid;grid-template-columns:minmax(140px,1fr) auto auto;align-items:center;gap:7px;padding:6px;border:1px solid rgba(16,40,51,.1);border-radius:8px;background:#fff}
.student-work-file-item>span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#31546d;font-weight:700}
@media(max-width:620px){.student-work-file-item{grid-template-columns:1fr 1fr}.student-work-file-item>span{grid-column:1/-1}}

/* v0.6.95 - общая очередь работ показывается раньше фильтров */
.teacher-incoming-filter-details{
  margin:16px 0 22px;
  border:1px solid rgba(16,40,51,.12);
  border-radius:12px;
  background:#fbfdfd;
  overflow:hidden;
}
.teacher-incoming-filter-details>summary{
  cursor:pointer;
  padding:12px 14px;
  font-weight:800;
  color:#244b5a;
  user-select:none;
}
.teacher-incoming-filter-details[open]>summary{
  border-bottom:1px solid rgba(16,40,51,.10);
}
.teacher-incoming-filter-details .teacher-incoming-filters{
  margin:0;
  padding:14px;
}

/* v0.6.98 - фильтры общей очереди преподавателя всегда над списком */
.teacher-incoming-filter-panel{
  margin:14px 0 16px; padding:14px 16px; border:1px solid #d7e3e7; border-radius:14px; background:#f7fafb;
}
.teacher-incoming-filter-title{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:12px}
.teacher-incoming-filter-title>div{display:flex;flex-direction:column;gap:4px}
.teacher-incoming-filters{display:grid;grid-template-columns:minmax(180px,1.1fr) minmax(180px,1.1fr) minmax(180px,1fr) auto;gap:10px;align-items:end}
.teacher-incoming-filters label{display:flex;flex-direction:column;gap:6px;font-weight:700;font-size:13px}
.teacher-incoming-filters label select{font-weight:400}
@media(max-width:900px){.teacher-incoming-filters{grid-template-columns:1fr 1fr}.teacher-incoming-filter-title{flex-direction:column}.teacher-incoming-filter-title .btn{align-self:flex-start}}
@media(max-width:620px){.teacher-incoming-filters{grid-template-columns:1fr}}

/* ==========================================================================
   v0.6.99 - компактный список преподавателей
   Назначения получают основную ширину и раскладываются по классам/группам
   в несколько колонок, чтобы длинная нагрузка не растягивала строку вниз.
   ========================================================================== */
#view-teachers .teachers-table-wrap{
  overflow:auto;
}
#view-teachers .teachers-table{
  min-width:1260px;
  table-layout:fixed;
}
#view-teachers .teacher-col-name{width:17%}
#view-teachers .teacher-col-subjects{width:14%}
#view-teachers .teacher-col-scope{width:35%}
#view-teachers .teacher-col-email{width:14%}
#view-teachers .teacher-col-status{width:8%}
#view-teachers .teacher-col-actions{width:12%}
#view-teachers .teachers-table th,
#view-teachers .teachers-table td{
  vertical-align:top;
}
#view-teachers .teacher-name-cell{
  min-width:190px;
}
#view-teachers .teacher-subjects-cell{
  line-height:1.25;
}
#view-teachers .teacher-subjects-cell .mini-tag{
  margin:1px 2px 3px 0;
  padding:3px 6px !important;
  font-size:11.5px !important;
}
#view-teachers .teacher-email-cell{
  overflow-wrap:anywhere;
  word-break:break-word;
}
#view-teachers .teacher-status-cell{
  white-space:normal;
}
#view-teachers .teacher-admin-actions{
  min-width:0 !important;
  white-space:normal !important;
  display:flex;
  flex-wrap:wrap;
  align-content:flex-start;
  gap:4px 8px;
}
#view-teachers .teacher-admin-actions .link-btn{
  margin:0 !important;
  padding:2px 0;
  text-align:left;
  line-height:1.25;
}
#view-teachers .teacher-assignment-groups{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:6px;
  width:100%;
}
#view-teachers .teacher-assignment-grade{
  min-width:0;
  padding:6px 7px;
  border-radius:8px;
  background:#f5f9fb;
  border:1px solid var(--line);
}
#view-teachers .teacher-assignment-grade-title{
  margin:0 0 4px;
  color:var(--dark);
  font-size:12px;
  font-weight:500 !important;
  line-height:1.2;
}
#view-teachers .teacher-assignment-items{
  display:flex;
  flex-wrap:wrap;
  gap:4px;
  align-items:flex-start;
}
#view-teachers .teacher-assignment-item{
  display:inline-flex;
  flex-wrap:wrap;
  align-items:baseline;
  gap:3px;
  max-width:100%;
  padding:3px 5px;
  border-radius:6px;
  background:#fff;
  border:1px solid rgba(49,84,109,.10);
  color:var(--text);
  font-size:11.5px;
  line-height:1.25;
}
#view-teachers .teacher-assignment-item strong{
  color:var(--main);
  font-size:11.5px;
  font-weight:500 !important;
}
#view-teachers .teacher-assignment-item span{
  color:var(--muted);
  overflow-wrap:anywhere;
}
#view-teachers .teacher-assignment-group-card{
  background:#f4fbf8;
}
@media(min-width:1650px){
  #view-teachers .teachers-table{min-width:1380px}
  #view-teachers .teacher-assignment-groups{grid-template-columns:repeat(3,minmax(0,1fr))}
  #view-teachers .teacher-col-scope{width:40%}
  #view-teachers .teacher-col-name{width:16%}
  #view-teachers .teacher-col-subjects{width:12%}
  #view-teachers .teacher-col-email{width:13%}
  #view-teachers .teacher-col-status{width:7%}
  #view-teachers .teacher-col-actions{width:12%}
}
@media(max-width:1100px){
  #view-teachers .teacher-assignment-groups{grid-template-columns:1fr}
}

/* v0.7.0 - электронный журнал */
.journal-filter-panel{padding:14px 16px}
.journal-toolbar{align-items:flex-end;gap:10px;flex-wrap:wrap}
.journal-toolbar .compact-field{min-width:150px}
.journal-toolbar .journal-subject-field{min-width:220px;flex:1 1 240px}
.journal-meta{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;margin-top:12px}
.journal-meta strong{font-size:15px;color:#244b5a}
.journal-meta span{font-size:12.5px;color:#617680}
.journal-table-wrap{position:relative;margin-top:12px;max-width:100%;overflow:auto;border:1px solid rgba(36,75,90,.12);border-radius:14px;background:#fff}
.journal-grid{border-collapse:separate;border-spacing:0;width:max-content;min-width:100%;font-size:12px}
.journal-grid th,.journal-grid td{height:46px;padding:6px 7px;border-right:1px solid rgba(36,75,90,.10);border-bottom:1px solid rgba(36,75,90,.10);background:#fff;text-align:center;vertical-align:middle}
.journal-grid thead th{position:sticky;top:0;z-index:4;background:#f0f6f8;color:#244b5a}
.journal-date-head{width:62px;min-width:62px;max-width:72px;white-space:nowrap}
.journal-date-head strong,.journal-date-head span{display:block}
.journal-date-head strong{font-size:12px;font-weight:600}
.journal-date-head span{margin-top:3px;font-size:10px;font-weight:400;color:#70848d}
.journal-student-cell{position:sticky;left:0;z-index:3;width:230px;min-width:230px;max-width:230px;padding-left:12px!important;text-align:left!important;background:#fbfdfe!important;font-weight:500}
.journal-corner{z-index:6!important;background:#eaf3f6!important}
.journal-average-cell{position:sticky;right:0;z-index:3;width:74px;min-width:74px;background:#f9fcfb!important;font-weight:600;color:#2f6b73}
.journal-average-head{z-index:6!important;background:#e8f5f1!important;color:#31546d}
.journal-grade-cell{min-width:62px;padding:4px!important}
.journal-grade-chip{display:inline-flex;align-items:center;justify-content:center;min-width:27px;height:27px;margin:2px;padding:0 7px;border:1px solid rgba(47,143,157,.20);border-radius:8px;background:#edf8f5;color:#244b5a;font-size:13px;font-weight:600;cursor:default}
.journal-no-grade{color:#b4c0c6}
.journal-empty{padding:34px 20px;text-align:center;color:#6a7d86;background:#fbfdfe}
.journal-hint{margin-top:9px}
@media(max-width:900px){
  .journal-student-cell{width:180px;min-width:180px;max-width:180px}
  .journal-toolbar .compact-field,.journal-toolbar .journal-subject-field{min-width:calc(50% - 8px);flex:1 1 calc(50% - 8px)}
}
@media(max-width:620px){
  .journal-toolbar .compact-field,.journal-toolbar .journal-subject-field{min-width:100%;flex-basis:100%}
  .journal-student-cell{width:155px;min-width:155px;max-width:155px}
}

/* v0.7.3: одновременно действующие версии учебного плана */
.curriculum-active-versions{margin-top:10px;display:flex;gap:7px;align-items:center;flex-wrap:wrap}

/* v0.7.7: номер по поурочному планированию и тема прямо в расписании */
.schedule-plan-topic{display:block;margin-top:4px;font-style:normal;font-size:12px;line-height:1.35;color:#244b5a;font-weight:600;white-space:normal}
.teacher-schedule-plan-topic{margin:5px 0 2px;font-size:12px;line-height:1.35;color:#244b5a;font-weight:600}

/* v0.7.17 - автоматические аккаунты обучающихся и коды подключения */
.link-btn:disabled{
  opacity:.45;
  cursor:not-allowed;
  pointer-events:none;
}
.access-student-code-state{
  margin-top:6px;
  line-height:1.35;
}
.access-student-code-state .badge{
  margin-bottom:3px;
}

/* v0.7.18 - раздельные списки пользователей и массовая выдача кодов */
.access-category-tabs{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin:14px 0 12px;
}
.access-category-tab{
  appearance:none;
  border:1px solid var(--border, #dce8ef);
  background:#fff;
  color:#31546d;
  border-radius:999px;
  padding:9px 15px;
  font:inherit;
  cursor:pointer;
  transition:background .18s ease,border-color .18s ease,transform .18s ease;
}
.access-category-tab:hover{transform:translateY(-1px);border-color:#8fc7d0}
.access-category-tab.active{
  background:#31546d;
  border-color:#31546d;
  color:#fff;
}
.access-category-selector{
  margin:14px 0 12px;
  align-items:flex-end;
}
.access-category-selector label{
  display:grid;
  gap:6px;
  min-width:min(100%, 420px);
  font-weight:700;
}
.access-category-selector select{
  min-width:min(100%, 420px);
}
.access-filter-toolbar{align-items:center}
.access-filter-toolbar #access-class-filter{min-width:180px}
.access-student-bulk{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  margin:12px 0;
  padding:14px 16px;
}
.access-student-bulk.hidden{display:none!important}
.access-student-bulk-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  flex-wrap:wrap;
  gap:8px;
}
.access-select-column,.access-select-cell{
  width:44px;
  min-width:44px;
  text-align:center;
}
.access-select-cell input,.access-select-column input{
  width:17px;
  height:17px;
  cursor:pointer;
}
.access-select-cell input:disabled{cursor:not-allowed;opacity:.35}
@media(max-width:820px){
  .access-student-bulk{align-items:flex-start;flex-direction:column}
  .access-student-bulk-actions{justify-content:flex-start}
}
.access-role-groups{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:12px;
}
.access-role-group{
  border:1px solid var(--border, #dce8ef);
  border-radius:14px;
  padding:12px;
  background:#fbfdfe;
}
.access-role-group:first-child{grid-column:span 2}
.access-role-group h4{margin:0 0 9px;color:#31546d;font-size:14px}
.access-role-grid-compact{grid-template-columns:repeat(2,minmax(0,1fr))}
.access-role-group>.access-role-card{height:calc(100% - 24px)}
@media(max-width:900px){
  .access-role-groups{grid-template-columns:1fr 1fr}
  .access-role-group:first-child{grid-column:1/-1}
}
@media(max-width:620px){
  .access-role-groups{grid-template-columns:1fr}
  .access-role-group:first-child{grid-column:auto}
  .access-role-grid-compact{grid-template-columns:1fr}
}

/* v0.7.23 - Оплата обучения */

/* v0.7.27 - финансовые фильтры всех классов и постраничный вывод */

/* v0.7.30 - просмотр введенного пароля на входе и при смене пароля */
.password-field{position:relative;display:block;width:100%;}
.password-field>input{width:100%;padding-right:48px!important;}
.password-visibility-toggle{position:absolute;right:7px;top:50%;transform:translateY(-50%);width:36px;height:36px;border:0;border-radius:8px;background:transparent;color:var(--muted);display:grid;place-items:center;cursor:pointer;padding:0;}
.password-visibility-toggle:hover,.password-visibility-toggle:focus-visible{background:rgba(47,143,157,.1);color:var(--teal);outline:none;}
.password-visibility-toggle.is-visible{color:var(--dark);background:rgba(36,75,90,.08);}
.password-visibility-toggle svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;pointer-events:none;}

/* v0.7.30 - единый вывод всех классов выбранного уровня учебного плана */
.curriculum-level-plan-head{display:flex;flex-direction:column;gap:4px;margin-bottom:12px;padding-bottom:10px;border-bottom:1px solid var(--border)}
.curriculum-grade-plan-row{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;padding:10px 0;border-bottom:1px solid #edf2f4}
.curriculum-grade-plan-row:last-child{border-bottom:0}
.curriculum-grade-plan-row>strong{min-width:72px}
@media(max-width:700px){.curriculum-grade-plan-row{flex-direction:column;gap:6px}}

/* v0.7.34: динамический низ и более просторное сводное расписание */
.schedule-v063-board-card strong{overflow-wrap:anywhere;word-break:normal;line-height:1.35}
.schedule-v0734-add-row th,.schedule-v0734-add-row td{height:auto!important;background:#f8fbfc!important;padding:10px!important}
.schedule-v0734-add-row td{min-width:0!important;width:auto!important;text-align:center}
.schedule-v0734-add-lessons{min-width:190px}
.schedule-v063-board-card.mixed{background:#f4f8fd;border-color:rgba(109,169,216,.34)}
.schedule-v063-board-card.online{background:#f7fbfc}

/* v0.7.34 - динамическая высота и более широкое сводное расписание */
.schedule-v0734-add-row th{position:static!important;padding:12px!important;background:#f6fafb!important;text-align:center!important}
.schedule-v0734-add-lessons{min-width:220px;font-weight:700}
.schedule-v063-board-card strong{white-space:normal;overflow-wrap:anywhere;line-height:1.3}


/* v0.7.36 - одинаковая ширина колонок сводного расписания */
.schedule-v063-board-grid{table-layout:fixed!important;}
.schedule-v063-board-grid thead th:not(:first-child),
.schedule-v063-board-grid tbody td{width:260px!important;min-width:260px!important;max-width:260px!important;}
.schedule-v063-board-grid td{box-sizing:border-box!important;}
.schedule-v063-board-card{box-sizing:border-box!important;max-width:100%!important;}
#access-new-student-guardian h4{margin:0 0 6px;}

/* v0.7.45 - сводное расписание всегда доступно по горизонтали */
.schedule-v063-table-wrap{
  max-width:100%!important;
  overflow-x:scroll!important;
  overflow-y:auto;
  -webkit-overflow-scrolling:touch;
  overscroll-behavior-x:contain;
  scrollbar-gutter:stable;
}
.schedule-v063-table-wrap::-webkit-scrollbar{height:15px}
.schedule-v063-table-wrap::-webkit-scrollbar-track{background:#edf3f5;border-radius:8px}
.schedule-v063-table-wrap::-webkit-scrollbar-thumb{background:#7895a0;border:2px solid #edf3f5;border-radius:8px}
.schedule-v063-table-wrap::-webkit-scrollbar-thumb:hover{background:#5f7f8b}
.schedule-v0745-scrollbar{
  display:none;
  width:100%;
  height:19px;
  margin:4px 0 8px;
  overflow-x:scroll;
  overflow-y:hidden;
  box-sizing:border-box;
  border:1px solid rgba(16,40,51,.18);
  border-radius:8px;
  background:#fff;
}
.schedule-v0745-scrollbar.visible{display:block}
.schedule-v0745-scrollbar-inner{height:1px;min-width:100%}
.schedule-v0745-scrollbar::-webkit-scrollbar{height:15px}
.schedule-v0745-scrollbar::-webkit-scrollbar-track{background:#edf3f5;border-radius:8px}
.schedule-v0745-scrollbar::-webkit-scrollbar-thumb{background:#7895a0;border:2px solid #edf3f5;border-radius:8px}
.schedule-v0745-scrollbar::-webkit-scrollbar-thumb:hover{background:#5f7f8b}


/* v0.7.46 - первый закрытый контур ЭИОС */
.eios-page code{font-family:ui-monospace,SFMono-Regular,Consolas,monospace;background:#eef5f6;border-radius:6px;padding:.12rem .35rem}
.eios-action-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:14px;margin-top:14px}
.eios-action-card{display:flex;flex-direction:column;gap:7px;padding:18px;border:1px solid #cfe0e3;border-radius:14px;background:#fff;text-decoration:none;color:inherit;box-shadow:0 8px 22px rgba(16,40,51,.06)}
.eios-action-card:hover{transform:translateY(-1px);box-shadow:0 11px 26px rgba(16,40,51,.1)}
.eios-action-card strong{color:#244b5a;font-size:1.05rem}.eios-action-card span{color:#587078;line-height:1.45}

/* v0.7.53 - реестр защищённых страниц ЭИОС */
.eios-pages-table-wrap table{min-width:1180px}.eios-rules-text{display:block;max-width:520px;line-height:1.45}.eios-page-dialog .modal-card{width:min(980px,96vw);max-height:92vh;overflow:auto}.eios-access-builder{margin-top:18px;padding:16px;border:1px solid #d9e4e8;border-radius:14px;background:#f8fbfc}.eios-access-builder h3{margin:0 0 4px}.eios-check-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:8px;margin:12px 0 16px}.eios-access-builder select[multiple]{min-height:150px}.protected-page-address{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;color:#53717c;margin-bottom:18px}.protected-page-text{white-space:pre-wrap;line-height:1.7;font-size:1.05rem}.eios-pages-panel{margin-top:20px}


/* v0.7.53 - защищённые страницы: полноразмерное прокручиваемое окно */
#eios-page-dialog.eios-page-dialog{
  width:min(1120px,calc(100vw - 28px));
  max-width:none;
  max-height:calc(100vh - 24px);
  overflow:hidden !important;
}
#eios-page-dialog .modal-card{
  width:100%;
  max-width:none;
  max-height:calc(100vh - 24px);
  overflow-y:auto !important;
  overflow-x:hidden !important;
  padding:22px 24px 20px;
  scrollbar-gutter:stable;
}
#eios-page-dialog .modal-head{
  position:sticky;top:-22px;z-index:3;
  margin:-22px -24px 18px;padding:20px 24px 14px;
  background:#fff;border-bottom:1px solid var(--border);
}
#eios-page-dialog .modal-actions{
  position:sticky;bottom:-20px;z-index:3;
  margin:20px -24px -20px;padding:14px 24px 18px;
  background:#fff;border-top:1px solid var(--border);
}
#eios-page-dialog .form-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:14px 18px;}
#eios-page-dialog .form-grid>label{display:grid;gap:6px;min-width:0;font-size:13px;font-weight:700;color:#49616d;}
#eios-page-dialog .form-grid .span-2{grid-column:1/-1;}
#eios-page-dialog input,#eios-page-dialog textarea,#eios-page-dialog select{width:100%;min-width:0;}
#eios-page-dialog textarea{resize:vertical;}
#eios-page-dialog .eios-page-active{align-content:center;}
#eios-page-dialog .eios-page-active input{width:auto;}
@media(max-width:760px){
  #eios-page-dialog.eios-page-dialog{width:calc(100vw - 12px);max-height:calc(100vh - 12px);}
  #eios-page-dialog .modal-card{max-height:calc(100vh - 12px);padding:16px;}
  #eios-page-dialog .modal-head{top:-16px;margin:-16px -16px 16px;padding:16px;}
  #eios-page-dialog .modal-actions{bottom:-16px;margin:16px -16px -16px;padding:12px 16px 16px;}
  #eios-page-dialog .form-grid{grid-template-columns:1fr;}
  #eios-page-dialog .form-grid .span-2{grid-column:auto;}
}

/* v0.7.53 - матрица доступа и массовый импорт страниц ЭИОС */
.eios-matrix-help{margin:12px 0 14px;padding:12px 14px;border:1px solid #d9e4e8;border-radius:12px;background:#f8fbfc;color:#526a74;line-height:1.45}
.eios-pages-table-wrap{overflow-x:auto!important;overflow-y:visible!important;max-width:100%}
#eios-pages-matrix{border-collapse:separate;border-spacing:0;min-width:max-content}
#eios-pages-matrix th,#eios-pages-matrix td{vertical-align:middle;white-space:nowrap}
#eios-pages-matrix th{position:sticky;top:0;z-index:4;background:#edf5f7;text-align:center;min-width:84px}
#eios-pages-matrix .eios-page-sticky-col{position:sticky;left:0;z-index:5;min-width:330px;max-width:410px;text-align:left;background:#fff;box-shadow:5px 0 10px rgba(20,55,68,.05)}
#eios-pages-matrix thead .eios-page-sticky-col{z-index:7;background:#edf5f7}
.eios-page-title-cell{display:grid;gap:4px;white-space:normal;line-height:1.35}
.eios-page-title-cell>a{font-size:12px;word-break:break-all}
.eios-source-link{display:inline-flex;width:max-content;margin-top:3px;font-weight:700;color:#2f7f8d!important}
.eios-matrix-cell{text-align:center;min-width:78px}
.eios-matrix-check{display:inline-grid;place-items:center;cursor:pointer;padding:8px}
.eios-matrix-check input{width:18px;height:18px;accent-color:#2f8f9d;cursor:pointer}
.eios-matrix-head-check{display:grid;gap:6px;justify-items:center;font-size:12px;line-height:1.15;min-width:76px}
.eios-matrix-head-check input{width:17px;height:17px;accent-color:#2f8f9d}
.eios-import-dialog{width:min(1200px,96vw);max-width:none;max-height:92vh;padding:0;border:0;background:transparent}
.eios-import-dialog .modal-card{width:100%;max-height:92vh;overflow:auto}
.eios-import-actions{margin:12px 0;display:flex;gap:8px;flex-wrap:wrap}
.eios-import-table-wrap{max-height:52vh;overflow:auto!important;margin-top:10px;border:1px solid #d9e4e8;border-radius:12px}
.eios-import-table-wrap table{min-width:1050px}
.eios-import-table-wrap thead th{position:sticky;top:0;background:#edf5f7;z-index:2}
.eios-import-title{min-width:260px;width:100%}
.eios-import-existing{opacity:.65}
@media(max-width:800px){
  #eios-pages-matrix .eios-page-sticky-col{min-width:240px;max-width:280px}
  .eios-import-dialog{width:calc(100vw - 12px);max-height:calc(100vh - 12px)}
  .eios-import-dialog .modal-card{max-height:calc(100vh - 12px);padding:14px}
}

/* v0.7.53 - защищённое зеркало содержимого Tilda */
.protected-page-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:12px}
.protected-page-toolbar>div{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.eios-mirrored-frame{display:block;width:100%;height:calc(100vh - 220px);min-height:720px;border:1px solid #d7e3e7;border-radius:14px;background:#fff}
.eios-content-state{display:inline-flex;align-items:center;gap:6px;font-size:12px;font-weight:700}
.eios-content-state.ready{color:#24705f}.eios-content-state.missing{color:#7b6a2f}.eios-content-state.error{color:#a33a3a;max-width:220px;white-space:normal}
.eios-content-actions{display:flex;gap:6px;flex-wrap:wrap;align-items:center}
@media(max-width:800px){.eios-mirrored-frame{height:75vh;min-height:560px;border-radius:10px}}

/* v0.7.53 - навигация защищённого сайта ЭИОС */
.eios-site-nav{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin:0 0 14px;padding:10px 12px;border:1px solid rgba(49,84,109,.16);border-radius:14px;background:#fff}.eios-site-nav-main{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.eios-page-jump{display:flex;align-items:center;gap:8px;font-size:13px;color:#5c717c}.eios-page-jump select{min-width:250px;max-width:420px}.schedule-variants-current .muted.schedule-delete-help{margin-top:6px;display:block}
@media(max-width:800px){.eios-site-nav{align-items:stretch}.eios-site-nav-main{display:grid;grid-template-columns:1fr}.eios-page-jump{display:grid;gap:5px}.eios-page-jump select{min-width:0;max-width:none;width:100%}}

/* v0.7.59 - постоянные административные переходы в защищённый сайт */
.admin-topbar-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap}.admin-topbar-actions form{margin:0}.schedule-delete-warning{color:#9a5d00;font-weight:700}.schedule-import-delete-btn:not(:disabled){font-weight:700}
@media(max-width:760px){.admin-topbar-actions{gap:5px}.admin-topbar-actions .btn{padding:8px 10px;font-size:12px}}


/* v0.7.62 - diagnostics for live-work debt badges */
.debt-badge-btn{border:0;cursor:pointer;font:inherit;line-height:1;padding:.38rem .58rem}
.debt-badge-btn:hover{filter:brightness(.96);box-shadow:0 0 0 2px rgba(164,61,61,.12)}
.student-debt-dialog{width:min(760px,calc(100vw - 32px));border:0;border-radius:18px;padding:0;box-shadow:0 24px 70px rgba(16,40,51,.24)}
.student-debt-shell{padding:22px}
.student-debt-list{display:grid;gap:12px;max-height:58vh;overflow:auto;padding:4px 2px}
.student-debt-item{border:1px solid #d9e6ea;border-radius:14px;padding:14px;background:#fff}
.student-debt-item-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:6px}
.student-debt-item-title{font-weight:700;margin-bottom:5px}

/* v0.7.62 - exact source actions for Contingent debts */
.student-debt-source-meta{margin-top:10px;color:#6a7f88;font-size:12px;overflow-wrap:anywhere}
.student-debt-source-meta code{font-size:11px;background:#eef4f6;padding:2px 5px;border-radius:5px}
.student-debt-item-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:12px}
.student-debt-item-actions .btn{min-height:36px}

/* v0.7.69 - удобное адаптивное окно импорта Tilda */
#eios-import-dialog.eios-import-dialog{
  width:min(1120px,calc(100vw - 48px));
  height:min(760px,calc(100vh - 40px));
  max-width:none;
  max-height:calc(100vh - 40px);
  margin:auto;
  padding:0;
  overflow:hidden;
  border:0;
  border-radius:18px;
  background:#fff;
  box-shadow:0 28px 90px rgba(16,40,51,.28);
}
#eios-import-dialog::backdrop{
  background:rgba(16,40,51,.52);
  backdrop-filter:blur(2px);
}
.eios-import-shell{
  height:100%;
  min-height:0;
  display:grid;
  grid-template-rows:auto minmax(0,1fr) auto;
  background:#f7fafb;
}
.eios-import-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:22px;
  padding:20px 24px 16px;
  background:#fff;
  border-bottom:1px solid var(--border);
}
.eios-import-head>div:first-child{min-width:0;max-width:900px}
.eios-import-head .eyebrow{margin-bottom:5px;color:#2f8f9d;font-size:11px;font-weight:800;letter-spacing:.08em;text-transform:uppercase}
.eios-import-head h2{margin:0 0 6px;color:var(--main);font-size:23px;font-weight:600}
.eios-import-head p{margin:0;color:var(--muted);font-size:14px;line-height:1.45}
.eios-import-close{
  flex:0 0 auto;
  display:grid;
  place-items:center;
  width:38px;
  height:38px;
  padding:0;
  border:1px solid var(--border);
  border-radius:10px;
  background:#f5f9fb;
  color:var(--dark-soft);
  font-size:26px;
  line-height:1;
  cursor:pointer;
}
.eios-import-close:hover{background:#edf5f7}
.eios-import-body{
  min-height:0;
  overflow-y:auto;
  overflow-x:hidden;
  padding:18px 24px;
  scrollbar-gutter:stable;
}
.eios-import-source-card{
  padding:16px;
  border:1px solid #d8e5e9;
  border-radius:14px;
  background:#fff;
}
.eios-import-source-card>label{
  display:block;
  margin-bottom:7px;
  color:#49616d;
  font-size:13px;
  font-weight:800;
}
.eios-import-source-row{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:10px;
  align-items:center;
}
#eios-import-source{
  width:100%;
  min-width:0;
  height:44px;
  font-size:15px;
}
.eios-import-discover-btn{min-height:44px;white-space:nowrap;padding-inline:18px}
.eios-import-mode{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
  margin-top:12px;
}
.eios-import-mode>label{
  display:flex;
  align-items:flex-start;
  gap:9px;
  min-width:0;
  padding:10px 12px;
  border:1px solid #dbe7ea;
  border-radius:11px;
  background:#f8fbfc;
  cursor:pointer;
}
.eios-import-mode input{flex:0 0 auto;width:17px;height:17px;min-height:0;margin:2px 0 0;accent-color:var(--teal)}
.eios-import-mode span{display:grid;gap:2px;min-width:0}
.eios-import-mode strong{color:#284956;font-size:13px}
.eios-import-mode small{color:#6a7e87;font-size:12px;line-height:1.35}
.eios-import-help{margin:10px 0 0;color:#647983;font-size:12px;line-height:1.45}
.eios-import-toolbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin:14px 0 9px;
}
.eios-import-selection-actions{display:flex;gap:8px;flex-wrap:wrap}
.eios-import-status{min-height:20px;color:#4d6974;font-size:13px;text-align:right}
.eios-import-results{min-height:0}
.eios-import-table-wrap{
  width:100%;
  max-height:330px;
  overflow:auto;
  margin:0;
  border:1px solid #d9e4e8;
  border-radius:12px;
  background:#fff;
  scrollbar-gutter:stable;
}
.eios-import-table-wrap table{width:100%;min-width:900px;border-collapse:collapse}
.eios-import-table-wrap th,.eios-import-table-wrap td{padding:11px 12px;vertical-align:middle}
.eios-import-table-wrap thead th{position:sticky;top:0;z-index:2;background:#edf5f7}
.eios-import-check-col{width:44px;text-align:center}
.eios-import-title{width:100%;min-width:220px}
.eios-import-table-wrap td a{display:inline-block;max-width:330px;overflow-wrap:anywhere;word-break:break-word}
.eios-import-table-wrap code{white-space:normal;overflow-wrap:anywhere;word-break:break-word}
.eios-import-empty{padding:26px!important;text-align:center;color:var(--muted)}
.eios-import-existing{opacity:.72}
.eios-import-footer{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
  padding:14px 24px 16px;
  background:#fff;
  border-top:1px solid var(--border);
}
.eios-import-footer .btn{min-height:40px}
@media(max-width:800px){
  #eios-import-dialog.eios-import-dialog{
    width:calc(100vw - 12px);
    height:calc(100vh - 12px);
    max-height:calc(100vh - 12px);
    border-radius:13px;
  }
  .eios-import-head{padding:16px;gap:12px}
  .eios-import-head h2{font-size:20px}
  .eios-import-head p{font-size:13px}
  .eios-import-body{padding:14px 16px}
  .eios-import-source-row{grid-template-columns:1fr}
  .eios-import-discover-btn{width:100%}
  .eios-import-mode{grid-template-columns:1fr}
  .eios-import-toolbar{align-items:stretch;flex-direction:column}
  .eios-import-status{text-align:left}
  .eios-import-table-wrap{max-height:42vh}
  .eios-import-footer{padding:12px 16px;flex-wrap:wrap}
  .eios-import-footer .btn{flex:1 1 auto}
}
@media(max-width:520px){
  .eios-import-head p{display:none}
  .eios-import-source-card{padding:12px}
  .eios-import-selection-actions .btn{flex:1}
}

/* v0.7.69 - подтверждение совместных уроков при импорте расписания */
.schedule-joint-candidates{
  margin:14px 0 16px;
  padding:14px;
  border:1px solid #d7e5ea;
  border-radius:12px;
  background:#f7fbfc;
}
.schedule-joint-head{display:flex;flex-direction:column;gap:4px;margin-bottom:10px;color:#31546d}
.schedule-joint-head span{color:#6b7f89;font-size:12px;line-height:1.45}
.schedule-joint-option{
  display:flex!important;
  align-items:flex-start;
  gap:10px!important;
  margin:8px 0!important;
  padding:10px 12px;
  border:1px solid #dce8ef;
  border-radius:10px;
  background:#fff;
  color:#334d5a!important;
  font-weight:400!important;
}
.schedule-joint-option input{flex:0 0 auto;width:18px!important;height:18px!important;min-height:18px!important;margin:2px 0 0!important}
.schedule-joint-option small{color:#6b7f89;line-height:1.4}

/* v0.7.69 - решение администратора по занятиям вне учебного плана */
.schedule-unknown-subjects{
  margin:14px 0 16px;
  padding:14px;
  border:1px solid #e3dcc5;
  border-radius:12px;
  background:#fffdf6;
}
.schedule-unknown-head{display:flex;flex-direction:column;gap:5px;margin-bottom:12px;color:#765f1f}
.schedule-unknown-head span{color:#7c7460;font-size:12px;line-height:1.5}
.schedule-unknown-subject-option{
  display:grid;
  grid-template-columns:minmax(190px,1.05fr) minmax(250px,1fr) minmax(250px,1fr);
  gap:12px;
  align-items:end;
  margin:9px 0;
  padding:12px;
  border:1px solid #e8e1cf;
  border-radius:10px;
  background:#fff;
}
.schedule-unknown-subject-title{display:flex;flex-direction:column;gap:3px;align-self:center;color:#344f5e}
.schedule-unknown-subject-title span{font-size:12px;color:#77848b}
.schedule-unknown-subject-title em{font-style:normal;color:#3c7968}
.schedule-unknown-subject-option label{margin:0!important;color:#425d6b!important;font-size:12px!important;font-weight:600!important}
.schedule-unknown-subject-option select{margin-top:5px}
.schedule-unknown-subject-remember{
  grid-column:2 / 4;
  display:flex!important;
  align-items:center;
  gap:8px!important;
  padding-top:0;
  font-weight:400!important;
  color:#657983!important;
}
.schedule-unknown-subject-remember input{width:17px!important;height:17px!important;min-height:17px!important;margin:0!important}
@media(max-width:980px){
  .schedule-unknown-subject-option{grid-template-columns:1fr 1fr}
  .schedule-unknown-subject-title{grid-column:1 / 3}
  .schedule-unknown-subject-remember{grid-column:1 / 3}
}
@media(max-width:680px){
  .schedule-unknown-subject-option{grid-template-columns:1fr}
  .schedule-unknown-subject-title,.schedule-unknown-subject-remember{grid-column:1}
}

/* v0.7.74 - крупная панель управления сайтом ЭИОС */
.eios-site-action-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin:14px 0 16px}
.eios-site-action-card{appearance:none;display:flex;align-items:center;gap:14px;min-height:92px;width:100%;padding:16px 18px;border:1px solid #cbdde2;border-radius:18px;background:#fff;color:#244b5a;text-align:left;text-decoration:none;cursor:pointer;box-shadow:0 8px 24px rgba(16,40,51,.065);transition:transform .16s ease,box-shadow .16s ease,border-color .16s ease,background .16s ease;font:inherit}
.eios-site-action-card:hover{transform:translateY(-2px);border-color:#95c9d1;box-shadow:0 13px 30px rgba(16,40,51,.11)}
.eios-site-action-card:focus-visible{outline:3px solid rgba(47,143,157,.22);outline-offset:2px}
.eios-site-action-card.primary{background:linear-gradient(135deg,#2f8f9d,#357d98);border-color:#2f8f9d;color:#fff}
.eios-site-action-card.accent{background:linear-gradient(135deg,#f3fbfb,#e9f7f4);border-color:#9ed5cc}
.eios-site-action-card.warning{background:#fff8e9;border-color:#e5c77e;color:#6d5422}
.eios-site-action-card:disabled{opacity:.58;cursor:wait;transform:none}
.eios-site-action-icon{display:grid;place-items:center;flex:0 0 48px;width:48px;height:48px;border-radius:14px;background:#edf6f7;color:#2f7f8d;font-size:24px;font-weight:800;line-height:1}
.eios-site-action-card.primary .eios-site-action-icon{background:rgba(255,255,255,.18);color:#fff}
.eios-site-action-card.accent .eios-site-action-icon{background:#dff3ee;color:#267966}
.eios-site-action-card.warning .eios-site-action-icon{background:#fff0c9;color:#936a08}
.eios-site-action-card>span:last-child{display:grid;gap:5px;min-width:0}
.eios-site-action-card strong{font-size:16px;line-height:1.2;color:inherit}
.eios-site-action-card small{font-size:12.5px;line-height:1.35;color:#607780;font-weight:500}
.eios-site-action-card.primary small{color:rgba(255,255,255,.86)}
.eios-bulk-progress{margin:0 0 16px;padding:14px 16px;border:1px solid #cfe0e3;border-radius:15px;background:#f8fbfc;box-shadow:0 5px 16px rgba(16,40,51,.04)}
.eios-bulk-progress-top{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:8px;color:#244b5a}
.eios-bulk-progress-track{height:10px;overflow:hidden;border-radius:999px;background:#dfecef}
.eios-bulk-progress-track>span{display:block;width:0;height:100%;border-radius:999px;background:linear-gradient(90deg,#2f8f9d,#8ed8c6);transition:width .2s ease}
.eios-bulk-progress-message{margin-top:7px;font-size:12.5px}
@media(max-width:1250px){.eios-site-action-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:900px){.eios-site-action-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.eios-site-action-card{min-height:86px;padding:14px}.eios-site-action-icon{flex-basis:44px;width:44px;height:44px}}
@media(max-width:560px){.eios-site-action-grid{grid-template-columns:1fr;gap:10px}.eios-site-action-card{min-height:78px}.eios-bulk-progress-top{align-items:flex-start;flex-direction:column;gap:2px}}

/* v0.7.74 - Контингент: сквозная нумерация и счётчики */
.student-roster-summary{display:flex;align-items:center;gap:12px 24px;flex-wrap:wrap;margin:12px 0;padding:12px 16px;border:1px solid #d9e6eb;border-radius:14px;background:linear-gradient(180deg,#fff,#f5fafc);color:#405d69}
.student-roster-summary span{display:inline-flex;align-items:baseline;gap:6px}
.student-roster-summary strong{font-size:20px;color:#173642}
.contingent-number-col,.contingent-number-cell{width:58px;min-width:58px;text-align:center!important}
.contingent-number-col{font-weight:800}
.contingent-number-cell{font-weight:800;color:#315d6a;background:#f6fafb}
@media(max-width:720px){.student-roster-summary{align-items:stretch;flex-direction:column;gap:6px}.contingent-number-col,.contingent-number-cell{width:48px;min-width:48px}}


/* v0.7.88 - явное состояние и удаление материалов в карточках урока */
.lesson-link-state{display:inline-flex;align-items:center;gap:5px;padding:8px 11px;border-radius:999px;background:#e8f7ef;color:#176a45;font-weight:700;white-space:nowrap}
.lesson-link-clear{white-space:nowrap}
.admin-lesson-material-upload,.teacher-lesson-video-upload{display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin-top:12px;padding-top:12px;border-top:1px solid rgba(36,75,90,.14)}
.teacher-lesson-video-panel{display:grid;gap:12px;padding:16px;border:1px solid rgba(47,143,157,.22);border-radius:16px;background:rgba(142,216,198,.08)}
.teacher-lesson-video-panel h3{margin:0 0 4px}.teacher-lesson-video-panel p{margin:0}
.lesson-link-edit-row,.teacher-editable-link-row{flex-wrap:wrap}
@media(max-width:720px){.lesson-link-state{width:max-content}.admin-lesson-material-upload,.teacher-lesson-video-upload{align-items:stretch;flex-direction:column}.admin-lesson-material-upload .btn,.teacher-lesson-video-upload .btn{width:100%}}


/* v0.7.88 - настройки сайта: широкое адаптивное окно без сжатых подписей */
#eios-site-dialog.eios-site-settings-dialog{width:min(960px,calc(100vw - 32px));max-width:960px;max-height:calc(100vh - 32px);padding:0;border:0;border-radius:22px;overflow:hidden}
#eios-site-dialog.eios-site-settings-dialog::backdrop{background:rgba(16,40,51,.52);backdrop-filter:blur(3px)}
#eios-site-dialog .modal-card{width:100%;max-width:none;max-height:calc(100vh - 32px);overflow:auto;padding:26px}
#eios-site-dialog .modal-head{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;margin-bottom:22px}
#eios-site-dialog .modal-head h2{margin:0 0 7px;font-size:26px;line-height:1.15}
#eios-site-dialog .modal-head p{max-width:720px;line-height:1.45}
#eios-site-dialog .form-grid.two-col{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px 22px}
#eios-site-dialog .form-grid>label{display:grid;gap:7px;min-width:0;color:#405d69;font-size:13px;font-weight:700}
#eios-site-dialog .form-grid .span-2{grid-column:1/-1}
#eios-site-dialog input{width:100%;min-width:0;min-height:46px;padding:10px 12px;font-size:15px}
#eios-site-dialog input[readonly]{background:#f0f5f7;color:#627780;cursor:not-allowed}
#eios-site-dialog .check-label{display:flex!important;align-items:center;gap:10px;align-self:end;min-height:46px}
#eios-site-dialog .check-label input{width:18px;min-height:18px}
#eios-site-dialog .field-help{font-weight:400;line-height:1.4;color:#73858d}
#eios-site-dialog .modal-actions{position:sticky;bottom:-26px;display:flex;justify-content:flex-end;gap:10px;margin:24px -26px -26px;padding:16px 26px 20px;background:#fff;border-top:1px solid #dbe7eb}
@media(max-width:720px){#eios-site-dialog.eios-site-settings-dialog{width:calc(100vw - 12px);max-height:calc(100vh - 12px)}#eios-site-dialog .modal-card{padding:18px;max-height:calc(100vh - 12px)}#eios-site-dialog .form-grid.two-col{grid-template-columns:1fr}#eios-site-dialog .form-grid .span-2{grid-column:auto}#eios-site-dialog .modal-actions{bottom:-18px;margin:20px -18px -18px;padding:14px 18px 18px}}

/* v0.7.88 - шаблоны автоматической рассылки реквизитов доступа */
.access-mail-template-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;margin-top:16px}
.access-mail-template-card{display:grid;gap:12px;padding:18px;border:1px solid #d8e6ea;border-radius:16px;background:#fbfdfe}
.access-mail-template-card h3{margin:0;color:#244b5a}
.access-mail-template-card label{display:grid;gap:6px;font-weight:700;color:#425e6b}
.access-mail-template-card input,.access-mail-template-card textarea{width:100%;min-width:0}
.access-mail-template-card textarea{resize:vertical;line-height:1.45}
@media(max-width:900px){.access-mail-template-grid{grid-template-columns:1fr}}

/* v0.7.88 - вход обучающихся в защищённую ЭИОС */
.eios-student-login-page{
  background:
    radial-gradient(circle at 12% 12%,rgba(109,169,216,.18),transparent 28%),
    radial-gradient(circle at 88% 86%,rgba(142,216,198,.18),transparent 30%),
    linear-gradient(140deg,#e8f4f4,#f8fbfc);
}
.eios-student-login-card{
  width:min(500px,calc(100vw - 30px));
  padding:30px 34px 28px;
}
.eios-student-login-logo-wrap{
  display:flex;
  justify-content:center;
  margin:-4px 0 12px;
}
.eios-student-login-logo{
  width:118px;
  height:118px;
  object-fit:contain;
  border-radius:16px;
  background:#fff;
  box-shadow:0 8px 24px rgba(16,40,51,.10);
}
.eios-student-login-kicker{
  margin:0 0 7px;
  text-align:center;
  color:var(--teal,#2f8f9d);
  font-size:12px;
  letter-spacing:.06em;
  text-transform:uppercase;
}
.eios-student-login-card h1{
  margin:0;
  text-align:center;
  color:var(--dark,#102833);
  font-size:25px;
  line-height:1.22;
}
.eios-student-login-intro{
  margin:10px 0 22px;
  text-align:center;
  line-height:1.55;
}
.eios-student-login-form label{
  color:var(--dark,#102833);
}
.eios-student-login-actions{
  margin-top:4px;
}
.eios-student-login-help{
  margin-top:20px;
  padding:14px 15px;
  border:1px solid #dce8ef;
  border-radius:12px;
  background:#f5fafc;
  color:#5d7281;
  font-size:12.5px;
  line-height:1.5;
}
.eios-student-login-help strong{
  display:block;
  margin-bottom:3px;
  color:#31546d;
}
.eios-student-login-version{
  margin-top:12px;
  text-align:center;
  color:#78909c;
  font-size:11.5px;
}
.teacher-file-delete{
  border:0;
  background:transparent;
  color:#b13d3d;
  cursor:pointer;
  font:inherit;
  font-size:12px;
  padding:0;
  text-decoration:underline;
  text-underline-offset:2px;
}
.teacher-file-delete:hover{color:#861f1f}
@media(max-width:560px){
  .eios-student-login-card{padding:24px 20px 22px}
  .eios-student-login-logo{width:96px;height:96px}
  .eios-student-login-card h1{font-size:21px}
  .eios-student-login-actions{display:grid;grid-template-columns:1fr}
}

/* v0.7.88 - review attachments */
.teacher-review-file-actions{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
#teacher-review-files{padding:9px;background:#fff;border:1px solid var(--border,#dce8ef);border-radius:10px}
.sw87-teacher-feedback{margin-top:12px}.sw87-teacher-feedback h4{margin:0 0 8px;color:#31546d}.sw87-teacher-feedback .sw87-teacher-comment{margin:8px 0;padding:12px 14px;border:1px solid #dce8ef;border-radius:12px;background:#f8fbfd}.sw87-teacher-feedback .sw87-teacher-comment>span{display:block;margin-top:2px;color:#5d7281;font-size:12px}

/* v0.8.08 - автоматические тесты и график контрольных работ */
.teacher-test-import-form,.teacher-test-confirm-form{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:12px;align-items:end;margin-top:16px}.teacher-test-import-form label,.teacher-test-confirm-form label{display:flex;flex-direction:column;gap:6px}.teacher-test-preview{margin-top:20px;display:grid;gap:16px}.teacher-test-preview-head{display:flex;justify-content:space-between;gap:14px}.teacher-test-preview-head>div{display:flex;flex-direction:column;gap:4px}.teacher-test-check{flex-direction:row!important;align-items:center;align-self:center}.teacher-test-confirm-note{grid-column:1/-1;padding:10px 12px;border-radius:10px;background:rgba(49,84,109,.07);font-size:13px}.teacher-tests-list{display:grid;gap:12px}.teacher-test-card{display:grid;grid-template-columns:minmax(260px,1.4fr) minmax(300px,1fr) auto;gap:16px;align-items:center;padding:16px;border:1px solid rgba(16,40,51,.12);border-radius:14px;background:#fff}.teacher-test-card h3{margin:7px 0 5px}.teacher-test-card p{margin:0;color:#5c717c}.teacher-test-card-top{display:flex;gap:8px;align-items:center}.teacher-test-card-stats{display:grid;grid-template-columns:repeat(2,minmax(90px,1fr));gap:8px}.teacher-test-card-stats span{display:flex;flex-direction:column;padding:8px 10px;border-radius:10px;background:rgba(47,143,157,.08);font-size:12px}.teacher-test-card-stats b{font-size:18px}.teacher-test-topic-stats{margin:10px 0 18px}.teacher-topic-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:10px}.teacher-topic-stat{display:grid;gap:5px;padding:12px;border-radius:12px;background:rgba(49,84,109,.06)}.teacher-topic-stat span,.teacher-topic-stat small{font-size:12px;color:#5c717c}.teacher-topic-bar{height:8px;border-radius:999px;background:rgba(16,40,51,.1);overflow:hidden}.teacher-topic-bar i{display:block;height:100%;background:#31546d;border-radius:inherit}.teacher-assessment-calendar-list .badge.success{background:rgba(47,143,157,.12)}.teacher-assessment-calendar-list .badge.warning{background:rgba(196,138,32,.13)}
.student-assessment-calendar{display:grid;gap:10px}.student-assessment-card{display:flex;justify-content:space-between;gap:14px;padding:13px 14px;border:1px solid rgba(16,40,51,.12);border-radius:12px;background:#fff}.student-assessment-card>div{display:flex;flex-direction:column;gap:5px}.student-assessment-card small{color:#5c717c}.student-assessment-card p{margin:0;max-width:420px;color:#5c717c}.auto-test-intro{display:grid;gap:10px}.auto-test-intro h3{margin:0}.auto-test-meta{display:flex;flex-wrap:wrap;gap:8px}.auto-test-meta span,.auto-test-history span{padding:6px 9px;border-radius:999px;background:rgba(49,84,109,.07);font-size:12px}.auto-test-form{display:grid;gap:14px}.auto-test-attempt-head{display:flex;justify-content:space-between;padding:12px;border-radius:12px;background:rgba(47,143,157,.08)}.auto-test-question{display:grid;gap:12px;border:1px solid rgba(16,40,51,.14);border-radius:14px;padding:15px}.auto-test-question legend{font-weight:700;padding:0 6px}.auto-test-question legend span{display:inline-grid;place-items:center;width:25px;height:25px;margin-right:7px;border-radius:50%;background:#31546d;color:#fff}.auto-test-options{display:grid;gap:8px}.auto-test-options label{display:flex;gap:10px;align-items:flex-start;padding:10px;border:1px solid rgba(16,40,51,.1);border-radius:10px;cursor:pointer}.auto-test-short{display:grid;gap:6px}.auto-test-result{display:grid;gap:14px}.auto-test-grade{display:grid;grid-template-columns:1fr auto;gap:3px 15px;align-items:center;padding:15px;border-radius:14px;background:rgba(47,143,157,.09)}.auto-test-grade span,.auto-test-grade small{color:#5c717c}.auto-test-grade strong{grid-row:1/3;grid-column:2;font-size:42px;line-height:1}.auto-test-chart{display:flex;height:22px;overflow:hidden;border-radius:999px;background:rgba(16,40,51,.08)}.auto-test-chart-good{background:#2f8f9d}.auto-test-chart-bad{background:#b96868}.auto-test-chart-legend{display:flex;gap:18px;flex-wrap:wrap;font-size:13px}.auto-test-repeat{display:grid;gap:8px;padding:13px;border-radius:12px;background:rgba(109,169,216,.1)}.auto-test-repeat h4,.auto-test-wrong h4{margin:0}.auto-test-repeat>div{display:flex;justify-content:space-between;gap:12px}.auto-test-repeat-ok{background:rgba(142,216,198,.18)}.auto-test-wrong{display:grid;gap:10px}.auto-test-wrong article{padding:13px;border:1px solid rgba(185,104,104,.25);border-radius:12px;background:rgba(185,104,104,.04)}.auto-test-wrong h5{font-size:15px;margin:8px 0}.auto-test-wrong p{margin:5px 0}.auto-test-history{display:flex;flex-wrap:wrap;gap:7px;align-items:center}.auto-test-history h4{width:100%;margin:0 0 3px}
@media(max-width:850px){.teacher-test-card{grid-template-columns:1fr}.teacher-test-card-stats{grid-template-columns:repeat(2,1fr)}.student-assessment-card{flex-direction:column}}
.assessment-calendar-import-form{display:flex;gap:12px;align-items:end;flex-wrap:wrap;margin:14px 0}.assessment-calendar-import-form label{display:grid;gap:6px;min-width:280px}.assessment-calendar-preview{display:grid;gap:12px;margin:14px 0;padding:14px;border:1px solid rgba(16,40,51,.12);border-radius:14px;background:rgba(49,84,109,.03)}.assessment-preview-summary{display:flex;gap:12px;flex-wrap:wrap;align-items:center}.assessment-preview-summary span{padding:6px 9px;border-radius:999px;background:rgba(49,84,109,.08);font-size:12px}.assessment-calendar-list{margin-top:14px}.row-error{background:rgba(185,104,104,.05)}

/* v0.8.08 - явные кнопки создания работ преподавателя */
.teacher-work-create-actions{display:flex;flex-wrap:wrap;gap:8px;justify-content:flex-end;align-items:center;max-width:100%}
.teacher-work-create-actions .btn{white-space:nowrap}
.schedule-replace-note{margin-top:12px}
@media(max-width:900px){.teacher-work-create-actions{justify-content:flex-start;width:100%}}

/* v0.8.08 - безопасная замена расписания */
.schedule-variant-actions{display:flex;flex-wrap:wrap;gap:8px;align-items:center;justify-content:flex-end}
.schedule-import-deactivate-btn{font-weight:700}

/* v0.8.08 - библиотека и назначения автоматических тестов */
.teacher-test-list-group{display:grid;gap:12px}.teacher-test-list-group>h3{margin:8px 0 0;color:#244b5a}.teacher-test-card-actions{display:flex;flex-wrap:wrap;gap:8px;justify-content:flex-end}.teacher-test-template-card{border-left:4px solid #2f8f9d}.teacher-test-assign-form{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px;align-items:end}.teacher-test-assign-form label{display:flex;flex-direction:column;gap:6px}.teacher-test-students-box{grid-column:1/-1;padding:12px;border:1px solid rgba(16,40,51,.12);border-radius:12px;background:rgba(49,84,109,.03)}.teacher-test-students-head{display:flex;gap:12px;justify-content:space-between;align-items:center;margin-bottom:10px}.teacher-test-students-head input{max-width:320px}.teacher-test-students-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:8px;max-height:300px;overflow:auto}.teacher-test-student-row{display:flex!important;flex-direction:row!important;align-items:flex-start;gap:9px;padding:9px 10px;border:1px solid rgba(16,40,51,.1);border-radius:10px;background:#fff}.teacher-test-student-row span{display:flex;flex-direction:column;gap:2px}.teacher-test-student-row small{color:#5c717c}.teacher-test-student-preview-questions{display:grid;gap:12px;margin-top:14px}.danger-outline{border-color:rgba(185,104,104,.45)!important;color:#8f4444!important;background:#fff!important}
@media(max-width:850px){.teacher-test-card-actions{justify-content:flex-start}.teacher-test-students-head{align-items:stretch;flex-direction:column}.teacher-test-students-head input{max-width:none}}

/* v0.8.08 - тест обучающегося в фирменном закрытом дизайне ЭИОС */
#student-auto-test-section{padding:0;overflow:hidden;background:#f4f8fa;border-color:rgba(49,84,109,.14)}
#student-auto-test-content{min-height:280px;color:#213944}
.auto-test-school-shell,.auto-test-student-intro-shell,.auto-test-result-page{--test-dark:#244b5a;--test-main:#31546d;--test-teal:#2f8f9d;--test-mint:#8ed8c6;--test-sky:#6da9d8;--test-text:#213944;--test-muted:#5c717c;--test-line:rgba(16,40,51,.13);display:grid;gap:0;background:#f6fafc;color:var(--test-text)}
.auto-test-school-hero{position:relative;overflow:hidden;padding:24px 26px;background:linear-gradient(135deg,#244b5a 0%,#31546d 55%,#2f8f9d 145%);color:#fff}
.auto-test-school-hero:after{content:"";position:absolute;width:220px;height:220px;right:-86px;top:-104px;border:38px solid rgba(142,216,198,.13);border-radius:50%}
.auto-test-school-kicker{position:relative;z-index:1;margin-bottom:8px;color:#bfece0;font-size:12px;font-weight:800;letter-spacing:.08em;text-transform:uppercase}
.auto-test-school-hero h3{position:relative;z-index:1;margin:0;font-size:25px;line-height:1.24;color:#fff}
.auto-test-school-hero p{position:relative;z-index:1;max-width:720px;margin:9px 0 0;color:rgba(255,255,255,.84);line-height:1.5}
.auto-test-school-hero-row{position:relative;z-index:1;display:flex;justify-content:space-between;gap:24px;align-items:flex-start}
.auto-test-attempt-badge{display:grid;min-width:104px;padding:11px 14px;border:1px solid rgba(255,255,255,.2);border-radius:14px;background:rgba(255,255,255,.08);text-align:center;backdrop-filter:blur(3px)}
.auto-test-attempt-badge span,.auto-test-attempt-badge small{font-size:11px;color:rgba(255,255,255,.75)}.auto-test-attempt-badge strong{font-size:24px;line-height:1.15}
.auto-test-progress-panel{display:grid;gap:10px;padding:16px 24px;border-bottom:1px solid var(--test-line);background:#fff}
.auto-test-progress-head{display:flex;justify-content:space-between;gap:16px;align-items:center}.auto-test-progress-head strong{color:var(--test-dark)}.auto-test-progress-head span{color:var(--test-muted);font-size:13px}
.auto-test-progress-track{height:8px;overflow:hidden;border-radius:999px;background:#e8eff2}.auto-test-progress-track>div{height:100%;border-radius:inherit;background:linear-gradient(90deg,var(--test-teal),var(--test-mint));transition:width .25s ease}
.auto-test-question-palette{display:flex;gap:6px;flex-wrap:wrap}.auto-test-palette-btn{width:31px;height:31px;border:1px solid #cbd9df;border-radius:9px;background:#f7fafb;color:#55707c;font-weight:700;cursor:pointer}.auto-test-palette-btn:hover{border-color:var(--test-teal)}.auto-test-palette-btn.answered{background:#e5f6f0;border-color:#8ed8c6;color:#246b6e}.auto-test-palette-btn.active{background:var(--test-main);border-color:var(--test-main);color:#fff;box-shadow:0 5px 12px rgba(49,84,109,.18)}
.auto-test-question-stage{padding:22px 24px 12px}.auto-test-question-school{min-height:300px;margin:0;padding:22px;border:1px solid var(--test-line);border-radius:18px;background:#fff;box-shadow:0 10px 28px rgba(35,67,82,.06)}
.auto-test-question-school legend{display:flex;align-items:flex-start;max-width:100%;padding:0 8px;color:var(--test-dark);font-size:18px;line-height:1.45}.auto-test-question-school legend span{flex:0 0 32px;width:32px;height:32px;margin:0 10px 0 0;background:linear-gradient(145deg,var(--test-main),var(--test-teal));font-size:14px}.auto-test-question-school legend em{font-style:normal;font-weight:800}
.auto-test-question-meta{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}.auto-test-multi-note{padding:6px 9px;border-radius:999px;background:rgba(109,169,216,.12);color:#416c8c;font-size:12px}
.auto-test-question-school .auto-test-options{margin-top:4px;gap:10px}.auto-test-question-school .auto-test-options label{position:relative;display:block;padding:0;border:0;background:transparent}.auto-test-question-school .auto-test-options input{position:absolute;opacity:0;pointer-events:none}.auto-test-question-school .auto-test-options label>span{display:flex;align-items:flex-start;gap:11px;min-height:48px;padding:12px 14px;border:1px solid #d7e2e7;border-radius:13px;background:#fbfdfe;line-height:1.45;transition:.16s ease}.auto-test-question-school .auto-test-options label>span>b{display:grid;place-items:center;flex:0 0 28px;width:28px;height:28px;border-radius:9px;background:#eaf1f4;color:#31546d;font-size:12px}.auto-test-question-school .auto-test-options label:hover>span{border-color:#8fbfc3;background:#f3faf9;transform:translateY(-1px)}.auto-test-question-school .auto-test-options input:checked+span{border-color:var(--test-teal);background:#eaf8f5;box-shadow:inset 4px 0 0 var(--test-teal)}.auto-test-question-school .auto-test-options input:checked+span>b{background:var(--test-teal);color:#fff}.auto-test-question-school .auto-test-options input:focus-visible+span{outline:3px solid rgba(109,169,216,.25);outline-offset:2px}
.auto-test-question-school .auto-test-short{margin-top:12px}.auto-test-question-school .auto-test-short>span{font-weight:700;color:var(--test-dark)}.auto-test-question-school .auto-test-short input{min-height:48px;border-radius:12px;border:1px solid #cddbe1;padding:10px 12px;font-size:15px}
.auto-test-navigation{display:flex;justify-content:flex-end;gap:10px;padding:12px 24px 8px}.auto-test-nav-btn,.auto-test-finish{min-width:158px}.auto-test-exit-row{display:flex;justify-content:space-between;gap:16px;align-items:center;padding:4px 24px 22px}.auto-test-close-link{padding:7px 0;border:0;background:transparent;color:#6c818b;text-decoration:underline;cursor:pointer}
.auto-test-school-hero-intro{padding:28px}.auto-test-intro-cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;padding:18px 24px}.auto-test-intro-cards>div{display:grid;gap:5px;padding:14px 16px;border:1px solid var(--test-line);border-radius:14px;background:#fff}.auto-test-intro-cards span{font-size:12px;color:var(--test-muted)}.auto-test-intro-cards strong{font-size:21px;color:var(--test-dark)}
.auto-test-last-result,.auto-test-history{margin:0 24px 16px;padding:16px;border:1px solid var(--test-line);border-radius:16px;background:#fff}.auto-test-history{display:grid;gap:10px}.auto-test-history h4{margin:0;color:var(--test-dark)}.auto-test-history>div{display:flex;flex-wrap:wrap;gap:7px}.auto-test-intro-actions{display:flex;justify-content:flex-end;gap:10px;align-items:center;padding:6px 24px 24px}.auto-test-start-btn{min-width:160px}.auto-test-no-attempts{color:var(--test-muted)}
.auto-test-result-school{padding:20px 24px 24px}.auto-test-result-summary{display:grid;grid-template-columns:auto minmax(190px,1fr) minmax(220px,1.25fr);gap:14px;align-items:stretch}.auto-test-result-ring{--test-pct:0;display:grid;place-items:center;width:126px;height:126px;border-radius:50%;background:conic-gradient(#2f8f9d var(--test-pct),#e5ecef 0);position:relative}.auto-test-result-ring:after{content:"";position:absolute;inset:12px;border-radius:50%;background:#fff}.auto-test-result-ring>div{position:relative;z-index:1;display:grid;text-align:center}.auto-test-result-ring strong{font-size:27px;color:#244b5a}.auto-test-result-ring span{font-size:11px;color:#6a7f89}.auto-test-grade-school{align-content:center;border:1px solid rgba(47,143,157,.14)}.auto-test-result-numbers{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.auto-test-result-numbers>div{display:grid;place-items:center;align-content:center;padding:10px;border-radius:13px;background:#f3f8fa}.auto-test-result-numbers b{font-size:24px;color:#31546d}.auto-test-result-numbers span{font-size:11px;color:#6a7f89;text-align:center}
.auto-test-result-chart-card{display:grid;gap:10px;padding:16px;border:1px solid var(--test-line);border-radius:15px;background:#fff}.auto-test-section-title{display:flex;justify-content:space-between;gap:10px;align-items:center}.auto-test-section-title>span{font-weight:800;color:#244b5a}.auto-test-section-title small{color:#6a7f89}.auto-test-chart{height:16px}.auto-test-chart-legend .good{color:#246f74}.auto-test-chart-legend .bad{color:#965757}.auto-test-section-lead{margin:0;color:#637a85;font-size:13px}
.auto-test-repeat{padding:16px;border:1px solid rgba(109,169,216,.18);border-radius:15px}.auto-test-repeat h4{color:#244b5a}.auto-test-repeat>div{padding:7px 0;border-top:1px solid rgba(49,84,109,.08)}.auto-test-wrong article{padding:16px;border-radius:15px;background:#fff9f8}.auto-test-wrong-head{display:flex;justify-content:space-between;align-items:center;color:#7c6762;font-size:12px}.auto-test-answer-compare{display:grid;grid-template-columns:1fr 1fr;gap:10px}.auto-test-answer-compare p{display:grid;gap:4px;padding:10px 12px;border-radius:10px;background:#fff}.auto-test-answer-compare span{font-size:11px;color:#6a7f89}.auto-test-explanation{padding:10px 12px;border-left:3px solid #6da9d8;background:#f2f7fb;border-radius:8px}
.auto-test-result-page>.auto-test-intro-actions{background:#f6fafc}
@media(max-width:760px){.auto-test-school-hero{padding:20px}.auto-test-school-hero-row{display:grid}.auto-test-attempt-badge{justify-self:start;grid-template-columns:auto auto auto;gap:6px;align-items:center}.auto-test-attempt-badge strong{font-size:18px}.auto-test-progress-panel,.auto-test-question-stage{padding-left:14px;padding-right:14px}.auto-test-question-school{padding:17px;min-height:260px}.auto-test-question-school legend{font-size:16px}.auto-test-navigation{display:grid;grid-template-columns:1fr 1fr;padding-left:14px;padding-right:14px}.auto-test-navigation .btn{min-width:0;width:100%}.auto-test-finish{grid-column:1/-1}.auto-test-exit-row{padding-left:14px;padding-right:14px}.auto-test-intro-cards{grid-template-columns:1fr;padding:14px}.auto-test-last-result,.auto-test-history{margin-left:14px;margin-right:14px}.auto-test-intro-actions{padding-left:14px;padding-right:14px;flex-wrap:wrap}.auto-test-result-school{padding:14px}.auto-test-result-summary{grid-template-columns:1fr}.auto-test-result-ring{justify-self:center}.auto-test-result-numbers{grid-template-columns:repeat(3,1fr)}.auto-test-answer-compare{grid-template-columns:1fr}.auto-test-section-title{align-items:flex-start;flex-direction:column}.auto-test-progress-head{align-items:flex-start;flex-direction:column;gap:3px}}

/* v0.8.08 - явный фильтр Контингента по классу */
.student-contingent-filters .compact-field{display:flex;flex-direction:column;gap:5px;min-width:170px}.student-contingent-filters .compact-field>span{font-size:12px;color:#5c717c}.student-contingent-filters .student-filter-search{min-width:260px;flex:1}.student-contingent-filters .student-filter-class{min-width:190px}.student-contingent-filters .student-filter-sort{min-width:190px}


/* v0.8.09 - Контингент: фильтр класса должен быть заметен и не теряться в toolbar */
.student-class-quick-filter{display:flex;align-items:center;gap:16px;margin:0 0 12px;padding:14px 16px;border:1px solid rgba(47,143,157,.20);border-radius:14px;background:linear-gradient(180deg,#fff,#f2f8f8);box-shadow:0 7px 20px rgba(16,40,51,.035)}
.student-class-quick-filter label{display:flex!important;flex-direction:column;gap:6px;min-width:280px;margin:0!important}.student-class-quick-filter label>span{font-size:12.5px;color:#4d6570}.student-class-quick-filter select{min-width:280px;height:42px}.student-class-quick-filter>div{display:flex;flex-direction:column;gap:3px}.student-class-quick-filter>div strong{font-size:14px;color:#244b5a;font-weight:600}.student-class-quick-filter>div span{font-size:12.5px;color:#5c717c}
@media(max-width:760px){.student-class-quick-filter{align-items:stretch;flex-direction:column}.student-class-quick-filter label,.student-class-quick-filter select{min-width:0;width:100%}}

/* v0.8.09 - банк тестов: ручной конструктор и аккуратный интерфейс ЭИОС */
.teacher-test-create-modes{display:flex;gap:8px;flex-wrap:wrap;margin:12px 0 16px}.teacher-test-create-modes .btn.active{border-color:#2f8f9d;background:#eaf7f4;color:#244b5a}
.teacher-test-create-panel{padding:16px;border:1px solid rgba(16,40,51,.12);border-radius:14px;background:#fbfdfe}
.teacher-test-manual-form{display:grid;gap:16px}.teacher-test-manual-settings{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:12px}.teacher-test-manual-settings label{display:flex;flex-direction:column;gap:6px}.teacher-test-manual-description{grid-column:1/-1}
.teacher-test-manual-head{display:flex;justify-content:space-between;gap:14px;align-items:center}.teacher-test-manual-head h3{margin:0;color:#244b5a;font-size:17px}.teacher-test-manual-head p{margin:4px 0 0}
.teacher-test-manual-questions{display:grid;gap:14px}.teacher-test-manual-question{padding:16px;border:1px solid rgba(49,84,109,.15);border-radius:14px;background:#fff;box-shadow:0 6px 18px rgba(16,40,51,.035)}.teacher-test-manual-question-head{display:flex;justify-content:space-between;gap:12px;align-items:center;margin-bottom:12px}.teacher-test-manual-question-head strong{color:#244b5a;font-size:15px}.teacher-test-manual-question-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 12px}.teacher-test-manual-question-grid label{display:flex;flex-direction:column;gap:6px}.teacher-test-manual-question-grid .manual-q-wide{grid-column:1/-1}.teacher-test-manual-question textarea{resize:vertical}.teacher-test-manual-question input[type="file"]{padding:8px;border:1px dashed rgba(47,143,157,.35);border-radius:10px;background:#f6fbfa}
@media(max-width:760px){.teacher-test-manual-head{align-items:flex-start;flex-direction:column}.teacher-test-manual-question-grid{grid-template-columns:1fr}.teacher-test-manual-question-grid .manual-q-wide{grid-column:auto}}

/* v0.8.09 - тест обучающегося: умеренная типографика, таймер и изображения */
.auto-test-school-hero h3{font-family:Arial,"Helvetica Neue",sans-serif;font-size:21px!important;line-height:1.32!important;font-weight:600!important;overflow-wrap:anywhere}.auto-test-school-kicker{font-family:Arial,"Helvetica Neue",sans-serif;font-weight:600!important}.auto-test-school-hero p{font-family:Arial,"Helvetica Neue",sans-serif;font-size:14px;overflow-wrap:anywhere}
.auto-test-head-tags{position:relative;z-index:1;display:flex;flex-wrap:wrap;gap:6px;margin:0 0 9px}.auto-test-head-tags span{display:inline-flex;align-items:center;min-height:25px;padding:4px 8px;border:1px solid rgba(255,255,255,.18);border-radius:999px;background:rgba(255,255,255,.08);color:rgba(255,255,255,.9);font-size:11px;font-weight:400}
.auto-test-head-side{display:flex;align-items:stretch;gap:8px;flex:0 0 auto}.auto-test-timer{display:grid;align-content:center;min-width:112px;padding:9px 12px;border:1px solid rgba(255,255,255,.22);border-radius:12px;background:rgba(255,255,255,.10);text-align:center}.auto-test-timer span{font-size:10.5px;color:rgba(255,255,255,.72)}.auto-test-timer strong{margin-top:2px;color:#fff;font-size:19px;font-weight:600}.auto-test-timer-free strong{font-size:12px}.auto-test-timer.warning{background:rgba(214,168,77,.22)}.auto-test-timer.danger{background:rgba(175,74,74,.34);border-color:rgba(255,255,255,.4)}
.auto-test-question-school legend{font-family:Arial,"Helvetica Neue",sans-serif;font-size:16px!important;line-height:1.48!important;overflow-wrap:anywhere}.auto-test-question-school legend em{font-weight:600!important}.auto-test-question-school .auto-test-options label>span{font-family:Arial,"Helvetica Neue",sans-serif;font-size:14px;overflow-wrap:anywhere}.auto-test-question-school .auto-test-options label>span>b{font-weight:600}
.auto-test-question-figure{display:grid;place-items:center;margin:14px 0 16px;padding:10px;border:1px solid rgba(49,84,109,.12);border-radius:13px;background:#f7fafb}.auto-test-question-figure img{display:block;max-width:100%;max-height:470px;width:auto;height:auto;object-fit:contain;border-radius:8px}
.auto-test-intro-cards{grid-template-columns:repeat(auto-fit,minmax(150px,1fr))}.auto-test-intro-cards strong{font-size:16px!important;line-height:1.35;font-weight:600;overflow-wrap:anywhere}
.auto-test-result-numbers{grid-template-columns:repeat(4,1fr)}.auto-test-result-numbers b{font-size:20px;font-weight:600}.auto-test-time-result{display:flex;gap:10px;align-items:baseline;flex-wrap:wrap;margin:12px 0;padding:12px 14px;border:1px solid rgba(49,84,109,.12);border-radius:13px;background:#fff}.auto-test-time-result span,.auto-test-time-result small{color:#5c717c;font-size:12px}.auto-test-time-result strong{color:#244b5a;font-size:18px;font-weight:600}.auto-test-ungraded strong{font-size:18px!important}
@media(max-width:760px){.auto-test-head-side{width:100%;flex-wrap:wrap}.auto-test-timer,.auto-test-attempt-badge{flex:1;min-width:120px}.auto-test-result-numbers{grid-template-columns:repeat(2,1fr)}.auto-test-question-figure img{max-height:320px}}

/* v0.8.09 - фильтры банка тестов */
.teacher-test-bank-filters{display:grid;grid-template-columns:repeat(4,minmax(170px,1fr)) auto;gap:10px;align-items:end;margin:12px 0 16px;padding:12px 14px;border:1px solid rgba(49,84,109,.12);border-radius:13px;background:#f8fbfc}.teacher-test-bank-filters label{display:flex;flex-direction:column;gap:5px;color:#526a76;font-size:12px}.teacher-test-bank-filters select{min-height:40px}.teacher-test-bank-filters .btn{min-height:40px}@media(max-width:980px){.teacher-test-bank-filters{grid-template-columns:repeat(2,minmax(0,1fr))}.teacher-test-bank-filters .btn{width:100%}}@media(max-width:560px){.teacher-test-bank-filters{grid-template-columns:1fr}}
/* v0.8.09 - окончательная типографика теста без тяжёлых заголовков */
.auto-test-section-title>span,.auto-test-repeat h4,.auto-test-wrong h4,.auto-test-history h4,.auto-test-last-result h4{font-weight:600!important}.auto-test-grade-school strong,.auto-test-result-ring strong{font-weight:600!important}.auto-test-question-school,.auto-test-options label>span{word-break:normal;hyphens:auto}.auto-test-school-hero,.auto-test-question-school,.auto-test-result-school{overflow:hidden}

/* v0.8.09 - ручной выбор итоговой оценки после повторных попыток */
.teacher-test-final-grade{display:grid;grid-template-columns:minmax(150px,1fr) 72px auto;gap:7px;align-items:center;min-width:330px}
.teacher-test-final-grade select{min-width:0;width:100%}
.teacher-test-final-grade small{grid-column:1/-1;line-height:1.35}
@media(max-width:760px){.teacher-test-final-grade{grid-template-columns:1fr 72px;min-width:250px}.teacher-test-final-grade .btn{grid-column:1/-1}}

/* v0.8.09 - финальная защита макета теста от наложения заголовков */
.auto-test-school-hero-row>div:first-child{min-width:0;flex:1 1 auto}
.auto-test-school-hero h3{margin:0!important;max-width:100%;color:#fff!important;font-family:Arial,"Helvetica Neue",sans-serif!important;font-size:20px!important;line-height:1.35!important;font-weight:600!important;letter-spacing:0!important;text-transform:none!important;overflow-wrap:anywhere}
.auto-test-school-hero p{max-width:100%;color:rgba(255,255,255,.88)!important}
.auto-test-school-kicker{color:#bfece0!important}
.auto-test-head-side{min-width:0;max-width:270px}
.auto-test-attempt-badge strong{color:#fff!important;font-weight:600!important}
.auto-test-question-palette .auto-test-palette-btn{appearance:none;-webkit-appearance:none;display:inline-grid;place-items:center;padding:0;font-family:Arial,"Helvetica Neue",sans-serif!important;font-size:12px!important;font-weight:600!important;line-height:1!important}
@media(max-width:900px){.auto-test-school-hero-row{flex-wrap:wrap}.auto-test-head-side{max-width:none}}
@media(max-width:560px){.auto-test-school-hero h3{font-size:18px!important}.auto-test-school-kicker{font-size:11px!important;letter-spacing:.05em}.auto-test-question-palette .auto-test-palette-btn{width:30px;height:30px}}
/* v0.8.09 - mobile: grid items теста не расширяют экран по min-content */
.auto-test-school-shell{min-width:0;max-width:100%;width:100%}
.auto-test-school-shell>*{min-width:0;max-width:100%;box-sizing:border-box}
.auto-test-school-hero,.auto-test-progress-panel,.auto-test-question-stage,.auto-test-navigation,.auto-test-exit-row{width:100%;min-width:0;max-width:100%}
.auto-test-school-hero-row{min-width:0;max-width:100%}
.auto-test-question-school{min-width:0!important;width:100%;max-width:100%;box-sizing:border-box}
.auto-test-question-school legend{min-width:0;max-width:calc(100% - 12px);box-sizing:border-box}
.auto-test-question-school legend em{min-width:0;max-width:100%;overflow-wrap:anywhere;word-break:normal}
.auto-test-question-school .auto-test-options,.auto-test-question-school .auto-test-options label,.auto-test-question-school .auto-test-options label>span{min-width:0;max-width:100%;box-sizing:border-box}
@media(max-width:760px){.auto-test-head-side{width:100%;max-width:100%}.auto-test-question-stage{overflow:hidden}.auto-test-question-palette{max-width:100%;overflow-x:auto;padding-bottom:2px;flex-wrap:nowrap}.auto-test-question-palette .auto-test-palette-btn{flex:0 0 30px}}

/* v0.8.11 - назначение теста: все поля одной строки начинаются на одном уровне */
.teacher-test-assign-form{align-items:start!important}
.teacher-test-assign-form>label:not(.teacher-test-check){display:grid!important;grid-template-rows:auto 44px;align-content:start;gap:6px;min-width:0}
.teacher-test-assign-form>label:not(.teacher-test-check)>select,
.teacher-test-assign-form>label:not(.teacher-test-check)>input{width:100%;height:44px;min-height:44px;box-sizing:border-box;margin:0}
.teacher-test-assign-form>label:not(.teacher-test-check)>small{grid-row:auto;min-height:18px;line-height:1.35;margin-top:1px}
.teacher-test-assign-form>.teacher-test-check{min-height:44px;align-self:start;display:flex!important;align-items:center!important;padding:10px 12px;border:1px solid rgba(16,40,51,.10);border-radius:10px;background:#fff}
.teacher-test-assign-form>button[type="submit"]{min-height:44px;align-self:start}
.teacher-test-assign-form>#teacher-test-assign-status{align-self:center;min-height:44px;display:flex;align-items:center}
.teacher-test-manual-add-bottom{display:flex;justify-content:center;padding-top:2px}
.teacher-test-manual-add-bottom .btn{min-width:230px}
@media(max-width:760px){.teacher-test-manual-add-bottom .btn{width:100%}}


/* =========================================================
   v0.8.12 - тесты: спокойный стиль ЭИОС без жирной типографики
   и без наложения текста на границы карточек
   ========================================================= */
.auto-test-school-shell,
.auto-test-student-intro-shell,
.auto-test-result-page,
.teacher-test-preview-school,
#teacher-test-edit-panel,
#teacher-test-manual-panel,
#teacher-test-assign-panel{
  --test-dark:#243b4d;
  --test-main:#31546d;
  --test-muted:#5d7281;
  --test-teal:#2f8f9d;
  --test-blue:#6da9d8;
  --test-border:#dce8ef;
  --test-light:#f4f8fa;
  --test-white:#ffffff;
  font-family:Arial,"Helvetica Neue",sans-serif!important;
  font-weight:400!important;
}
.auto-test-school-shell *,
.auto-test-student-intro-shell *,
.auto-test-result-page *,
.teacher-test-preview-school *,
#teacher-test-edit-panel *,
#teacher-test-manual-panel *,
#teacher-test-assign-panel *{
  box-sizing:border-box!important;
  font-family:Arial,"Helvetica Neue",sans-serif!important;
  font-weight:400!important;
}
.auto-test-school-hero{
  position:relative;
  overflow:hidden;
  padding:24px 26px!important;
  border-bottom:1px solid var(--test-border)!important;
  background:
    radial-gradient(circle at 94% 8%,rgba(109,169,216,.12) 0%,rgba(109,169,216,0) 31%),
    linear-gradient(180deg,#ffffff 0%,#f7fafc 100%)!important;
  color:var(--test-dark)!important;
}
.auto-test-school-hero:after{display:none!important}
.auto-test-school-kicker{
  margin:0 0 9px!important;
  color:var(--test-muted)!important;
  font-size:12.5px!important;
  line-height:1.3!important;
  letter-spacing:.02em!important;
  text-transform:none!important;
}
.auto-test-school-hero h3{
  margin:0!important;
  max-width:1040px!important;
  color:var(--test-main)!important;
  font-size:23px!important;
  line-height:1.34!important;
  letter-spacing:.01em!important;
  text-transform:none!important;
  overflow-wrap:anywhere!important;
}
.auto-test-school-hero p{
  max-width:950px!important;
  margin:9px 0 0!important;
  color:var(--test-muted)!important;
  font-size:14px!important;
  line-height:1.55!important;
  overflow-wrap:anywhere!important;
}
.auto-test-head-tags{margin:0 0 9px!important}
.auto-test-head-tags span{
  min-height:27px!important;
  padding:5px 9px!important;
  border:1px solid rgba(49,84,109,.10)!important;
  background:rgba(255,255,255,.86)!important;
  color:var(--test-muted)!important;
  font-size:11.5px!important;
  line-height:1.2!important;
}
.auto-test-head-side{gap:9px!important}
.auto-test-timer,.auto-test-attempt-badge{
  border:1px solid var(--test-border)!important;
  background:linear-gradient(180deg,#fff 0%,#f2f7fa 100%)!important;
  color:var(--test-main)!important;
  box-shadow:0 8px 18px rgba(49,84,109,.055)!important;
}
.auto-test-timer span,.auto-test-attempt-badge span,.auto-test-attempt-badge small{color:var(--test-muted)!important}
.auto-test-timer strong,.auto-test-attempt-badge strong{color:var(--test-main)!important}
.auto-test-timer.warning{background:#fff9ed!important}.auto-test-timer.danger{background:#fff1ef!important}
.auto-test-progress-panel{background:#fff!important;border-bottom:1px solid var(--test-border)!important}
.auto-test-progress-head strong,.auto-test-progress-head span{color:var(--test-main)!important}
.auto-test-progress-track{background:#e8eff3!important}.auto-test-progress-track>div{background:linear-gradient(90deg,var(--test-blue),var(--test-teal))!important}
.auto-test-question-stage{display:grid!important;gap:14px!important;min-width:0!important;overflow:visible!important}
.auto-test-question-school{
  min-width:0!important;
  width:100%!important;
  max-width:100%!important;
  min-height:0!important;
  margin:0!important;
  padding:20px!important;
  overflow:hidden!important;
  border:1px solid var(--test-border)!important;
  border-radius:15px!important;
  background:linear-gradient(180deg,#fff 0%,#fbfdfe 100%)!important;
  color:var(--test-dark)!important;
  box-shadow:0 8px 20px rgba(49,84,109,.05)!important;
}
.auto-test-question-title{
  display:grid!important;
  grid-template-columns:42px minmax(0,1fr)!important;
  align-items:start!important;
  gap:12px!important;
  width:100%!important;
  min-width:0!important;
  margin:0 0 14px!important;
  padding:0 0 14px!important;
  border-bottom:1px solid var(--test-border)!important;
}
.auto-test-question-number{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:42px!important;
  height:42px!important;
  border:1px solid rgba(49,84,109,.11)!important;
  border-radius:12px!important;
  background:linear-gradient(145deg,#e9f4f8 0%,#d9eaf1 100%)!important;
  color:var(--test-main)!important;
  font-size:14px!important;
  line-height:1!important;
  flex-shrink:0!important;
}
.auto-test-question-title-text{
  min-width:0!important;
  max-width:100%!important;
  padding:2px 0!important;
  color:var(--test-main)!important;
  font-size:16px!important;
  line-height:1.5!important;
  overflow-wrap:anywhere!important;
  word-break:normal!important;
  hyphens:auto!important;
}
/* старый fieldset/legend, если остался в сохранённой странице, тоже не ломает макет */
.auto-test-question-school legend{max-width:100%!important;margin:0!important;padding:0!important;color:var(--test-main)!important;font-size:16px!important;line-height:1.5!important;white-space:normal!important;overflow-wrap:anywhere!important}
.auto-test-question-school legend em{font-style:normal!important;font-weight:400!important}
.auto-test-question-meta{display:flex!important;flex-wrap:wrap!important;gap:7px!important;margin:0 0 12px!important;min-width:0!important}
.auto-test-question-meta .mini-tag,.auto-test-multi-note{border:1px solid rgba(47,143,157,.13)!important;background:#f4faf9!important;color:var(--test-muted)!important}
.auto-test-options{display:grid!important;gap:9px!important;min-width:0!important}
.auto-test-options label{display:grid!important;grid-template-columns:20px minmax(0,1fr)!important;align-items:start!important;gap:10px!important;min-width:0!important;margin:0!important;padding:11px 12px!important;border:1px solid rgba(49,84,109,.11)!important;border-radius:12px!important;background:#fff!important;color:var(--test-dark)!important}
.auto-test-options label:hover{border-color:#bdd5e1!important;background:#f6fafc!important}
.auto-test-options label>input{margin-top:2px!important}
.auto-test-options label>span{display:grid!important;grid-template-columns:26px minmax(0,1fr)!important;gap:8px!important;min-width:0!important;font-size:14px!important;line-height:1.45!important;overflow-wrap:anywhere!important}
.auto-test-options label>span>b{display:flex!important;align-items:center!important;justify-content:center!important;width:26px!important;height:26px!important;border-radius:8px!important;background:#edf5f7!important;color:var(--test-main)!important;font-size:12px!important}
.auto-test-short{display:grid!important;gap:7px!important;min-width:0!important;color:var(--test-muted)!important}
.auto-test-short input{width:100%!important;min-height:44px!important;border:1px solid var(--test-border)!important;border-radius:10px!important;background:#fff!important;color:var(--test-dark)!important}
.auto-test-question-figure{overflow:hidden!important;border:1px solid var(--test-border)!important;background:#f8fbfc!important}
.auto-test-question-figure img{max-width:100%!important;height:auto!important;object-fit:contain!important}
.auto-test-question-palette .auto-test-palette-btn{font-weight:400!important}
.auto-test-question-palette .auto-test-palette-btn.active{border-color:var(--test-teal)!important;color:var(--test-main)!important;background:#eaf7f4!important}
.auto-test-intro-cards>div,.auto-test-last-result,.auto-test-history,.auto-test-result-chart-card,.auto-test-repeat,.auto-test-wrong article,.auto-test-grade-school,.auto-test-result-numbers>div,.auto-test-time-result{
  border-color:var(--test-border)!important;
  box-shadow:none!important;
}
.auto-test-intro-cards strong,.auto-test-result-ring strong,.auto-test-grade-school strong,.auto-test-result-numbers b,.auto-test-section-title>span,.auto-test-repeat h4,.auto-test-wrong h4,.auto-test-history h4,.auto-test-last-result h4,.auto-test-wrong h5,.auto-test-wrong b,.auto-test-answer-compare b{font-weight:400!important}
.auto-test-result-numbers{grid-template-columns:repeat(4,minmax(0,1fr))!important}
.auto-test-return-nav{
  display:flex!important;
  justify-content:flex-start!important;
  flex-wrap:wrap!important;
  gap:9px!important;
  margin:0!important;
  padding:0 24px 24px!important;
}
.auto-test-return-btn{min-height:42px!important;text-decoration:none!important}

/* ручной конструктор и редактор */
.teacher-test-manual-form,.teacher-test-edit-form{display:grid!important;gap:17px!important}
.teacher-test-manual-question{
  min-width:0!important;
  padding:18px!important;
  border:1px solid var(--test-border,#dce8ef)!important;
  border-radius:15px!important;
  background:linear-gradient(180deg,#fff 0%,#fbfdfe 100%)!important;
  box-shadow:0 8px 20px rgba(49,84,109,.045)!important;
}
.teacher-test-manual-question-head{padding:0 0 12px!important;margin:0 0 14px!important;border-bottom:1px solid var(--test-border,#dce8ef)!important}
.teacher-test-manual-question-head strong{color:var(--test-main,#31546d)!important;font-size:15px!important;line-height:1.4!important;font-weight:400!important}
.teacher-test-manual-question-grid{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:12px 14px!important;min-width:0!important}
.teacher-test-manual-question-grid label{min-width:0!important;color:var(--test-muted,#5d7281)!important;font-size:12.5px!important;line-height:1.35!important}
.teacher-test-manual-question-grid .manual-q-text,
.teacher-test-manual-question-grid .manual-q-options,
.teacher-test-manual-question-grid .manual-q-correct,
.teacher-test-manual-question-grid .manual-q-image,
.teacher-test-manual-question-grid .manual-q-explanation{grid-column:1/-1!important}
.teacher-test-manual-question-grid input:not([type="checkbox"]):not([type="radio"]),
.teacher-test-manual-question-grid select,
.teacher-test-manual-question-grid textarea,
.teacher-test-manual-settings input:not([type="checkbox"]),
.teacher-test-manual-settings select,
.teacher-test-manual-settings textarea{
  width:100%!important;
  min-width:0!important;
  border:1px solid var(--test-border,#dce8ef)!important;
  border-radius:10px!important;
  background:#fff!important;
  color:var(--test-dark,#243b4d)!important;
  line-height:1.4!important;
}
.teacher-test-manual-add-bottom{padding-top:4px!important}
.teacher-test-manual-add-bottom .btn{font-weight:400!important}
.teacher-test-card h3,.teacher-test-card strong,.teacher-test-card b,.teacher-test-card-actions .btn,.teacher-test-list-group h3{font-weight:400!important}
.teacher-test-card h3{color:#31546d!important;line-height:1.4!important;overflow-wrap:anywhere!important}
#teacher-test-edit-meta,#teacher-test-edit-status,#teacher-test-manual-status{line-height:1.5!important}

@media(max-width:760px){
  .auto-test-school-hero{padding:20px 16px!important}
  .auto-test-school-hero h3{font-size:20px!important}
  .auto-test-question-stage{padding-left:14px!important;padding-right:14px!important;overflow:visible!important}
  .auto-test-question-school{padding:15px!important}
  .auto-test-question-title{grid-template-columns:38px minmax(0,1fr)!important;gap:10px!important}
  .auto-test-question-number{width:38px!important;height:38px!important}
  .auto-test-question-title-text{font-size:15px!important;line-height:1.45!important}
  .auto-test-options label{grid-template-columns:18px minmax(0,1fr)!important;padding:10px!important}
  .auto-test-result-numbers{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .auto-test-return-nav{padding:0 14px 18px!important}
  .auto-test-return-btn{width:100%!important;text-align:center!important}
  .teacher-test-manual-question-grid{grid-template-columns:1fr!important}
  .teacher-test-manual-question-grid .manual-q-text,
  .teacher-test-manual-question-grid .manual-q-options,
  .teacher-test-manual-question-grid .manual-q-correct,
  .teacher-test-manual-question-grid .manual-q-image,
  .teacher-test-manual-question-grid .manual-q-explanation{grid-column:auto!important}
}
/* v0.8.12 - финальная типографическая защита: без искусственного bold */
.auto-test-school-hero h3,
.auto-test-school-kicker,
.auto-test-timer strong,
.auto-test-attempt-badge strong,
.auto-test-progress-head strong,
.auto-test-options label>span>b,
.auto-test-intro-cards strong,
.auto-test-history b,
.auto-test-result-school strong,
.auto-test-result-school b,
.auto-test-result-school h4,
.auto-test-result-school h5,
.auto-test-intro-actions .btn,
.auto-test-navigation .btn,
.auto-test-return-nav .btn,
.teacher-test-preview-school strong,
.teacher-test-preview-school b{
  font-weight:400!important;
}

/* =========================================================
   v0.8.13 - test cards: stable answer layout.
   Hidden radio/checkbox elements must not reserve a narrow grid column;
   otherwise long answers collapse one character per line.
   ========================================================= */
.auto-test-question-school .auto-test-options label,
.auto-test-result-school .auto-test-options label{
  position:relative!important;
  display:block!important;
  width:100%!important;
  min-width:0!important;
  max-width:100%!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  color:var(--test-dark,#213944)!important;
  box-sizing:border-box!important;
}
.auto-test-question-school .auto-test-options label>input,
.auto-test-result-school .auto-test-options label>input{
  position:absolute!important;
  opacity:0!important;
  width:1px!important;
  height:1px!important;
  pointer-events:none!important;
}
.auto-test-question-school .auto-test-options label>span,
.auto-test-result-school .auto-test-options label>span{
  display:grid!important;
  grid-template-columns:30px minmax(0,1fr)!important;
  align-items:start!important;
  gap:11px!important;
  width:100%!important;
  min-width:0!important;
  max-width:100%!important;
  min-height:52px!important;
  margin:0!important;
  padding:12px 14px!important;
  border:1px solid #d7e2e7!important;
  border-radius:13px!important;
  background:#fbfdfe!important;
  color:var(--test-dark,#213944)!important;
  font-family:Arial,"Helvetica Neue",sans-serif!important;
  font-size:14px!important;
  font-weight:400!important;
  line-height:1.5!important;
  white-space:normal!important;
  word-break:normal!important;
  overflow-wrap:break-word!important;
  hyphens:auto!important;
  box-sizing:border-box!important;
  transition:border-color .16s ease,background .16s ease,transform .16s ease,box-shadow .16s ease!important;
}
.auto-test-question-school .auto-test-options label>span>b,
.auto-test-result-school .auto-test-options label>span>b{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:30px!important;
  height:30px!important;
  min-width:30px!important;
  border-radius:9px!important;
  background:#eaf1f4!important;
  color:#31546d!important;
  font-size:12px!important;
  font-weight:400!important;
  line-height:1!important;
}
.auto-test-question-school .auto-test-options label:hover>span{
  border-color:#8fbfc3!important;
  background:#f3faf9!important;
  transform:translateY(-1px)!important;
}
.auto-test-question-school .auto-test-options input:checked+span{
  border-color:var(--test-teal,#2f8f9d)!important;
  background:#eaf8f5!important;
  box-shadow:inset 4px 0 0 var(--test-teal,#2f8f9d)!important;
}
.auto-test-question-school .auto-test-options input:checked+span>b{
  background:var(--test-teal,#2f8f9d)!important;
  color:#fff!important;
}
.auto-test-question-school legend,
.auto-test-question-school legend em,
.auto-test-question-school .auto-test-question-title,
.auto-test-question-school h3,
.auto-test-question-school h4{
  max-width:100%!important;
  margin-left:0!important;
  margin-right:0!important;
  padding-left:0!important;
  padding-right:0!important;
  font-family:Arial,"Helvetica Neue",sans-serif!important;
  font-weight:400!important;
  line-height:1.5!important;
  white-space:normal!important;
  word-break:normal!important;
  overflow-wrap:break-word!important;
}
.auto-test-question-school{
  min-width:0!important;
  overflow:visible!important;
  padding:18px!important;
}
@media (max-width:580px){
  .auto-test-question-school{padding:14px!important}
  .auto-test-question-school .auto-test-options label>span,
  .auto-test-result-school .auto-test-options label>span{
    grid-template-columns:28px minmax(0,1fr)!important;
    gap:9px!important;
    padding:11px 12px!important;
    font-size:13.5px!important;
  }
  .auto-test-question-school .auto-test-options label>span>b,
  .auto-test-result-school .auto-test-options label>span>b{
    width:28px!important;height:28px!important;min-width:28px!important;
  }
}


/* =========================================================
   v0.8.14 - contextual help, compact test creation and pager
   ========================================================= */
.imtp-help-btn,.imtp-field-help-btn{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;border:1px solid rgba(49,84,109,.18);border-radius:50%;background:#fff;color:#2f8f9d;cursor:pointer;font-family:Arial,"Helvetica Neue",sans-serif!important;font-weight:400!important}
.imtp-help-btn{width:32px;height:32px;font-size:18px}.imtp-field-help-btn{width:22px;height:22px;margin:2px 0 0 5px;padding:0;font-size:14px;vertical-align:middle}
.imtp-help-btn:hover,.imtp-field-help-btn:hover{background:#eaf7f4;border-color:#8fc5c9}
.imtp-context-help-dialog{width:min(680px,calc(100vw - 28px));padding:18px 20px 20px!important}.imtp-context-help-body{padding:14px 2px 2px;color:#405966;line-height:1.58}.imtp-context-help-body p{margin:0 0 11px}.imtp-context-help-body b{font-weight:400!important;color:#31546d}
.teacher-test-create-panel-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 12px;padding-bottom:10px;border-bottom:1px solid #dce8ef;color:#31546d;font-size:14px;line-height:1.4}
.teacher-test-pager{display:flex;align-items:center;justify-content:flex-end;gap:10px;margin:10px 0 14px}.teacher-test-pager .btn{min-width:78px}.teacher-test-bank-filters input[type="search"]{min-width:190px}
.teacher-test-bank-create .teacher-test-create-modes{margin-bottom:8px}.teacher-test-bank-create .teacher-test-create-panel{margin-top:10px}
@media(max-width:700px){.teacher-test-pager{justify-content:space-between}.teacher-test-bank-filters input[type="search"]{min-width:0;width:100%}}

.teacher-test-create-status{min-height:22px;margin:2px 0 4px;color:#2f8f9d!important;font-size:13px;line-height:1.4}

/* v0.8.15 · единый раздел «Учебный процесс» */
.education-subnav{margin:0 0 24px;padding:22px 24px;border:1px solid rgba(16,40,51,.12);border-radius:18px;background:#fff;box-shadow:0 8px 24px rgba(16,40,51,.06)}
.education-subnav-copy h1{margin:2px 0 6px;font-size:28px;font-weight:600;color:#173642}
.education-subnav-copy p{margin:0;color:#5c717c;max-width:980px;line-height:1.5}
.education-subnav-tabs{display:flex;flex-wrap:wrap;gap:10px;margin-top:18px}
.education-tab{appearance:none;border:1px solid rgba(49,84,109,.22);background:#f7fafb;color:#31546d;border-radius:12px;padding:10px 14px;font:400 14px/1.2 Arial,Helvetica,sans-serif;cursor:pointer}
.education-tab:hover{background:#eef6f6;border-color:rgba(47,143,157,.45)}
.education-tab.active{background:#31546d;color:#fff;border-color:#31546d}
.education-row-actions{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.education-edit-dialog{width:min(760px,calc(100vw - 32px));border:0;border-radius:18px;padding:0;box-shadow:0 24px 70px rgba(16,40,51,.24)}
.education-edit-dialog::backdrop{background:rgba(16,40,51,.34)}
.education-edit-dialog form{padding:22px}
.education-edit-dialog .dialog-head{display:flex;justify-content:space-between;gap:18px;align-items:flex-start;margin-bottom:18px}
.education-edit-dialog .dialog-head h2{margin:2px 0 0;font-size:22px;font-weight:600;color:#173642}
.education-edit-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.education-edit-grid label{display:flex;flex-direction:column;gap:6px;color:#31546d;font-size:13px}
.education-edit-grid label.wide{grid-column:1/-1}
.education-edit-grid input,.education-edit-grid textarea{width:100%;box-sizing:border-box;border:1px solid rgba(49,84,109,.22);border-radius:10px;padding:10px 11px;background:#fff;color:#213944;font:400 14px/1.4 Arial,Helvetica,sans-serif}
.education-edit-dialog .dialog-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:18px}
@media (max-width:720px){.education-edit-grid{grid-template-columns:1fr}.education-edit-grid label.wide{grid-column:auto}.education-subnav{padding:18px}.education-subnav-copy h1{font-size:24px}}

/* v0.8.43: every visible password field in admin UI has a reveal eye. */
.imtp-password-eye-wrap{position:relative;display:block;width:100%;min-width:0}
.imtp-password-eye-wrap>input{width:100%!important;padding-right:46px!important}
.imtp-password-eye-btn{position:absolute;right:6px;top:50%;transform:translateY(-50%);display:grid;place-items:center;width:34px;height:34px;padding:0;border:0;border-radius:8px;background:transparent;color:#5c717c;cursor:pointer}
.imtp-password-eye-btn:hover{background:#eef5f7;color:#244b5a}
.imtp-password-eye-btn svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8}
.imtp-password-eye-btn.is-visible{background:#e7f5f2;color:#2f8f9d}

/* v0.8.54 — learner card: brief identity and program list are always visible;
   detailed record sections remain collapsed until requested. */
.student-person-brief{margin:12px 0;padding:14px 16px!important;background:#f8fbfc!important}
.student-person-brief-main{display:grid;grid-template-columns:minmax(240px,1.7fr) repeat(3,minmax(130px,1fr));gap:12px;align-items:center}
.student-person-brief-main>div{display:grid;gap:4px;min-width:0}
.student-person-brief-main strong{color:#244b5a;overflow-wrap:anywhere}
.student-record-actions{display:flex;gap:9px;flex-wrap:wrap;margin:12px 0}
.student-record-btn{min-height:38px;padding-inline:16px}
.student-record-btn.active{box-shadow:0 0 0 3px rgba(47,143,157,.12)}
.student-programs-overview{margin:12px 0 16px;border-color:rgba(47,143,157,.24)!important;background:linear-gradient(180deg,#fcfefe,#f7fbfb)!important}
.student-programs-heading h3{margin-bottom:3px}
.student-program-list{display:grid;gap:9px;margin-top:12px}
.student-program-card{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:12px 14px;border:1px solid #dde7eb;border-radius:12px;background:#fff}
.student-program-card.current{border-color:rgba(47,143,157,.5);box-shadow:0 0 0 2px rgba(47,143,157,.07)}
.student-program-card>div:first-child{display:grid;gap:3px;min-width:0}
.student-program-card strong{color:#244b5a}
.student-program-card small{color:#667984}
.student-program-kicker{font-size:11px;color:#2f8f9d;text-transform:uppercase;letter-spacing:.03em}
.student-program-card-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.student-add-program{display:grid;grid-template-columns:minmax(260px,1.4fr) minmax(210px,1fr) 120px auto;gap:10px;align-items:end;margin-top:14px;padding-top:14px;border-top:1px solid #dfeaec}
.student-add-program label{display:grid;gap:6px;color:#31546d;font-size:12px}
.student-add-program select,.student-add-program input{width:100%;min-width:0}
.student-record-group{margin-top:14px;padding-top:12px;border-top:1px solid #e1e9ed}
.student-record-group:first-of-type{margin-top:8px;padding-top:0;border-top:0}
.student-record-group h4{margin:0 0 9px;color:#31546d}
.student-record-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}
.student-record-field{padding:10px 11px;border:1px solid #e2e9ec;border-radius:10px;background:#f9fbfc;min-width:0}
.student-record-field span{display:block;margin-bottom:4px;color:#667984;font-size:11px}
.student-record-field strong{display:block;color:#253f4a;font-size:13px;overflow-wrap:anywhere}
@media(max-width:980px){.student-person-brief-main{grid-template-columns:repeat(2,minmax(0,1fr))}.student-add-program{grid-template-columns:1fr 1fr}.student-add-program .btn{grid-column:1/-1;justify-self:start}.student-record-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:650px){.student-person-brief-main,.student-record-grid,.student-add-program{grid-template-columns:1fr}.student-program-card{align-items:flex-start;flex-direction:column}.student-program-card-actions{justify-content:flex-start}.student-record-btn{flex:1 1 100%}}

/* v0.8.77 - bulk contingent orders */
.student-bulk-order-dialog{width:min(760px,calc(100vw - 30px));border:0;border-radius:18px;padding:0;box-shadow:0 24px 70px rgba(16,40,51,.28);max-height:92vh;overflow:auto}.student-bulk-order-dialog::backdrop{background:rgba(16,40,51,.42)}.student-bulk-order-form{display:grid;grid-template-columns:1fr 1fr;gap:12px;padding:20px}.student-bulk-order-head{grid-column:1/-1;display:flex;justify-content:space-between;align-items:flex-start;gap:12px}.student-bulk-order-head h2{margin:0 0 4px}.student-bulk-order-form label{display:grid;gap:6px;color:#31546d;font-size:13px}.student-bulk-order-form input,.student-bulk-order-form select,.student-bulk-order-form textarea{width:100%;box-sizing:border-box}.student-bulk-order-wide{grid-column:1/-1}.student-bulk-order-actions{display:flex!important;justify-content:flex-end;flex-direction:row!important;gap:8px}.student-bulk-order-form .hidden{display:none!important}@media(max-width:700px){.student-bulk-order-form{grid-template-columns:1fr}.student-bulk-order-head,.student-bulk-order-wide{grid-column:1}.student-bulk-order-head{flex-direction:column}.student-bulk-order-actions{justify-content:flex-start;flex-wrap:wrap}}

/* v0.9.35 — срочные домашние задания и самостоятельное подтверждение */
.student-homework-priority{
  margin:18px 0 20px;
  padding:16px;
  border:2px solid #d8a63b;
  border-radius:16px;
  background:#fffaf0;
  box-shadow:0 8px 24px rgba(16,40,51,.06);
}
.student-homework-priority.hidden{display:none!important}
.student-homework-priority-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  margin-bottom:12px;
}
.student-homework-priority-head h3{margin:2px 0 4px;font-size:20px}
.student-homework-priority-head p{margin:0;color:var(--muted,#647680);font-size:14px}
.student-homework-priority-head>strong{
  display:inline-flex;align-items:center;justify-content:center;
  min-width:38px;height:38px;padding:0 10px;border-radius:999px;
  background:#fff;border:1px solid #e6c976;font-size:18px;
}
.student-homework-priority-kicker{
  display:block;text-transform:uppercase;letter-spacing:.05em;font-size:11px;font-weight:700;color:#8c6514;
}
.student-work-no-date{
  margin:18px 0 0;
  padding:16px;
  border:1px solid #cfdadd;
  border-radius:16px;
  background:#f7fafb;
  box-shadow:0 6px 18px rgba(16,40,51,.035);
}
.student-work-no-date.hidden{display:none!important}
.student-work-no-date-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:12px}
.student-work-no-date-head h3{margin:2px 0 4px;font-size:19px}
.student-work-no-date-head p{margin:0;color:var(--muted,#647680);font-size:14px}
.student-work-no-date-head>strong{display:inline-flex;align-items:center;justify-content:center;min-width:36px;height:36px;padding:0 10px;border-radius:999px;background:#fff;border:1px solid #d6e0e4;font-size:17px}
.student-work-no-date-kicker{display:block;text-transform:uppercase;letter-spacing:.05em;font-size:11px;font-weight:700;color:#60757f}
.student-work-tag-row{display:flex;flex-wrap:wrap;align-items:center;gap:6px}
.student-work-urgency{
  display:inline-flex;align-items:center;padding:4px 8px;border-radius:999px;
  font-size:12px;font-weight:700;line-height:1.2;
}
.student-work-urgency.today{background:#ffe6e3;color:#a3382a;border:1px solid #f4b9b0}
.student-work-urgency.tomorrow{background:#fff2cf;color:#87600d;border:1px solid #ead087}
.student-work-urgency.no-date{background:#eef3f5;color:#50636c;border:1px solid #d6e0e4}
.student-self-complete-box{
  display:flex;align-items:center;justify-content:space-between;gap:18px;
  margin:16px 0;padding:16px;border:1px solid #b9ddd5;border-radius:14px;background:#f2fbf8;
}
.student-self-complete-box.hidden{display:none!important}
.student-self-complete-box p{margin:5px 0 0;color:var(--muted,#647680);font-size:14px;line-height:1.45}
#teacher-work-self-completion-row{align-items:flex-start}
#teacher-work-self-completion-row .field-help{display:block;margin-top:4px;font-weight:400}
#teacher-homework-duplicate-box label{display:block;margin-top:10px}
@media (max-width:720px){
  .student-homework-priority-head,.student-work-no-date-head,.student-self-complete-box{flex-direction:column;align-items:stretch}
  .student-homework-priority-head>strong,.student-work-no-date-head>strong{align-self:flex-start}
}

/* v0.9.40: normal-weight typography throughout the application. */
body, body *{font-weight:400!important}

/* Decorative navigation labels, including medical materials and instructions. */
.sidebar .nav,.sidebar a.nav,.education-subnav a,.admin-topbar a{text-decoration:none!important}
.extern-admin-cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(215px,1fr));gap:12px;margin:20px 0}.extern-admin-card{display:grid;gap:7px;padding:16px;background:#f3f9f8;border:1px solid #c9dedc;border-radius:12px}.extern-admin-card label{display:flex;align-items:center;gap:9px}.extern-admin-card p{margin:0;font-weight:600}.extern-admin-card small{color:#61777a}.extern-admin-card button{justify-self:start}.extern-admin-test{display:flex;gap:12px;align-items:center;flex-wrap:wrap;border-bottom:1px solid #dae6e6;padding:12px 0}.extern-admin-test span{flex:1}
/* Экстернат и управление тестовыми аккаунтами: без жирного начертания. */
#view-extern-assessments,#view-extern-assessments *,#unused-accounts-panel,#unused-accounts-panel *{font-weight:400!important}
.extern-test-matrix{min-width:650px}.extern-test-matrix td{vertical-align:top}.extern-test-file{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin-top:8px}.extern-test-file span{flex:1;min-width:120px}
/* Six weekdays, one row; details open immediately below the calendar. */
#view-extern-assessments .week-toolbar{display:flex;justify-content:space-between;align-items:center;gap:12px;margin:15px 0}
#view-extern-assessments .extern-admin-cards{grid-template-columns:repeat(6,minmax(145px,1fr));overflow-x:auto;gap:9px}
#view-extern-assessments .extern-admin-day{min-width:145px;padding:9px;border:1px solid #d9e7e8;border-radius:12px;background:#f8fbfb}
#view-extern-assessments .extern-admin-day h3{margin:3px 0 10px;font-size:15px}
#view-extern-assessments .extern-admin-day h3 small{display:block;color:#61777a;margin-top:4px}
#view-extern-assessments .extern-admin-card{padding:8px;margin-bottom:8px;overflow-wrap:anywhere}
#view-extern-assessments .extern-admin-card.chosen{border-color:#2f8f9d;background:#dcefe9}
#view-extern-assessments .extern-day-choice{width:100%;border:0;background:none;text-align:left;cursor:pointer;color:#244b5a;font:inherit;padding:2px}
#view-extern-assessments .extern-day-choice small{display:block;margin-top:4px}
#view-extern-assessments .extern-day-sheet th,#view-extern-assessments .extern-day-sheet td{text-align:center;vertical-align:middle}
#view-extern-assessments .extern-day-sheet .text-left,#view-extern-assessments .extern-test-matrix .text-left{text-align:left}
#view-extern-assessments .extern-student-results{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0}
#view-extern-assessments h1,#view-extern-assessments h2{font-size:20px}
@media(max-width:900px){#view-extern-assessments .extern-admin-cards{grid-template-columns:repeat(6,165px)}#view-extern-assessments .week-toolbar{flex-wrap:wrap}}
/* Consistent ordinary text in the learner's entire study day. */
body.portal-page[data-role="student"] h1{font-size:21px!important;line-height:1.35}
body.portal-page[data-role="student"] h2{font-size:18px!important;line-height:1.4}
body.portal-page[data-role="student"] h3{font-size:16px!important;line-height:1.4}
body.portal-page[data-role="student"] .portal-card strong,
body.portal-page[data-role="student"] .student-work-summary-card strong{font-size:18px!important}

/* v0.9.66 - объявления для преподавателей над навигацией кабинета */
.teacher-announcements-panel{margin:0 0 18px;padding:18px;border:1px solid #d7e5ea;border-radius:16px;background:#f9fcfd;box-shadow:0 10px 28px rgba(16,40,51,.07)}
.teacher-announcements-panel.hidden{display:none!important}.teacher-announcements-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:12px}.teacher-announcements-head h2{margin:2px 0 0;color:#31546d;font-size:20px;line-height:1.3}.teacher-announcements-list{display:grid;gap:10px}.teacher-announcement-card{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:16px;align-items:start;padding:15px 16px;border:1px solid #d8e5ea;border-left:4px solid #6da9d8;border-radius:13px;background:#fff}.teacher-announcement-card.important{border-left-color:#d5a33e;background:#fffdf7}.teacher-announcement-card.critical{border-left-color:#c85d5d;background:#fff9f9}.teacher-announcement-main{min-width:0}.teacher-announcement-meta{margin-bottom:5px;color:#71838d;font-size:12px;line-height:1.4}.teacher-announcement-card h3{margin:0 0 8px;color:#244b5a;font-size:17px;line-height:1.35}.teacher-announcement-body{color:#314955;font-size:14px;line-height:1.55}.teacher-announcement-image{display:block;width:min(220px,24vw);max-height:160px;object-fit:contain;border:1px solid #dde7eb;border-radius:10px;background:#fff}.teacher-announcement-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}@media(max-width:760px){.teacher-announcement-card{grid-template-columns:1fr}.teacher-announcement-image{width:100%;max-height:240px}}
