
.wikis-teacher-materials,
.wikis-teacher-materials * {
    box-sizing: border-box;
}

.wikis-teacher-materials {
    width: 100%;
    max-width: 1180px;
    margin: 30px auto;
    padding: 0 16px;
}

.wikis-page-header,
.wikis-student-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 18px;
    padding: 24px 26px;
    border: 1px solid #e7e0ef;
    border-radius: 18px;
    background: linear-gradient(135deg, #faf8ff, #fff);
    box-shadow: 0 10px 30px rgba(54, 42, 87, .06);
}

.wikis-page-header h1,
.wikis-student-header h1 {
    margin: 0 0 6px;
    color: #302a39;
    font-size: clamp(27px, 4vw, 36px);
    line-height: 1.15;
}

.wikis-page-header p,
.wikis-student-header p {
    margin: 0;
    color: #766f7f;
    font-size: 14px;
}

.wikis-eyebrow {
    display: block;
    margin-bottom: 6px;
    color: #7257b4;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .09em;
}

.wikis-back-button,
.wikis-cancel-edit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 14px;
    border: 1px solid #ddd4e9;
    border-radius: 10px;
    background: #fff;
    color: #644d9e;
    font-size: 13px;
    font-weight: 750;
    text-decoration: none;
}

.wikis-students-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 12px;
    padding: 14px 16px;
    border: 1px solid #ebe5f2;
    border-radius: 14px;
    background: #fff;
}

.wikis-students-toolbar > div {
    display: grid;
    gap: 2px;
}

.wikis-students-toolbar strong {
    color: #332d3c;
    font-size: 15px;
}

.wikis-students-toolbar span {
    color: #7d7586;
    font-size: 12px;
}

.wikis-student-search {
    width: min(360px, 100%);
}

.wikis-student-search input {
    width: 100%;
    min-height: 42px;
    padding: 9px 13px 9px 38px;
    border: 1px solid #ddd6e7;
    border-radius: 10px;
    background:
        #fff
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23755f9c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E")
        no-repeat 12px center;
    color: #342e3d;
    font: inherit;
    outline: none;
}

.wikis-student-search input:focus {
    border-color: #8a6fc7;
    box-shadow: 0 0 0 3px rgba(117, 89, 189, .1);
}

.wikis-students-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
}

.wikis-student-row {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    min-height: 68px;
    padding: 11px 13px;
    border: 1px solid #e8e2ef;
    border-radius: 13px;
    background: #fff;
    color: inherit;
    text-decoration: none;
    box-shadow: 0 4px 16px rgba(52, 41, 82, .035);
    transition: .15s ease;
}

.wikis-student-row:hover {
    transform: translateY(-1px);
    border-color: #cfc1e4;
    box-shadow: 0 8px 22px rgba(70, 50, 110, .075);
}

.wikis-avatar {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 42px !important;
    height: 42px !important;
    min-width: 42px !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 50% !important;
    background: linear-gradient(135deg, #765bb8, #9b7dd3) !important;
    color: #fff !important;
    font-size: 13px !important;
    font-weight: 800 !important;
    line-height: 1 !important;
    letter-spacing: 0 !important;
}

.wikis-avatar--large {
    width: 54px !important;
    height: 54px !important;
    min-width: 54px !important;
    font-size: 17px !important;
}

.wikis-student-row__identity {
    display: grid;
    min-width: 0;
    gap: 2px;
}

.wikis-student-row__identity strong,
.wikis-student-row__identity span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wikis-student-row__identity strong {
    color: #332d3c;
    font-size: 14px;
}

.wikis-student-row__identity span {
    color: #807886;
    font-size: 12px;
}

.wikis-student-row__meta {
    display: grid;
    justify-items: end;
    gap: 3px;
    white-space: nowrap;
}

.wikis-student-row__meta small {
    color: #8a8290;
    font-size: 11px;
}

.wikis-student-row__meta b {
    color: #6b52a8;
    font-size: 12px;
}

.wikis-students-empty {
    margin-top: 12px;
    padding: 22px;
    border: 1px dashed #d9cee8;
    border-radius: 14px;
    background: #faf8fd;
    color: #756d7c;
    text-align: center;
}

.wikis-student-header__identity {
    display: flex;
    align-items: center;
    gap: 14px;
}

.wikis-student-header__actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.wikis-material-count {
    display: grid;
    min-width: 76px;
    padding: 8px 12px;
    border-radius: 11px;
    background: #f4effb;
    color: #624b9b;
    font-size: 20px;
    font-weight: 800;
    line-height: 1;
    text-align: center;
}

.wikis-material-count small {
    margin-top: 4px;
    color: #786a91;
    font-size: 10px;
    font-weight: 700;
}

.wikis-student-workspace {
    display: grid;
    grid-template-columns: minmax(340px, .82fr) minmax(0, 1.18fr);
    gap: 18px;
    align-items: start;
}

.wikis-form-card,
.wikis-history-card {
    padding: 22px;
    border: 1px solid #e8e2ef;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 8px 25px rgba(52, 41, 82, .045);
}

.wikis-form-card {
    position: sticky;
    top: 18px;
}

.wikis-form-card__heading h2,
.wikis-history-card__heading h2 {
    margin: 0;
    color: #342e3d;
    font-size: 20px;
}

.wikis-form-card form {
    display: grid;
    gap: 14px;
    margin-top: 18px;
}

.wikis-form-card label,
.wikis-source-switch legend {
    color: #463e50;
    font-size: 13px;
    font-weight: 750;
}

.wikis-form-card input[type="text"],
.wikis-form-card input[type="file"],
.wikis-form-card select,
.wikis-form-card textarea {
    width: 100%;
    margin-top: 6px;
    padding: 11px 12px;
    border: 1px solid #ddd5e8;
    border-radius: 9px;
    background: #fff;
    font: inherit;
    outline: none;
}

.wikis-form-card select {
    min-height: 46px;
}

.wikis-form-card input:focus,
.wikis-form-card select:focus,
.wikis-form-card textarea:focus {
    border-color: #8469c2;
    box-shadow: 0 0 0 3px rgba(117, 89, 189, .09);
}

.wikis-source-switch {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    border: 0;
}

.wikis-source-switch legend {
    margin-bottom: 6px;
}

.wikis-source-switch label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 11px 12px;
    border: 1px solid #e3dbea;
    border-radius: 10px;
    background: #fcfbfe;
    cursor: pointer;
}

.wikis-source-switch input {
    margin-top: 3px;
}

.wikis-source-switch span {
    display: grid;
    gap: 2px;
}

.wikis-source-switch strong {
    color: #3c3545;
    font-size: 13px;
}

.wikis-source-switch small {
    color: #817989;
    font-size: 11px;
    font-weight: 500;
}

.wikis-inline-note {
    margin: 8px 0 0;
    padding: 10px 11px;
    border-radius: 9px;
    background: #f8f5fc;
    color: #736b7c;
    font-size: 12px;
    line-height: 1.5;
}

.wikis-form-card button[type="submit"] {
    min-height: 44px;
    border: 0;
    border-radius: 9px;
    background: linear-gradient(135deg, #7055b2, #8c6dcc);
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
}

.wikis-history-card__heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.wikis-history-card__heading > span {
    padding: 7px 10px;
    border-radius: 999px;
    background: #f3eef9;
    color: #7057a9;
    font-size: 11px;
    font-weight: 750;
}

.wikis-history-item {
    padding: 17px;
    border: 1px solid #eae4f0;
    border-radius: 13px;
    background: #fcfbfe;
}

.wikis-history-item + .wikis-history-item {
    margin-top: 12px;
}

.wikis-history-item__top h3 {
    margin: 7px 0 4px;
    color: #352e3f;
    font-size: 17px;
}

.wikis-history-item__top p {
    margin: 0;
    color: #7b7482;
    font-size: 12px;
}

.wikis-history-badge {
    display: inline-flex;
    padding: 5px 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .05em;
}

.wikis-history-badge.is-amelia {
    background: #ede7f8;
    color: #654da1;
}

.wikis-history-badge.is-extra {
    background: #eaf7f1;
    color: #37775a;
}

.wikis-history-section {
    margin-top: 13px;
    color: #625b68;
    font-size: 13px;
    line-height: 1.6;
}

.wikis-history-section > strong {
    display: block;
    margin-bottom: 6px;
    color: #443d4d;
    font-size: 12px;
}

.wikis-link-list {
    display: grid;
    gap: 7px;
}

.wikis-link-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 11px;
    border-radius: 8px;
    background: #f2edf9;
    color: #684fa9;
    font-size: 12px;
    font-weight: 750;
    text-decoration: none;
}

.wikis-pdf-preview {
    margin-top: 13px;
}

.wikis-pdf-preview summary {
    cursor: pointer;
    color: #684fa9;
    font-size: 13px;
    font-weight: 800;
}

.wikis-pdf-preview > a {
    display: inline-flex;
    margin-top: 9px;
    color: #6a54a1;
    font-size: 12px;
    font-weight: 700;
}

.wikis-pdf-preview iframe {
    width: 100%;
    height: 480px;
    margin-top: 10px;
    border: 0;
    border-radius: 9px;
    background: #f4f4f4;
}

.wikis-history-actions {
    display: flex;
    gap: 8px;
    margin-top: 14px;
}

.wikis-history-actions form {
    margin: 0;
}

.wikis-history-actions a,
.wikis-history-actions button {
    padding: 8px 11px;
    border: 0;
    border-radius: 8px;
    font: inherit;
    font-size: 12px;
    font-weight: 750;
    text-decoration: none;
    cursor: pointer;
}

.wikis-history-actions a {
    background: #ece6f8;
    color: #624a9f;
}

.wikis-history-actions button {
    background: #fff0f0;
    color: #a43e3e;
}

.wikis-mat-message,
.wikis-mat-alert {
    margin-bottom: 16px;
    padding: 13px 15px;
    border-radius: 10px;
    background: #f0faf2;
    color: #39734a;
    font-size: 13px;
    font-weight: 700;
}

.wikis-mat-message.is-error {
    background: #fff1f1;
    color: #a23f3f;
}

.wikis-empty-state {
    padding: 24px;
    border: 1px dashed #d9cee8;
    border-radius: 12px;
    background: #faf8fd;
    color: #756d7c;
    text-align: center;
}

@media (max-width: 900px) {
    .wikis-students-grid,
    .wikis-student-workspace {
        grid-template-columns: 1fr;
    }

    .wikis-form-card {
        position: static;
    }
}

@media (max-width: 680px) {
    .wikis-teacher-materials {
        padding: 0 10px;
    }

    .wikis-page-header,
    .wikis-student-header,
    .wikis-students-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .wikis-student-header__actions {
        align-items: stretch;
        flex-direction: column;
    }

    .wikis-material-count {
        width: 100%;
    }

    .wikis-student-row {
        grid-template-columns: 42px minmax(0, 1fr);
    }

    .wikis-student-row__meta {
        grid-column: 2;
        justify-items: start;
    }
}


/* PANEL UCZNIA 1.3.0 */
.wikis-student-materials,
.wikis-student-materials * {
    box-sizing: border-box;
}

.wikis-student-materials {
    width: 100%;
    max-width: 1180px;
    margin: 30px auto;
    padding: 0 16px;
}

.wikis-student-materials__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    margin-bottom: 18px;
    padding: 24px 26px;
    border: 1px solid #e7e0ef;
    border-radius: 18px;
    background: linear-gradient(135deg, #faf8ff, #fff);
    box-shadow: 0 10px 30px rgba(54, 42, 87, .06);
}

.wikis-student-materials__header h1 {
    margin: 0 0 6px;
    color: #302a39;
    font-size: clamp(27px, 4vw, 36px);
    line-height: 1.15;
}

.wikis-student-materials__header p {
    margin: 0;
    color: #766f7f;
    font-size: 14px;
}

.wikis-student-materials__summary {
    display: grid;
    min-width: 84px;
    padding: 10px 14px;
    border-radius: 12px;
    background: #fff0f0;
    color: #b43e48;
    text-align: center;
}

.wikis-student-materials__summary span {
    font-size: 23px;
    font-weight: 850;
    line-height: 1;
}

.wikis-student-materials__summary small {
    margin-top: 4px;
    font-size: 11px;
    font-weight: 750;
}

.wikis-student-materials__layout {
    display: grid;
    grid-template-columns: minmax(290px, .72fr) minmax(0, 1.28fr);
    gap: 16px;
    align-items: start;
}

.wikis-student-materials__list,
.wikis-student-materials__details {
    border: 1px solid #e8e2ef;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 8px 25px rgba(52, 41, 82, .045);
}

.wikis-student-materials__list {
    overflow: hidden;
}

.wikis-student-materials__list-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 17px;
    border-bottom: 1px solid #eee8f3;
}

.wikis-student-materials__list-heading strong {
    color: #342e3d;
    font-size: 14px;
}

.wikis-student-materials__list-heading span {
    color: #857d8c;
    font-size: 11px;
}

.wikis-student-materials__items {
    display: grid;
    max-height: 710px;
    overflow-y: auto;
}

.wikis-student-material-item {
    display: grid;
    gap: 5px;
    width: 100%;
    padding: 14px 16px;
    border: 0;
    border-bottom: 1px solid #eee9f2;
    border-left: 4px solid transparent;
    background: #fff;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease;
}

.wikis-student-material-item:hover,
.wikis-student-material-item.is-active {
    background: #f8f5fc;
    border-left-color: #765ab8;
}

.wikis-student-material-item.is-unread {
    border: 1px solid #efb5ba;
    border-left: 4px solid #d84652;
    background: #fff8f8;
}

.wikis-student-material-item.is-unread + .wikis-student-material-item {
    border-top: 0;
}

.wikis-student-material-item__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.wikis-new-badge {
    display: inline-flex;
    padding: 4px 7px;
    border-radius: 999px;
    background: #d84652;
    color: #fff;
    font-size: 9px;
    font-weight: 850;
    letter-spacing: .06em;
}

.wikis-student-material-item > strong {
    overflow: hidden;
    color: #342e3d;
    font-size: 14px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wikis-student-material-item > small {
    color: #837b89;
    font-size: 11px;
}

.wikis-student-material-item__preview {
    overflow: hidden;
    color: #69616f;
    font-size: 12px;
    line-height: 1.45;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wikis-student-materials__details {
    min-height: 420px;
    padding: 22px;
}

.wikis-student-materials__placeholder {
    display: grid;
    place-content: center;
    min-height: 370px;
    padding: 30px;
    color: #7a7281;
    text-align: center;
}

.wikis-student-materials__placeholder span {
    color: #443b50;
    font-size: 19px;
    font-weight: 800;
}

.wikis-student-materials__placeholder p {
    max-width: 420px;
    margin: 8px 0 0;
    font-size: 13px;
    line-height: 1.6;
}

.wikis-student-material-detail__header {
    padding-bottom: 16px;
    border-bottom: 1px solid #eee8f3;
}

.wikis-student-material-detail__header h2 {
    margin: 9px 0 5px;
    color: #332d3c;
    font-size: 23px;
    line-height: 1.25;
}

.wikis-student-material-detail__header p {
    margin: 0;
    color: #807887;
    font-size: 12px;
}

.wikis-student-material-detail__section {
    margin-top: 18px;
}

.wikis-student-material-detail__section > strong {
    display: block;
    margin-bottom: 8px;
    color: #453d4e;
    font-size: 12px;
}

.wikis-student-material-detail__section > div {
    color: #5f5866;
    font-size: 14px;
    line-height: 1.7;
}

@media (max-width: 850px) {
    .wikis-student-materials__layout {
        grid-template-columns: 1fr;
    }

    .wikis-student-materials__items {
        max-height: 390px;
    }
}

@media (max-width: 620px) {
    .wikis-student-materials {
        padding: 0 10px;
    }

    .wikis-student-materials__header {
        align-items: stretch;
        flex-direction: column;
    }

    .wikis-student-materials__summary {
        width: 100%;
    }

    .wikis-student-materials__details {
        padding: 17px;
    }
}


/* PANEL UCZNIA 1.3.1 */
.wikis-student-materials__header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.wikis-pdf-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.wikis-pdf-actions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 12px;
    border-radius: 8px;
    background: #f0ebf8;
    color: #654da1;
    font-size: 12px;
    font-weight: 750;
    text-decoration: none;
}

.wikis-pdf-preview iframe {
    height: 680px;
}

@media (max-width: 850px) {
    .wikis-student-materials__header-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .wikis-student-materials__header-actions .wikis-back-button {
        width: 100%;
    }

    .wikis-pdf-preview iframe {
        height: 560px;
    }
}

@media (max-width: 620px) {
    .wikis-pdf-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .wikis-pdf-preview iframe {
        height: 440px;
    }
}


/* Galerie zdjęć w materiałach */
.wikis-image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.wikis-image-gallery a {
    display: block;
    overflow: hidden;
    border: 1px solid #e2d9ee;
    border-radius: 12px;
    background: #f8f5fc;
    aspect-ratio: 4 / 3;
}

.wikis-image-gallery img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .2s ease;
}

.wikis-image-gallery a:hover img {
    transform: scale(1.025);
}

.wikis-upload-note {
    display: block;
    margin-top: 7px;
    color: #766e7f;
    font-size: 12px;
    line-height: 1.45;
}

@media (max-width: 640px) {
    .wikis-image-gallery {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}


/* Kolejka załączników */
.wikis-attachments-queue {
    margin-top: 12px;
    padding: 12px;
    border: 1px solid #e1d9ec;
    border-radius: 12px;
    background: #faf8fd;
}

.wikis-attachments-queue[hidden] {
    display: none !important;
}

.wikis-attachments-queue__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.wikis-attachments-queue ul {
    display: grid;
    gap: 7px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.wikis-attachments-queue li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 9px 10px;
    border: 1px solid #e8e1f0;
    border-radius: 9px;
    background: #fff;
}

.wikis-attachments-queue__file {
    min-width: 0;
}

.wikis-attachments-queue__name {
    display: block;
    overflow: hidden;
    color: #3f3649;
    font-size: 13px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wikis-attachments-queue__meta {
    display: block;
    margin-top: 2px;
    color: #81778a;
    font-size: 11px;
}

.wikis-attachments-queue__remove {
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #f2edf7;
    color: #65566f;
    font-size: 18px;
    line-height: 30px;
    cursor: pointer;
}

.wikis-attachments-queue__remove:hover {
    background: #e8dff0;
}


.wikis-attachments-queue__tools {
    display: flex;
    align-items: center;
    gap: 10px;
}

.wikis-attachments-clear {
    padding: 6px 10px !important;
    border: 1px solid #ded4e8 !important;
    border-radius: 8px !important;
    background: #fff !important;
    color: #65566f !important;
    font-size: 12px !important;
    line-height: 1.2 !important;
    cursor: pointer;
}

.wikis-attachments-clear:hover {
    background: #f3eef7 !important;
}


.wikis-pdf-lazy {
    margin-top: 10px;
}

.wikis-pdf-load-preview {
    width: 100%;
    padding: 11px 14px !important;
    border: 1px solid #dcd2e7 !important;
    border-radius: 10px !important;
    background: #faf8fd !important;
    color: #5b4a69 !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    cursor: pointer;
}

.wikis-pdf-load-preview:hover {
    background: #f2edf7 !important;
}

.wikis-pdf-lazy iframe[hidden] {
    display: none !important;
}


/* Safari-safe attachment slots */
.wikis-attachments-field {
    display: block;
}

.wikis-attachments-field__label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
}

.wikis-attachment-slots {
    display: grid;
    gap: 10px;
}

.wikis-attachment-slot {
    padding: 11px;
    border: 1px solid #e1d9ec;
    border-radius: 11px;
    background: #faf8fd;
}

.wikis-attachment-slot[hidden] {
    display: none !important;
}

.wikis-attachment-slot label {
    margin: 0;
}

.wikis-attachment-slot label > span {
    display: block;
    margin-bottom: 6px;
    color: #655b70;
    font-size: 12px;
    font-weight: 600;
}

.wikis-attachment-slot input[type="file"] {
    width: 100%;
}

.wikis-attachment-slot__selected {
    margin-top: 8px;
    padding: 8px 9px;
    border-radius: 8px;
    background: #fff;
    color: #51465d;
    font-size: 12px;
    overflow-wrap: anywhere;
}

.wikis-add-attachment-slot {
    margin-top: 10px !important;
    padding: 9px 13px !important;
    border: 1px solid #d9cde4 !important;
    border-radius: 9px !important;
    background: #fff !important;
    color: #5e4c6b !important;
    font-size: 13px !important;
    cursor: pointer;
}

.wikis-add-attachment-slot:hover {
    background: #f4eef8 !important;
}


/* AJAX upload queue */
.wikis-upload-queue {
    margin-top: 12px;
    padding: 12px;
    border: 1px solid #dfd5e8;
    border-radius: 12px;
    background: #faf8fd;
}

.wikis-upload-queue[hidden] {
    display: none !important;
}

.wikis-upload-queue__header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.wikis-upload-queue ul {
    display: grid;
    gap: 9px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.wikis-upload-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px 12px;
    padding: 10px;
    border: 1px solid #e8e0ef;
    border-radius: 10px;
    background: #fff;
}

.wikis-upload-row__name {
    overflow: hidden;
    font-size: 13px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wikis-upload-row__status {
    font-size: 12px;
    color: #746a7d;
}

.wikis-upload-row__progress {
    grid-column: 1 / -1;
    height: 6px;
    overflow: hidden;
    border-radius: 999px;
    background: #eee8f3;
}

.wikis-upload-row__bar {
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: #7d6790;
    transition: width .15s linear;
}

.wikis-upload-row.is-success .wikis-upload-row__status {
    color: #39784a;
}

.wikis-upload-row.is-error {
    border-color: #e8bcbc;
    background: #fff8f8;
}

.wikis-upload-row.is-error .wikis-upload-row__status {
    max-width: 360px;
    color: #a33838;
    white-space: normal;
}

.wikis-pdf-first-page {
    display: block;
    width: min(260px, 100%);
    margin: 10px 0;
}

.wikis-pdf-first-page img {
    display: block;
    width: 100%;
    height: auto;
    border: 1px solid #e0d8e7;
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(54, 43, 67, .08);
}


/* Grupowanie historii rok -> miesiąc, wersja 1.5.5 */
.wikis-grouped-history,
.wikis-material-year-group__content,
.wikis-history-year-group__content,
.wikis-material-month-group__content,
.wikis-history-month-group__content {
    display: grid;
}

.wikis-grouped-history {
    gap: 12px;
}

.wikis-material-year-group,
.wikis-history-year-group,
.wikis-material-month-group,
.wikis-history-month-group {
    border: 0;
}

.wikis-material-year-group > summary,
.wikis-history-year-group > summary,
.wikis-material-month-group > summary,
.wikis-history-month-group > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    list-style: none;
    cursor: pointer;
    user-select: none;
}

.wikis-material-year-group > summary::-webkit-details-marker,
.wikis-history-year-group > summary::-webkit-details-marker,
.wikis-material-month-group > summary::-webkit-details-marker,
.wikis-history-month-group > summary::-webkit-details-marker {
    display: none;
}

.wikis-material-year-group > summary,
.wikis-history-year-group > summary {
    padding: 12px 14px;
    border-radius: 11px;
    background: #eee8f7;
    color: #4d3b7c;
    font-size: 15px;
    font-weight: 850;
}

.wikis-material-year-group > summary::after,
.wikis-history-year-group > summary::after,
.wikis-material-month-group > summary::after,
.wikis-history-month-group > summary::after {
    content: '›';
    font-size: 20px;
    line-height: 1;
    transform: rotate(90deg);
    transition: transform .15s ease;
}

.wikis-material-year-group:not([open]) > summary::after,
.wikis-history-year-group:not([open]) > summary::after,
.wikis-material-month-group:not([open]) > summary::after,
.wikis-history-month-group:not([open]) > summary::after {
    transform: rotate(0deg);
}

.wikis-material-year-group__content,
.wikis-history-year-group__content {
    gap: 9px;
    padding: 9px 0 2px;
}

.wikis-material-month-group > summary,
.wikis-history-month-group > summary {
    padding: 10px 12px;
    border: 1px solid #e6deef;
    border-radius: 9px;
    background: #faf8fd;
    color: #51485b;
    font-size: 13px;
    font-weight: 800;
}

.wikis-material-month-group > summary small,
.wikis-history-month-group > summary small {
    margin-left: auto;
    padding: 3px 7px;
    border-radius: 999px;
    background: #eee8f7;
    color: #6c57a0;
    font-size: 10px;
    font-weight: 800;
}

.wikis-material-month-group__content,
.wikis-history-month-group__content {
    gap: 10px;
    padding: 9px 0 3px;
}

.wikis-material-month-group__content .wikis-student-material-item {
    border: 1px solid #eee9f2;
    border-left: 4px solid transparent;
    border-radius: 9px;
}

.wikis-material-month-group__content .wikis-student-material-item:hover,
.wikis-material-month-group__content .wikis-student-material-item.is-active {
    border-left-color: #765ab8;
}

.wikis-material-month-group__content .wikis-student-material-item.is-unread {
    border: 1px solid #efb5ba;
    border-left: 4px solid #d84652;
}

.wikis-history-month-group__content .wikis-history-item + .wikis-history-item {
    margin-top: 0;
}

.wikis-student-materials__items {
    gap: 10px;
    padding: 10px;
}
