:root {
    font-family: Arial, Helvetica, sans-serif;
    color: #1f2a44;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: #f3f5f8;
    color: #1f2a44;
}

header,
footer {
    background: #2b3b57;
    color: #ffffff;
    padding: 1rem 1.25rem;
}

header h1 {
    margin: 0;
    font-size: 1.35rem;
    letter-spacing: 0.02em;
}

main {
    max-width: 920px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.card {
    background: #ffffff;
    border: 1px solid #d7deea;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 6px 16px rgba(22, 38, 68, 0.08);
}

h2 {
    margin-top: 0;
}

.subtitle {
    margin-top: -0.2rem;
    margin-bottom: 1.2rem;
    color: #4a5a75;
}

.field {
    margin-bottom: 1rem;
}

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

label {
    display: block;
    margin-bottom: 0.35rem;
    font-weight: 700;
}

input,
select {
    width: 100%;
    border: 1px solid #b7c3d8;
    border-radius: 6px;
    padding: 0.62rem 0.7rem;
    font-size: 0.95rem;
    background: #fff;
}

input:focus,
select:focus {
    outline: 2px solid #9db6ef;
    border-color: #7193df;
}

.hint {
    color: #576885;
}

.error {
    color: #a11d2a;
    margin-top: 0.4rem;
    margin-bottom: 0;
    font-size: 0.9rem;
}

.alert {
    border: 1px solid #d89a3d;
    background: #fff5e5;
    color: #6c4c16;
    padding: 0.85rem 0.95rem;
    border-radius: 6px;
    margin-bottom: 1rem;
}

.btn-primary {
    border: 0;
    border-radius: 6px;
    background: #1f4fa2;
    color: #ffffff;
    padding: 0.75rem 1.2rem;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
}

.btn-primary:hover {
    background: #183f82;
}

.instructions-list {
    padding-left: 1.1rem;
    line-height: 1.5;
}

.session-note {
    margin-top: 1.2rem;
    color: #37507a;
}

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

.participant-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding: 0.75rem;
    border: 1px solid #d7deea;
    border-radius: 6px;
    background: #f8faff;
}

.participant-summary p {
    margin: 0;
}

.example-box {
    border: 1px solid #bfd0ef;
    background: #f2f6ff;
    border-radius: 6px;
    padding: 1rem;
    margin: 1rem 0 1.2rem;
}

.example-box h3 {
    margin-top: 0;
    margin-bottom: 0.6rem;
    font-size: 1rem;
}

.example-box ul {
    margin-top: 0.4rem;
}

@media (max-width: 768px) {
    .participant-summary {
        grid-template-columns: 1fr;
    }
}

.test-card {
    max-width: 860px;
}

.progress-wrap {
    margin-bottom: 1rem;
}

.progress-label {
    margin: 0 0 0.4rem;
    color: #385078;
    font-weight: 700;
}

.progress-bar {
    width: 100%;
    height: 8px;
    border-radius: 999px;
    background: #dce6f7;
}

.progress-bar-fill {
    height: 100%;
    border-radius: 999px;
    background: #1f4fa2;
    width: 0;
    transition: width 0.2s ease;
}

.block-card {
    border: 1px solid #d7deea;
    border-radius: 8px;
    padding: 0.8rem;
    background: #fcfdff;
}

.activities-table {
    width: 100%;
    border-collapse: collapse;
}

.activities-table th,
.activities-table td {
    border-bottom: 1px solid #e5eaf4;
    padding: 0.6rem;
    text-align: left;
    vertical-align: top;
}

.activities-table .center {
    text-align: center;
    width: 90px;
}

.test-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}

.btn-secondary {
    border: 1px solid #7e92b7;
    border-radius: 6px;
    background: #ffffff;
    color: #2c436b;
    padding: 0.75rem 1.2rem;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
}

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

.test-alert {
    margin-bottom: 1rem;
}

.finish-form {
    margin-top: 1rem;
}

.alert-success {
    border-color: #5ca97a;
    background: #ebfaee;
    color: #1f6b3a;
}

.alert-danger {
    border-color: #d44f4f;
    background: #ffe9e9;
    color: #7e1f1f;
}

.result-card h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.7rem;
}

.result-meta-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem 1rem;
    border: 1px solid #d7deea;
    border-radius: 6px;
    background: #f8faff;
    padding: 0.9rem;
}

.result-meta-grid p {
    margin: 0;
}

.badge {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
}

.badge-valido {
    background: #dff4e5;
    color: #1e6b3b;
}

.badge-dudoso {
    background: #fff3cf;
    color: #7c5800;
}

.badge-invalido {
    background: #ffd9d9;
    color: #8f1f1f;
}

.results-table {
    width: 100%;
    border-collapse: collapse;
}

.results-table th,
.results-table td {
    border: 1px solid #e0e6f2;
    padding: 0.55rem 0.6rem;
    text-align: left;
}

.results-table thead th {
    background: #f2f6ff;
}

.ranking-list {
    margin-top: 0;
    line-height: 1.6;
}

.results-chart {
    border: 1px solid #d7deea;
    border-radius: 8px;
    padding: 0.8rem;
    background: #fcfdff;
}

.chart-row {
    display: grid;
    grid-template-columns: 230px 1fr 45px;
    gap: 0.7rem;
    align-items: center;
    margin-bottom: 0.5rem;
}

.chart-label {
    font-size: 0.88rem;
}

.chart-track {
    width: 100%;
    background: #e8eefb;
    border-radius: 999px;
    height: 12px;
    overflow: hidden;
}

.chart-bar {
    display: block;
    height: 100%;
    background: #2a62c9;
}

.chart-value {
    font-weight: 700;
    text-align: right;
}

.result-actions {
    margin-top: 1.4rem;
    display: flex;
    gap: 0.8rem;
}

.admin-card {
    max-width: 980px;
}

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

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

.admin-actions a {
    font-weight: 700;
    color: #1f4fa2;
    text-decoration: none;
}

.pagination {
    margin-top: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #d7deea;
    padding-top: 0.8rem;
}

.pagination a {
    text-decoration: none;
    color: #1f4fa2;
    font-weight: 700;
}

@media (max-width: 768px) {
    .result-meta-grid {
        grid-template-columns: 1fr;
    }

    .chart-row {
        grid-template-columns: 1fr;
        gap: 0.2rem;
    }

    .chart-value {
        text-align: left;
    }

    .admin-grid {
        grid-template-columns: 1fr;
    }

    .pagination {
        flex-direction: column;
        gap: 0.5rem;
    }
}

@media print {
    body {
        background: #ffffff;
    }

    header,
    footer,
    .no-print {
        display: none !important;
    }

    main {
        max-width: none;
        margin: 0;
        padding: 0;
    }

    .card {
        box-shadow: none;
        border: 0;
        padding: 0;
    }

    .results-table th,
    .results-table td {
        font-size: 12px;
    }
}
