/* Moved from templates/document_classification_overlay.html (October 2026). */

                @keyframes shimmer {
                    0% { transform: translateX(-100%); }
                    100% { transform: translateX(100%); }
                }
                .animate-shimmer {
                    animation: shimmer 2s infinite linear;
                }

                /* Smart Document Capture Overlay Styles */
                .smart-doc-capture-overlay {
                    background: rgba(240, 240, 240, 0.65);
                    backdrop-filter: blur(12px);
                    -webkit-backdrop-filter: blur(12px);
                }

                .smart-doc-card {
                    background: rgba(255, 255, 255, 0.88);
                    backdrop-filter: blur(28px);
                    -webkit-backdrop-filter: blur(28px);
                    border-radius: 30px;
                    box-shadow: 0 25px 70px rgba(var(--primary-rgb), 0.35),
                                0 0 0 1px rgba(255, 255, 255, 0.5) inset,
                                0 1px 3px rgba(0, 0, 0, 0.05);
                    padding: 20px 24px;
                    max-width: 900px;
                    width: 85%;
                    max-height: 500px;
                    position: relative;
                    overflow: hidden;
                    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', sans-serif;
                }

                .smart-doc-card::before {
                    content: '';
                    position: absolute;
                    top: -50%;
                    left: -50%;
                    width: 200%;
                    height: 200%;
                    background: radial-gradient(circle, rgba(var(--primary-rgb), 0.1) 1px, transparent 1px);
                    background-size: 50px 50px;
                    animation: float 20s infinite linear;
                    pointer-events: none;
                }

                @keyframes float {
                    0% { transform: translate(0, 0); }
                    100% { transform: translate(50px, 50px); }
                }

                .smart-doc-header-left {
                    display: flex;
                    flex-direction: column;
                    align-items: center;
                    text-align: center;
                    margin-bottom: 16px;
                }

                .smart-doc-header-title {
                    font-size: 18px;
                    font-weight: 700;
                    color: #1e293b;
                    margin: 0 0 4px 0;
                    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', sans-serif;
                    letter-spacing: -0.01em;
                    line-height: 1.5;
                    text-align: center;
                }

                .smart-doc-header-subtitle {
                    font-size: 12px;
                    font-weight: 400;
                    color: #64748b;
                    margin: 0;
                    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', sans-serif;
                    line-height: 1.4;
                    text-align: center;
                }

                .smart-doc-content {
                    display: grid;
                    grid-template-columns: 1fr 1fr;
                    gap: 16px;
                    margin-bottom: 16px;
                    align-items: center;
                }

                .smart-doc-left {
                    display: flex;
                    flex-direction: column;
                    align-items: center;
                    justify-content: flex-start;
                    padding-right: 8px;
                }

                .document-glow-container {
                    position: relative;
                    width: 160px;
                    height: 160px;
                    display: flex;
                    align-items: center;
                    justify-content: center;
                    margin-bottom: 14px;
                    margin-top: 8px;
                }

                .glow-ring {
                    position: absolute;
                    border-radius: 50%;
                    border: 2px solid;
                    opacity: 0.3;
                    animation: pulse-ring 4s ease-in-out infinite;
                    filter: blur(1px);
                    top: 50%;
                    left: 50%;
                    transform: translate(-50%, -50%);
                }

                .glow-ring-1 {
                    width: 120px;
                    height: 120px;
                    border-color: rgba(var(--primary-rgb), 0.6);
                    border-width: 2.5px;
                    animation-delay: 0s;
                    box-shadow: 0 0 20px rgba(var(--primary-rgb), 0.4), inset 0 0 20px rgba(var(--primary-rgb), 0.2);
                }

                .glow-ring-2 {
                    width: 145px;
                    height: 145px;
                    border-color: rgba(var(--primary-rgb), 0.5);
                    border-width: 2px;
                    animation-delay: 0.7s;
                    box-shadow: 0 0 25px rgba(var(--primary-rgb), 0.35), inset 0 0 25px rgba(var(--primary-rgb), 0.15);
                }

                .glow-ring-3 {
                    width: 170px;
                    height: 170px;
                    border-color: rgba(var(--primary-rgb), 0.4);
                    border-width: 1.5px;
                    animation-delay: 1.4s;
                    box-shadow: 0 0 30px rgba(var(--primary-rgb), 0.3), inset 0 0 30px rgba(var(--primary-rgb), 0.1);
                }

                @keyframes pulse-ring {
                    0%, 100% {
                        transform: translate(-50%, -50%) scale(0.95) rotate(0deg);
                        opacity: 0.2;
                    }
                    50% {
                        transform: translate(-50%, -50%) scale(1.05) rotate(180deg);
                        opacity: 0.6;
                    }
                }

                .document-illustration {
                    position: absolute;
                    z-index: 10;
                    width: 110px;
                    height: 140px;
                    top: 50%;
                    left: 50%;
                    transform: translate(-50%, -50%);
                    background: linear-gradient(145deg, rgba(255, 255, 255, 0.98) 0%, rgba(250, 250, 255, 0.95) 30%, rgba(248, 248, 255, 0.92) 70%, rgba(255, 255, 255, 0.98) 100%);
                    backdrop-filter: blur(25px);
                    -webkit-backdrop-filter: blur(25px);
                    border-radius: 14px;
                    padding: 16px;
                    display: flex;
                    flex-direction: column;
                    gap: 9px;
                    animation: document-float 4s ease-in-out infinite;
                    transform-style: preserve-3d;
                    perspective: 1000px;
                    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.9) inset, 0 0 0 2px rgba(var(--primary-rgb), 0.15), 0 15px 50px rgba(var(--primary-rgb), 0.5), 0 5px 20px rgba(var(--primary-rgb), 0.4), 0 0 60px rgba(var(--primary-rgb), 0.3), inset 0 2px 10px rgba(255, 255, 255, 0.8), inset 0 -2px 10px rgba(var(--primary-rgb), 0.1);
                }

                .document-illustration::before {
                    content: '';
                    position: absolute;
                    inset: -15px;
                    border-radius: 20px;
                    background: radial-gradient(ellipse at center, rgba(var(--primary-rgb), 0.4) 0%, rgba(var(--primary-rgb), 0.3) 30%, rgba(var(--primary-rgb), 0.2) 60%, transparent 80%);
                    filter: blur(20px);
                    z-index: -1;
                    animation: glow-pulse 3s ease-in-out infinite;
                }

                .document-illustration::after {
                    content: '';
                    position: absolute;
                    top: -5px;
                    left: -5px;
                    right: -5px;
                    bottom: -5px;
                    border-radius: 16px;
                    background: linear-gradient(135deg, rgba(255, 255, 255, 0.3) 0%, transparent 50%, rgba(var(--primary-rgb), 0.2) 100%);
                    filter: blur(15px);
                    z-index: -1;
                    opacity: 0.6;
                    animation: ambient-shift 5s ease-in-out infinite;
                }

                @keyframes document-float {
                    0%, 100% {
                        transform: translate(-50%, -50%) translateY(0) rotateX(2deg) rotateY(-1deg) rotateZ(0deg);
                    }
                    33% {
                        transform: translate(-50%, -50%) translateY(-8px) rotateX(1deg) rotateY(1deg) rotateZ(0.5deg);
                    }
                    66% {
                        transform: translate(-50%, -50%) translateY(-12px) rotateX(2deg) rotateY(-0.5deg) rotateZ(-0.5deg);
                    }
                }

                @keyframes glow-pulse {
                    0%, 100% {
                        opacity: 0.6;
                        transform: scale(1);
                    }
                    50% {
                        opacity: 1;
                        transform: scale(1.1);
                    }
                }

                @keyframes ambient-shift {
                    0%, 100% {
                        transform: rotate(0deg);
                        opacity: 0.5;
                    }
                    50% {
                        transform: rotate(180deg);
                        opacity: 0.8;
                    }
                }

                .document-page {
                    display: flex;
                    flex-direction: column;
                    gap: 9px;
                    position: relative;
                    z-index: 1;
                }

                .document-line {
                    height: 4.5px;
                    background: linear-gradient(90deg, rgba(203, 213, 225, 0.9) 0%, rgba(226, 232, 240, 0.7) 50%, rgba(203, 213, 225, 0.9) 100%);
                    border-radius: 2.5px;
                    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05), inset 0 1px 1px rgba(255, 255, 255, 0.8);
                    position: relative;
                    overflow: hidden;
                }

                .document-line::after {
                    content: '';
                    position: absolute;
                    top: 0;
                    left: -100%;
                    width: 100%;
                    height: 100%;
                    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.6) 50%, transparent 100%);
                    animation: line-shimmer 3s ease-in-out infinite;
                }

                @keyframes line-shimmer {
                    0% { left: -100%; }
                    100% { left: 200%; }
                }

                .document-line:nth-child(1) { width: 100%; animation-delay: 0s; }
                .document-line:nth-child(2) { width: 88%; animation-delay: 0.2s; }
                .document-line:nth-child(3) { width: 96%; animation-delay: 0.4s; }
                .document-line:nth-child(4) { width: 78%; animation-delay: 0.6s; }
                .document-line:nth-child(5) { width: 92%; animation-delay: 0.8s; }

                .sparkle {
                    position: absolute;
                    border-radius: 50%;
                    background: radial-gradient(circle, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0.8) 40%, rgba(var(--primary-rgb), 0.6) 70%, transparent 100%);
                    filter: blur(0.5px);
                    animation: sparkle 3s ease-in-out infinite;
                    z-index: 5;
                }

                .sparkle-1 {
                    width: 8px;
                    height: 8px;
                    top: 15%;
                    left: 8%;
                    animation-delay: 0s;
                    box-shadow: 0 0 12px rgba(255, 255, 255, 1), 0 0 20px rgba(var(--primary-rgb), 0.8), 0 0 30px rgba(var(--primary-rgb), 0.6);
                }

                .sparkle-2 {
                    width: 6px;
                    height: 6px;
                    top: 55%;
                    right: 12%;
                    animation-delay: 0.8s;
                    box-shadow: 0 0 10px rgba(255, 255, 255, 0.9), 0 0 18px rgba(var(--primary-rgb), 0.7), 0 0 25px rgba(var(--primary-rgb), 0.5);
                }

                .sparkle-3 {
                    width: 7px;
                    height: 7px;
                    bottom: 18%;
                    left: 15%;
                    animation-delay: 1.6s;
                    box-shadow: 0 0 11px rgba(255, 255, 255, 0.95), 0 0 19px rgba(var(--primary-rgb), 0.75), 0 0 28px rgba(var(--primary-rgb), 0.55);
                }

                .sparkle-4 {
                    width: 5px;
                    height: 5px;
                    top: 28%;
                    right: 8%;
                    animation-delay: 2.4s;
                    box-shadow: 0 0 9px rgba(255, 255, 255, 0.85), 0 0 16px rgba(var(--primary-rgb), 0.65), 0 0 22px rgba(var(--primary-rgb), 0.45);
                }

                .sparkle-5 {
                    width: 4px;
                    height: 4px;
                    top: 45%;
                    left: 5%;
                    animation-delay: 1.2s;
                    box-shadow: 0 0 8px rgba(255, 255, 255, 0.8), 0 0 14px rgba(var(--primary-rgb), 0.6);
                }

                .sparkle-6 {
                    width: 5px;
                    height: 5px;
                    bottom: 35%;
                    right: 5%;
                    animation-delay: 2s;
                    box-shadow: 0 0 9px rgba(255, 255, 255, 0.85), 0 0 16px rgba(var(--primary-rgb), 0.65);
                }

                @keyframes sparkle {
                    0%, 100% {
                        opacity: 0;
                        transform: scale(0) rotate(0deg);
                    }
                    20% {
                        opacity: 1;
                        transform: scale(1.2) rotate(90deg);
                    }
                    50% {
                        opacity: 1;
                        transform: scale(1) rotate(180deg);
                    }
                    80% {
                        opacity: 0.8;
                        transform: scale(0.9) rotate(270deg);
                    }
                }

                .light-streak {
                    position: absolute;
                    width: 2px;
                    height: 40px;
                    background: linear-gradient(180deg, transparent 0%, rgba(255, 255, 255, 0.8) 50%, transparent 100%);
                    border-radius: 2px;
                    filter: blur(1px);
                    animation: streak-move 4s ease-in-out infinite;
                    z-index: 4;
                }

                .light-streak-1 {
                    top: 25%;
                    left: 20%;
                    animation-delay: 0s;
                    transform: rotate(45deg);
                }

                .light-streak-2 {
                    top: 60%;
                    right: 25%;
                    animation-delay: 2s;
                    transform: rotate(-30deg);
                }

                @keyframes streak-move {
                    0%, 100% {
                        opacity: 0;
                        transform: translateY(-20px) rotate(45deg);
                    }
                    50% {
                        opacity: 0.7;
                        transform: translateY(20px) rotate(45deg);
                    }
                }

                .processing-title {
                    font-size: 18px;
                    font-weight: 700;
                    color: #1e293b;
                    margin: 0 0 4px 0;
                    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', sans-serif;
                    letter-spacing: -0.02em;
                    line-height: 1.3;
                }

                .processing-subtitle {
                    font-size: 12px;
                    font-weight: 400;
                    color: #64748b;
                    margin: 0;
                    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', sans-serif;
                    line-height: 1.4;
                }

                .smart-doc-right {
                    display: flex;
                    flex-direction: column;
                    justify-content: center;
                    padding-left: 8px;
                }

                .step-list {
                    display: flex;
                    flex-direction: column;
                    gap: 6px;
                }

                .step-indicator {
                    display: flex;
                    align-items: center;
                    gap: 10px;
                    padding: 10px 14px;
                    background: rgba(255, 255, 255, 0.95);
                    border-radius: 12px;
                    transition: all 0.3s ease;
                    position: relative;
                }

                .step-indicator.active {
                    background: rgba(var(--primary-rgb), 0.08);
                    border: 1px solid rgba(var(--primary-rgb), 0.2);
                }

                .step-indicator.processing {
                    background: rgba(var(--primary-rgb), 0.08);
                }

                .step-number {
                    width: 32px;
                    height: 32px;
                    border-radius: 50%;
                    display: flex;
                    align-items: center;
                    justify-content: center;
                    font-size: 14px;
                    font-weight: 600;
                    transition: all 0.3s ease;
                    flex-shrink: 0;
                }

                .step-status {
                    display: flex;
                    align-items: center;
                    justify-content: center;
                    flex-shrink: 0;
                }

                .text-soft-blue {
                    color: #818CF8;
                }

                .smart-doc-progress {
                    display: flex;
                    align-items: center;
                    gap: 14px;
                    margin-top: 8px;
                    padding-top: 16px;
                    border-top: 1px solid rgba(var(--primary-rgb), 0.1);
                }

                .progress-bar-container {
                    flex: 1;
                }

                .progress-bar-bg {
                    height: 10px;
                    background: rgba(var(--primary-rgb), 0.18);
                    border-radius: 12px;
                    overflow: hidden;
                    position: relative;
                    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
                }

                .progress-bar-fill {
                    height: 100%;
                    background: linear-gradient(90deg, var(--primary) 0%, var(--primary-hover) 50%, var(--primary-dark) 100%);
                    border-radius: 12px;
                    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
                    box-shadow: 0 0 15px rgba(var(--primary-rgb), 0.6), 0 2px 4px rgba(var(--primary-rgb), 0.3);
                    position: relative;
                }

                .progress-bar-fill::after {
                    content: '';
                    position: absolute;
                    top: 0;
                    left: 0;
                    right: 0;
                    bottom: 0;
                    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.35) 50%, transparent 100%);
                    animation: progress-glow 2.5s ease-in-out infinite;
                    border-radius: 12px;
                }

                @keyframes progress-glow {
                    0% {
                        transform: translateX(-100%);
                        opacity: 0;
                    }
                    50% {
                        opacity: 1;
                    }
                    100% {
                        transform: translateX(200%);
                        opacity: 0;
                    }
                }

                .progress-badge {
                    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
                    color: white;
                    padding: 7px 16px;
                    border-radius: 20px;
                    font-size: 13px;
                    font-weight: 700;
                    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', sans-serif;
                    box-shadow: 0 4px 14px rgba(var(--primary-rgb), 0.45), 0 2px 6px rgba(0, 0, 0, 0.15);
                    min-width: 52px;
                    text-align: center;
                    letter-spacing: -0.01em;
                }

                @keyframes slideIn {
                    from {
                        opacity: 0;
                        transform: translateY(20px);
                    }
                    to {
                        opacity: 1;
                        transform: translateY(0);
                    }
                }

                .animate-slide-in {
                    animation: slideIn 0.5s ease-out;
                }

                @media (max-width: 768px) {
                    .smart-doc-content {
                        grid-template-columns: 1fr;
                        gap: 32px;
                    }
                    .smart-doc-card {
                        padding: 24px;
                        border-radius: 24px;
                    }
                    .document-glow-container {
                        width: 200px;
                        height: 200px;
                    }
                    .document-illustration {
                        width: 130px;
                        height: 170px;
                    }
                    .glow-ring-1 {
                        width: 150px;
                        height: 150px;
                    }
                    .glow-ring-2 {
                        width: 180px;
                        height: 180px;
                    }
                    .glow-ring-3 {
                        width: 210px;
                        height: 210px;
                    }
                }
                