/* Mathroom 54.0 — Lesson History v3 */
.mr-history-v3{--h-orange:#ff641a;--h-ink:#171a1f;--h-line:#e1e5e9;--h-muted:#7a828d;display:grid;gap:14px}
.mr-history-toolbar{display:grid;grid-template-columns:minmax(360px,1.1fr) minmax(520px,1.6fr) auto;gap:12px;align-items:center;padding:14px;border:1px solid var(--h-line);border-top:3px solid var(--h-orange);border-radius:13px;background:#fff;box-shadow:0 7px 24px rgba(22,25,30,.035)}
.mr-history-search{height:44px;display:flex;align-items:center;gap:9px;padding:0 12px;border:1px solid #d6dbe1;border-radius:9px;background:#f9fafb}
.mr-history-search svg{width:18px;height:18px;fill:none;stroke:#555e69;stroke-width:1.8}
.mr-history-search input{width:100%;border:0!important;background:transparent!important;box-shadow:none!important;outline:0!important;font-size:12.5px!important}
.mr-history-filters{display:flex;gap:7px;align-items:center}
.mr-history-filters label{height:40px;display:flex;align-items:center;gap:6px;padding:0 8px;border:1px solid #d9dee4;border-radius:8px;background:#fff}
.mr-history-filters label svg{width:16px;height:16px;fill:none;stroke:#ff641a;stroke-width:1.8}
.mr-history-filters select{height:36px!important;min-width:128px!important;border:0!important;background:transparent!important;padding:0 24px 0 2px!important;font-size:10.5px!important;font-weight:800!important;box-shadow:none!important}
.mr-history-filters>button{height:40px;padding:0 11px;border:1px solid #d9dee4;border-radius:8px;background:#171a1f;color:#fff;font-size:10px;font-weight:850;cursor:pointer}
.mr-history-toolbar-meta{display:grid;grid-template-columns:auto auto;gap:2px 7px;align-items:center;justify-items:end;white-space:nowrap}
.mr-history-toolbar-meta b{font-size:13px}.mr-history-toolbar-meta span{font-size:9px;color:var(--h-muted)}
.mr-history-toolbar-meta .danger{grid-column:1/-1;border:0;background:transparent;color:#c94646;font-size:9px;font-weight:800;cursor:pointer;padding:2px 0}
.mr-history-journal{display:grid;gap:8px}
.mr-history-student-group{border:1px solid var(--h-line);border-radius:11px;background:#fff;overflow:hidden;box-shadow:0 5px 18px rgba(24,28,34,.025)}
.mr-history-student-group[open]{border-color:#ffc3a3;box-shadow:0 7px 22px rgba(255,100,26,.045)}
.mr-history-student-group>summary{list-style:none;min-height:66px;display:grid;grid-template-columns:42px minmax(0,1fr) 28px;gap:11px;align-items:center;padding:10px 14px;cursor:pointer;background:#fff}
.mr-history-student-group>summary::-webkit-details-marker{display:none}
.mr-history-student-group[open]>summary{background:linear-gradient(90deg,#fff6f1,#fff 58%);border-bottom:1px solid #f0e1d9}
.mr-history-avatar{width:42px;height:42px;display:grid;place-items:center;border-radius:50%;background:#171a1f;color:#fff;font-size:11px;font-weight:950;letter-spacing:.03em}
.mr-history-avatar.large{width:48px;height:48px;font-size:12px;background:#ff641a}
.mr-history-student-copy{min-width:0}
.mr-history-student-copy b{display:block;color:#20242a;font-size:13.5px;font-weight:900}.mr-history-student-copy b em{color:#69717b;font-style:normal;font-size:10.5px;font-weight:750}
.mr-history-student-copy small{display:block;margin-top:3px;color:#7f8792;font-size:9.5px}
.mr-history-group-arrow{width:28px;height:28px;display:grid;place-items:center;border-radius:7px;background:#f2f4f6;color:#4e5660}
.mr-history-group-arrow svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2;transition:transform .16s ease}
.mr-history-student-group[open] .mr-history-group-arrow{background:#fff0e7;color:#f05b14}.mr-history-student-group[open] .mr-history-group-arrow svg{transform:rotate(180deg)}
.mr-history-group-table{padding:0 12px 10px}
.mr-history-table-head,.mr-history-lesson-row{display:grid;grid-template-columns:150px minmax(260px,1fr) 130px 180px;gap:10px;align-items:center}
.mr-history-table-head{min-height:31px;padding:0 10px;color:#8b929b;font-size:8px;font-weight:900;text-transform:uppercase;letter-spacing:.055em}
.mr-history-lesson-row{min-height:55px;padding:7px 10px;border-top:1px solid #edf0f2}
.mr-history-lesson-row:hover{background:#fbfcfd}.mr-history-lesson-row[hidden]{display:none}
.mr-history-row-date b,.mr-history-row-topic b{display:block;color:#20242a;font-size:10.5px;font-weight:850}.mr-history-row-date small,.mr-history-row-topic small{display:block;margin-top:2px;color:#8a929c;font-size:8.5px}
.mr-history-row-status{display:inline-flex;align-items:center;gap:6px;width:max-content;padding:5px 8px;border-radius:6px;background:#eaf8ee;color:#268245;font-size:9px;font-weight:850}
.mr-history-row-status i{width:6px;height:6px;border-radius:50%;background:#37a95a}
.mr-history-row-actions{display:flex;justify-content:flex-end;align-items:center;gap:5px}
.mr-history-row-actions>button{height:30px;padding:0 11px;border:1px solid #d8dde3;border-radius:7px;background:#fff;color:#1f2328;font-size:9px;font-weight:850;cursor:pointer}.mr-history-row-actions>button:hover{border-color:#ff8e54;color:#ef5a12}
.mr-history-row-more{position:relative}.mr-history-row-more summary{list-style:none;width:30px;height:30px;display:grid;place-items:center;border-radius:7px;cursor:pointer}.mr-history-row-more summary::-webkit-details-marker{display:none}.mr-history-row-more summary:hover{background:#fff0e7;color:#ff641a}.mr-history-row-more svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2}
.mr-history-row-more>div{position:absolute;right:0;top:34px;z-index:40;width:160px;padding:5px;border:1px solid #e1e5e9;border-radius:9px;background:#fff;box-shadow:0 14px 34px rgba(20,24,30,.16)}
.mr-history-row-more button{width:100%;padding:8px;border:0;border-radius:6px;background:transparent;text-align:left;font-size:9.5px;font-weight:800;cursor:pointer}.mr-history-row-more button:hover{background:#fff2ed}.mr-history-row-more button.danger{color:#cf4646}
.mr-history-empty-filter,.mr-history-empty-v3{padding:34px;border:1px dashed #d8dde3;border-radius:12px;background:#fff;text-align:center;color:#7e8690}.mr-history-empty-v3 span{width:46px;height:46px;margin:0 auto 8px;display:grid;place-items:center;border-radius:11px;background:#fff0e7;color:#ff641a}.mr-history-empty-v3 svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.8}.mr-history-empty-v3 h2{margin:0 0 5px;font-size:18px}.mr-history-empty-v3 p{margin:0;font-size:11px}

/* lesson modal */
.modal.mr-history-modal-v3,.mr-history-modal-v3{width:min(1180px,94vw)!important;max-width:1180px!important;max-height:88vh!important;padding:0!important;overflow:auto!important;border-radius:15px!important}
.mr-history-modal-v3.mr-history-modal-expanded{width:min(1480px,97vw)!important;max-width:1480px!important;max-height:94vh!important}
.mr-history-modal-head{position:sticky;top:0;z-index:5;display:flex;align-items:center;justify-content:space-between;gap:14px;padding:16px 18px;border-bottom:1px solid #e6e9ed;background:rgba(255,255,255,.97);backdrop-filter:blur(12px)}
.mr-history-modal-person{display:flex;align-items:center;gap:12px;min-width:0}.mr-history-modal-person>div{min-width:0}.mr-history-modal-kicker{display:block;margin-bottom:3px;color:#ff641a;font-size:8.5px;font-weight:950;letter-spacing:.09em}.mr-history-modal-person h2{margin:0!important;color:#171a1f;font-size:18px!important;line-height:1.22!important;font-weight:950!important}.mr-history-modal-person p{margin:4px 0 0;color:#818994;font-size:9.5px}
.mr-history-modal-head-right{display:flex;align-items:center;gap:8px}.mr-history-completed{padding:6px 8px;border-radius:7px;background:#eaf8ee;color:#258244;font-size:9px;font-weight:900}.mr-history-modal-head-right button{width:32px;height:32px;border:0;border-radius:8px;background:#f2f4f6;color:#373d45;font-size:20px;cursor:pointer}
.mr-history-modal-layout{display:grid;grid-template-columns:180px minmax(0,1fr);min-height:520px}
.mr-history-modal-nav{padding:14px 10px;border-right:1px solid #e8ebee;background:#f8f9fa}.mr-history-modal-nav button{width:100%;min-height:43px;display:grid;grid-template-columns:28px 1fr auto;gap:7px;align-items:center;margin-bottom:4px;padding:6px 8px;border:0;border-radius:8px;background:transparent;color:#68717c;text-align:left;font-size:10px;font-weight:850;cursor:pointer}.mr-history-modal-nav button svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8}.mr-history-modal-nav button em{min-width:20px;height:20px;display:grid;place-items:center;border-radius:999px;background:#e9ecf0;font-size:8px;font-style:normal}.mr-history-modal-nav button.active{background:#fff0e7;color:#f05b14;box-shadow:inset 3px 0 0 #ff641a}.mr-history-modal-nav button.active em{background:#ffdcca}
.mr-history-modal-main{min-width:0;padding:17px}.mr-history-modal-main>[data-history-panel]{display:none}.mr-history-modal-main>[data-history-panel].active{display:block}
.mr-history-panel-title{display:flex;align-items:end;justify-content:space-between;gap:12px;margin-bottom:13px}.mr-history-panel-title span{display:block;color:#ff641a;font-size:8.5px;font-weight:950;text-transform:uppercase;letter-spacing:.08em}.mr-history-panel-title h3{margin:3px 0 0;font-size:17px;font-weight:950;color:#1c2025}.mr-history-panel-title>b{padding:5px 8px;border-radius:7px;background:#f1f3f5;color:#404852;font-size:10px}
.mr-history-timeline{position:relative;display:grid;gap:0;margin:2px 0 18px}.mr-history-timeline:before{content:"";position:absolute;left:80px;top:19px;bottom:19px;width:1px;background:#ffb68f}.mr-history-timeline>div{position:relative;display:grid;grid-template-columns:58px 28px 1fr;gap:8px;align-items:center;min-height:52px}.mr-history-timeline time{text-align:right;color:#555e68;font-size:9.5px;font-weight:800}.mr-history-timeline-dot{position:relative;z-index:1;width:27px;height:27px;display:grid;place-items:center;border-radius:50%;border:1px solid #ffb28b;background:#fff;color:#ff641a}.mr-history-timeline-dot svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:1.8}.mr-history-timeline-dot.finish{background:#ff641a;color:#fff;border-color:#ff641a}.mr-history-timeline section{padding:8px 10px;border:1px solid #edf0f2;border-radius:8px;background:#fff}.mr-history-timeline section b{display:block;font-size:10.5px}.mr-history-timeline section small{display:block;margin-top:2px;color:#858d97;font-size:8.5px}
.mr-history-board-strip-head{display:flex;align-items:center;justify-content:space-between;margin:12px 0 8px;padding-top:12px;border-top:1px solid #eceff2}.mr-history-board-strip-head h3{margin:0;font-size:12px}.mr-history-board-strip-head button{border:0;background:transparent;color:#f05b14;font-size:9px;font-weight:850;cursor:pointer}
.mr-history-board-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}.mr-history-board-grid>button{min-width:0;padding:7px;border:1px solid #e2e6ea;border-radius:8px;background:#fff;text-align:left;cursor:pointer}.mr-history-board-grid>button:hover{border-color:#ff9c69;box-shadow:0 5px 15px rgba(255,100,26,.07)}.mr-history-board-grid>button>b{display:block;margin-top:6px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:9px}.mr-history-board-grid>button>small{display:block;margin-top:2px;color:#89919b;font-size:7.5px}.mr-history-board-preview{position:relative;height:74px;display:block;overflow:hidden;border-radius:5px;background:linear-gradient(#eef4ff 1px,transparent 1px),linear-gradient(90deg,#eef4ff 1px,transparent 1px),#fff;background-size:12px 12px;border:1px solid #edf0f3}.mr-history-board-preview i{position:absolute;height:2px;border-radius:2px;background:#6991df;transform:rotate(-7deg)}.mr-history-board-preview i:nth-child(1){left:10%;top:28%;width:55%}.mr-history-board-preview i:nth-child(2){left:28%;top:52%;width:60%;background:#ff7e48;transform:rotate(9deg)}.mr-history-board-preview i:nth-child(3){left:12%;top:70%;width:40%;transform:rotate(4deg)}.mr-history-board-preview em{position:absolute;right:5px;bottom:4px;padding:2px 4px;border-radius:4px;background:#171a1f;color:#fff;font-size:7px;font-style:normal}
.mr-history-metrics{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin-bottom:12px}.mr-history-metrics>div{padding:11px;border:1px solid #e4e8ec;border-radius:9px;background:#f8f9fa}.mr-history-metrics span{display:block;color:#7e8690;font-size:8.5px}.mr-history-metrics b{display:block;margin-top:4px;font-size:20px}.mr-history-metrics .orange{background:#fff4ed;border-color:#ffd3bb}.mr-history-metrics .orange b{color:#ef5a12}.mr-history-metrics .green{background:#eef9f1;border-color:#d2efd9}.mr-history-metrics .green b{color:#278348}.mr-history-metrics .red{background:#fff1f1;border-color:#f5d8d8}.mr-history-metrics .red b{color:#c74d4d}
.mr-history-task-list{display:grid;gap:6px}.mr-history-task-list>div{display:grid;grid-template-columns:31px minmax(0,1fr) auto;gap:8px;align-items:center;padding:9px;border:1px solid #e6e9ed;border-radius:8px}.mr-history-task-index{width:31px;height:31px;display:grid;place-items:center;border-radius:7px;background:#fff0e7;color:#ef5a12;font-size:8px;font-weight:950}.mr-history-task-list section b{display:block;font-size:10px}.mr-history-task-list section small{display:block;margin-top:2px;color:#8b929b;font-size:8px}.mr-history-task-list em{padding:5px 7px;border-radius:6px;font-style:normal;font-size:8px;font-weight:850}.mr-history-task-list em.solved{background:#eaf8ee;color:#258244}.mr-history-task-list em.hard{background:#fff0f0;color:#c94949}.mr-history-task-list em.later{background:#fff5e9;color:#ae6a17}.mr-history-task-list em.pending{background:#eef1f4;color:#67707a}
.mr-history-notes-grid{display:grid;grid-template-columns:1fr 1fr;gap:9px}.mr-history-notes-grid article{padding:13px;border:1px solid #e3e7eb;border-radius:9px;background:#f9fafb}.mr-history-notes-grid article:nth-child(1){border-top:3px solid #ff641a}.mr-history-notes-grid article:nth-child(2){border-top:3px solid #171a1f}.mr-history-notes-grid article.wide{grid-column:1/-1}.mr-history-notes-grid article>span{display:block;margin-bottom:7px;color:#6d7580;font-size:9px;font-weight:900;text-transform:uppercase}.mr-history-notes-grid article>div{font-size:11px;line-height:1.55;color:#30363d}
.mr-history-panel-empty{min-height:180px;display:grid;place-items:center;align-content:center;gap:5px;text-align:center;color:#828a94}.mr-history-panel-empty svg{width:30px;height:30px;fill:none;stroke:#ff641a;stroke-width:1.7}.mr-history-panel-empty b{font-size:11px;color:#343a41}.mr-history-panel-empty span{font-size:9px}
.mr-history-modal-footer{position:sticky;bottom:0;z-index:5;display:grid;grid-template-columns:auto 1fr auto auto auto;gap:7px;align-items:center;padding:11px 16px;border-top:1px solid #e3e7eb;background:rgba(255,255,255,.97);backdrop-filter:blur(12px)}.mr-history-modal-footer button{min-height:35px;display:inline-flex;align-items:center;justify-content:center;gap:5px;padding:0 11px;border:1px solid #d6dbe1;border-radius:8px;background:#fff;color:#252a30;font-size:9.5px;font-weight:850;cursor:pointer}.mr-history-modal-footer button svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:1.8}.mr-history-modal-footer .primary{background:#ff641a;border-color:#ff641a;color:#fff}.mr-history-modal-footer .danger{color:#cd4545}.mr-history-modal-footer .ghost{border-color:transparent;background:transparent}

html[data-theme="dark"] .mr-history-toolbar,html[data-theme="dark"] .mr-history-student-group,html[data-theme="dark"] .mr-history-modal-v3,html[data-theme="dark"] .mr-history-modal-head,html[data-theme="dark"] .mr-history-modal-footer{background:#171a1e!important;border-color:#30353c!important}
html[data-theme="dark"] .mr-history-student-group>summary,html[data-theme="dark"] .mr-history-lesson-row,html[data-theme="dark"] .mr-history-timeline section,html[data-theme="dark"] .mr-history-board-grid>button,html[data-theme="dark"] .mr-history-notes-grid article{background:#1d2025!important;border-color:#30353c!important}
html[data-theme="dark"] .mr-history-student-copy b,html[data-theme="dark"] .mr-history-row-date b,html[data-theme="dark"] .mr-history-row-topic b,html[data-theme="dark"] .mr-history-modal-person h2,html[data-theme="dark"] .mr-history-panel-title h3{color:#f0f2f4!important}
html[data-theme="dark"] .mr-history-modal-nav{background:#13161a;border-color:#30353c}.mr-history-modal-nav button.active{color:#ff7a34}
html[data-theme="dark"] .mr-history-search,html[data-theme="dark"] .mr-history-filters label{background:#20242a;border-color:#363c44}html[data-theme="dark"] .mr-history-search input,html[data-theme="dark"] .mr-history-filters select{color:#f0f2f4!important}

@media(max-width:1180px){.mr-history-toolbar{grid-template-columns:1fr}.mr-history-toolbar-meta{grid-template-columns:auto auto auto;justify-items:start}.mr-history-toolbar-meta .danger{grid-column:auto}.mr-history-table-head,.mr-history-lesson-row{grid-template-columns:130px minmax(220px,1fr) 120px 150px}}
@media(max-width:800px){.mr-history-filters{flex-wrap:wrap}.mr-history-group-table{overflow:auto}.mr-history-table-head,.mr-history-lesson-row{min-width:680px}.mr-history-modal-layout{grid-template-columns:1fr}.mr-history-modal-nav{display:flex;overflow:auto;border-right:0;border-bottom:1px solid #e8ebee}.mr-history-modal-nav button{min-width:145px;margin:0}.mr-history-board-grid{grid-template-columns:repeat(2,1fr)}.mr-history-modal-footer{grid-template-columns:1fr 1fr}.mr-history-modal-footer>span{display:none}}
@media(max-width:560px){.mr-history-toolbar{padding:10px}.mr-history-search{min-width:0}.mr-history-filters{display:grid;grid-template-columns:1fr 1fr}.mr-history-filters label,.mr-history-filters>button{width:100%}.mr-history-student-group>summary{grid-template-columns:38px 1fr 26px}.mr-history-avatar{width:38px;height:38px}.mr-history-modal-head{align-items:flex-start}.mr-history-completed{display:none}.mr-history-board-grid{grid-template-columns:1fr 1fr}.mr-history-metrics{grid-template-columns:1fr 1fr}.mr-history-notes-grid{grid-template-columns:1fr}.mr-history-notes-grid article.wide{grid-column:auto}.mr-history-modal-footer{grid-template-columns:1fr}.mr-history-modal-footer .danger{order:5}}

/* v54.3 — custom history filters, soft lesson backdrop, portal action menu */
.mr-history-filters{position:relative;z-index:50}
.mr-history-select-shell{
  position:relative!important;
  min-width:145px;
  padding:0!important;
  border:0!important;
  background:transparent!important;
  overflow:visible!important;
}
.mr-history-select-shell>svg{
  position:absolute;z-index:2;left:11px;top:50%;transform:translateY(-50%);
  width:17px!important;height:17px!important;pointer-events:none
}
.mr-history-native-select{
  position:absolute!important;width:1px!important;height:1px!important;
  opacity:0!important;pointer-events:none!important
}
.mr-history-select{position:relative;width:100%}
.mr-history-select-trigger{
  width:100%;height:42px;display:grid;grid-template-columns:minmax(0,1fr) 17px;
  align-items:center;gap:7px;padding:0 10px 0 38px;
  border:1px solid #d8dde3;border-radius:9px;background:#fff;
  color:#1d2126;text-align:left;cursor:pointer;
  transition:border-color .15s ease,box-shadow .15s ease,background .15s ease
}
.mr-history-select-trigger:hover{border-color:#ff9e6d;background:#fffaf7}
.mr-history-select.open .mr-history-select-trigger{
  border-color:#ff641a;box-shadow:0 0 0 3px rgba(255,100,26,.09)
}
.mr-history-select-trigger b{
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
  font-size:10.5px;font-weight:850
}
.mr-history-select-trigger>span{
  justify-self:end;color:#ff641a;font-size:17px;font-weight:950;
  transition:transform .15s ease
}
.mr-history-select.open .mr-history-select-trigger>span{transform:rotate(180deg)}
.mr-history-select-menu{
  display:none;position:absolute;z-index:3000;left:0;right:0;top:calc(100% + 6px);
  min-width:180px;max-height:280px;overflow:auto;padding:6px;
  border:1px solid #e0e4e8;border-top:3px solid #ff641a;border-radius:10px;
  background:#fff;box-shadow:0 18px 42px rgba(21,25,31,.17)
}
.mr-history-select.open .mr-history-select-menu{display:grid;gap:3px}
.mr-history-select-menu button{
  width:100%;min-height:37px;display:grid;grid-template-columns:1fr 18px;
  align-items:center;gap:8px;padding:0 9px;border:0;border-radius:7px;
  background:transparent;color:#292e35;text-align:left;cursor:pointer
}
.mr-history-select-menu button:hover{background:#fff5ef;color:#d84f0f}
.mr-history-select-menu button.active{background:#fff0e7;color:#ed5811}
.mr-history-select-menu button span{font-size:10.5px;font-weight:800}
.mr-history-select-menu button i{display:none;justify-self:end;font-style:normal;font-weight:950}
.mr-history-select-menu button.active i{display:block}

.mr-history-more-trigger{
  width:30px;height:30px;display:grid;place-items:center;padding:0;
  border:0;border-radius:7px;background:transparent;color:#565f6a;cursor:pointer
}
.mr-history-more-trigger:hover{background:#fff0e7;color:#ff641a}
.mr-history-more-trigger svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2}
.mr-history-floating-menu{
  position:fixed;z-index:10000;width:190px;padding:6px;
  border:1px solid #dfe4e9;border-top:3px solid #ff641a;border-radius:10px;
  background:#fff;box-shadow:0 20px 48px rgba(18,22,27,.22)
}
.mr-history-floating-menu button{
  width:100%;min-height:38px;padding:0 10px;border:0;border-radius:7px;
  background:transparent;text-align:left;font-size:10px;font-weight:800;cursor:pointer
}
.mr-history-floating-menu button.danger{color:#d34343}
.mr-history-floating-menu button:hover{background:#fff0f1}

.modal-backdrop.mr-history-backdrop-v3{
  inset:0!important;width:auto!important;max-width:none!important;height:auto!important;max-height:none!important;
  padding:22px!important;border-radius:0!important;overflow:auto!important;
  background:rgba(43,48,55,.20)!important;
  backdrop-filter:blur(5px)!important;
  -webkit-backdrop-filter:blur(5px)!important;
  z-index:120!important;
}
.modal-backdrop.mr-history-backdrop-v3>.modal.mr-history-modal-v3{
  width:min(1180px,94vw)!important;max-width:1180px!important;
  max-height:88vh!important;padding:0!important;overflow:auto!important;
  border:1px solid rgba(207,213,220,.95)!important;border-radius:15px!important;
  box-shadow:0 24px 70px rgba(27,31,36,.18)!important;
  background:#fff!important
}
.modal-backdrop.mr-history-backdrop-v3>.modal.mr-history-modal-v3.mr-history-modal-expanded{
  width:min(1480px,97vw)!important;max-width:1480px!important;max-height:94vh!important
}
.mr-history-modal-v3 .modal-default-close{display:none!important}

html[data-theme="dark"] .mr-history-select-trigger{
  background:#20242a;border-color:#383e47;color:#f1f3f5
}
html[data-theme="dark"] .mr-history-select-menu,
html[data-theme="dark"] .mr-history-floating-menu{
  background:#181b20;border-color:#383e47;border-top-color:#ff6a24
}
html[data-theme="dark"] .mr-history-select-menu button{color:#eef1f4}
html[data-theme="dark"] .mr-history-select-menu button:hover{background:#2b211c}
html[data-theme="dark"] .mr-history-floating-menu button:hover{background:#2d2021}
html[data-theme="dark"] .modal-backdrop.mr-history-backdrop-v3{
  background:rgba(4,6,8,.34)!important
}

@media(max-width:800px){
  .mr-history-select-shell{min-width:0;flex:1 1 145px}
}


/* v54.4 — larger history typography, real board previews, stronger notes */
.mr-history-modal-person h2{font-size:22px!important;line-height:1.18!important}
.mr-history-modal-person p{font-size:11.5px!important}
.mr-history-modal-kicker{font-size:9.5px!important}
.mr-history-modal-nav button{font-size:11.5px!important;min-height:47px!important}
.mr-history-panel-title span{font-size:9.5px!important}
.mr-history-panel-title h3{font-size:21px!important}
.mr-history-panel-title>b{font-size:11.5px!important}
.mr-history-timeline>div{min-height:62px!important;grid-template-columns:66px 31px 1fr!important}
.mr-history-timeline:before{left:85px!important}
.mr-history-timeline time{font-size:10.5px!important}
.mr-history-timeline section{padding:11px 13px!important}
.mr-history-timeline section b{font-size:12.5px!important}
.mr-history-timeline section small{font-size:10px!important}
.mr-history-board-strip-head h3{font-size:14px!important}
.mr-history-board-strip-head button{font-size:10.5px!important}

.mr-history-board-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:11px!important}
.mr-history-board-grid>button{padding:9px!important;border-radius:10px!important}
.mr-history-board-grid>button>b{font-size:11.5px!important;margin-top:8px!important}
.mr-history-board-grid>button>small{font-size:9px!important;margin-top:3px!important}
.mr-history-board-preview{
  height:132px!important;
  border-radius:7px!important;
  background:#fff!important;
  border:1px solid #e3e8ee!important;
  overflow:hidden!important
}
.mr-history-board-preview>i{display:none!important}
.mr-history-board-preview .mr-history-preview-loading{
  position:absolute;inset:0;display:grid;place-items:center;
  color:#9aa2ac;font-size:9px;font-weight:750
}
.mr-history-board-preview.empty{
  display:grid!important;place-items:center!important;background:#f8f9fa!important
}
.mr-history-preview-empty{
  display:grid;place-items:center;gap:5px;color:#8a929c;text-align:center
}
.mr-history-preview-empty svg{width:24px;height:24px;fill:none;stroke:#ff641a;stroke-width:1.7}
.mr-history-preview-empty b{font-size:9px;color:#69727d}
.mr-history-preview-mount{position:absolute;inset:0;display:block}
.mr-history-preview-mount .board-card{height:100%!important;min-height:0!important;border:0!important;border-radius:0!important;padding:0!important;background:#fff!important;box-shadow:none!important}
.mr-history-preview-mount .board-page-tabs,
.mr-history-preview-mount .board-toolbar,
.mr-history-preview-mount .board-floating{display:none!important}
.mr-history-preview-mount .board-stage{height:100%!important;min-height:0!important;border:0!important;border-radius:0!important;background:#fff!important;overflow:hidden!important}
.mr-history-preview-mount svg{width:100%!important;height:100%!important;display:block!important;pointer-events:none!important}
.mr-history-board-preview>em{z-index:4!important;font-size:8.5px!important;padding:3px 5px!important}

.mr-history-notes-grid{gap:12px!important}
.mr-history-note-card{
  position:relative;overflow:hidden;padding:0!important;
  border:1px solid #e3e7eb!important;border-radius:12px!important;
  background:#fff!important;box-shadow:0 7px 20px rgba(25,29,34,.035)
}
.mr-history-note-card:before{content:"";position:absolute;left:0;top:0;right:0;height:4px;background:#ff641a}
.mr-history-note-card.next:before{background:#1b1e22}
.mr-history-note-card.private:before{background:linear-gradient(90deg,#ff641a 0 36%,#1b1e22 36% 100%)}
.mr-history-note-card header{
  display:grid;grid-template-columns:42px minmax(0,1fr);gap:10px;align-items:center;
  padding:15px 16px 10px!important
}
.mr-history-note-card header>span{
  width:42px;height:42px;display:grid;place-items:center;border-radius:10px;
  background:#fff0e7;color:#ef5a12;font-size:11px;font-weight:950
}
.mr-history-note-card.next header>span{background:#1b1e22;color:#fff}
.mr-history-note-card.private header>span{background:#fff0e7;color:#ef5a12}
.mr-history-note-card header small{
  display:block;margin:0 0 3px;color:#8a929d;font-size:8.5px;font-weight:950;letter-spacing:.075em
}
.mr-history-note-card header b{display:block;color:#20242a;font-size:14px;font-weight:950}
.mr-history-note-body{
  min-height:74px;padding:2px 16px 17px!important;
  color:#373d45!important;font-size:13px!important;line-height:1.65!important
}
.mr-history-note-card.private .mr-history-note-body{min-height:92px}

.mr-history-modal-head-right{flex-wrap:wrap;justify-content:flex-end}
.mr-history-attendance{
  display:inline-flex;align-items:center;min-height:29px;padding:0 9px;border-radius:7px;
  font-size:10px;font-weight:900
}
.mr-history-attendance.present{background:#eaf8ee;color:#258244}
.mr-history-attendance.late{background:#fff4e5;color:#b46d15}
.mr-history-attendance.absent{background:#fff0f0;color:#c94a4a}
.mr-history-row-status.late{background:#fff4e5;color:#a96616}
.mr-history-row-status.late i{background:#e9952e}
.mr-history-row-status.absent{background:#fff0f0;color:#c94a4a}
.mr-history-row-status.absent i{background:#d95a5a}

#deleteHistoryLesson{
  min-height:40px!important;padding:0 15px!important;
  border:1px solid #171a1f!important;border-radius:9px!important;
  background:#171a1f!important;color:#fff!important;
  font-size:11.5px!important;font-weight:900!important
}
#deleteHistoryLesson:hover{background:#2b3036!important;border-color:#2b3036!important;color:#fff!important}
.mr-history-modal-footer button{font-size:10.5px!important}
.mr-history-modal-footer .primary{font-size:11px!important}

html[data-theme="dark"] .mr-history-note-card{background:#1d2025!important;border-color:#333941!important}
html[data-theme="dark"] .mr-history-note-card header b{color:#f1f3f5!important}
html[data-theme="dark"] .mr-history-note-body{color:#cbd1d8!important}
html[data-theme="dark"] .mr-history-board-preview,
html[data-theme="dark"] .mr-history-preview-mount .board-card,
html[data-theme="dark"] .mr-history-preview-mount .board-stage{background:#fff!important}

@media(max-width:900px){.mr-history-board-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}}
@media(max-width:560px){.mr-history-board-grid{grid-template-columns:1fr!important}.mr-history-notes-grid{grid-template-columns:1fr!important}}
