.running-duration {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--da-text);
    font-weight: 500;
}

th {
    padding: 6px 8px;
    font-size: 13px;
    line-height: 18px;
    border-bottom: 1px solid var(--cr-border-strong, var(--da-border-strong));
    font-weight: normal;
    text-align: left;
}

td:not(:first-child) {
    padding-left: 10px;
}

th:not(:first-child) {
    padding-left: 10px;
}

td {
    padding: 3px 8px;
    font-size: 13px;
    line-height: 17px;
    color: var(--cr-text, #323130);
    text-align: left;
    border-bottom: 1px solid color-mix(in srgb, var(--cr-border, var(--da-border-strong)) 78%, transparent);
}

#DeveloperAgentExecutionTable {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

#DeveloperAgentExecutionTable thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: linear-gradient(180deg, color-mix(in srgb, var(--cr-primary, #0078d4) 4%, var(--cr-surface-alt, #f8f9fb)) 0%, var(--cr-surface-alt, #f8f9fb) 100%);
    box-shadow: inset 0 -1px 0 var(--cr-border-strong, #d2d0ce);
    height: 34px;
    padding-top: 4px;
    padding-bottom: 4px;
    vertical-align: middle;
}

#DeveloperAgentExecutionTable tbody tr:nth-child(even) {
    background: color-mix(in srgb, var(--cr-surface-alt, #f8f9fb) 54%, var(--cr-surface, #ffffff));
}

tr .hidden-menu {
    visibility: hidden;
}

tr:hover .hidden-menu {
    visibility: visible;
}

.swal2-confirm {
    background-color: #0078d4 !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 2px !important;
    height: 32px !important;
    padding: 0 16px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    line-height: 32px !important;
    cursor: pointer !important;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif !important;
    transition: background-color 0.2s ease !important;
}

.swal2-confirm:hover {
    background-color: #106ebe !important;
}

.swal2-cancel {
    background-color: transparent !important;
    color: var(--da-text) !important;
    border: 1px solid #8a8886 !important;
    border-radius: 2px !important;
    height: 32px !important;
    padding: 0 16px !important;
    font-size: 13px !important;
    line-height: 32px !important;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif !important;
    cursor: pointer !important;
    transition: background-color 0.2s ease !important;
}

.swal2-cancel:hover {
    background-color: var(--da-surface-alt) !important;
}

.swal2-popup {
    border-radius: 0 !important;
}

.swal2-confirm:focus,
.swal2-cancel:focus {
    outline: none !important;
    box-shadow: none !important;
}

#DeveloperAgentExecutionTable tbody>tr:hover {
    background-color: color-mix(in srgb, var(--cr-primary, #0078d4) 8%, var(--cr-surface-alt, #f8f9fb));
}

#DeveloperAgentExecutionTable th:hover {
    background-color: color-mix(in srgb, var(--cr-primary, #0078d4) 10%, var(--cr-surface-alt, #f8f9fb));
}

.caret-off::after {
    display: none;
}

a {
    color: inherit;
    text-decoration: none;
    cursor: pointer;
    display: inline-block;
}

.swal2-input {
    border-radius: 0 !important;
    height: 30px !important;
    font-size: 14px !important;
    background-color: var(--da-surface-alt) !important;
    outline: none !important;
}

.new-EvolveAssist-button:hover {
    background-color: var(--da-surface-alt) !important;
}

.swal2-validation-message {
    margin: 0px !important;
}

.azdev-button {
    background-color: #0078d4;
    color: white;
    border: 0;
    border-radius: 2px;
    padding: 6px 12px;
    font-size: 14px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    height: 32px;
}

.azdev-button:hover {
    background-color: #106ebe;
}

.azdev-button i {
    margin-right: 6px;
    font-size: 16px;
}

th[data-sort] {
    cursor: pointer;
    user-select: none;
}

.sort-icon {
    margin-left: 6px;
    color: var(--cr-text-secondary, #605e5c);
    font-size: 12px;
}

.active-sort {
    color: var(--cr-primary, #0078d4);
}

.active-sort-column {
    background: color-mix(in srgb, var(--cr-primary, #0078d4) 10%, var(--cr-surface-alt, #f8f9fb));
}

.column-center {
    text-align: center;
}

.pagination-button {
    background: var(--da-surface);
    border: 1px solid var(--da-border-strong);
    border-radius: 0;
    box-shadow: none;
    appearance: none;
    -webkit-appearance: none;
    font-size: 14px;
    padding: 4px 10px;
}

#loadingSpinner {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding-top: 0 !important;
    z-index: 9999;
}

#loadingSpinner::before {
    content: "";
    position: fixed;
    inset: 0;
    background: var(--da-surface);
    z-index: -1;
}

.row-action {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.row-action .hidden-menu {
    margin-left: 12px;
    visibility: hidden;
}

tr:hover .row-action .hidden-menu {
    visibility: visible;
}

.user-cell {
    display: flex;
    align-items: center;
    gap: 8px;
}

.avatar-img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
}

.avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #0078d4;
    color: white;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.trial-license-pill {
    color: #8a5a00;
    background: #fff4ce;
    border: 1px solid #ffd97a;
}

.trial-license-pill i {
    font-size: 10px;
}

.da-status-cell {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    min-width: 140px;
}

.da-step-progress {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.da-step-point {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--cr-border-strong, #d2d0ce);
    position: relative;
    flex: 0 0 auto;
}

.da-step-point:not(:last-child)::after {
    content: "";
    position: absolute;
    left: calc(100% + 1px);
    top: 50%;
    transform: translateY(-50%);
    width: 5px;
    height: 2px;
    border-radius: 999px;
    background: var(--cr-border, #edebe9);
}

.da-step-point.done {
    background: var(--cr-primary, #0078d4);
}

.da-step-point.done:not(:last-child)::after {
    background: color-mix(in srgb, var(--cr-primary, #0078d4) 45%, var(--cr-border, #edebe9));
}

.da-step-point.current {
    width: 9px;
    height: 9px;
    background: var(--cr-info, #005a9e);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--cr-info, #005a9e) 16%, transparent);
}

.da-step-point.failed {
    background: var(--cr-danger, #a4262c);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--cr-danger, #a4262c) 16%, transparent);
}

.da-step-progress.completed .da-step-point {
    background: var(--cr-success, #107c10);
}

.da-step-progress.completed .da-step-point:not(:last-child)::after {
    background: color-mix(in srgb, var(--cr-success, #107c10) 45%, var(--cr-border, #edebe9));
}

.cr-execution-card .da-step-progress {
    margin: 2px 0 6px;
}

.swal-select {
    width: 100%;
    padding: 6px 8px;
    font-size: 13px;
    border: 1px solid var(--cr-border-strong, var(--da-border-strong));
    border-radius: 2px;
    background-color: var(--cr-surface, #ffffff);
    color: var(--cr-text, #323130);
    margin-bottom: 10px;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    appearance: auto;
}

.swal-select-multi {
    height: 230px;
    flex: 1 1 auto;
    min-height: 120px;
    padding: 4px;
}

.swal-select:focus {
    outline: none;
    border-color: var(--cr-primary, #0078d4);
    box-shadow: 0 0 0 2px var(--cr-focus, #deecf9);
}

.swal-label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 5px;
    text-align: left;
    color: var(--cr-text, #323130);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.swal-label-hint {
    font-weight: 400;
    font-size: 11px;
    color: var(--cr-text-muted, #8a8886);
    text-transform: none;
    letter-spacing: 0;
}

/* ── Queue dialog popup ────────────────────── */
/* width intentionally not !important — jQuery UI writes the dragged size inline. */
.da-queue-popup {
    /* SweetAlert's own grid sizes every row to its content, so a long repository list pushed the
       action buttons past the bottom edge. A flex column lets the body take the slack instead. */
    display: flex !important;
    flex-direction: column;
    border-radius: 2px !important;
    width: 780px;
    max-width: 96vw;
    max-height: 92vh;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif !important;
    border-top: 3px solid var(--cr-primary, #0078d4) !important;
    padding-bottom: 20px !important;
}

/* Queue and Cancel stay visible at every size; only the body between them scrolls. */
.da-queue-popup .swal2-title,
.da-queue-popup .swal2-actions,
.da-queue-popup .swal2-validation-message {
    flex: 0 0 auto;
}

/* The bug flow has no repository list to show, so it keeps the original width. */
.da-queue-popup-compact {
    width: 560px;
}

.da-queue-popup .ui-resizable-handle {
    z-index: 3;
}

.da-queue-popup .ui-resizable-se {
    width: 14px;
    height: 14px;
    right: 3px;
    bottom: 3px;
    border-right: 2px solid var(--cr-border-strong, var(--da-border-strong));
    border-bottom: 2px solid var(--cr-border-strong, var(--da-border-strong));
    opacity: 0.6;
}

.da-queue-title {
    font-size: 16px !important;
    font-weight: 700 !important;
    color: var(--cr-text, #323130) !important;
    padding-bottom: 10px !important;
    border-bottom: 1px solid var(--cr-border, var(--da-border-strong)) !important;
    margin-bottom: 4px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
}

.da-queue-title-icon {
    color: var(--cr-primary, #0078d4);
    font-size: 18px;
}

/* The dialog is drag-resizable, so the body takes the leftover height and hands it to the
   repository list instead of every child sizing to its content. */
.da-queue-html {
    text-align: left !important;
    padding: 0 8px !important;
    flex: 1 1 auto !important;
    min-height: 0;
    overflow: hidden !important;
    display: flex !important;
}

.da-swal-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1 1 auto;
    min-width: 0;
    min-height: 0;
    overflow-y: auto;
}

.da-swal-row-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 4px;
}

.da-swal-row-2col.is-single {
    grid-template-columns: 1fr;
}

.da-swal-auto-project {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--cr-text-secondary, #605e5c);
    background: var(--cr-surface-alt, #f8f9fb);
    border: 1px solid var(--cr-border, var(--da-border-strong));
    border-radius: 2px;
    padding: 6px 8px;
    margin-bottom: 10px;
}

.da-swal-auto-project strong {
    color: var(--cr-text, #323130);
    font-weight: 600;
}

#swal-repos-field {
    flex: 1 1 auto;
    min-height: 150px;
}

.da-swal-field {
    display: flex;
    flex-direction: column;
}

/* Role assignment section */
.da-swal-roles-section {
    margin-top: 4px;
    border-top: 1px solid var(--cr-border, var(--da-border-strong));
    padding-top: 10px;
}

.da-swal-roles-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.da-swal-role-row {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--cr-surface-alt, #f8f9fb);
    border: 1px solid var(--cr-border, var(--da-border-strong));
    border-radius: 2px;
    padding: 5px 8px;
}

.da-repo-chip {
    flex: 1 1 auto;
    font-size: 13px;
    color: var(--cr-text, #323130);
    display: flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.da-role-select {
    flex: 0 0 130px;
    margin-bottom: 0 !important;
    font-size: 12px !important;
    padding: 3px 6px !important;
}

/* Buttons */
.da-queue-actions {
    margin-top: 18px !important;
    gap: 8px !important;
}

.da-queue-btn-confirm {
    background-color: var(--cr-primary, #0078d4) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 2px !important;
    height: 32px !important;
    padding: 0 16px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    transition: background-color 0.15s ease !important;
}

.da-queue-btn-confirm:hover {
    background-color: var(--cr-primary-hover, #106ebe) !important;
}

.da-queue-btn-cancel {
    background-color: transparent !important;
    color: var(--cr-text, #323130) !important;
    border: 1px solid var(--cr-border-strong, #8a8886) !important;
    border-radius: 2px !important;
    height: 32px !important;
    padding: 0 16px !important;
    font-size: 13px !important;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif !important;
    cursor: pointer !important;
    transition: background-color 0.15s ease !important;
}

.da-queue-btn-cancel:hover {
    background-color: var(--cr-border, #edebe9) !important;
}

#DeveloperAgentListBody {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

#DeveloperAgentTableScroll {
    flex: 1 1 auto;
    min-height: 220px;
    overflow: auto;
}

#DeveloperAgentCardView {
    flex: 1 1 auto;
    min-height: 220px;
    overflow: auto;
}
/* "View prototype" action. Shares the Select button's sizing, neutral-toned. */
.proto-view-btn {
    margin-top: 6px;
    margin-right: 6px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    font-size: 12px;
    line-height: 18px;
    border-radius: 2px;
    border: 1px solid var(--da-border, #d0d7de);
    background-color: transparent;
    color: var(--da-text, #24292f);
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.proto-view-btn i {
    font-size: 13px;
}

.proto-view-btn:hover {
    border-color: var(--da-primary, #0078d4);
    color: var(--da-primary-text, #0078d4);
}

/* "Select prototype" action shown under the deployed-site URL in the Output column.
   Sized down from .azdev-button so it reads as a row action, not a page action. */
.proto-select-btn {
    margin-top: 6px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    font-size: 12px;
    line-height: 18px;
    border-radius: 2px;
    border: 1px solid var(--da-primary, #0078d4);
    background-color: transparent;
    color: var(--da-primary-text, #0078d4);
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.proto-select-btn i {
    font-size: 13px;
}

.proto-select-btn:hover {
    background-color: var(--da-primary, #0078d4);
    color: #ffffff;
}

/* Selected and in-flight are both non-actionable: muted, and the cursor says so. */
.proto-select-btn.is-selected,
.proto-select-btn.is-busy {
    cursor: default;
}

.proto-select-btn.is-selected {
    border-color: var(--cr-success, #107c10);
    color: var(--cr-success, #107c10);
    background-color: transparent;
}

.proto-select-btn.is-selected:hover {
    background-color: transparent;
    color: var(--cr-success, #107c10);
}

.proto-select-btn.is-busy {
    border-color: var(--da-border-strong, #d2d0ce);
    color: var(--da-text-secondary, #605e5c);
    background-color: transparent;
}

.proto-select-btn.is-busy:hover {
    background-color: transparent;
    color: var(--da-text-secondary, #605e5c);
}
