/* Scan to PDF Tool */
.tool-breadcrumb { background: var(--gray-100); padding: 12px 0; }
.tool-breadcrumb .breadcrumb { margin: 0; font-size: 0.85rem; }
.tool-breadcrumb .breadcrumb-item a { color: var(--primary); }
.tool-header { padding: 50px 0 40px; background: linear-gradient(135deg, #d6eaf8, #aed6f1); }
.tool-icon-large { width: 80px; height: 80px; border-radius: 20px; background: linear-gradient(135deg, #3498db, #2980b9); display: inline-flex; align-items: center; justify-content: center; color: white; font-size: 2rem; margin-bottom: 20px; box-shadow: 0 8px 25px rgba(52,152,219,0.3); }
.tool-header h1 { font-size: 2rem; font-weight: 800; margin-bottom: 12px; }
.tool-desc { font-size: 1.05rem; color: var(--gray-600); max-width: 700px; margin: 0 auto; line-height: 1.7; }
.tool-workspace { padding: 40px 0 60px; }
.workspace-card { background: white; border-radius: 16px; box-shadow: 0 4px 20px rgba(0,0,0,0.08); padding: 40px; max-width: 900px; margin: 0 auto; }

/* Scan steps */
.scan-steps { display: flex; gap: 24px; flex-wrap: wrap; }
.scan-step-box { flex: 1; min-width: 280px; padding: 24px; border: 2px solid var(--gray-200); border-radius: 14px; text-align: center; }
.step-badge { display: inline-block; padding: 4px 14px; background: #3498db; color: white; border-radius: 16px; font-size: 0.75rem; font-weight: 700; margin-bottom: 12px; }
.scan-step-box h4 { font-size: 1rem; font-weight: 700; margin-bottom: 8px; }
.scan-step-box p { font-size: 0.85rem; color: var(--gray-600); line-height: 1.5; }

/* QR */
.qr-wrapper { margin: 16px auto 0; width: 200px; height: 200px; background: white; border: 3px solid var(--gray-200); border-radius: 14px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.qr-wrapper img { width: 100%; height: 100%; object-fit: contain; }
.qr-loading { font-size: 0.85rem; color: var(--gray-500); }

/* Connection status */
.connection-status { padding: 16px; }
.status-icon { font-size: 2.5rem; margin-bottom: 10px; }
.status-icon.disconnected { color: #e74c3c; }
.status-icon.connected { color: #2ecc71; }
.status-emoji { font-size: 1.2rem; }

.scan-warning { margin-top: 20px; padding: 12px 16px; background: #fff3cd; border-radius: 10px; font-size: 0.85rem; font-weight: 600; color: #856404; text-align: center; }

/* Received images */
.received-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 8px; margin-top: 10px; }
.recv-item { border-radius: 8px; overflow: hidden; border: 2px solid var(--gray-200); aspect-ratio: 3/4; position: relative; }
.recv-item img { width: 100%; height: 100%; object-fit: cover; }
.recv-item .ri-num { position: absolute; top: 4px; left: 4px; background: #3498db; color: white; width: 22px; height: 22px; border-radius: 50%; font-size: 0.65rem; display: flex; align-items: center; justify-content: center; font-weight: 700; }

.btn-convert { background: linear-gradient(135deg, #3498db, #2980b9); color: white; padding: 16px 48px; border-radius: 30px; font-weight: 700; font-size: 1.05rem; border: none; box-shadow: 0 4px 20px rgba(52,152,219,0.35); transition: all 0.3s; }
.btn-convert:hover { transform: translateY(-2px); color: white; }

.progress-area { padding: 40px 20px; }
.spinner-wrapper { position: relative; width: 100px; height: 100px; margin: 0 auto 24px; }
.spinner { width: 100px; height: 100px; border: 4px solid var(--gray-200); border-top-color: #3498db; border-radius: 50%; animation: spin 1s linear infinite; }
.spinner-wrapper > i { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); font-size: 2rem; color: #3498db; }
@keyframes spin { to { transform: rotate(360deg); } }
.progress-area h3 { font-size: 1.3rem; font-weight: 700; margin-bottom: 8px; }
.progress-bar-wrapper { max-width: 500px; margin: 0 auto; }
.progress-bar-wrapper .progress { height: 12px; border-radius: 10px; background: var(--gray-200); }
.progress-bar-wrapper .progress-bar { background: linear-gradient(90deg, #3498db, #2980b9); border-radius: 10px; transition: width 0.3s; display: flex; align-items: center; justify-content: center; font-size: 0.65rem; font-weight: 700; color: white; }

.download-area { padding: 40px 20px; }
.download-icon { font-size: 4rem; color: #2ecc71; margin-bottom: 20px; }
.download-area h3 { font-size: 1.4rem; font-weight: 700; margin-bottom: 8px; }
.download-area > p { color: var(--gray-600); margin-bottom: 24px; }
.btn-download { background: linear-gradient(135deg, #2ecc71, #27ae60); color: white; padding: 16px 40px; border-radius: 30px; font-weight: 700; display: inline-flex; align-items: center; box-shadow: 0 4px 20px rgba(46,204,113,0.35); }
.btn-download:hover { color: white; transform: translateY(-2px); }
.download-info { margin-top: 24px; }
.countdown-wrapper { font-size: 0.95rem; margin-bottom: 8px; }
.countdown-wrapper strong { color: var(--primary); font-size: 1.1rem; font-family: monospace; }
.error-area { padding: 40px 20px; }
.error-icon { font-size: 4rem; color: var(--primary); margin-bottom: 20px; }

@media (max-width: 767.98px) { .workspace-card { padding: 24px 16px; } .scan-steps { flex-direction: column; } .tool-header h1 { font-size: 1.5rem; } }
