.run35-page {
    display: grid;
    gap: 18px;
    min-width: 0;
    max-width: 100%;
}

.run35-page > *,
.run35-controls > * {
    box-sizing: border-box;
    min-width: 0;
    max-width: 100%;
}

.run35-context {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid #dce5ea;
    border-radius: 12px;
    background: #fff;
}

.run35-context > div {
    display: grid;
    gap: 2px;
}

.run35-context span,
.run35-kicker {
    color: #758590;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.run35-context strong {
    font-size: 18px;
    color: #2f698e;
}

.run35-periods {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.run35-periods a {
    padding: 8px 13px;
    border: 1px solid #d4dfe5;
    border-radius: 999px;
    background: #fff;
    color: #526a78;
    text-decoration: none;
    font-size: 11px;
    font-weight: 800;
}

.run35-periods a.is-active {
    background: #2f698e;
    border-color: #2f698e;
    color: #fff;
}

.run35-controls,
.run35-table-card {
    padding: 17px;
    border: 1px solid #dce5ea;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 3px 12px rgba(20, 54, 77, .04);
}

.run35-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
}

.run35-control-copy {
    max-width: 650px;
}

.run35-control-copy h2,
.run35-heading h2 {
    margin: 3px 0 5px;
}

.run35-control-copy p,
.run35-heading p {
    margin: 0;
    color: #687985;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.run35-control-buttons {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 7px;
}

.run35-control-buttons form {
    margin: 0;
}

.run35-improve {
    background: #3f7e57;
    border-color: #3f7e57;
    color: #fff;
}

.run35-stop {
    background: #a44a4a;
    border-color: #a44a4a;
    color: #fff;
}

.run35-control-buttons button:disabled {
    cursor: not-allowed;
    opacity: .48;
}

.run35-running {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 13px 15px;
    border: 1px solid #d6cbea;
    border-radius: 12px;
    background: #faf8ff;
}

.run35-running p {
    margin: 2px 0;
    color: #655d74;
}

.run35-running small {
    color: #796f89;
}

.run35-spinner {
    width: 19px;
    height: 19px;
    border: 3px solid #ddd4ed;
    border-top-color: #76549a;
    border-radius: 50%;
    animation: run35-spin 1s linear infinite;
}

@keyframes run35-spin {
    to { transform: rotate(360deg); }
}

.run35-refresh {
    color: #796f89;
    font-size: 10px;
    font-weight: 700;
}

.run35-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 12px;
}

.run35-table-scroll {
    overflow: auto;
}

.run35-table {
    width: 100%;
    min-width: 820px;
    border-collapse: collapse;
}

.run35-table th,
.run35-table td {
    padding: 9px 8px;
    border: 1px solid #d5dfe4;
    text-align: center;
    font-size: 10px;
}

.run35-table thead th {
    background: #eaf0f4;
    color: #4d6472;
    font-size: 9px;
    text-transform: uppercase;
}

.run35-table tbody th {
    background: #f7f9fa;
    text-align: left;
}

.run35-table tr.is-best th,
.run35-table tr.is-best td {
    background: #f2faf5;
}

.run35-table tr.is-best th {
    border-left: 4px solid #4c8b62;
}

.run35-table td strong {
    color: #2f698e;
    font-size: 14px;
}

.run35-waiting {
    color: #87949c;
    font-style: italic;
}

.run35-table-footer {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 9px;
    color: #73828c;
    font-size: 9px;
}

.run35-diagnostic {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 7px;
}

.run35-diagnostic > div {
    display: grid;
    gap: 2px;
    padding: 10px;
    border: 1px solid #dfe6ea;
    border-radius: 9px;
    background: #f8fafb;
}

.run35-diagnostic span {
    color: #778690;
    font-size: 8px;
    text-transform: uppercase;
}

.run35-diagnostic strong {
    color: #2f698e;
    font-size: 16px;
}

.run35-blocked {
    padding: 16px;
    border: 1px solid #e2b7b7;
    border-radius: 13px;
    background: #fff6f6;
}

.run35-blocked h2 {
    margin: 3px 0 8px;
}

.run35-blocked pre {
    white-space: pre-wrap;
    color: #8b4141;
}

.run35-rule {
    padding: 12px 14px;
    border: 1px solid #cbdde8;
    border-radius: 11px;
    background: #f3f8fb;
    color: #456779;
    line-height: 1.5;
}

.flow33-processing {
    align-items: center;
}

.flow33-processing > .button {
    margin-left: auto;
}

@media (max-width: 900px) {
    .run35-controls,
    .run35-heading,
    .run35-context {
        align-items: stretch;
        flex-direction: column;
    }

    .run35-control-buttons {
        justify-content: flex-start;
    }

    .run35-running {
        grid-template-columns: auto 1fr;
    }

    .run35-refresh {
        grid-column: 1 / -1;
    }

    .run35-diagnostic {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* v0.46.0 — prazo renovável e fila exclusiva do Gerador */
.run46-renew {
    border-color: #7c3aed;
    background: #f5f3ff;
    color: #6d28d9;
}

.run46-renew:hover {
    background: #ede9fe;
}

.run46-other-running {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
    padding: 16px 18px;
    border: 1px solid #ddd6fe;
    border-radius: 14px;
    background: #faf5ff;
}

.run46-other-running p,
.run46-time-line {
    margin: 5px 0 0;
}

#run46-countdown {
    font-variant-numeric: tabular-nums;
    letter-spacing: .04em;
}

/* v0.48.0 — perfis provisórios para comparar profundidade do Gerador */
.run48-profile-test {
    display: grid;
    gap: 7px;
    min-width: 250px;
    padding: 14px 16px;
    border: 1px solid var(--border-color, #d8dee8);
    border-radius: 12px;
    background: var(--surface-subtle, #f8fafc);
}

.run48-profile-test label {
    font-weight: 700;
}

.run48-profile-test select {
    width: 100%;
    min-height: 40px;
    padding: 8px 10px;
    border: 1px solid var(--border-color, #cbd5e1);
    border-radius: 8px;
    background: #fff;
}

.run48-profile-test small {
    line-height: 1.35;
}

.run48-provisional {
    width: fit-content;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 700;
    background: #fff3cd;
    color: #755b00;
}

.run48-current-profile {
    margin: 5px 0 8px;
}

.run48-test-results {
    margin-top: 18px;
    padding: 18px;
    border: 1px solid var(--border-color, #d8dee8);
    border-radius: 14px;
    background: #fff;
}

.run48-test-title {
    display: flex;
    gap: 18px;
    align-items: flex-start;
    justify-content: space-between;
}

.run48-test-title h2 {
    margin: 2px 0 0;
}

.run48-test-title > span {
    white-space: nowrap;
    font-weight: 700;
}

.run48-test-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
    gap: 10px;
    margin-top: 14px;
}

.run48-test-grid > div {
    display: grid;
    gap: 3px;
    padding: 10px 12px;
    border-radius: 10px;
    background: var(--surface-subtle, #f8fafc);
}

.run48-test-grid span {
    font-size: .82rem;
    color: var(--text-muted, #64748b);
}

.run48-test-grid strong {
    font-size: 1.05rem;
}

.run48-test-results > p {
    margin: 14px 0 0;
}

@media (max-width: 850px) {
    .run48-test-title {
        display: grid;
    }
}

/* v0.66.1 - instalação e conexão do Gerador Local */
.run66-installed-status {
    display: grid;
    gap: 8px;
    padding: 16px;
    border: 1px solid #cfdce6;
    border-left: 4px solid #16794f;
    border-radius: 8px;
    background: #f8fbfa;
}

.run66-installed-status > span,
.run66-installed-status > small {
    display: block;
}

.run66-setup {
    display: grid;
    gap: 12px;
    margin-top: 6px;
}

.run66-setup-copy {
    display: grid;
    gap: 3px;
}

.run66-setup-copy strong {
    color: #203040;
    font-size: 15px;
}

.run66-setup-copy small {
    color: #5f6f7f;
    line-height: 1.45;
}

.run66-setup-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: flex-start;
}

.run66-setup-actions form {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
}

.run66-connect-form[hidden] {
    display: none;
}

.run66-download-button {
    min-height: 44px;
    padding: 0 16px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
}

.run66-download-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #2c6593;
    background: #ffffff;
    color: #174d78;
}

.run66-download-button:hover {
    background: #edf5fb;
}

.run66-download-button:focus-visible {
    outline: 3px solid rgba(23, 121, 79, 0.25);
    outline-offset: 2px;
}

#run66-connect-message {
    display: block;
    color: #46586a;
    line-height: 1.4;
}

@media (max-width: 640px) {
    .run66-setup-actions,
    .run66-setup-actions form {
        width: 100%;
    }

    .run66-download-button {
        width: 100%;
    }
}
