/* ===== TESTS MAIN PAGE (/tests) + CLIENT TEST OPTIONS ===== */

.tests-options-row {
    margin-top: 8px;
    gap: 12px;
}

@media (max-width: 768px) {
    .tests-options-row {
        flex-direction: column;
    }
}

/* базовый стеклянный стиль для OptionCard на страницах тестов */

.tests-options-row .rlv-option-card {
    border-radius: 18px;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(148, 163, 184, 0.4);
    box-shadow: 0 14px 36px rgba(15, 23, 42, 0.22);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    transition: transform 0.12s ease,
    box-shadow 0.12s ease,
    background-color 0.12s ease,
    border-color 0.12s ease;
}

.tests-options-row .rlv-option-card-title {
    font-weight: 600;
    font-size: 1rem;
    color: var(--rlv-text-main, #0f172a);
}

.tests-options-row .rlv-option-card-description {
    font-size: 0.95rem;
    color: var(--rlv-text-soft, #4b5563);
}

/* кликабельное состояние + анимация */

.tests-options-row .rlv-option-card--clickable {
    cursor: pointer;
}

.tests-options-row .rlv-option-card--clickable:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 46px rgba(15, 23, 42, 0.3);
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(129, 140, 248, 0.85);
}

.tests-options-row .rlv-option-card--clickable:active {
    transform: translateY(0);
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.28);
}

/* тёмная тема для карточек-опций */

:root[data-theme="dark"] .tests-options-row .rlv-option-card {
    background: rgba(15, 23, 42, 0.80);
    border-color: rgba(148, 163, 184, 0.55);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.75);
}

:root[data-theme="dark"] .tests-options-row .rlv-option-card-title {
    color: rgba(255, 255, 255, 0.98);
}

:root[data-theme="dark"] .tests-options-row .rlv-option-card-description {
    color: rgba(226, 232, 240, 0.9);
}

:root[data-theme="dark"] .tests-options-row .rlv-option-card--clickable:hover {
    background: rgba(15, 23, 42, 0.95);
    border-color: rgba(129, 140, 248, 0.95);
}

:root[data-theme="dark"] .assign-test-sub {
    color: rgba(167, 171, 179, 0.95);
}

:root[data-theme="dark"] .assign-test-title {
    color: rgba(167, 171, 179, 0.95);
}

/* кнопки внутри OptionCard на страницах тестов — если где-то ещё останутся */
.tests-menu-btn {
    border-radius: 10px !important;
    padding: 6px 14px !important;
    font-size: 0.95rem !important;
}

/* ===== ASSIGN TESTS PAGE (/client/assigntests) ===== */

.tests-assign-card {
    max-width: 780px;
    margin: 0 auto;
    border-radius: 22px;
    background: rgb(255 255 255 / 45%);
    border: 1px solid rgba(148, 163, 184, 0.45);
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.28);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

:root[data-theme="dark"] .tests-assign-card {
    background: rgba(15, 23, 42, 0.45);
    border-color: rgba(148, 163, 184, 0.6);
    box-shadow: 0 22px 50px rgba(0, 0, 0, 0.85);
}

.tests-assign-header {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 10px;
}

.tests-client-name {
    font-weight: 600;
    color: var(--rlv-text-main, #111827);
}

:root[data-theme="dark"] .tests-client-name {
    color: rgba(255, 255, 255, 0.96);
}

.tests-assign-hint {
    font-size: 0.9rem;
}

/* квота */

.tests-quota-alert {
    margin: 6px 0 12px;
    font-size: 0.9rem;
}

:root[data-theme="dark"] .tests-quota-alert {
    color: rgba(255, 255, 255, 0.92);
}

/* список тестов — «капсулы», без тяжелого белого фона */

.test-list .rz-datalist-data > li {
    padding: 0;
    margin-bottom: 10px;
    border: none;
    width: 100%;
    background: transparent !important; /* убираем посторонние фоны li */
}

.test-list .test-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 16px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(148, 163, 184, 0.25); /* меньше контраста */
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.18);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    transition: transform 0.1s ease,
    box-shadow 0.1s ease,
    background-color 0.1s ease,
    border-color 0.1s ease;
}

.test-list .test-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.26);
    background: rgba(255, 255, 255, 0.94);
    border-color: rgba(129, 140, 248, 0.6);
}

.test-list .test-title {
    font-size: 0.95rem;
    color: var(--rlv-text-main, #111827);
}

/* тёмная тема для списка тестов */

:root[data-theme="dark"] .test-list .test-item {
    background: rgba(15, 23, 42, 0.9);
    border-color: rgba(15, 23, 42, 0.95); /* почти сливаем с фоном, чтобы не светился кант */
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.85);
}

:root[data-theme="dark"] .test-list .test-item:hover {
    background: rgba(15, 23, 42, 0.98);
    border-color: rgba(129, 140, 248, 0.75);
}

:root[data-theme="dark"] .test-list .test-title {
    color: rgba(255, 255, 255, 0.96);
}

/* блок кнопок внизу */

.tests-actions-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.tests-assign-btn {
    border-radius: 10px !important;
    padding: 8px 18px !important;
    background-color: var(--rlv-primary, #2563eb) !important;
    border-color: var(--rlv-primary, #2563eb) !important;
    color: #fff !important;
}

.tests-assign-btn:hover {
    filter: brightness(0.96);
}

.tests-back-btn-bottom {
    border-radius: 10px !important;
    padding: 8px 16px !important;
}

@media (max-width: 768px) {
    .tests-actions-row {
        flex-direction: column;
        align-items: stretch;
    }

    .tests-actions-row .rz-button {
        width: 100%;
        justify-content: center;
    }
}

/* ===== ASSIGN TESTS LIBRARY PAGE (/assign-tests) ===== */

.tests-library-card {
    max-width: 780px;
    margin: 0 auto;
}

/* список */

.tests-library-list .rz-datalist-data > li {
    border: none;
    padding: 0;
    margin-bottom: 12px;
    background: transparent !important;
}

/* карточка теста — стекло */

.tests-test-card {
    border-radius: 20px;
    padding: 16px 18px;
    margin-bottom: 6px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(148, 163, 184, 0.4);
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.22);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: transform 0.12s ease,
    box-shadow 0.12s ease,
    background-color 0.12s ease,
    border-color 0.12s ease;
}

.tests-test-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 24px 56px rgba(15, 23, 42, 0.28);
    background: rgba(255, 255, 255, 0.94);
    border-color: rgba(129, 140, 248, 0.8);
}

/* тёмная тема */

:root[data-theme="dark"] .tests-test-card {
    background: rgba(15, 23, 42, 0.9);
    border-color: rgba(148, 163, 184, 0.65);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.9);
}

:root[data-theme="dark"] .tests-test-card:hover {
    background: rgba(15, 23, 42, 0.98);
    border-color: rgba(129, 140, 248, 0.95);
}

/* контент */

.tests-test-header {
    margin-bottom: 6px;
}

.tests-test-title {
    font-weight: 600;
    color: var(--rlv-text-main, #111827);
}

:root[data-theme="dark"] .tests-test-title {
    color: rgba(255, 255, 255, 0.97);
}

.tests-test-description {
    font-size: 0.95rem;
    color: var(--rlv-text-soft, #4b5563);
    margin-bottom: 10px;
}

:root[data-theme="dark"] .tests-test-description {
    color: rgba(226, 232, 240, 0.9);
}

/* кнопка в карточке */

.tests-test-actions {
    display: flex;
    justify-content: flex-end;
}

.tests-test-assign-btn {
    border-radius: 10px !important;
    padding: 8px 18px !important;
}

/* ===== ASSIGN TEST DIALOG ===== */

.assign-dialog-root {
    padding: 20px 22px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
}

:root[data-theme="dark"] .assign-dialog-root {
    background: rgba(15, 23, 42, 0.96);
}

.assign-dialog-title {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: var(--rlv-text-main, #111827);
}

:root[data-theme="dark"] .assign-dialog-title {
    color: rgba(255, 255, 255, 0.97);
}

.assign-dialog-subtitle {
    display: block;
    font-size: 0.95rem;
    color: var(--rlv-text-soft, #4b5563);
    margin-bottom: 16px;
}

:root[data-theme="dark"] .assign-dialog-subtitle {
    color: rgba(226, 232, 240, 0.9);
}

.assign-dialog-dropdown {
    width: 100%;
    margin-bottom: 18px;
}

.assign-dialog-buttons {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.assign-dialog-buttons--center {
    justify-content: center;
}

.assign-dialog-primary-btn {
    border-radius: 10px !important;
    padding: 8px 18px !important;
}

.assign-dialog-secondary-btn {
    border-radius: 10px !important;
    padding: 8px 16px !important;
}

/* ==== Radzen Dialog без "белого квадрата" ==== */

.rz-dialog.rlv-dialog-nochrome {
    background: transparent;
    box-shadow: none;
}

.rz-dialog.rlv-dialog-nochrome .rz-dialog-content {
    background: transparent;
    padding: 0;
}

.rz-dialog.rlv-dialog-nochrome .rz-dialog-titlebar {
    background: transparent;
    border-bottom: none;
    padding: 10px 16px;
}

:root[data-theme="dark"] .rz-dialog.rlv-dialog-nochrome .rz-dialog-titlebar {
    color: rgba(255, 255, 255, 0.96);
}

/* ==== Внутренняя карточка "Назначить тест" ==== */

.assign-test-dialog-shell {
    padding: 0 12px 16px;
}

.assign-test-dialog-card {
    margin-top: 4px;
    padding: 18px 22px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.25);
    border: 1px solid rgba(148, 163, 184, 0.4);
}

:root[data-theme="dark"] .assign-test-dialog-card {
    background: rgba(15, 23, 42, 0.96);
    box-shadow: 0 22px 48px rgba(0, 0, 0, 0.9);
    border-color: rgba(148, 163, 184, 0.6);
}

.assign-test-title {
    margin: 0 0 8px;
    font-size: 1.4rem;
    font-weight: 600;
}

.assign-test-sub {
    margin: 0 0 14px;
    font-size: 0.95rem;
}

.assign-test-testname {
    font-weight: 600;
}

.assign-test-dropdown {
    width: 100%;
    margin-bottom: 18px;
}

/* кнопки внизу */

.assign-test-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.assign-test-actions--center {
    justify-content: center;
}

.assign-test-btn-primary {
    border-radius: 999px !important;
    padding: 8px 20px !important;
}

.assign-test-btn-secondary {
    border-radius: 999px !important;
    padding: 8px 20px !important;
}

@media (max-width: 600px) {
    .assign-test-dialog-card {
        padding: 16px;
    }

    .assign-test-actions {
        flex-direction: column;
    }

    .assign-test-actions .rz-button {
        width: 100%;
        justify-content: center;
    }
}

/* ===== ASSIGNED / TESTS-ASSIGNED PAGES ===== */

/* общий контейнер с «стеклом» для списков назначенных тестов */
.tests-assigned-shell {
    max-width: 780px;
    margin: 0 auto;
}

/* DataList без лишних фонов */
.tests-assigned-list .rz-datalist-data > li {
    background: transparent !important;
    border: none;
    padding: 0;
    margin-bottom: 12px;
}

/* делаем уже существующую tests-test-card кликабельной */
.tests-test-card--clickable {
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

/* footer карточки: чип + стрелка */
.tests-test-footer {
    margin-top: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 0.85rem;
}

/* чипы в карточках */
.tests-chip {
    padding: 4px 10px;
    border-radius: 999px;
    font-weight: 500;
    line-height: 1.2;
}

.tests-chip--primary {
    background: rgba(37, 99, 235, 0.12);
    color: #272540ba;
}

.tests-chip--secondary {
    background: rgba(129, 140, 248, 0.14);
    color: #272540ba;
}

:root[data-theme="dark"] .tests-chip--primary {
    background: rgba(37, 99, 235, 0.26);
    color: rgba(191, 219, 254, 0.96);
}

:root[data-theme="dark"] .tests-chip--secondary {
    background: rgba(129, 140, 248, 0.32);
    color: rgba(199, 210, 254, 0.98);
}

/* стрелка справа */
.tests-card-arrow {
    opacity: 0.7;
    font-size: 1.1rem;
}

/* описание теста — общий класс, чтобы использовать везде */
.formatted-description {
    white-space: pre-wrap;
    font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.45;
    font-size: 0.95rem;
}

/* адаптив: карточка растягивается на ширину, чипы и стрелка складываются */
@media (max-width: 768px) {
    .tests-assigned-shell {
        max-width: 100%;
    }

    .tests-test-footer {
        flex-wrap: wrap;
        justify-content: flex-start;
    }
}

/* ===== SINGLE TEST RESULT PAGE ===== */

.tests-result-shell {
    max-width: 780px;
    margin: 0 auto;
}

/* заголовок и мета-инфа */

.tests-result-header {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 10px;
}

.tests-result-summary {
    font-weight: 600;
    font-size: 1rem;
    color: var(--rlv-text-main, #111827);
}

:root[data-theme="dark"] .tests-result-summary {
    color: rgba(255, 255, 255, 0.97);
}

.tests-result-meta {
    font-size: 0.9rem;
    color: var(--rlv-text-soft, #4b5563);
}

:root[data-theme="dark"] .tests-result-meta {
    color: rgba(148, 163, 184, 0.95);
}

.tests-result-meta-label {
    opacity: 0.9;
    margin-right: 4px;
}

/* секция детального результата */

.tests-result-section {
    margin-top: 8px;
}

.tests-result-section-title {
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 4px;
    color: var(--rlv-text-soft, #4b5563);
}

:root[data-theme="dark"] .tests-result-section-title {
    color: rgba(148, 163, 184, 0.95);
}

/* JSON-блок (используем и на странице клиента) */

.formatted-json {
    white-space: pre-wrap;
    font-family: "JetBrains Mono", "Consolas", "SF Mono", monospace;
    font-size: 0.9rem;
    line-height: 1.45;
    background: rgba(15, 23, 42, 0.04);
    border-radius: 14px;
    padding: 10px 12px;
    max-height: 260px;
    overflow: auto;
    border: 1px solid rgba(148, 163, 184, 0.4);
}

:root[data-theme="dark"] .formatted-json {
    background: rgba(15, 23, 42, 0.9);
    border-color: rgba(30, 64, 175, 0.7);
}

.tests-result-actions {
    margin-top: 14px;
    display: flex;
    justify-content: flex-start;
}

/* ===== CLIENT RESULTS PAGE ===== */

.tests-client-results-sub {
    display: block;
    margin-bottom: 6px;
}

/* контейнер + список */

.tests-client-results-shell {
    max-width: 900px;
    margin: 0 auto;
}

.tests-client-results-list .rz-datalist-data > li {
    background: transparent !important;
    border: none;
    padding: 0;
    margin-bottom: 12px;
}

/* карточка одного прохождения */

.tests-client-result-card {
    border-radius: 20px;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(148, 163, 184, 0.4);
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.22);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    transition: transform 0.12s ease,
    box-shadow 0.12s ease,
    background-color 0.12s ease,
    border-color 0.12s ease;
}

.tests-client-result-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 24px 56px rgba(15, 23, 42, 0.26);
    background: rgba(255, 255, 255, 0.94);
    border-color: rgba(129, 140, 248, 0.8);
}

:root[data-theme="dark"] .tests-client-result-card {
    background: rgba(15, 23, 42, 0.9);
    border-color: rgba(148, 163, 184, 0.6);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.9);
}

:root[data-theme="dark"] .tests-client-result-card:hover {
    background: rgba(15, 23, 42, 0.98);
    border-color: rgba(129, 140, 248, 0.95);
}

/* верх карточки */

.tests-client-result-header {
    font-size: 0.9rem;
    color: var(--rlv-text-soft, #4b5563);
    margin-bottom: 6px;
}

:root[data-theme="dark"] .tests-client-result-header {
    color: rgba(148, 163, 184, 0.95);
}

.tests-client-result-summary {
    margin-bottom: 10px;
}

/* блок с переключателем и кнопкой */

.tests-client-result-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin-top: 8px;
}

.tests-client-result-switch {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.tests-client-result-switch-label {
    font-size: 0.9rem;
}

.tests-client-result-toggle-btn {
    border-radius: 10px !important;
    padding: 6px 14px !important;
    font-size: 0.9rem !important;
}

/* адаптив */

@media (max-width: 768px) {
    .tests-result-shell,
    .tests-client-results-shell {
        max-width: 100%;
    }

    .tests-client-result-controls {
        flex-direction: column;
        align-items: flex-start;
    }

    .tests-client-result-toggle-btn {
        width: 100%;
        justify-content: center;
    }
}

/* название теста в карточке "все результаты клиента" */
.tests-client-result-testtitle {
    font-weight: 600;
    font-size: 0.98rem;
    color: var(--rlv-text-main, #111827);
    margin-bottom: 2px;
}

:root[data-theme="dark"] .tests-client-result-testtitle {
    color: rgba(255, 255, 255, 0.97);
}

/* дата прохождения в заголовке карточки */
.tests-client-result-date {
    font-size: 0.9rem;
    color: var(--rlv-text-soft, #4b5563);
}

:root[data-theme="dark"] .tests-client-result-date {
    color: rgba(148, 163, 184, 0.95);
}

/* ===== CLIENT TESTS & TEST CLIENTS LISTS ===== */

.tests-client-tests-sub {
    margin-bottom: 8px;
    color: var(--rlv-text-soft, #4b5563);
    display: block;
}

:root[data-theme="dark"] .tests-client-tests-sub {
    color: rgba(148, 163, 184, 0.96);
}

/* списки: убираем фон и рамки элементов DataList */
.tests-client-tests-list .rz-datalist-data > li {
    background: transparent !important;
    border: none;
    padding: 0;
    margin-bottom: 12px;
}

/* бейдж для "Требует перепрохождения" */
.tests-client-tests-chip {
    margin-top: 10px;
}

/* общий danger-chip (можно использовать и дальше) */
.tests-chip--danger {
    background: rgba(220, 38, 38, 0.12);
    color: #b91c1c;
}

:root[data-theme="dark"] .tests-chip--danger {
    background: rgba(220, 38, 38, 0.35);
    color: rgba(254, 226, 226, 0.98);
}


/* ====== ТЕСТ: ИНСТРУКЦИЯ ПЕРЕД ПРОХОЖДЕНИЕМ ====== */

.test-page-shell {
    max-width: 820px;
    margin: 0 auto 24px;
}

/* стеклянная карточка с инструкцией */
.test-instruction-card {
    border-radius: 22px;
    padding: 16px 18px 18px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(148, 163, 184, 0.4);
    box-shadow: 0 18px 46px rgba(15, 23, 42, 0.18);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

/* dark theme */
:root[data-theme="dark"] .test-instruction-card {
    background: rgba(15, 23, 42, 0.98);
    border-color: rgba(148, 163, 184, 0.7);
    box-shadow: 0 22px 56px rgba(0, 0, 0, 0.95);
}

.test-card-loading {
    max-width: 420px;
}

/* шапка карточки */
.test-instruction-header {
    margin-bottom: 8px;
}

.test-instruction-label {
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--rlv-text-soft, #6b7280);
}

:root[data-theme="dark"] .test-instruction-label {
    color: rgba(156, 163, 175, 0.96);
}

/* текст инструкции */
.test-instruction-text {
    white-space: pre-wrap;
    font-size: 0.96rem;
    line-height: 1.6;
    color: var(--rlv-text-main, #111827);
    margin-bottom: 14px;
}

:root[data-theme="dark"] .test-instruction-text {
    color: rgba(229, 231, 235, 0.98);
}

/* кнопка старта */
.test-start-btn {
    margin-top: 4px;
    width: 100%;
}
