.analysis-job-browser-launch {
    font-size: 11px;
    margin-top: 4px;
}

.analysis-job-open-link {
    border: none;
    background: none;
    color: #2a5298;
    text-decoration: none;
    padding: 0;
    cursor: pointer;
    font: inherit;
}

.analysis-job-open-link:hover {
    text-decoration: underline;
}

.job-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.job-filter-btn {
    border: 1px solid var(--hp-border, #d0d7de);
    background: #fff;
    color: var(--hp-text-secondary, #6b7280);
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 0.84rem;
    cursor: pointer;
    font-family: inherit;
}

.job-filter-btn.active {
    background: var(--hp-blue, #2a5298);
    border-color: var(--hp-blue, #2a5298);
    color: #fff;
}

.job-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.job-table th {
    text-align: center;
    padding: 10px 12px;
    border-bottom: 2px solid var(--hp-border, #d0d7de);
    font-weight: 600;
    color: var(--hp-text-secondary, #6b7280);
    font-size: 0.82rem;
}

.job-table th:last-child {
    text-align: right;
}

.job-table td {
    text-align: center;
    padding: 10px 12px;
    border-bottom: 1px solid var(--hp-border, #d0d7de);
    vertical-align: middle;
}

.job-table td:nth-child(2) {
    text-align: left;
}

.job-table td:last-child {
    text-align: right;
    white-space: nowrap;
}

.job-table tr:last-child td {
    border-bottom: none;
}

.job-table tr.job-row {
    cursor: pointer;
}

.job-table tr.job-row:hover {
    background: #f8fbff;
}

.job-id-code {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    background: #eef4fb;
    color: #1d4d8b;
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 0.8rem;
}

.job-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 600;
}

.job-badge-queued { background: #fff3cd; color: #856404; }
.job-badge-preparing { background: #eef4ff; color: #315ea8; }
.job-badge-converting { background: #e3f2fd; color: #1565c0; }
.job-badge-saving { background: #e8f1ff; color: #3558a8; }
.job-badge-success { background: #e8f5e9; color: #2e7d32; }
.job-badge-fail { background: #ffebee; color: #c62828; }
.job-badge-canceled { background: #eceff1; color: #455a64; }

.job-action-btn,
.job-action-btn:link,
.job-action-btn:visited {
    padding: 4px 12px;
    background: none;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    font-family: inherit;
    text-decoration: none !important;
}

.job-action-btn:hover,
.job-action-btn:focus,
.job-action-btn:active {
    text-decoration: none !important;
}

.job-action-btn + .job-action-btn {
    margin-left: 6px;
}

.job-action-cancel { border: 1px solid #f0ad4e; color: #9a6700; }
.job-action-cancel:hover { background: #fff7e8; }
.job-action-download { border: 1px solid #81c784; color: #1b5e20; }
.job-action-download:hover { background: #eefaf0; }
.job-action-delete { border: 1px solid #90a4ae; color: #455a64; }
.job-action-delete:hover { background: #f4f7f8; }

.job-detail-backdrop,
.analysis-job-browser-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    display: none;
    z-index: 1050;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.job-detail-modal,
.analysis-job-browser-modal {
    width: min(960px, 100%);
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 16px;
    border: 1px solid var(--hp-border, #d0d7de);
    box-shadow: 0 20px 60px rgba(15, 23, 42, 0.18);
}

.job-detail-header,
.analysis-job-browser-header {
    padding: 20px 24px 12px;
    border-bottom: 1px solid var(--hp-border, #d0d7de);
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
}

.analysis-job-browser-body {
    padding: 20px 24px 24px;
    overflow: auto;
}

.job-detail-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 16px;
    font-size: 0.88rem;
    color: #495057;
}

.job-detail-progress {
    grid-column: 1 / -1;
    padding: 10px 12px;
    border: 1px solid var(--hp-border, #d0d7de);
    border-radius: 10px;
    background: #f8fbff;
}

.job-detail-progress-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    font-size: 0.84rem;
    color: #374151;
    margin-bottom: 8px;
}

.job-detail-progress-track {
    width: 100%;
    height: 8px;
    background: #e5edf7;
    border-radius: 999px;
    overflow: hidden;
}

.job-detail-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #2a5298 0%, #4f86d9 100%);
    border-radius: inherit;
    transition: width 0.2s ease;
}

.job-detail-meta strong {
    color: #111827;
}

.job-detail-body {
    padding: 20px 24px 24px;
    overflow: hidden;
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.job-log-box {
    background: #0f172a;
    color: #dbeafe;
    border-radius: 12px;
    padding: 14px;
    height: 420px;
    min-height: 420px;
    max-height: 420px;
    overflow: auto;
    overscroll-behavior: contain;
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 0.82rem;
    line-height: 1.5;
}

.job-log-line,
.job-log-text {
    white-space: pre-wrap;
    word-break: break-word;
}

.job-log-text {
    margin: 0;
}

.job-detail-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.job-close-btn {
    border: none;
    background: none;
    color: var(--hp-text-secondary, #6b7280);
    font-size: 1.1rem;
    cursor: pointer;
}

.empty-msg {
    color: var(--hp-text-secondary, #6b7280);
    font-size: 0.9rem;
    text-align: center;
    padding: 24px;
}

.loading {
    text-align: center;
    padding: 24px;
    color: var(--hp-text-secondary, #6b7280);
}

@media (max-width: 768px) {
    .job-table {
        font-size: 0.82rem;
    }

    .job-table th:nth-child(3),
    .job-table td:nth-child(3),
    .job-table th:nth-child(5),
    .job-table td:nth-child(5) {
        display: none;
    }

    .job-detail-meta {
        grid-template-columns: 1fr;
    }

    .job-log-box {
        height: 320px;
        min-height: 320px;
        max-height: 320px;
    }
}
