* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background: linear-gradient(162deg, #f3f6fb 0%, #e7f0ff 100%);
    color: #0f172a;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

.test-session {
    width: min(1080px, 95vw);
    margin: 1.25rem auto 2.4rem;
    display: grid;
    gap: 0.9rem;
}

.test-session__head,
.test-session__toolbar,
.test-session__form {
    background: #fff;
    border: 1px solid #dbe6ff;
    border-radius: 14px;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
}

.test-session__head {
    padding: 1rem 1.2rem;
}

.test-session__head h1 {
    margin: 0;
    font-size: clamp(1.25rem, 2.3vw, 1.75rem);
}

.test-session__head p {
    margin: 0.4rem 0 0;
    color: #486083;
}

.test-session__toolbar {
    padding: 0.75rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.8rem;
}

.profile-badge {
    font-weight: 700;
    color: #1a3e6f;
}

.test-session__form {
    padding: 1rem;
    display: grid;
    gap: 0.95rem;
}

.form-section {
    border: 1px solid #e4ecfa;
    border-radius: 12px;
    padding: 0.85rem;
    display: grid;
    gap: 0.7rem;
}

.form-section h2 {
    margin: 0;
    font-size: 1.08rem;
    color: #173a66;
}

.grid {
    display: grid;
    gap: 0.8rem;
}

.grid--2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-span-2 {
    grid-column: 1 / -1;
}

label {
    display: grid;
    gap: 0.35rem;
}

label span {
    font-size: 0.9rem;
    color: #334155;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    padding: 0.62rem 0.72rem;
    font-size: 0.96rem;
    background: #fff;
    color: #0f172a;
}

textarea {
    resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
    outline: 2px solid #a8c2ef;
    border-color: #6a92d2;
}

.modules-grid {
    display: grid;
    gap: 0.55rem;
}

.module-card {
    border: 1px solid #dbe6ff;
    border-radius: 12px;
    background: #f8fbff;
    overflow: hidden;
}

.module-card.is-open {
    border-color: #adc4ea;
}

.module-head {
    width: 100%;
    border: 0;
    background: #ecf4ff;
    color: #1b406d;
    padding: 0.72rem 0.85rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
}

.module-head-icon {
    font-size: 1.1rem;
    line-height: 1;
}

.module-body {
    padding: 0.65rem;
    display: grid;
    gap: 0.5rem;
}

.module-body[hidden] {
    display: none !important;
}

.check-row {
    border: 1px solid #dbe6ff;
    border-radius: 10px;
    background: #fff;
    padding: 0.55rem;
    display: grid;
    gap: 0.45rem;
}

.check-row.status-pass {
    border-color: #7bcf9f;
    background: #eefbf3;
}

.check-row.status-fail {
    border-color: #f2a7a7;
    background: #fff2f2;
}

.check-text {
    font-size: 0.94rem;
    line-height: 1.36;
    color: #223756;
}

.check-actions {
    display: flex;
    gap: 0.45rem;
}

.check-btn {
    min-width: 38px;
    height: 32px;
    border: 1px solid #c5d5ee;
    border-radius: 9px;
    font-weight: 700;
    cursor: pointer;
    background: #f5f8fe;
    color: #2f476b;
}

.check-btn--pass:hover {
    background: #dff6e8;
    border-color: #6ac18f;
}

.check-btn--fail:hover {
    background: #ffe3e3;
    border-color: #df8585;
}

.check-meta {
    min-height: 1.1rem;
}

.check-bug {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.16rem 0.5rem;
    font-size: 0.82rem;
    font-weight: 700;
    background: #ffe5e5;
    color: #a82a2a;
    border: 1px solid #efb0b0;
}

.form-section--actions {
    gap: 0.5rem;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.btn {
    border: 0;
    border-radius: 999px;
    padding: 0.58rem 1rem;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.9rem;
}

.btn--primary {
    background: #1558b0;
    color: #fff;
}

.btn--ghost {
    background: #eef3fb;
    color: #213654;
}

.btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.status-message,
.previous-reports {
    margin: 0;
    font-size: 0.92rem;
}

.status-message[data-type="success"] {
    color: #166534;
}

.status-message[data-type="error"] {
    color: #b91c1c;
}

.status-message[data-type="info"] {
    color: #334155;
}

.profile-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.52);
    display: grid;
    place-items: center;
    z-index: 9999;
    padding: 1rem;
}

.profile-modal {
    width: min(520px, 94vw);
    background: #fff;
    border-radius: 14px;
    border: 1px solid #dbe6ff;
    padding: 1rem;
}

.profile-modal h2 {
    margin: 0 0 0.3rem;
}

.profile-modal p {
    margin: 0 0 0.8rem;
    color: #4b5f80;
    line-height: 1.4;
}

.profile-modal form {
    display: grid;
    gap: 0.45rem;
}

.profile-modal button {
    border: 0;
    border-radius: 10px;
    padding: 0.62rem 0.7rem;
    background: #1558b0;
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}

.profile-error {
    margin: 0;
    color: #b91c1c;
    min-height: 1.2rem;
    font-size: 0.86rem;
}

@media (max-width: 820px) {
    .grid--2 {
        grid-template-columns: 1fr;
    }
}
