.cdl-scan-block { margin-bottom: 1.75rem; }

        .cdl-scan-intro {
            margin-bottom: 1rem;
            display: flex;
            align-items: flex-start;
            gap: .85rem;
        }
        .cdl-scan-intro-icon {
            flex-shrink: 0;
            width: 42px;
            height: 42px;
            border-radius: 12px;
            background: linear-gradient(145deg, #113f93 0%, #1a5cc4 100%);
            color: #fff;
            display: grid;
            place-items: center;
            box-shadow: 0 8px 18px rgba(17, 63, 147, .22);
        }
        .cdl-scan-intro-text { display: flex; flex-direction: column; gap: 3px; padding-top: 2px; }
        .cdl-scan-intro strong { font-size: 15.5px; color: #1e2a3f; letter-spacing: -.01em; }
        .cdl-scan-intro span { font-size: 13px; color: #6b7892; line-height: 1.45; }

        /* ── Dropzone ─────────────────────────────────────────────── */
        .cdl-upload-zone {
            --cdl-accent: #113f93;
            position: relative;
            overflow: hidden;
            border: 1.5px dashed #b7cef0;
            border-radius: 18px;
            background:
                radial-gradient(ellipse 80% 60% at 50% 0%, rgba(17, 63, 147, .08), transparent 55%),
                linear-gradient(165deg, #f7faff 0%, #eef4ff 48%, #e8f0fb 100%);
            padding: 2.15rem 1.5rem 1.85rem;
            text-align: center;
            cursor: pointer;
            transition: border-color .25s, background .25s, box-shadow .25s, transform .2s;
        }
        .cdl-upload-zone::before {
            content: '';
            position: absolute;
            inset: 10px;
            border-radius: 14px;
            border: 1px solid rgba(17, 63, 147, .06);
            pointer-events: none;
        }
        .cdl-upload-zone:hover {
            border-color: #7eaae8;
            box-shadow: 0 12px 32px rgba(17, 63, 147, .1);
            transform: translateY(-1px);
        }
        .cdl-upload-zone.dragover {
            border-color: var(--cdl-accent);
            border-style: solid;
            background:
                radial-gradient(ellipse 90% 70% at 50% 40%, rgba(17, 63, 147, .14), transparent 60%),
                linear-gradient(165deg, #e4efff 0%, #d6e6ff 100%);
            box-shadow: 0 0 0 4px rgba(17, 63, 147, .12), 0 16px 36px rgba(17, 63, 147, .14);
            transform: scale(1.01);
        }
        .cdl-upload-zone.is-hidden { display: none; }
        .cdl-upload-input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; z-index: 3; }

        .cdl-upload-visual {
            position: relative;
            width: 88px;
            height: 88px;
            margin: 0 auto 1.05rem;
        }
        .cdl-upload-ring {
            position: absolute;
            inset: 0;
            border-radius: 50%;
            border: 2px solid rgba(17, 63, 147, .12);
            animation: cdlRingPulse 2.4s ease-in-out infinite;
        }
        .cdl-upload-ring--delay { animation-delay: 1.2s; inset: 8px; border-color: rgba(17, 63, 147, .18); }
        .cdl-upload-icon-wrap {
            position: absolute;
            inset: 16px;
            border-radius: 50%;
            background: linear-gradient(145deg, #163f96, #2a6fd4);
            color: #fff;
            display: grid;
            place-items: center;
            box-shadow: 0 10px 22px rgba(17, 63, 147, .28);
            transition: transform .25s;
        }
        .cdl-upload-zone:hover .cdl-upload-icon-wrap { transform: translateY(-3px); }
        .cdl-upload-zone.dragover .cdl-upload-icon-wrap {
            transform: scale(1.06);
            animation: cdlIconBob .55s ease-in-out infinite alternate;
        }

        .cdl-upload-title {
            font-size: 16.5px;
            font-weight: 700;
            color: #1a2740;
            margin-bottom: 4px;
            letter-spacing: -.015em;
            position: relative;
            z-index: 1;
        }
        .cdl-upload-sub {
            font-size: 13px;
            color: #6b7892;
            margin-bottom: 1.05rem;
            position: relative;
            z-index: 1;
        }
        .cdl-upload-formats {
            display: flex;
            flex-wrap: wrap;
            justify-content: center;
            gap: 6px;
            position: relative;
            z-index: 1;
        }
        .cdl-format-chip {
            font-size: 11px;
            font-weight: 700;
            letter-spacing: .04em;
            text-transform: uppercase;
            color: #3d5a8a;
            background: rgba(255, 255, 255, .85);
            border: 1px solid #d3e2f7;
            border-radius: 999px;
            padding: 4px 10px;
        }
        .cdl-upload-features {
            display: flex;
            flex-wrap: wrap;
            justify-content: center;
            gap: 8px 14px;
            margin-top: 1.15rem;
            padding-top: 1rem;
            border-top: 1px solid rgba(17, 63, 147, .08);
            position: relative;
            z-index: 1;
        }
        .cdl-upload-feature {
            display: inline-flex;
            align-items: center;
            gap: 5px;
            font-size: 12px;
            font-weight: 600;
            color: #5a6d8c;
        }
        .cdl-upload-feature svg { color: #113f93; flex-shrink: 0; }

        /* ── Scan result panel ────────────────────────────────────── */
        .cdl-scan-result {
            display: none;
            gap: 1.25rem;
            align-items: stretch;
            margin-top: 0;
            flex-wrap: wrap;
            padding: 1.15rem;
            border-radius: 18px;
            background: linear-gradient(160deg, #f8fbff 0%, #eef4ff 100%);
            border: 1px solid #d5e3f7;
            box-shadow: 0 10px 28px rgba(17, 63, 147, .07);
            animation: cdlFadeUp .35s ease;
        }
        .cdl-scan-preview {
            position: relative;
            width: 168px;
            flex-shrink: 0;
            border-radius: 14px;
            overflow: hidden;
            background: #0f1b33;
            box-shadow: 0 8px 20px rgba(15, 27, 51, .18);
            aspect-ratio: 5 / 6.2;
        }
        .cdl-scan-preview img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            display: block;
        }
        .cdl-scan-preview-frame {
            position: absolute;
            inset: 0;
            pointer-events: none;
            border: 1px solid rgba(255, 255, 255, .18);
            border-radius: 14px;
            box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15);
        }
        .cdl-scan-corners span {
            position: absolute;
            width: 16px;
            height: 16px;
            border-color: #5eb0ff;
            border-style: solid;
            opacity: 0;
            transition: opacity .25s;
            z-index: 2;
        }
        .cdl-scan-result.is-scanning .cdl-scan-corners span { opacity: 1; }
        .cdl-scan-corners span:nth-child(1) { top: 8px; left: 8px; border-width: 2.5px 0 0 2.5px; border-radius: 3px 0 0 0; }
        .cdl-scan-corners span:nth-child(2) { top: 8px; right: 8px; border-width: 2.5px 2.5px 0 0; border-radius: 0 3px 0 0; }
        .cdl-scan-corners span:nth-child(3) { bottom: 8px; left: 8px; border-width: 0 0 2.5px 2.5px; border-radius: 0 0 0 3px; }
        .cdl-scan-corners span:nth-child(4) { bottom: 8px; right: 8px; border-width: 0 2.5px 2.5px 0; border-radius: 0 0 3px 0; }

        .cdl-scan-beam {
            position: absolute;
            left: 0;
            right: 0;
            height: 2px;
            top: 0;
            z-index: 3;
            opacity: 0;
            background: linear-gradient(90deg, transparent, #6ec5ff, #fff, #6ec5ff, transparent);
            box-shadow: 0 0 14px 4px rgba(110, 197, 255, .55);
            pointer-events: none;
        }
        .cdl-scan-result.is-scanning .cdl-scan-beam {
            opacity: 1;
            animation: cdlScanBeam 1.85s ease-in-out infinite;
        }

        .cdl-scan-status {
            flex: 1;
            min-width: 210px;
            display: flex;
            flex-direction: column;
            justify-content: center;
            gap: .55rem;
            padding: .15rem 0;
        }

        .cdl-scan-loading {
            display: flex;
            flex-direction: column;
            gap: .85rem;
        }
        .cdl-scan-loading-row {
            display: flex;
            align-items: center;
            gap: .75rem;
        }
        .cdl-loader-orb {
            position: relative;
            width: 42px;
            height: 42px;
            flex-shrink: 0;
        }
        .cdl-loader-orb::before,
        .cdl-loader-orb::after {
            content: '';
            position: absolute;
            border-radius: 50%;
        }
        .cdl-loader-orb::before {
            inset: 0;
            border: 2.5px solid #d5e4fb;
            border-top-color: #113f93;
            border-right-color: #3d7fd4;
            animation: cdlSpin .75s linear infinite;
        }
        .cdl-loader-orb::after {
            inset: 9px;
            background: linear-gradient(145deg, #113f93, #3a7fd6);
            box-shadow: 0 0 0 3px rgba(17, 63, 147, .12);
            animation: cdlOrbPulse 1.2s ease-in-out infinite;
        }
        .cdl-scan-loading-copy { min-width: 0; }
        .cdl-scan-loading-title {
            font-size: 15px;
            font-weight: 700;
            color: #1a2740;
            margin: 0 0 2px;
            letter-spacing: -.01em;
        }
        .cdl-scan-loading-msg {
            font-size: 12.5px;
            color: #6b7892;
            margin: 0;
            min-height: 1.2em;
            transition: opacity .2s;
        }

        .cdl-scan-steps {
            display: flex;
            flex-direction: column;
            gap: 6px;
            margin: 0;
            padding: 0;
            list-style: none;
        }
        .cdl-scan-step {
            display: flex;
            align-items: center;
            gap: 8px;
            font-size: 12px;
            font-weight: 600;
            color: #9aa8c0;
            transition: color .25s;
        }
        .cdl-scan-step-dot {
            width: 7px;
            height: 7px;
            border-radius: 50%;
            background: #c8d5ea;
            flex-shrink: 0;
            transition: background .25s, box-shadow .25s;
        }
        .cdl-scan-step.is-active { color: #113f93; }
        .cdl-scan-step.is-active .cdl-scan-step-dot {
            background: #113f93;
            box-shadow: 0 0 0 3px rgba(17, 63, 147, .18);
            animation: cdlDotPulse 1s ease-in-out infinite;
        }
        .cdl-scan-step.is-done { color: #1a8a5a; }
        .cdl-scan-step.is-done .cdl-scan-step-dot { background: #1a8a5a; box-shadow: none; animation: none; }

        .cdl-scan-success,
        .cdl-scan-error {
            display: flex;
            align-items: flex-start;
            gap: .7rem;
            padding: .85rem 1rem;
            border-radius: 12px;
            font-size: 13.5px;
            font-weight: 600;
            line-height: 1.45;
        }
        .cdl-scan-success {
            color: #146b47;
            background: linear-gradient(135deg, #e8faf1, #f0fbf6);
            border: 1px solid #b7e8cf;
        }
        .cdl-scan-error {
            color: #a5281d;
            background: linear-gradient(135deg, #fff0ee, #fff6f5);
            border: 1px solid #f0c4be;
        }
        .cdl-status-icon {
            flex-shrink: 0;
            width: 28px;
            height: 28px;
            border-radius: 50%;
            display: grid;
            place-items: center;
            margin-top: 1px;
        }
        .cdl-scan-success .cdl-status-icon { background: #1a8a5a; color: #fff; }
        .cdl-scan-error .cdl-status-icon { background: #c0392b; color: #fff; }

        .cdl-scan-reset {
            align-self: flex-start;
            margin-top: 2px;
            background: #fff;
            border: 1px solid #d3e0f4;
            border-radius: 999px;
            padding: 7px 14px;
            font-size: 12.5px;
            font-weight: 700;
            color: #3d5a8a;
            cursor: pointer;
            transition: background .2s, border-color .2s, color .2s;
        }
        .cdl-scan-reset:hover {
            background: #f0f5ff;
            border-color: #a8c4ea;
            color: #113f93;
        }

        .cdl-skip-scan {
            display: block;
            margin: 1rem auto 0;
            background: none;
            border: none;
            padding: 0;
            font-size: 13px;
            font-weight: 600;
            color: #6b7892;
            text-decoration: underline;
            text-underline-offset: 3px;
            cursor: pointer;
        }
        .cdl-skip-scan:hover { color: #113f93; }

        .cdl-form-fields {
            display: none;
            margin-top: 1.75rem;
            padding-top: 1.5rem;
            border-top: 1px solid #e4ecf8;
        }
        .cdl-form-fields.is-visible { display: block; }
        .cdl-form-fields .fields-reveal-header { margin-bottom: 1.1rem; }
        .cdl-form-fields .fields-reveal-header h4 {
            margin: 0 0 4px; font-size: 16px; font-weight: 700; color: #1e2a3f;
        }
        .cdl-form-fields .fields-reveal-header p {
            margin: 0; font-size: 13px; color: #6b7892;
        }
        .cdl-fields-section-label {
            font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
            color: #7a89aa; margin: 1.25rem 0 .65rem;
        }

        /* ── Profile photo upload ─────────────────────────────────── */
        .profile-photo-field > label {
            display: block;
            margin-bottom: .65rem;
        }
        .profile-photo-upload.file-upload-wrapper {
            position: relative;
            width: 100%;
            max-width: 280px;
            min-height: 0;
            padding: 0;
            margin: 0;
            background: transparent;
            border: none;
            box-shadow: none;
            display: block;
            text-align: left;
        }
        .profile-photo-upload .form-control[type="file"] {
            position: absolute;
            inset: 0;
            opacity: 0;
            width: 100%;
            height: 100%;
            cursor: pointer;
            z-index: 2;
            padding: 0;
            margin: 0;
            border: none;
            background: transparent;
        }
        .profile-photo-upload .file-upload-label {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: .45rem;
            width: 168px;
            min-height: 200px;
            padding: 1.25rem 1rem;
            margin: 0;
            text-align: center;
            border-radius: 16px;
            border: 1.5px dashed #b7cef0;
            background:
                radial-gradient(ellipse 90% 70% at 50% 20%, rgba(17, 63, 147, .07), transparent 60%),
                linear-gradient(165deg, #f7faff 0%, #eef4ff 100%);
            transition: border-color .2s, box-shadow .2s, transform .2s;
            cursor: pointer;
        }
        .profile-photo-upload:hover .file-upload-label {
            border-color: #7eaae8;
            box-shadow: 0 10px 24px rgba(17, 63, 147, .1);
            transform: translateY(-1px);
        }
        .profile-photo-upload .upload-icon-wrap {
            width: 48px;
            height: 48px;
            border-radius: 50%;
            background: linear-gradient(145deg, #163f96, #2a6fd4);
            color: #fff;
            display: grid;
            place-items: center;
            box-shadow: 0 8px 16px rgba(17, 63, 147, .22);
            margin-bottom: .15rem;
        }
        .profile-photo-upload .upload-icon {
            width: 22px;
            height: 22px;
            fill: none;
            stroke: currentColor;
            stroke-width: 2;
            stroke-linecap: round;
            stroke-linejoin: round;
        }
        .profile-photo-upload .upload-text {
            font-size: 13.5px;
            font-weight: 700;
            color: #1a2740;
            line-height: 1.3;
        }
        .profile-photo-upload .upload-hint {
            font-size: 11.5px;
            font-weight: 500;
            color: #7a89aa;
            line-height: 1.4;
            max-width: 130px;
        }

        .profile-photo-upload .file-preview {
            position: relative;
            display: none;
            width: 168px;
            margin: 0;
            padding: 0;
            background: transparent;
            border: none;
            text-align: left;
        }
        .profile-photo-upload .file-preview.is-visible,
        .profile-photo-upload .file-preview[style*="block"] {
            display: block !important;
        }
        .profile-photo-upload .preview-frame {
            position: relative;
            width: 168px;
            height: 200px;
            border-radius: 16px;
            overflow: hidden;
            background: #0f1b33;
            border: 1px solid #d5e3f7;
            box-shadow: 0 10px 24px rgba(17, 63, 147, .12);
        }
        .profile-photo-upload .preview-image {
            width: 100%;
            height: 100%;
            object-fit: cover;
            object-position: center top;
            display: block;
            border-radius: 0;
            border: none;
            margin: 0;
        }
        .profile-photo-upload .preview-meta {
            display: flex;
            flex-direction: column;
            gap: 2px;
            margin-top: .65rem;
            max-width: 168px;
        }
        .profile-photo-upload .preview-badge {
            display: inline-flex;
            align-items: center;
            gap: 5px;
            align-self: flex-start;
            font-size: 11px;
            font-weight: 700;
            letter-spacing: .02em;
            color: #146b47;
            background: #e8faf1;
            border: 1px solid #b7e8cf;
            border-radius: 999px;
            padding: 3px 9px;
        }
        .profile-photo-upload .preview-caption {
            font-size: 12px;
            color: #6b7892;
            font-weight: 500;
            line-height: 1.35;
        }
        .profile-photo-upload .remove-file {
            position: absolute;
            top: 8px;
            right: 8px;
            z-index: 3;
            width: 30px;
            height: 30px;
            border: none;
            border-radius: 50%;
            background: rgba(15, 27, 51, .72);
            color: #fff;
            font-size: 18px;
            line-height: 1;
            cursor: pointer;
            display: grid;
            place-items: center;
            padding: 0;
            box-shadow: 0 4px 10px rgba(0, 0, 0, .2);
            transition: background .2s, transform .15s;
        }
        .profile-photo-upload .remove-file:hover {
            background: #c0392b;
            transform: scale(1.06);
        }

        @keyframes cdlSpin { to { transform: rotate(360deg); } }
        @keyframes cdlRingPulse {
            0%, 100% { transform: scale(.92); opacity: .45; }
            50% { transform: scale(1.05); opacity: 1; }
        }
        @keyframes cdlIconBob {
            from { transform: scale(1.06) translateY(0); }
            to { transform: scale(1.06) translateY(-4px); }
        }
        @keyframes cdlScanBeam {
            0% { top: 6%; opacity: .35; }
            15% { opacity: 1; }
            85% { opacity: 1; }
            100% { top: 92%; opacity: .35; }
        }
        @keyframes cdlOrbPulse {
            0%, 100% { transform: scale(.88); opacity: .85; }
            50% { transform: scale(1); opacity: 1; }
        }
        @keyframes cdlDotPulse {
            0%, 100% { box-shadow: 0 0 0 3px rgba(17, 63, 147, .18); }
            50% { box-shadow: 0 0 0 5px rgba(17, 63, 147, .08); }
        }
        @keyframes cdlFadeUp {
            from { opacity: 0; transform: translateY(8px); }
            to { opacity: 1; transform: translateY(0); }
        }

        @media (max-width: 575px) {
            .cdl-scan-preview { width: 100%; max-width: 220px; margin: 0 auto; aspect-ratio: 4 / 3; }
            .cdl-scan-result { justify-content: center; text-align: left; }
        }
