: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}
.schedule-v063-board-grid{width:100%;min-width:1280px;border-collapse:separate;border-spacing:0;table-layout:fixed}
.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:112px}
.schedule-v063-board-grid tbody th{position:sticky;left:0;z-index:3;width:112px;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}
.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;
}
.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:flex;gap:8px;flex-wrap:wrap}.schedule-variant-chip{display:grid;gap:2px;padding:9px 11px;border:1px solid rgba(49,84,109,.16);border-radius:10px;background:#f8fbfc}.schedule-variant-chip span{font-size:12px;color:#5c717c}

/* 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}
