html,
body {
    margin: 0;
    padding: 0;
    min-height: 100%;
    background: #f3f7fb !important;
    background-image: none !important;
    font-family: Arial, Helvetica, sans-serif;
    color: #243244;
    font-size: 15px;
}

body {
    overflow-x: hidden;
}

img[src*="up.png"],
td[background*="up.png"],
table[background*="up.png"] {
    background-image: none !important;
}

table {
    border-collapse: collapse;
}

a {
    color: #0d5ea8;
    text-decoration: none;
}

a:hover {
    color: #073e70;
    text-decoration: none;
}

.page {
    min-height: 100vh;
    background: #f3f7fb;
}

/* ШАПКА */
.nvsu-hero {
    display: block !important;
    width: calc(100% - 16px) !important;
    min-height: 150px !important;
    margin: 8px 8px 0 !important;
    padding: 0 !important;
    background:
        radial-gradient(circle at 82% 35%, rgba(80, 150, 220, 0.45) 0, transparent 320px),
        linear-gradient(120deg, #073b63 0%, #0a4d80 50%, #2c6fa9 100%) !important;
    border-radius: 0 0 24px 24px !important;
    color: #ffffff !important;
    box-shadow: 0 14px 32px rgba(19, 71, 120, 0.16) !important;
}

.nvsu-hero-inner {
    width: 100% !important;
    max-width: 1500px !important;
    min-height: 150px !important;
    margin: 0 auto !important;
    padding: 35px 80px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 60px !important;
    box-sizing: border-box !important;
}

.nvsu-hero-content {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    padding-right: 40px !important;
}

.nvsu-hero-content h1 {
    max-width: 920px !important;
    margin: 0 !important;
    color: #ffffff !important;
    font-size: 34px !important;
    line-height: 1.15 !important;
    font-weight: 800 !important;
    letter-spacing: -0.3px !important;
}

.nvsu-hero-content p,
.nvsu-info-small,
.nvsu-info-title {
    display: none !important;
}

.nvsu-hero-actions {
    width: 340px !important;
    flex: 0 0 340px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-end !important;
    gap: 10px !important;
}

.hero-university {
    display: block !important;
    width: 320px !important;
    padding: 18px 22px !important;
    border-radius: 15px !important;
    background: rgba(255, 255, 255, 0.15) !important;
    border: 1px solid rgba(255, 255, 255, 0.28) !important;
    color: #ffffff !important;
    font-size: 18px !important;
    line-height: 1.35 !important;
    font-weight: 800 !important;
    text-align: left !important;
    box-sizing: border-box !important;
}

.hero-button,
.logout-link {
    display: inline-block !important;
    min-width: 220px !important;
    margin: 0 !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    text-align: center !important;
    text-decoration: none !important;
    padding: 10px 16px !important;
    border-radius: 10px !important;
    background: rgba(255, 255, 255, 0.22) !important;
    border: 1px solid rgba(255, 255, 255, 0.34) !important;
    box-sizing: border-box !important;
}

.hero-button:hover,
.logout-link:hover {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.34) !important;
}

.nvsu-hero-right,
.nvsu-info-card {
    background: transparent !important;
    border: 0 !important;
    padding: 0 !important;
    width: auto !important;
    flex: none !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
}

/* ВЕРХНИЙ БЛОК ТЕСТА / ТАЙМЕР */
.test-header-box {
    max-width: 1400px;
    margin: 18px auto 0;
        padding: 0 62px 0 62px;
}

.test-header-box table {
    width: 100% !important;
    border-collapse: separate !important;
}

.test-header-box h1 {
    font-size: 24px !important;
    margin: 0 0 8px !important;
    color: #243244 !important;
    font-weight: 800 !important;
}

.test-header-box h2 {
    font-size: 22px !important;
    margin: 0 0 8px !important;
    color: #243244 !important;
    font-weight: 800 !important;
}

#tm {
    color: #0d5ea8 !important;
    font-weight: 900 !important;
}
 

.test-header-box a:hover {
    background: #d4e7ff;
    color: #073e70 !important;
}

/* КОНТЕНТ */
.content-wrap {
    max-width: 1400px;
    margin: 22px auto 0;
    padding: 0 28px 70px;
}

.content-box {
    min-height: 430px;
    background: transparent;
}

/* ЛОГИН */
.login-layout {
    display: block;
}

.login-side-card {
    display: none !important;
}

.login-main-card {
    max-width: 520px;
    margin: 0 auto;
    padding: 28px 34px 34px;
    background: #ffffff;
    border: 1px solid #dbe5f0;
    border-radius: 16px;
    box-shadow: 0 16px 38px rgba(27, 72, 116, 0.09);
}

.login-main-card h2 {
    margin: 0 0 22px;
    color: #243244;
    font-size: 24px;
    line-height: 1.25;
    font-weight: 800;
}

.login-description {
    display: none !important;
}

.login-form {
    max-width: 390px;
}

.form-label {
    color: #243244;
    font-weight: 700;
}

.form-control {
    height: 48px;
    border-radius: 10px;
    border: 1px solid #d5dfeb;
    font-size: 15px;
}

.form-control:focus {
    border-color: #1b73c9;
    box-shadow: 0 0 0 0.18rem rgba(27, 115, 201, 0.18);
}

/* КНОПКИ */
.btn-primary,
input[type="submit"],
input[type="button"],
button {
    background: #0d6efd;
    border-color: #0d6efd;
    color: #ffffff;
    border-radius: 12px;
    font-weight: 700;
    padding: 11px 22px;
}

.btn-primary:hover,
input[type="submit"]:hover,
input[type="button"]:hover,
button:hover {
    background: #075bbd;
    border-color: #075bbd;
}

/* ВОПРОСЫ */
.tableq,
.question-card,
form {
    background: #ffffff !important;
}

.content-box form[name="form1"] {
    max-width: 1300px;
    margin: 20px auto;
    padding: 32px 40px !important;
    background: #ffffff !important;
    border: 1px solid #dbe5f0 !important;
    border-radius: 20px !important;
    box-shadow:
        0 4px 12px rgba(0,0,0,.04),
        0 12px 32px rgba(13,94,168,.06) !important;
    box-sizing: border-box !important;
}

.tableq {
    max-width: 1300px;
    margin: 20px auto;
    background: #ffffff !important;
    border: 1px solid #dbe5f0 !important;
    border-radius: 20px;
    padding: 32px 40px !important;
    box-shadow:
        0 4px 12px rgba(0,0,0,.04),
        0 12px 32px rgba(13,94,168,.06);
}

.tableq td,
.content-box form[name="form1"] td {
    line-height: 1.65;
}

.tableq img,
.content-box form[name="form1"] img {
    max-width: 100%;
    height: auto;
}

/* Предыдущий / следующий вопрос */
.content-box form[name="form1"] table:first-child a,
a[href*="go_prev"],
a[href*="go_next"] {
    color: #7a8ba5 !important;
    font-size: 16px !important;
    font-weight: 500 !important;
    padding: 10px 16px;
    border-radius: 10px;
    background: #f5f8fc;
    text-decoration: none !important;
}

.content-box form[name="form1"] table:first-child a:hover,
a[href*="go_prev"]:hover,
a[href*="go_next"]:hover {
    background: #eaf3ff;
    color: #0d5ea8 !important;
}

form p {
    margin-top: 22px;
    margin-bottom: 22px;
    line-height: 1.7;
}

form input[type="radio"] {
    margin-left: 8px;
    margin-right: 6px;
}

.spinner-container {
    position: relative;
    display: inline-block;
    margin-top: 18px;
}

.spinner-container input[type="submit"] {
    min-width: 260px;
    height: 58px;
    font-size: 18px;
}

.tablehead {
    background: #eef6ff !important;
    color: #243244 !important;
    font-weight: 800;
}

.tablerow {
    background: #ffffff !important;
    color: #243244;
}

h1,
h2,
h3 {
    color: #243244;
    font-weight: 800;
}

.errorlogin {
    color: #c62828;
    font-size: 16px;
    font-weight: 800;
}

/* МОДАЛКА */
#closeQueryBackground {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.48);
    z-index: 9000;
}

#closeQuery {
    position: fixed;
    inset: 0;
    z-index: 9001;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.confirm-card {
    width: 100%;
    max-width: 430px;
    background: #ffffff;
    border-radius: 16px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.22);
}

.confirm-title {
    color: #243244;
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 10px;
}

.confirm-text {
    color: #697789;
    font-size: 16px;
    margin-bottom: 24px;
}

.confirm-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(1);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: transparent;
    border-top: 3px solid rgba(0, 0, 0, 0.2);
    border-right: 3px solid rgba(0, 0, 0, 0.2);
    border-bottom: 3px solid rgba(0, 0, 0, 0.8);
    border-left: 3px solid rgba(0, 0, 0, 0.8);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: translate(-50%, -50%) scale(1) rotate(0deg);
    }
    to {
        transform: translate(-50%, -50%) scale(1) rotate(360deg);
    }
}

/* АДАПТИВ */
@media (max-width: 900px) {
    .nvsu-hero {
        min-height: auto !important;
    }

    .nvsu-hero-inner {
        min-height: auto !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        padding: 30px 24px 34px !important;
        gap: 24px !important;
    }

    .nvsu-hero-content {
        padding-right: 0 !important;
    }

    .nvsu-hero-content h1 {
        font-size: 28px !important;
    }

    .nvsu-hero-actions {
        width: 100% !important;
        flex: auto !important;
        align-items: flex-start !important;
    }

    .hero-university,
    .hero-button,
    .logout-link {
        width: 100% !important;
    }

    .test-header-box,
    .content-wrap {
        padding: 0 12px;
    }

    .content-box form[name="form1"],
    .tableq {
        padding: 24px 18px !important;
    }
}


 
.test-header-box table:last-child td {
    display: block !important;
    width: auto !important;
    padding: 0 !important;
    background: transparent !important;
}

.test-header-box table:last-child a {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    min-width: 34px !important;
    height: 32px !important;
    padding: 0 8px !important;
    margin: 0 !important;

    background: transparent !important;
    border: 1px solid #0b4f83 !important;
    border-radius: 8px !important;

    color: #0b4f83 !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    text-decoration: none !important;
}

.test-header-box table:last-child a:hover {
    background: #eef6ff !important;
    color: #073b63 !important;
}

/* текущий вопрос — оставить заметным, но аккуратно */
.test-header-box table:last-child td[bgcolor="#FF9DA5"] a {
    border-color: #d94b5f !important;
    color: #d94b5f !important;
    background: #fff5f6 !important;
}

/* отвеченные вопросы — тонкая синяя рамка */
.test-header-box table:last-child td[bgcolor="#AED5FF"] a {
    border-color: #0b4f83 !important;
    color: #0b4f83 !important;
    background: transparent !important;
}


/* Блок таймера и номеров без белой подложки */
.test-header-box,
.test-header-box table,
.test-header-box tbody,
.test-header-box tr,
.test-header-box td {
    background: transparent !important;
}

/* Ряд номеров */
.test-header-box table:last-child tr {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 3px !important;
}

/* Ячейки */
.test-header-box table:last-child td {
    display: block !important;
    width: auto !important;
    padding: 0 !important;
    background: transparent !important;
}

/* Неотвеченные */
.test-header-box table:last-child a {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 34px !important;
    height: 26px !important;
    padding: 0 5px !important;
    margin: 0 !important;
    background: transparent !important;
    border: 1px solid #0b4f83 !important;
    border-radius: 8px !important;
    color: #0b4f83 !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    text-decoration: none !important;
}

/* Отвеченные */
.test-header-box table:last-child td[bgcolor="#AED5FF"] a {
    background: #0b5fa5 !important;
    border-color: #0b5fa5 !important;
    color: #ffffff !important;
}

/* Текущий вопрос */
.test-header-box table:last-child td[bgcolor="#FF9DA5"] a {
    background: #fff2f4 !important;
    border-color: #dc5065 !important;
    color: #dc5065 !important;
}

/* Наведение */
.test-header-box table:last-child a:hover {
    opacity: 0.85;
}

.time-expired-message {
    max-width: 1400px;
    margin: 24px auto 0;
    padding: 18px 24px;
    border-radius: 14px;
    background: #fff2f2;
    border: 1px solid #f0b4b4;
    color: #b42323;
    font-size: 20px;
    font-weight: 800;
}