.envoi-bm-layout {
    gap: 0.35rem;
}

.envoi-bm-controls,
.envoi-bm-preview-card,
.envoi-bm-pipeline-card,
.envoi-bm-logs-card {
    width: 100%;
}

.envoi-bm-label {
    color: var(--ffbad-blue, #101F69);
    font-weight: 700;
    font-size: 0.95rem;
}

.envoi-bm-textarea {
    width: 100%;
    min-height: 86px;
    resize: vertical;
    border: 1px solid var(--ffbad-blue, #101F69) !important;
    border-radius: 8px !important;
    padding: 0.6rem !important;
    color: var(--ffbad-blue, #101F69);
}

.envoi-bm-help,
.envoi-bm-muted {
    color: #7076AC;
    font-size: 0.92rem;
}

#envoi-bm-auto-mode-block {
    justify-content: center;
}

#envoi-bm-mode-help {
    width: 100%;
    padding: 0.85rem 1rem;
    border: 1px solid #e7e9f2;
    border-radius: 8px;
    background: #f8f9fa;
}

.envoi-bm-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.envoi-bm-update-target {
    margin-top: 1rem;
    padding: 1rem;
    border: 1px solid #e7e9f2;
    border-radius: 8px;
    background: #f8f9fa;
}

.envoi-bm-inline-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
}

.envoi-bm-card-heading {
    margin-bottom: 1rem !important;
}

.envoi-bm-execution-grid {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(320px, 1.05fr) minmax(320px, 0.95fr);
    gap: 0.75rem;
    align-items: start;
}

.envoi-bm-execution-summary {
    grid-column: 1 / -1;
}

.envoi-bm-execution-grid .envoi-bm-pipeline-card,
.envoi-bm-execution-grid .envoi-bm-logs-card {
    width: 100%;
}

.envoi-bm-progress-card {
    padding: 0.8rem 0.9rem;
    border-radius: 12px;
    background-color: #F8F9FC;
    border: 1px solid rgba(16, 31, 105, 0.10);
    border-left: 4px solid #D52B1E;
    box-shadow: none;
    margin-bottom: 1rem;
}

.envoi-bm-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 0.55rem;
}

.envoi-bm-progress-title-line {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-shrink: 0;
}

.envoi-bm-progress-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background-color: #D52B1E;
}

.envoi-bm-progress-title {
    color: #101F69;
    font-size: 0.78rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.035em;
}

.envoi-bm-progress-text {
    color: #7076AC;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.35;
    text-align: right;
}

.envoi-bm-progress {
    height: 0.85rem !important;
    border-radius: 999px !important;
    background-color: rgba(16, 31, 105, 0.08) !important;
    overflow: hidden;
    box-shadow: none;
}

.envoi-bm-progress .progress-bar {
    border-radius: 999px;
    background-color: #D52B1E !important;
    font-size: 0.66rem;
    font-weight: 900;
    color: #FFFFFF;
    transition: width 0.30s ease;
}

.envoi-bm-progress-detail {
    margin-top: 0.5rem;
    padding: 0.4rem 0.55rem;
    border-radius: 8px;
    background-color: rgba(16, 31, 105, 0.045);
    color: #7076AC;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.35;
}

.envoi-bm-step-list {
    display: grid;
    gap: 0.7rem;
}

.envoi-bm-step {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    align-items: start;
    gap: 0.75rem;
    padding: 0.75rem;
    border: 1px solid #e7e9f2;
    border-radius: 8px;
    background: #fff;
}

.envoi-bm-step-marker {
    width: 22px;
    height: 22px;
    border-radius: 999px;
    border: 2px solid #cbd0e6;
    margin-top: 0.1rem;
    background: #fff;
}

.envoi-bm-step-running .envoi-bm-step-marker {
    border-color: var(--ffbad-blue, #101F69);
    box-shadow: 0 0 0 4px rgba(16, 31, 105, 0.12);
}

.envoi-bm-step-done .envoi-bm-step-marker {
    border-color: #198754;
    background: #198754;
}

.envoi-bm-step-skipped .envoi-bm-step-marker {
    border-color: #7076AC;
    background: #eef0f8;
}

.envoi-bm-step-error .envoi-bm-step-marker {
    border-color: var(--ffbad-red, #d52b1e);
    background: var(--ffbad-red, #d52b1e);
}

.envoi-bm-step-title {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    color: var(--ffbad-blue, #101F69);
    font-weight: 700;
}

.envoi-bm-step-status {
    flex: 0 0 auto;
    color: #7076AC;
    font-size: 0.85rem;
    text-transform: uppercase;
}

.envoi-bm-step-message {
    color: #566a7f;
    font-size: 0.92rem;
    margin-top: 0.2rem;
}

.envoi-bm-log {
    display: grid;
    gap: 0.45rem;
    max-height: 330px;
    overflow-y: auto;
    padding-right: 0.3rem;
}

.envoi-bm-log-line {
    display: grid;
    grid-template-columns: 170px minmax(0, 1fr);
    gap: 0.75rem;
    padding: 0.55rem 0.65rem;
    border-radius: 6px;
    background: #f8f9fa;
    color: var(--ffbad-blue, #101F69);
    font-size: 0.92rem;
}

.envoi-bm-log-stage {
    font-weight: 700;
}

.envoi-bm-log-error {
    background: rgba(213, 43, 30, 0.08);
}

.envoi-bm-log-done {
    background: rgba(25, 135, 84, 0.08);
}

.envoi-bm-summary {
    margin: 0 !important;
}

.envoi-bm-summary-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 0.65rem;
}

.envoi-bm-summary-grid span {
    padding: 0.35rem 0.55rem;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.65);
    font-size: 0.9rem;
    font-weight: 700;
}

.envoi-bm-summary-ids,
.envoi-bm-error-hint,
.envoi-bm-error-details {
    margin-top: 0.65rem;
    font-size: 0.92rem;
}

.envoi-bm-error-hint {
    font-weight: 700;
}

.envoi-bm-error-technical {
    margin-top: 0.65rem;
}

.envoi-bm-error-technical summary {
    cursor: pointer;
    font-weight: 700;
}

.envoi-bm-error-details {
    font-family: monospace;
    white-space: pre-wrap;
}

.envoi-bm-preview-table-wrap {
    max-height: 430px;
    overflow: auto;
    margin-top: 0.9rem;
    border: 1px solid #e7e9f2;
    border-radius: 8px;
}

.envoi-bm-preview-table {
    margin-bottom: 0 !important;
    color: var(--ffbad-blue, #101F69);
}

.envoi-bm-preview-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #f8f9fa;
    color: var(--ffbad-blue, #101F69);
    font-size: 0.86rem;
    text-transform: uppercase;
}

.envoi-bm-preview-table td {
    font-size: 0.92rem;
    vertical-align: middle;
}

.envoi-bm-preview-main-cell {
    min-width: 220px;
    font-weight: 700;
}

.envoi-bm-preview-subtext {
    color: #7076AC;
    font-size: 0.82rem;
    font-weight: 500;
    margin-top: 0.15rem;
}

@media (max-width: 900px) {
    .envoi-bm-execution-grid {
        grid-template-columns: 1fr;
    }

    .envoi-bm-log-line {
        grid-template-columns: 1fr;
    }
}
