#pdf-dup-ui {
    --dup-accent: #7c3aed;
    --dup-accent-hover: #6d28d9;
    --dup-accent-soft: #f5f3ff;
    --dup-success: #059669;
    max-width: 980px;
    margin: 0 auto;
    padding: 2rem;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    font-family: 'Segoe UI', system-ui, sans-serif;
}

.dup-section { text-align: center; }
.dup-section h3, .dup-section h4 { color: #2c3e50; margin-bottom: 0.5rem; }

.dup-lead {
    color: #64748b;
    font-size: 15px;
    margin: 0 0 1.25rem;
}

#dup-drop-zone {
    border: 2px dashed #e0e0e0;
    border-radius: 10px;
    padding: 2rem;
    margin-bottom: 1rem;
    transition: border-color 0.2s, background 0.2s;
}

#dup-drop-zone.dup-drag {
    border-color: var(--dup-accent);
    background: var(--dup-accent-soft);
}

.dup-icon { font-size: 48px; margin-bottom: 1rem; }
.dup-icon-ok { color: var(--dup-success); }

#dup-pdf-upload { display: none; }

.dup-btn {
    display: inline-block;
    padding: 10px 18px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

.dup-btn-primary { background: var(--dup-accent); color: #fff; }
.dup-btn-primary:hover { background: var(--dup-accent-hover); }
.dup-btn-secondary { background: var(--dup-accent-soft); color: #5b21b6; margin: 4px 2px; }
.dup-btn-secondary:hover { background: #ede9fe; }
.dup-btn-success { background: var(--dup-success); color: #fff; }

.dup-link-btn {
    background: none;
    border: none;
    color: var(--dup-accent);
    cursor: pointer;
    text-decoration: underline;
    font-size: 14px;
    margin-top: 12px;
}

.dup-filename { color: var(--dup-accent); font-weight: 600; margin-top: 0.5rem; }
.dup-hint { color: #95a5a6; font-size: 14px; }

.dup-mode-hint {
    color: #64748b;
    font-size: 14px;
    margin: 0 0 1rem;
    text-align: center;
}

.dup-toolbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin-bottom: 1rem;
}

.dup-page-info,
.dup-selection-info {
    text-align: left;
    font-size: 14px;
    color: #64748b;
    margin: 0 0 0.5rem;
}

.dup-selection-info {
    font-weight: 600;
    color: #5b21b6;
    padding: 10px 14px;
    background: var(--dup-accent-soft);
    border-radius: 8px;
    border-left: 4px solid var(--dup-accent);
}

.dup-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 1rem;
    justify-content: flex-start;
}

.dup-thumb {
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    padding: 8px;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s;
    position: relative;
    text-align: center;
}

.dup-thumb:hover { border-color: #c4b5fd; }

.dup-thumb.is-marked {
    border-color: var(--dup-accent);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.2);
    background: #faf5ff;
}

.dup-thumb-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    padding: 2px 7px;
    border-radius: 6px;
    background: var(--dup-accent);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    display: none;
}

.dup-thumb.is-marked .dup-thumb-badge { display: block; }

.dup-page-canvas {
    display: block;
    max-width: 120px;
    height: auto;
    margin: 0 auto;
}

.dup-page-label {
    font-size: 12px;
    margin-top: 6px;
    color: #64748b;
    font-weight: 600;
}

.dup-extra-label {
    display: block;
    text-align: left;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
}

.dup-extra-hint { font-weight: 400; color: #94a3b8; }

.dup-extra-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 15px;
    box-sizing: border-box;
    margin-bottom: 1rem;
}

.dup-progress-track {
    height: 8px;
    background: #e5e7eb;
    border-radius: 999px;
    overflow: hidden;
    margin: 1rem auto;
    max-width: 420px;
}

#dup-progress-bar {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--dup-accent), var(--dup-success));
    transition: width 0.15s;
}

.dup-result-info { color: #64748b; margin-bottom: 1rem; }
.dup-status { margin-top: 1rem; font-size: 14px; }
.dup-status-error { color: #dc2626; }

@media (max-width: 640px) {
    #pdf-dup-ui { padding: 1rem; }
}
