:root {
    --bg-primary: #0c0a09;
    --bg-secondary: #1c1917;
    --bg-card: #292524;
    --bg-card-hover: #33302e;
    --text-primary: #fefce8;
    --text-secondary: #d6d3d1;
    --text-muted: #a8a29e;
    --border-color: #44403c;
    --border-hover: #57534e;
    --accent-blue: #fbbf24;
    --accent-purple: #f59e0b;
    --accent-green: #eab308;
    --accent-orange: #f97316;
    --accent-red: #ef4444;
    --accent-cyan: #fcd34d;
    --accent-pink: #fbbf24;
    --convert-color: #fbbf24;
    --organize-color: #eab308;
    --edit-color: #f97316;
    --secure-color: #ef4444;
    --optimize-color: #f59e0b;
    --view-color: #fcd34d;
    --ai-color: #fbbf24;
    --shadow-md: 0 4px 14px rgba(0,0,0,0.4);
    --shadow-glow: 0 0 20px rgba(251,191,36,0.12);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
* { margin:0; padding:0; box-sizing:border-box; }
body {
    font-family: var(--font);
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}
::-webkit-scrollbar { width:6px; height:6px; }
::-webkit-scrollbar-track { background:transparent; }
::-webkit-scrollbar-thumb { background:var(--border-color); border-radius:3px; }
.navbar {
    position:fixed; top:0; left:0; right:0; z-index:1000;
    background: rgba(10,14,26,0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
}
.nav-inner {
    max-width:1400px; margin:0 auto; padding:0 24px;
    height:68px; display:flex; align-items:center; gap:24px;
}
.nav-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; flex-shrink: 0; }
.brand-icon {
    width: 40px; height: 40px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #fbbf24;
    font-size: 1.25rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: 2px solid transparent;
}
.brand-text { display: flex; flex-direction: column; }
.brand-name {
    font-size: 1.125rem; font-weight: 800;
    color: #ffffff;
    line-height: 1.2;
    margin-bottom: 2px;
}
.brand-tagline {
    font-size: 0.7rem; font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
}

/* Light theme: clean indigo/blue logo */
html[data-theme="light"] .brand-icon {
    background: #eef2ff;
    color: #4f46e5;
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.1);
    border-color: #c7d2fe;
}

/* Dark theme: white outline */
html[data-theme="dark"] .brand-icon {
    background: rgba(255, 255, 255, 0.1);
    color: #fbbf24;
    border-color: #ffffff;
}
html[data-theme="light"] .brand-name { color: #0f172a; }
html[data-theme="light"] .brand-tagline { color: #64748b; }
.nav-search { flex:1; max-width:400px; position:relative; }
.nav-search .search-icon {
    position:absolute; left:14px; top:50%;
    transform:translateY(-50%); color:var(--text-muted);
    font-size:14px; pointer-events:none;
}
#globalSearch {
    width:100%; padding:10px 14px 10px 40px;
    background:var(--bg-secondary); border:1px solid var(--border-color);
    border-radius:50px; color:var(--text-primary); font-size:14px;
    font-family:var(--font); outline:none; transition:var(--transition);
}
#globalSearch:focus { border-color:var(--accent-blue); box-shadow:0 0 0 3px rgba(251,191,36,0.15); }
.nav-badge {
    padding:6px 14px; background:rgba(251,191,36,0.1);
    color:#f59e0b; border-radius:50px; font-size:13px; font-weight:500;
    border:1px solid rgba(251,191,36,0.2);
}
.nav-link {
    color:var(--text-secondary); font-size:14px; font-weight:600;
    padding:6px 14px; border-radius:50px; transition:var(--transition);
    text-decoration:none;
}
.nav-link:hover { color:var(--accent-blue); background:rgba(251,191,36,0.08); }
@media (max-width: 640px) {
    .nav-link { display:none; }
}

.coming-soon-badge {
    position: absolute;
    top: 12px; right: 12px;
    padding: 4px 12px;
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
    color: #0c0a09;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    z-index: 5;
    box-shadow: 0 2px 8px rgba(251,191,36,0.3);
    pointer-events: none;
}

.tool-card.coming-soon {
    opacity: 0.7;
    pointer-events: none;
}

.tool-card.coming-soon .tool-card-action .tool-cta {
    color: var(--text-muted);
}

.tool-card.coming-soon .tool-card-action .tool-cta i {
    display: none;
}

.tool-card.coming-soon .tool-card-icon {
    filter: grayscale(0.5);
}

/* Coming Soon page */
.coming-soon-page {
    text-align: center;
    padding: 80px 24px;
    max-width: 600px;
    margin: 0 auto;
}

.coming-soon-page .coming-soon-icon {
    width: 100px; height: 100px;
    background: linear-gradient(135deg, rgba(251,191,36,0.12), rgba(251,191,36,0.12));
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 44px;
    color: #fbbf24;
    margin: 0 auto 24px;
    animation: wmRingPulse 2s ease-out infinite;
}

.coming-soon-page h1 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 12px;
}

.coming-soon-page p {
    color: var(--text-secondary);
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 32px;
}

.coming-soon-page .coming-soon-progress {
    max-width: 320px;
    margin: 0 auto 16px;
}

.coming-soon-page .coming-soon-progress .progress-bar {
    width: 100%;
    height: 6px;
    background: var(--bg-card);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.coming-soon-page .coming-soon-progress .progress-fill {
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
    border-radius: 4px;
    animation: progressPulse 2s ease-in-out infinite;
}

@keyframes progressPulse {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

.coming-soon-page .coming-soon-progress .progress-label {
    font-size: 13px;
    color: var(--text-muted);
}

.coming-soon-page .btn-home {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
    color: #0c0a09;
    border: none;
    border-radius: 12px;
    font-family: var(--font);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.25s ease;
    box-shadow: 0 4px 16px rgba(251,191,36,0.3);
}

.coming-soon-page .btn-home:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(251,191,36,0.4);
}
.hero {
    position:relative; padding:140px 24px 80px;
    text-align:center; overflow:hidden;
}
.hero-bg {
    position:absolute; inset:0;
    background: radial-gradient(ellipse 80% 50% at 50% -20%, rgba(251,191,36,0.08), transparent),
                radial-gradient(ellipse 60% 40% at 70% 60%, rgba(251,191,36,0.06), transparent);
    pointer-events:none;
}
.hero-content { position:relative; max-width:800px; margin:0 auto; }
.hero h1 { font-size:clamp(36px,6vw,64px); font-weight:800; line-height:1.1; margin-bottom:16px; }
.gradient-text {
    background: linear-gradient(135deg, #fbbf24, #f59e0b, #f97316);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.hero-subtitle { font-size:18px; color:var(--text-secondary); margin-bottom:40px; max-width:500px; margin:0 auto 40px; }
.hero-stats { display:flex; justify-content:center; gap:40px; }
.stat-item { display:flex; flex-direction:column; align-items:center; }
.stat-num { font-size:28px; font-weight:700; color:var(--text-primary); }
.stat-label { font-size:13px; color:var(--text-muted); margin-top:2px; }
.categories-section { max-width:1400px; margin:0 auto; padding:0 24px 24px; }
.section-header { display:flex; align-items:center; justify-content:space-between; margin-bottom:16px; }
.section-header h2 { font-size:20px; font-weight:600; }
.tools-count { font-size:14px; color:var(--text-muted); }
.categories-scroll { display:flex; gap:10px; overflow-x:auto; padding-bottom:4px; }
.category-chip {
    display:flex; align-items:center; gap:8px;
    padding:10px 20px; background:var(--bg-card);
    border:1px solid var(--border-color); border-radius:50px;
    color:var(--text-secondary); font-size:14px; font-family:var(--font);
    cursor:pointer; transition:var(--transition); white-space:nowrap; flex-shrink:0;
}
.category-chip:hover { background:var(--bg-card-hover); border-color:var(--border-hover); color:var(--text-primary); }
.category-chip.active {
    background:linear-gradient(135deg, #f59e0b, #fbbf24);
    border-color:transparent; color:#0c0a09;
    box-shadow:0 4px 14px rgba(251,191,36,0.3);
}
.tools-section { max-width:1400px; margin:0 auto; padding:0 24px 80px; }
.tools-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(300px,1fr)); gap:16px; }
.tool-card {
    display:flex; flex-direction:column; padding:24px;
    background:var(--bg-card); border:1px solid var(--border-color);
    border-radius:var(--radius-md); text-decoration:none; color:inherit;
    transition:var(--transition); position:relative; overflow:hidden;
}
.tool-card::before {
    content:''; position:absolute; top:0; left:0; right:0; height:2px;
    background:linear-gradient(90deg, var(--icon-color, var(--accent-blue)), transparent);
    opacity:0; transition:var(--transition);
}
.tool-card:hover { transform:translateY(-2px); border-color:var(--border-hover); box-shadow:var(--shadow-md), var(--shadow-glow); }
.tool-card:hover::before { opacity:1; }
.tool-card-icon {
    width:44px; height:44px; background:rgba(251,191,36,0.1);
    border-radius:var(--radius-sm); display:flex; align-items:center;
    justify-content:center; font-size:18px; margin-bottom:14px; color:var(--accent-blue);
}
.tool-card-body { flex:1; }
.tool-card-body h3 { font-size:16px; font-weight:600; margin-bottom:6px; }
.tool-card-body p { font-size:13px; color:var(--text-secondary); line-height:1.5; }
.tool-cta { font-size:13px; font-weight:500; color:var(--accent-blue); display:flex; align-items:center; gap:6px; }
.tool-card:hover .tool-cta i { transform:translateX(4px); transition:var(--transition); }
.tool-page { max-width:900px; margin:80px auto 0; padding:40px 24px 80px; }
.tool-page:has(.pn-root) { max-width:none; padding:0 24px 0; }
.tool-page:has(.rt-root) { max-width:none; padding:0; margin-top:68px; }
.tool-page:has(.rm-root) { max-width:none; padding:0; margin-top:68px; }
.tool-page:has(.og-root) { max-width:none; padding:0; margin-top:68px; }
.tool-page:has(.sp-root) { max-width:none; padding:0; margin-top:68px; }
.tool-page:has(.compr-root) { max-width:none; padding:0; margin:68px 0 0; flex:1 1 auto; display:flex; flex-direction:column; min-height:0; }
.app-container:has(.compr-root) { min-height:100vh; display:flex; flex-direction:column; }
.app-container:has(.compr-root) .main-content { flex:1 1 auto; display:flex; flex-direction:column; min-height:0; }
@media (min-width:1024px) {
    .compr-root { height: calc(100vh - 210px); }
}
.tool-breadcrumb { display:flex; align-items:center; gap:8px; margin-bottom:32px; font-size:14px; color:var(--text-muted); }
.tool-breadcrumb a { color:var(--text-muted); text-decoration:none; }
.tool-breadcrumb a:hover { color:var(--accent-blue); }
.tool-header { display:flex; gap:24px; margin-bottom:40px; }
.tool-feature-panel { margin:0 0 24px; padding:24px 32px; background:linear-gradient(180deg, rgba(251,191,36,0.08), rgba(28,25,23,0.95)); border:1px solid rgba(251,191,36,0.16); border-radius:16px; }
.feature-header h2 { font-size:22px; margin-bottom:8px; }
.feature-header p { color:var(--text-secondary); font-size:14px; max-width:700px; }
.feature-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(200px,1fr)); gap:16px; margin-top:20px; }
.feature-card { background:rgba(28,25,23,0.95); padding:18px; border:1px solid rgba(255,255,255,0.05); border-radius:16px; }
.feature-card strong { display:block; margin-bottom:10px; font-size:15px; }
.feature-card span { color:var(--text-secondary); font-size:13px; line-height:1.6; }
.tool-note { color:var(--text-secondary); font-size:13px; margin-top:4px; }

.tool-header-icon {
    width:64px; height:64px; background:rgba(251,191,36,0.1);
    border-radius:var(--radius-md); display:flex; align-items:center;
    justify-content:center; font-size:28px; color:var(--accent-blue); flex-shrink:0;
}
.tool-header-info h1 { font-size:28px; font-weight:700; margin-bottom:4px; }
.tool-header-info p { color:var(--text-secondary); font-size:15px; margin-bottom:8px; }
.tool-category-badge { display:inline-flex; padding:4px 12px; border-radius:50px; font-size:12px; font-weight:500; }
.category-convert { background:rgba(251,191,36,0.1); color:var(--accent-blue); }
.category-organize { background:rgba(16,185,129,0.1); color:var(--accent-green); }
.category-edit { background:rgba(251,191,36,0.1); color:var(--accent-orange); }
.category-secure { background:rgba(239,68,68,0.1); color:var(--accent-red); }
.category-optimize { background:rgba(251,191,36,0.1); color:var(--accent-purple); }
.category-view { background:rgba(6,182,212,0.1); color:var(--accent-cyan); }
.category-ai { background:rgba(251,191,36,0.1); color:var(--accent-pink); }
.tool-workspace {
    background:var(--bg-card); border:1px solid var(--border-color);
    border-radius:var(--radius-lg); padding:40px; min-height:300px;
}
.upload-zone {
    border:2px dashed var(--border-color); border-radius:var(--radius-md);
    padding:60px 40px; text-align:center; cursor:pointer; transition:var(--transition);
}
.upload-zone:hover, .upload-zone.dragover { border-color:var(--accent-blue); background:rgba(251,191,36,0.05); }
.upload-icon { font-size:48px; color:var(--text-muted); margin-bottom:16px; }
.upload-zone h3 { font-size:18px; font-weight:600; margin-bottom:8px; }
.upload-zone p { color:var(--text-muted); font-size:14px; margin-bottom:20px; }
.btn {
    display:inline-flex; align-items:center; gap:8px; padding:10px 20px;
    border:none; border-radius:var(--radius-sm); font-family:var(--font);
    font-size:14px; font-weight:500; cursor:pointer; transition:var(--transition); text-decoration:none;
}
.btn-primary {
    background:linear-gradient(135deg, #f59e0b, #fbbf24);
    color:#0c0a09; box-shadow:0 4px 14px rgba(251,191,36,0.3);
}
.btn-primary:hover { transform:translateY(-1px); box-shadow:0 6px 20px rgba(251,191,36,0.4); }
.btn-secondary { background:var(--bg-secondary); color:var(--text-primary); border:1px solid var(--border-color); }
.btn-secondary:hover { border-color:var(--border-hover); background:var(--bg-card-hover); }
.btn-lg { padding:14px 32px; font-size:16px; border-radius:var(--radius-md); }
.preview-list { display:flex; flex-direction:column; gap:8px; margin-bottom:16px; }
.preview-item {
    display:flex; align-items:center; gap:12px; padding:12px 16px;
    background:var(--bg-secondary); border:1px solid var(--border-color); border-radius:var(--radius-sm);
}
.preview-item-icon {
    width:36px; height:36px; background:rgba(251,191,36,0.1);
    border-radius:6px; display:flex; align-items:center; justify-content:center;
    color:var(--accent-blue); flex-shrink:0;
}
.preview-item-info { flex:1; min-width:0; }
.preview-item-name { font-size:14px; font-weight:500; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.preview-item-size { font-size:12px; color:var(--text-muted); }
.preview-item-remove { background:none; border:none; color:var(--text-muted); cursor:pointer; padding:4px; }
.preview-item-remove:hover { color:var(--accent-red); }
.tool-options { margin-top:24px; }
.options-container { display:flex; flex-direction:column; gap:16px; margin-bottom:24px; }
.option-group { display:flex; flex-direction:column; gap:8px; }
.option-group label { font-size:14px; font-weight:500; color:var(--text-secondary); }
.option-group input, .option-group select, .option-group textarea {
    padding:10px 14px; background:var(--bg-secondary); border:1px solid var(--border-color);
    border-radius:var(--radius-sm); color:var(--text-primary); font-family:var(--font);
    font-size:14px; outline:none; transition:var(--transition);
}
.option-group input:focus, .option-group select:focus, .option-group textarea:focus {
    border-color:var(--accent-blue); box-shadow:0 0 0 3px rgba(251,191,36,0.15);
}
.option-group select option { background:var(--bg-card); }
.tool-results { text-align:center; padding:40px 20px; }
.result-success-icon { font-size:48px; color:var(--accent-green); margin-bottom:12px; }
.results-header h3 { font-size:22px; font-weight:600; }
.results-actions { display:flex; gap:12px; justify-content:center; }
.tool-loading { text-align:center; padding:60px 20px; }
.spinner {
    width:48px; height:48px; border:4px solid var(--border-color);
    border-top-color:var(--accent-blue); border-radius:50%;
    animation:spin 0.8s linear infinite; margin:0 auto 16px;
}
.watermark-steps {
    display:flex; gap:16px; margin-bottom:30px; justify-content:center; flex-wrap:wrap;
}
.watermark-steps .step {
    display:flex; align-items:center; gap:10px; padding:12px 18px; border:1px solid var(--border-color);
    border-radius:999px; color:var(--text-secondary); background:var(--bg-secondary); font-size:14px;
}
.watermark-steps .step.active {
    background:rgba(251,191,36,0.1); border-color:var(--accent-blue); color:var(--text-primary);
}
.watermark-steps .step span {
    width:24px; height:24px; display:inline-flex; align-items:center; justify-content:center;
    border-radius:50%; background:var(--bg-card); color:var(--text-primary); font-weight:700;
}
.watermark-preview { margin-top:24px; }
.preview-card { padding:24px; background:rgba(28,25,23,0.95); border:1px solid rgba(255,255,255,0.05); border-radius:20px; }
.preview-card h4 { margin:0 0 18px; font-size:18px; }
.image-preview { position:relative; width:100%; min-height:240px; background:var(--bg-secondary); border-radius:16px; overflow:hidden; display:flex; align-items:center; justify-content:center; }
.image-preview img { max-width:100%; max-height:420px; object-fit:contain; }
.comparison-section { margin-top:30px; text-align:center; }
.comparison-title { font-weight:700; margin-bottom:18px; }
.page-thumbs { display:flex; justify-content:center; gap:8px; align-items:center; flex-wrap:wrap; }
.page-thumbs img { border:1px solid var(--border-color); }
.thumb-btn { background:transparent; border-radius:8px; padding:4px; }
.comparison-slider {
    position:relative;
    width:100%;
    max-width:760px;
    margin:0 auto;
    overflow:hidden;
    border-radius:20px;
    border:1px solid var(--border-color);
    background:#000;
    user-select:none;
    aspect-ratio: 3/2;
}
.comparison-image {
    position:absolute;
    top:0; left:0;
    width:100%;
    height:100%;
    overflow:hidden;
}
.comparison-image img {
    width:100%;
    height:100%;
    object-fit:contain;
    display:block;
}
.comparison-removed {
    position:absolute;
    top:0; left:0;
    width:50%;
    height:100%;
    overflow:hidden;
    z-index:2;
}
.comparison-removed img {
    position:absolute;
    top:0; left:0;
    width:100%;
    height:100%;
    object-fit:contain;
}
.compare-handle {
    position:absolute;
    top:0;
    left:50%;
    width:3px;
    height:100%;
    background:white;
    transform:translateX(-50%);
    z-index:10;
    pointer-events:none;
    box-shadow: 0 0 8px rgba(0,0,0,0.5);
}
.compare-handle::after {
    content: '⟷';
    position:absolute;
    left:50%; top:50%;
    transform:translate(-50%,-50%);
    width:40px;
    height:40px;
    border-radius:50%;
    background:white;
    border:2px solid var(--accent-blue);
    box-shadow:0 0 0 4px rgba(0,0,0,0.15), 0 4px 12px rgba(0,0,0,0.3);
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:16px;
    color:var(--accent-blue);
    line-height:40px;
    text-align:center;
}
.compare-handle.animate-handle {
    animation: handle-appear 0.6s ease-out forwards;
}
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-6px); }
    40% { transform: translateX(6px); }
    60% { transform: translateX(-6px); }
    80% { transform: translateX(6px); }
}
@keyframes handle-appear {
    0% { transform: translateX(-50%) scale(0.5); opacity: 0.3; }
    50% { transform: translateX(-50%) scale(1.2); opacity: 1; }
    100% { transform: translateX(-50%) scale(1); opacity: 1; }
}
#compareRange {
    position:absolute;
    top:0; left:0;
    width:100%; height:100%;
    opacity:0;
    cursor:ew-resize;
    z-index:20;
    margin:0;
    -webkit-appearance:none;
    appearance:none;
    touch-action:pan-x;
}
#compareRange::-webkit-slider-thumb {
    -webkit-appearance:none;
    width:100%;
    height:100%;
}
.option-help { margin-top:8px; color:var(--text-secondary); font-size:13px; line-height:1.5; }
.tool-results .result-summary { color:var(--text-secondary); margin-top:10px; }
.comparison-removed.vertical { position:absolute; top:0; left:0; width:100%; height:50%; overflow:hidden; z-index:2; }
.compare-handle.vertical { position:absolute; left:0; width:100%; height:3px; transform:translateY(-50%); top:50%; pointer-events:none; }
.compare-handle.vertical::after { content:'↕'; left:50%; top:50%; transform:translate(-50%,-50%); }
#compareRange.vertical { position:absolute; left:50%; top:50%; transform:translate(-50%,-50%) rotate(-90deg); width:420px; height:40px; opacity:0; z-index:30; touch-action:pan-y; }
.result-note { font-size:13px; color:var(--text-muted); margin-top:16px; }

/* =======================================
   AI WATERMARK REMOVER - DEDICATED UI
   ======================================= */
.wm-root {
    max-width: 820px;
    margin: 0 auto 60px;
}
.wm-header {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 36px;
    padding: 28px 32px;
    background: linear-gradient(135deg, rgba(251,191,36,0.08), rgba(251,191,36,0.08));
    border: 1px solid rgba(251,191,36,0.15);
    border-radius: 20px;
    position: relative;
    overflow: hidden;
}
.wm-header::before {
    content: '';
    position: absolute;
    top: -50%; right: -20%;
    width: 300px; height: 300px;
    background: radial-gradient(circle, rgba(251,191,36,0.08), transparent 70%);
    pointer-events: none;
}
.wm-header-icon {
    width: 60px; height: 60px;
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
    border-radius: 16px;
    display: flex; align-items: center; justify-content: center;
    font-size: 28px; color: #fff;
    box-shadow: 0 8px 24px rgba(251,191,36,0.3);
    flex-shrink: 0;
}
.wm-title {
    font-size: 26px; font-weight: 700;
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
}
.wm-subtitle {
    color: var(--text-secondary);
    font-size: 14px;
    margin-top: 2px;
}
.wm-header-badge {
    margin-left: auto;
    padding: 6px 16px;
    background: rgba(251,191,36,0.12);
    border: 1px solid rgba(251,191,36,0.2);
    border-radius: 50px;
    color: #fbbf24;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    white-space: nowrap;
}

/* Steps */
.wm-steps {
    display: flex;
    align-items: stretch;
    margin-bottom: 40px;
    padding: 0;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}
.wm-step {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    flex: 1;
    transition: all 0.3s ease;
    opacity: 0.5;
}
.wm-step.active {
    opacity: 1;
    border-color: rgba(251,191,36,0.3);
    background: linear-gradient(135deg, rgba(251,191,36,0.06), rgba(251,191,36,0.06));
    box-shadow: 0 0 20px rgba(251,191,36,0.08);
}
.wm-step.completed {
    opacity: 0.8;
    border-color: rgba(16,185,129,0.3);
}
.wm-step-num {
    width: 32px; height: 32px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 700;
    background: var(--bg-secondary);
    color: var(--text-muted);
    flex-shrink: 0;
    transition: all 0.3s ease;
}
.wm-step.active .wm-step-num {
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
    color: #fff;
    box-shadow: 0 4px 12px rgba(251,191,36,0.3);
}
.wm-step.completed .wm-step-num {
    background: var(--accent-green);
    color: #fff;
}
.wm-step.completed .wm-step-num::after {
    content: '✓';
}
.wm-step.completed .wm-step-num span {
    display: none;
}
.wm-step-info { display: flex; flex-direction: column; }
.wm-step-label { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.wm-step-desc { font-size: 11px; color: var(--text-muted); margin-top: 1px; }
.wm-step-connector {
    width: 24px;
    position: relative;
    display: flex; align-items: center;
    flex-shrink: 0;
}
.wm-step-connector::after {
    content: '';
    width: 100%; height: 2px;
    background: var(--border-color);
    border-radius: 2px;
}

/* Upload Zone */
.wm-upload-container {
    position: relative;
}
.wm-upload-zone {
    position: relative;
    border: 2px dashed var(--border-color);
    border-radius: 20px;
    padding: 80px 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
    background: var(--bg-card);
}
.wm-upload-zone:hover,
.wm-upload-zone.dragover {
    border-color: #fbbf24;
    background: rgba(251,191,36,0.04);
}
.wm-upload-glow {
    position: absolute;
    top: 50%; left: 50%;
    width: 400px; height: 400px;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(251,191,36,0.06), transparent 60%);
    pointer-events: none;
    transition: opacity 0.3s;
    opacity: 0;
}
.wm-upload-zone:hover .wm-upload-glow,
.wm-upload-zone.dragover .wm-upload-glow {
    opacity: 1;
}
.wm-upload-content { position: relative; z-index: 1; }
.wm-upload-icon-wrapper {
    position: relative;
    display: inline-block;
    margin-bottom: 20px;
}
.wm-upload-main-icon {
    font-size: 56px;
    color: rgba(251,191,36,0.5);
    transition: all 0.3s ease;
}
.wm-upload-zone:hover .wm-upload-main-icon,
.wm-upload-zone.dragover .wm-upload-main-icon {
    color: #fbbf24;
    transform: translateY(-4px);
}
.wm-upload-sub-icon {
    position: absolute;
    bottom: -4px; right: -12px;
    font-size: 22px;
    color: var(--text-muted);
    background: var(--bg-card);
    padding: 4px;
    border-radius: 8px;
}
.wm-upload-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}
.wm-upload-paste-row {
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: 480px;
    margin: 0 auto 16px;
}
.wm-upload-url-input {
    flex: 1;
    padding: 12px 18px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    font-family: var(--font);
    font-size: 14px;
    outline: none;
    transition: all 0.2s;
}
.wm-upload-url-input:focus {
    border-color: #fbbf24;
    box-shadow: 0 0 0 3px rgba(251,191,36,0.12);
}
.wm-upload-url-input::placeholder {
    color: var(--text-muted);
}
.wm-upload-url-btn {
    width: 44px; height: 44px;
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
    border: none;
    border-radius: 10px;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}
.wm-upload-url-btn:hover {
    transform: translateX(2px);
    box-shadow: 0 4px 12px rgba(251,191,36,0.3);
}
.wm-upload-or {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}
.wm-upload-or::before,
.wm-upload-or::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}
.wm-upload-or span {
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
}
.wm-upload-text {
    color: var(--text-muted);
    font-size: 15px;
    margin-bottom: 20px;
}
.wm-upload-link {
    color: #fbbf24;
    cursor: pointer;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.wm-upload-link:hover { color: #f472b6; }
.wm-upload-formats {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}
.wm-upload-formats span {
    padding: 5px 14px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 11px;
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: 0.3px;
}
.wm-upload-guidelines {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 2px;
}
.wm-upload-guidelines span {
    font-size: 11px;
    color: var(--text-muted);
    opacity: 0.7;
}

/* File Preview Card */
.wm-file-preview {
    margin-top: 16px;
    animation: wmSlideUp 0.3s ease;
}
@keyframes wmSlideUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
.wm-file-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: linear-gradient(135deg, rgba(251,191,36,0.05), rgba(251,191,36,0.05));
    border: 1px solid rgba(251,191,36,0.15);
    border-radius: 14px;
}
.wm-file-icon {
    width: 48px; height: 48px;
    background: linear-gradient(135deg, rgba(251,191,36,0.12), rgba(251,191,36,0.12));
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px;
    color: #fbbf24;
    flex-shrink: 0;
}
.wm-file-details { flex: 1; min-width: 0; }
.wm-file-name {
    font-size: 15px;
    font-weight: 600;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.wm-file-size {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 2px;
    display: block;
}
.wm-btn-xs {
    width: 36px; height: 36px;
    background: rgba(239,68,68,0.1);
    border: none;
    border-radius: 10px;
    color: var(--accent-red);
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s;
}
.wm-btn-xs:hover {
    background: rgba(239,68,68,0.2);
    transform: scale(1.05);
}

/* Quality Toggle */
.wm-quality-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 12px;
    padding: 10px 18px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    animation: wmSlideUp 0.3s ease;
}
.wm-toggle-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}
.wm-toggle-label span { line-height: 1; }
.wm-toggle-switch {
    position: relative;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}
.wm-toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.wm-toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    transition: all 0.3s;
}
.wm-toggle-slider::before {
    content: '';
    position: absolute;
    left: 3px;
    top: 3px;
    width: 16px;
    height: 16px;
    background: var(--text-muted);
    border-radius: 50%;
    transition: all 0.3s;
}
.wm-toggle-switch input:checked + .wm-toggle-slider {
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
    border-color: transparent;
}
.wm-toggle-switch input:checked + .wm-toggle-slider::before {
    transform: translateX(20px);
    background: #fff;
}
.wm-toggle-desc {
    font-size: 12px;
    color: var(--text-muted);
}

.wm-process-btn {
    width: 100%;
    padding: 18px 32px;
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
    border: none;
    border-radius: 14px;
    color: #fff;
    font-family: var(--font);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(251,191,36,0.3);
    position: relative;
    overflow: hidden;
}
.wm-process-btn::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.5s;
}
.wm-process-btn:hover::before { left: 100%; }
.wm-process-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(251,191,36,0.4);
}
.wm-process-btn:active {
    transform: translateY(0);
}
.wm-process-btn-icon {
    transition: transform 0.3s;
}
.wm-process-btn:hover .wm-process-btn-icon {
    transform: translateX(4px);
}

/* Processing */
.wm-processing {
    position: relative;
    text-align: center;
    padding: 60px 20px;
    animation: wmSlideUp 0.3s ease;
    overflow: hidden;
    border-radius: 20px;
    background: var(--bg-card);
    border: 1px solid rgba(251,191,36,0.1);
    isolation: isolate;
}

/* Floating particles */
.wm-processing-particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}
.wm-particle {
    position: absolute;
    left: var(--x);
    top: var(--y);
    width: 6px;
    height: 6px;
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
    border-radius: 50%;
    opacity: 0;
    animation: wmParticleFloat 3s ease-in-out infinite;
    animation-delay: var(--d);
    box-shadow: 0 0 8px rgba(251,191,36,0.4);
}
.wm-particle:nth-child(2n) {
    width: 4px;
    height: 4px;
    background: #fbbf24;
}
.wm-particle:nth-child(3n) {
    width: 8px;
    height: 8px;
    background: #f59e0b;
}
@keyframes wmParticleFloat {
    0% { 
        opacity: 0; 
        transform: translateY(0) scale(0);
    }
    20% { 
        opacity: 0.7; 
        transform: translateY(-10px) scale(1);
    }
    80% {
        opacity: 0.3;
        transform: translateY(-30px) scale(0.5);
    }
    100% { 
        opacity: 0; 
        transform: translateY(-40px) scale(0);
    }
}

.wm-processing-ring {
    position: relative;
    width: 90px; height: 90px;
    margin: 0 auto 28px;
    z-index: 1;
}
.wm-ring-segment {
    position: absolute;
    inset: 0;
    border: 4px solid transparent;
    border-top-color: #fbbf24;
    border-right-color: #fbbf24;
    border-bottom-color: rgba(251,191,36,0.2);
    border-left-color: rgba(251,191,36,0.2);
    border-radius: 50%;
    animation: wmSpin 1s linear infinite;
}
.wm-ring-pulse {
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    border: 2px solid rgba(251,191,36,0.15);
    animation: wmRingPulse 2s ease-out infinite;
}
@keyframes wmSpin {
    to { transform: rotate(360deg); }
}
@keyframes wmRingPulse {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(1.3); opacity: 0; }
}

.wm-processing-title {
    position: relative;
    z-index: 1;
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 24px;
    color: var(--text-primary);
}
.wm-dots span {
    animation: wmDotBlink 1.4s infinite;
    font-size: 24px;
    line-height: 0;
    vertical-align: middle;
    margin-left: 1px;
}
.wm-dots span:nth-child(2) { animation-delay: 0.2s; }
.wm-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes wmDotBlink {
    0%, 60%, 100% { opacity: 0.3; }
    30% { opacity: 1; }
}

/* Processing stage indicators */
.wm-processing-stage {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: 24px;
    position: relative;
    z-index: 1;
}
.wm-stage-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    border-radius: 10px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    transition: all 0.4s ease;
    opacity: 0.4;
    min-width: 80px;
}
.wm-stage-item i {
    font-size: 18px;
    color: var(--text-muted);
    transition: all 0.4s ease;
}
.wm-stage-item span {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-muted);
    transition: all 0.4s ease;
}
.wm-stage-item.active {
    opacity: 1;
    background: linear-gradient(135deg, rgba(251,191,36,0.1), rgba(251,191,36,0.08));
    border-color: rgba(251,191,36,0.3);
    box-shadow: 0 0 20px rgba(251,191,36,0.08);
}
.wm-stage-item.active i {
    color: #fbbf24;
    animation: wmStagePulse 1.5s ease-in-out infinite;
}
.wm-stage-item.active span {
    color: var(--text-primary);
}
.wm-stage-item.completed {
    opacity: 0.8;
    border-color: rgba(16,185,129,0.3);
}
.wm-stage-item.completed i {
    color: var(--accent-green);
}
.wm-stage-item.completed span {
    color: var(--text-secondary);
}
.wm-stage-connector {
    width: 20px;
    height: 2px;
    background: var(--border-color);
    flex-shrink: 0;
}
@keyframes wmStagePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

.wm-processing-bar {
    position: relative;
    width: 100%;
    max-width: 420px;
    height: 8px;
    background: var(--bg-secondary);
    border-radius: 6px;
    margin: 0 auto 14px;
    overflow: visible;
    z-index: 1;
}
.wm-processing-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
    border-radius: 6px;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    box-shadow: 0 0 12px rgba(251,191,36,0.3);
}
.wm-processing-glow {
    position: absolute;
    top: -2px; right: -4px;
    width: 20px;
    height: 12px;
    background: rgba(251,191,36,0.4);
    border-radius: 50%;
    filter: blur(6px);
    animation: wmGlowMove 1.5s ease-in-out infinite;
}
@keyframes wmGlowMove {
    0%, 100% { opacity: 0.5; transform: scaleX(1); }
    50% { opacity: 1; transform: scaleX(1.5); }
}

.wm-processing-status {
    display: flex;
    justify-content: space-between;
    max-width: 420px;
    margin: 0 auto;
    font-size: 13px;
    color: var(--text-muted);
    position: relative;
    z-index: 1;
}
.wm-processing-status i {
    margin-right: 6px;
    color: #fbbf24;
    font-size: 11px;
}

/* Results */
.wm-results {
    animation: wmSlideUp 0.4s ease;
}
.wm-results-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 24px 28px;
    background: linear-gradient(135deg, rgba(16,185,129,0.06), rgba(16,185,129,0.02));
    border: 1px solid rgba(16,185,129,0.15);
    border-radius: 14px;
    margin-bottom: 28px;
}
.wm-results-success-icon {
    width: 52px; height: 52px;
    background: rgba(16,185,129,0.1);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 26px;
    color: var(--accent-green);
    flex-shrink: 0;
}
.wm-results-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 2px;
}
.wm-results-subtitle {
    font-size: 14px;
    color: var(--text-muted);
}

/* Before/After Comparison */
.wm-comparison-section {
    margin-bottom: 28px;
    animation: wmSlideUp 0.5s ease;
}

/* Loading state for comparison images */
.wm-comparison-loading .wm-comparison-container {
    position: relative;
}
.wm-comparison-loading .wm-comparison-container::after {
    content: 'Loading preview...';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    color: var(--text-muted);
    font-size: 14px;
    z-index: 30;
    border-radius: 16px;
    gap: 10px;
}
.wm-comparison-loading .wm-comparison-container::before {
    content: '';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 31;
    width: 24px;
    height: 24px;
    border: 3px solid var(--border-color);
    border-top-color: #fbbf24;
    border-radius: 50%;
    animation: wmSpin 0.8s linear infinite;
    margin: 0 auto;
    top: calc(50% - 12px);
}
.wm-comparison-ready .wm-comparison-container::before,
.wm-comparison-ready .wm-comparison-container::after {
    display: none;
}
.wm-comparison-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    padding: 0 4px;
}
.wm-comparison-label {
    padding: 7px 18px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}
.wm-label-before {
    background: rgba(251,191,36,0.1);
    color: var(--accent-blue);
    border: 1px solid rgba(251,191,36,0.2);
}
.wm-label-after {
    background: rgba(16,185,129,0.1);
    color: var(--accent-green);
    border: 1px solid rgba(16,185,129,0.2);
}
.wm-comparison-tip {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background: var(--bg-secondary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    white-space: nowrap;
}
.wm-comparison-tip i {
    font-size: 11px;
    color: var(--text-muted);
}
.wm-tip-sep {
    color: var(--border-color);
    margin: 0 2px;
}

.wm-comparison-container {
    position: relative;
    width: 100%;
    max-width: 760px;
    margin: 0 auto;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    background: #000;
    aspect-ratio: 4/3;
    user-select: none;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}
.wm-compare-inner {
    position: relative;
    width: 100%;
    height: 100%;
}
.wm-compare-after {
    position: absolute;
    inset: 0;
}
.wm-compare-after img,
.wm-compare-before img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    user-drag: none;
    -webkit-user-drag: none;
    pointer-events: none;
}
.wm-compare-before {
    position: absolute;
    top: 0; left: 0;
    width: 50%;
    height: 100%;
    overflow: hidden;
    z-index: 2;
}
.wm-compare-before img {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Watermark labels on images */
.wm-compare-watermark-label {
    position: absolute;
    bottom: 16px;
    right: 16px;
    padding: 4px 14px;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    color: rgba(255,255,255,0.8);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    pointer-events: none;
    z-index: 5;
}
.wm-compare-watermark-label-before {
    right: auto;
    left: 16px;
    color: rgba(251,191,36,0.8);
    border-color: rgba(251,191,36,0.2);
}

.wm-compare-handle {
    position: absolute;
    top: 0;
    left: 50%;
    width: 3px;
    height: 100%;
    background: #fff;
    transform: translateX(-50%);
    z-index: 10;
    pointer-events: none;
    box-shadow: 0 0 10px rgba(0,0,0,0.4);
    transition: box-shadow 0.3s ease, background 0.3s ease;
}
.wm-handle-circle {
    position: absolute;
    left: 50%; top: 50%;
    transform: translate(-50%, -50%);
    width: 48px; height: 48px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid #fbbf24;
    box-shadow: 0 4px 20px rgba(0,0,0,0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fbbf24;
    font-size: 18px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.wm-handle-circle:hover {
    transform: translate(-50%, -50%) scale(1.08);
    box-shadow: 0 6px 24px rgba(0,0,0,0.4);
}
.wm-compare-handle.dragging .wm-handle-circle {
    transform: translate(-50%, -50%) scale(1.12);
    border-color: #fbbf24;
    box-shadow: 0 8px 32px rgba(0,0,0,0.45);
}
.wm-compare-range {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    opacity: 0;
    cursor: ew-resize;
    z-index: 20;
    margin: 0;
    appearance: none;
    -webkit-appearance: none;
    touch-action: none;
}
.wm-compare-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 100%;
    height: 100%;
}

/* Engine badge */
.wm-engine-badge {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    background: rgba(251,191,36,0.1);
    border: 1px solid rgba(251,191,36,0.2);
    border-radius: 50px;
    font-size: 11px;
    font-weight: 500;
    color: #fbbf24;
    white-space: nowrap;
    animation: wmSlideUp 0.5s ease 0.3s both;
}
.wm-engine-badge i {
    font-size: 12px;
}

/* Results Actions */
.wm-results-actions {
    display: flex;
    gap: 14px;
    justify-content: center;
}
.wm-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    border: none;
    border-radius: 12px;
    font-family: var(--font);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.25s ease;
}
.wm-btn-primary {
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
    color: #fff;
    box-shadow: 0 4px 16px rgba(251,191,36,0.3);
}
.wm-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(251,191,36,0.4);
}
.wm-btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}
.wm-btn-secondary:hover {
    border-color: var(--border-hover);
    background: var(--bg-card-hover);
    transform: translateY(-2px);
}
.wm-btn-download {
    padding: 16px 36px;
    font-size: 16px;
}

/* No comparison results state */
.wm-no-compare {
    text-align: center;
    padding: 40px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    margin-bottom: 24px;
}
.wm-no-compare i {
    font-size: 40px;
    color: var(--accent-green);
    margin-bottom: 12px;
}
.wm-no-compare h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}
.wm-no-compare p {
    color: var(--text-muted);
    font-size: 13px;
}

/* Error state */
.wm-error {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: rgba(239,68,68,0.08);
    border: 1px solid rgba(239,68,68,0.15);
    border-radius: 12px;
    color: var(--accent-red);
    font-size: 14px;
    margin-top: 16px;
    animation: wmSlideUp 0.3s ease;
}
.wm-error i { font-size: 20px; }

/* Handle slide-in animation */
@keyframes handleSlideIn {
    0% { 
        opacity: 0;
        transform: translateX(-50%) scale(0.3);
    }
    40% { 
        opacity: 1;
        transform: translateX(-50%) scale(1.15);
    }
    70% {
        transform: translateX(-50%) scale(0.95);
    }
    100% { 
        opacity: 1;
        transform: translateX(-50%) scale(1);
    }
}

@media (max-width: 768px) {
    .wm-steps { 
        overflow-x: auto;
        gap: 8px;
        padding-bottom: 4px;
    }
    .wm-step { 
        flex-direction: column;
        text-align: center;
        padding: 12px;
        min-width: 90px;
    }
    .wm-step-info { align-items: center; }
    .wm-step-connector { width: 16px; }
    .wm-options-grid { grid-template-columns: 1fr; }
    .wm-upload-zone { padding: 50px 24px; }
    .wm-results-actions { flex-direction: column; align-items: stretch; }
    .wm-btn { justify-content: center; }
    .wm-header { flex-wrap: wrap; }
    .wm-header-badge { margin-left: 0; }
    .wm-comparison-container { aspect-ratio: 4/3; }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.share-result-card { animation: fadeIn 0.3s ease; }

@media (max-width:600px) {
    .comparison-slider {
        max-width:100%;
        aspect-ratio: 4/3;
    }
}

@media (max-width:480px) {
    .wm-comparison-container { aspect-ratio: 1/1; }
}
.error-message {
    display:flex; align-items:center; gap:12px; padding:12px 16px;
    background:rgba(239,68,68,0.1); border:1px solid rgba(239,68,68,0.2);
    border-radius:var(--radius-sm); color:var(--accent-red); font-size:14px; margin-bottom:16px;
}
.footer { border-top:1px solid var(--border-color); padding:24px; }
.footer-inner { max-width:1400px; margin:0 auto; text-align:center; color:var(--text-muted); font-size:13px; }
@media (max-width:768px) {
    .nav-search { display:none; }
    .hero { padding:120px 16px 60px; }
    .hero-stats { gap:24px; }
    .tools-grid { grid-template-columns:1fr; }
    .tool-page { padding:20px 16px 60px; }
    .tool-workspace { padding:24px; }
    .upload-zone { padding:40px 20px; }
    .tool-header { flex-direction:column; align-items:center; text-align:center; }
    .results-actions { flex-direction:column; }
}
@media (min-width:769px) and (max-width:1100px) {
    .tools-grid { grid-template-columns:repeat(2,1fr); }
}

/* ===== Live preview grid (shown while processing) ===== */
.wm-preview-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 28px;
    width: 100%;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}
.wm-preview-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: border-color 0.2s ease;
}
.wm-preview-card:hover { border-color: var(--border-hover); }
.wm-preview-card-head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid var(--border-color);
}
.wm-preview-card-head i { color: var(--accent-cyan); font-size: 13px; }
.wm-preview-frame {
    position: relative;
    width: 100%;
    aspect-ratio: 4/3;
    background:
        linear-gradient(45deg, rgba(255,255,255,0.02) 25%, transparent 25%),
        linear-gradient(-45deg, rgba(255,255,255,0.02) 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, rgba(255,255,255,0.02) 75%),
        linear-gradient(-45deg, transparent 75%, rgba(255,255,255,0.02) 75%);
    background-size: 16px 16px;
    background-position: 0 0, 0 8px, 8px -8px, -8px 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.wm-preview-frame img,
.wm-preview-frame canvas {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}
.wm-preview-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 12px;
    pointer-events: none;
}
.wm-preview-placeholder i { font-size: 22px; opacity: 0.6; }
.wm-preview-placeholder.hidden { display: none; }

@media (max-width: 768px) {
    .wm-preview-grid { grid-template-columns: 1fr; }
}

/* =======================================
   AI WATERMARK REMOVER - FEATURES SECTION
   ======================================= */
.wm-features {
    margin-top: 48px;
    padding-top: 40px;
    border-top: 1px solid var(--border-color);
    animation: wmSlideUp 0.5s ease;
}
.wm-features-header {
    text-align: center;
    margin-bottom: 36px;
}
.wm-features-header h2 {
    font-size: 24px;
    font-weight: 700;
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}
.wm-features-header p {
    color: var(--text-secondary);
    font-size: 14px;
    max-width: 500px;
    margin: 0 auto;
}
.wm-features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.wm-feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}
.wm-feature-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
    opacity: 0;
    transition: opacity 0.3s ease;
}
.wm-feature-card:hover {
    transform: translateY(-3px);
    border-color: rgba(251,191,36,0.2);
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}
.wm-feature-card:hover::before {
    opacity: 1;
}
.wm-feature-icon {
    width: 44px; height: 44px;
    background: linear-gradient(135deg, rgba(251,191,36,0.12), rgba(251,191,36,0.12));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #fbbf24;
    margin-bottom: 16px;
    transition: all 0.3s ease;
}
.wm-feature-card:hover .wm-feature-icon {
    background: linear-gradient(135deg, rgba(251,191,36,0.2), rgba(251,191,36,0.2));
    transform: scale(1.05);
}
.wm-feature-card h3 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}
.wm-feature-card p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
}

@media (max-width: 768px) {
    .wm-features-grid { grid-template-columns: 1fr; }
}
@media (min-width: 769px) and (max-width: 1100px) {
    .wm-features-grid { grid-template-columns: repeat(2, 1fr); }
}

/* =======================================
   IMAGE COMPRESSOR styles moved to css/image-compressor.css
   ======================================= */
/* =======================================
   IMAGE COMPRESSOR styles moved to css/image-compressor.css
   ======================================= */

/* =======================================
   PDF COMPRESSOR - DEDICATED UI
   ======================================= */
.pc-root {
    max-width: 820px;
    margin: 0 auto 60px;
}
.pc-header {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 36px;
    padding: 28px 32px;
    background: linear-gradient(135deg, rgba(251,191,36,0.08), rgba(251,191,36,0.08));
    border: 1px solid rgba(251,191,36,0.15);
    border-radius: 20px;
    position: relative;
    overflow: hidden;
}
.pc-header::before {
    content: '';
    position: absolute;
    top: -50%; right: -20%;
    width: 300px; height: 300px;
    background: radial-gradient(circle, rgba(251,191,36,0.08), transparent 70%);
    pointer-events: none;
}
.pc-header-icon {
    width: 60px; height: 60px;
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
    border-radius: 16px;
    display: flex; align-items: center; justify-content: center;
    font-size: 28px; color: #0c0a09;
    box-shadow: 0 8px 24px rgba(251,191,36,0.3);
    flex-shrink: 0;
}
.pc-title {
    font-size: 26px; font-weight: 700;
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
}
.pc-subtitle {
    color: var(--text-secondary);
    font-size: 14px;
    margin-top: 2px;
}

/* Upload Zone */
.pc-upload-container { position: relative; }
.pc-upload-zone {
    position: relative;
    border: 2px dashed var(--border-color);
    border-radius: 20px;
    padding: 80px 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
    background: var(--bg-card);
}
.pc-upload-zone:hover,
.pc-upload-zone.dragover {
    border-color: #fbbf24;
    background: rgba(251,191,36,0.04);
}
.pc-upload-glow {
    position: absolute;
    top: 50%; left: 50%;
    width: 400px; height: 400px;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(251,191,36,0.06), transparent 60%);
    pointer-events: none;
    transition: opacity 0.3s;
    opacity: 0;
}
.pc-upload-zone:hover .pc-upload-glow,
.pc-upload-zone.dragover .pc-upload-glow { opacity: 1; }
.pc-upload-content { position: relative; z-index: 1; }
.pc-upload-icon-wrapper {
    position: relative;
    display: inline-block;
    margin-bottom: 20px;
}
.pc-upload-main-icon {
    font-size: 56px;
    color: rgba(251,191,36,0.5);
    transition: all 0.3s ease;
}
.pc-upload-zone:hover .pc-upload-main-icon,
.pc-upload-zone.dragover .pc-upload-main-icon {
    color: #fbbf24;
    transform: translateY(-4px);
}
.pc-upload-sub-icon {
    position: absolute;
    bottom: -4px; right: -12px;
    font-size: 22px;
    color: var(--text-muted);
    background: var(--bg-card);
    padding: 4px;
    border-radius: 8px;
}
.pc-upload-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}
.pc-upload-text {
    color: var(--text-muted);
    font-size: 15px;
    margin-bottom: 20px;
}
.pc-upload-link {
    color: #fbbf24;
    cursor: pointer;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.pc-upload-link:hover { color: #fbbf24; }
.pc-upload-formats {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}
.pc-upload-formats span {
    padding: 5px 14px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 11px;
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: 0.3px;
}

/* File Preview */
.pc-file-preview { animation: pcSlideUp 0.3s ease; }
@keyframes pcSlideUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
.pc-file-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: linear-gradient(135deg, rgba(251,191,36,0.05), rgba(251,191,36,0.05));
    border: 1px solid rgba(251,191,36,0.15);
    border-radius: 14px;
    margin-top: 16px;
}
.pc-file-icon {
    width: 48px; height: 48px;
    background: linear-gradient(135deg, rgba(251,191,36,0.12), rgba(251,191,36,0.12));
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px;
    color: #fbbf24;
    flex-shrink: 0;
}
.pc-file-details { flex: 1; min-width: 0; }
.pc-file-name {
    font-size: 15px;
    font-weight: 600;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.pc-file-size {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 2px;
    display: block;
}
.pc-btn-xs {
    width: 36px; height: 36px;
    background: rgba(239,68,68,0.1);
    border: none;
    border-radius: 10px;
    color: var(--accent-red);
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s;
}
.pc-btn-xs:hover {
    background: rgba(239,68,68,0.2);
    transform: scale(1.05);
}

/* Controls */
.pc-controls { animation: pcSlideUp 0.3s ease; margin-top: 24px; }
.pc-controls-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}
.pc-control-group {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.pc-control-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
}
.pc-control-label i { color: #fbbf24; font-size: 14px; }
.pc-slider-row {
    display: flex;
    align-items: center;
    gap: 12px;
}
.pc-range {
    -webkit-appearance: none;
    appearance: none;
    flex: 1;
    height: 6px;
    background: var(--bg-primary);
    border-radius: 4px;
    outline: none;
    border: none;
    cursor: pointer;
}
.pc-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    transition: transform 0.15s;
}
.pc-range::-webkit-slider-thumb:hover { transform: scale(1.15); }
.pc-range::-moz-range-thumb {
    width: 20px; height: 20px;
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
    border-radius: 50%; cursor: pointer; border: 2px solid #fff;
}
.pc-level-value {
    font-size: 20px;
    font-weight: 700;
    color: #fbbf24;
    min-width: 40px;
    text-align: right;
    font-variant-numeric: tabular-nums;
}
.pc-level-labels {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* Checkboxes */
.pc-checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.pc-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 400;
}
.pc-checkbox input { position: absolute; opacity: 0; cursor: pointer; height: 0; width: 0; }
.pc-checkmark {
    position: relative;
    width: 20px; height: 20px;
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: 5px;
    transition: all 0.2s;
    flex-shrink: 0;
}
.pc-checkbox input:checked ~ .pc-checkmark {
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
    border-color: transparent;
}
.pc-checkmark::after {
    content: '';
    position: absolute;
    left: 5px; top: 2px;
    width: 6px; height: 10px;
    border: solid #0c0a09;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    opacity: 0;
    transition: opacity 0.2s;
}
.pc-checkbox input:checked ~ .pc-checkmark::after { opacity: 1; }
.pc-checkbox input:focus ~ .pc-checkmark { border-color: #fbbf24; }

/* Estimate */
.pc-estimate-box {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.pc-estimate-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--text-muted);
}
.pc-estimate-val {
    font-weight: 600;
    color: var(--text-primary);
    font-family: monospace;
}
.pc-estimate-accent { color: #fbbf24; }

.pc-process-btn {
    width: 100%;
    padding: 18px 32px;
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
    border: none;
    border-radius: 14px;
    color: #0c0a09;
    font-family: var(--font);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(251,191,36,0.3);
    position: relative;
    overflow: hidden;
}
.pc-process-btn::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    transition: left 0.5s;
}
.pc-process-btn:hover::before { left: 100%; }
.pc-process-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(251,191,36,0.4);
}
.pc-process-btn:active { transform: translateY(0); }
.pc-process-btn-icon { transition: transform 0.3s; }
.pc-process-btn:hover .pc-process-btn-icon { transform: translateX(4px); }

/* Processing */
.pc-processing {
    position: relative;
    text-align: center;
    padding: 60px 20px;
    animation: pcSlideUp 0.3s ease;
    overflow: hidden;
    border-radius: 20px;
    background: var(--bg-card);
    border: 1px solid rgba(251,191,36,0.1);
    isolation: isolate;
    margin-top: 24px;
}
.pc-processing-ring {
    position: relative;
    width: 90px; height: 90px;
    margin: 0 auto 28px;
    z-index: 1;
}
.pc-ring-segment {
    position: absolute;
    inset: 0;
    border: 4px solid transparent;
    border-top-color: #fbbf24;
    border-right-color: #fbbf24;
    border-bottom-color: rgba(251,191,36,0.2);
    border-left-color: rgba(251,191,36,0.2);
    border-radius: 50%;
    animation: pcSpin 1s linear infinite;
}
.pc-ring-pulse {
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    border: 2px solid rgba(251,191,36,0.15);
    animation: pcRingPulse 2s ease-out infinite;
}
@keyframes pcSpin { to { transform: rotate(360deg); } }
@keyframes pcRingPulse {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(1.3); opacity: 0; }
}
.pc-processing-title {
    position: relative;
    z-index: 1;
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 24px;
    color: var(--text-primary);
}
.pc-dots span {
    animation: pcDotBlink 1.4s infinite;
    font-size: 24px;
    line-height: 0;
    vertical-align: middle;
    margin-left: 1px;
}
.pc-dots span:nth-child(2) { animation-delay: 0.2s; }
.pc-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes pcDotBlink {
    0%, 60%, 100% { opacity: 0.3; }
    30% { opacity: 1; }
}
.pc-processing-stage {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: 24px;
    position: relative;
    z-index: 1;
}
.pc-stage-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    border-radius: 10px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    transition: all 0.4s ease;
    opacity: 0.4;
    min-width: 80px;
}
.pc-stage-item i { font-size: 18px; color: var(--text-muted); transition: all 0.4s ease; }
.pc-stage-item span { font-size: 11px; font-weight: 500; color: var(--text-muted); transition: all 0.4s ease; }
.pc-stage-item.active {
    opacity: 1;
    background: linear-gradient(135deg, rgba(251,191,36,0.1), rgba(251,191,36,0.08));
    border-color: rgba(251,191,36,0.3);
    box-shadow: 0 0 20px rgba(251,191,36,0.08);
}
.pc-stage-item.active i {
    color: #fbbf24;
    animation: pcStagePulse 1.5s ease-in-out infinite;
}
.pc-stage-item.active span { color: var(--text-primary); }
.pc-stage-item.completed {
    opacity: 0.8;
    border-color: rgba(16,185,129,0.3);
}
.pc-stage-item.completed i { color: var(--accent-green); }
.pc-stage-item.completed span { color: var(--text-secondary); }
.pc-stage-connector {
    width: 20px;
    height: 2px;
    background: var(--border-color);
    flex-shrink: 0;
}
@keyframes pcStagePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

/* Results */
.pc-results { animation: pcSlideUp 0.4s ease; margin-top: 24px; }
.pc-results-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 24px 28px;
    background: linear-gradient(135deg, rgba(16,185,129,0.06), rgba(16,185,129,0.02));
    border: 1px solid rgba(16,185,129,0.15);
    border-radius: 14px;
    margin-bottom: 28px;
}
.pc-results-success-icon {
    width: 52px; height: 52px;
    background: rgba(16,185,129,0.1);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 26px;
    color: var(--accent-green);
    flex-shrink: 0;
}
.pc-results-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 2px;
    color: var(--text-primary);
}
.pc-results-subtitle {
    font-size: 14px;
    color: var(--text-muted);
}

/* Stats Grid */
.pc-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-bottom: 28px;
}
.pc-stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 18px;
    text-align: center;
    transition: all 0.3s ease;
}
.pc-stat-card:hover {
    border-color: rgba(251,191,36,0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}
.pc-stat-icon {
    width: 40px; height: 40px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px;
    margin: 0 auto 10px;
}
.pc-stat-icon.stat-original {
    background: rgba(251,191,36,0.1);
    color: #fbbf24;
}
.pc-stat-icon.stat-reduced {
    background: rgba(251,191,36,0.1);
    color: #fbbf24;
}
.pc-stat-icon.stat-saving {
    background: rgba(251,191,36,0.1);
    color: #fbbf24;
}
.pc-stat-label {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 4px;
}
.pc-stat-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
}

/* Results Actions */
.pc-results-actions {
    display: flex;
    gap: 14px;
    justify-content: center;
}
.pc-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    border: none;
    border-radius: 12px;
    font-family: var(--font);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.25s ease;
}
.pc-btn-primary {
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
    color: #0c0a09;
    box-shadow: 0 4px 16px rgba(251,191,36,0.3);
}
.pc-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(251,191,36,0.4);
}
.pc-btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}
.pc-btn-secondary:hover {
    border-color: var(--border-hover);
    background: var(--bg-card-hover);
    transform: translateY(-2px);
}
.pc-btn-download {
    padding: 16px 36px;
    font-size: 16px;
}
.pc-error {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: rgba(239,68,68,0.08);
    border: 1px solid rgba(239,68,68,0.15);
    border-radius: 12px;
    color: var(--accent-red);
    font-size: 14px;
    margin-top: 16px;
    animation: pcSlideUp 0.3s ease;
}
.pc-error i { font-size: 20px; }

@media (max-width: 768px) {
    .pc-controls-grid { grid-template-columns: 1fr; }
    .pc-stats-grid { grid-template-columns: 1fr; }
    .pc-upload-zone { padding: 50px 24px; }
    .pc-results-actions { flex-direction: column; align-items: stretch; }
    .pc-btn { justify-content: center; }
    .pc-header { flex-wrap: wrap; }
}

/* =======================================
   COMPARE PDF - DUAL VIEWPORT UI
   ======================================= */
.cp-root {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 68px);
    background: #18181b;
    overflow: hidden;
    border-radius: 0;
    margin: -40px -24px -80px;
}
.cp-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 48px;
    padding: 0 16px;
    background: #27272a;
    border-bottom: 1px solid #3f3f46;
    flex-shrink: 0;
    z-index: 50;
}
.cp-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}
.cp-tool-btn {
    color: #a1a1aa;
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    border-radius: 4px;
    transition: color 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.cp-tool-btn:hover { color: #e4e4e7; }
.cp-icon-sm { width: 18px; height: 18px; }
.cp-icon-lg { width: 40px; height: 40px; stroke-width: 1.2; }
.cp-divider {
    width: 1px;
    height: 16px;
    background: #3f3f46;
    flex-shrink: 0;
}
.cp-divider-sm {
    width: 1px;
    height: 12px;
    background: #3f3f46;
    flex-shrink: 0;
}
.cp-toggle-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}
.cp-sr-only {
    position: absolute;
    width: 1px; height: 1px;
    margin: -1px; padding: 0;
    overflow: hidden;
    clip: rect(0,0,0,0);
    border: 0;
}
.cp-toggle-track {
    width: 32px;
    height: 16px;
    background: #52525b;
    border-radius: 8px;
    position: relative;
    transition: background 0.2s;
    flex-shrink: 0;
}
.cp-toggle-track::after {
    content: '';
    position: absolute;
    top: 2px; left: 2px;
    width: 12px; height: 12px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.2s;
}
.cp-sr-only:checked + .cp-toggle-track {
    background: #eab308;
}
.cp-sr-only:checked + .cp-toggle-track::after {
    transform: translateX(16px);
}
.cp-toggle-text {
    font-size: 12px;
    color: #a1a1aa;
    font-weight: 500;
    transition: color 0.15s;
}
.cp-toggle-label:hover .cp-toggle-text { color: #d4d4d8; }
.cp-header-right { display: flex; align-items: center; }
.cp-title {
    font-size: 14px;
    font-weight: 600;
    color: #e4e4e7;
    letter-spacing: 0.3px;
}
.cp-workspace {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    overflow: hidden;
    position: relative;
}
.cp-viewport {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    background: #18181b;
}
.cp-viewport-right {
    border-left: 1px solid #3f3f46;
}
.cp-drop-zone {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    cursor: pointer;
    transition: all 0.2s;
    border: 2px dashed transparent;
    margin: 8px;
    border-radius: 12px;
}
.cp-drop-zone:hover,
.cp-drop-zone.dragover {
    border-color: rgba(234,179,8,0.3);
    background: rgba(234,179,8,0.04);
}
.cp-drop-content {
    text-align: center;
    pointer-events: none;
}
.cp-drop-icon {
    display: flex;
    justify-content: center;
    margin-bottom: 12px;
    color: #52525b;
}
.cp-drop-zone:hover .cp-drop-icon { color: #eab308; }
.cp-drop-title {
    font-size: 15px;
    font-weight: 600;
    color: #d4d4d8;
    margin-bottom: 4px;
}
.cp-drop-sub {
    font-size: 12px;
    color: #71717a;
}
.cp-drop-link {
    color: #eab308;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
    font-weight: 500;
}
.cp-drop-formats {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 10px;
}
.cp-drop-formats span {
    padding: 3px 10px;
    background: #27272a;
    border: 1px solid #3f3f46;
    border-radius: 6px;
    font-size: 10px;
    color: #71717a;
    font-weight: 500;
}
.cp-hidden-input { display: none; }
.cp-file-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    margin: 8px;
    background: rgba(234,179,8,0.04);
    border: 1px solid rgba(234,179,8,0.15);
    border-radius: 10px;
    animation: cpFadeIn 0.2s ease;
    flex-shrink: 0;
}
@keyframes cpFadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}
.cp-file-icon {
    width: 36px; height: 36px;
    background: rgba(234,179,8,0.1);
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 16px;
    color: #eab308;
    flex-shrink: 0;
}
.cp-file-info {
    flex: 1;
    min-width: 0;
}
.cp-file-name {
    font-size: 13px;
    font-weight: 600;
    color: #d4d4d8;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.cp-file-size {
    font-size: 11px;
    color: #71717a;
    display: block;
    margin-top: 1px;
}
.cp-file-remove {
    width: 28px; height: 28px;
    background: rgba(239,68,68,0.1);
    border: none;
    border-radius: 6px;
    color: #ef4444;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.15s;
    font-size: 12px;
}
.cp-file-remove:hover {
    background: rgba(239,68,68,0.2);
    transform: scale(1.05);
}
.cp-canvas-area {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: auto;
    padding: 12px;
    position: relative;
}
.cp-canvas-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: #52525b;
    font-size: 13px;
}
.cp-canvas-empty i { font-size: 36px; }
.cp-canvas-render {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    overflow-y: auto;
}
.cp-canvas-render img {
    width: 100%;
    max-width: 480px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
    border-radius: 4px;
    display: block;
}
.cp-zoom-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    margin: 0 8px 8px;
    background: rgba(24,24,27,0.95);
    border: 1px solid #3f3f46;
    border-radius: 8px;
    flex-shrink: 0;
    backdrop-filter: blur(8px);
}
.cp-zoom-val {
    display: flex;
    align-items: center;
    gap: 4px;
    background: #27272a;
    padding: 2px 8px;
    border-radius: 4px;
    border: 1px solid #3f3f46;
    font-size: 11px;
    font-family: monospace;
    color: #a1a1aa;
}
.cp-zoom-arrow {
    font-size: 7px;
    color: #52525b;
}
.cp-zoom-btn {
    background: none;
    border: none;
    color: #a1a1aa;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.15s;
}
.cp-zoom-btn:hover {
    background: #27272a;
    color: #e4e4e7;
}
.cp-file-badge {
    font-size: 10px;
    color: #71717a;
    font-family: monospace;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.cp-sidebar {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 280px;
    background: #27272a;
    border-left: 1px solid #3f3f46;
    display: flex;
    flex-direction: column;
    z-index: 40;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -8px 0 32px rgba(0,0,0,0.3);
}
.cp-sidebar.open {
    transform: translateX(0);
}
.cp-workspace.has-sidebar .cp-viewport-right {
    border-right: none;
}
.cp-sidebar-inner {
    flex: 1;
    overflow-y: auto;
    padding: 20px 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.cp-sidebar-header {
    text-align: center;
    padding-bottom: 12px;
    border-bottom: 1px solid #3f3f46;
}
.cp-sidebar-header h2 {
    font-size: 16px;
    font-weight: 700;
    color: #e4e4e7;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
.cp-mode-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    background: #18181b;
    padding: 4px;
    border-radius: 10px;
    border: 1px solid #3f3f46;
}
.cp-mode-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 10px 8px;
    background: none;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}
.cp-mode-active {
    background: #27272a;
    border: 1px solid #3f3f46;
}
.cp-mode-active .cp-mode-label {
    color: #e4e4e7;
    font-weight: 600;
}
.cp-mode-inactive {
    opacity: 0.5;
}
.cp-mode-inactive:hover {
    opacity: 0.8;
}
.cp-mode-icon { font-size: 16px; }
.cp-mode-label {
    font-size: 10px;
    color: #a1a1aa;
    font-weight: 500;
    letter-spacing: 0.3px;
}
.cp-info-box {
    background: rgba(6,182,212,0.04);
    border: 1px solid rgba(6,182,212,0.12);
    border-radius: 10px;
    padding: 12px 14px;
}
.cp-info-box p {
    font-size: 11px;
    color: #38bdf8;
    font-weight: 500;
    text-align: center;
    line-height: 1.5;
}
.cp-search-box { }
.cp-search-input {
    width: 100%;
    background: #18181b;
    border: 1px solid #3f3f46;
    border-radius: 10px;
    padding: 8px 12px;
    font-size: 11px;
    color: #d4d4d8;
    outline: none;
    transition: border-color 0.15s;
    font-family: var(--font);
}
.cp-search-input::placeholder { color: #52525b; }
.cp-search-input:focus {
    border-color: #71717a;
}
.cp-report-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    font-weight: 500;
    color: #a1a1aa;
    padding: 0 4px;
}
.cp-report-count {
    background: #18181b;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    color: #52525b;
    font-family: monospace;
    border: 1px solid #3f3f46;
}
.cp-report-body {
    flex: 1;
    min-height: 80px;
    background: #18181b;
    border-radius: 8px;
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #3f3f46;
}
.cp-report-empty {
    font-size: 11px;
    color: #52525b;
    text-align: center;
}
.cp-sidebar-footer {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid #3f3f46;
    background: #27272a;
}
.cp-download-btn {
    width: 100%;
    padding: 10px 16px;
    background: #eab308;
    border: none;
    border-radius: 10px;
    color: #18181b;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.15s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 16px rgba(234,179,8,0.15);
}
.cp-download-btn:hover:not(:disabled) {
    background: #ca8a04;
    box-shadow: 0 6px 20px rgba(234,179,8,0.25);
    transform: translateY(-1px);
}
.cp-download-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    box-shadow: none;
}
.cp-download-arrow {
    font-size: 14px;
}
.cp-compare-btn {
    width: 100%;
    padding: 10px 16px;
    background: #3f3f46;
    border: none;
    border-radius: 10px;
    color: #a1a1aa;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.15s;
}
.cp-compare-btn:hover:not(:disabled) {
    background: #52525b;
    color: #e4e4e7;
}
.cp-compare-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Processing Overlay */
.cp-processing-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}
.cp-processing-card {
    background: #27272a;
    border: 1px solid #3f3f46;
    border-radius: 16px;
    padding: 40px 48px;
    text-align: center;
    max-width: 380px;
    width: 90%;
    box-shadow: 0 24px 64px rgba(0,0,0,0.5);
}
.cp-processing-ring {
    position: relative;
    width: 56px; height: 56px;
    margin: 0 auto 20px;
}
.cp-processing-ring div:first-child {
    position: absolute;
    inset: 0;
    border: 3px solid transparent;
    border-top-color: #eab308;
    border-right-color: #eab308;
    border-bottom-color: rgba(234,179,8,0.15);
    border-left-color: rgba(234,179,8,0.15);
    border-radius: 50%;
    animation: cpSpin 0.9s linear infinite;
}
.cp-processing-ring div:last-child {
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 2px solid rgba(234,179,8,0.1);
    animation: cpPulse 2s ease-out infinite;
}
@keyframes cpSpin { to { transform: rotate(360deg); } }
@keyframes cpPulse {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(1.3); opacity: 0; }
}
.cp-processing-card h3 {
    font-size: 17px;
    font-weight: 600;
    color: #e4e4e7;
    margin-bottom: 6px;
}
.cp-processing-card p {
    font-size: 13px;
    color: #71717a;
    margin-bottom: 20px;
}
.cp-processing-bar {
    width: 100%;
    height: 6px;
    background: #18181b;
    border-radius: 4px;
    overflow: hidden;
}
.cp-processing-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #ca8a04, #eab308);
    border-radius: 4px;
    transition: width 0.4s ease;
}

/* Results Modal */
.cp-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.65);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}
.cp-modal {
    background: #27272a;
    border: 1px solid #3f3f46;
    border-radius: 16px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 24px 64px rgba(0,0,0,0.5);
    overflow: hidden;
}
.cp-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #3f3f46;
}
.cp-modal-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: #e4e4e7;
}
.cp-modal-close {
    width: 32px; height: 32px;
    background: none;
    border: none;
    color: #71717a;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.15s;
    font-size: 16px;
}
.cp-modal-close:hover {
    background: #3f3f46;
    color: #e4e4e7;
}
.cp-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}
.cp-modal-body .cp-result-item {
    background: #18181b;
    border: 1px solid #3f3f46;
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 8px;
}
.cp-modal-body .cp-result-item:last-child { margin-bottom: 0; }
.cp-modal-body .cp-result-label {
    font-size: 11px;
    color: #71717a;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    font-weight: 600;
    margin-bottom: 4px;
}
.cp-modal-body .cp-result-value {
    font-size: 14px;
    color: #e4e4e7;
    font-weight: 500;
}
.cp-modal-body .cp-result-match {
    color: #22c55e;
}
.cp-modal-body .cp-result-mismatch {
    color: #ef4444;
}
.cp-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 12px 20px;
    border-top: 1px solid #3f3f46;
}
.cp-btn-secondary {
    padding: 8px 16px;
    background: #3f3f46;
    border: none;
    border-radius: 8px;
    color: #d4d4d8;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    font-family: var(--font);
}
.cp-btn-secondary:hover {
    background: #52525b;
}

/* Sidebar toggle button */
.cp-sidebar-toggle {
    position: absolute;
    right: 8px;
    top: 8px;
    z-index: 45;
    width: 32px; height: 32px;
    background: #27272a;
    border: 1px solid #3f3f46;
    border-radius: 8px;
    color: #a1a1aa;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    font-size: 14px;
}
.cp-sidebar-toggle:hover {
    background: #3f3f46;
    color: #e4e4e7;
}

/* Responsive */
@media (max-width: 900px) {
    .cp-workspace { grid-template-columns: 1fr; }
    .cp-sidebar { width: 240px; }
    .cp-root { height: auto; min-height: calc(100vh - 68px); }
    .cp-viewport { min-height: 300px; }
}
@media (max-width: 600px) {
    .cp-header { flex-wrap: wrap; height: auto; padding: 8px 12px; gap: 8px; }
    .cp-header-right { margin-left: auto; }
    .cp-sidebar { width: 100%; }
}

/* ====== REDACT PDF TOOL ====== */
.rp-root {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 68px;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    background: var(--bg-primary);
    z-index: 40;
}

.rp-upload-screen {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: var(--bg-primary);
    gap: 24px;
}

.rp-upload-header {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 16px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    max-width: 640px;
    width: 100%;
}

.rp-upload-header-icon {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(251,191,36,0.12);
    border-radius: var(--radius-md);
    color: var(--accent-blue);
    font-size: 1.5rem;
    flex-shrink: 0;
}

.rp-upload-header-info h1 {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0 0 4px;
}

.rp-upload-header-info p {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin: 0 0 8px;
    line-height: 1.4;
}

.rp-upload-card {
    max-width: 480px;
    width: 100%;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    padding: 40px 32px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 20px;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5);
}

.rp-upload-icon {
    display: inline-flex;
    padding: 16px;
    background: rgba(251,191,36,0.1);
    color: var(--accent-blue);
    border-radius: var(--radius-md);
    border: 1px solid rgba(251,191,36,0.2);
    margin: 0 auto;
}

.rp-upload-icon svg {
    width: 48px;
    height: 48px;
}

.rp-upload-card h2 {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0;
}

.rp-upload-card p {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.5;
}

.rp-drop-zone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 180px;
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-lg);
    background: var(--bg-secondary);
    cursor: pointer;
    padding: 28px 24px;
    transition: all 0.25s ease;
    box-shadow: inset 0 2px 8px rgba(0,0,0,0.2);
}

.rp-drop-icon {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(251,191,36,0.1);
    border: 1px solid rgba(251,191,36,0.25);
    color: var(--accent-blue);
    margin-bottom: 14px;
    transition: all 0.25s ease;
}
.rp-drop-icon svg { width: 26px; height: 26px; }

.rp-drop-badge {
    margin-top: 14px;
    font-size: 0.62rem;
    font-weight: 600;
    color: var(--text-muted);
    background: rgba(251,191,36,0.08);
    border: 1px solid rgba(251,191,36,0.18);
    padding: 5px 12px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    letter-spacing: 0.02em;
}

.rp-drop-zone:hover,
.rp-drop-zone.dragover {
    border-color: var(--accent-blue);
    background: rgba(251,191,36,0.05);
    box-shadow: 0 0 30px rgba(251,191,36,0.12);
}
.rp-drop-zone.dragover { transform: scale(1.015); border-style: solid; }
.rp-drop-zone:hover .rp-drop-icon,
.rp-drop-zone.dragover .rp-drop-icon {
    transform: scale(1.1);
    background: rgba(251,191,36,0.18);
    box-shadow: 0 0 20px rgba(251,191,36,0.25);
}

.rp-drop-zone p {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-secondary);
}

.rp-drop-zone small {
    font-size: 0.65rem;
    color: var(--text-muted);
    margin-top: 8px;
}

.rp-workspace {
    flex: 1;
    display: flex;
    width: 100%;
    overflow: hidden;
}

/* ===== THUMBNAILS SIDEBAR ===== */
.rp-thumbnails {
    width: 200px;
    background: var(--bg-card);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    flex-shrink: 0;
}

.rp-thumbnails-label {
    padding: 12px 14px;
    font-size: 0.6rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.rp-thumb-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rp-thumb {
    cursor: pointer;
    border: 2px solid transparent;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    padding: 6px;
    transition: all 0.15s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.rp-thumb:hover {
    border-color: var(--border-hover);
    background: var(--bg-card-hover);
}

.rp-thumb.active {
    border-color: var(--accent-blue);
    background: rgba(251,191,36,0.06);
}

.rp-thumb-preview {
    width: 100%;
    aspect-ratio: 3/4;
    background: var(--bg-primary);
    border-radius: 4px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rp-thumb-preview canvas {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.rp-thumb-label {
    font-size: 0.55rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-align: center;
    padding-top: 2px;
}

.rp-thumb.active .rp-thumb-label {
    color: var(--accent-blue);
}

/* ===== CENTER: FULL WIDTH CANVAS ===== */
.rp-center {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
}

.rp-toolbar {
    height: 48px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    padding: 0 14px;
    justify-content: space-between;
    flex-shrink: 0;
    z-index: 30;
    gap: 12px;
}

.rp-toolbar-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.rp-file-title {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rp-toolbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.rp-tools-ribbon {
    display: flex;
    align-items: center;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 3px;
}

.rp-tool-btn {
    padding: 5px 8px;
    color: var(--text-muted);
    background: none;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s;
    font-size: 0.8rem;
}

.rp-tool-btn:hover {
    background: rgba(255,255,255,0.05);
}

.rp-tool-btn.active {
    background: #334155 !important;
    color: var(--accent-blue) !important;
}

.rp-zoom-inline {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 3px 10px;
    font-size: 0.7rem;
    font-weight: 600;
}

.rp-zoom-inline span {
    color: var(--text-secondary);
    min-width: 36px;
    text-align: center;
}

.rp-zoom-inline button {
    color: var(--text-muted);
    background: none;
    border: none;
    cursor: pointer;
    padding: 2px 4px;
    font-size: 1rem;
    line-height: 1;
}

.rp-zoom-inline button:hover {
    color: var(--text-primary);
}

/* ===== VIEWPORT - FULL WIDTH SCROLLING ===== */
.rp-viewport {
    flex: 1;
    overflow: auto;
    background: #1e1e1e;
    display: flex;
    justify-content: center;
    padding: 24px 16px;
    position: relative;
}

.rp-canvas {
    display: block;
    position: relative;
    z-index: 1;
}

/* ===== PDF VIEWER MODE SYSTEM ===== */
#pdf-viewer-root {
    width: 100%;
    max-width: 100%;
    display: flex;
    justify-content: center;
    position: relative;
    align-self: flex-start;
}

.pdf-page-wrapper {
    position: relative !important;
    display: inline-block;
    background: #fff;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5);
    border-radius: 4px;
    overflow: hidden;
    user-select: none !important;
    -webkit-user-select: none;
}

.pdf-page-wrapper canvas {
    display: block;
    z-index: 1;
}

.redaction-overlay-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
}

/* Mode: Hand */
.mode-hand .redaction-overlay-layer {
    pointer-events: none;
}
.mode-hand .pdf-page-wrapper {
    cursor: grab;
}
.mode-hand .pdf-page-wrapper:active {
    cursor: grabbing;
}

/* Mode: Redact */
.mode-redact .redaction-overlay-layer {
    pointer-events: auto !important;
    cursor: crosshair;
}
.mode-redact .pdf-page-wrapper {
    cursor: crosshair;
}

.rp-blackout-box {
    position: absolute;
    z-index: 30;
    cursor: pointer;
    border-radius: 1px;
    transition: opacity 0.15s;
    box-sizing: border-box;
}

.pdf-page-wrapper > .rp-blackout-box {
    position: absolute !important;
    box-sizing: border-box;
}

.rp-blackout-box:hover {
    opacity: 0.8;
}

/* ===== RIGHT SIDEBAR ===== */
.rp-sidebar {
    width: 280px;
    background: var(--bg-card);
    border-left: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.rp-sidebar-body {
    padding: 16px;
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.rp-sidebar-title {
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--text-primary);
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}

.rp-field-label {
    font-size: 0.5rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: block;
    margin-bottom: 4px;
}

.rp-input {
    width: 100%;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 8px 10px;
    font-size: 0.65rem;
    outline: none;
    color: var(--text-primary);
}

.rp-input:focus {
    border-color: var(--accent-blue);
}

.rp-select {
    width: 100%;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 8px 10px;
    font-size: 0.65rem;
    outline: none;
    color: var(--text-primary);
    cursor: pointer;
}

.rp-select:focus {
    border-color: var(--accent-blue);
}

.rp-counter {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-secondary);
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.65rem;
}

.rp-counter-label {
    color: var(--text-muted);
    font-weight: 600;
}

.rp-counter-val {
    color: var(--accent-blue);
    font-weight: 800;
}

.rp-btn {
    width: 100%;
    border: none;
    font-weight: 800;
    padding: 8px;
    border-radius: var(--radius-sm);
    font-size: 0.65rem;
    cursor: pointer;
    transition: all 0.15s;
}

.rp-btn-secondary {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
}

.rp-btn-secondary:hover {
    background: var(--border-color);
}

.rp-divider {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 2px 0;
}

.rp-queue-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.rp-queue-label {
    font-size: 0.5rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.rp-queue-clear {
    font-size: 0.55rem;
    color: var(--text-muted);
    background: none;
    border: none;
    cursor: pointer;
    font-weight: 700;
}

.rp-queue-clear:hover {
    color: var(--accent-blue);
}

.rp-empty-state {
    background: rgba(251,191,36,0.08);
    border: 1px solid rgba(251,191,36,0.2);
    border-radius: var(--radius-md);
    padding: 12px;
    font-size: 0.6rem;
    color: var(--accent-blue);
    line-height: 1.5;
    text-align: center;
}

.rp-queue-items {
    display: none;
    flex-direction: column;
    gap: 6px;
    margin-top: 6px;
    max-height: 40vh;
    overflow-y: auto;
}

.rp-queue-item {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 8px;
    position: relative;
}

.rp-queue-item p {
    font-size: 0.6rem;
    color: var(--text-secondary);
    line-height: 1.5;
    padding-right: 16px;
    overflow: hidden;
    margin: 0;
}

.rp-queue-item button {
    position: absolute;
    top: 4px;
    right: 6px;
    color: var(--text-muted);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    line-height: 1;
}

.rp-queue-item button:hover {
    color: var(--accent-red);
}

.rp-sidebar-footer {
    padding: 14px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

.rp-apply-btn {
    width: 100%;
    background: var(--accent-blue);
    color: #0c0a09;
    border: none;
    font-weight: 800;
    padding: 12px 20px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.75rem;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(251,191,36,0.2);
    transition: all 0.15s;
}

.rp-apply-btn:hover {
    box-shadow: 0 6px 20px rgba(251,191,36,0.3);
    transform: translateY(-1px);
}

.rp-apply-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Results Overlay */
.rp-results-overlay {
    display: none;
    position: absolute;
    inset: 0;
    background: rgba(12,10,9,0.85);
    z-index: 100;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.rp-results-overlay.show {
    display: flex;
}

.rp-results-card {
    max-width: 420px;
    width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 36px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5);
}

.rp-results-card .success-icon {
    width: 64px;
    height: 64px;
    background: rgba(34,197,94,0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #22c55e;
    font-size: 1.5rem;
}

.rp-results-card h3 {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0;
}

.rp-results-card p {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin: 0;
}

.rp-download-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--accent-blue);
    color: #0c0a09;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 0.8rem;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(251,191,36,0.2);
    transition: all 0.15s;
}

.rp-download-btn:hover {
    box-shadow: 0 6px 20px rgba(251,191,36,0.3);
    transform: translateY(-1px);
    color: #0c0a09;
}

.rp-close-results {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 0.7rem;
    cursor: pointer;
    transition: all 0.15s;
}

.rp-close-results:hover {
    background: var(--border-color);
}

/* Loading overlay */
.rp-loading {
    display: none;
    position: absolute;
    inset: 0;
    background: rgba(12,10,9,0.8);
    z-index: 90;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 16px;
}

.rp-loading.show {
    display: flex;
}

.rp-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top-color: var(--accent-blue);
    border-radius: 50%;
    animation: rp-spin 0.8s linear infinite;
}

@keyframes rp-spin {
    to { transform: rotate(360deg); }
}

.rp-loading p {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0;
}

/* Mobile-only chrome (hidden on desktop so the desktop layout stays identical) */
.rp-drawer-head { display: none; }
.rp-mobile-bar { display: none; }

/* Responsive */
@media (max-width: 1100px) {
    .rp-thumbnails { width: 160px; }
    .rp-sidebar { width: 240px; }
}

@media (max-width: 900px) {
    .rp-thumbnails { width: 140px; }
    .rp-sidebar { width: 220px; }
    #pdf-viewer-root { max-width: 100%; }
}

/* ============================================================
   MOBILE ANDROID LAYOUT — Redact PDF (mirrors the organize tool)
   Desktop layout untouched (every rule below is ≤ 768px only)
   ============================================================ */
@media (max-width: 768px) {

    /* Workspace fills the screen, canvas always takes the space */
    .rp-root { top: 68px; }
    .rp-workspace { flex-direction: column; }
    .rp-center { flex: 1 1 auto; min-height: 0; }

    /* Upload screen: never clip the card - scroll when it is taller than viewport */
    .rp-upload-screen {
        overflow-y: auto;
        justify-content: flex-start;
        padding: 20px 14px 96px;
    }
    .rp-upload-screen .rp-upload-card {
        margin: auto;
        padding: 28px 20px;
        gap: 14px;
    }
    .rp-upload-screen .rp-drop-zone { min-height: 150px; padding: 22px 16px; }
    .rp-upload-screen .rp-upload-icon svg { width: 40px; height: 40px; }
    .rp-upload-screen h2 { font-size: 1.15rem; }
    .rp-upload-screen p { font-size: 0.75rem; }

    /* Compact toolbar — single fixed row */
    .rp-toolbar { height: 46px; padding: 0 10px; flex-wrap: nowrap; gap: 8px; }
    .rp-file-title { max-width: 96px; font-size: 0.6rem; }
    .rp-tools-ribbon { padding: 2px; }
    .rp-tool-btn { padding: 4px 6px; font-size: 0.72rem; }
    .rp-zoom-inline { padding: 2px 8px; font-size: 0.62rem; }
    .rp-zoom-inline span { min-width: 28px; }

    /* Viewport clears the bottom action bar */
    .rp-viewport { padding: 10px 6px 86px; }
    #pdf-viewer-root { max-width: 100%; }

    /* Drawing boxes on touch must not scroll the page */
    .mode-redact .redaction-overlay-layer { touch-action: none; }
    /* Hand-mode panning uses JS (one-finger) - block native scroll/drag */
    .mode-hand .pdf-page-wrapper,
    .mode-hand .redaction-overlay-layer { touch-action: none; }

    /* ===== THUMBNAILS → slide-up bottom sheet ===== */
    .rp-thumbnails {
        position: fixed;
        left: 0; right: 0; bottom: 0;
        width: 100% !important;
        max-height: 72dvh !important;
        flex-direction: column;
        border-right: none;
        border-bottom: none;
        border-top: 1px solid #333;
        border-radius: 16px 16px 0 0;
        background: var(--bg-card);
        box-shadow: 0 -10px 30px rgba(0,0,0,.45);
        transform: translateY(105%);
        transition: transform .3s cubic-bezier(.2,.7,.2,1);
        z-index: 90;
    }
    body.rp-pages-open .rp-thumbnails { transform: translateY(0); }
    .rp-thumbnails-label {
        display: flex; align-items: center; justify-content: center; gap: 6px;
        padding: 8px 0 6px;
        border-bottom: 1px solid var(--border-color);
        font-size: 0.52rem; cursor: pointer;
        color: var(--text-secondary);
    }
    .rp-thumbnails-label::after {
        content: '\f0d7'; font-family: "Font Awesome 6 Free"; font-weight: 900;
        font-size: 0.6rem; color: var(--accent-blue); margin-left: 2px;
    }
    .rp-thumb-list {
        flex: 1; min-height: 0;
        flex-direction: row; flex-wrap: wrap;
        overflow-x: hidden; overflow-y: auto;
        align-content: flex-start;
        padding: 8px; gap: 8px;
    }
    .rp-thumb { flex: 0 0 calc(50% - 4px); max-width: calc(50% - 4px); padding: 4px; }
    .rp-thumb-preview { aspect-ratio: 3/4; }
    .rp-thumb-label { font-size: 0.42rem; }

    /* ===== SIDEBAR (Redact Options) → slide-up bottom sheet ===== */
    .rp-sidebar {
        position: fixed;
        left: 0; right: 0; bottom: 0;
        width: 100% !important;
        max-height: 66dvh;
        border-left: none;
        border-top: 1px solid #333;
        border-radius: 18px 18px 0 0;
        transform: translateY(105%);
        transition: transform .3s cubic-bezier(.2,.7,.2,1);
        z-index: 81;
        background: var(--bg-card);
        box-shadow: 0 -12px 36px rgba(0,0,0,.45);
    }
    body.rp-options-open .rp-sidebar { transform: translateY(0); }
    .rp-sidebar-body { padding: 6px 14px 10px; gap: 10px; }
    .rp-sidebar-title { display: none; }

    /* Drawer handle (pill + label) */
    .rp-drawer-head {
        display: flex !important;
        flex-direction: column; align-items: center; gap: 2px;
        padding: 10px 14px 8px; cursor: pointer; user-select: none;
        flex-shrink: 0;
    }
    .rp-drawer-head .rp-pill {
        width: 44px; height: 4px; background: var(--border-color);
        border-radius: 999px; margin-bottom: 6px;
    }
    .rp-drawer-head .rp-head-row {
        display: flex; align-items: center; gap: 6px;
        font-size: 0.58rem; font-weight: 700; color: var(--text-secondary);
        text-transform: uppercase; letter-spacing: .06em;
    }
    .rp-drawer-head .rp-head-row i { color: var(--accent-blue); }
    .rp-drawer-head .rp-head-row i.fa-chevron-down { color: var(--text-muted); }

    /* ===== BOTTOM ACTION BAR (Android) ===== */
    .rp-mobile-bar {
        display: flex;
        align-items: center; gap: 8px;
        position: fixed; left: 12px; right: 12px;
        bottom: calc(12px + env(safe-area-inset-bottom, 0px));
        z-index: 82;
        padding: 6px;
        background: rgba(30,29,26,.6);
        backdrop-filter: blur(14px);
        border: 1px solid #333;
        border-radius: 16px;
        box-shadow: 0 12px 34px rgba(0,0,0,.5);
    }
    .rp-mob-btn {
        flex: 1; min-width: 0;
        display: flex; flex-direction: column; align-items: center; gap: 3px;
        padding: 9px 6px 8px;
        border: none; border-radius: 11px;
        background: var(--bg-card);
        color: var(--text-secondary);
        font-size: 0.55rem; font-weight: 700;
        text-transform: uppercase; letter-spacing: .03em;
        cursor: pointer;
        transition: transform .12s;
    }
    .rp-mob-btn:active { transform: scale(.97); }
    .rp-mob-btn i { font-size: 0.9rem; color: var(--text-muted); }
    .rp-mob-apply { background: var(--accent-blue); color: #000; }
    .rp-mob-apply i { color: #000; }
    body.rp-pages-open .rp-mobile-bar,
    body.rp-options-open .rp-mobile-bar { display: none !important; }
}

@media (max-width: 480px) {
    .rp-upload-card { padding: 24px 16px; }
    .rp-upload-icon svg { width: 36px; height: 36px; }
    .rp-toolbar-right { gap: 6px; }
    .rp-file-title { max-width: 64px; }
}

/* ═══════════════════════════════════════════════
   PAGE NUMBERS TOOL UI
   ═══════════════════════════════════════════════ */
.pn-root {
    display: flex; width: 100%;
    height: calc(100vh - 68px);
    background: var(--bg-secondary); border-radius: var(--radius-lg);
    overflow: hidden; border: 1px solid var(--border-color);
    position: relative;
}
.pn-sidebar {
    width: 350px; min-width: 320px; background: #1c1c1e;
    display: flex; flex-direction: column;
    border-left: 1px solid #3f3f46;
}
.pn-root:not(.pn-sidebar-right) .pn-sidebar {
    border-left: none; border-right: 1px solid #3f3f46;
}
.pn-sidebar-scroll {
    flex: 1; overflow-y: auto; padding: 12px 16px;
}
.pn-sidebar-scroll::-webkit-scrollbar { width: 4px; }
.pn-sidebar-header {
    margin-bottom: 8px;
}
.pn-sidebar-title {
    font-size: 15px; font-weight: 700; color: var(--text-primary);
    margin: 0;
}
.pn-sidebar-desc {
    font-size: 11px; color: var(--text-muted); margin: 2px 0 0 0;
}
.pn-upload-btn {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 12px; margin-bottom: 8px;
    background: var(--bg-card); border: 1px dashed var(--border-color);
    border-radius: var(--radius-sm); cursor: pointer;
    color: var(--accent-blue); font-size: 12px; font-weight: 500;
    transition: var(--transition);
}
.pn-upload-btn:hover {
    border-color: var(--accent-blue); background: rgba(251,191,36,0.08);
}
.pn-upload-btn i { font-size: 14px; }
.pn-section {
    margin-bottom: 6px;
}
.pn-label {
    display: block; font-size: 10px; font-weight: 600;
    color: var(--text-secondary); margin-bottom: 4px;
    text-transform: uppercase; letter-spacing: 0.03em;
}
.pn-sub-label {
    display: block; font-size: 10px; font-weight: 500;
    color: var(--text-muted); margin-bottom: 2px;
}
.pn-hint {
    display: block; font-size: 9px; color: var(--text-muted);
    margin-top: 1px; font-style: italic;
}
.pn-hint code {
    background: rgba(251,191,36,0.1); color: var(--accent-blue);
    padding: 1px 4px; border-radius: 3px; font-size: 9px;
}
.pn-input {
    width: 100%; padding: 6px 9px;
    background: var(--bg-primary); border: 1px solid var(--border-color);
    border-radius: var(--radius-sm); color: var(--text-primary);
    font-size: 12px; font-family: var(--font); outline: none;
    transition: var(--transition);
}
.pn-input:focus {
    border-color: var(--accent-blue); box-shadow: 0 0 0 2px rgba(251,191,36,0.15);
}
.pn-input::placeholder { color: var(--text-muted); }
.pn-range {
    -webkit-appearance: none; width: 100%; height: 4px;
    background: #3f3f46; border-radius: 3px; outline: none;
    cursor: pointer;
}
.pn-range::-webkit-slider-thumb {
    -webkit-appearance: none; width: 14px; height: 14px;
    background: var(--accent-blue); border-radius: 50%;
    cursor: pointer; border: 2px solid #1c1c1e;
}
.pn-range::-webkit-slider-thumb:hover { transform: scale(1.15); }
.pn-color-row {
    display: flex; gap: 6px; align-items: center;
}
.pn-color-picker {
    width: 30px; height: 30px; border: 2px solid var(--border-color);
    border-radius: var(--radius-sm); cursor: pointer;
    background: none; padding: 2px; flex-shrink: 0;
}
.pn-color-text {
    flex: 1; font-family: monospace; font-size: 11px; padding: 5px 8px;
}
.pn-checkbox-row {
    display: flex; align-items: center; margin-bottom: 2px;
}
.pn-checkbox {
    display: flex; align-items: center; gap: 6px;
    cursor: pointer; font-size: 12px; color: var(--text-secondary);
    user-select: none;
}
.pn-checkbox input { display: none; }
.pn-checkmark {
    width: 15px; height: 15px;
    border: 2px solid var(--border-color); border-radius: 3px;
    display: flex; align-items: center; justify-content: center;
    transition: var(--transition); flex-shrink: 0;
    background: var(--bg-primary);
}
.pn-checkbox input:checked ~ .pn-checkmark {
    background: var(--accent-blue); border-color: var(--accent-blue);
}
.pn-checkbox input:checked ~ .pn-checkmark::after {
    content: '\f00c'; font-family: 'Font Awesome 6 Free';
    font-weight: 900; font-size: 8px; color: #0c0a09;
}
.pn-margin-row {
    display: flex; gap: 8px;
}
.pn-margin-row > div { flex: 1; }
/* ─── Position Matrix (3x3) + Margin ─── */
.pn-pos-margin-row {
    display: flex; gap: 12px; align-items: flex-start;
    background: var(--bg-card); padding: 10px;
    border-radius: var(--radius-md); border: 1px solid var(--border-color);
}
.pn-pos-col { flex-shrink: 0; }
.pn-margin-col { flex: 1; }
.pn-pos-matrix {
    display: grid; grid-template-columns: repeat(3, 1fr);
    gap: 0; width: 96px; height: 96px;
    background: var(--bg-primary);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    overflow: hidden;
}
.pn-pos-cell {
    border: 1px dashed rgba(113,113,122,0.3);
    cursor: pointer; transition: var(--transition);
    position: relative;
}
.pn-pos-cell:hover {
    background: rgba(251,191,36,0.06);
}
.pn-pos-cell.active {
    background: rgba(251,191,36,0.12);
    border-color: var(--accent-blue);
    border-style: solid;
}
.pn-pos-cell.active::after {
    content: ''; position: absolute; top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 10px; height: 10px;
    background: var(--accent-blue);
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(251,191,36,0.5);
}
.pn-pos-cell-dot {
    display: flex; align-items: center; justify-content: center;
}
.pn-select {
    width: 100%; padding: 8px 10px;
    background: var(--bg-primary); border: 1px solid var(--border-color);
    border-radius: var(--radius-sm); color: var(--text-primary);
    font-size: 12px; font-family: var(--font); outline: none;
    cursor: pointer; appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 20 20'%3E%3Cpath fill='%23a8a29e' d='M9.293 12.95l.707.707L15.657 8l-1.414-1.414L10 10.828 5.757 6.586 4.343 8z'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 8px center;
    padding-right: 28px;
}
.pn-select:focus {
    border-color: var(--accent-blue); box-shadow: 0 0 0 2px rgba(251,191,36,0.15);
}
.pn-sidebar-footer {
    padding: 10px 16px; border-top: 1px solid #3f3f46;
    background: #1c1c1e;
    flex-shrink: 0;
}
.pn-process-btn {
    width: 100%; padding: 10px;
    border: none; border-radius: var(--radius-sm);
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
    color: #0c0a09; font-size: 13px; font-weight: 700;
    cursor: pointer; transition: var(--transition);
    display: flex; align-items: center; justify-content: center; gap: 8px;
}
.pn-process-btn:hover:not(:disabled) {
    transform: translateY(-1px); box-shadow: 0 4px 14px rgba(251,191,36,0.3);
}
.pn-process-btn:disabled {
    opacity: 0.4; cursor: not-allowed;
}
.hidden { display: none !important; }

/* Workspace */
.pn-workspace {
    flex: 1; display: flex; align-items: center; justify-content: center;
    padding: 0; background: var(--bg-primary);
    overflow-y: auto; overflow-x: hidden;
}
.pn-workspace-empty {
    padding: 40px;
    text-align: center; max-width: 360px;
    margin: auto;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.pn-empty-icon {
    width: 96px; height: 96px; margin: 0 auto 20px;
    background: rgba(251,191,36,0.10); border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 40px; color: var(--accent-blue);
    border: 2px dashed rgba(251,191,36,0.35);
}
.pn-empty-text {
    font-size: 19px; font-weight: 600; color: var(--text-primary);
    margin: 0 0 10px;
}
.pn-empty-hint {
    font-size: 13px; color: var(--text-muted); margin: 0;
    line-height: 1.5;
}
.pn-empty-cta {
    margin-top: 20px;
    display: inline-flex; align-items: center; gap: 8px;
    padding: 11px 24px;
    background: linear-gradient(135deg, var(--accent-blue), #f59e0b);
    color: #0f172a; font-weight: 700; font-size: 13px;
    border: none; border-radius: 10px;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
    box-shadow: 0 4px 12px rgba(251,191,36,0.20);
}
.pn-empty-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(251,191,36,0.30);
}
.pn-empty-cta:active { transform: translateY(0); }

/* Processing */
.pn-processing {
    text-align: center;
}
.pn-processing-ring {
    position: relative; width: 60px; height: 60px;
    margin: 0 auto 20px;
}
.pn-ring-seg {
    width: 100%; height: 100%; border-radius: 50%;
    border: 4px solid var(--border-color);
    border-top-color: var(--accent-blue);
    animation: pn-spin 0.8s linear infinite;
}
.pn-ring-pulse {
    position: absolute; top: -8px; left: -8px; right: -8px; bottom: -8px;
    border-radius: 50%; border: 2px solid var(--accent-blue);
    animation: pn-pulse 1.5s ease-in-out infinite; opacity: 0;
}
@keyframes pn-spin { to { transform: rotate(360deg); } }
@keyframes pn-pulse {
    0% { transform: scale(1); opacity: 0.4; }
    100% { transform: scale(1.4); opacity: 0; }
}
.pn-processing-label {
    font-size: 16px; font-weight: 600; color: var(--text-primary);
}

/* Results */
.pn-results {
    text-align: center; width: 100%; max-width: 420px;
}
.pn-results-card {
    background: var(--bg-card); border: 1px solid var(--border-color);
    border-radius: var(--radius-lg); padding: 40px 32px;
}
.pn-results-icon {
    width: 64px; height: 64px; margin: 0 auto 16px;
    background: rgba(16,185,129,0.1); border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 28px; color: var(--accent-green);
}
.pn-results-title {
    font-size: 20px; font-weight: 700; color: var(--text-primary);
    margin: 0 0 8px;
}
.pn-results-desc {
    font-size: 14px; color: var(--text-muted); margin: 0 0 24px;
}
.pn-results-actions {
    display: flex; gap: 12px; justify-content: center;
}
.pn-btn-dl {
    padding: 12px 28px; border-radius: var(--radius-sm);
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
    color: #0c0a09; font-weight: 700; font-size: 14px;
    text-decoration: none; display: inline-flex; align-items: center;
    gap: 8px; transition: var(--transition);
}
.pn-btn-dl:hover {
    transform: translateY(-1px); box-shadow: 0 4px 14px rgba(251,191,36,0.3);
    color: #0c0a09;
}
.pn-btn-reset {
    padding: 12px 28px; border-radius: var(--radius-sm);
    background: var(--bg-secondary); border: 1px solid var(--border-color);
    color: var(--text-secondary); font-weight: 600; font-size: 14px;
    cursor: pointer; transition: var(--transition);
}
.pn-btn-reset:hover {
    border-color: var(--border-hover); color: var(--text-primary);
}

/* ─── Sidebar Toggle ─── */
.pn-sidebar-toggle {
    position: absolute; top: 12px; z-index: 10;
    width: 24px; height: 24px; border: none; border-radius: 0 4px 4px 0;
    background: var(--bg-card); color: var(--text-muted);
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    font-size: 10px; transition: var(--transition);
}
.pn-root:not(.pn-sidebar-right) .pn-sidebar-toggle {
    left: 350px; border-left: 1px solid var(--border-color);
    border-radius: 0 4px 4px 0;
}
.pn-root.pn-sidebar-right .pn-sidebar-toggle {
    right: 350px; border-right: 1px solid var(--border-color);
    border-radius: 4px 0 0 4px;
}
.pn-sidebar-toggle:hover {
    background: var(--bg-card-hover); color: var(--text-primary);
}

/* ─── Right Sidebar ─── */
.pn-root.pn-sidebar-right {
    flex-direction: row-reverse;
}
.pn-root.pn-sidebar-right .pn-sidebar {
    border-right: none; border-left: 1px solid #3f3f46;
}

/* ─── Pages Grid Preview ─── */
.pn-grid-container {
    width: 100%; min-height: 100%;
    display: flex; flex-direction: column;
    background: var(--bg-primary);
}
.pn-grid-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 20px; border-bottom: 1px solid var(--border-color);
    background: var(--bg-secondary);
    flex-shrink: 0;
}
.pn-grid-title {
    display: flex; align-items: center; gap: 10px;
    font-size: 13px; font-weight: 600; color: var(--text-primary);
}
.pn-grid-title i { color: var(--accent-blue); font-size: 16px; }
.pn-grid-count {
    font-size: 11px; font-weight: 400; color: var(--text-muted);
}
.pn-grid-reset {
    width: 28px; height: 28px; border: 1px solid var(--border-color);
    border-radius: var(--radius-sm); background: transparent;
    color: var(--text-muted); cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; transition: var(--transition);
}
.pn-grid-reset:hover {
    color: var(--accent-red); border-color: var(--accent-red);
}
.pn-grid-scroll {
    flex: 1; overflow-y: auto; padding: 24px;
}
.pn-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    max-width: 100%; margin: 0 auto;
    padding: 0;
    justify-items: center;
}
@media (min-width: 500px) { .pn-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 768px) { .pn-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1100px) { .pn-grid { grid-template-columns: repeat(4, 1fr); gap: 20px; } }
.pn-grid-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: var(--transition);
    display: flex; flex-direction: column;
    max-width: 240px; width: 100%;
}
.pn-grid-card:hover {
    border-color: var(--accent-blue);
    box-shadow: 0 4px 20px rgba(251,191,36,0.12);
}
.pn-grid-card-canvas {
    background: var(--bg-primary);
    padding: 10px;
    display: flex; align-items: center; justify-content: center;
    flex: 1;
}
.pn-grid-canvas-inner {
    position: relative;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.4);
    border-radius: 2px;
    line-height: 0;
}
.pn-grid-canvas-inner canvas {
    max-width: 100%; max-height: 280px;
}
.pn-grid-bg { display: block; }
.pn-grid-overlay {
    position: absolute; top: 0; left: 0;
    pointer-events: none;
}
.pn-grid-card-label {
    padding: 8px 10px;
    font-size: 11px; font-weight: 600;
    color: var(--text-muted);
    text-align: center;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
}
.pn-grid-card:hover .pn-grid-card-label {
    color: var(--accent-blue);
}

/* Page-number drawer (mobile only) — hidden by default on desktop */
.pn-drawer-handle, .pn-drawer-backdrop { display: none; }

@media (max-width: 768px) {
    .pn-root { flex-direction: column; position: relative; }
    .pn-root.pn-sidebar-right { flex-direction: column; }
    .pn-pos-margin-row { flex-direction: column; }
    .pn-sidebar-toggle { display: none; }

    /* workspace = full screen, grid scrolls, room for collapsed drawer */
    .pn-workspace { padding: 0; }
    .pn-grid { grid-template-columns: repeat(1, 1fr); gap: 10px; }
    .pn-grid-card { max-width: 100%; }
    .pn-grid-scroll { padding: 12px 12px calc(var(--drawer-peek, 92px) + 8px); }
    .pn-grid-header { padding: 8px 12px; }

    /* sidebar -> bottom drawer (collapsed by default) */
    .pn-sidebar {
        position: fixed;
        left: 0; right: 0; bottom: 0;
        width: 100%;
        max-height: 78dvh;
        border-right: none;
        border-bottom: none;
        border-top: 1px solid var(--accent);
        border-radius: 18px 18px 0 0;
        box-shadow: 0 -12px 36px rgba(0,0,0,0.45);
        z-index: 80;
        transform: translateY(calc(100% - var(--drawer-peek, 92px)));
        transition: transform 0.32s cubic-bezier(0.2, 0.7, 0.2, 1);
        overflow: hidden;
        will-change: transform;
    }
    .pn-sidebar.is-open { transform: translateY(0); }
    .pn-sidebar-scroll { flex: 1; min-height: 0; }
    .pn-sidebar-footer { flex-shrink: 0; }

    /* drag handle (grab strip + live info) */
    .pn-drawer-handle {
        display: flex;
        flex-direction: column;
        align-items: center;
        flex-shrink: 0;
        cursor: grab;
        touch-action: none;
        background: linear-gradient(180deg, rgba(251,191,36,0.07), transparent);
    }
    .pn-drawer-handle:active { cursor: grabbing; }
    .pn-drawer-handle .handle-grip {
        width: 38px; height: 5px; margin-top: 8px;
        border-radius: 999px;
        background: var(--accent);
        transition: background 0.3s, box-shadow 0.3s;
    }
    .pn-sidebar.is-open .handle-grip { background: var(--primary); box-shadow: 0 0 12px rgba(251,191,36,0.5); }
    .pn-drawer-handle .handle-row {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 7px;
        padding: 7px 2px 5px;
    }
    .pn-drawer-handle .handle-status {
        display: inline-flex;
        align-items: center;
        gap: 7px;
        font-size: 0.76rem;
        font-weight: 700;
        color: var(--text-main);
        letter-spacing: 0.2px;
    }
    .pn-drawer-handle .handle-status i { color: var(--primary); font-size: 0.8rem; }

    /* backdrop — dims workspace, tap to close */
    .pn-drawer-backdrop {
        display: block;
        position: fixed;
        top: 0; left: 0; right: 0; bottom: 0;
        background: rgba(2, 6, 23, 0.55);
        backdrop-filter: blur(3px);
        -webkit-backdrop-filter: blur(3px);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s ease;
        z-index: 79; /* below drawer (80), above workspace */
    }
    .pn-drawer-backdrop.is-open { opacity: 1; pointer-events: auto; }
}

/* =======================================
   ROTATE PDF - Modern Visual UI
   ======================================= */
/* ====== ROTATE PDF - Compact Modern UI ====== */

/* Root */
.rt-root {
    position: fixed;
    top: 68px;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    background: #0d0d0d;
    overflow: hidden;
    color: #e4e4e7;
    font-family: Inter, system-ui, sans-serif;
    user-select: none;
}

/* Sidebar */
.rt-sidebar {
    width: 330px;
    flex-shrink: 0;
    background: #121212;
    border-right: 1px solid #27272a;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 16px;
    height: 100%;
    min-height: 0;
    overflow: hidden;
}
.rt-sidebar-content {
    display: flex;
    flex-direction: column;
    gap: 14px;
    overflow-y: auto;
    min-height: 0;
}

/* Section header */
.rt-section-header {
    border-bottom: 1px solid #27272a;
    padding-bottom: 8px;
}
.rt-section-title {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #e4e4e7;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}
.rt-section-title-icon {
    color: #f59e0b;
    font-size: 15px;
    width: 20px;
    text-align: center;
}
.rt-section-desc {
    font-size: 12px;
    color: #71717a;
    margin: 4px 0 0;
}

/* Upload zone */
.rt-upload-zone {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #18181b;
    border: 1px solid #27272a;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}
.rt-upload-zone:hover {
    border-color: #3f3f46;
    background: #1a1a1e;
}
.rt-upload-inner {
    display: flex;
    align-items: center;
    gap: 10px;
    overflow: hidden;
}
.rt-upload-text {
    font-size: 13px;
    font-weight: 500;
    color: #a1a1aa;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.rt-browse-badge {
    font-size: 10px;
    background: #27272a;
    color: #a1a1aa;
    padding: 2px 8px;
    border-radius: 4px;
    border: 1px solid #3f3f46;
    flex-shrink: 0;
}

/* File info card */
.rt-file-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, rgba(251,191,36,0.06), rgba(251,191,36,0.04));
    border: 1px solid rgba(251,191,36,0.15);
    border-radius: 8px;
    padding: 8px 10px;
    animation: rtSlideUp 0.3s ease;
}
.rt-file-card-left {
    display: flex;
    align-items: center;
    gap: 10px;
    overflow: hidden;
}
.rt-file-card-icon {
    width: 36px; height: 36px;
    background: rgba(251,191,36,0.1);
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 16px; color: #f59e0b; flex-shrink: 0;
}
.rt-file-card-details {
    min-width: 0;
}
.rt-file-card-name {
    font-size: 13px; font-weight: 600;
    display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.rt-file-card-size {
    font-size: 11px; color: #71717a; margin-top: 1px; display: block;
}
.rt-file-card-remove {
    width: 28px; height: 28px;
    background: rgba(239,68,68,0.1);
    border: none; border-radius: 6px;
    color: #ef4444; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-size: 11px;
    transition: all 0.2s;
    flex-shrink: 0;
}
.rt-file-card-remove:hover { background: rgba(239,68,68,0.2); }

/* Control section */
.rt-control-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.rt-control-label {
    font-size: 11px;
    font-weight: 700;
    color: #a1a1aa;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Angle grid */
.rt-angle-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}
.rt-angle-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px 4px;
    background: #18181b;
    border: 1px solid #27272a;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    color: #a1a1aa;
    font-family: inherit;
}
.rt-angle-btn:hover {
    border-color: #3f3f46;
    color: #e4e4e7;
}
.rt-angle-btn.active {
    border: 2px solid #f59e0b;
    background: rgba(245,158,11,0.1);
    box-shadow: 0 0 12px rgba(245,158,11,0.08);
    color: #f59e0b;
}
.rt-angle-svg {
    width: 14px; height: 14px;
}
.rt-angle-label {
    font-size: 10px; font-weight: 600;
}

/* Slider section */
.rt-slider-section {
    background: rgba(24,24,27,0.4);
    border: 1px solid rgba(39,39,42,0.6);
    border-radius: 8px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.rt-slider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.rt-slider-badge {
    font-family: monospace;
    color: #f59e0b;
    font-weight: 700;
    font-size: 11px;
    background: rgba(245,158,11,0.1);
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid rgba(245,158,11,0.2);
}

/* Range slider */
.rt-range {
    -webkit-appearance: none; appearance: none;
    width: 100%; height: 6px;
    background: linear-gradient(90deg, var(--rt-accent, #f59e0b) 0%, var(--rt-accent, #f59e0b) var(--rt-fill, 50%), var(--rt-track, #27272a) var(--rt-fill, 50%), var(--rt-track, #27272a) 100%);
    border-radius: 4px; outline: none; border: none; cursor: pointer;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.25);
}
.rt-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px; height: 18px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--rt-accent, #f59e0b), var(--rt-accent-hi, #fbbf24));
    cursor: pointer;
    border: 2px solid #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.35), 0 0 0 4px rgba(245,158,11,0.15);
    transition: transform 0.15s, box-shadow 0.15s;
}
.rt-range::-webkit-slider-thumb:hover { transform: scale(1.15); box-shadow: 0 2px 10px rgba(0,0,0,0.4), 0 0 0 6px rgba(245,158,11,0.22); }
.rt-range::-webkit-slider-thumb:active { transform: scale(1.05); }
.rt-range::-moz-range-thumb {
    width: 18px; height: 18px;
    background: linear-gradient(135deg, var(--rt-accent, #f59e0b), var(--rt-accent-hi, #fbbf24));
    border-radius: 50%; cursor: pointer; border: 2px solid #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.35), 0 0 0 4px rgba(245,158,11,0.15);
}
.rt-range:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 3px rgba(79,70,229,0.35), 0 0 0 6px rgba(245,158,11,0.22); }
.rt-range-labels {
    display: flex;
    justify-content: space-between;
    font-size: 9px;
    color: #52525b;
    font-family: monospace;
    padding-top: 1px;
}

/* Info card */
.rt-info-card {
    background: #18181b;
    border: 1px solid #27272a;
    border-radius: 8px;
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.rt-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
}
.rt-info-label { color: #71717a; }
.rt-info-value { color: #e4e4e7; font-weight: 600; font-family: monospace; }
.rt-info-value.rt-accent { color: #f59e0b; }

/* Sidebar footer */
.rt-sidebar-footer {
    padding-top: 10px;
    border-top: 1px solid rgba(39,39,42,0.6);
}

/* Process button */
.rt-process-btn {
    width: 100%;
    padding: 10px;
    background: #f59e0b;
    border: none;
    border-radius: 8px;
    color: #09090b;
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(245,158,11,0.1);
}
.rt-process-btn:hover:not(:disabled) {
    background: #d97706;
}
.rt-process-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none;
}
.rt-process-icon {
    width: 13px; height: 13px;
}

/* Workspace */
.rt-workspace {
    flex: 1;
    height: 100%;
    min-height: 0;
    background: #141414;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* Empty state */
.rt-workspace-empty {
    text-align: center;
    padding: 40px 20px;
    max-width: 400px;
}
.rt-empty-icon {
    margin-bottom: 16px;
}
.rt-empty-icon svg {
    width: 60px; height: 60px;
    stroke: rgba(245,158,11,0.2);
}
.rt-empty-text {
    font-size: 13px;
    font-weight: 600;
    color: #d4d4d8;
    margin: 0 0 4px;
}
.rt-empty-hint {
    font-size: 11px;
    color: #71717a;
    margin: 0;
    max-width: 200px;
    margin-left: auto;
    margin-right: auto;
}

/* Preview */
.rt-preview-container {
    width: 100%;
    flex: 1;
    min-height: 0;
    max-height: 100%;
    display: flex;
    flex-direction: column;
    background: #141414;
    overflow: hidden;
}
.rt-preview-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 40px;
    padding: 0 16px;
    border-bottom: 1px solid rgba(39,39,42,0.8);
    background: #161616;
    flex-shrink: 0;
}
.rt-preview-title-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    overflow: hidden;
}
.rt-preview-label {
    font-size: 12px;
    font-weight: 600;
    color: #a1a1aa;
    letter-spacing: 0.04em;
    flex-shrink: 0;
}
.rt-doc-name {
    font-size: 12px;
    font-weight: 500;
    color: #e4e4e7;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.rt-preview-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}
.rt-nav-btn {
    width: 30px; height: 30px;
    border: 1px solid #27272a;
    border-radius: 8px;
    background: transparent;
    color: #a1a1aa;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    font-size: 12px;
}
.rt-nav-btn:hover:not(:disabled) {
    border-color: #f59e0b;
    color: #f59e0b;
    background: rgba(245,158,11,0.06);
}
.rt-nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}
.rt-nav-info {
    font-size: 11px;
    font-weight: 500;
    color: #71717a;
    background: #18181b;
    padding: 4px 10px;
    border-radius: 4px;
    border: 1px solid #27272a;
}
.rt-preview-canvas-wrap {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    background: radial-gradient(ellipse at center, rgba(245,158,11,0.03), transparent 60%);
    max-height: 100%;
}
.rt-canvas-inner {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
    border-radius: 4px;
    line-height: 0;
    background: #fff;
}
.rt-canvas-inner canvas {
    display: block;
    max-width: 100%;
    max-height: 60vh;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.rt-rotate-indicator {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    color: #f59e0b;
    font-size: 12px;
    font-weight: 600;
    pointer-events: none;
    z-index: 10;
    animation: rtFadeIn 0.3s ease;
}
.rt-rotate-indicator i { font-size: 11px; }

/* Processing */
.rt-processing {
    text-align: center;
    padding: 60px 20px;
}
.rt-processing-ring {
    position: relative; width: 60px; height: 60px;
    margin: 0 auto 20px;
}
.rt-ring-seg {
    width: 100%; height: 100%; border-radius: 50%;
    border: 4px solid #27272a;
    border-top-color: #f59e0b;
    animation: rtSpin 0.8s linear infinite;
}
.rt-ring-pulse {
    position: absolute; top: -8px; left: -8px; right: -8px; bottom: -8px;
    border-radius: 50%; border: 2px solid #f59e0b;
    animation: rtPulse 1.5s ease-in-out infinite; opacity: 0;
}
@keyframes rtSpin { to { transform: rotate(360deg); } }
@keyframes rtPulse {
    0% { transform: scale(1); opacity: 0.4; }
    100% { transform: scale(1.4); opacity: 0; }
}
.rt-processing-label {
    font-size: 16px; font-weight: 600; color: #e4e4e7;
}

/* Results */
.rt-results {
    text-align: center; width: 100%; max-width: 420px;
    animation: rtFadeIn 0.3s ease;
}
@keyframes rtFadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}
.rt-results-card {
    background: #18181b; border: 1px solid #27272a;
    border-radius: 12px; padding: 40px 32px;
}
.rt-results-icon {
    width: 64px; height: 64px; margin: 0 auto 16px;
    background: rgba(16,185,129,0.1); border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 28px; color: #22c55e;
}
.rt-results-title {
    font-size: 20px; font-weight: 700; color: #e4e4e7;
    margin: 0 0 8px;
}
.rt-results-desc {
    font-size: 14px; color: #71717a; margin: 0 0 24px;
}
.rt-results-actions {
    display: flex; gap: 12px; justify-content: center;
}
.rt-btn-dl {
    padding: 12px 28px; border-radius: 8px;
    background: #f59e0b;
    color: #09090b; font-weight: 700; font-size: 14px;
    text-decoration: none; display: inline-flex; align-items: center;
    gap: 8px; transition: all 0.2s;
}
.rt-btn-dl:hover {
    background: #d97706;
    color: #09090b;
}
.rt-btn-reset {
    padding: 12px 28px; border-radius: 8px;
    background: #18181b; border: 1px solid #27272a;
    color: #a1a1aa; font-weight: 600; font-size: 14px;
    cursor: pointer; transition: all 0.2s;
}
.rt-btn-reset:hover {
    border-color: #3f3f46; color: #e4e4e7;
}

/* Animations */
@keyframes rtSlideUp {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ====== REMOVE PAGES ====== */
.rm-root {
    position: fixed;
    top: 68px; left: 0; right: 0; bottom: 0;
    display: flex;
    flex-direction: row;
    background: #0d0d0d;
    overflow: hidden;
    color: #e4e4e7;
    font-family: Inter, system-ui, sans-serif;
    user-select: none;
}
.rm-sidebar {
    width: 330px;
    flex-shrink: 0;
    background: #121212;
    border-right: 1px solid #27272a;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 16px;
    height: 100%;
    min-height: 0;
    overflow: hidden;
}
.rm-sidebar-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
    overflow-y: auto;
    min-height: 0;
}
.rm-section-header {
    border-bottom: 1px solid rgba(39,39,42,0.8);
    padding-bottom: 8px;
}
.rm-section-title {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #d4d4d8;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}
.rm-section-icon {
    color: #f59e0b;
    font-size: 15px;
}
.rm-field-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.rm-field-label {
    font-size: 10px;
    font-weight: 700;
    color: #71717a;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.rm-upload-zone {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    background: rgba(24,24,27,0.8);
    border: 2px solid rgba(245,158,11,0.3);
    padding: 10px 12px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: inset 0 2px 4px rgba(245,158,11,0.05);
}
.rm-upload-zone:hover {
    border-color: #f59e0b;
}
.rm-upload-zone.drag-over {
    border-color: #f59e0b;
    background: rgba(245,158,11,0.08);
}
.rm-upload-zone.has-file {
    border-color: #f59e0b;
    background: rgba(245,158,11,0.06);
}
.rm-upload-inner {
    display: flex;
    align-items: center;
    gap: 10px;
    overflow: hidden;
    min-width: 0;
}
.rm-upload-icon {
    color: #f59e0b;
    font-size: 14px;
    flex-shrink: 0;
}
.rm-upload-text {
    font-size: 12px;
    font-weight: 600;
    color: #a1a1aa;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.rm-browse-badge {
    font-size: 10px;
    font-weight: 700;
    background: rgba(245,158,11,0.1);
    color: #f59e0b;
    border: 1px solid rgba(245,158,11,0.2);
    padding: 3px 8px;
    border-radius: 8px;
    flex-shrink: 0;
    transition: all 0.2s;
}
.rm-upload-zone:hover .rm-browse-badge {
    background: #f59e0b;
    color: #09090b;
}
.rm-file-info-block {
    display: flex;
    flex-direction: column;
    gap: 6px;
    animation: rmSlideUp 0.3s ease;
}
.rm-file-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(245,158,11,0.04);
    border: 1px solid rgba(245,158,11,0.15);
    border-radius: 8px;
    padding: 8px 10px;
}
.rm-file-card-left {
    display: flex;
    align-items: center;
    gap: 10px;
    overflow: hidden;
}
.rm-file-card-icon {
    font-size: 16px;
    flex-shrink: 0;
}
.rm-file-card-details { min-width: 0; }
.rm-file-card-name {
    font-size: 13px; font-weight: 600;
    display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.rm-file-card-size {
    font-size: 11px; color: #71717a; margin-top: 1px; display: block;
}
.rm-file-card-remove {
    width: 28px; height: 28px;
    background: rgba(245,158,11,0.1);
    border: none; border-radius: 6px;
    color: #f59e0b; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; font-weight: 700;
    transition: all 0.2s;
    flex-shrink: 0;
}
.rm-file-card-remove:hover { background: rgba(245,158,11,0.2); }
.rm-file-stats {
    font-size: 11px;
    color: #71717a;
    text-align: center;
}
.rm-file-stats strong {
    color: #e4e4e7;
}
.rm-info-box {
    background: rgba(245,158,11,0.05);
    border: 1px solid rgba(245,158,11,0.2);
    border-radius: 12px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.rm-info-box-title {
    font-size: 11px;
    font-weight: 700;
    color: #f59e0b;
    display: flex;
    align-items: center;
    gap: 6px;
}
.rm-info-box-text {
    font-size: 11px;
    color: #a1a1aa;
    line-height: 1.5;
    margin: 0;
}
.rm-input {
    width: 100%;
    padding: 10px 12px;
    background: #09090b;
    border: 1px solid #27272a;
    border-radius: 12px;
    color: #f59e0b;
    font-size: 12px;
    font-family: monospace;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.2);
}
.rm-input:focus {
    border-color: #f59e0b;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.2), 0 0 0 2px rgba(245,158,11,0.05);
}
.rm-input::placeholder {
    color: #52525b;
}
.rm-input-hint {
    font-size: 9px;
    color: rgba(113,113,122,0.7);
    font-style: italic;
}
.rm-chips-wrap {
    margin-top: 2px;
}
.rm-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}
.rm-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 8px;
    background: rgba(245,158,11,0.1);
    border: 1px solid rgba(245,158,11,0.3);
    border-radius: 4px;
    color: #f59e0b;
    font-size: 11px;
    font-weight: 600;
    font-family: monospace;
    cursor: pointer;
    transition: all 0.15s;
}
.rm-chip:hover {
    background: rgba(245,158,11,0.2);
}
.rm-info-card {
    background: #18181b;
    border: 1px solid #27272a;
    border-radius: 8px;
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.rm-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
}
.rm-info-label { color: #71717a; }
.rm-info-value { color: #e4e4e7; font-weight: 600; font-family: monospace; }
.rm-info-value.rm-accent { color: #f59e0b; }
.rm-sidebar-footer {
    padding-top: 12px;
    border-top: 1px solid rgba(39,39,42,0.6);
}
.rm-process-btn {
    width: 100%;
    padding: 12px 16px;
    background: #f59e0b;
    border: none;
    border-radius: 12px;
    color: #09090b;
    font-family: inherit;
    font-size: 11px;
    font-weight: 900;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
    box-shadow: 0 4px 16px rgba(245,158,11,0.15);
}
.rm-process-btn:hover:not(:disabled) {
    background: #d97706;
}
.rm-process-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    box-shadow: none;
}
.rm-btn-arrow {
    transition: transform 0.15s;
}
.rm-process-btn:hover:not(:disabled) .rm-btn-arrow {
    transform: translateX(2px);
}
.rm-workspace {
    flex: 1;
    height: 100%;
    min-height: 0;
    background: #141414;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}
.rm-workspace-empty {
    text-align: center;
    padding: 40px 20px;
    max-width: 400px;
}
.rm-empty-icon {
    margin-bottom: 16px;
}
.rm-empty-icon svg {
    width: 60px; height: 60px;
    stroke: rgba(245,158,11,0.15);
}
.rm-empty-text {
    font-size: 14px;
    font-weight: 600;
    color: #d4d4d8;
    margin: 0 0 6px;
}
.rm-empty-hint {
    font-size: 12px;
    color: #71717a;
    margin: 0;
    max-width: 240px;
    margin-left: auto;
    margin-right: auto;
}
.rm-preview-container {
    width: 100%;
    flex: 1;
    min-height: 0;
    max-height: 100%;
    display: flex;
    flex-direction: column;
    background: #141414;
    overflow: hidden;
}
.rm-preview-grid-wrap {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 24px;
}
.rm-thumb-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}
.rm-thumb-wrap {
    display: flex;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
}
.rm-thumb-card {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1.414;
    background: #18181b;
    border: 1px solid #27272a;
    border-radius: 12px;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.rm-thumb-card:hover {
    border-color: #3f3f46;
}
.rm-thumb-card.removed {
    border: 2px solid #f59e0b;
    box-shadow: 0 6px 20px rgba(245,158,11,0.15);
}
.rm-thumb-canvas {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid rgba(39,39,42,0.5);
}
.rm-thumb-card.removed .rm-thumb-canvas {
    opacity: 0.2;
    border-color: rgba(245,158,11,0.3);
}
.rm-thumb-label {
    text-align: center;
    font-family: monospace;
    font-size: 10px;
    color: #71717a;
    transition: color 0.2s;
}
.rm-thumb-wrap:hover .rm-thumb-label {
    color: #d4d4d8;
}
.rm-thumb-label.removed {
    color: #f59e0b;
    font-weight: 700;
}
.rm-thumb-overlay {
    position: absolute;
    inset: 0;
    background: rgba(120,53,15,0.15);
    backdrop-filter: blur(0.5px);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: rmFadeIn 0.2s ease;
}
.rm-overlay-x {
    font-size: 36px;
    font-weight: 900;
    color: #f59e0b;
    text-shadow: 0 2px 8px rgba(245,158,11,0.4);
    line-height: 1;
}
/* Processing / Results */
.rm-processing {
    text-align: center;
    padding: 60px 20px;
}
.rm-processing-ring {
    position: relative; width: 60px; height: 60px;
    margin: 0 auto 20px;
}
.rm-ring-seg {
    width: 100%; height: 100%; border-radius: 50%;
    border: 4px solid #27272a;
    border-top-color: #f59e0b;
    animation: rmSpin 0.8s linear infinite;
}
.rm-ring-pulse {
    position: absolute; top: -8px; left: -8px; right: -8px; bottom: -8px;
    border-radius: 50%; border: 2px solid #f59e0b;
    animation: rmPulse 1.5s ease-in-out infinite; opacity: 0;
}
@keyframes rmSpin { to { transform: rotate(360deg); } }
@keyframes rmPulse {
    0% { transform: scale(1); opacity: 0.4; }
    100% { transform: scale(1.4); opacity: 0; }
}
.rm-processing-label {
    font-size: 16px; font-weight: 600; color: #e4e4e7;
}
.rm-results {
    text-align: center; width: 100%; max-width: 420px;
    animation: rmFadeIn 0.3s ease;
}
@keyframes rmFadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}
.rm-results-card {
    background: #18181b; border: 1px solid #27272a;
    border-radius: 12px; padding: 40px 32px;
}
.rm-results-icon {
    width: 64px; height: 64px; margin: 0 auto 16px;
    background: rgba(245,158,11,0.1); border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
}
.rm-results-title {
    font-size: 20px; font-weight: 700; color: #e4e4e7;
    margin: 0 0 8px;
}
.rm-results-desc {
    font-size: 14px; color: #71717a; margin: 0 0 24px;
}
.rm-results-actions {
    display: flex; gap: 12px; justify-content: center;
}
.rm-btn-dl {
    padding: 12px 28px; border-radius: 8px;
    background: #f59e0b;
    color: #09090b; font-weight: 700; font-size: 14px;
    text-decoration: none; display: inline-flex; align-items: center;
    gap: 8px; transition: all 0.2s;
}
.rm-btn-dl:hover {
    background: #d97706;
    color: #09090b;
}
.rm-btn-reset {
    padding: 12px 28px; border-radius: 8px;
    background: #18181b; border: 1px solid #27272a;
    color: #a1a1aa; font-weight: 600; font-size: 14px;
    cursor: pointer; transition: all 0.2s;
    display: inline-flex; align-items: center; gap: 8px;
}
.rm-btn-reset:hover {
    border-color: #3f3f46; color: #e4e4e7;
}
@keyframes rmSlideUp {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive */
@media (max-width: 820px) {
    .rt-root { flex-direction: column; position: relative; top: auto; left: auto; right: auto; bottom: auto; }
    .rt-sidebar { width: 100%; height: auto; border-right: none; border-bottom: 1px solid #27272a; overflow-y: visible; }
    .rt-workspace { min-height: 60vh; height: auto; }
    .rt-preview-canvas-wrap { padding: 20px 16px; }
    .rt-empty-icon svg { width: 56px; height: 56px; }
    .rt-canvas-inner { max-height: 40vh; }

    .rm-root { flex-direction: column; position: relative; top: auto; left: auto; right: auto; bottom: auto; }
    .rm-sidebar { width: 100%; height: auto; border-right: none; border-bottom: 1px solid #27272a; overflow-y: visible; }
    .rm-workspace { min-height: 60vh; height: auto; }
    .rm-thumb-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 12px; }
    .rm-preview-grid-wrap { padding: 12px; }
}
@media (max-width: 480px) {
    .rt-angle-grid { gap: 6px; }
    .rt-angle-btn { padding: 10px 4px; }
    .rt-preview-toolbar { flex-wrap: wrap; gap: 8px; }
    .rt-results-actions { flex-direction: column; }

    .rm-thumb-grid { grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); gap: 10px; }
    .rm-results-actions { flex-direction: column; }
}

/* ── Organize PDF - Horizontal Flow + Per-File Colors (og-*) ── */
.og-root {
    position: fixed;
    top: 68px; left: 0; right: 0; bottom: 0;
    display: flex;
    flex-direction: row-reverse;
    background: #0d0d0d;
    overflow: hidden;
    color: #e4e4e7;
    font-family: Inter, system-ui, sans-serif;
    user-select: none;
}
.og-sidebar {
    width: 330px;
    flex-shrink: 0;
    background: #121212;
    border-left: 1px solid #27272a;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 16px;
    height: 100%;
    min-height: 0;
    overflow: hidden;
}
.og-sidebar-scroll {
    display: flex;
    flex-direction: column;
    gap: 14px;
    overflow-y: auto;
    min-height: 0;
    flex: 1;
}
.og-section-header {
    border-bottom: 1px solid rgba(39,39,42,0.8);
    padding-bottom: 8px;
    flex-shrink: 0;
}
.og-section-title {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #d4d4d8;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}
.og-section-icon { color: #f59e0b; font-size: 15px; }

/* Files section */
.og-files-section {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-shrink: 0;
}
.og-files-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.og-files-label {
    font-size: 10px;
    font-weight: 700;
    color: #71717a;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.og-files-reset {
    font-size: 10px;
    color: #f59e0b;
    cursor: pointer;
    font-weight: 600;
    transition: opacity 0.15s;
}
.og-files-reset:hover {
    opacity: 0.7;
}
.og-files-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 140px;
    overflow-y: auto;
}
.og-file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #09090b;
    border: 1px solid #27272a;
    border-radius: 10px;
    padding: 8px 10px;
    transition: border-color 0.2s;
}
.og-file-item:hover { border-color: rgba(245,158,11,0.3); }
.og-file-item-left {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow: hidden;
    min-width: 0;
}
.og-file-drag {
    font-size: 14px;
    font-weight: 700;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    cursor: grab;
}
.og-file-item-name {
    font-size: 11px;
    font-weight: 500;
    color: #d4d4d8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.og-file-item-remove {
    font-size: 14px;
    font-weight: 700;
    color: #52525b;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0 2px;
    transition: color 0.2s;
    flex-shrink: 0;
}
.og-file-item-remove:hover { color: #f59e0b; }

/* Bulk actions section */
.og-bulk-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-shrink: 0;
}
.og-bulk-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.og-bulk-label {
    font-size: 10px;
    font-weight: 700;
    color: #71717a;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.og-bulk-count {
    font-size: 10px;
    font-weight: 600;
    color: #52525b;
}
.og-bulk-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
}
.og-bulk-btn {
    padding: 8px 4px;
    background: #18181b;
    border: 1px solid #27272a;
    border-radius: 8px;
    color: #a1a1aa;
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
}
.og-bulk-btn:hover {
    border-color: #3f3f46;
    color: #e4e4e7;
}

/* Info box */
.og-info-box {
    background: rgba(245,158,11,0.05);
    border: 1px solid rgba(245,158,11,0.2);
    border-radius: 12px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-shrink: 0;
}
.og-info-box-title {
    font-size: 11px;
    font-weight: 700;
    color: #f59e0b;
    display: flex;
    align-items: center;
    gap: 6px;
}
.og-info-box-text {
    font-size: 11px;
    color: #a1a1aa;
    line-height: 1.5;
    margin: 0;
}

/* Sidebar footer */
.og-sidebar-footer {
    padding-top: 16px;
    border-top: 1px solid rgba(39,39,42,0.6);
    flex-shrink: 0;
    background: #121212;
    position: sticky;
    bottom: 0;
}
.og-process-btn {
    width: 100%;
    padding: 14px 16px;
    background: #f59e0b;
    border: none;
    border-radius: 12px;
    color: #09090b;
    font-family: inherit;
    font-size: 11px;
    font-weight: 900;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
    box-shadow: 0 4px 25px rgba(245,158,11,0.25);
    border: 1px solid rgba(245,158,11,0.15);
    position: relative;
    overflow: hidden;
}
.og-process-btn:hover:not(:disabled) {
    background: #d97706;
    box-shadow: 0 4px 35px rgba(245,158,11,0.4);
    transform: translateY(-1px);
}
.og-process-btn:active:not(:disabled) {
    transform: scale(0.98);
}
.og-process-btn:disabled { opacity: 0.4; cursor: not-allowed; box-shadow: none; }
.og-btn-arrow { transition: transform 0.15s; font-size: 13px; }
.og-process-btn:hover:not(:disabled) .og-btn-arrow { transform: translateX(3px); }
.og-btn-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(245,158,11,0.2);
    border-top-color: #f59e0b;
    border-radius: 50%;
    animation: ogBtnSpin 0.7s linear infinite;
    vertical-align: middle;
    margin-right: 6px;
}
@keyframes ogBtnSpin {
    to { transform: rotate(360deg); }
}

/* Workspace */
.og-workspace {
    flex: 1;
    height: 100%;
    min-height: 0;
    background: #141414;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}
.og-workspace-empty {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.og-upload-zone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    max-width: 440px;
    width: 100%;
    padding: 48px 32px;
    border: 2px dashed rgba(245,158,11,0.2);
    border-radius: 16px;
    background: rgba(9,9,11,0.4);
    text-align: center;
    cursor: pointer;
    transition: all 0.25s;
    box-shadow: inset 0 0 30px rgba(245,158,11,0.03);
}
.og-upload-zone:hover {
    border-color: rgba(245,158,11,0.5);
    background: rgba(9,9,11,0.6);
    box-shadow: inset 0 0 40px rgba(245,158,11,0.05);
}
.og-upload-icon-wrap {
    width: 64px;
    height: 64px;
    background: rgba(245,158,11,0.1);
    color: #f59e0b;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    margin-bottom: 16px;
    transition: transform 0.25s;
}
.og-upload-zone:hover .og-upload-icon-wrap {
    transform: scale(1.1);
}
.og-upload-title {
    font-size: 15px;
    font-weight: 700;
    color: #e4e4e7;
    margin: 0 0 8px;
    letter-spacing: 0.01em;
}
.og-upload-desc {
    font-size: 12px;
    color: #71717a;
    margin: 0 0 20px;
    line-height: 1.5;
    max-width: 320px;
}
.og-upload-btn {
    padding: 10px 24px;
    background: #f59e0b;
    border: none;
    border-radius: 10px;
    color: #09090b;
    font-family: inherit;
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    transition: all 0.2s;
}
.og-upload-btn:hover {
    background: #d97706;
}

/* Preview container — horizontal flow layout */
.og-preview-container {
    width: 100%;
    flex: 1;
    min-height: 0;
    max-height: 100%;
    display: flex;
    flex-direction: column;
    background: #141414;
    overflow: hidden;
}
.og-hflow-wrap {
    flex: 1;
    min-height: 0;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 20px;
}
.og-hflow {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 0;
    min-height: 100%;
    padding-bottom: 12px;
}

/* Page card (hcard) */
.og-hcard {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: grab;
    transition: all 0.2s;
    flex-shrink: 0;
}
.og-hcard:active { cursor: grabbing; }
.og-hcard.og-dragging { opacity: 0.3; }
.og-hcard.og-drag-over .og-hcard-card {
    border-color: #f59e0b;
    box-shadow: 0 0 0 2px rgba(245,158,11,0.15);
}
.og-hcard-card {
    position: relative;
    width: 190px;
    aspect-ratio: 1 / 1.414;
    background: #0d0d0d;
    border: 2px solid rgba(245,158,11,0.12);
    border-radius: 14px;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s;
}
.og-hcard:hover .og-hcard-card {
    border-color: #f59e0b;
}

/* File badge top-left */
.og-hcard-file-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 20;
    font-family: monospace;
    font-size: 9px;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    box-shadow: 0 2px 8px rgba(0,0,0,0.35);
}
.og-hcard-file-badge-blank {
    background: rgba(245,158,11,0.15);
    color: #f59e0b;
    border: 1px solid rgba(245,158,11,0.2);
}

/* Page number badge (bottom-right) */
.og-hcard-num {
    position: absolute;
    bottom: 8px;
    right: 10px;
    z-index: 5;
    background: rgba(9,9,11,0.9);
    border: 1px solid #3f3f46;
    color: #a1a1aa;
    font-family: monospace;
    font-size: 10px;
    font-weight: 700;
    padding: 1px 7px;
    border-radius: 4px;
    line-height: 1.4;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

/* Blank page badge (bottom-right) */
.og-hcard-blank-badge {
    position: absolute;
    bottom: 8px;
    right: 10px;
    z-index: 5;
    font-size: 9px;
    font-weight: 700;
    color: rgba(245,158,11,0.7);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    background: rgba(9,9,11,0.9);
    border: 1px solid rgba(245,158,11,0.15);
    padding: 1px 7px;
    border-radius: 4px;
    line-height: 1.4;
    font-family: monospace;
}

/* Action buttons (top-right, hover) */
.og-hcard-acts {
    position: absolute;
    top: 6px;
    right: 6px;
    z-index: 30;
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.15s;
}
.og-hcard:hover .og-hcard-acts {
    opacity: 1;
}
.og-hcard-btn {
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(9,9,11,0.9);
    border: 1px solid #3f3f46;
    border-radius: 6px;
    color: #a1a1aa;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.15s;
    backdrop-filter: blur(4px);
}
.og-hcard-btn:hover {
    border-color: #f59e0b;
    color: #f59e0b;
}
.og-hcard-btn-del:hover {
    border-color: rgba(245,158,11,0.5);
    color: #f59e0b;
}

/* Card content area */
.og-hcard-content {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
}

/* Blank page inner container — flex column layout */
.og-hcard-blank-inner {
    width: 100%;
    height: 100%;
    background: #0d0d0d;
    border-radius: 10px;
    border: 1px solid #27272a;
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
}

/* Top action row: header left, delete right */
.og-hcard-blank-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px 6px;
    flex-shrink: 0;
}
.og-hcard-blank-header {
    font-size: 9px;
    font-weight: 700;
    color: #f59e0b;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.og-hcard-blank-del {
    background: none;
    border: none;
    color: #52525b;
    cursor: pointer;
    font-size: 12px;
    padding: 0 2px;
    transition: color 0.15s;
    line-height: 1;
}
.og-hcard-blank-del:hover {
    color: #ef4444;
}

.og-hcard-blank-divider {
    height: 1px;
    background: rgba(245,158,11,0.08);
    flex-shrink: 0;
    margin: 0 10px;
}

/* Input area */
.og-hcard-blank-input {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 6px 10px;
    min-height: 0;
}
.og-hcard-blank-preview {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 8px 10px;
    min-height: 0;
    overflow-y: auto;
    cursor: pointer;
    font-size: 10px;
    line-height: 1.5;
    color: #e4e4e7;
    word-break: break-word;
}
.og-hcard-blank-preview:hover {
    background: rgba(245,158,11,0.03);
}
.og-hcard-blank-preview-empty {
    color: #52525b;
    font-style: italic;
    font-size: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}
.og-hcard-blank-label {
    font-size: 7px;
    font-weight: 700;
    color: #52525b;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    display: block;
    margin-bottom: 4px;
    flex-shrink: 0;
}
.og-hcard-textarea {
    width: 100%;
    flex: 1;
    background: #090909;
    border: 1px solid #27272a;
    border-radius: 6px;
    padding: 6px;
    color: #f59e0b;
    font-family: monospace;
    font-size: 9px;
    line-height: 1.4;
    resize: none;
    outline: none;
    transition: border-color 0.2s;
    min-height: 0;
}
.og-hcard-textarea:focus {
    border-color: rgba(245,158,11,0.5);
    box-shadow: 0 0 10px rgba(245,158,11,0.05);
}
.og-hcard-textarea::placeholder {
    color: rgba(245,158,11,0.2);
}

/* Bottom indicator row */
.og-hcard-blank-bottom {
    padding: 4px 10px 6px;
    text-align: right;
    flex-shrink: 0;
}
.og-hcard-blank-footnote {
    display: inline-block;
    background: #0d0d0d;
    border: 1px solid #27272a;
    font-family: monospace;
    font-size: 9px;
    font-weight: 700;
    padding: 1px 7px;
    border-radius: 4px;
    color: rgba(245,158,11,0.7);
    line-height: 1.4;
}
.og-hcard-cvs {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}
.og-hcard-cvs canvas {
    display: block;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 6px;
}

/* Rotation badge */
.og-rot-badge {
    position: absolute;
    bottom: 4px;
    right: 4px;
    font-size: 8px;
    font-weight: 700;
    color: #f59e0b;
    background: rgba(0,0,0,0.75);
    padding: 1px 5px;
    border-radius: 3px;
    line-height: 1.3;
    z-index: 3;
}

/* Page label below card */
.og-hcard-label {
    text-align: center;
    font-family: monospace;
    font-size: 10px;
    color: #71717a;
    transition: color 0.2s;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.og-hcard:hover .og-hcard-label {
    color: #d4d4d8;
}

/* Insert blank page button (between cards) */
.og-ins-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 0 6px;
    transition: all 0.2s;
}
.og-ins-circle {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #121212;
    border: 2px solid #27272a;
    color: #a1a1aa;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    position: relative;
    line-height: 1;
    padding: 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.og-ins-circle:hover {
    border-color: #f59e0b;
    background: #f59e0b;
    color: #09090b;
}
.og-ins-plus {
    position: absolute;
    bottom: -1px;
    right: 0;
    font-size: 9px;
    font-weight: 900;
    color: #f59e0b;
    background: #0d0d0d;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #27272a;
    line-height: 1;
}
.og-ins-circle:hover .og-ins-plus {
    background: #09090b;
    color: #f59e0b;
}

/* Processing / Results */
.og-processing {
    text-align: center;
    padding: 60px 20px;
}
.og-processing-ring {
    position: relative; width: 60px; height: 60px;
    margin: 0 auto 20px;
}
.og-ring-seg {
    width: 100%; height: 100%; border-radius: 50%;
    border: 4px solid #27272a;
    border-top-color: #f59e0b;
    animation: ogSpin 0.8s linear infinite;
}
.og-ring-pulse {
    position: absolute; top: -8px; left: -8px; right: -8px; bottom: -8px;
    border-radius: 50%; border: 2px solid #f59e0b;
    animation: ogPulse 1.5s ease-in-out infinite; opacity: 0;
}
@keyframes ogSpin { to { transform: rotate(360deg); } }
@keyframes ogPulse {
    0% { transform: scale(1); opacity: 0.4; }
    100% { transform: scale(1.4); opacity: 0; }
}
.og-processing-label {
    font-size: 16px; font-weight: 600; color: #e4e4e7;
}
.og-results {
    text-align: center; width: 100%; max-width: 420px;
    animation: ogFadeIn 0.3s ease;
}
@keyframes ogFadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}
.og-results-card {
    background: #18181b; border: 1px solid #27272a;
    border-radius: 12px; padding: 40px 32px;
}
.og-results-icon {
    width: 64px; height: 64px; margin: 0 auto 16px;
    background: rgba(245,158,11,0.1); border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
}
.og-results-title {
    font-size: 20px; font-weight: 700; color: #e4e4e7;
    margin: 0 0 8px;
}
.og-results-desc {
    font-size: 14px; color: #71717a; margin: 0 0 24px;
}
.og-results-actions {
    display: flex; gap: 12px; justify-content: center;
}
.og-btn-dl {
    padding: 12px 28px; border-radius: 8px;
    background: #f59e0b;
    color: #09090b; font-weight: 700; font-size: 14px;
    text-decoration: none; display: inline-flex; align-items: center;
    gap: 8px; transition: all 0.2s;
}
.og-btn-dl:hover { background: #d97706; color: #09090b; }
.og-btn-reset {
    padding: 12px 28px; border-radius: 8px;
    background: #18181b; border: 1px solid #27272a;
    color: #a1a1aa; font-weight: 600; font-size: 14px;
    cursor: pointer; transition: all 0.2s;
    display: inline-flex; align-items: center; gap: 8px;
}
.og-btn-reset:hover { border-color: #3f3f46; color: #e4e4e7; }

/* Blank page modal — Rich Text Editor */
.og-modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: none;
    align-items: center;
    justify-content: center;
}
.og-modal.open {
    display: flex;
}
.og-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(4px);
}
.og-modal-dialog {
    position: relative;
    background: #121212;
    border: 2px solid rgba(245,158,11,0.4);
    border-radius: 16px;
    padding: 20px 24px;
    width: 100%;
    max-width: 540px;
    box-shadow: 0 0 60px rgba(245,158,11,0.2);
    animation: ogModalIn 0.2s ease;
}
.og-modal-dialog-wide {
    max-width: 600px;
}
@keyframes ogModalIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}
.og-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #27272a;
    padding-bottom: 12px;
    margin-bottom: 14px;
}
.og-modal-icon {
    font-size: 16px;
    color: #f59e0b;
    margin-right: 8px;
}
.og-modal-title {
    font-size: 12px;
    font-weight: 800;
    color: #f59e0b;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin: 0;
    display: flex;
    align-items: center;
}
.og-modal-close {
    background: none;
    border: none;
    color: #52525b;
    font-size: 16px;
    cursor: pointer;
    padding: 0 4px;
    transition: color 0.15s;
}
.og-modal-close:hover {
    color: #ef4444;
}

/* Rich text toolbar */
.og-rtoolbar {
    background: #09090b;
    border: 1px solid #27272a;
    border-radius: 10px;
    padding: 8px 10px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    margin-bottom: 14px;
}
.og-rtoolbar-group {
    display: flex;
    align-items: center;
    gap: 2px;
    padding-right: 8px;
    margin-right: 4px;
    border-right: 1px solid #27272a;
}
.og-rtoolbar-group:last-child {
    border-right: none;
}
.og-rtoolbar-select {
    background: #121212;
    border: 1px solid #3f3f46;
    border-radius: 6px;
    color: #d4d4d8;
    font-family: monospace;
    font-size: 10px;
    padding: 3px 6px;
    outline: none;
    cursor: pointer;
    transition: border-color 0.15s;
}
.og-rtoolbar-select:focus {
    border-color: #f59e0b;
}
.og-rtoolbar-actions {
    gap: 1px;
}
.og-rtoolbar-btn {
    width: 26px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 4px;
    color: #a1a1aa;
    cursor: pointer;
    font-size: 11px;
    transition: all 0.12s;
}
.og-rtoolbar-btn:hover {
    background: #1a1a1d;
    border-color: #3f3f46;
    color: #e4e4e7;
}
.og-rtoolbar-btn-active {
    background: #1a1a1d;
    border-color: #f59e0b;
    color: #f59e0b;
}
.og-rtoolbar-btn strong { font-weight: 800; }
.og-rtoolbar-btn em { font-style: italic; font-family: serif; }
.og-rtoolbar-btn u { text-decoration: underline; }
.og-rtoolbar-swatch {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.12s;
}
.og-rtoolbar-swatch:hover {
    transform: scale(1.15);
}
.og-rtoolbar-swatch-amber {
    background: #f59e0b;
    border-color: rgba(245,158,11,0.3);
}
.og-rtoolbar-swatch-white {
    background: #e4e4e7;
    border-color: rgba(228,228,231,0.3);
}

/* Modal body */
.og-modal-body {
    margin-bottom: 12px;
}
.og-modal-body-label {
    font-size: 9px;
    font-weight: 700;
    color: #52525b;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    display: block;
    margin-bottom: 6px;
}
.og-modal-editor-wrap {
    background: #09090b;
    border: 1px solid #27272a;
    border-radius: 10px;
    overflow: hidden;
    transition: border-color 0.2s;
}
.og-modal-editor-wrap:focus-within {
    border-color: rgba(245,158,11,0.5);
}
.og-rtoolbar-editor {
    width: 100%;
    min-height: 130px;
    max-height: 250px;
    overflow-y: auto;
    background: transparent;
    border: none;
    color: #f59e0b;
    font-family: monospace;
    font-size: 13px;
    padding: 12px;
    outline: none;
    line-height: 1.6;
    cursor: text;
}
.og-rtoolbar-editor:empty:before {
    content: attr(data-placeholder);
    color: rgba(245,158,11,0.2);
    pointer-events: none;
}
.og-modal-footer-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #0d0d0d;
    padding: 6px 12px;
    border-top: 1px solid #18181b;
    font-size: 9px;
    color: #52525b;
    font-family: monospace;
}
.og-modal-footer-status {
    color: #52525b;
}
.og-modal-footer-count {
    color: #71717a;
}

/* Modal actions */
.og-modal-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 14px;
    border-top: 1px solid #18181b;
}
.og-modal-hint {
    font-size: 10px;
    color: #52525b;
    display: flex;
    align-items: center;
    gap: 4px;
}
.og-modal-actions-right {
    display: flex;
    gap: 8px;
}
.og-modal-btn {
    padding: 10px 20px;
    border-radius: 10px;
    font-family: inherit;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s;
    border: none;
}
.og-modal-btn-cancel {
    background: #18181b;
    color: #a1a1aa;
    border: 1px solid #27272a;
}
.og-modal-btn-cancel:hover {
    background: #27272a;
    color: #e4e4e7;
}
.og-modal-btn-confirm {
    background: #f59e0b;
    color: #09090b;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.og-modal-btn-confirm:hover {
    background: #d97706;
}
.og-modal-btn-confirm:active {
    transform: scale(0.97);
}

/* Loading skeleton for card pages */
.og-hcard-loading {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #18181b;
    border-radius: 8px;
    pointer-events: none;
}
.og-hcard-loading.hidden {
    display: none;
}
.og-hcard-loading-dot {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(245,158,11,0.2);
    border-top-color: #f59e0b;
    border-radius: 50%;
    animation: ogSpin 0.8s linear infinite;
    margin-bottom: 6px;
}
.og-hcard-loading-text {
    font-size: 8px;
    color: #52525b;
    animation: ogPulseText 1.5s ease-in-out infinite;
}
@keyframes ogPulseText {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

.og-download-step-override {
    background: #059669 !important;
    border-color: rgba(5,150,105,0.3) !important;
    box-shadow: 0 4px 25px rgba(5,150,105,0.25) !important;
}

/* Responsive - Organize */
@media (max-width: 820px) {
    .og-root { flex-direction: column; position: relative; top: auto; left: auto; right: auto; bottom: auto; }
    .og-sidebar { width: 100%; height: auto; border-left: none; border-bottom: 1px solid #27272a; overflow-y: visible; }
    .og-workspace { min-height: 60vh; height: auto; }
    .og-hflow-wrap { padding: 12px 16px; }
}
@media (max-width: 480px) {
    .og-hcard-card { width: 140px; }
    .og-hcard-acts { opacity: 1; }
    .og-bulk-grid { grid-template-columns: 1fr; }
    .og-results-actions { flex-direction: column; }
}

/* =======================================
   PDF TO TEXT - Premium Document Previewer
   ======================================= */
.hidden { display: none !important; }

/* Font classes for preview */
.font-sans { font-family: 'Inter', system-ui, -apple-system, sans-serif; }
.font-serif { font-family: 'Merriweather', Georgia, 'Times New Roman', serif; }
.font-mono { font-family: 'Roboto Mono', 'Courier New', monospace; }

/* View tabs (Preview / Raw) */
.tt-tab { transition: all 0.15s ease; }
.tt-tab.active { background: #e0840b !important; color: #000 !important; }

/* Preview area table styling */
#previewArea table { background: #fff; color: #1f2937; }
#previewArea table th { font-weight: 700; text-align: left; }
#previewArea table tr:hover { background: #fffbeb !important; transition: 0.2s; }

/* Amber highlight on text selection */
#previewArea ::selection { background: #e0840b; color: #fff; }
#previewArea ::-moz-selection { background: #e0840b; color: #fff; }

/* Scrollbar styling for preview area */
#previewArea::-webkit-scrollbar,
#ttRawArea::-webkit-scrollbar { width: 8px; }
#previewArea::-webkit-scrollbar-track,
#ttRawArea::-webkit-scrollbar-track { background: #f1f1f1; }
#previewArea::-webkit-scrollbar-thumb,
#ttRawArea::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 4px; }
#previewArea::-webkit-scrollbar-thumb:hover,
#ttRawArea::-webkit-scrollbar-thumb:hover { background: #9ca3af; }

/* Layout helper for tool page */
.tool-page:has(.max-w-4xl) { max-width: none; padding: 40px 24px 80px; }
