#main-content h5:first-of-type {
    margin-top: 1rem;
}

/* recognition summary (parse-preview), right of the paste textarea:
   count rows per group + clickable pills for unrecognised / unverifiable tokens.
   The column is deliberately narrow (col-lg-3 next to a col-lg-9 paste box,
   2026-11-23) — one line per group, «PL 12», nothing else. */
.wl-summary {
    min-height: 1.6rem;
    max-width: 15rem;
}

.wl-sum-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: .5rem;
    padding: .1rem 0;
    font-size: .85rem;
    border-bottom: 1px dashed #e9ecef;
}

.wl-sum-row .wl-sum-label {
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: .03em;
    font-size: .75rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wl-sum-row .wl-sum-val {
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    text-align: right;
    white-space: nowrap;
}

.wl-sum-pills {
    display: flex;
    flex-wrap: wrap;
    gap: .3rem;
    margin-top: .5rem;
}

.wl-pill {
    border-radius: 1rem;
    font-size: .72rem;
    padding: .1rem .5rem;
    line-height: 1.4;
}

.wl-pill .badge {
    font-size: .68rem;
}

.wl-pill-invalid {
    border: 1px solid #dc3545;
    color: #dc3545;
    background: #fff;
}

.wl-pill-invalid:hover,
.wl-pill-invalid.active {
    background: #fdecee;
    color: #dc3545;
}

.wl-pill-unqueued {
    border: 1px solid #fd7e14;
    color: #b85e0a;
    background: #fff;
}

.wl-pill-unqueued:hover,
.wl-pill-unqueued.active {
    background: #fff4e8;
    color: #b85e0a;
}

.wl-sum-list {
    margin-top: .5rem;
    /* fixed small window: a few tokens visible, the rest scrollable, so opening
       the unrecognised list never shifts the page layout */
    max-height: 4rem;
    overflow-y: auto;
    overscroll-behavior: contain;
    border: 1px solid #dee2e6;
    border-radius: .35rem;
    background: #fff;
    padding: .35rem .5rem;
    font-family: var(--bs-font-monospace);
    font-size: .78rem;
}

.wl-sum-item {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wl-sum-note {
    margin-top: .35rem;
    color: #6c757d;
    font-size: .75rem;
}

/* live progress strip (D10) */
.wl-progress-strip {
    padding: .4rem .75rem;
    border: 1px solid #dee2e6;
    border-radius: .35rem;
    background: #f8f9fa;
    font-size: .9rem;
}

.wl-progress-strip.running {
    border-color: #0d6efd;
    background: #eef5ff;
}

.wl-progress-strip .wl-err {
    color: #fd7e14;
    font-weight: 600;
}

/* grid status colours — workplan §M7: OK green / NOT red / ZW blue / ? yellow / BŁĄD orange / pending grey */
.wl-status-queued {
    color: #6c757d;
}

.wl-status-checking {
    color: #0d6efd;
    font-weight: 600;
}

.wl-status-ok {
    color: #198754;
    font-weight: 600;
}

.wl-status-not {
    color: #dc3545;
    font-weight: 600;
}

.wl-status-zw {
    color: #0dcaf0;
    font-weight: 600;
}

.wl-status-q {
    color: #b7950b;
    font-weight: 600;
}

.wl-status-error {
    color: #fd7e14;
    font-weight: 600;
}

.wl-status-invalid {
    color: #adb5bd;
    font-style: italic;
}

/* history + screenshot modal */
.wl-history tbody tr {
    cursor: pointer;
}

/* Actions column of «Raporty» (Podgląd • Excel • Zrzuty • Usuń) — equal gaps
   without display:flex on the <td>, which would take it out of the table
   layout; the cell stays a plain right-aligned, non-wrapping cell. */
.wl-row-actions {
    white-space: nowrap;
}

.wl-row-actions .btn + .btn {
    margin-left: .25rem;
}

/* «Nazwa» is editable in place (white_list.js: startNameEdit) — the hover ring is
   the same affordance the DataGrid gives its editable cells, so the list does not
   look like read-only text. */
.wl-name-cell {
    cursor: text;
    min-width: 10rem;
}

.wl-name-cell:hover {
    box-shadow: inset 0 0 0 1px var(--bs-primary-border-subtle, #9ec5fe);
    border-radius: .25rem;
}

.wl-name-placeholder {
    color: var(--bs-secondary-color, #6c757d);
    font-style: italic;
}

.wl-name-input {
    max-width: 22rem;
}

.wl-name-saving {
    opacity: .55;
}

/* Report preview modal (4_report_modal.html).
   The DataGrid is virtualized and sized from its container (.dg { height: 100% }),
   so the wrapper needs a definite height — measured while the dialog is hidden it
   would otherwise mount a 0-height row pool and show an empty table. white_list.js
   also calls grid.resize() on shown.bs.modal for the window being resized. */
/* Grid frozen while the next report loads (see openReport): rows still shown are
   the report the user just left, so clicks must not reach them. */
.wl-report-grid-wrap.wl-grid-loading {
    pointer-events: none;
    opacity: .55;
}

.wl-report-grid-wrap {
    height: min(60vh, 620px);
    min-height: 320px;
    border: 1px solid #dee2e6;
    border-radius: .35rem;
    overflow: hidden;
}

/* The screenshot viewer opens from a grid row inside the preview modal, so it has
   to stack above it (Bootstrap gives both the same z-index otherwise). */
#wlScreenModal {
    z-index: 1075;
}

#wlScreenModal .wl-screen-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

#wlScreenModal img {
    max-height: 75vh;
}

/* Screenshot viewer: message shown when the endpoint has no image (pruned or
   still-archived screen) — it replaces the broken-image glyph. */
.wl-screen-error {
    padding: 3rem 1rem;
    font-size: .95rem;
}