.ics-json-input {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.85rem;
    min-height: 320px;
    white-space: pre;
    overflow-wrap: normal;
}

.ics-note {
    font-size: 0.8rem;
    color: #6c757d;
}

.ics-sub {
    font-weight: 600;
    margin: 1rem 0 0.25rem;
    font-size: 0.9rem;
}

.ics-row {
    display: flex;
    gap: 0.35rem;
    align-items: center;
    margin-bottom: 0.3rem;
}

.ics-row .form-control,
.ics-row .form-select {
    font-size: 0.9rem;
}

.ics-row .btn {
    flex-shrink: 0;
}

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

.ics-grid .form-label {
    margin-bottom: 0.1rem;
    font-size: 0.85rem;
}

.ics-step {
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    padding: 0.75rem;
    margin-bottom: 0.75rem;
    background: #fbfcfd;
}

.ics-step-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.ics-step-num {
    font-weight: 600;
    color: #6c757d;
}

.ics-step-body {
    border-top: 1px dashed #dee2e6;
    padding-top: 0.5rem;
}

/* TEST tab: scrollable grids with a frozen header */
.ics-test-grid {
    max-height: 420px;
    overflow: auto;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    background: #fff;
    margin-bottom: 0.5rem;
}

.ics-grid {
    font-size: 0.78rem;
    white-space: nowrap;
    margin-bottom: 0;
}

.ics-grid thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #eef1f4;
    font-weight: 600;
    vertical-align: bottom;
}

.ics-grid thead tr:nth-child(2) th {
    top: 1.6rem;
    background: #f7f9fa;
    font-weight: 500;
    color: #495057;
}

.ics-grid th,
.ics-grid td {
    max-width: 260px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ics-grid-num {
    text-align: right;
    color: #6c757d;
    background: #f8f9fa;
}

.ics-grid-kind {
    color: #6c757d;
}

.ics-grid-mapped {
    color: #0a58ca;
}

.ics-grid-unmapped {
    color: #adb5bd;
}

.ics-test-info th {
    font-weight: 600;
    white-space: nowrap;
}

/* TEST tab sheet grid: a DataGrid paged from the test's temporary database */
.ics-test-dg {
    height: 420px;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    background: #fff;
    margin-bottom: 0.5rem;
    font-size: 0.78rem;
}

.ics-test-dg .dg {
    height: 100%;
}

.ics-test-dg .dg-header {
    border-bottom: 1px solid #dee2e6;
    background: #eef1f4;
    font-weight: 600;
}

/* frozen columns must not show the white default through the tinted header */
.ics-test-dg .dg-header .dg-sticky-cell {
    background: #eef1f4;
}

.ics-test-dg .dc-cell {
    border-right: 1px solid #f0f2f4;
}

/* row roles in the sheet grid (classes set by renderTestKindCell) */
.ics-test-dg .dg-row.ics-raw-before .dc-cell {
    background: #f8f9fa;
    color: #8a939b;
}

.ics-test-dg .dg-row.ics-raw-noheader .dc-cell {
    background: #fff8e1;
}

.ics-test-dg .dg-row.ics-raw-header .dc-cell {
    background: #cfe2ff;
    font-weight: 600;
}

.ics-test-dg .dg-row.ics-raw-skip .dc-cell {
    background: #eceff1;
    color: #616a71;
}

.ics-test-dg .dg-row.ics-raw-end .dc-cell {
    background: #fff3cd;
    font-weight: 600;
}

.ics-test-dg .dg-row.ics-raw-error .dc-cell {
    background: #f8d7da;
    color: #58151c;
}

.ics-test-dg .dg-row.ics-raw-startmarker .dc-cell {
    box-shadow: inset 0 0 0 1px #0d6efd;
}

/* TEST tab: the "why did it fail" verdict and the header comparison tables */
.ics-verdict-head {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: baseline;
}

.ics-hdr-check td,
.ics-hdr-cells td {
    font-size: 0.8rem;
    vertical-align: middle;
    max-width: 420px;
    white-space: normal;
}

.ics-hdr-check th,
.ics-hdr-cells th {
    font-size: 0.78rem;
    white-space: nowrap;
}

.ics-hdr-missing {
    background: #fff5f5;
}

/* header text from the file, with its padding made visible */
.ics-hdr-text {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

/* Org settings tab: keep long values (e.g. JSON) on one line. */
.settings-value-cell {
    max-width: 360px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}