.pro-pdf-works-wrapper {
    
    color: #111827;
    background: #f9fafb;
    border-radius: 16px;
    padding: 32px;
    margin: 24px 0;
    box-sizing: border-box;
    width: 100%;
    position: relative;
    border: 1px solid #e5e7eb;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.pro-pdf-works-wrapper * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.pro-pdf-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 20px;
    margin-bottom: 24px;
}

.pro-pdf-header h2 {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.025em;
    color: #111827;
}

.pro-pdf-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.pro-pdf-btn-primary {
    background: #076951;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.pro-pdf-btn-primary:hover {
    background: #05523f;
}

.pro-pdf-btn-secondary {
    background: white;
    color: #4b5563;
    border: 1px solid #d1d5db;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.pro-pdf-btn-secondary:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

.pro-pdf-btn-primary:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    opacity: 0.7;
    box-shadow: none;
}

.pro-pdf-btn-danger {
    background: transparent;
    color: #dc2626;
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.pro-pdf-btn-danger:hover {
    background: #fef2f2;
}

.pro-pdf-upload-zone {
    border: 2px dashed #d1d5db;
    border-radius: 16px;
    padding: 64px 24px;
    text-align: center;
    background: white;
    transition: all 0.2s;
    cursor: pointer;
}

.pro-pdf-upload-zone.drag-active {
    background: rgba(7, 105, 81, 0.05);
    border-color: #076951;
    transform: scale(1.02);
}

.pro-pdf-upload-zone.disabled {
    pointer-events: none;
    opacity: 0.8;
}

.pro-pdf-upload-zone:hover {
    border-color: #9ca3af;
}

.pro-pdf-upload-content h3 {
    margin: 20px 0 8px;
    font-size: 20px;
    font-weight: 600;
    color: #111827;
}

.pro-pdf-upload-content p {
    color: #6b7280;
    margin-bottom: 28px;
    font-size: 14px;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
}

.pro-pdf-icon {
    color: #076951;
    background: rgba(7, 105, 81, 0.1);
    padding: 16px;
    border-radius: 50%;
    width: 64px;
    height: 64px;
    margin: 0 auto;
}

.pro-pdf-workspace {
    background: white;
    border-radius: 16px;
    padding: 24px;
    border: 1px solid #e5e7eb;
}

.pro-pdf-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.pro-pdf-info strong {
    display: block;
    font-size: 18px;
    color: #111827;
    margin-bottom: 4px;
    word-break: break-word;
}

.pro-pdf-info span {
    color: #6b7280;
    font-size: 14px;
}

.pro-pdf-hint {
    background: #f3f4f6;
    padding: 8px 16px;
    border-radius: 24px;
    font-size: 13px;
    color: #4b5563;
    display: flex;
    align-items: center;
    font-weight: 500;
}

.pro-pdf-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 24px;
}

.pro-pdf-page-item {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    background: #f9fafb;
    position: relative;
    display: flex;
    flex-direction: column;
    cursor: grab;
    transition: box-shadow 0.2s, border-color 0.2s;
}

.pro-pdf-page-item:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    border-color: #d1d5db;
}

.pro-pdf-page-item:active {
    cursor: grabbing;
}

.pro-pdf-ghost {
    opacity: 0.4;
    background: #e5e7eb;
}

.pro-pdf-page-item.selected {
    border-color: #076951;
    box-shadow: 0 0 0 2px #076951;
}

.pro-pdf-page-checkbox {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 20px;
    height: 20px;
    z-index: 10;
    cursor: pointer;
    accent-color: #076951;
}

.pro-pdf-page-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(0,0,0,0.7);
    color: white;
    font-size: 12px;
    font-weight: 600;
    font-family: monospace;
    padding: 4px 8px;
    border-radius: 6px;
    z-index: 10;
}

.pro-pdf-page-thumb {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    overflow: hidden;
    min-height: 220px;
}

.pro-pdf-page-thumb img {
    max-width: 100%;
    max-height: 220px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    background: white;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
    pointer-events: none;
}

.pro-pdf-page-actions {
    display: flex;
    border-top: 1px solid #e5e7eb;
    background: white;
}

.pro-pdf-action-btn {
    flex: 1;
    border: none;
    background: transparent;
    padding: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    transition: background 0.2s, color 0.2s;
}

.pro-pdf-action-btn:hover {
    background: #f3f4f6;
    color: #111827;
}

.pro-pdf-action-btn.delete:hover {
    color: #dc2626;
    background: #fef2f2;
}

.pro-pdf-action-btn.rotate:hover {
    color: #076951;
    background: rgba(7, 105, 81, 0.1);
}

.pro-pdf-loading {
    text-align: center;
    padding: 64px;
}

.pro-pdf-spinner {
    border: 4px solid #f3f4f6;
    border-top: 4px solid #076951;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    animation: pro-pdf-spin 1s linear infinite;
    margin: 0 auto 20px;
}

.pro-pdf-loading p {
    color: #4b5563;
    font-size: 15px;
    font-weight: 500;
}

.pro-pdf-error {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #f87171;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 24px;
    font-size: 14px;
}

.pro-pdf-progress-container {
    margin-top: 24px;
    text-align: left;
    width: 100%;
}

.pro-pdf-progress-text {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 4px;
    color: #076951;
}

.pro-pdf-progress-text span:last-child {
    color: #6b7280;
}

.pro-pdf-progress-bar-bg {
    background: #e5e7eb;
    border-radius: 9999px;
    height: 8px;
    overflow: hidden;
    width: 100%;
}

.pro-pdf-progress-bar-fill {
    background: #076951;
    height: 100%;
    border-radius: 9999px;
    transition: width 0.3s ease-out;
}

.pro-pdf-sticky-footer {
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    border-top: 1px solid #e5e7eb;
    margin: 24px -32px -32px -32px;
    padding: 16px 32px;
    box-shadow: 0 -10px 15px -3px rgba(0,0,0,0.05);
    z-index: 20;
}

.pro-pdf-footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pro-pdf-footer-left {
    flex: 1;
}

.pro-pdf-footer-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

@keyframes pro-pdf-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@media (max-width: 640px) {
    .pro-pdf-header-content {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 12px;
    }
    .pro-pdf-actions {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 12px !important;
    }
    .pro-pdf-actions > div {
        width: 100%;
        justify-content: flex-start !important;
        flex-direction: column;
        align-items: stretch !important;
        gap: 12px;
    }
    .pro-pdf-actions > div > div {
        width: 100%;
        justify-content: space-between;
    }
    #pro-pdf-add-pdf {
        width: 100%;
        justify-content: center;
        margin: 0 !important;
    }
    #pro-pdf-main-header {
        padding: 12px 16px !important;
    }
    #pro-pdf-workspace-container {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
    }
    .pro-pdf-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 16px;
    }
    .pro-pdf-page-thumb {
        min-height: 180px;
    }
    .pro-pdf-page-thumb img {
        max-height: 180px;
    }
    .pro-pdf-toolbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    .pro-pdf-footer-inner {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    .pro-pdf-footer-actions {
        flex-direction: column;
        width: 100%;
    }
    .pro-pdf-footer-actions button {
        width: 100%;
        justify-content: center;
        margin: 0 !important;
    }
    .pro-pdf-works-wrapper {
        padding: 16px !important;
        margin: 12px 0 !important;
    }
    .pro-pdf-sticky-footer {
        margin: 24px -16px -16px -16px;
        padding: 16px;
    }
}
