#pdf-delp-ui {
    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;
}

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

#delp-drop-zone {
    border: 2px dashed #e0e0e0;
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 1rem;
    transition: all 0.25s ease;
}

#delp-drop-zone.delp-drag {
    border-color: #4e73df;
    background: #f8f9ff;
}

.delp-icon { font-size: 48px; margin-bottom: 1rem; }
.delp-icon-ok { color: #28a745; }

#delp-drop-zone p { color: #7f8c8d; margin-bottom: 1rem; }
.delp-hint { color: #95a5a6; font-size: 14px; margin-top: 0.5rem; }
.delp-filename { color: #4e73df; font-weight: 600; margin-top: 0.5rem; }

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

.delp-btn {
    display: inline-block;
    padding: 10px 18px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.2s ease;
    text-decoration: none;
}

.delp-btn-primary { background: #4e73df; color: #fff; }
.delp-btn-primary:hover { background: #3d5fc4; }
.delp-btn-secondary { background: #eef2ff; color: #334155; margin: 4px 2px; }
.delp-btn-secondary:hover { background: #dbe4ff; }
.delp-btn-success { background: #28a745; color: #fff; }

.delp-link-btn {
    background: none;
    border: none;
    color: #4e73df;
    cursor: pointer;
    text-decoration: underline;
    font-size: 14px;
    margin-top: 12px;
}

.delp-mode-tabs {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.delp-mode-tab {
    padding: 8px 16px;
    border: 1px solid #dbe4ff;
    border-radius: 999px;
    background: #fff;
    cursor: pointer;
    font-size: 14px;
    color: #475569;
}

.delp-mode-tab.is-active {
    background: #4e73df;
    border-color: #4e73df;
    color: #fff;
}

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

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

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

.delp-selection-info {
    font-weight: 600;
    color: #334155;
}

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

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

.delp-thumb:hover {
    border-color: #93c5fd;
}

.delp-thumb.is-marked {
    border-color: #dc2626;
    box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.2);
}

.delp-thumb.is-marked.mode-keep {
    border-color: #16a34a;
    box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.25);
}

.delp-thumb-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #dc2626;
    color: #fff;
    font-size: 14px;
    line-height: 22px;
    font-weight: 700;
    display: none;
}

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

.delp-thumb.is-marked.mode-keep .delp-thumb-badge {
    background: #16a34a;
}

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

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

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

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

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

.delp-actions { margin-top: 0.5rem; }

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

#delp-progress-bar {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, #4e73df, #28a745);
    transition: width 0.15s ease;
}

.delp-result-info {
    color: #64748b;
    margin-bottom: 1rem;
}

.delp-status {
    margin-top: 1rem;
    color: #374151;
    font-size: 14px;
}

.delp-status-error { color: #dc2626; }

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