.cabinet-shell .cabinet-learning-page { max-width: 1280px; }
.cabinet-shell .cabinet-homework-page { max-width: 1000px; }
.cabinet-shell .cabinet-learning-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.cabinet-shell .cabinet-learning-heading > div > a { font-size: 12px; }
.cabinet-learning-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.cabinet-shell .cabinet-learning-toolbar form { margin: 0; }
.cabinet-shell .cabinet-learning-toolbar .cabinet-button { min-height: 34px; font-size: 12px; padding: 7px 10px; }
.cabinet-shell .cabinet-learning-toolbar .cabinet-learning-finish { margin-left: auto; }
.cabinet-shell p.cabinet-learning-help { margin: 12px 0 0; padding-top: 10px; border-top: 1px solid #e5e9f1; color: #5b667b; font-size: 12px; }
.cabinet-learning-section-title { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.cabinet-shell .cabinet-learning-section-title h2 { margin: 0; }
.cabinet-learning-section-title > span { color: #5b667b; font-size: 12px; }
.cabinet-shell .cabinet-attendance-table { table-layout: auto; }
.cabinet-shell .cabinet-attendance-table td { vertical-align: middle; }
.cabinet-shell .cabinet-attendance-table td:first-child { width: 45%; font-weight: 500; }
.cabinet-attendance-status { display: inline-block; padding: 4px 7px; border-radius: 6px; font-size: 11px; white-space: nowrap; }
.cabinet-attendance-status.is-present { background: #e8f6ed; color: #23704b; }
.cabinet-attendance-status.is-absent { background: #f3f4f8; color: #647086; }
.cabinet-page .modal-dialog.cabinet-learning-small-dialog { max-width: 440px; }
.cabinet-page .cabinet-lesson-qr-panel { text-align: center; }
.cabinet-page .cabinet-lesson-qr-panel .cabinet-qr { margin: 12px auto; }
.cabinet-page .cabinet-lesson-qr-panel .cabinet-form-links { justify-content: center; }
.cabinet-homework-file { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid #e5e9f1; }
.cabinet-homework-file > a { display: flex; align-items: center; gap: 8px; min-width: 0; overflow-wrap: anywhere; }
.cabinet-shell .cabinet-homework-file form { margin: 0 0 0 auto; }
.cabinet-homework-fields { display: grid; grid-template-columns: 1.4fr 1fr; gap: 12px; }
.cabinet-page .cabinet-homework-editor form { max-width: none; }
.cabinet-page .cabinet-homework-editor textarea { min-height: 90px; height: 90px; resize: vertical; }
.cabinet-page .cabinet-homework-editor .cabinet-homework-options textarea { min-height: 64px; height: 64px; }
.cabinet-page details.cabinet-homework-options { max-height: none; overflow: visible; padding: 10px 0; margin: 6px 0; border: 0; border-bottom: 1px solid #e5e9f1; border-radius: 0; }
.cabinet-homework-options summary { cursor: pointer; color: #4548c8; font-size: 12px; }
.cabinet-attachment-picker { margin: 12px 0; }
.cabinet-page label.cabinet-attachment-drop { position: relative; display: flex; align-items: center; gap: 12px; min-height: 82px; padding: 14px; margin: 0; border: 1px dashed #b5b9df; border-radius: 10px; background: #f7f7ff; cursor: pointer; }
.cabinet-attachment-drop:hover, .cabinet-attachment-drop:focus-within { border-color: #5659fe; background: #efefff; }
.cabinet-attachment-drop input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.cabinet-attachment-icon { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 40px; height: 40px; border-radius: 9px; background: #e8e7ff; color: #5659fe; }
.cabinet-attachment-icon i { width: 22px; height: 22px; }
.cabinet-attachment-drop strong { display: block; color: #27324a; font-size: 13px; }
.cabinet-attachment-drop small { display: block; margin-top: 5px; color: #65718a; font-size: 11px; line-height: 1.5; }
.cabinet-attachment-plus { margin-left: auto; color: #5659fe; font-size: 24px; }
.cabinet-attachment-summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 8px 0; color: #556278; font-size: 12px; }
.cabinet-attachment-previews { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.cabinet-attachment-preview { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; padding: 8px; border: 1px solid #e0e4ee; border-radius: 8px; background: #fff; }
.cabinet-attachment-preview img { width: 100%; height: 88px; object-fit: cover; border-radius: 5px; }
.cabinet-attachment-preview > i { width: 28px; height: 40px; color: #7771e7; }
.cabinet-attachment-preview > span { max-width: 100%; font-size: 11px; color: #556278; overflow-wrap: anywhere; }
.cabinet-attachment-picker [hidden] { display: none !important; }
@media (max-width: 600px) {
    .cabinet-learning-toolbar > button, .cabinet-learning-toolbar > a, .cabinet-learning-toolbar > form { flex: 1 1 160px; }
    .cabinet-shell .cabinet-learning-toolbar .cabinet-button { width: 100%; min-height: 44px; }
    .cabinet-shell .cabinet-attendance-table { min-width: 530px; }
    .cabinet-homework-fields { grid-template-columns: 1fr; gap: 0; }
    .cabinet-page .cabinet-homework-editor input, .cabinet-page .cabinet-homework-editor textarea { font-size: 16px; }
    .cabinet-page .cabinet-homework-editor button[type=submit] { width: 100%; min-height: 44px; }
    .cabinet-attachment-summary button { min-height: 44px; }
}
