.syncScreen {
    $border: #e7e9ef;
    $green: #1a9d52;
    $red: #d63638;
    $amber: #c27c0e;

    .syncSection {
        display: flex;
        flex-wrap: wrap;
        gap: 24px;
    }

    .jobColumn {
        width: calc(100% - 350px);
        display: flex;
        flex-direction: column;
        gap: 20px;
        &.fullWidth {
            width: 100%;
        }
        @media screen and (max-width: 1040px) {
            width: 100%;
        }
    }

    .jobHead {
        h2 {
            margin: 0 0 6px;
            font-size: 22px;
            font-weight: 600;
            color: $primary_color;
        }
        p {
            margin: 0;
            max-width: 820px;
            font-size: 14px;
            line-height: 1.55;
            color: $text_color;
        }
    }

    .jobGrid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 20px;
        @media screen and (max-width: 1100px) {
            grid-template-columns: minmax(0, 1fr);
        }
    }

    .jobCard {
        padding: 24px;
        border-radius: 14px;
        background-color: $white_color;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    }

    .summaryBox {
        margin-bottom: 20px;
        padding: 18px 22px;
        background-color: $white_color;
        border-radius: 16px;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
        dl {
            display: grid;
            grid-template-columns: max-content minmax(0, 1fr);
            gap: 10px 20px;
            margin: 0;
            font-size: 13px;
        }
        dt {
            font-weight: 600;
            color: $primary_color;
        }
        dd {
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            gap: 4px 10px;
            margin: 0;
        }
        code {
            padding: 2px 8px;
            border-radius: 6px;
            background-color: #f3f4f6;
            font-size: 12px;
        }
    }
    .summaryHead {
        display: flex;
        align-items: center;
        gap: 12px;
        margin-bottom: 14px;
        h3 {
            margin: 0;
            font-size: 15px;
            font-weight: 700;
            color: $primary_color;
        }
        a {
            margin-left: auto;
            font-size: 13px;
            font-weight: 600;
            color: $secondary_color;
            text-decoration: none;
        }
    }
    .summaryNote {
        color: $secondary_text_color;
        &.warning {
            color: #9a5c00;
        }
    }

    .setupCard {
        display: flex;
        flex-direction: column;
        gap: 16px;
    }

    .stepTitle {
        display: flex;
        align-items: center;
        gap: 10px;
        font-size: 16px;
        font-weight: 600;
        color: $primary_color;
    }
    .stepBadge {
        width: 26px;
        height: 26px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        font-size: 13px;
        font-weight: 700;
        background-color: #f0f1f4;
        color: $text_color;
        &.current {
            background-color: $secondary_color;
            color: $white_color;
        }
    }
    .nothingToRun {
        margin: 0;
        font-size: 13px;
        color: $secondary_text_color;
    }

    .progressCard {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 16px;
        .statusPill {
            align-self: flex-start;
        }
        .downloadButton {
            width: 100%;
        }
    }

    .ring {
        position: relative;
        width: 200px;
        height: 200px;
        svg {
            width: 100%;
            height: 100%;
            transform: rotate(-90deg);
        }
        circle {
            fill: none;
            stroke-width: 9;
        }
        .track {
            stroke: #eef0f4;
        }
        .bar {
            stroke: $secondary_color;
            stroke-linecap: round;
            transition: stroke-dashoffset 0.6s ease;
        }
        .sweep {
            stroke: rgba($secondary_color, 0.22);
            stroke-linecap: round;
            animation: ringSweep 1.8s linear infinite;
        }
        .head {
            transform-box: view-box;
            transform-origin: 60px 60px;
            transition: transform 0.6s ease;
            circle {
                stroke: none;
            }
            .tip {
                fill: $white_color;
                stroke: $secondary_color;
                stroke-width: 2.5;
            }
            .halo {
                fill: $secondary_color;
                transform-box: fill-box;
                transform-origin: center;
                animation: ringHalo 1.6s ease-out infinite;
            }
        }
        @media (prefers-reduced-motion: reduce) {
            .sweep,
            .head .halo {
                animation: none;
            }
        }
        .ringValue {
            position: absolute;
            inset: 0;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .ringPercent {
            font-size: 32px;
            font-weight: 700;
            color: $primary_color;
            small {
                margin-left: 2px;
                font-size: 15px;
                font-weight: 600;
                color: $text_color;
            }
        }
    }

    .statusPill {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        padding: 5px 12px;
        border-radius: 999px;
        font-size: 13px;
        font-weight: 600;
        background-color: #f0f1f4;
        color: $text_color;
        .dot {
            width: 8px;
            height: 8px;
            border-radius: 50%;
            background-color: currentColor;
        }
        &.running {
            background-color: rgba($secondary_color, 0.1);
            color: $secondary_color;
            .dot {
                animation: dotPulse 1.4s ease-in-out infinite;
            }
        }
        &.warning {
            background-color: rgba(255, 153, 0, 0.12);
            color: $amber;
        }
        &.success {
            background-color: rgba($green, 0.1);
            color: $green;
        }
    }

    .progressLine {
        font-size: 16px;
        font-weight: 600;
        text-align: center;
        color: $primary_color;
    }
    .progressHint {
        max-width: 320px;
        margin: -8px 0 0;
        font-size: 13px;
        line-height: 1.5;
        text-align: center;
        color: $secondary_text_color;
    }

    .actions {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        .jobButton {
            flex: 1 1 120px;
        }
    }

    .jobButton {
        position: relative;
        min-width: 112px;
        padding: 11px 22px;
        border: 1.5px solid transparent;
        border-radius: 10px;
        font-size: 14px;
        font-weight: 600;
        line-height: 1;
        cursor: pointer;
        transition: 0.2s ease all;
        &:disabled {
            opacity: 0.7;
            cursor: default;
        }
        &.primary {
            background-color: $secondary_color;
            color: $white_color;
            box-shadow: 0 4px 12px rgba($secondary_color, 0.25);
            &:hover:not(:disabled) {
                filter: brightness(1.08);
            }
        }
        &.warning {
            background-color: $white_color;
            border-color: rgba(255, 153, 0, 0.6);
            color: $amber;
            &:hover:not(:disabled) {
                background-color: rgba(255, 153, 0, 0.08);
            }
        }
        &.danger {
            background-color: $white_color;
            border-color: rgba($red, 0.5);
            color: $red;
            &:hover:not(:disabled) {
                background-color: rgba($red, 0.06);
            }
        }
        .loader {
            position: absolute;
            top: 50%;
            left: 50%;
            display: none;
            width: 16px;
            height: 16px;
            margin: -8px 0 0 -8px;
            border: 2px solid currentColor;
            border-top-color: transparent;
            border-radius: 50%;
            animation: loaderSpin 1s linear infinite;
            z-index: 1;
        }
        &.loading {
            pointer-events: none;
            user-select: none;
            &::after {
                content: "";
                position: absolute;
                inset: -1px;
                border-radius: 10px;
                background-color: rgba($white_color, 0.55);
            }
            .loader {
                display: inline-block;
            }
        }
    }

    .alert {
        width: 100%;
        padding: 10px 14px;
        border-radius: 10px;
        border-left: 3px solid $red;
        font-size: 13px;
        line-height: 1.5;
        background-color: rgba($red, 0.06);
        color: $red;
        &.warning {
            border-left-color: #f0a020;
            background-color: rgba(255, 153, 0, 0.08);
            color: $amber;
        }
    }

    .statTiles {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .statTile {
        display: flex;
        flex-direction: column;
        gap: 4px;
        padding: 12px 14px;
        border-radius: 10px;
        background-color: #f6f7f9;
        .statValue {
            font-size: 22px;
            font-weight: 700;
            line-height: 1.1;
            color: $primary_color;
        }
        .statLabel {
            font-size: 12px;
            color: $text_color;
        }
        &.success {
            background-color: rgba($green, 0.08);
            .statValue {
                color: #1a7d43;
            }
        }
        &.danger {
            background-color: rgba($red, 0.07);
            .statValue {
                color: #b32d2e;
            }
        }
        &.warning {
            background-color: rgba(255, 153, 0, 0.1);
            .statValue {
                color: #9a5c00;
            }
        }
    }
}

@keyframes ringSweep {
    from {
        stroke-dashoffset: 0;
    }
    to {
        stroke-dashoffset: -326.73;
    }
}
@keyframes ringHalo {
    from {
        transform: scale(1);
        opacity: 0.45;
    }
    to {
        transform: scale(3);
        opacity: 0;
    }
}
@keyframes dotPulse {
    50% {
        opacity: 0.35;
    }
}
@keyframes loaderSpin {
    to {
        transform: rotate(360deg);
    }
}

// Outside .syncScreen: the confirm dialog renders in a portal.
.confirmCount {
    margin: 14px 0 0;
    padding: 10px 12px;
    border-radius: 9px;
    background-color: #f3f6fd;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.5;
    color: $primary_color;
}
