.app-loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: none;
    background: rgba(33, 37, 41, 0.45);
    backdrop-filter: blur(2px);
}

.app-loading-overlay.is-active {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.app-loading-card {
    width: min(560px, 100%);
    padding: 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.app-loading-title {
    margin: 0 0 6px;
    font-size: 16px;
    font-weight: 600;
}

.app-loading-subtitle {
    margin: 0 0 14px;
    color: #6c757d;
    font-size: 14px;
}

.app-progress-full {
    width: 100%;
}

.preserve-lines {
    white-space: pre-wrap;
}

.report-page {
    max-width: 1000px;
}

.reports-page {
    max-width: 1000px;
}

.min-w-0 {
    min-width: 0;
}

.report-next-step {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    max-width: 860px;
    margin: 0 auto 1.25rem;
    padding: 1.15rem 1.25rem;
    background: #fff;
    border: 1px solid #d8e0de;
    border-left: 4px solid #10585a;
    border-radius: 6px;
    box-shadow: 0 10px 28px rgba(22, 52, 53, 0.07);
}

.report-next-step form {
    flex-shrink: 0;
    max-width: 48%;
}

.report-next-step .btn {
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
}

.report-flow-complete {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    max-width: 860px;
    margin: 0 auto 1.25rem;
    padding: 0.9rem 1.1rem;
    color: #2f7049;
    font-size: 0.9rem;
    font-weight: 650;
    background: #edf7f0;
    border: 1px solid #bfddc8;
    border-radius: 6px;
}

.report-back-link {
    color: #4b5c5d;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
}

.report-back-link:hover {
    color: #0b3f40;
}

.report-document {
    max-width: 860px;
    margin: 0 auto;
    overflow: hidden;
    overflow-wrap: anywhere;
    color: #1c2b2d;
    background: #fff;
    border: 1px solid #dfe6e4;
    border-radius: 8px;
    box-shadow: 0 22px 55px rgba(22, 52, 53, 0.1);
}

.report-header {
    padding: 3.5rem 3.75rem 0;
}

.report-eyebrow {
    display: block;
    margin-bottom: 0.9rem;
    color: #10585a;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.report-header h2 {
    margin: 0 0 0.45rem;
    color: #0b3f40;
    font-size: clamp(1.65rem, 4vw, 2.15rem);
    font-weight: 750;
    letter-spacing: -0.025em;
    line-height: 1.15;
    text-transform: uppercase;
}

.report-header p {
    margin: 0;
    color: #4b5c5d;
    font-size: 0.96rem;
    font-style: italic;
}

.report-title-rule {
    height: 3px;
    margin-top: 1.2rem;
    background: #10585a;
}

.report-body {
    padding: 1.5rem 3.75rem 3rem;
}

.report-identity-table {
    margin: 0;
    overflow: hidden;
    border: 1px solid #d8e0de;
    border-radius: 4px;
}

.report-identity-table > div {
    display: grid;
    grid-template-columns: 9rem minmax(0, 1fr);
    margin: 0;
}

.report-identity-table > div:nth-child(odd) {
    background: #f2f6f5;
}

.report-identity-table > div + div {
    border-top: 1px solid #d8e0de;
}

.report-identity-table dt,
.report-identity-table dd {
    margin: 0;
    padding: 0.72rem 0.9rem;
    overflow-wrap: anywhere;
}

.report-identity-table dt {
    color: #0b3f40;
    font-size: 0.78rem;
    font-weight: 750;
    letter-spacing: 0.025em;
}

.report-identity-table dd {
    border-left: 1px solid #d8e0de;
    font-size: 0.9rem;
}

.report-disclaimer {
    display: flex;
    gap: 0.85rem;
    margin: 1.5rem 0 2.2rem;
    padding: 1.1rem 1.25rem;
    color: #5b4a1e;
    background: #fbf3e4;
    border: 1px solid #e6c77e;
    border-left: 4px solid #c58a2e;
    border-radius: 3px;
}

.report-disclaimer-icon {
    display: grid;
    flex: 0 0 24px;
    width: 24px;
    height: 24px;
    place-items: center;
    color: #fff;
    font-size: 0.78rem;
    font-weight: 800;
    background: #c58a2e;
    border-radius: 50%;
}

.report-disclaimer strong {
    display: block;
    margin-bottom: 0.22rem;
    font-size: 0.91rem;
}

.report-disclaimer p {
    margin: 0;
    font-size: 0.87rem;
    line-height: 1.55;
}

.report-content {
    counter-reset: report-section;
}

.report-content-heading {
    display: grid;
    grid-template-columns: 1.9rem minmax(0, 1fr);
    align-items: center;
    gap: 0.8rem;
    margin: 2.15rem 0 1.1rem;
    color: #0b3f40;
    font-size: 1.18rem;
    font-weight: 750;
    line-height: 1.3;
    counter-increment: report-section;
}

.report-content-heading:first-child {
    margin-top: 0;
}

.report-content-heading::before {
    display: grid;
    width: 1.75rem;
    height: 1.75rem;
    place-items: center;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 800;
    content: counter(report-section);
    background: #10585a;
    border-radius: 2px;
}

.report-content-heading.has-explicit-number::before {
    content: attr(data-section-number);
}

.report-content-heading::after {
    grid-column: 2;
    height: 1px;
    content: '';
    background: #d8e0de;
}

.report-content-subheading {
    margin: 1.65rem 0 0.7rem;
    color: #2f7049;
    font-size: 1.02rem;
    font-weight: 750;
    line-height: 1.4;
}

.report-content-subheading span {
    margin-right: 0.35rem;
}

.report-content-paragraph {
    margin: 0 0 0.85rem;
    color: #1c2b2d;
    font-size: 0.94rem;
    line-height: 1.72;
}

.report-content-paragraph strong,
.report-content-list strong,
.report-content-callout strong {
    color: #0b3f40;
    font-weight: 750;
}

.report-content-list {
    display: grid;
    gap: 0.55rem;
    margin: 0.4rem 0 1.2rem;
    padding-left: 1.4rem;
    color: #1c2b2d;
    font-size: 0.94rem;
    line-height: 1.62;
}

.report-content-list li::marker {
    color: #3f8f5f;
    font-weight: 750;
}

.report-content-callout {
    margin: 1.25rem 0;
    padding: 1rem 1.1rem;
    color: #273f3f;
    font-size: 0.91rem;
    line-height: 1.62;
    background: #f2f6f5;
    border-left: 4px solid #3f8f5f;
}

.report-table-scroll {
    margin: 1rem 0 1.5rem;
    overflow-x: auto;
    border: 1px solid #d8e0de;
    border-radius: 3px;
}

.report-table-scroll:focus-visible {
    outline: 3px solid rgba(16, 88, 90, 0.22);
    outline-offset: 3px;
}

.report-content-table {
    width: 100%;
    min-width: 520px;
    border-collapse: collapse;
    font-size: 0.84rem;
    line-height: 1.45;
}

.report-content-table th,
.report-content-table td {
    padding: 0.65rem 0.75rem;
    vertical-align: top;
    text-align: left;
    overflow-wrap: anywhere;
    border-right: 1px solid #d8e0de;
}

.report-content-table th:last-child,
.report-content-table td:last-child {
    border-right: 0;
}

.report-content-table thead {
    color: #fff;
    background: #10585a;
}

.report-content-table th {
    font-weight: 750;
}

.report-content-table tbody tr + tr {
    border-top: 1px solid #d8e0de;
}

.report-content-table tbody tr:nth-child(even) {
    background: #f2f6f5;
}

.report-content-table tbody td:first-child {
    color: #0b3f40;
    font-weight: 700;
}

.report-technical {
    margin-top: 2.4rem;
    color: #4b5c5d;
    border-top: 1px solid #d8e0de;
}

.report-technical summary {
    padding: 1rem 0;
    color: #4b5c5d;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
}

.report-technical dl {
    display: grid;
    gap: 0.75rem;
    margin: 0;
    padding: 0 0 0.5rem;
}

.report-technical dl > div {
    padding: 0.85rem 1rem;
    background: #f7f9f8;
}

.report-technical dt {
    margin-bottom: 0.25rem;
    color: #0b3f40;
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.report-technical dd {
    margin: 0;
    font-size: 0.82rem;
    line-height: 1.55;
    overflow-wrap: anywhere;
}

.report-footer {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 3.75rem;
    color: #687778;
    font-size: 0.74rem;
    font-style: italic;
    background: #f7f9f8;
    border-top: 1px solid #d8e0de;
}

.report-label {
    display: block;
    margin-bottom: 0.35rem;
    color: #526574;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.report-list-card {
    transition: transform 160ms ease, box-shadow 160ms ease;
}

.report-list-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(25, 46, 66, 0.12) !important;
}

.exam-group-card {
    overflow: hidden;
    border: 1px solid rgba(11, 63, 64, 0.08) !important;
}

.exam-group-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.25rem;
    padding: 1.35rem 1.5rem;
    background: linear-gradient(135deg, #f7faf9, #fff);
    border-bottom: 1px solid #dfe6e4;
}

.exam-filename {
    max-width: 620px;
    overflow: hidden;
    color: #687778;
    font-size: 0.78rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.exam-report-count {
    flex-shrink: 0;
    color: #0b3f40 !important;
    border: 1px solid #d8e0de;
}

.exam-report-list {
    margin: 0;
}

.exam-report-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    padding: 1rem 1.5rem;
    border-color: #e5ebe9;
}

.exam-report-summary {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    min-width: 0;
}

.exam-report-summary h3 {
    overflow-wrap: anywhere;
}

.exam-step-number {
    display: grid;
    flex: 0 0 30px;
    width: 30px;
    height: 30px;
    place-items: center;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 800;
    background: #10585a;
    border-radius: 50%;
}

.exam-report-actions {
    display: flex;
    flex-shrink: 0;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.report-file-icon,
.reports-empty-icon {
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    color: #fff;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    background: linear-gradient(135deg, #0b3f40, #10585a);
    border-radius: 12px;
}

.report-preview {
    display: -webkit-box;
    overflow: hidden;
    color: #667683;
    font-size: 0.9rem;
    line-height: 1.55;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.reports-empty-state {
    border-radius: 16px;
}

.reports-empty-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1.25rem;
    border-radius: 16px;
}

@media (max-width: 767.98px) {
    .report-next-step,
    .exam-group-header,
    .exam-report-row {
        align-items: stretch;
        flex-direction: column;
    }

    .report-next-step form,
    .report-next-step .btn,
    .exam-report-actions,
    .exam-report-actions > *,
    .exam-report-actions .btn {
        width: 100%;
    }

    .report-next-step form {
        max-width: none;
    }

    .exam-filename {
        white-space: normal;
        overflow-wrap: anywhere;
    }

    .report-header {
        padding: 2rem 1.4rem 0;
    }

    .report-body {
        padding: 1.25rem 1.4rem 2rem;
    }

    .report-identity-table > div {
        grid-template-columns: 1fr;
    }

    .report-identity-table dd {
        padding-top: 0;
        border-left: 0;
    }

    .report-content-heading {
        grid-template-columns: 1.75rem minmax(0, 1fr);
        gap: 0.65rem;
        font-size: 1.05rem;
    }

    .report-footer {
        flex-direction: column;
        padding-right: 1.4rem;
        padding-left: 1.4rem;
    }
}

@media print {
    @page {
        size: A4;
        margin: 14mm;
    }

    nav,
    body > footer,
    .no-print,
    .app-loading-overlay {
        display: none !important;
    }

    body,
    main {
        display: block !important;
        min-height: auto !important;
        background: #fff !important;
    }

    .report-page {
        max-width: none;
        padding: 0 !important;
    }

    .report-document {
        max-width: none;
        overflow: visible;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .report-header {
        padding: 0 0 1.25rem;
    }

    .report-body {
        padding: 0;
    }

    .report-footer,
    .report-technical {
        display: none;
    }

    .report-content-heading,
    .report-content-subheading,
    .report-disclaimer,
    .report-content-callout,
    .report-content-table tr,
    .report-identity-table > div {
        break-inside: avoid;
    }

    .report-table-scroll {
        overflow: visible;
    }

    .report-content-table {
        min-width: 0;
    }
}
