.job-center-root {
    position: fixed;
    right: 22px;
    top: 86px;
    z-index: 2147482500;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.job-center-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    border: 1px solid #dbe4ff;
    border-radius: 999px;
    padding: 9px 14px;
    color: #111827;
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.14);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.job-center-trigger:hover,
.job-center-trigger:focus {
    border-color: #0146ff;
    outline: none;
}

.job-center-trigger.has-active {
    color: #ffffff;
    border-color: #0146ff;
    background: #0146ff;
}

.job-center-count {
    min-width: 22px;
    height: 22px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #0146ff;
    background: #eef3ff;
    font-size: 12px;
}

.job-center-trigger.has-active .job-center-count {
    color: #0146ff;
    background: #ffffff;
}

.job-center-drawer {
    position: absolute;
    top: 52px;
    right: 0;
    width: min(420px, calc(100vw - 28px));
    max-height: calc(100vh - 120px);
    overflow: hidden;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 24px 80px rgba(15, 23, 42, 0.2);
    opacity: 0;
    transform: translateY(-6px);
    pointer-events: none;
    transition: opacity 0.14s ease, transform 0.14s ease;
}

.job-center-root.is-open .job-center-drawer {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.job-center-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px;
    border-bottom: 1px solid #eef0f3;
}

.job-center-header h3 {
    margin: 0;
    color: #111827 !important;
    font-size: 16px !important;
    line-height: 1.2;
}

.job-center-refresh,
.job-center-close {
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 8px;
    color: #374151;
    background: #f3f4f6;
    cursor: pointer;
}

.job-center-body {
    max-height: calc(100vh - 195px);
    overflow: auto;
    padding: 12px;
}

.job-center-section-title {
    margin: 8px 6px 8px;
    color: #6b7280;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.job-center-empty {
    margin: 0;
    padding: 24px 14px;
    color: #6b7280;
    text-align: center;
    font-size: 14px;
}

.job-center-item {
    border: 1px solid #eef0f3;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 10px;
    background: #ffffff;
}

.job-center-item.processing,
.job-center-item.pending,
.job-center-item.scheduled {
    border-color: #bfdbfe;
    background: #f8fbff;
}

.job-center-item.failed {
    border-color: #fecaca;
    background: #fffafa;
}

.job-center-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 6px;
}

.job-center-kind {
    color: #0146ff;
    font-size: 12px;
    font-weight: 800;
}

.job-center-status {
    flex: 0 0 auto;
    border-radius: 999px;
    padding: 4px 8px;
    color: #374151;
    background: #f3f4f6;
    font-size: 11px;
    font-weight: 800;
}

.job-center-status.generated {
    color: #047857;
    background: #d1fae5;
}

.job-center-status.failed {
    color: #b91c1c;
    background: #fee2e2;
}

.job-center-status.processing,
.job-center-status.pending,
.job-center-status.scheduled {
    color: #1d4ed8;
    background: #dbeafe;
}

.job-center-title {
    margin: 0 0 10px;
    color: #111827;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.35;
}

.job-center-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    color: #6b7280;
    font-size: 12px;
}

.job-center-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.job-center-action {
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 7px 10px;
    color: #374151;
    background: #ffffff;
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
}

.job-center-action.primary {
    color: #ffffff;
    border-color: #0146ff;
    background: #0146ff;
}

.job-center-action.danger {
    color: #b91c1c;
    border-color: #fecaca;
    background: #fffafa;
}

.generation-progress-shell {
    margin: 0 auto;
    max-width: 1080px;
}

.generation-batch-progress-shell {
    margin: 0 auto;
    max-width: 1120px;
}

.generation-progress-header,
.generation-progress-grid,
.generation-progress-main,
.generation-progress-side {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 2px 12px rgba(15, 23, 42, 0.06);
}

.generation-progress-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 24px;
    margin-bottom: 18px;
}

.generation-progress-kicker {
    margin: 0 0 6px;
    color: #0146ff;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.generation-progress-header h1 {
    margin: 0;
    color: #111827 !important;
    font-size: 26px !important;
    line-height: 1.25;
}

.generation-status-pill {
    border-radius: 999px;
    padding: 8px 12px;
    color: #374151;
    background: #f3f4f6;
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
}

.generation-status-pill.generated {
    color: #047857;
    background: #d1fae5;
}

.generation-status-pill.failed,
.generation-status-pill.refunded {
    color: #b91c1c;
    background: #fee2e2;
}

.generation-status-pill.processing,
.generation-status-pill.pending,
.generation-status-pill.scheduled {
    color: #1d4ed8;
    background: #dbeafe;
}

.generation-progress-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 18px;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.generation-progress-main,
.generation-progress-side {
    padding: 22px;
}

.generation-stepper {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.generation-step {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 14px;
    color: #6b7280;
    background: #f9fafb;
    font-weight: 800;
}

.generation-step i {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #e5e7eb;
}

.generation-step.is-active {
    color: #1d4ed8;
    border-color: #bfdbfe;
    background: #eff6ff;
}

.generation-step.is-active i {
    background: #dbeafe;
}

.generation-step.is-complete {
    color: #047857;
    border-color: #a7f3d0;
    background: #ecfdf5;
}

.generation-step.is-complete i {
    color: #ffffff;
    background: #059669;
}

.generation-step.is-failed {
    color: #b91c1c;
    border-color: #fecaca;
    background: #fffafa;
}

.generation-step.is-failed i {
    color: #ffffff;
    background: #dc2626;
}

.generation-progress-note {
    margin: 18px 0 0;
    color: #4b5563;
    font-size: 15px;
}

.generation-error {
    margin-top: 16px;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 12px;
    color: #991b1b;
    background: #fffafa;
    white-space: pre-wrap;
}

.generation-meta-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #eef0f3;
    color: #6b7280;
}

.generation-meta-row strong {
    color: #111827;
    text-align: right;
}

.generation-actions {
    display: grid;
    gap: 10px;
    margin-top: 16px;
}

.generation-batch-summary,
.generation-batch-item {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 2px 12px rgba(15, 23, 42, 0.06);
}

.generation-batch-summary {
    padding: 20px;
    margin-bottom: 18px;
}

.generation-batch-meter {
    height: 10px;
    overflow: hidden;
    border-radius: 999px;
    background: #eef2ff;
}

.generation-batch-meter-bar {
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: #0146ff;
    transition: width 0.2s ease;
}

.generation-batch-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.generation-batch-stats div {
    border: 1px solid #eef0f3;
    border-radius: 8px;
    padding: 12px;
    background: #f9fafb;
}

.generation-batch-stats span {
    display: block;
    color: #6b7280;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.generation-batch-stats strong {
    display: block;
    margin-top: 4px;
    color: #111827;
    font-size: 22px;
    line-height: 1;
}

.generation-batch-list {
    display: grid;
    gap: 12px;
}

.generation-batch-item {
    padding: 14px;
}

.generation-batch-item.processing,
.generation-batch-item.pending,
.generation-batch-item.scheduled {
    border-color: #bfdbfe;
    background: #f8fbff;
}

.generation-batch-item.failed,
.generation-batch-item.refunded {
    border-color: #fecaca;
    background: #fffafa;
}

.generation-batch-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.history-error-button,
.history-error-badge {
    border: 0;
    padding: 0;
    background: transparent;
    cursor: pointer;
}

.history-error-badge {
    padding: 5px 9px;
}

@media (max-width: 991px) {
    .job-center-root {
        right: 14px;
        top: auto;
        bottom: 16px;
    }

    .job-center-drawer {
        top: auto;
        bottom: 52px;
    }

    .generation-progress-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 575px) {
    .job-center-trigger span:not(.job-center-count) {
        display: none;
    }

    .generation-progress-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .generation-stepper {
        grid-template-columns: 1fr;
    }

    .generation-batch-stats {
        grid-template-columns: 1fr;
    }
}
