/* ===== Outer Studio Card ===== */
.pcp-wrapper {
    background: radial-gradient(circle at top left, #111827, #020617);
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.5);
    padding: 16px 18px 14px;
    max-width: 1100px;
    margin: 0 auto;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #e5e7eb;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.9);
}

/* Toolbar */
.pcp-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}
.pcp-toolbar-left,
.pcp-toolbar-right {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}
.pcp-title {
    font-size: 13px;
    color: #9ca3af;
}

/* File btn */
.pcp-file-btn {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #f9fafb;
    padding: 7px 18px;
    border-radius: 999px;
    border: 1px solid rgba(34, 197, 94, 0.9);
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 0 0 1px rgba(22, 163, 74, 0.4),
                0 8px 20px rgba(22, 163, 74, 0.5);
    transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
}
.pcp-file-btn:hover { transform: translateY(-1px); filter: brightness(1.06); }
.pcp-file-btn input { display: none; }

/* Buttons */
.pcp-btn {
    background: rgba(15, 23, 42, 0.92);
    border: 1px solid rgba(55, 65, 81, 0.9);
    padding: 6px 12px;
    border-radius: 999px;
    color: #e5e7eb;
    font-size: 13px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: background 0.12s ease, border-color 0.12s ease, transform 0.1s ease;
}
.pcp-btn:hover {
    background: #0ea5e9;
    border-color: #0ea5e9;
    color: #020617;
    transform: translateY(-0.5px);
}
.pcp-btn:disabled { opacity: .35; cursor: not-allowed; transform: none; }

.pcp-btn-primary {
    background: linear-gradient(135deg, #0ea5e9, #22c55e);
    border: 1px solid rgba(56, 189, 248, 0.9);
    color: #0b1120;
    font-weight: 500;
    padding-inline: 18px;
    box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.55),
                0 10px 25px rgba(15, 118, 110, 0.9);
}

/* Clear button */
#pcp-reset {
    background: rgba(15,23,42,0.6);
    border-style: dashed;
    border-color: rgba(148,163,184,.8);
}

/* Canvas */
.pcp-canvas-wrap {
    position: relative;
    width: 100%;
    background: radial-gradient(circle at top, #020617, #020617);
    border-radius: 12px;
    border: 1px solid rgba(51, 65, 85, 0.9);
    overflow: hidden;
    min-height: 260px;
}
#pcp-pdf {
    display: block;
    width: 100%;
    height: auto;
    background: radial-gradient(circle at top, #111827, #020617);
}
#pcp-overlay {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    cursor: crosshair;
}

/* Bottom bar */
.pcp-bottom-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}
.pcp-page-group {
    display: flex;
    align-items: center;
    gap: 6px;
}
.pcp-page-label {
    font-size: 13px;
    color: #e5e7eb;
    background: rgba(15, 23, 42, 0.9);
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid rgba(55, 65, 81, 0.8);
}

/* QUALITY ENHANCER BOX */
.pcp-quality-box {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 6px 10px;
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(55, 65, 81, 0.9);
    min-width: 260px;
}
.pcp-quality-row {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #cbd5f5;
}
.pcp-quality-label {
    width: 70px;
    text-align: right;
    opacity: 0.9;
}
.pcp-select {
    background: #020617;
    border: 1px solid #4b5563;
    color: #e5e7eb;
    border-radius: 999px;
    padding: 3px 10px;
    font-size: 12px;
}
#pcp-enhance { flex: 1; }
.pcp-enhance-val {
    width: 40px;
    text-align: right;
}
.pcp-auto-label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #e5e7eb;
}
.pcp-auto-label input { accent-color: #0ea5e9; }

/* Status */
.pcp-status {
    margin-top: 8px;
    font-size: 12px;
    color: #9ca3af;
}
.pcp-status.pcp-ok { color: #4ade80; }
.pcp-status.pcp-error { color: #f97373; }

/* Responsive */
@media (max-width: 768px) {
    .pcp-wrapper { padding: 12px; }
    .pcp-bottom-bar { align-items: flex-start; }
    .pcp-btn-primary {
        width: 100%;
        justify-content: center;
    }
}
