.resource-launcher-lab {
    position: fixed;
    inset: 0;
    z-index: 12000;
    overflow-y: auto;
    background: #f5f7fa;
    color: #111827;
    padding: max(20px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) max(28px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
}

.resource-launcher-lab__header,
.resource-launcher-lab__section-heading,
.resource-launcher-lab__iframe-heading,
.resource-launcher-lab__url-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.resource-launcher-lab__header,
.resource-launcher-lab__toolbar,
.resource-launcher-lab__layout,
.resource-launcher-lab__section,
.resource-launcher-lab__iframe-wrap,
.resource-launcher-lab__report {
    width: min(1120px, 100%);
    margin-inline: auto;
}

.resource-launcher-lab__header {
    margin-bottom: 18px;
}

.resource-launcher-lab__header h1,
.resource-launcher-lab__section h2,
.resource-launcher-lab__iframe-wrap h2,
.resource-launcher-lab__report h2 {
    margin: 0;
    letter-spacing: 0;
}

.resource-launcher-lab__header h1 {
    font-size: 1.65rem;
}

.resource-launcher-lab__eyebrow {
    margin: 0 0 4px;
    color: #0b9274;
    font-size: .78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.resource-launcher-lab__icon-btn {
    width: 44px;
    height: 44px;
    border: 1px solid #d8dee8;
    border-radius: 8px;
    background: #fff;
    color: #4b5563;
    cursor: pointer;
}

.resource-launcher-lab__toolbar,
.resource-launcher-lab__section,
.resource-launcher-lab__iframe-wrap,
.resource-launcher-lab__report {
    border: 1px solid #dfe4ec;
    border-radius: 8px;
    background: #fff;
    padding: 18px;
}

.resource-launcher-lab__toolbar label {
    display: block;
    margin-bottom: 8px;
    font-weight: 800;
}

.resource-launcher-lab__url-row input,
.resource-launcher-lab__device-grid input,
.resource-launcher-lab__device-grid select,
.resource-launcher-lab__report-fields input,
.resource-launcher-lab__report-fields select {
    min-width: 0;
    height: 46px;
    border: 1px solid #cfd6e2;
    border-radius: 6px;
    padding: 0 12px;
    background: #fff;
    color: #111827;
    font: inherit;
}

.resource-launcher-lab__url-row input {
    flex: 1;
}

.resource-launcher-lab__device-grid,
.resource-launcher-lab__report-fields {
    display: grid;
    gap: 12px;
}

.resource-launcher-lab__device-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 14px;
}

.resource-launcher-lab__report-fields {
    grid-template-columns: minmax(180px, .55fr) minmax(0, 1.45fr);
    margin-bottom: 14px;
}

.resource-launcher-lab__device-grid label,
.resource-launcher-lab__report-fields label {
    min-width: 0;
}

.resource-launcher-lab__device-grid label > span,
.resource-launcher-lab__report-fields label > span {
    display: block;
    margin-bottom: 6px;
    color: #596579;
    font-size: .82rem;
    font-weight: 750;
}

.resource-launcher-lab__device-grid input,
.resource-launcher-lab__device-grid select,
.resource-launcher-lab__report-fields input,
.resource-launcher-lab__report-fields select {
    box-sizing: border-box;
    width: 100%;
}

.resource-launcher-lab button {
    min-height: 44px;
    border: 1px solid #cfd6e2;
    border-radius: 6px;
    background: #fff;
    color: #283241;
    padding: 9px 14px;
    font: inherit;
    font-weight: 750;
    cursor: pointer;
}

.resource-launcher-lab button:hover,
.resource-launcher-lab button:focus-visible {
    border-color: #ff5b35;
    outline: none;
}

.resource-launcher-lab button:disabled {
    cursor: not-allowed;
    opacity: .52;
}

.resource-launcher-lab__url-row button {
    border-color: #ff5b35;
    background: #ff5b35;
    color: #fff;
}

.resource-launcher-lab__validation,
.resource-launcher-lab__result {
    min-height: 22px;
    margin: 10px 0 0;
    color: #647084;
}

.resource-launcher-lab__validation.is-valid {
    color: #087e64;
}

.resource-launcher-lab__validation.is-error,
.resource-launcher-lab__result.is-error {
    color: #c83232;
}

.resource-launcher-lab__layout {
    display: grid;
    grid-template-columns: minmax(280px, .8fr) minmax(0, 1.2fr);
    gap: 16px;
    margin-top: 16px;
}

.resource-launcher-lab__section h2,
.resource-launcher-lab__iframe-wrap h2,
.resource-launcher-lab__report h2 {
    font-size: 1.05rem;
    margin-bottom: 14px;
}

.resource-launcher-lab__context {
    display: grid;
    grid-template-columns: minmax(100px, .45fr) minmax(0, 1fr);
    gap: 8px 12px;
    margin: 0;
}

.resource-launcher-lab__context dt {
    color: #6b7280;
    font-weight: 700;
}

.resource-launcher-lab__context dd {
    min-width: 0;
    margin: 0;
    overflow-wrap: anywhere;
}

.resource-launcher-lab__methods,
.resource-launcher-lab__report-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.resource-launcher-lab__iframe-wrap,
.resource-launcher-lab__report,
.resource-launcher-lab > .resource-launcher-lab__section {
    margin-top: 16px;
}

.resource-launcher-lab__iframe-heading h2,
.resource-launcher-lab__section-heading h2 {
    margin-bottom: 0;
}

.resource-launcher-lab__section-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.resource-launcher-lab__iframe-wrap iframe {
    width: 100%;
    height: min(62vh, 620px);
    margin-top: 14px;
    border: 1px solid #dfe4ec;
    border-radius: 6px;
    background: #f4f5f7;
}

.resource-launcher-lab__history {
    overflow-x: auto;
}

.resource-launcher-lab__history table {
    width: 100%;
    min-width: 720px;
    border-collapse: collapse;
    font-size: .88rem;
}

.resource-launcher-lab__history th,
.resource-launcher-lab__history td {
    padding: 10px;
    border-bottom: 1px solid #e7eaf0;
    text-align: left;
    vertical-align: top;
}

.resource-launcher-lab__history th {
    color: #596579;
    background: #f7f8fa;
}

.resource-launcher-lab__empty {
    color: #687386;
    margin: 0;
}

.resource-launcher-lab__section-note {
    margin: 5px 0 0;
    color: #687386;
    font-size: .86rem;
}

.resource-launcher-lab__kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin: 16px 0;
}

.resource-launcher-lab__kpi {
    min-width: 0;
    border: 1px solid #e1e6ee;
    border-radius: 6px;
    background: #f8fafc;
    padding: 12px;
}

.resource-launcher-lab__kpi span,
.resource-launcher-lab__kpi strong {
    display: block;
}

.resource-launcher-lab__kpi span {
    color: #687386;
    font-size: .8rem;
    font-weight: 700;
}

.resource-launcher-lab__kpi strong {
    margin-top: 4px;
    font-size: 1.2rem;
}

@media (max-width: 760px) {
    .resource-launcher-lab {
        padding-inline: 12px;
    }

    .resource-launcher-lab__layout,
    .resource-launcher-lab__methods,
    .resource-launcher-lab__report-options,
    .resource-launcher-lab__kpis,
    .resource-launcher-lab__device-grid,
    .resource-launcher-lab__report-fields {
        grid-template-columns: 1fr;
    }

    .resource-launcher-lab__url-row {
        align-items: stretch;
        flex-direction: column;
    }

    .resource-launcher-lab__context {
        grid-template-columns: 1fr;
        gap: 3px;
    }

    .resource-launcher-lab__context dd {
        margin-bottom: 9px;
    }

    .resource-launcher-lab__section-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .resource-launcher-lab__section-actions {
        width: 100%;
        justify-content: stretch;
    }

    .resource-launcher-lab__section-actions button {
        flex: 1;
    }
}
