html{
    scroll-behavior:smooth;
}
.warning-box{
    margin:25px 0;
    padding:20px 24px;
    font-size:18px;
    background:#fff3f3;
    border:1px solid #f2b8b8;
    border-left:6px solid #dc3545;
    border-radius:10px;

    color:#5a1d1d;
    line-height:1.6;
}

/* =========================================================
   PASSTEST — ОДНА БІЛА КАРТКА НА ВСЕ ПИТАННЯ
========================================================= */

.passtest-page .question-card.ck-content {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    padding: 30px;
}

/* Внутрішні елементи НЕ повинні створювати свої картки */

.passtest-page .question-item {
    background: transparent;
    border: none;
    box-shadow: none;
    border-radius: 0;
    padding: 0;
}

/* Інформація також без окремої картки */

.passtest-page .question-info .passtest-info-card {
    background: transparent;
    border: none;
    box-shadow: none;
    border-radius: 0;
    padding: 0;
    margin: 0 0 25px 0;
}

/* Форма прозора */

.passtest-page .testForm {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
}

.warning-title{
    font-size:22px;
    font-weight:700;
    color:#b71c1c;
    margin-bottom:12px;
}

.warning-box p{
    margin:10px 0;
}

.warning-box ul{
    margin:8px 0 16px 22px;
}

.warning-box li{
    margin:6px 0;
}

.warning-note{
    margin:18px 0;
    padding:12px 15px;

    background:#ffe6e6;
    border-radius:8px;
    font-weight:500;
}

.allowed-list li{
    color:#1e6b2d;
}

.manual-grade-modal{
    position:fixed;
    inset:0;
    background:rgba(0,0,0,.45);
    display:none;
    align-items:center;
    justify-content:center;
    z-index:99999;
}

.manual-grade-modal.show{
    display:flex !important;
}

.manual-grade-modal-content{
    background:#fff;
    width:420px;
    max-width:95%;
    border-radius:10px;
    padding:25px;
    box-shadow:0 10px 30px rgba(0,0,0,.25);
}

.manual-grade-modal-content h3{
    margin:0;
    text-align:center;
}

.manual-grade-modal-content input[type="number"]{
    padding:8px 10px;
    font-size:16px;
}

.manual-grade-actions{
    display:flex;
    justify-content:flex-end;
    gap:12px;
    margin-top:30px;
}

.manual-grade-actions button{
    min-width:140px;
    padding:12px 20px;
    font-size:16px;
    font-weight:600;
    border:none;
    border-radius:8px;
    cursor:pointer;
    transition:.2s;
}

.manual-grade-save{
    background:#28a745;
    color:#fff;
}

.manual-grade-save:hover{
    background:#218838;
}

.manual-grade-cancel{
    background:#dc3545;
    color:#fff;
}

.manual-grade-cancel:hover{
    background:#c82333;
}



.manual-grade-btn{
    display:inline-flex;
    align-items:center;
    gap:8px;

    padding:12px 22px;

    background:linear-gradient(135deg,#0d6efd,#0b5ed7);
    color:#fff;
    text-decoration:none;

    font-size:17px;
    font-weight:600;

    border-radius:10px;

    box-shadow:0 4px 12px rgba(13,110,253,.25);

    transition:.2s ease;
}

.manual-grade-btn:hover{
    background:linear-gradient(135deg,#0b5ed7,#084298);
    color:#fff;
    transform:translateY(-2px);
    box-shadow:0 8px 18px rgba(13,110,253,.35);
}

.manual-grade-btn:active{
    transform:translateY(0);
}


.attempt-stats{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
    gap:18px;
    margin:30px 0;
}

.attempt-stat-card{
    color:#fff;
    border-radius:14px;
    padding:22px;
    box-shadow:0 8px 18px rgba(0,0,0,.08);
}

.attempt-stat-card:nth-child(1){
    background:#0d6efd;
}

.attempt-stat-card:nth-child(2){
    background:#198754;
}

.attempt-stat-card:nth-child(3){
    background:#6f42c1;
}

.attempt-stat-card:nth-child(4){
    background:#fd7e14;
}

.attempt-stat-number{
    font-size:34px;
    font-weight:700;
    margin-bottom:8px;
}

.attempt-stat-title{
    font-size:17px;
}


.attempt-toolbar{
    display:flex;
    gap:15px;
    justify-content:space-between;
    align-items:center;
    flex-wrap:wrap;
    margin-bottom:25px;
}

.attempt-search{
    flex:1;
    min-width:260px;
    padding:12px 15px;
    border:1px solid #dcdcdc;
    border-radius:8px;
    font-size:16px;
}

.attempt-filter{
    width:220px;
    padding:12px;
    border-radius:8px;
    border:1px solid #dcdcdc;
    font-size:16px;
}

.attempts-admin-table{
    width:100%;
    border-collapse:collapse;
    background:#fff;
    border-radius:12px;
    overflow:hidden;
    box-shadow:0 5px 15px rgba(0,0,0,.08);
}

.attempts-admin-table thead{
    background:#0d6efd;
    color:#fff;
}

.attempts-admin-table th{
    padding:15px;
    text-align:center;
}

.attempts-admin-table td{
    padding:14px;
    text-align:center;
    border-bottom:1px solid #eee;
}

.attempts-admin-table tbody tr:hover{
    background:#f8fbff;
}

.attempt-status{
    display:inline-block;
    padding:6px 14px;
    border-radius:20px;
    font-weight:600;
    font-size:14px;
}

.attempt-status.finished{
    background:#d1f7df;
    color:#0f7b38;
}

.attempt-status.progress{
    background:#fff0c7;
    color:#996500;
}


.attempt-view-btn{
    display:inline-block;
    padding:8px 15px;
    border-radius:7px;
    background:#0d6efd;
    color:#fff;
    text-decoration:none;
    font-weight:600;
    transition:.2s;
}

.attempt-view-btn:hover{
    background:#0b5ed7;
    color:#fff;
}

.empty-attempts{
    text-align:center;
    padding:70px 20px;
    font-size:24px;
    background:#fafafa;
    border-radius:12px;
    border:2px dashed #ddd;
    color:#777;
}

.attempts-table-wrapper{
    width:100%;
}


.attempt-pagination{
    display:flex;
    justify-content:center;
    align-items:center;
    gap:8px;
    margin:25px 0 5px;
    flex-wrap:wrap;
}

.attempt-page-btn{
    min-width:42px;
    height:42px;
    padding:0 14px;
    display:flex;
    align-items:center;
    justify-content:center;
    border:1px solid #d8dce3;
    border-radius:10px;
    background:#fff;
    color:#333;
    text-decoration:none;
    font-weight:600;
    transition:.2s;
    user-select:none;
}

.attempt-page-btn:hover{
    background:#f3f6fb;
    border-color:#0d6efd;
    color:#0d6efd;
}

.attempt-page-btn.active{
    background:#0d6efd;
    border-color:#0d6efd;
    color:#fff;
    cursor:default;
}

.attempt-page-btn.active:hover{
    background:#0d6efd;
    color:#fff;
}

@media (max-width:768px){

    .attempt-pagination{
        gap:6px;
    }

    .attempt-page-btn{
        min-width:38px;
        height:38px;
        padding:0 10px;
        font-size:14px;
    }

}

.attempt-page-btn.active{
    pointer-events: none;
    cursor: default;
}

.attempt-delete-btn{
    display:block;
    margin-top:8px;
    padding:8px 14px;
    border-radius:8px;
    text-align:center;
    text-decoration:none;
    font-weight:600;
    background:#dc3545;
    color:#fff;
    transition:.2s;
}

.attempt-delete-btn:hover{
    background:#bb2d3b;
}



@media(max-width:1300px){

    .attempts-table-wrapper{
        overflow-x:auto;
        overflow-y:visible;
        -webkit-overflow-scrolling:touch;
    }

    .attempts-admin-table{
        min-width:1100px;
    }

}
.test-attempts-btn{
    display:inline-flex;
    align-items:center;
    gap:8px;
    padding:12px 18px;
    border-radius:8px;
    background:#17a2b8;
    color:#fff;
    text-decoration:none;
    font-weight:600;
    transition:.2s;
}

.test-attempts-btn:hover{
    background:#138496;
    color:#fff;
}

.test-attempts-btn span{
    background:rgba(255,255,255,.18);
    padding:3px 9px;
    border-radius:20px;
    font-size:18px;
}


.grading-row{

    background:#fff8dc !important;

}

.grading-attempt{

    display:inline-block;

    background:#ffd54f;

    color:#5f4600;

    padding:6px 12px;

    border-radius:20px;

    font-weight:700;

}


.attempt-user-separator td{
    height:18px;
    padding:0;
    border:none;
    background:transparent;
}

.attempt-user-separator + .attempt-row td{
    border-top:3px solid #4f7cff;
}


.edit-test-modal{
    display:none;
    position:fixed;
    z-index:3000;
    left:0;
    top:0;
    width:100%;
    height:100%;
    background:rgba(0,0,0,.45);
}

.edit-test-modal-content{
    position:relative;
    background:#fff;
    width:520px;
    max-width:calc(100% - 40px);
    margin:8% auto;
    padding:28px;
    border-radius:12px;
    box-shadow:0 15px 40px rgba(0,0,0,.25);
}

.edit-test-modal-title{
    margin:0 0 18px;
    font-size:28px;
    font-weight:700;
}

.edit-test-modal-text{
    margin:0 0 15px;
    font-size:18px;
    line-height:1.6;
}

.edit-test-modal-actions{
    margin-top:25px;
    text-align:right;
}

.edit-test-modal-close{
    position:absolute;
    top:12px;
    right:16px;
    font-size:30px;
    line-height:1;
    cursor:pointer;
    color:#777;
    transition:.2s;
}

.edit-test-modal-close:hover{
    color:#000;
}


.next-page-modal{
    position:fixed;
    inset:0;
    background:rgba(0,0,0,.45);
    display:flex;
    justify-content:center;
    align-items:center;
    z-index:99999;
}

.next-page-modal-content{
    background:#fff;
    padding:30px;
    border-radius:12px;
    max-width:470px;
    width:90%;
    font-size:20px;
    text-align:center;
    box-shadow:0 15px 40px rgba(0,0,0,.2);
}

.next-page-modal-buttons{
    margin-top:25px;
    display:flex;
    gap:15px;
    justify-content:center;
    flex-wrap:wrap;
}



.navigation-warning{
    margin:25px 0;
    padding:16px 18px;
    border-left:5px solid #f39c12;
    background:#fff8e5;
    color:#8a5a00;
    border-radius:10px;
    font-size:20px;
    line-height:1.6;
}

.navigation-warning strong{
    display:block;
    font-size:22px;
    margin-bottom:6px;
}

.nav-disabled{
    cursor:default;
    pointer-events:none;
}


.tests-table{

    width:100%;
    max-width:100%;

    border-collapse:collapse;

    margin-top:20px;

    background:#fff;

    border-radius:10px;

    overflow:hidden;

    box-shadow:0 4px 15px rgba(0,0,0,.08);

    table-layout:fixed;

}

.tests-table thead th{

    color:#000;

}

.tests-table th{

    background:#5a99f9;

    color:#fff;

    padding:14px;

    font-size:17px;

    overflow-wrap:anywhere;
    word-break:break-word;

}

.tests-table td{

    padding:14px;

    border-bottom:1px solid #eee;

    font-size:16px;

    overflow-wrap:anywhere;
    word-break:break-word;

}

.tests-table tr:nth-child(even){

    background:#fafafa;

}

.tests-table tr:hover{

    background:#f3f8ff;

}


/* =========================================================
   МОБІЛЬНІ ЕКРАНИ
========================================================= */

@media(max-width:600px){

    .tests-table{

        width:100%;
        max-width:100%;

        table-layout:fixed;

    }

    .tests-table th,
    .tests-table td{

        padding:10px 7px;

        font-size:14px;

        overflow-wrap:anywhere;
        word-break:break-word;

    }

    .tests-table th:first-child,
    .tests-table td:first-child{

        width:45px;

    }

}
.question-link{
    display:inline-block;
    min-width:32px;
    text-decoration:none;
    color:#0d6efd;
    font-weight:700;
    transition:.2s;
}

.question-link:hover{
    color:#084298;
    transform:scale(1.08);
}

.status-ok{
    color:#198754;
    font-weight:700;
}

.status-partial{
    color:#ffc107;
    font-weight:700;
}

.status-none{
    color:#dc3545;
    font-weight:700;
}



/* Основний контейнер */
.attempt-layout{
    display:flex;
    flex-direction:row-reverse;
    align-items:flex-start;

    /* картка з питаннями буде по центру */
    justify-content:center;

    /* більша відстань між питаннями та навігацією */
    gap:140px;

    max-width:1900px;
    margin:0 auto;
}

/* Контент із питаннями */


.attempt-content-test{
    width:750px;
    flex:none;
}

/* Панель навігації */
.attempt-navigation{
    position:sticky;
    top:20px;

    width:clamp(260px, 22vw, 360px);

     display:flex;
    flex-direction:column;

    gap:10px;
    padding:15px;

    /* трохи правіше */
    margin-right:-80px;

    background:#fff;
    border-radius:12px;
    box-shadow:0 0 15px rgba(0,0,0,.15);
}

/* Кнопки */
.question-nav-btn{
    aspect-ratio:1;
    width:100%;

    display:flex;
    align-items:center;
    justify-content:center;

    text-decoration:none;

    font-size:18px;
    font-weight:bold;
    color:#fff;

    border-radius:8px;

    transition:all .2s ease;
}

.question-nav-btn:hover{
    transform:scale(1.08);
}

/* Кольори */
.nav-correct{
    background:#28a745;
}

.nav-wrong{
    background:#dc3545;
}

.nav-partial{
    background:#ffc107;
    color:#000;
}

.nav-pending{
    background:#6c757d;
}

.nav-description{
    background:#17a2b8;
}


/* Телефони */


   @media (max-width:1300px){

    .attempt-content-test{
        width:100%;
        padding-bottom:140px; /* було 190px */
        box-sizing:border-box;
    }
 .attempt-layout{
        display:flex;
        flex-direction:column;
    }
    .attempt-navigation{
        position:sticky;
    top:20px;
        

        width:100%;
        box-sizing:border-box;

        

        /* автоматично 4-5 кнопок в ряд */
        grid-template-columns:repeat(auto-fit, minmax(42px, 1fr));

        gap:4px;
        padding:8px;

        margin:0;

        border-radius:12px 12px 0 0;

        max-height:120px; /* було 175px */
        overflow-y:auto;

        box-shadow:0 -4px 15px rgba(0,0,0,.18);
    }

    .question-nav-btn{
        width:42px;
        height:42px;
        flex:0 0 42px;
    }

    .question-card{
        scroll-margin-bottom:140px;
    }
.result-row{

    flex-direction:column;

    align-items:flex-start;

    gap:6px;
}

.result-row strong{

    text-align:left;
}
}


/* Дуже вузькі телефони */
@media (max-width: 480px){

    .attempt-navigation{
        gap:6px;
        padding:10px;
    }

    .question-nav-btn{
        font-size:13px;
    }
}

.question-nav-btn{
    position:relative;
}

.question-nav-btn::after{
    content:attr(data-tooltip);

    position:absolute;
    bottom:calc(100% + 10px);
    left:50%;

    transform:translateX(-50%) translateY(5px);

    padding:7px 10px;
    border-radius:6px;

    background:#222;
    color:#fff;

    font-size:13px;
    font-weight:normal;
    white-space:nowrap;

    opacity:0;
    visibility:hidden;
    pointer-events:none;

    transition:opacity .2s ease, transform .2s ease;
    z-index:100;
}

.question-nav-btn::before{
    content:"";

    position:absolute;
    bottom:calc(100% + 4px);
    left:50%;

    transform:translateX(-50%);

    border:6px solid transparent;
    border-top-color:#222;

    opacity:0;
    visibility:hidden;

    transition:opacity .2s ease;
    z-index:100;
}

.question-nav-btn:hover::after,
.question-nav-btn:hover::before{
    opacity:1;
    visibility:visible;
}

.question-nav-btn:hover::after{
    transform:translateX(-50%) translateY(0);
}


/* =========================
   ІНФОРМАЦІЯ
========================= */

.passtest-info-card{
    background:#fff;
    border-radius:12px;
    padding:18px;
    box-shadow:0 0 15px rgba(0,0,0,.12);
}

.passtest-info-card h4{
    margin:0 0 15px;
    font-size:24px;
    font-weight:700;
}

.info-row{
    display:flex;
    justify-content:space-between;
    align-items:center;

    padding:10px 0;

    border-bottom:1px solid #eee;
}

.info-row:last-child{
    border-bottom:none;
}

/* =========================
   НАВІГАЦІЯ
========================= */

.passtest-navigation{
    margin-top:15px;

    background:#fff;
    border-radius:12px;
    padding:18px;
    overflow:visible;
    box-shadow:0 0 15px rgba(0,0,0,.12);
}

.passtest-navigation h4{
    margin:0 0 15px;
    font-size:24px;
    font-weight:700;
}

.passtest-nav-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(38px,1fr));
    gap:10px;
}

.passtest-nav-btn{
    aspect-ratio:1;

    display:flex;
    align-items:center;
    justify-content:center;

    text-decoration:none;

    font-size:18px;
    font-weight:600;

    border-radius:8px;

    transition:.2s;
}

.passtest-nav-btn:hover{
    transform:scale(1.06);
}

/* поточне питання */

.nav-current{
    border:3px solid #0d47a1 !important;

}
.nav-status-complete{
    border:3px solid #28a745 !important;
background:#d9d9d9 !important;
}

.nav-status-partial{
    border:3px solid #ffc107 !important;
background:#d9d9d9 !important;
}

.nav-status-empty{
    border:3px solid #dc3545 !important;
background:#d9d9d9 !important;
}
/* є відповідь */

.nav-answered{
    background:#d6d6d6;
    color:#000;
}

/* немає відповіді */

.nav-unanswered{
    background:#fff;
    color:#000;
    border:1px solid #d0d0d0;
}
.nav-neutral{
    background:#adb5bd;
    color:#fff;
}
/* мобільні */

@media(max-width:1300px){

    .passtest-nav-grid{

        display:flex;
        flex-wrap:nowrap;

        overflow-x:auto;
        overflow-y:hidden;

        gap:8px;

        padding-bottom:6px;

        scrollbar-width:thin;
        -webkit-overflow-scrolling:touch;
    }

    .passtest-nav-btn{

        width:42px;
        height:42px;

        flex:0 0 42px;
    }

    .attempt-nav-grid{
        grid-template-columns:repeat(auto-fit,minmax(42px,1fr));
    }

    .finish-test-btnview{
        margin-top:4px;
    }

}


.nav-description{
    background:#0d6efd;
    color:#fff;
}


.finish-test-btn{
    display:block;
    width:100%;

    margin-top:18px;
    padding:12px 16px;

    background:#dc3545;
    color:#fff;
    text-decoration:none;
    text-align:center;

    font-size:17px;
    font-weight:600;

    border-radius:8px;
    transition:.2s;
    box-sizing:border-box;
}

.finish-test-btn:hover{
    background:#c82333;
}

.attempt-nav-grid{
    display:grid;
    grid-template-columns:repeat(6,1fr);
    gap:10px;
}

.finish-test-btnview{
    width:100%;
    padding:12px;
    background:#dc3545;
    color:#fff;
    text-decoration:none;
    text-align:center;
    font-weight:600;
    border-radius:8px;
    box-sizing:border-box;
    display:block;
}

.finish-test-btnview:hover{
    background:#bb2d3b;
}

.finish-test-btnview:active{
    transform:translateY(0);
}


.result-card{

    max-width:700px;
    margin:35px auto;

    background:#fff;

    border-radius:14px;

    box-shadow:0 8px 30px rgba(0,0,0,.08);

    overflow:hidden;
}

.result-row{

    display:flex;

    justify-content:space-between;

    align-items:center;

    gap:25px;

    padding:18px 24px;

    border-bottom:1px solid #ececec;

    font-size:18px;
}

.result-row:last-child{
    border-bottom:none;
}

.result-row span{

    color:#555;

    font-weight:600;
}

.result-row strong{

    color:#0b3c6d;

    font-size:19px;

    text-align:right;
}

.timer-box{
    display:inline-block;
    min-width:90px;
    padding:6px 12px;
    text-align:center;
    border-radius:8px;
    background:#f3f3f3;
    font-weight:700;
    transition:background-color .8s,color .8s;
}

/* ===== Таблиця спроб ===== */
.attempts-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
}

.attempts-table thead {
    background: linear-gradient(135deg, #4a90e2, #357ABD);
    color: #000;
}

.attempts-table th,
.attempts-table td {
    padding: 14px 12px;
    text-align: center;
    font-size: 18px;
}

.attempts-table tbody tr {
    border-bottom: 1px solid #eee;
    transition: 0.2s ease;
}

.attempts-table tbody tr:hover {
    background: #f6f9ff;
}

/* статус */
.attempts-table td:nth-child(2) {
    font-weight: 600;
}

/* оцінка */
.attempts-table td:nth-child(4) {
    font-weight: 700;
    color: #2c3e50;
}

/* кнопка перегляду */
.attempts-table a {
    display: inline-block;
    padding: 6px 12px;
    background: #2ecc71;
    color: #fff;
    border-radius: 6px;
    text-decoration: none;
    font-size: 16px;
    transition: 0.2s;
}

.attempts-table a:hover {
    background: #27ae60;
}


/* ===== Блок залишку спроб ===== */
.attempts-remaining {
    margin-top: 20px;
    padding: 16px 20px;
    border-radius: 12px;
    background: #f1f8ff;
    border-left: 6px solid #3498db;
    font-size: 20px;
    font-weight: 600;
    color: #1f3b57;
    line-height: 1.4;
}

/* число спроб */
.attempts-remaining strong {
    font-size: 26px;
    color: #e67e22;
    font-weight: 800;
}

/* коли спроб більше немає */
.attempts-remaining.zero {
    background: #fff1f1;
    border-left-color: #e74c3c;
    color: #c0392b;
}

.attempts-remaining.zero strong {
    color: #c0392b;
}

.short-answer-input.selected{
    background:#fff3cd;
    border:2px solid #ffc107;
}


.next-page-btn{
    display:inline-flex;
    align-items:center;
    justify-content:center;

    height:52px;
    padding:0 24px;

    background:#ff9800;
    color:#fff;
    text-decoration:none;
    border-radius:8px;
    font-size:18px;
    font-weight:600;

    transition:.2s;
}

.next-page-btn:hover{
    opacity:.9;
}

.back-page-btn{
    display:inline-flex;
    align-items:center;
    justify-content:center;

    min-width:160px;
    height:52px;
    padding:0 25px;

    background:#6c757d;
    color:#fff;

    border:none;
    border-radius:10px;

    font-size:18px;
    font-weight:600;
    font-family:inherit;

    cursor:pointer;
    transition:.2s;
}

.back-page-btn:hover{
    background:#5a6268;
}

.page-buttons{
    display:flex;
    align-items:center;
    gap:20px;
    margin-top:30px;
}


.question-info{
    margin:0 0 25px;
    padding:0 0 15px;
    border-bottom:1px solid #e5e5e5;
}

.question-info h4{
    margin:0 0 15px;
    font-size:22px;
    font-weight:700;
    color:#0b3c6d;
}

.question-info .info-row{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:15px;
    padding:8px 0;
}

.question-info .info-row:last-child{
    border-bottom:none;
}



.question-content{
    width:100%;
}



.tests-page{
    padding:40px 0;
    background:#f4f4f4;
}

.tests-header{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:25px;
}

.tests-header h1{
    color:#0b3c6d;
}

.tests-grid{
    display:grid;
    grid-template-columns:1fr;
    gap:20px;
}

.test-card{
    background:#fff;
    border-radius:12px;
    padding:20px;
margin-bottom: 15px;
    box-shadow:0 4px 10px rgba(0,0,0,0.08);
    position:relative;

}

.tests-page .test-questions-form{
    max-width:1200px !important;
    margin:30px auto 0 auto;
}


.test-card h1{
font-size:32px;
margin-bottom:15px;
color:#0b3c6d;
}
.test-title{
font-size:24px;
font-weight:700;
margin-bottom:8px;
}

.test-desc{
    font-size:20px;
    margin-bottom:12px;

    word-break:break-word;
    overflow-wrap:anywhere;

    width:100%;
    max-width:100%;

    box-sizing:border-box;

    overflow:hidden;

    line-height:1.5;
}

/* Абзаци CKEditor */
.test-desc p{
    margin:0 0 12px;
}

/* =========================
   ЗОБРАЖЕННЯ CKEDITOR
   ========================= */

.test-desc img{
    display:block;

    max-width:100% !important;
    height:auto !important;

    box-sizing:border-box;

    object-fit:contain;
}

/* =========================
   YOUTUBE / IFRAME
   ========================= */

.test-desc iframe{
    display:block;

    max-width:100% !important;

    box-sizing:border-box;

    border:0;

    margin:10px 0;

    aspect-ratio:16 / 9;
}

/* =========================
   CKEDITOR MEDIA
   ========================= */

.test-desc figure{
    max-width:100%;
    margin:10px 0;

    box-sizing:border-box;
}

.test-desc figure.media{
    max-width:100%;
}

.test-desc figure.media iframe{
    width:100% !important;
    max-width:100% !important;
    aspect-ratio:16 / 9;
    height:auto !important;
}

.test-meta{
font-size:18px;
color:#444;
line-height:1.6;
}
.test-link{
text-decoration:none;
color:#222;
}

.test-link:hover{
color:#2c7be5;
}

.no-tests{
    width:100%;
    background:#ffffff;
    border-radius:12px;
    padding:40px;
    text-align:center;
    box-shadow:0 4px 15px rgba(0,0,0,0.08);
    margin-top:20px;
}

.no-tests-icon{
    font-size:48px;
    margin-bottom:15px;
}

.no-tests h3{
    font-size:20px;
    margin-bottom:8px;
    color:#333;
}

.no-tests p{
    color:#777;
    font-size:18px;
}

/* Модальне вікно */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0; top: 0;
    width: 100%; height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
}
.modal-content {
    background-color: #fff;
    margin: 10% auto;
    padding: 20px;
    text-align:justify;
    font-size: 20px;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);

}
.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}
.close:hover { color: #000; }
.rooms-add-btn { margin-right:10px; 
	font-size:18px;
}
.rooms-title{
text-align:center;
margin-bottom:30px;
}
.test-form{
background:#fff;
padding:30px;
border-radius:12px;
box-shadow:0 4px 12px rgba(0,0,0,0.08);
max-width:650px;
margin:0 auto; /* центрування */
}

.test-form label{
display:block;
margin-top:15px;
font-weight:600;
}

.test-form input:not([type="checkbox"]):not([type="radio"]),
.test-form textarea,
.test-form select{
    width:100%;
    padding:12px;
    margin-top:6px;
    border:1px solid #ccc;
    border-radius:6px;
    font-size:16px;
    transition:.2s;
}

.test-form input:focus,
.test-form textarea:focus,
.test-form select:focus{
outline:none;
border-color:#2c7be5;
box-shadow:0 0 0 2px rgba(44,123,229,0.2);
}

.test-form textarea{
min-height:100px;
resize:vertical;
}

.test-form button{
margin-top:20px;
}

.checkbox-group{
display:flex;
align-items:center;
gap:10px;
margin-top:15px;
font-size:16px;
cursor:pointer;
}

.checkbox-group input{
appearance:none;
width:20px;
height:20px;
border:2px solid #2c7be5;
border-radius:5px;
position:relative;
cursor:pointer;
}

.checkbox-group input:checked{
background:#2c7be5;
}

.checkbox-group input:checked::after{
content:"✔";
position:absolute;
color:#fff;
font-size:14px;
left:2px;
top:-2px;
}

.test-header{
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    gap:15px;
}


.admin-test-buttons{
display:flex;
flex-direction:column;
gap:8px;
flex-shrink:0;
}

.edit-test-btn{
background:#ffb74d;
color:#fff;
padding:8px 14px;
border-radius:6px;
font-size:16px;
text-decoration:none;
font-weight:600;
transition:0.2s;
text-align:center;
}

.edit-test-btn:hover{
background:#d68910;
}

.questions-test-btn{
background:#4caf50;
color:#fff;
padding:8px 14px;
border-radius:6px;
font-size:16px;
text-decoration:none;
font-weight:600;
transition:0.2s;
text-align:center;
}

.questions-test-btn:hover{
background:#388e3c;
}

.pagination{
display:flex;
gap:8px;
justify-content:center;
margin-top:30px;
flex-wrap:wrap;
}

.pagination a{
padding:8px 14px;
background:#fff;
border-radius:6px;
text-decoration:none;
color:#333;
box-shadow:0 2px 6px rgba(0,0,0,0.08);
}

.pagination a:hover{
background:#2c7be5;
color:#fff;
}

.pagination a.active{
background:#2c7be5;
color:#fff;
font-weight:600;
}

.pagination span.active{
padding:8px 14px;
background:#2c7be5;
color:#fff;
border-radius:6px;
font-weight:600;
cursor:default;
}

/* ===== ФОРМА ДОДАВАННЯ ПИТАННЯ ===== */

.tests-page form:not(#bulkDeleteForm):not(#bulkDeleteSubmissionForm){
background:#fff;
padding:30px;
border-radius:12px;
box-shadow:0 4px 12px rgba(0,0,0,0.08);
max-width:700px;
margin:0 auto;
}

/* загальні поля */

.form-group{
margin-bottom:20px;
}

.form-group label{
display:block;
font-weight:600;
margin-bottom:6px;
font-size:18px;
}

.test-admin{
    display:flex;
    gap:8px;
    flex-shrink:0;
}

.form-group input,
.form-group textarea,
.form-group select{
width:100%;
padding:12px;
border:1px solid #ccc;
border-radius:6px;
font-size:16px;
transition:0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus{
outline:none;
border-color:#2c7be5;
box-shadow:0 0 0 2px rgba(44,123,229,0.2);
}

.form-group textarea{
resize:vertical;
min-height:120px;
}

/* ===== БЛОК ВІДПОВІДЕЙ ===== */

.answer-row{
display:flex;
gap:10px;
align-items:center;
margin-top:10px;
}

.answer-row input[type="text"]{
flex:1;
}

.answer-row label{
display:flex;
align-items:center;
gap:6px;
font-size:16px;
cursor:pointer;
}

/* ===== MATCHING ===== */

.matching-left{
   font-size:16px;
}

.pair-row{
display:flex;
gap:10px;
margin-top:10px;

}

.pair-row input{
flex:1;
}

/* ===== КНОПКИ ДОДАВАННЯ ===== */

.add-btn{
margin-top:12px;
background:#2c7be5;
color:#fff;
border:none;
padding:10px 14px;
border-radius:6px;
font-size:16px;
cursor:pointer;
transition:0.2s;
}

.add-btn:hover{
background:#1a5fcc;
}

/* ===== RADIO / CHECKBOX ===== */

input[type="radio"],
input[type="checkbox"]{
cursor:pointer;
transform:scale(1.2);
}

/* ===== ЗАГОЛОВКИ СЕКЦІЙ ===== */

.tests-page h3{
margin-top:25px;
margin-bottom:10px;
color:#0b3c6d;
font-size:22px;
}

/* ===== КНОПКИ ВНИЗУ ===== */

.tests-page form button.rooms-add-btn{
font-size:18px;
padding:10px 18px;
}

.tests-page form .btn{
font-size:18px;
padding:10px 18px;
}

/* ===== БЛОК КАТЕГОРІЇ ===== */

.question-meta{
background:#f7f9fc;
border:1px solid #e3e8ef;
padding:12px 16px;
border-radius:8px;
margin-bottom:20px;
font-size:16px;
display:flex;
align-items:center;
gap:8px;
}

.meta-label{
font-weight:600;
color:#0b3c6d;
}

.meta-value{
color:#444;
font-weight:500;
}

.icon-btn{
    position:static; /* 🔥 прибрати absolute */
}

.icon-btn.view{

top:10px;
right:100px; /* щоб була лівіше від редагування */

width:36px;
height:36px;

display:flex;
align-items:center;
justify-content:center;

border-radius:50%;
text-decoration:none;

background:#3498db;
color:#fff;

font-size:16px;

box-shadow:0 2px 6px rgba(0,0,0,0.2);
transition:0.2s;
}

.icon-btn.view:hover{
background:#2980b9;
transform:scale(1.05);
}


.question-card{
background:#fff;
padding:35px;
border-radius:10px;
font-size:20px;
box-shadow:0 4px 15px rgba(0,0,0,0.08);
}

.question-text{
font-size:24px;
margin-bottom:25px;
}

.answers{
display:flex;
flex-direction:column;
gap:12px;
}

.answer-option{
display:flex;
align-items:center;
gap:12px;

padding:14px 18px;
border-radius:8px;

background:#f5f5f5;
border:1px solid #ddd;

font-size:16px;
cursor:pointer;
transition:0.2s;
}

.answer-option:hover{
background:#f0f7ff;
border-color:#3498db;
}

.answer-option input{
transform:scale(1.3);
cursor:pointer;
}




.matching-pair{
    border:1px solid #e5e5e5;
    background:#fafafa;
    padding:18px;
    border-radius:10px;
    margin-bottom:18px;
    box-shadow:0 2px 6px rgba(0,0,0,0.04);
}

.matching-pair .form-group{
    margin-bottom:12px;
}

.matching-pair label{
    font-weight:600;
    display:block;
    margin-bottom:6px;
    color:#444;
}

.matching-pair textarea{
    width:100%;
}

#addPairBtn{
    margin-top:10px;
}




.dropdown-help{
background:#eef5ff;
border:1px solid #c9ddff;
padding:10px;
border-radius:6px;
margin-bottom:15px;
font-size:14px;
}


.dropdown-blank{
border:1px solid #ddd;
border-radius:8px;
padding:20px;
margin-bottom:15px;
position:relative;
background:#fafafa;
}

.removeBlankBtn{
position:absolute;
top:8px;
right:8px;
background:#ff4d4d;
border:none;
color:#fff;
width:26px;
height:26px;
border-radius:50%;
cursor:pointer;
font-size:14px;
line-height:26px;
}

.removeBlankBtn:hover{
background:#e60000;
}
.option-row{
display:flex;
align-items:center;
gap:10px;
margin-bottom:8px;
flex-wrap:wrap;
}

.option-row input[type="radio"]{
flex-shrink:0;
transform:scale(1.2);
cursor:pointer;
}

.option-row input[type="text"]{
flex:1;
min-width:350px;
padding:8px 10px;
border:1px solid #ccc;
border-radius:6px;
font-size:14px;
width:100%;
}

.removeOptionBtn{
background:#ddd;
border:none;
width:24px;
height:24px;
border-radius:50%;
cursor:pointer;
}

.removeOptionBtn:hover{
background:#bbb;
}

.blank-label{
font-weight:bold;
margin-bottom:6px;
display:block;
}





.matching-container{
max-width:900px;
margin:auto;
}

.answers-pool{
display:flex;
flex-wrap:wrap;
gap:10px;
padding:15px;
background:#f4f6fb;
border-radius:10px;
margin-bottom:25px;
}

.answer-item{
padding:8px 14px;
border:2px solid #4a7cff;
border-radius:6px;
cursor:grab;
background:white;
}

.answer-item:hover{
background:#4a7cff;
color:white;
}

.questions{
display:flex;
flex-direction:column;
gap:15px;
}

.question-row{
display:grid;
grid-template-columns:1fr 250px;
gap:20px;
align-items:center;
}

.drop-zone{
border:2px dashed #aaa;
border-radius:8px;
min-height:40px;
padding:8px;
background:#fafafa;
}

.drop-zone.filled{
border-color:#4a7cff;
background:#e9f1ff;
}

.answer-item *{
pointer-events:none;
}



.shortanswer-instructions{
background:#f8fbff;
border:1px solid #d6e4ff;
padding:20px;
border-radius:8px;
margin-bottom:20px;
}

.shortanswer-instructions h3{
margin-top:0;
color:#2c3e50;
}

.instruction-block{
margin-bottom:20px;
}

.examples{
display:flex;
gap:20px;
margin-top:10px;
flex-wrap:wrap;
}

.example{
flex:1;
min-width:200px;
padding:12px;
border-radius:6px;
font-size:14px;
line-height:1.5;
}

.example.correct{
background:#e8f9ee;
border:1px solid #7ed6a3;
}

.example.wrong{
background:#ffecec;
border:1px solid #ff9a9a;
}

.shortanswer-input{
font-size:16px;
padding:10px;
margin-top:10px;
}


.essay-instructions{
background:#f9fbff;
border:1px solid #dbe6ff;
padding:20px;
border-radius:8px;
margin-bottom:20px;
}

.essay-instructions h3{
margin-top:0;
color:#2c3e50;
}

.essay-instructions ul{
padding-left:20px;
line-height:1.6;
}

.essay-examples{
display:flex;
gap:20px;
margin-top:15px;
flex-wrap:wrap;
}

.essay-example{
flex:1;
min-width:220px;
padding:12px;
border-radius:6px;
font-size:14px;
line-height:1.6;
}

.essay-example.good{
background:#eafaf1;
border:1px solid #8fd6a7;
}

.essay-example.bad{
background:#ffecec;
border:1px solid #ff9c9c;
}


.description-container{
display:flex;
flex-direction:column;
gap:20px;
margin-top:10px;
}

.description-info{
background:#eef5ff;
border-left:4px solid #3b82f6;
padding:15px 18px;
border-radius:6px;
font-size:16px;
line-height:1.6;
}

.description-info h3{
margin-top:0;
font-size:16px;
color:#1e3a8a;
}

.description-info ul{
margin:10px 0 0 20px;
}

.description-text{
background:#fff;
border:1px solid #e5e5e5;
padding:18px 20px;
border-radius:8px;
font-size:22px;
line-height:1.7;
box-shadow:0 2px 6px rgba(0,0,0,0.05);
}

.description-text p{
margin-bottom:12px;
}

.description-text img{
max-width:100%;
border-radius:6px;
}




/* контейнер питання */
.dropdown-question{
    font-size:16px;
    line-height:1.9;
}

/* стиль select */
.dropdown-select{
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;

    padding:8px 35px 8px 12px;
    margin:0 6px;

    font-size:16px;
    border-radius:8px;
    border:1px solid #d0d7de;

    background:#fff;
    color:#333;

    cursor:pointer;

    transition:all 0.2s ease;

    background-image:url("data:image/svg+xml;utf8,<svg fill='%23666' height='20' viewBox='0 0 24 24' width='20' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/></svg>");
    background-repeat:no-repeat;
    background-position:right 10px center;
}

/* hover */
.dropdown-select:hover{
    border-color:#4c8bf5;
}

/* focus */
.dropdown-select:focus{
    outline:none;
    border-color:#2f6fed;
    box-shadow:0 0 0 2px rgba(47,111,237,0.2);
}

/* disabled */
.dropdown-select:disabled{
    background:#f5f5f5;
    cursor:not-allowed;
}

/* правильна відповідь */
.dropdown-correct{
    border-color:#28a745 !important;
    background:#f0fff4;
}

/* неправильна відповідь */
.dropdown-wrong{
    border-color:#dc3545 !important;
    background:#fff5f5;
}


.matching{
display:flex;
flex-direction:column;
gap:25px;
margin-top:20px;
}

.row{
display:grid;
grid-template-columns: 40px 1fr 280px;
gap:10px;
align-items:center;
margin-bottom:12px;
}

.num{
width:25px;
font-weight:600;
}

.text{
flex:1;
}

.drop{
width:100%;
min-height:60px;
border:2px dashed #bbb;
border-radius:8px;
display:flex;
align-items:center;
justify-content:center;
background:#fafafa;
padding:6px;
box-sizing:border-box;
}

.drop img{
    max-width:100%;
    max-height:100%;
    object-fit:contain;
}

.drop.filled{
border-style:solid;
background:#eef3ff;
}

.options{
display:flex;
flex-wrap:wrap;
gap:10px;
}

.option{
padding:8px 14px;
background:#f1f3f6;
border-radius:8px;
cursor:grab;
user-select:none;
touch-action:none;
}

.option.drag{
opacity:0.6;
}


.option img{
    max-width:120px;
    max-height:120px;
    object-fit:contain;
    display:block;
}



.correct-answer img{
    max-width:120px;
    max-height:120px;
    object-fit:contain;
    display:block;
    margin-top:5px;
}

.correct-answer{
    display:flex;
    flex-direction:column;
    gap:15px;
}


.short-answer-block {
    margin: 15px 0;
}

.short-answer-input {
    width: 100%;
    max-width: 400px;
    padding: 10px 14px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 8px;
    outline: none;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

/* фокус (коли клікаєш) */
.short-answer-input:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0,123,255,0.2);
}

/* disabled стан */
.short-answer-input:disabled {
    background-color: #f5f5f5;
    color: #555;
    cursor: not-allowed;
}

/* правильна відповідь */
.short-answer-block.correct .short-answer-input {
    border-color: #28a745;
    background-color: #eaf7ee;
}

/* неправильна відповідь */
.short-answer-block.wrong .short-answer-input {
    border-color: #dc3545;
    background-color: #fdeaea;
}

/* текст правильної відповіді */
.correct-answer {
    margin-top: 8px;
    padding: 8px 10px;
    background: #eaf7ee;
    border-left: 4px solid #28a745;
    font-size: 14px;
}



.test-question-item{
    padding:15px 0;
    border-bottom:1px solid #eee;
}

.test-question-item:last-child{
    border-bottom:none;
}

.test-question-title{
    font-size:18px;
    font-weight:600;
    margin-bottom:5px;
}

.test-question-score{
    font-size:14px;
    color:#666;
}


.text img{
    max-width:120px;
    max-height:120px;
    object-fit:contain;
    display:block;
}

#maxScoreForm {
    display:flex;
    align-items:center;
    gap:12px;
    flex-wrap:wrap;
}

#maxScoreForm label {
    font-size:18px;
    font-weight:600;
    color:#0b3c6d;
}

#maxscoreInput {
    width:120px;
    padding:10px 14px;

    font-size:18px;
    font-weight:600;

    border:2px solid #d0d7de;
    border-radius:10px;

    text-align:center;

    background:#f9fbff;

    transition:all 0.2s ease;
}

/* hover */
#maxscoreInput:hover {
    border-color:#4c8bf5;
}

/* focus */
#maxscoreInput:focus {
    outline:none;
    border-color:#2c7be5;
    background:#fff;
    box-shadow:0 0 0 3px rgba(44,123,229,0.2);
}

/* кнопка */
#maxScoreForm button {
    padding:10px 18px;
    font-size:16px;
    border:none;
    border-radius:10px;

    background:#2c7be5;
    color:#fff;

    cursor:pointer;
    transition:0.2s;
}

#maxScoreForm button:hover {
    background:#1a5fcc;
}


#bankCategorySelect {
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #ccc;
    font-size: 16px;
    text-align:left;
    background: #fff;
    cursor: pointer;
}

#bankModal label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}


.option {
    cursor: pointer;
    padding: 6px 10px;
    margin: 4px;
    border: 1px solid #ccc;
    border-radius: 4px;
    display: inline-block;
    background: #f8f9fa;
    transition: 0.2s;
}
.option:hover {
    background: #e2e6ea;
}
.option.selected {
    background: #007bff;
    color: white;
    border-color: #0056b3;
}
.drop {
    min-height: 30px;
    border: 1px dashed #aaa;
    margin: 4px 0;
    padding: 4px;
    border-radius: 4px;
}

.return-zone{
    margin:10px 0;
    padding:10px;
    border:2px dashed #888;
    text-align:center;
    cursor:pointer;
    background:#f1f1f1;
}
.return-zone:hover{
    background:#e2e2e2;
}



.short-answer-input {
    width: 100%;
    padding: 10px;
    border-radius: 6px;
    border: 2px solid #ccc;
    font-size: 16px;
    transition: 0.2s;
}

/* правильна відповідь */
.short-answer-input.correct {
    border-color: #28a745;
    background-color: #e6f4ea;
    color: #155724;
}

/* неправильна відповідь */
.short-answer-input.wrong {
    border-color: #dc3545;
    background-color: #f8d7da;
    color: #721c24;
}

/* заблоковане поле */
.short-answer-input:disabled {
    cursor: not-allowed;
    opacity: 1; /* щоб колір не "бліднів" */
}



/* layout сторінки питання */
.question-layout{
    display:flex;
    gap:20px;
    align-items:flex-start;
}

/* лівий блок */
.left-block{
    flex:1;
    min-width:0;
}

/* правий блок */
.right-block{
    width:220px;
    flex-shrink:0;
position: sticky;
top: 20px; /* або висота твого header */
align-self: flex-start;
}


.points-input{
    width:60px;
    padding:5px;
    font-size:14px;
    border:1px solid #ccc;
    border-radius:6px;
    text-align:center;
    transition:0.2s;
}

.points-input:focus{
    border-color:#4CAF50;
    outline:none;
}

.points-input.error{
    border-color:red;
    background:#ffe6e6;
}

.attempts-table{
    width:100%;
    border-collapse: collapse;
    margin-top:10px;
}
.attempts-table th,
.attempts-table td{
    border:1px solid #ddd;
    padding:8px;
    text-align:center;
}
.attempts-table th{
    background:#f5f5f5;
}

.test-card.selected{
    outline:3px solid #2196F3;
    background:#f0f8ff;
}

.move-placeholder{
    border:2px dashed #bbb;
    padding:10px;
    text-align:center;
    cursor:pointer;
    margin:10px 0;
    color:#777;
    font-size:14px;
    transition:0.2s;
}

.move-placeholder:hover{
    border-color:#2196F3;
    color:#2196F3;
    background:#f8fbff;
}


@media (max-width:960px){
.row{
grid-template-columns:40px 1fr;
}

.drop{
grid-column:2;
width:100%;
}

}
/* адаптив */
@media (max-width:900px){

    .question-layout{
        flex-direction:column;
    }

    /* правий блок зверху */
    .right-block{
        width:100%;
        order:-1;
    }

    .left-block{
        max-width:100%;
    }
}

@media (max-width:768px){

    .right-block{
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;

        z-index: 1000;

        background: #fff;
        padding: 15px;
        box-sizing: border-box;
        box-shadow: 0 2px 10px rgba(0,0,0,.1);
    }

    .left-block{
        margin-top: 240px; /* висота правої панелі */
    }

}
@media (max-width:600px){

.option-row{
flex-direction:row;
align-items:center;
}

.option-row input[type="text"]{
min-width:100%;
}

.removeOptionBtn{
margin-left:auto;
}

}

.selected-attempt td{
    background: #fff8c4;
}

.assignment-attempt-info{

    display:flex;
    justify-content:space-between;
    align-items:center;

    margin:25px 0 15px;

    padding:14px 18px;

    background:#eef5ff;

    border:1px solid #c8dbff;

    border-radius:8px;

    font-size:18px;

    font-weight:600;

}

.assignment-attempt-info strong{

    color:#003c73;

}

.assignment-info-table{

    width:100%;

    border-collapse:collapse;

    margin-bottom:30px;

    border-radius:8px;

    overflow:hidden;

    box-shadow:0 2px 8px rgba(0,0,0,.08);

}

.assignment-info-table th{

    width:340px;

    background:#1f4b7a;

    color:#fff;

    padding:14px 18px;

    text-align:left;

    font-weight:600;

    border:1px solid #d9e3ef;

}

.assignment-info-table td{

    padding:14px 18px;

    background:#fff;

    border:1px solid #d9e3ef;

}

.assignment-info-table tr:nth-child(even) td{

    background:#f7f9fc;

}

@media(max-width:768px){

.assignment-attempt-info{

    display:block;

}

.assignment-attempt-info div{

    margin:8px 0;

}

.assignment-info-table,

.assignment-info-table tbody,

.assignment-info-table tr,

.assignment-info-table th,

.assignment-info-table td{

    display:block;

    width:100%;

}

.assignment-info-table tr{

    margin-bottom:12px;

}

.assignment-info-table th{

    border-bottom:none;

}

.assignment-info-table td{

    border-top:none;

}

}

.test-visible-checkbox input:disabled{
    opacity:.5;
    cursor:not-allowed;
}

.attempt-actions-test{
    margin:25px 0 20px;
    display:flex;
    justify-content:flex-end;
}

.finish-all-attempts-btn{
    background:#dc3545;
    color:#fff;
    border:none;
    border-radius:8px;
    padding:12px 22px;
    font-size:16px;
    font-weight:600;
    cursor:pointer;
    transition:.2s;
}

.finish-all-attempts-btn:hover{
    background:#bb2d3b;
}

.finish-all-attempts-btn:active{
    transform:scale(.98);
}

/* =========================================================
   CKEDITOR — ЗОБРАЖЕННЯ В ПИТАННЯХ
   ========================================================= */

.question-card .question-text img,
.question-card .description-text img,
.question-card img{
    display:block;

    max-width:100% !important;
    width:auto;
    height:auto !important;

    box-sizing:border-box;
}

/* Якщо зображення ширше за question-card —
   воно автоматично стискається */
.question-card .question-text,
.question-card .description-text{
    max-width:100%;
    overflow:hidden;
}

/* Телефон */
@media(max-width:768px){

    .question-card .question-text img,
    .question-card .description-text img,
    .question-card img{
        max-width:100% !important;
        width:auto !important;
        height:auto !important;
    }

}

.test-delete-btn{
    
    padding:8px 15px;
    border:none;
    border-radius:6px;
    background:#e74c3c;
    color:white;
    font-weight: bold;
    cursor:pointer;
    height:50px;
    width:150px;
}

.test-delete-btn:hover{
    background:#c0392b;
}

.test-success-message {
    padding: 14px 18px;
    margin-bottom: 20px;

    background: #d1e7dd;
    color: #0f5132;

    border: 1px solid #badbcc;
    border-radius: 8px;

    font-size: 15px;
    font-weight: 500;

    transition:
        opacity 0.3s ease,
        transform 0.3s ease;
}

.test-error-message {
    padding: 14px 18px;
    margin-bottom: 20px;

    background: #f8d7da;
    color: #842029;

    border: 1px solid #f5c2c7;
    border-radius: 8px;

    font-size: 15px;
    font-weight: 500;
}

/* =========================================================
   DROPDOWN — ТЕКСТ ЗАПИТАННЯ
========================================================= */

.dropdown-question{

    font-size:20px !important;

    line-height:1.75 !important;

    width:100%;

    box-sizing:border-box;

    text-align:justify !important;
}


/* CKEditor / HTML всередині питання */

.dropdown-question p,
.dropdown-question div,
.dropdown-question span,
.dropdown-question li,
.dropdown-question td,
.dropdown-question th{

    font-size:inherit !important;

    line-height:inherit !important;

    text-align:justify !important;
}


/* =========================================================
   SELECT У ТЕКСТІ
========================================================= */

.dropdown-question select{

    font-size:16px !important;

    line-height:1.4 !important;

    padding:6px 10px !important;

    border-radius:6px;

    vertical-align:middle;

    margin:5px;
}


/* =========================================================
   ЗОБРАЖЕННЯ У DROPDOWN-ПИТАННІ
========================================================= */

.dropdown-question img{

    max-width:100%;

    height:auto;

    cursor:zoom-in;

    display:inline-block;
}


/* =========================================================
   МОБІЛЬНИЙ
========================================================= */

@media(max-width:600px){

    .dropdown-question{

        font-size:16px !important;

        line-height:1.7 !important;

        text-align:justify !important;
    }


    .dropdown-question p,
    .dropdown-question div,
    .dropdown-question span,
    .dropdown-question li{

        font-size:inherit !important;

        line-height:inherit !important;

        text-align:justify !important;
    }


    .dropdown-question select{

        font-size:17px !important;

        padding:5px 8px !important;
    }

}

.matching-correct-answer{
    width:100%;
}

.matching-correct-pair{
    display:flex;
    align-items:flex-start;
    gap:12px;
    margin-bottom:20px;
    width:100%;
}

.matching-correct-left,
.matching-correct-right{
    flex:1;
    min-width:0;
}

.matching-correct-arrow{
    flex:0 0 auto;
    font-size:24px;
    font-weight:700;
    padding-top:5px;
}

.matching-correct-left img,
.matching-correct-right img{
    max-width:100%;
    height:auto;
}

.matching-correct-left iframe,
.matching-correct-right iframe{
    display:block;
    width:100%;
    max-width:560px;
    aspect-ratio:16 / 9;
    border:0;
    margin-top:10px;
}

@media(max-width:600px){

    .matching-correct-pair{
        flex-direction:column;
        gap:6px;
    }

    .matching-correct-arrow{
        transform:none;
    }

    .matching-correct-left,
    .matching-correct-right{
        width:100%;
    }

}

/* =========================================================
   PASSTEST MOBILE
   NAVIGATION STICKY IN NORMAL PAGE FLOW
   ========================================================= */

@media screen and (max-width: 768px) {

    /* -----------------------------------------------------
       ОСНОВНА СТОРІНКА
       ----------------------------------------------------- */

    .passtest-page {
        position: relative !important;
        overflow-x: hidden !important;
    }


    .passtest-page .question-layout {
        display: flex !important;
        flex-direction: column !important;

        position: relative !important;

        overflow: visible !important;
    }


    /* -----------------------------------------------------
       RIGHT BLOCK
       
       Робимо його "прозорим" для flex-порядку,
       щоб його дочірні елементи можна було
       розташувати відносно left-block.
       ----------------------------------------------------- */

    .passtest-page .right-block {
        display: contents !important;

        position: static !important;

        overflow: visible !important;
    }


    /* -----------------------------------------------------
       ВІДЛІК ЧАСУ
       ----------------------------------------------------- */

    .passtest-page .passtest-info-card {

        order: 1 !important;

        position: relative !important;

        width: 100% !important;

        box-sizing: border-box !important;

        margin: 0 !important;

        z-index: 1 !important;
    }


    /* -----------------------------------------------------
       НАВІГАЦІЯ
       ----------------------------------------------------- */

    .passtest-page .passtest-navigation {

        order: 2 !important;

        position: sticky !important;

        top: 70px !important;

        width: 100% !important;

        box-sizing: border-box !important;

        margin: 0 !important;

        padding: 18px 24px !important;

        background: #fff !important;

        border-radius: 0 0 18px 18px !important;

        box-shadow: 0 4px 12px rgba(0,0,0,.12) !important;

        z-index: 100 !important;

        align-self: stretch !important;
    }


    .passtest-page .passtest-navigation h4 {

        margin: 0 0 15px 0 !important;

        font-size: 24px !important;
    }


    /* -----------------------------------------------------
       КНОПКИ НАВІГАЦІЇ
       ----------------------------------------------------- */

    .passtest-page .passtest-nav-grid {

        display: flex !important;

        flex-wrap: wrap !important;

        gap: 8px !important;

        width: 100% !important;

        margin: 0 !important;

        padding: 0 !important;
    }


    .passtest-page .passtest-nav-btn {

        flex: 0 0 48px !important;

        width: 48px !important;

        height: 48px !important;

        min-width: 48px !important;

        min-height: 48px !important;

        display: flex !important;

        align-items: center !important;

        justify-content: center !important;

        box-sizing: border-box !important;

        margin: 0 !important;

        padding: 0 !important;
    }


    /* -----------------------------------------------------
       ЗАВЕРШИТИ СПРОБУ
       ----------------------------------------------------- */

    .passtest-page .right-block > .finish-test-btn {

        order: 3 !important;

        position: sticky !important;

        top: 220px !important;

        display: flex !important;

        align-items: center !important;

        justify-content: center !important;

        width: 100% !important;

        min-height: 58px !important;

        height: 58px !important;

        box-sizing: border-box !important;

        margin: 0 !important;

        padding: 10px 20px !important;

        background: #dc3545 !important;

        color: #fff !important;

        border-radius: 0 !important;

        z-index: 99 !important;

        text-align: center !important;

        white-space: nowrap !important;
    }


    /* -----------------------------------------------------
       LEFT BLOCK
       
       Він іде ПІСЛЯ навігації та кнопки.
       ----------------------------------------------------- */

    .passtest-page .left-block {

        order: 4 !important;

        position: relative !important;

        width: 100% !important;

        box-sizing: border-box !important;

        padding-top: 0 !important;

        z-index: 1 !important;
    }


    /* -----------------------------------------------------
       PROGRESS BAR
       ----------------------------------------------------- */

    .passtest-page .left-block > div[style*="background:#eee"] {

        position: relative !important;

        z-index: 1 !important;
    }


    /* -----------------------------------------------------
       QUESTION CARDS
       ----------------------------------------------------- */

    .passtest-page .question-card {

        position: relative !important;

        z-index: 1 !important;

        width: 100% !important;

        box-sizing: border-box !important;
    }


    /* -----------------------------------------------------
       NEXT PAGE
       ----------------------------------------------------- */

    .passtest-page .next-page-btn {

        width: 100% !important;

        min-height: 58px !important;

        display: flex !important;

        align-items: center !important;

        justify-content: center !important;

        box-sizing: border-box !important;

        padding: 10px 14px !important;

        text-align: center !important;

        white-space: normal !important;

        line-height: 1.2 !important;
    }
}


/* =========================================================
   SMALL PHONES
   ========================================================= */

@media screen and (max-width: 400px) {

    .passtest-page .passtest-navigation {

        top: 64px !important;

        padding: 16px 20px !important;
    }


    .passtest-page .passtest-navigation h4 {

        font-size: 22px !important;
    }


    .passtest-page .right-block > .finish-test-btn {

        top: 205px !important;

        height: 56px !important;

        min-height: 56px !important;

        font-size: 16px !important;
    }


    .passtest-page .passtest-nav-btn {

        width: 46px !important;

        height: 46px !important;

        min-width: 46px !important;

        min-height: 46px !important;

        flex-basis: 46px !important;
    }
}

/* =========================================================
   МОБІЛЬНА ВЕРСІЯ VIEWTEST
========================================================= */

@media (max-width: 768px) {

    /* -----------------------------------------------------
       Таблиця спроб
       ----------------------------------------------------- */

    .attempts-table {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        font-size: 16px;
    }

    .attempts-table table {
        width: 100%;
    }

    .attempts-table th,
    .attempts-table td {
        font-size: 16px;
    }


    /* -----------------------------------------------------
       Модальне вікно "Почати спробу"
       ----------------------------------------------------- */

    #confirmModal .modal-content {
        width: calc(100% - 30px);
        max-width: none;
        box-sizing: border-box;
        margin: 20% auto;
        padding: 20px;
        font-size: 16px;
    }

    #confirmModal .modal-content h2 {
        font-size: 24px;
    }

    #confirmModal .modal-content p {
        font-size: 16px;
        line-height: 1.5;
    }

    #confirmModal .modal-content > div:last-child {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    #confirmModal .modal-content > div:last-child button {
        width: 100%;
        box-sizing: border-box;
        margin: 0;
    }

}



@media (max-width: 768px) {

    .test-header {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
        width: 100%;
    }

    .test-title {
        width: 100%;
        max-width: 100%;
        flex: none;
        word-break: normal;
        overflow-wrap: break-word;
    }

    .admin-test-buttons {
        display: flex;
        flex-direction: column;
        width: 100%;
        max-width: 100%;
        gap: 8px;
    }

    .admin-test-buttons a {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        text-align: center;
        white-space: normal;
        overflow-wrap: break-word;
        word-break: normal;
    }

}