* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: #f3f6fa;
    color: #1f2937;
}

button,
input,
select {
    font: inherit;
}


/* ==================================================
   PRADŽIOS PUSLAPIS
   ================================================== */

.page-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px 15px;
}

.test-card {
    width: 100%;
    max-width: 520px;
    background: white;
    border-radius: 14px;
    padding: 35px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

.test-card h1 {
    margin-top: 0;
    margin-bottom: 12px;
    text-align: center;
}

.intro-text {
    text-align: center;
    color: #6b7280;
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 7px;
    font-weight: 600;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: white;
    outline: none;
}

.form-group input:focus,
.form-group select:focus {
    border-color: #2563eb;
}

.test-info {
    background: #f8fafc;
    border-radius: 8px;
    padding: 14px;
    margin-bottom: 20px;
    color: #475569;
    line-height: 1.7;
}


/* ==================================================
   MYGTUKAI
   ================================================== */

.primary-button,
.secondary-button {
    border: 0;
    border-radius: 8px;
    padding: 12px 20px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.15s;
}

.primary-button {
    background: #2563eb;
    color: white;
}

.primary-button:hover {
    background: #1d4ed8;
}

.primary-button:disabled,
.secondary-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.secondary-button {
    background: #e5e7eb;
    color: #374151;
}

.secondary-button:hover:not(:disabled) {
    background: #d1d5db;
}


/* ==================================================
   TESTO PUSLAPIS
   ================================================== */

.test-page {
    max-width: 1000px;
    margin: 0 auto;
    padding: 25px 20px 50px;
}


/* ==================================================
   TESTO ANTRAŠTĖ
   ================================================== */

.test-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    background: white;
    padding: 22px 25px;
    border-radius: 12px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.06);
    margin-bottom: 20px;
}

.test-header-info {
    min-width: 0;
}

.test-header h1 {
    margin: 0 0 10px;
    font-size: 24px;
}

.student-info {
    color: #64748b;
    font-size: 15px;
}

.info-separator {
    margin: 0 8px;
}


/* ==================================================
   LAIKMATIS
   ================================================== */

.timer {
    min-width: 110px;
    text-align: center;
    padding: 12px 16px;
    border-radius: 8px;
    background: #111827;
    color: white;
    font-size: 24px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.timer-warning {
    background: #dc2626;
}


/* ==================================================
   KLAUSIMO PROGRESAS
   ================================================== */

.question-progress {
    background: white;
    border-radius: 10px;
    padding: 13px 18px;
    margin-bottom: 15px;
    color: #64748b;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

.question-progress strong {
    color: #1f2937;
}


/* ==================================================
   KLAUSIMAI
   ================================================== */

.question-slide {
    display: none;
}

.question-slide.active {
    display: block;
}

.question-card {
    background: white;
    border-radius: 14px;
    padding: 30px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.07);
    min-height: 400px;
}

.question-number {
    font-size: 16px;
    font-weight: 700;
    color: #2563eb;
    margin-bottom: 18px;
}

.multiple-info {
    display: inline-block;
    margin-left: 8px;
    padding: 4px 9px;
    border-radius: 5px;
    background: #eff6ff;
    color: #2563eb;
    font-size: 13px;
    font-weight: 600;
}

.question-text {
    font-size: 21px;
    line-height: 1.5;
    font-weight: 600;
    margin-bottom: 30px;
}


/* ==================================================
   ATSAKYMAI
   ================================================== */

.answers {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.answer-option {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 18px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    background: white;
    cursor: pointer;
    transition:
        border-color 0.15s,
        background 0.15s,
        box-shadow 0.15s;
}

.answer-option:hover {
    border-color: #93c5fd;
    background: #f8fbff;
}


/* Paslepiame tikrą checkbox/radio */

.answer-option input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
}


/* Mūsų langelis */

.custom-check {
    flex: 0 0 23px;
    width: 23px;
    height: 23px;
    margin-top: 1px;
    border: 2px solid #94a3b8;
    border-radius: 5px;
    background: white;
    position: relative;
}


/* Atsakymo tekstas */

.answer-text {
    flex: 1;
    line-height: 1.5;
    font-size: 16px;
}


/* Pažymėtas atsakymas */

.answer-option.selected {
    border-color: #2563eb;
    background: #eff6ff;
}


/* Pažymėto langelio fonas */

.answer-option.selected .custom-check {
    border-color: #2563eb;
    background: #2563eb;
}


/* Varnelė */

.answer-option.selected .custom-check::after {
    content: "";
    position: absolute;
    left: 6px;
    top: 2px;
    width: 6px;
    height: 11px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}


/* ==================================================
   NAVIGACIJA
   ================================================== */

.question-navigation {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-top: 20px;
}

.question-dots {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    flex: 1;
}

.question-dot {
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: white;
    color: #475569;
    cursor: pointer;
    font-weight: 600;
}

.question-dot:hover {
    border-color: #2563eb;
}

.question-dot.active {
    background: #2563eb;
    border-color: #2563eb;
    color: white;
}


/* Klausimai, į kuriuos jau atsakyta */

.question-dot.answered {
    background: #dcfce7;
    border-color: #86efac;
    color: #166534;
}


/* Aktyvus klausimas turi pirmenybę */

.question-dot.active {
    background: #2563eb;
    border-color: #2563eb;
    color: white;
}


.submit-test-button {
    display: none;
}


/* ==================================================
   MOKYTOJO PUSLAPIS
   ================================================== */

.teacher-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
}

.teacher-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.teacher-stats {
    display: flex;
    gap: 15px;
    margin: 25px 0;
    flex-wrap: wrap;
}

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    min-width: 180px;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.06);
}

.stat-number {
    font-size: 28px;
    font-weight: 700;
}

.stat-label {
    color: #64748b;
}

.teacher-table-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.06);
}

.table-wrapper {
    overflow-x: auto;
}

.results-table {
    width: 100%;
    border-collapse: collapse;
}

.results-table th,
.results-table td {
    padding: 12px;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
}

.status {
    display: inline-block;
    padding: 5px 8px;
    border-radius: 5px;
    font-size: 13px;
    font-weight: 600;
}

.status.published {
    background: #dcfce7;
    color: #166534;
}

.status.unpublished {
    background: #fef3c7;
    color: #92400e;
}

.publish-button {
    border: 0;
    border-radius: 6px;
    padding: 9px 12px;
    background: #2563eb;
    color: white;
    font-weight: 600;
    cursor: pointer;
}

.publish-button:hover {
    background: #1d4ed8;
}

.published-label {
    color: #166534;
    font-weight: 600;
}

.publish-form {
    margin: 0;
}

.delete-form {
    margin: 0;
}

.delete-button {
    border: 1px solid #dc2626;
    border-radius: 6px;
    padding: 9px 12px;
    background: white;
    color: #dc2626;
    font-weight: 600;
    cursor: pointer;
}

.delete-button:hover {
    background: #dc2626;
    color: white;
}

.teacher-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.view-button {
    display: inline-block;
    padding: 9px 12px;
    border-radius: 6px;
    background: #e5e7eb;
    color: #374151;
    text-decoration: none;
    font-weight: 600;
}

.empty-message {
    color: #64748b;
    padding: 20px 0;
}


/* ==================================================
   MOKYTOJO PRISIJUNGIMAS
   ================================================== */

.teacher-login {
    max-width: 450px;
    margin: 80px auto;
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.08);
}


/* ==================================================
   MOBILUS VAIZDAS
   ================================================== */

@media (max-width: 700px) {

    .test-page {
        padding: 12px 10px 30px;
    }


    .test-header {
        flex-direction: column;
        align-items: stretch;
    }


    .test-header h1 {
        font-size: 20px;
    }


    .student-info {
        line-height: 1.7;
    }


    .timer {
        width: 100%;
    }


    .question-card {
        padding: 20px;
        min-height: 350px;
    }


    .question-text {
        font-size: 18px;
    }


    .question-navigation {
        flex-wrap: wrap;
    }


    .question-dots {
        order: 3;
        flex-basis: 100%;
    }


    .question-navigation
    .primary-button,
    .question-navigation
    .secondary-button {

        flex: 1;

    }


    .test-card {
        padding: 25px 20px;
    }

}

.test-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 20px;
}

.test-form-grid .form-group {
    margin-bottom: 20px;
}

.form-group small {
    display: block;
    margin-top: 6px;
    color: #64748b;
    line-height: 1.4;
}

.checkbox-form-group {
    margin: 5px 0 20px;
}

.checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    cursor: pointer;
    font-weight: 600;
}

.checkbox-label input {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.form-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 15px;
}

.section-header h2 {
    margin: 0 0 5px;
}

.teacher-info-card {
    margin-top: 25px;
}

.teacher-info-card h2 {
    margin-top: 0;
}

.teacher-info-card li {
    margin-bottom: 8px;
    line-height: 1.5;
}

.error-message {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 20px;
}

.logout-form {
    margin: 0;
}

code {
    background: #f1f5f9;
    padding: 4px 7px;
    border-radius: 5px;
    font-family: Consolas, monospace;
}

@media (max-width: 800px) {

    .test-form-grid {
        grid-template-columns: 1fr;
    }

    .teacher-header {
        align-items: flex-start;
        flex-direction: column;
    }

}

.filter-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 5px;
}

.results-filter-form {
    max-width: 800px;
}

.result-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px 30px;
    line-height: 1.5;
}

.result-question-card {
    margin-top: 20px;
}

.result-question-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 18px;
}

.question-points-result {
    white-space: nowrap;
    background: #f8fafc;
    border-radius: 7px;
    padding: 8px 12px;
    color: #475569;
}

.question-points-result strong {
    color: #1f2937;
}

.teacher-answer-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.teacher-answer-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 9px;
    background: #fff;
}

.teacher-answer-option.student-selected {
    background: #eff6ff;
    border-color: #93c5fd;
}

.teacher-answer-option.correct-answer {
    border-color: #86efac;
    background: #f0fdf4;
}

.teacher-answer-option.student-selected.correct-answer {
    border-color: #22c55e;
    background: #dcfce7;
}

.teacher-answer-option.wrong-answer {
    border-color: #fca5a5;
    background: #fef2f2;
}

.teacher-answer-icon {
    flex: 0 0 25px;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #64748b;
}

.teacher-answer-option.correct-answer
.teacher-answer-icon {
    color: #16a34a;
}

.teacher-answer-option.wrong-answer
.teacher-answer-icon {
    color: #dc2626;
}

.teacher-answer-text {
    flex: 1;
    line-height: 1.5;
}

.teacher-answer-label {
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    text-align: right;
}

.teacher-answer-option.correct-answer
.teacher-answer-label {
    color: #166534;
}

.teacher-answer-option.wrong-answer
.teacher-answer-label {
    color: #991b1b;
}

.student-result-name {
    font-size: 20px;
    line-height: 1.3;
}

@media (max-width: 800px) {

    .filter-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .result-info-grid {
        grid-template-columns: 1fr;
    }

    .result-question-header {
        flex-direction: column;
    }

    .teacher-answer-option {
        align-items: flex-start;
    }

    .teacher-answer-label {
        display: none;
    }

}

/* =========================================================
   MOKYTOJO TESTŲ VALDYMAS
   ========================================================= */

.teacher-page {
    max-width: 1400px;
}

.teacher-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 20px;
}

.teacher-header h1 {
    margin-bottom: 5px;
}

.teacher-form {
    width: 100%;
}

.form-help {
    margin-top: 6px;
    font-size: 13px;
    color: #64748b;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-weight: 600;
}

.checkbox-label input {
    width: 18px;
    height: 18px;
}

.teacher-table-wrapper {
    width: 100%;
    overflow-x: auto;
}

.teacher-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 950px;
}

.teacher-table th,
.teacher-table td {
    padding: 13px 12px;
    border-bottom: 1px solid #e2e8f0;
    text-align: left;
    vertical-align: middle;
}

.teacher-table th {
    background: #f8fafc;
    color: #475569;
    font-size: 14px;
    font-weight: 700;
}

.teacher-table td {
    font-size: 14px;
}

.teacher-table code {
    font-family: Consolas, "Courier New", monospace;
    background: #f1f5f9;
    padding: 3px 6px;
    border-radius: 5px;
}

.teacher-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.inline-form {
    display: inline;
    margin: 0;
}

.small-button {
    display: inline-block;
    padding: 7px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #fff;
    color: #334155;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

.small-button:hover {
    background: #f8fafc;
}

.danger-button {
    color: #b91c1c;
    border-color: #fecaca;
}

.danger-button:hover {
    background: #fef2f2;
}

.status-badge {
    display: inline-block;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.status-active {
    background: #dcfce7;
    color: #166534;
}

.status-inactive {
    background: #e2e8f0;
    color: #475569;
}

.empty-state {
    text-align: center;
    padding: 35px 20px;
    color: #64748b;
}

.empty-state h3 {
    margin-bottom: 8px;
    color: #334155;
}

.teacher-login-card {
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 700px) {

    .teacher-header {
        flex-direction: column;
    }

    .teacher-header form {
        width: 100%;
    }

    .teacher-header .secondary-button {
        width: 100%;
    }

}

/* =========================================================
   REZULTATŲ STATISTIKA
   ========================================================= */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.stat-card {
    background: #fff;
    border-radius: 10px;
    padding: 18px;
    border: 1px solid #e2e8f0;
    text-align: center;
}

.stat-label {
    display: block;
    font-size: 13px;
    color: #64748b;
    margin-bottom: 8px;
}

.stat-value {
    display: block;
    font-size: 24px;
    color: #1e293b;
}

@media (max-width: 1000px) {

    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }

}

@media (max-width: 650px) {

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

}

/* =========================================================
   MOKYTOJO DASHBOARD – GALUTINIS IŠDĖSTYMAS
   ========================================================= */

.page-container.teacher-page {
    width: 100%;
    max-width: 1400px;
    min-height: auto;
    display: block;
    margin: 0 auto;
    padding: 30px 20px 50px;
}

.teacher-page .test-card {
    width: 100%;
    max-width: none;
    margin-bottom: 20px;
}

.teacher-page .intro-text {
    text-align: left;
}

.teacher-page h1 {
    text-align: left;
}

.teacher-page .teacher-header {
    width: 100%;
}

.teacher-page .form-group input,
.teacher-page .form-group select {
    width: 100%;
}

.teacher-page .primary-button {
    width: auto;
}

.teacher-page .secondary-button {
    width: auto;
}

.teacher-page .filter-grid {
    width: 100%;
}

.teacher-page .teacher-table-card {
    width: 100%;
}

@media (max-width: 700px) {

    .page-container.teacher-page {
        padding: 20px 10px 40px;
    }

    .teacher-page .test-card {
        padding: 25px 20px;
    }

    .teacher-page .primary-button,
    .teacher-page .secondary-button {
        width: 100%;
    }

}

/* =========================================================
   NAUJAS MOKYTOJO DASHBOARD
   ========================================================= */

.teacher-dashboard {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 35px 25px 60px;
}

/* ---------------------------------------------------------
   HEADER
   --------------------------------------------------------- */

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
    margin-bottom: 28px;
}

.dashboard-kicker {
    margin-bottom: 6px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1.4px;
    color: #64748b;
}

.dashboard-header h1 {
    margin: 0 0 8px;
    font-size: 32px;
    line-height: 1.2;
    color: #172033;
}

.dashboard-header p {
    margin: 0;
    color: #64748b;
    font-size: 15px;
}

.dashboard-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

/* ---------------------------------------------------------
   BUTTONS
   --------------------------------------------------------- */

.dashboard-header .primary-button,
.dashboard-header .secondary-button,
.teacher-form-actions .primary-button,
.teacher-form-actions .secondary-button {
    width: auto;
}

.primary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
    border: 0;
    border-radius: 8px;
    background: #2563eb;
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    cursor: pointer;
}

.primary-button:hover {
    background: #1d4ed8;
}

.secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #fff;
    color: #334155;
    text-decoration: none;
    font-weight: 700;
    cursor: pointer;
}

.secondary-button:hover {
    background: #f8fafc;
}

.full-width {
    width: 100%;
}

/* ---------------------------------------------------------
   PRANEŠIMAI
   --------------------------------------------------------- */

.dashboard-message {
    margin-bottom: 22px;
    padding: 14px 17px;
    border-radius: 9px;
    font-size: 14px;
    font-weight: 600;
}

.success-message {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #047857;
}

.dashboard-message.error-message {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
}

/* ---------------------------------------------------------
   STATISTIKA
   --------------------------------------------------------- */

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 32px;
}

.dashboard-stat {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 100px;
    padding: 20px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 3px 12px rgba(15, 23, 42, .04);
}

.dashboard-stat-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    border-radius: 10px;
    background: #f1f5f9;
    font-size: 22px;
}

.dashboard-stat-label {
    display: block;
    margin-bottom: 4px;
    color: #64748b;
    font-size: 13px;
}

.dashboard-stat strong {
    display: block;
    color: #172033;
    font-size: 27px;
    line-height: 1;
}

/* ---------------------------------------------------------
   SECTIONS
   --------------------------------------------------------- */

.dashboard-section {
    margin-bottom: 30px;
}

.dashboard-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 16px;
}

.dashboard-section-header h2 {
    margin: 0 0 5px;
    color: #172033;
    font-size: 21px;
}

.dashboard-section-header p {
    margin: 0;
    color: #64748b;
    font-size: 14px;
}

/* ---------------------------------------------------------
   TESTŲ KORTELĖS
   --------------------------------------------------------- */

.tests-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.test-management-card {
    overflow: hidden;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 3px 12px rgba(15, 23, 42, .04);
}

.test-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 15px;
    padding: 21px 21px 17px;
    border-bottom: 1px solid #eef2f7;
}

.test-card-title-wrap {
    min-width: 0;
}

.test-card-title-wrap h3 {
    margin: 0 0 9px;
    color: #172033;
    font-size: 18px;
    line-height: 1.35;
}

.test-status {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .5px;
}

.test-status.active {
    background: #dcfce7;
    color: #166534;
}

.test-status.inactive {
    background: #e2e8f0;
    color: #475569;
}

.test-card-menu {
    flex-shrink: 0;
    color: #64748b;
    font-size: 12px;
    white-space: nowrap;
}

.test-card-details {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: #eef2f7;
    border-bottom: 1px solid #eef2f7;
}

.test-detail {
    min-width: 0;
    padding: 15px 16px;
    background: #fff;
}

.test-detail-label {
    display: block;
    margin-bottom: 5px;
    color: #64748b;
    font-size: 11px;
}

.test-detail strong {
    display: block;
    overflow: hidden;
    color: #334155;
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.test-detail strong.attention {
    color: #dc2626;
}

.test-password-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 13px 21px;
    background: #f8fafc;
}

.test-password-row span {
    color: #64748b;
    font-size: 12px;
}

.test-password-row code {
    padding: 4px 8px;
    border: 1px solid #e2e8f0;
    border-radius: 5px;
    background: #fff;
    color: #334155;
    font-family: Consolas, "Courier New", monospace;
    font-size: 12px;
}

.test-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 16px 21px 19px;
}

.test-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 0 12px;
    border: 1px solid #cbd5e1;
    border-radius: 7px;
    background: #fff;
    color: #334155;
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.test-action:hover {
    background: #f8fafc;
}

.test-action.primary {
    border-color: #2563eb;
    background: #2563eb;
    color: #fff;
}

.test-action.primary:hover {
    background: #1d4ed8;
}

.test-action.danger {
    border-color: #fecaca;
    color: #b91c1c;
}

.test-action.danger:hover {
    background: #fef2f2;
}

.test-action-form {
    display: inline;
    margin: 0;
}

/* ---------------------------------------------------------
   TUŠČIAS TESTŲ SĄRAŠAS
   --------------------------------------------------------- */

.dashboard-empty {
    padding: 55px 25px;
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
    background: #fff;
    text-align: center;
}

.dashboard-empty-icon {
    margin-bottom: 12px;
    font-size: 35px;
}

.dashboard-empty h3 {
    margin: 0 0 7px;
    color: #334155;
}

.dashboard-empty p {
    margin: 0;
    color: #64748b;
}

/* ---------------------------------------------------------
   TESTO KŪRIMO FORMA
   --------------------------------------------------------- */

.dashboard-form-section {
    padding: 24px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 3px 12px rgba(15, 23, 42, .04);
}

.teacher-create-form {
    width: 100%;
}

.teacher-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.form-group-wide {
    grid-column: 1 / -1;
}

.teacher-create-form .form-group {
    margin-bottom: 0;
}

.teacher-create-form .form-group label {
    display: block;
    margin-bottom: 7px;
    color: #334155;
    font-size: 14px;
    font-weight: 700;
}

.teacher-create-form input[type="text"],
.teacher-create-form input[type="number"],
.teacher-create-form input[type="password"],
.teacher-create-form select {
    width: 100%;
    min-height: 44px;
    padding: 9px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 7px;
    background: #fff;
    color: #1e293b;
    outline: none;
}

.teacher-create-form input:focus,
.teacher-create-form select:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .1);
}

.form-help {
    margin-top: 6px;
    color: #64748b;
    font-size: 12px;
    line-height: 1.4;
}

.input-with-suffix {
    display: flex;
    align-items: center;
    gap: 9px;
}

.input-with-suffix input {
    width: 120px !important;
}

.input-with-suffix span {
    color: #64748b;
    font-size: 14px;
}

.form-group-check {
    padding-top: 25px;
}

.dashboard-checkbox {
    display: flex !important;
    align-items: center;
    gap: 9px;
    cursor: pointer;
}

.dashboard-checkbox input {
    width: 18px;
    height: 18px;
    margin: 0;
}

.teacher-form-actions {
    display: flex;
    gap: 10px;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #eef2f7;
}

/* ---------------------------------------------------------
   MOKYTOJO LOGIN
   --------------------------------------------------------- */

.teacher-login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 25px;
}

.teacher-login-card {
    width: 100%;
    max-width: 430px;
    padding: 35px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    box-shadow: 0 10px 35px rgba(15, 23, 42, .08);
}

.teacher-login-card .login-icon {
    margin-bottom: 12px;
    font-size: 32px;
}

.teacher-login-card h1 {
    margin: 0 0 8px;
    color: #172033;
}

.teacher-login-card > p {
    margin: 0 0 25px;
    color: #64748b;
}

.teacher-login-card .form-group {
    margin-bottom: 20px;
}

.teacher-login-card label {
    display: block;
    margin-bottom: 7px;
    font-weight: 700;
    color: #334155;
}

.teacher-login-card input {
    width: 100%;
    min-height: 44px;
    padding: 9px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 7px;
}

.back-link {
    display: block;
    margin-top: 20px;
    color: #64748b;
    text-align: center;
    text-decoration: none;
    font-size: 13px;
}

.back-link:hover {
    color: #2563eb;
}

/* ---------------------------------------------------------
   MOBILUS VAIZDAS
   --------------------------------------------------------- */

@media (max-width: 1050px) {

    .dashboard-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .tests-grid {
        grid-template-columns: 1fr;
    }

}

@media (max-width: 700px) {

    .teacher-dashboard {
        padding: 22px 12px 40px;
    }

    .dashboard-header {
        flex-direction: column;
        align-items: stretch;
        gap: 18px;
    }

    .dashboard-header h1 {
        font-size: 27px;
    }

    .dashboard-header-actions {
        flex-direction: column;
    }

    .dashboard-header-actions .primary-button,
    .dashboard-header-actions .secondary-button {
        width: 100%;
    }

    .dashboard-stats {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .dashboard-stat {
        min-height: 85px;
        padding: 14px;
    }

    .dashboard-stat-icon {
        width: 40px;
        height: 40px;
        flex-basis: 40px;
        font-size: 18px;
    }

    .dashboard-stat strong {
        font-size: 22px;
    }

    .tests-grid {
        grid-template-columns: 1fr;
    }

    .test-card-details {
        grid-template-columns: 1fr 1fr;
    }

    .teacher-form-grid {
        grid-template-columns: 1fr;
    }

    .form-group-wide {
        grid-column: auto;
    }

    .form-group-check {
        padding-top: 0;
    }

    .dashboard-form-section {
        padding: 18px;
    }

    .dashboard-section-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .teacher-form-actions {
        flex-direction: column;
    }

    .teacher-form-actions .primary-button,
    .teacher-form-actions .secondary-button {
        width: 100%;
    }

}

@media (max-width: 450px) {

    .dashboard-stats {
        grid-template-columns: 1fr;
    }

    .test-card-top {
        flex-direction: column;
    }

    .test-password-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .test-card-actions {
        flex-direction: column;
    }

    .test-action,
    .test-action-form,
    .test-action-form .test-action {
        width: 100%;
    }

}

/* =========================================================
   NAUJAS MOKYTOJO REZULTATŲ PUSLAPIS
   ========================================================= */

.results-dashboard {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px 25px 60px;
}

.results-back-row {
    margin-bottom: 20px;
}

.results-back-link {
    display: inline-flex;
    align-items: center;
    color: #64748b;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

.results-back-link:hover {
    color: #2563eb;
}

.results-kicker {
    margin-bottom: 6px;
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1.3px;
}

.results-page-header {
    margin-bottom: 25px;
}

.results-page-header h1,
.student-result-header h1 {
    margin: 0 0 8px;
    color: #172033;
    font-size: 30px;
    line-height: 1.25;
}

.results-page-header p,
.student-result-header p {
    margin: 0;
    color: #64748b;
    font-size: 15px;
}

.result-separator {
    padding: 0 5px;
    color: #cbd5e1;
}

/* =========================================================
   REZULTATŲ STATISTIKA
   ========================================================= */

.results-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 25px;
}

.results-stat-card {
    padding: 19px 20px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 11px;
    box-shadow: 0 3px 12px rgba(15, 23, 42, .04);
}

.results-stat-card.warning {
    border-color: #fed7aa;
    background: #fffaf5;
}

.results-stat-label {
    display: block;
    margin-bottom: 7px;
    color: #64748b;
    font-size: 13px;
}

.results-stat-card strong {
    display: block;
    color: #172033;
    font-size: 25px;
}

/* =========================================================
   FILTRAS
   ========================================================= */

.results-filter-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 25px;
    margin-bottom: 18px;
    padding: 20px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 11px;
}

.results-filter-card h2 {
    margin: 0 0 5px;
    color: #172033;
    font-size: 19px;
}

.results-filter-card p {
    margin: 0;
    color: #64748b;
    font-size: 13px;
}

.results-class-filter {
    display: flex;
    align-items: center;
    gap: 9px;
    flex-shrink: 0;
}

.results-class-filter label {
    color: #475569;
    font-size: 13px;
    font-weight: 700;
}

.results-class-filter select {
    min-width: 160px;
    min-height: 40px;
    padding: 7px 11px;
    border: 1px solid #cbd5e1;
    border-radius: 7px;
    background: #fff;
    color: #334155;
}

.clear-filter {
    color: #2563eb;
    font-size: 13px;
    text-decoration: none;
    font-weight: 600;
}

/* =========================================================
   REZULTATŲ LENTELĖ
   ========================================================= */

.results-table-section {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 11px;
    overflow: hidden;
    box-shadow: 0 3px 12px rgba(15, 23, 42, .04);
}

.results-table-wrapper {
    width: 100%;
    overflow-x: auto;
}

.new-results-table {
    width: 100%;
    min-width: 900px;
    border-collapse: collapse;
}

.new-results-table th {
    padding: 14px 16px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
    text-align: left;
    white-space: nowrap;
}

.new-results-table td {
    padding: 15px 16px;
    border-bottom: 1px solid #eef2f7;
    color: #475569;
    font-size: 13px;
    vertical-align: middle;
}

.new-results-table tbody tr:last-child td {
    border-bottom: 0;
}

.new-results-table tbody tr:hover {
    background: #fafcff;
}

.student-name-cell strong {
    display: block;
    color: #172033;
    font-size: 14px;
}

.points-max {
    color: #94a3b8;
}

.grade-value {
    color: #172033;
    font-size: 16px;
}

.not-submitted {
    color: #94a3b8;
}

.result-status {
    display: inline-flex;
    align-items: center;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .3px;
    white-space: nowrap;
}

.result-status.published {
    background: #dcfce7;
    color: #166534;
}

.result-status.unpublished {
    background: #fef3c7;
    color: #92400e;
}

.result-status.not-submitted-status {
    background: #f1f5f9;
    color: #64748b;
}

.result-row-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.result-row-actions form {
    display: inline;
    margin: 0;
}

.row-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 33px;
    padding: 0 10px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #fff;
    color: #334155;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.row-action:hover {
    background: #f8fafc;
}

.row-action.view {
    border-color: #bfdbfe;
    color: #1d4ed8;
}

.row-action.publish {
    border-color: #bbf7d0;
    color: #15803d;
}

.row-action.unpublish {
    border-color: #fed7aa;
    color: #c2410c;
}

/* =========================================================
   MOKINIO REZULTATAS
   ========================================================= */

.student-result-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 25px;
    margin-bottom: 25px;
}

.student-result-summary {
    display: grid;
    grid-template-columns: 2fr 1fr 1.5fr;
    margin-bottom: 18px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
}

.student-result-score,
.student-result-grade,
.student-result-date {
    padding: 22px;
}

.student-result-grade,
.student-result-date {
    border-left: 1px solid #eef2f7;
}

.student-result-score {
    background: #f8fbff;
}

.student-result-score-label,
.student-result-grade span,
.student-result-date span {
    display: block;
    margin-bottom: 8px;
    color: #64748b;
    font-size: 12px;
    font-weight: 600;
}

.student-result-score strong {
    display: block;
    color: #172033;
    font-size: 31px;
}

.student-result-score strong small {
    color: #94a3b8;
    font-size: 17px;
}

.student-result-score > span:last-child {
    color: #64748b;
    font-size: 12px;
}

.student-result-grade strong {
    display: block;
    color: #172033;
    font-size: 28px;
}

.student-result-date strong {
    display: block;
    color: #334155;
    font-size: 14px;
}

.student-result-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-bottom: 30px;
}

.student-result-actions form {
    margin: 0;
}

.result-button {
    min-height: 40px;
    padding: 0 15px;
    border: 1px solid #cbd5e1;
    border-radius: 7px;
    background: #fff;
    color: #334155;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.result-button.publish {
    border-color: #16a34a;
    background: #16a34a;
    color: #fff;
}

.result-button.publish:hover {
    background: #15803d;
}

.result-button.secondary:hover {
    background: #f8fafc;
}

.result-button.danger {
    border-color: #fecaca;
    color: #b91c1c;
}

.result-button.danger:hover {
    background: #fef2f2;
}

/* =========================================================
   KLAUSIMAI
   ========================================================= */

.answers-section {
    margin-top: 5px;
}

.results-section-title {
    margin-bottom: 15px;
}

.results-section-title h2 {
    margin: 0 0 5px;
    color: #172033;
    font-size: 20px;
}

.results-section-title p {
    margin: 0;
    color: #64748b;
    font-size: 13px;
}

.student-answers-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.student-question-card {
    padding: 20px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 11px;
}

.student-question-header {
    display: flex;
    align-items: flex-start;
    gap: 13px;
    margin-bottom: 17px;
}

.student-question-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 31px;
    height: 31px;
    flex: 0 0 31px;
    border-radius: 8px;
    background: #eff6ff;
    color: #2563eb;
    font-size: 13px;
    font-weight: 800;
}

.student-question-title {
    flex: 1;
}

.student-question-title h3 {
    margin: 2px 0 5px;
    color: #334155;
    font-size: 15px;
    line-height: 1.45;
}

.student-question-title span {
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
}

.student-answer-options {
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin-left: 44px;
}

.student-answer-option {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 42px;
    padding: 8px 11px;
    border: 1px solid #e2e8f0;
    border-radius: 7px;
    background: #fff;
}

.student-answer-option.selected {
    background: #f8fafc;
}

.student-answer-option.correct {
    border-color: #86efac;
    background: #f0fdf4;
}

.student-answer-option.wrong {
    border-color: #fca5a5;
    background: #fef2f2;
}

.student-answer-mark {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 27px;
    height: 27px;
    flex: 0 0 27px;
    border-radius: 6px;
    background: #f1f5f9;
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
}

.student-answer-option.correct .student-answer-mark {
    background: #22c55e;
    color: #fff;
}

.student-answer-option.wrong .student-answer-mark {
    background: #ef4444;
    color: #fff;
}

.student-answer-text {
    flex: 1;
    color: #334155;
    font-size: 13px;
    line-height: 1.4;
}

.student-answer-badge {
    color: #64748b;
    font-size: 10px;
    font-weight: 700;
    white-space: nowrap;
}

/* =========================================================
   MOBILUS
   ========================================================= */

@media (max-width: 900px) {

    .results-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .student-result-summary {
        grid-template-columns: 1fr 1fr;
    }

    .student-result-score {
        grid-column: 1 / -1;
    }

    .student-result-grade,
    .student-result-date {
        border-left: 0;
        border-top: 1px solid #eef2f7;
    }

}

@media (max-width: 700px) {

    .results-dashboard {
        padding: 22px 12px 40px;
    }

    .results-page-header h1,
    .student-result-header h1 {
        font-size: 25px;
    }

    .results-stats {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .results-filter-card {
        align-items: stretch;
        flex-direction: column;
    }

    .results-class-filter {
        align-items: stretch;
        flex-wrap: wrap;
    }

    .results-class-filter select {
        flex: 1;
    }

    .student-result-header {
        flex-direction: column;
    }

    .student-result-summary {
        grid-template-columns: 1fr;
    }

    .student-result-score {
        grid-column: auto;
    }

    .student-result-grade,
    .student-result-date {
        border-left: 0;
        border-top: 1px solid #eef2f7;
    }

    .student-answer-options {
        margin-left: 0;
    }

}

@media (max-width: 450px) {

    .results-stats {
        grid-template-columns: 1fr;
    }

    .results-class-filter {
        flex-direction: column;
    }

    .results-class-filter select {
        width: 100%;
    }

    .student-result-actions {
        flex-direction: column;
    }

    .student-result-actions form,
    .student-result-actions button {
        width: 100%;
    }

}

/* =========================================================
   MOKINIO PASKELBTO REZULTATO PERŽIŪRA
   ========================================================= */

.student-result-card {
    max-width: 700px;
}

.student-result-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 55px;
    height: 55px;
    margin: 0 auto 15px;
    border-radius: 50%;
    background: #dcfce7;
    color: #15803d;
    font-size: 25px;
    font-weight: 800;
}

.student-result-card h1 {
    text-align: center;
}

.student-result-card .intro-text {
    text-align: center;
}

/* ---------------------------------------------------------
   INFORMACIJA APIE MOKINĮ
   --------------------------------------------------------- */

.student-result-info {
    display: grid;
    grid-template-columns: 1.5fr 1.5fr .8fr;
    gap: 1px;
    margin-top: 25px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    border-radius: 9px;
    background: #e2e8f0;
}

.student-result-info > div {
    padding: 13px 15px;
    background: #f8fafc;
}

.student-result-info span {
    display: block;
    margin-bottom: 5px;
    color: #64748b;
    font-size: 11px;
}

.student-result-info strong {
    display: block;
    color: #334155;
    font-size: 13px;
}

/* ---------------------------------------------------------
   GALUTINIS REZULTATAS
   --------------------------------------------------------- */

.student-final-result {
    display: grid;
    grid-template-columns: 2fr 1fr;
    margin-top: 18px;
    overflow: hidden;
    border: 1px solid #dbeafe;
    border-radius: 10px;
    background: #eff6ff;
}

.final-result-points,
.final-result-grade {
    padding: 18px 20px;
}

.final-result-grade {
    border-left: 1px solid #dbeafe;
}

.final-result-points span,
.final-result-grade span {
    display: block;
    margin-bottom: 5px;
    color: #64748b;
    font-size: 12px;
}

.final-result-points strong {
    color: #172033;
    font-size: 27px;
}

.final-result-points small {
    color: #94a3b8;
    font-size: 16px;
}

.final-result-grade strong {
    color: #172033;
    font-size: 27px;
}

/* ---------------------------------------------------------
   ATSAKYMŲ PERŽIŪRA
   --------------------------------------------------------- */

.student-answer-review {
    width: 100%;
    max-width: 900px;
    margin: 30px auto 50px;
}

.student-review-header {
    margin-bottom: 16px;
}

.student-review-header h2 {
    margin: 0 0 5px;
    color: #172033;
    font-size: 21px;
}

.student-review-header p {
    margin: 0;
    color: #64748b;
    font-size: 13px;
}

.student-review-question {
    margin-bottom: 15px;
    padding: 20px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 11px;
    box-shadow: 0 3px 12px rgba(15, 23, 42, .04);
}

.student-review-question-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 17px;
}

.student-review-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    border-radius: 8px;
    background: #eff6ff;
    color: #2563eb;
    font-size: 13px;
    font-weight: 800;
}

.student-review-question-title {
    flex: 1;
}

.student-review-question-title h3 {
    margin: 2px 0 5px;
    color: #334155;
    font-size: 15px;
    line-height: 1.45;
}

.student-review-question-title span {
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
}

/* ---------------------------------------------------------
   ATSAKYMŲ EILUTĖS
   --------------------------------------------------------- */

.student-review-options {
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin-left: 44px;
}

.student-review-option {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 43px;
    padding: 8px 11px;
    border: 1px solid #e2e8f0;
    border-radius: 7px;
    background: #fff;
}

.student-review-mark {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 27px;
    height: 27px;
    flex: 0 0 27px;
    border-radius: 6px;
    background: #f1f5f9;
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
}

.student-review-answer-text {
    flex: 1;
    color: #334155;
    font-size: 13px;
    line-height: 1.4;
}

/* Mokinys pasirinko teisingai */

.student-review-option.correct-selected {
    border-color: #86efac;
    background: #f0fdf4;
}

.student-review-option.correct-selected .student-review-mark {
    background: #22c55e;
    color: #fff;
}

/* Mokinys pasirinko neteisingai */

.student-review-option.wrong-selected {
    border-color: #fca5a5;
    background: #fef2f2;
}

.student-review-option.wrong-selected .student-review-mark {
    background: #ef4444;
    color: #fff;
}

/* Teisingas, bet mokinys jo nepasirinko */

.student-review-option.correct-not-selected {
    border-color: #86efac;
    background: #f0fdf4;
}

.student-review-option.correct-not-selected .student-review-mark {
    background: #22c55e;
    color: #fff;
}

.student-review-answer-label {
    flex-shrink: 0;
    color: #64748b;
    font-size: 10px;
    font-weight: 700;
    white-space: nowrap;
}

.student-review-option.correct-selected
.student-review-answer-label {
    color: #15803d;
}

.student-review-option.wrong-selected
.student-review-answer-label {
    color: #dc2626;
}

.student-review-option.correct-not-selected
.student-review-answer-label {
    color: #15803d;
}

/* ---------------------------------------------------------
   MOBILUS
   --------------------------------------------------------- */

@media (max-width: 700px) {

    .student-result-info {
        grid-template-columns: 1fr;
    }

    .student-final-result {
        grid-template-columns: 1fr;
    }

    .final-result-grade {
        border-top: 1px solid #dbeafe;
        border-left: 0;
    }

    .student-review-options {
        margin-left: 0;
    }

    .student-review-option {
        align-items: flex-start;
    }

    .student-review-answer-label {
        white-space: normal;
        text-align: right;
    }

}

/* =========================================================
   MOKYTOJO REZULTATO KOREKCIJA
   ========================================================= */

.teacher-adjustment-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 25px;
    margin-bottom: 24px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, .05);
}

.teacher-adjustment-form {
    margin-top: 20px;
}

.teacher-adjustment-grid {
    display: grid;
    grid-template-columns: minmax(220px, 320px) 1fr;
    gap: 20px;
}

.teacher-adjustment-grid .form-group {
    display: flex;
    flex-direction: column;
}

.teacher-adjustment-grid label {
    font-weight: 600;
    margin-bottom: 8px;
}

.teacher-adjustment-grid input,
.teacher-adjustment-grid textarea {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 11px 12px;
    font-size: 15px;
    font-family: inherit;
    background: #fff;
}

.teacher-adjustment-grid input:focus,
.teacher-adjustment-grid textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}

.teacher-adjustment-grid small {
    color: #6b7280;
    margin-top: 6px;
    font-size: 12px;
}

.teacher-adjustment-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 20px 0;
}

.teacher-adjustment-summary > div {
    flex: 1 1 180px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 14px 16px;
}

.teacher-adjustment-summary span {
    display: block;
    color: #6b7280;
    font-size: 13px;
    margin-bottom: 5px;
}

.teacher-adjustment-summary strong {
    font-size: 18px;
}

.teacher-adjustment-summary .final-adjustment-result {
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.teacher-adjustment-summary .final-adjustment-result strong {
    font-size: 21px;
}

.rounded-grade-label {
    display: block;
    margin-top: 8px;
    font-size: 14px;
    color: #6b7280;
}

.rounded-grade-label strong {
    font-size: 20px;
    color: #111827;
    margin-left: 5px;
}

.rounded-grade-value {
    display: inline-block;
    min-width: 32px;
    padding: 5px 9px;
    border-radius: 7px;
    background: #f0fdf4;
    color: #166534;
    font-size: 18px;
}

.positive-adjustment {
    color: #15803d;
}

.negative-adjustment {
    color: #dc2626;
}


/* =========================================================
   PLATESNĖ REZULTATŲ LENTELĖ
   ========================================================= */

.results-table-wrapper {
    overflow-x: auto;
}

.new-results-table {
    min-width: 1150px;
}


/* =========================================================
   MOBILUS VAIZDAS
   ========================================================= */

@media (max-width: 800px) {

    .teacher-adjustment-grid {
        grid-template-columns: 1fr;
    }

    .teacher-adjustment-card {
        padding: 20px;
    }

    .teacher-adjustment-summary {
        flex-direction: column;
    }

}

/* =========================================================
   MOKINIO GALUTINIO REZULTATO ATVAIZDAVIMAS
   ========================================================= */

.student-final-result-top {
    margin-top: 24px;
    margin-bottom: 24px;
}

.final-result-adjustment {
    text-align: center;
}

.final-result-adjustment > span,
.final-result-points > span,
.final-result-grade > span {
    display: block;
    color: #6b7280;
    font-size: 14px;
    margin-bottom: 6px;
}

.final-result-adjustment > strong {
    font-size: 22px;
}

.final-result-main {
    border-left: 1px solid #e5e7eb;
    padding-left: 25px;
}

.final-result-main strong {
    font-size: 28px;
}

.student-rounded-grade {
    display: block;
    margin-top: 7px;
    color: #6b7280;
    font-size: 14px;
}

.student-rounded-grade strong {
    color: #111827;
    font-size: 22px;
    margin-left: 4px;
}

.student-teacher-comment {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 18px 20px;
    margin-bottom: 25px;
}

.student-teacher-comment-title {
    font-weight: 700;
    margin-bottom: 8px;
}

.student-teacher-comment-text {
    color: #374151;
    line-height: 1.55;
}


/* =========================================================
   MOBILUS VAIZDAS
   ========================================================= */

@media (max-width: 700px) {

    .student-final-result-top {
        display: flex;
        flex-direction: column;
        gap: 18px;
    }

    .final-result-main {
        border-left: 0;
        border-top: 1px solid #e5e7eb;
        padding-left: 0;
        padding-top: 18px;
    }

    .final-result-adjustment {
        border-top: 1px solid #e5e7eb;
        padding-top: 18px;
    }

}

/* =========================================================
   MOKINIO REZULTATAS – VIENAS STULPELIS
   ========================================================= */

.student-final-result-single {
    width: 100%;
    box-sizing: border-box;
    margin: 25px 0 20px;
    padding: 28px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
}

.student-final-result-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 25px;
    text-align: center;
}

.student-final-result-main {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 22px;
    padding-bottom: 25px;
    border-bottom: 1px solid #e5e7eb;
}

.final-result-points,
.final-result-grade {
    text-align: center;
}

.final-result-points > span,
.final-result-grade > span {
    display: block;
    color: #6b7280;
    font-size: 14px;
    margin-bottom: 7px;
}

.final-result-points > strong {
    display: block;
    font-size: 32px;
    line-height: 1.2;
}

.final-result-points > strong small {
    font-size: 18px;
    font-weight: 500;
    color: #6b7280;
}

.final-result-grade > strong {
    display: block;
    font-size: 48px;
    line-height: 1;
}

.student-rounded-grade {
    display: block;
    margin-top: 10px;
    color: #6b7280;
    font-size: 14px;
}

.student-rounded-grade strong {
    color: #111827;
    font-size: 22px;
    margin-left: 4px;
}

.student-result-details {
    margin-top: 20px;
}

.student-result-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 11px 0;
    border-bottom: 1px solid #f0f0f0;
}

.student-result-detail-row:last-child {
    border-bottom: 0;
}

.student-result-detail-row span {
    color: #6b7280;
}

.student-result-detail-row strong {
    color: #111827;
}

.student-adjustment-positive {
    color: #15803d !important;
}

.student-adjustment-negative {
    color: #dc2626 !important;
}


/* =========================================================
   MOKYTOJO KOMENTARAS
   ========================================================= */

.student-teacher-comment {
    width: 100%;
    box-sizing: border-box;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 20px 24px;
    margin-bottom: 25px;
}

.student-teacher-comment-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 8px;
}

.student-teacher-comment-text {
    color: #374151;
    line-height: 1.55;
}


/* =========================================================
   MOKINIO REZULTATO ANTRAŠTĖ
   ========================================================= */

.published-result-card {
    margin-bottom: 0;
}

.published-result-card .student-result-info {
    margin-top: 25px;
}


/* =========================================================
   MOBILUS VAIZDAS
   ========================================================= */

@media (max-width: 600px) {

    .student-final-result-single {
        padding: 22px 18px;
    }

    .student-final-result-title {
        font-size: 18px;
    }

    .final-result-points > strong {
        font-size: 28px;
    }

    .final-result-grade > strong {
        font-size: 42px;
    }

    .student-result-detail-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }

}

/* =========================================================
   MOKINIO REZULTATAS – VIENAS STULPELIS
   ========================================================= */

.student-final-result-single {
    width: 100%;
    box-sizing: border-box;
    margin: 25px 0 20px;
    padding: 28px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
}

.student-final-result-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 25px;
    text-align: center;
}

.student-final-result-main {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 22px;
    padding-bottom: 25px;
    border-bottom: 1px solid #e5e7eb;
}

.final-result-points,
.final-result-grade {
    text-align: center;
}

.final-result-points > span,
.final-result-grade > span {
    display: block;
    color: #6b7280;
    font-size: 14px;
    margin-bottom: 7px;
}

.final-result-points > strong {
    display: block;
    font-size: 32px;
    line-height: 1.2;
}

.final-result-points > strong small {
    font-size: 18px;
    font-weight: 500;
    color: #6b7280;
}

.final-result-grade > strong {
    display: block;
    font-size: 48px;
    line-height: 1;
}

.student-rounded-grade {
    display: block;
    margin-top: 10px;
    color: #6b7280;
    font-size: 14px;
}

.student-rounded-grade strong {
    color: #111827;
    font-size: 22px;
    margin-left: 4px;
}

.student-result-details {
    margin-top: 20px;
}

.student-result-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 11px 0;
    border-bottom: 1px solid #f0f0f0;
}

.student-result-detail-row:last-child {
    border-bottom: 0;
}

.student-result-detail-row span {
    color: #6b7280;
}

.student-result-detail-row strong {
    color: #111827;
}

.student-adjustment-positive {
    color: #15803d !important;
}

.student-adjustment-negative {
    color: #dc2626 !important;
}


/* =========================================================
   MOKYTOJO KOMENTARAS
   ========================================================= */

.student-teacher-comment {
    width: 100%;
    box-sizing: border-box;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 20px 24px;
    margin-bottom: 25px;
}

.student-teacher-comment-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 8px;
}

.student-teacher-comment-text {
    color: #374151;
    line-height: 1.55;
}


/* =========================================================
   PASKELBTO REZULTATO KORTELĖ
   ========================================================= */

.published-result-card {
    margin-bottom: 0;
}

.published-result-card .student-result-info {
    margin-top: 25px;
}


/* =========================================================
   MOBILUS VAIZDAS
   ========================================================= */

@media (max-width: 600px) {

    .student-final-result-single {
        padding: 22px 18px;
    }

    .student-final-result-title {
        font-size: 18px;
    }

    .final-result-points > strong {
        font-size: 28px;
    }

    .final-result-grade > strong {
        font-size: 42px;
    }

    .student-result-detail-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }

}

/* =========================================================
   MOKINIO REZULTATO PUSLAPIS – VIENAS STULPELIS
   ========================================================= */

.page-container:has(.published-result-card) {
    display: block;
    width: 100%;
    max-width: 900px;
    min-height: auto;
    margin: 0 auto;
    padding: 35px 20px 60px;
    box-sizing: border-box;
}

.page-container:has(.published-result-card) .test-card {
    width: 100%;
    max-width: none;
    box-sizing: border-box;
    margin: 0 0 20px;
}


/* Rezultato informacija */

.page-container:has(.published-result-card) .student-result-info {
    width: 100%;
}


/* Galutinis rezultatas */

.page-container:has(.published-result-card) .student-final-result-single {
    width: 100%;
    box-sizing: border-box;
    margin: 0 0 20px;
}


/* Mokytojo komentaras */

.page-container:has(.published-result-card) .student-teacher-comment {
    width: 100%;
    box-sizing: border-box;
    margin: 0 0 20px;
}


/* Atsakymų peržiūra */

.page-container:has(.published-result-card) .student-answer-review {
    width: 100%;
    box-sizing: border-box;
    margin: 0;
}


/* Klausimai */

.page-container:has(.published-result-card) .student-review-question {
    width: 100%;
    box-sizing: border-box;
}


/* =========================================================
   JEIGU NARŠYKLĖJE :has() NEVEIKTŲ
   ========================================================= */

.published-result-page {
    display: block !important;
    width: 100% !important;
    max-width: 900px !important;
    min-height: auto !important;
    margin: 0 auto !important;
    padding: 35px 20px 60px !important;
    box-sizing: border-box;
}

.published-result-page .test-card,
.published-result-page .student-final-result,
.published-result-page .student-teacher-comment,
.published-result-page .student-answer-review {
    width: 100%;
    max-width: none;
    box-sizing: border-box;
}


/* =========================================================
   MOBILUS VAIZDAS
   ========================================================= */

@media (max-width: 700px) {

    .page-container:has(.published-result-card),
    .published-result-page {
        padding: 20px 10px 40px !important;
    }

}