/* Image Duplicate Finder — idf- */
.idf-upload-zone {
    border: 2px dashed rgba(139, 92, 246, 0.35);
    border-radius: 16px;
    background: rgba(139, 92, 246, 0.04);
    padding: 56px 24px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    outline: none;
}

.idf-upload-zone:hover,
.idf-upload-zone:focus,
.idf-upload-zone.idf-drag-over {
    border-color: #8B5CF6;
    background: rgba(139, 92, 246, 0.08);
}

.idf-upload-icon {
    font-size: 3rem;
    color: #8B5CF6;
    opacity: 0.7;
    margin-bottom: 14px;
    display: block;
}

.idf-upload-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 6px;
}

.idf-upload-sub {
    font-size: 1rem;
    color: var(--text-secondary);
    margin: 0;
}

.idf-section {
    padding: 40px 0 60px;

}

.idf-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem
}

.idf-badge {
    width: 44px;
    height: 44px;
    background: rgba(139, 92, 246, .15);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: #8B5CF6;
    flex-shrink: 0
}

.idf-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #0F172A;
    margin: 0 0 .2rem
}

.idf-subtitle {
    font-size: 0.9375rem;
    color: #64748B;
    margin: 0
}

.idf-panel-section {
    background: #F8FAFC;
    border-radius: 10px;
    padding: .85rem 1rem;
    margin-bottom: 1.25rem;
    border: 1px solid #E2E8F0;
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

.idf-panel-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #64748B;
    display: flex;
    align-items: center;
    gap: .5rem;
}

.idf-val-badge {
    background: #F1F5F9;
    border-radius: 4px;
    padding: .1rem .4rem;
    font-size: 0.8125rem;
    color: #8B5CF6;
    font-variant-numeric: tabular-nums;
    min-width: 2ch;
    text-align: center
}

.idf-slider {
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    background: rgba(139, 92, 246, 0.2);
    border-radius: 3px;
    outline: none;
    cursor: pointer;
    width: 100%
}

.idf-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #8B5CF6;
    cursor: pointer
}

.idf-hint-text {
    font-size: 0.8125rem;
    color: #5A5A78;
    margin: .2rem 0 0
}

.idf-actions {
    display: flex;
    gap: .75rem;
    flex-wrap: wrap;
    margin-bottom: 1.25rem
}

.idf-btn {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .55rem 1.2rem;
    border-radius: 8px;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: opacity .2s, transform .1s
}

.idf-btn:active {
    transform: scale(.97)
}

.idf-btn--primary {
    background: #8B5CF6;
    color: #fff
}

.idf-btn--ghost {
    background: #F1F5F9;
    color: #475569;
}

.idf-btn--outline {
    background: transparent;
    color: #8B5CF6;
    border: 1.5px solid rgba(139, 92, 246, 0.5);
}

.idf-btn--outline:hover {
    background: rgba(139, 92, 246, 0.08);
    border-color: #8B5CF6;
}

.idf-summary {
    font-size: 1rem;
    color: #64748B;
    margin-bottom: 1rem;
    padding: .75rem;
    background: #F8FAFC;
    border-radius: 8px;
    border: 1px solid #E2E8F0
}

.idf-summary strong {
    color: #8B5CF6
}

.idf-groups {
    display: flex;
    flex-direction: column;
    gap: 1.25rem
}

.idf-group-card {
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    border-radius: 8px;
    padding: .75rem
}

.idf-group-images {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem
}

.idf-thumb {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .3rem
}

.idf-thumb img {
    width: 200px;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid #E2E8F0;
    transition: border-color .15s;
}

.idf-thumb img:hover {
    border-color: rgba(139, 92, 246, 0.4);
}

.idf-thumb-name {
    font-size: 0.8125rem;
    color: #64748B;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: center
}

.idf-no-dup {
    color: #8B5CF6;
    font-size: 0.9375rem;
    margin: .5rem 0;
    display: flex;
    align-items: center;
    gap: .4rem;
}

/* ── Loaded images bar ───────────────────────────────────────────────────── */
.idf-loaded-bar {
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    border-radius: 10px;
    padding: .85rem 1rem;
    margin-bottom: 1.25rem;
}

.idf-loaded-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    margin-bottom: .75rem;
    flex-wrap: wrap;
}

.idf-loaded-count {
    font-size: 0.875rem;
    font-weight: 600;
    color: #0F172A;
}

.idf-loaded-grid {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.idf-loaded-mini {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .2rem;
    width: 60px;
}

.idf-loaded-mini img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
    border: 1.5px solid #E2E8F0;
}

.idf-loaded-mini span {
    font-size: 0.6875rem;
    color: #64748B;
    max-width: 60px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: center;
}

.idf-loaded-more {
    width: 60px;
    height: 60px;
    border-radius: 6px;
    background: rgba(139, 92, 246, 0.08);
    border: 1.5px dashed rgba(139, 92, 246, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #8B5CF6;
}

/* ── Group header with similarity badge ──────────────────────────────────── */
.idf-group-hdr {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    margin-bottom: .75rem;
    flex-wrap: wrap;
}

.idf-group-title {
    font-size: 0.9375rem;
    color: #0F172A;
    font-weight: 700;
}

.idf-sim-badge {
    background: rgba(139, 92, 246, 0.12);
    color: #8B5CF6;
    font-size: 0.8125rem;
    font-weight: 700;
    padding: .2rem .6rem;
    border-radius: 20px;
    white-space: nowrap;
}

/* ── Val badge ───────────────────────────────────────────────────────────── */
.idf-val-badge {
    background: rgba(139, 92, 246, 0.15);
    color: #8B5CF6;
}

@media(max-width:600px) {
    .idf-thumb img {
        width: 140px;
        height: 140px;
    }

    .idf-thumb-name {
        max-width: 140px;
    }
}
/* ── Progress loader ─────────────────────────────────────────────────────── */
.idf-loader {
    margin-bottom: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: .6rem;
}

.idf-loader-bar {
    height: 6px;
    background: rgba(139, 92, 246, 0.15);
    border-radius: 99px;
    overflow: hidden;
}

.idf-loader-fill {
    height: 100%;
    width: 40%;
    background: #8B5CF6;
    border-radius: 99px;
    animation: idf-shimmer 1.2s ease-in-out infinite;
}

@keyframes idf-shimmer {
    0%   { transform: translateX(-100%); }
    100% { transform: translateX(300%); }
}

.idf-loader-text {
    font-size: 0.875rem;
    color: #8B5CF6;
    font-weight: 500;
}
