/**
 * MetaoFly - Tool 11: Client-Side PDF Signer, Watermark & Permanent Blackout Redactor
 * CSS Stylesheet - Strict 2-Column Desktop / 1-Column Mobile Responsive Architecture
 */

/* ── Root Workspace Variables & Container ── */
.psw-workspace {
    --psw-accent: #0284c7;
    --psw-accent-glow: rgba(2, 132, 199, 0.25);
    --psw-accent-hover: #0369a1;
    --psw-bg-dark: #0b0f19;
    --psw-card-bg: rgba(17, 24, 39, 0.75);
    --psw-card-border: rgba(255, 255, 255, 0.08);
    --psw-card-hover-border: rgba(2, 132, 199, 0.35);
    --psw-text-main: #f8fafc;
    --psw-text-muted: #94a3b8;
    --psw-danger: #f43f5e;
    --psw-success: #10b981;
    --psw-radius: 16px;
    --psw-radius-sm: 10px;

    width: 100%;
    box-sizing: border-box;
    font-family: inherit;
    color: var(--psw-text-main);
}

/* ── Tab Buttons ── */
.psw-tab-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 6px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md, 8px);
    color: var(--color-text-secondary, #94a3b8);
    font-size: 11.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.psw-tab-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

.psw-tab-btn.active {
    background: rgba(2, 132, 199, 0.2);
    border-color: #0284c7;
    color: #38bdf8;
}

/* ── Signature Subtabs ── */
.psw-sig-subtab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-sm, 6px);
    color: var(--color-text-secondary, #94a3b8);
    font-size: 11.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.psw-sig-subtab:hover {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.2);
}

.psw-sig-subtab.active {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.25);
    color: #ffffff;
}

/* ── Toggle Buttons & Color Swatches ── */
.psw-toggle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-sm, 6px);
    color: var(--color-text-secondary, #94a3b8);
    font-size: 11.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.psw-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

.psw-toggle-btn.active {
    background: rgba(2, 132, 199, 0.2);
    border-color: #0284c7;
    color: #38bdf8;
}

/* ── Stamp Pills ── */
.psw-stamp-pill {
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 9999px;
    color: var(--color-text-secondary, #94a3b8);
    font-size: 10.5px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.psw-stamp-pill:hover,
.psw-stamp-pill.active {
    background: rgba(2, 132, 199, 0.25);
    border-color: #38bdf8;
    color: #ffffff;
}

/* ── Form Tool Cards ── */
.psw-form-tool-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md, 8px);
    color: #ffffff;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

.psw-form-tool-card svg {
    color: #38bdf8;
    margin-bottom: 4px;
}

.psw-form-tool-card strong {
    font-size: 12px;
    font-weight: 700;
    display: block;
}

.psw-form-tool-card span {
    font-size: 10.5px;
    color: var(--color-text-tertiary, #64748b);
}

.psw-form-tool-card:hover {
    background: rgba(2, 132, 199, 0.12);
    border-color: rgba(56, 189, 248, 0.35);
    transform: translateY(-1px);
}

.psw-dropzone {
    position: relative;
    padding: 56px 36px;
    text-align: center;
    background: radial-gradient(circle at center, rgba(2, 132, 199, 0.06) 0%, rgba(15, 23, 42, 0.8) 100%);
    border: 2px dashed rgba(56, 189, 248, 0.35);
    border-radius: var(--psw-radius);
    cursor: pointer;
    transition: all 0.25s ease;
}

.psw-dropzone:hover,
.psw-dropzone.psw-dragover {
    border-color: #38bdf8;
    background: radial-gradient(circle at center, rgba(2, 132, 199, 0.12) 0%, rgba(15, 23, 42, 0.9) 100%);
    box-shadow: 0 0 35px rgba(2, 132, 199, 0.25);
    transform: translateY(-2px);
}

.psw-hidden-file-input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
    z-index: 5;
}

.psw-drop-icon-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 88px;
    height: 88px;
    border-radius: 50%;
    background: rgba(2, 132, 199, 0.12);
    border: 1px solid rgba(56, 189, 248, 0.3);
    color: #38bdf8;
    margin-bottom: 20px;
}

.psw-glow-ring {
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.4) 0%, transparent 70%);
    animation: pswPulse 3s infinite;
}

@keyframes pswPulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.psw-drop-title {
    font-size: 1.45rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 10px 0;
}

.psw-drop-desc {
    font-size: 0.95rem;
    color: var(--psw-text-muted);
    max-width: 640px;
    margin: 0 auto 28px auto;
    line-height: 1.6;
}

.psw-drop-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 14px;
    margin-bottom: 30px;
    position: relative;
    z-index: 6;
}

.psw-btn-browse,
.psw-btn-sample {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.psw-btn-browse {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    color: #fff;
    border: none;
    box-shadow: 0 4px 16px rgba(2, 132, 199, 0.4);
}

.psw-btn-browse:hover {
    background: linear-gradient(135deg, #0369a1 0%, #075985 100%);
    box-shadow: 0 6px 20px rgba(2, 132, 199, 0.6);
    transform: translateY(-1px);
}

.psw-btn-sample {
    background: rgba(255, 255, 255, 0.06);
    color: #e2e8f0;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.psw-btn-sample:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.2);
}

.psw-drop-features {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 24px;
    font-size: 0.85rem;
    color: #cbd5e1;
}

.psw-drop-features span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* ══════════════════════════════════════════════════════════
   TOP STUDIO TOOLBAR (Active when PDF loaded)
   ══════════════════════════════════════════════════════════ */
.psw-top-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    padding: 14px 20px;
    background: rgba(17, 24, 39, 0.7);
    border: 1px solid var(--psw-card-border);
    border-radius: var(--psw-radius);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
}

.psw-file-pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #f1f5f9;
}

.psw-pill-meta {
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--psw-text-muted);
    padding-left: 10px;
    border-left: 1px solid rgba(255, 255, 255, 0.12);
}

.psw-toolbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.psw-btn-small {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: #e2e8f0;
}

.psw-btn-small:hover {
    background: rgba(255, 255, 255, 0.1);
}

.psw-btn-top-export {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    border: none;
    color: #fff;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.3);
}

.psw-btn-top-export:hover {
    background: linear-gradient(135deg, #0369a1 0%, #075985 100%);
    box-shadow: 0 6px 18px rgba(2, 132, 199, 0.5);
}

/* ══════════════════════════════════════════════════════════
   STRICT 2-COLUMN DESKTOP / 1-COLUMN MOBILE GRID
   ══════════════════════════════════════════════════════════ */
.psw-studio-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(380px, 440px);
    gap: 24px;
    align-items: start;
}

/* ── COLUMN 1: STAGE / PAGE VIEWER ── */
.psw-stage-column {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.psw-page-nav-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    background: rgba(17, 24, 39, 0.7);
    border: 1px solid var(--psw-card-border);
    border-radius: var(--psw-radius-sm);
    flex-wrap: wrap;
    gap: 12px;
}

.psw-page-pager {
    display: flex;
    align-items: center;
    gap: 8px;
}

.psw-btn-page-nav,
.psw-btn-zoom {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 700;
    transition: all 0.2s ease;
}

.psw-btn-page-nav:hover,
.psw-btn-zoom:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.2);
}

.psw-page-indicator {
    font-size: 0.88rem;
    font-weight: 600;
    color: #cbd5e1;
    padding: 0 4px;
}

.psw-zoom-tools {
    display: flex;
    align-items: center;
    gap: 6px;
}

.psw-zoom-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--psw-text-muted);
    min-width: 44px;
    text-align: center;
}

.psw-btn-zoom-fit {
    width: auto;
    padding: 0 10px;
    font-size: 0.8rem;
}

.psw-draw-mode-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(244, 63, 94, 0.12);
    border: 1px solid rgba(244, 63, 94, 0.3);
    padding: 4px 12px;
    border-radius: 9999px;
}

.psw-toggle-switch {
    position: relative;
    display: inline-block;
    width: 34px;
    height: 18px;
    cursor: pointer;
}

.psw-toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.psw-toggle-slider {
    position: absolute;
    inset: 0;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    transition: 0.2s;
}

.psw-toggle-slider:before {
    position: absolute;
    content: "";
    height: 12px;
    width: 12px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    border-radius: 50%;
    transition: 0.2s;
}

.psw-toggle-switch input:checked + .psw-toggle-slider {
    background-color: var(--psw-danger);
}

.psw-toggle-switch input:checked + .psw-toggle-slider:before {
    transform: translateX(16px);
}

.psw-toggle-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #fda4af;
}

/* ── Interactive Document Viewport Area ── */
.psw-viewport-container {
    position: relative;
    min-height: 540px;
    max-height: 820px;
    overflow: auto;
    background: #060911;
    border: 1px solid var(--psw-card-border);
    border-radius: var(--psw-radius);
    padding: 24px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.5);
}

.psw-page-wrapper {
    position: relative;
    display: inline-block;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.1);
    background: #ffffff;
    -webkit-user-select: none;
    user-select: none;
    transition: transform 0.15s ease-out;
}

.psw-pdf-canvas {
    display: block;
    max-width: 100%;
    height: auto;
}

.psw-interactive-layer {
    position: absolute;
    inset: 0;
    overflow: visible;
    pointer-events: auto;
}

.psw-drawing-layer {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 20;
}

.psw-drawing-active .psw-drawing-layer {
    pointer-events: auto;
    cursor: crosshair;
}

/* ── Interactive Overlay Elements (Signatures, Redactions, Text) ── */
.psw-element-item {
    position: absolute;
    cursor: move;
    -webkit-user-select: none;
    user-select: none;
    touch-action: none;
    box-sizing: border-box;
    z-index: 10;
}

.psw-element-item.selected {
    outline: 2px dashed #0284c7;
    outline-offset: 2px;
}

.psw-element-item.psw-elem-redact-black {
    background: #000000;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.psw-element-item.psw-elem-redact-white {
    background: #ffffff;
    border: 1px dashed #cbd5e1;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
}

.psw-element-item.psw-elem-sig img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    pointer-events: none;
}

.psw-element-item.psw-elem-text {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid #94a3b8;
    color: #0f172a;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.85rem;
    white-space: nowrap;
}

.psw-element-delete-btn {
    position: absolute;
    top: -12px;
    right: -12px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--psw-danger);
    color: #fff;
    border: 2px solid #fff;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;
    font-weight: bold;
    z-index: 30;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.psw-element-item.selected .psw-element-delete-btn {
    display: flex;
}

.psw-element-resize-handle {
    position: absolute;
    bottom: -6px;
    right: -6px;
    width: 12px;
    height: 12px;
    background: #0284c7;
    border: 2px solid #fff;
    border-radius: 2px;
    cursor: nwse-resize;
    display: none;
    z-index: 30;
}

.psw-element-item.selected .psw-element-resize-handle {
    display: block;
}

/* ── Thumbnails Ribbon ── */
.psw-thumbs-ribbon {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 10px 4px;
}

.psw-thumbs-ribbon::-webkit-scrollbar {
    height: 6px;
}

.psw-thumbs-ribbon::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

@supports (scrollbar-width: thin) {
    .psw-thumbs-ribbon {
        scrollbar-width: thin;
    }
}

.psw-thumb-item {
    position: relative;
    flex: 0 0 70px;
    height: 95px;
    background: #ffffff;
    border: 2px solid transparent;
    border-radius: 6px;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.2s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.psw-thumb-item:hover {
    transform: translateY(-2px);
    border-color: rgba(56, 189, 248, 0.5);
}

.psw-thumb-item.active {
    border-color: #0284c7;
    box-shadow: 0 0 15px rgba(2, 132, 199, 0.6);
}

.psw-thumb-item canvas {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.psw-thumb-label {
    position: absolute;
    bottom: 2px;
    right: 4px;
    background: rgba(15, 23, 42, 0.8);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 1px 4px;
    border-radius: 3px;
}

/* ══════════════════════════════════════════════════════════
   COLUMN 2: CONTROLS, SIGNATURE PAD & EXPORT
   ══════════════════════════════════════════════════════════ */
.psw-controls-column {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.psw-tabs-header {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    padding: 6px;
    background: rgba(17, 24, 39, 0.7);
    border: 1px solid var(--psw-card-border);
    border-radius: var(--psw-radius);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
}

.psw-tab-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 10px 4px;
    background: transparent;
    border: none;
    border-radius: var(--psw-radius-sm);
    color: var(--psw-text-muted);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.psw-tab-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.04);
}

.psw-tab-btn.active {
    background: rgba(2, 132, 199, 0.15);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.3);
}

/* Cards */
.psw-card {
    background: var(--psw-card-bg);
    border: 1px solid var(--psw-card-border);
    border-radius: var(--psw-radius);
    padding: 20px;
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
}

.psw-card-header {
    margin-bottom: 16px;
}

.psw-step-tag {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #38bdf8;
    background: rgba(2, 132, 199, 0.12);
    padding: 3px 8px;
    border-radius: 6px;
    margin-bottom: 6px;
}

.psw-tag-danger {
    color: #fda4af;
    background: rgba(244, 63, 94, 0.15);
}

.psw-tag-success {
    color: #6ee7b7;
    background: rgba(16, 185, 129, 0.15);
}

.psw-card-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0;
    color: #fff;
}

/* Signature Sub-Tabs */
.psw-sig-subtabs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    margin-bottom: 16px;
    background: rgba(255, 255, 255, 0.04);
    padding: 4px;
    border-radius: 10px;
}

.psw-sig-subtab {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 4px;
    background: transparent;
    border: none;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--psw-text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
}

.psw-sig-subtab:hover {
    color: #fff;
}

.psw-sig-subtab.active {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

/* Draw Signature Pad */
.psw-draw-pad-wrap {
    position: relative;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 12px;
}

.psw-draw-pad-canvas {
    display: block;
    width: 100%;
    height: 150px;
    cursor: crosshair;
    background: #ffffff;
    touch-action: none;
}

.psw-draw-pad-hint {
    position: absolute;
    bottom: 6px;
    right: 8px;
    font-size: 0.7rem;
    color: #94a3b8;
    pointer-events: none;
}

.psw-draw-tools-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.psw-ink-colors {
    display: flex;
    align-items: center;
    gap: 8px;
}

.psw-ink-label {
    font-size: 0.8rem;
    color: var(--psw-text-muted);
}

.psw-ink-btn {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
}

.psw-ink-btn.active {
    border-color: #fff;
    box-shadow: 0 0 8px currentColor;
    transform: scale(1.15);
}

.psw-btn-ghost-small {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--psw-text-muted);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 6px;
    cursor: pointer;
}

.psw-btn-ghost-small:hover {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.3);
}

/* Type Signature Inputs & Fonts */
.psw-input-group {
    margin-bottom: 14px;
}

.psw-label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: #cbd5e1;
    margin-bottom: 6px;
}

.psw-text-input {
    width: 100%;
    padding: 10px 14px;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid var(--psw-card-border);
    border-radius: 8px;
    color: #fff;
    font-size: 0.95rem;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.psw-text-input:focus {
    outline: none;
    border-color: #0284c7;
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.2);
}

.psw-font-choices {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.psw-font-card {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.psw-font-card input {
    margin-right: 12px;
}

.psw-font-card.active {
    background: rgba(2, 132, 199, 0.1);
    border-color: #0284c7;
}

.psw-font-preview {
    font-size: 1.35rem;
    color: #f1f5f9;
}

.psw-cursive-1 { font-family: 'Great Vibes', 'Brush Script MT', cursive; }
.psw-cursive-2 { font-family: 'Dancing Script', 'Segoe Script', cursive; font-style: italic; }
.psw-cursive-3 { font-family: 'Caveat', 'Comic Sans MS', cursive; font-weight: 600; }
.psw-cursive-4 { font-family: 'Sacramento', 'Lucida Handwriting', cursive; }

/* Upload Paper Photo */
.psw-paper-dropzone {
    position: relative;
    padding: 24px;
    text-align: center;
    border: 2px dashed rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    cursor: pointer;
    margin-bottom: 14px;
    color: var(--psw-text-muted);
    font-size: 0.85rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.psw-paper-dropzone:hover {
    border-color: #38bdf8;
    color: #fff;
}

.psw-paper-preview-canvas-box {
    background: #fff;
    border-radius: 8px;
    padding: 8px;
    margin-bottom: 10px;
    text-align: center;
}

.psw-paper-preview-canvas-box canvas {
    max-width: 100%;
    max-height: 100px;
}

/* Sliders */
.psw-slider-row {
    margin-bottom: 14px;
}

.psw-slider-head {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #cbd5e1;
    margin-bottom: 6px;
}

.psw-range {
    width: 100%;
    accent-color: #0284c7;
    cursor: pointer;
}

/* Buttons */
.psw-btn-place {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px;
    font-size: 0.95rem;
    font-weight: 700;
    border-radius: 10px;
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    color: #fff;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(2, 132, 199, 0.35);
    transition: all 0.2s ease;
}

.psw-btn-place:hover {
    background: linear-gradient(135deg, #0369a1 0%, #075985 100%);
    box-shadow: 0 6px 18px rgba(2, 132, 199, 0.5);
    transform: translateY(-1px);
}

.psw-help-hint {
    font-size: 0.75rem;
    color: var(--psw-text-muted);
    text-align: center;
    margin: 8px 0 0 0;
}

/* Redaction Panel Styles */
.psw-alert-security {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px;
    background: rgba(244, 63, 94, 0.1);
    border: 1px solid rgba(244, 63, 94, 0.25);
    border-radius: 10px;
    margin-bottom: 16px;
    font-size: 0.8rem;
    line-height: 1.5;
}

.psw-alert-security strong {
    color: #fda4af;
    display: block;
    margin-bottom: 2px;
}

.psw-alert-security p {
    margin: 0;
    color: #cbd5e1;
}

.psw-btn-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 14px;
}

.psw-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #cbd5e1;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.psw-toggle-btn.active {
    background: rgba(2, 132, 199, 0.15);
    border-color: #0284c7;
    color: #38bdf8;
}

.psw-color-swatch {
    width: 14px;
    height: 14px;
    border-radius: 3px;
}

.psw-checkbox-row {
    margin-bottom: 14px;
}

.psw-custom-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.82rem;
    color: #cbd5e1;
}

.psw-btn-block {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 11px;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #fff;
    cursor: pointer;
    transition: all 0.2s;
}

.psw-btn-block:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Watermark Panel Styles */
.psw-stamp-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.psw-stamp-pill {
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #cbd5e1;
    cursor: pointer;
    transition: all 0.2s;
}

.psw-stamp-pill.active,
.psw-stamp-pill:hover {
    background: rgba(2, 132, 199, 0.2);
    border-color: #0284c7;
    color: #38bdf8;
}

/* Form Tools Grid */
.psw-form-tools-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.psw-form-tool-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 16px 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    cursor: pointer;
    color: #cbd5e1;
    transition: all 0.2s ease;
}

.psw-form-tool-card:hover {
    background: rgba(2, 132, 199, 0.1);
    border-color: #0284c7;
    color: #fff;
    transform: translateY(-2px);
}

.psw-form-tool-card svg {
    margin-bottom: 8px;
    color: #38bdf8;
}

.psw-form-tool-card strong {
    font-size: 0.85rem;
    display: block;
    margin-bottom: 2px;
}

.psw-form-tool-card span {
    font-size: 0.7rem;
    color: var(--psw-text-muted);
}

/* Save & Export Card */
.psw-export-card {
    border-color: rgba(16, 185, 129, 0.25);
    background: linear-gradient(135deg, rgba(17, 24, 39, 0.8) 0%, rgba(6, 78, 59, 0.15) 100%);
}

.psw-elements-summary {
    font-size: 0.85rem;
    font-weight: 600;
    color: #cbd5e1;
    background: rgba(0, 0, 0, 0.3);
    padding: 8px 12px;
    border-radius: 8px;
    margin-bottom: 14px;
    text-align: center;
}

.psw-progress-wrap {
    margin-bottom: 14px;
}

.psw-progress-head {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #38bdf8;
    margin-bottom: 6px;
    font-weight: 600;
}

.psw-progress-bar-bg {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.psw-progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #0284c7 0%, #10b981 100%);
    border-radius: 4px;
    transition: width 0.2s ease;
}

.psw-btn-export {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px;
    font-size: 1.05rem;
    font-weight: 700;
    border-radius: 12px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #fff;
    border: none;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
    transition: all 0.2s ease;
}

.psw-btn-export:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.6);
    transform: translateY(-2px);
}

.psw-security-footer-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.78rem;
    color: #94a3b8;
    margin-top: 12px;
    text-align: center;
}

/* ══════════════════════════════════════════════════════════
   RESPONSIVE DESIGN (Strict 1-Column Mobile Layout)
   ══════════════════════════════════════════════════════════ */
@media (max-width: 1023px) {
    .psw-studio-grid {
        display: flex;
        flex-direction: column;
        gap: 20px;
    }

    .psw-header-banner {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
        padding: 20px;
    }

    .psw-quick-badges {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .psw-viewport-container {
        min-height: 420px;
        max-height: 600px;
        padding: 12px;
    }

    .psw-top-toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .psw-toolbar-actions {
        justify-content: space-between;
    }
}

@media (max-width: 640px) {
    .psw-dropzone {
        padding: 36px 16px;
    }

    .psw-studio-title {
        font-size: 1.45rem;
    }

    .psw-drop-actions {
        flex-direction: column;
        width: 100%;
    }

    .psw-btn-browse,
    .psw-btn-sample {
        width: 100%;
        justify-content: center;
    }

    .psw-page-nav-bar {
        justify-content: center;
    }
}
