.test-auth-panel {
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 460px;
    padding: 56px 20px;
    background:
        linear-gradient(135deg, rgba(0, 48, 69, 0.96), rgba(0, 152, 218, 0.76)),
        repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.07) 0 3px, transparent 3px 14px);
}

.test-auth-card {
    box-sizing: border-box;
    display: block;
    width: 100%;
    max-width: 640px;
    margin: 0 auto;
    overflow: hidden;
    border: 0;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 22px 50px rgba(0, 48, 69, 0.28);
}

.test-auth-title {
    box-sizing: border-box;
    margin: 0;
    padding: 40px 28px 24px;
    border-bottom: 1px solid #ececec;
    color: #333;
    font-size: 34px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    text-transform: uppercase;
}

.test-auth-subtitle {
    box-sizing: border-box;
    padding: 18px 36px 0;
    color: #6f6f6f;
    font-size: 15px;
    line-height: 1.45;
    text-align: center;
}

.test-auth-body {
    box-sizing: border-box;
    padding: 34px 46px 42px;
}

.test-auth-error {
    box-sizing: border-box;
    margin: 0 0 22px;
    padding: 13px 16px;
    border-left: 4px solid #c01818;
    border-radius: 4px;
    background: #fff1f1;
    color: #c01818;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.35;
}

.test-auth-success {
    box-sizing: border-box;
    margin: 0 0 22px;
    padding: 13px 16px;
    border-left: 4px solid #159447;
    border-radius: 4px;
    background: #effaf3;
    color: #159447;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.35;
}

.test-auth-field {
    box-sizing: border-box;
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 44px;
    margin: 0 0 24px;
    padding: 0 20px;
    border-radius: 999px;
    background: #ededed;
}

.test-auth-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    min-width: 30px;
    color: var(--main-color);
    font-size: 15px;
    font-weight: 700;
}

.test-auth-field input {
    box-sizing: border-box;
    display: block;
    width: 100%;
    min-width: 0;
    height: 44px;
    border: 0;
    outline: none;
    background: transparent;
    color: #333;
    font-size: 16px;
}

.test-auth-field input::placeholder {
    color: #8a8a8a;
}

.test-auth-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-top: 4px;
}

.test-auth-remember {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #333;
    font-size: 15px;
    cursor: pointer;
}

.test-auth-remember input {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: var(--main-color);
}

.test-auth-submit {
    box-sizing: border-box;
    min-width: 122px;
    padding: 13px 28px;
    border: 0;
    border-radius: 999px;
    background: var(--main-color);
    color: #fff;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    text-transform: uppercase;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.test-auth-submit:hover,
.test-auth-submit:focus {
    background: var(--main-color-dark);
    transform: translateY(-1px);
}

.test-auth-links {
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
    margin-top: 30px;
    color: #777;
    font-size: 15px;
}

.test-auth-links a {
    color: var(--main-color);
    text-decoration: none;
}

.test-auth-links a:hover,
.test-auth-links a:focus {
    text-decoration: underline;
}

.test-register-panel {
    box-sizing: border-box;
    display: flex;
    justify-content: center;
    width: 100%;
    padding: 32px 20px 64px;
}

.test-register-card {
    box-sizing: border-box;
    width: 100%;
    max-width: 760px;
    margin: 0 auto;
    overflow: hidden;
    border: 1px solid #d7d7d7;
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 18px 38px rgba(0, 48, 69, 0.13);
}

.test-register-title {
    box-sizing: border-box;
    margin: 0;
    padding: 28px 34px;
    border-bottom: 1px solid #ededed;
    color: #333;
    font-size: 28px;
    line-height: 1.2;
    text-transform: uppercase;
}

.test-register-error {
    margin: 20px 34px 4px;
    padding: 13px 16px;
    border-left: 4px solid #c01818;
    background: #fff1f1;
    color: #c01818;
    font-weight: 700;
}

.test-register-error[hidden] {
    display: none;
}

.test-register-row {
    box-sizing: border-box;
    position: relative;
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr) 28px;
    align-items: center;
    gap: 16px;
    width: 100%;
    padding: 10px 34px;
}

.test-register-row:first-of-type {
    padding-top: 26px;
}

.test-register-row span {
    color: #111;
    font-size: 15px;
    font-weight: 700;
}

.test-register-row input {
    box-sizing: border-box;
    display: block;
    width: 100%;
    min-width: 0;
    height: 38px;
    padding: 8px 11px;
    border: 1px solid #bdbdbd;
    outline: none;
    background: #fff;
    color: #111;
    font-size: 15px;
}

.test-register-row input:focus {
    border-color: var(--main-color);
    box-shadow: 0 0 0 2px rgba(0, 152, 218, 0.16);
}

.test-password-control {
    position: relative;
    display: block;
    width: 100%;
    min-width: 0;
}

.test-password-control input {
    padding-right: 48px;
}

.test-password-toggle {
    position: absolute;
    top: 2px;
    right: 3px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    outline: none;
    background: transparent;
    cursor: pointer;
}

.test-password-toggle:hover,
.test-password-toggle:focus {
    background: #e8f5fb;
}

.test-password-toggle-icon {
    position: relative;
    display: block;
    box-sizing: border-box;
    width: 21px;
    height: 14px;
    border: 2px solid #666;
    border-radius: 50%;
}

.test-password-toggle-icon:before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #666;
    transform: translate(-50%, -50%);
}

.test-password-toggle.is-visible .test-password-toggle-icon:after {
    content: "";
    position: absolute;
    top: 4px;
    left: -4px;
    width: 25px;
    height: 2px;
    border-radius: 2px;
    background: #666;
    box-shadow: 0 0 0 2px #fff;
    transform: rotate(-42deg);
}

.test-register-row.is-error input {
    border-color: #c01818;
    background: #fff6f6;
    box-shadow: 0 0 0 2px rgba(192, 24, 24, 0.12);
}

.test-register-row:after {
    content: "";
    color: var(--main-color);
    font-size: 18px;
    font-weight: 700;
}

.test-register-row.is-filled:after {
    content: "✓";
}

.test-register-row.is-error:after {
    content: "×";
    color: #c01818;
}

.test-register-footer {
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-top: 24px;
    padding: 22px 34px;
    background: #eee;
}

.test-register-footer button {
    box-sizing: border-box;
    padding: 12px 26px;
    border: 0;
    border-radius: 999px;
    background: var(--main-color);
    color: #fff;
    cursor: pointer;
    font-size: 15px;
    font-weight: 700;
}

.test-register-footer button:hover,
.test-register-footer button:focus {
    background: var(--main-color-dark);
}

.test-register-footer a {
    color: var(--main-color);
    text-decoration: none;
}

.test-register-footer a:hover,
.test-register-footer a:focus {
    text-decoration: underline;
}

.gpm-kicker {
    margin-bottom: 8px;
    color: var(--main-color);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
}

.gpm-start-card,
.gpm-result-card {
    box-sizing: border-box;
    width: 100%;
    max-width: 920px;
    margin: 0 auto 48px;
    padding: 34px;
    border-radius: 8px;
    background: #f3f3f3;
    box-shadow: 0 16px 34px rgba(0, 48, 69, 0.12);
}

.gpm-start-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    border-left: 6px solid var(--main-color);
}

.gpm-start-card h2,
.gpm-result-card h2,
.gpm-test-toolbar h2 {
    margin: 0;
    color: #333;
    font-size: 26px;
    line-height: 1.25;
    text-transform: uppercase;
}

.gpm-start-card p,
.gpm-result-card p {
    max-width: 660px;
    margin: 16px 0 0;
    color: #555;
    font-size: 16px;
}

.gpm-user-line,
.gpm-result-date {
    margin-top: 16px;
    color: #333;
    font-weight: 700;
}

.gpm-logout-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
    padding: 8px 16px;
    border-radius: 999px;
    background: #e6e6e6;
    color: #333;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.gpm-logout-button:hover,
.gpm-logout-button:focus {
    background: var(--main-color-dark);
    color: #fff;
}

.gpm-start-button,
.gpm-finish-button {
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 180px;
    padding: 14px 28px;
    border: 0;
    border-radius: 999px;
    background: var(--main-color);
    color: #fff;
    cursor: pointer;
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    text-transform: uppercase;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.gpm-start-button:hover,
.gpm-start-button:focus,
.gpm-finish-button:hover,
.gpm-finish-button:focus {
    background: var(--main-color-dark);
    transform: translateY(-1px);
}

.gpm-test-toolbar {
    position: sticky;
    top: 90px;
    z-index: 4;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 28px;
    padding: 20px 24px;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(0, 48, 69, 0.16);
}

.gpm-timer {
    min-width: 116px;
    padding: 12px 18px;
    border-radius: 999px;
    background: var(--main-color-dark);
    color: #fff;
    font-size: 24px;
    font-weight: 700;
    text-align: center;
}

.gpm-test-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

.gpm-test-actions .gpm-logout-button {
    margin-bottom: 0;
}

.gpm-test-form {
    width: 100%;
}

.gpm-question {
    box-sizing: border-box;
    margin: 0 0 22px;
    padding: 24px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #f7f7f7;
}

.gpm-question legend {
    box-sizing: border-box;
    width: 100%;
    padding: 0 0 14px;
    color: #222;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.45;
}

.gpm-answer-list {
    display: grid;
    gap: 10px;
}

.gpm-answer {
    box-sizing: border-box;
    display: grid;
    grid-template-columns: 22px 34px 1fr;
    align-items: start;
    gap: 10px;
    padding: 13px 14px;
    border-radius: 6px;
    background: #fff;
    color: #333;
    cursor: pointer;
    line-height: 1.45;
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.gpm-answer:hover {
    background: #eef8fd;
    box-shadow: inset 0 0 0 1px rgba(0, 152, 218, 0.22);
}

.gpm-answer input {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--main-color);
}

.gpm-answer-key {
    color: var(--main-color);
    font-weight: 700;
}

.gpm-finish-panel {
    position: sticky;
    bottom: 0;
    display: flex;
    justify-content: flex-end;
    margin-top: 22px;
    padding: 18px 0 8px;
    background: linear-gradient(to top, #fff 70%, rgba(255, 255, 255, 0));
}

.gpm-finish-button {
    background: var(--color-accent);
    color: #222;
}

.gpm-finish-button:hover,
.gpm-finish-button:focus {
    background: var(--color-accent-dark);
}

.gpm-result-card {
    text-align: center;
}

.gpm-result-card.is-passed {
    border-top: 8px solid #159447;
}

.gpm-result-card.is-failed {
    border-top: 8px solid #c01818;
}

.gpm-result-percent {
    margin-bottom: 12px;
    font-size: 56px;
    font-weight: 700;
    line-height: 1;
}

.gpm-result-card.is-passed .gpm-result-percent,
.gpm-result-card.is-passed h2 {
    color: #159447;
}

.gpm-result-card.is-failed .gpm-result-percent,
.gpm-result-card.is-failed h2 {
    color: #c01818;
}

.gpm-result-card p {
    margin-left: auto;
    margin-right: auto;
}

.gpm-admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 24px;
    padding: 24px;
    border-left: 6px solid var(--main-color);
    border-radius: 8px;
    background: #f3f3f3;
    box-shadow: 0 14px 30px rgba(0, 48, 69, 0.1);
}

.gpm-admin-header h2 {
    margin: 0;
    color: #333;
    font-size: 26px;
    line-height: 1.25;
    text-transform: uppercase;
}

.gpm-admin-table-wrap {
    width: 100%;
    overflow-x: auto;
    margin-bottom: 48px;
    border: 1px solid #dedede;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 14px 30px rgba(0, 48, 69, 0.1);
}

.gpm-admin-table {
    width: 100%;
    min-width: 980px;
    border-collapse: collapse;
    color: #333;
    font-size: 14px;
}

.gpm-admin-table th,
.gpm-admin-table td {
    padding: 14px 16px;
    border-bottom: 1px solid #e7e7e7;
    text-align: left;
    vertical-align: top;
}

.gpm-admin-table th {
    background: var(--main-color-dark);
    color: #fff;
    font-weight: 700;
    white-space: nowrap;
}

.gpm-admin-table tr:nth-child(even) td {
    background: #f8f8f8;
}

.gpm-admin-small {
    margin-top: 4px;
    color: #777;
    font-size: 12px;
}

.gpm-admin-message {
    box-sizing: border-box;
    margin: 0 0 18px;
    padding: 13px 16px;
    border-radius: 4px;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.35;
}

.gpm-admin-message.is-success {
    border-left: 4px solid #159447;
    background: #effaf3;
    color: #159447;
}

.gpm-admin-message.is-error {
    border-left: 4px solid #c01818;
    background: #fff1f1;
    color: #c01818;
}

.gpm-admin-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 76px;
    padding: 7px 10px;
    border-radius: 999px;
    color: #fff;
    font-weight: 700;
}

.gpm-admin-status.is-passed {
    background: #159447;
}

.gpm-admin-status.is-failed {
    background: #c01818;
}

.gpm-admin-empty {
    color: #777;
    text-align: center !important;
}

.gpm-delete-form {
    margin: 0;
}

.gpm-delete-button {
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 92px;
    padding: 8px 12px;
    border: 0;
    border-radius: 999px;
    background: #c01818;
    color: #fff;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.gpm-delete-button:hover,
.gpm-delete-button:focus {
    background: #951111;
    transform: translateY(-1px);
}

@media (max-width: 768px) {
    .test-auth-panel {
        min-height: 0;
        padding: 32px 12px;
    }

    .test-auth-card {
        border-radius: 12px;
    }

    .test-auth-title {
        padding: 32px 18px 20px;
        font-size: 26px;
    }

    .test-auth-subtitle {
        padding: 16px 18px 0;
    }

    .test-auth-body {
        padding: 26px 18px 32px;
    }

    .test-auth-row {
        align-items: stretch;
        flex-direction: column;
    }

    .test-auth-submit {
        width: 100%;
    }

    .test-auth-links {
        gap: 12px;
    }

    .test-register-panel {
        padding: 24px 12px 48px;
    }

    .test-register-title {
        padding: 24px 18px;
        font-size: 23px;
    }

    .test-register-error {
        margin: 18px 18px 0;
    }

    .test-register-row {
        grid-template-columns: 1fr;
        gap: 8px;
        padding: 11px 48px 11px 18px;
    }

    .test-register-row:after {
        position: absolute;
        right: 20px;
        bottom: 19px;
    }

    .test-register-footer {
        align-items: stretch;
        flex-direction: column;
        padding: 18px;
    }

    .gpm-start-card {
        align-items: stretch;
        flex-direction: column;
        padding: 24px 18px;
    }

    .gpm-start-card h2,
    .gpm-result-card h2,
    .gpm-test-toolbar h2,
    .gpm-admin-header h2 {
        font-size: 21px;
        line-height: 1.3;
        word-break: break-word;
    }

    .gpm-start-card p,
    .gpm-result-card p {
        font-size: 14px;
    }

    .gpm-start-button,
    .gpm-finish-button {
        width: 100%;
    }

    .gpm-test-toolbar {
        position: static;
        align-items: stretch;
        flex-direction: column;
        padding: 18px;
    }

    .gpm-test-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .gpm-timer {
        width: 100%;
        box-sizing: border-box;
    }

    .gpm-question {
        padding: 18px 14px;
    }

    .gpm-question legend {
        font-size: 15px;
        line-height: 1.45;
    }

    .gpm-answer {
        grid-template-columns: 22px 28px 1fr;
        padding: 12px;
        font-size: 14px;
    }

    .gpm-finish-panel {
        position: static;
    }

    .gpm-result-card {
        padding: 26px 18px;
    }

    .gpm-result-percent {
        font-size: 44px;
    }

    .gpm-admin-header {
        align-items: stretch;
        flex-direction: column;
        padding: 20px 16px;
    }

    .gpm-admin-table-wrap {
        overflow: visible;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
    }

    .gpm-admin-table,
    .gpm-admin-table thead,
    .gpm-admin-table tbody,
    .gpm-admin-table tr,
    .gpm-admin-table td {
        display: block;
        width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }

    .gpm-admin-table thead {
        display: none;
    }

    .gpm-admin-table tr {
        overflow: hidden;
        margin-bottom: 14px;
        border: 1px solid #dedede;
        border-radius: 8px;
        background: #fff;
        box-shadow: 0 10px 24px rgba(0, 48, 69, 0.08);
    }

    .gpm-admin-table tr:nth-child(even) td {
        background: #fff;
    }

    .gpm-admin-table td {
        position: relative;
        min-height: 44px;
        padding: 12px 14px 12px 42%;
        border-bottom: 1px solid #ececec;
        font-size: 13px;
        line-height: 1.4;
        word-break: break-word;
    }

    .gpm-admin-table td:before {
        content: attr(data-label);
        position: absolute;
        top: 12px;
        left: 14px;
        width: 34%;
        color: #333;
        font-weight: 700;
    }

    .gpm-admin-table td:last-child {
        border-bottom: 0;
    }

    .gpm-admin-empty {
        padding: 18px !important;
    }

    .gpm-admin-empty:before {
        display: none;
    }
}

@media (max-width: 420px) {
    .test-auth-title {
        font-size: 23px;
    }

    .test-auth-body {
        padding-left: 14px;
        padding-right: 14px;
    }

    .test-auth-field {
        padding-left: 14px;
        padding-right: 14px;
    }

    .gpm-admin-table td {
        padding-left: 14px;
    }

    .gpm-admin-table td:before {
        position: static;
        display: block;
        width: auto;
        margin-bottom: 5px;
    }
}
