        .modern-body {
            padding: 2rem;
            background: #f8fafc;
        }
        @media (max-width: 576px) {
            .modern-body {
                padding: 1.5rem;
            }
        }
        /* IC modal 打开时：确保 backdrop 灰色遮罩可见，layering：page-wraper(1) < backdrop(1000099) < modal(1000100) */
        body.ic-modal-open .page-wraper {
            position: relative;
            z-index: 1;
        }
        body.ic-modal-open .modal-backdrop {
            z-index: 1000099 !important;
            background-color: rgba(0, 0, 0, 0.5) !important;
            opacity: 1 !important;
        }
        /* 现代化身份证拍摄Modal样式 */
        .modern-modal {
            border: none;
            border-radius: 24px;
            box-shadow: 0 25px 80px rgba(0, 0, 0, 0.15);
            overflow: hidden;
        }

        .modern-header {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            border: none;
            padding: 2rem;
            position: relative;
            overflow: hidden;
        }

        .modern-header::before {
            content: '';
            position: absolute;
            top: -50%;
            right: -20%;
            width: 200px;
            height: 200px;
            background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
            border-radius: 50%;
            animation: float 8s ease-in-out infinite;
        }

        .header-content {
            position: relative;
            z-index: 2;
        }

        .title-section {
            display: flex;
            align-items: center;
            gap: 1rem;
            margin-bottom: 0.5rem;
        }

        .title-icon {
            font-size: 2rem;
            color: rgba(255, 255, 255, 0.9);
        }

        .modal-title {
            color: white;
            font-size: 1.8rem;
            font-weight: 700;
            margin: 0;
        }

        .modal-subtitle {
            color: rgba(255, 255, 255, 0.8);
            font-size: 1rem;
            margin: 0;
        }

        .modern-close {
            background: rgba(255, 255, 255, 0.2);
            border: none;
            border-radius: 50%;
            width: 40px;
            height: 40px;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-size: 1.2rem;
            transition: all 0.3s ease;
            backdrop-filter: blur(10px);
        }

        .modern-close:hover {
            background: rgba(255, 255, 255, 0.3);
            transform: scale(1.1);
        }

        .modern-body {
            padding: 2rem;
            background: #f8fafc;
        }

        .device-notice {
            background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
            border-radius: 12px;
            padding: 1rem;
            margin-bottom: 1.5rem;
            border-left: 4px solid #ff6b6b;
        }

        .notice-content {
            align-items: center;
            gap: 0.5rem;
            color: #8b4513;
            font-weight: 600;
        }

        .modern-tabs {
            border: none;
            margin-bottom: 2rem;
            background: white;
            border-radius: 16px;
            padding: 0.5rem;
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
        }

        .modern-tab-link {
            border: none;
            border-radius: 12px;
            padding: 1rem 1.5rem;
            font-weight: 600;
            color: #64748b;
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }

        .modern-tab-link.active {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
        }

        .modern-tab-link:hover:not(.active) {
            background: #f1f5f9;
            color: #334155;
        }

        .modern-tab-content {
            background: white;
            border-radius: 16px;
            padding: 2rem;
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
        }

        .tab-pane {
            display: none;
        }

        .tab-pane.show {
            display: block;
        }

        .tab-pane.show.active {
            display: block;
        }

        .capture-section, .upload-section {
            height: 100%;
        }

        .section-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 1.5rem;
        }

        .section-title {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            font-size: 1.1rem;
            font-weight: 600;
            color: #1e293b;
            margin: 0;
        }

        .camera-status {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            font-size: 0.9rem;
            color: #64748b;
        }

        .status-dot {
            font-size: 0.6rem;
            color: #10b981;
        }

        .modern-camera {
            position: relative;
            background: #f8fafc;
            border: 2px dashed #cbd5e1;
            border-radius: 16px;
            min-height: 400px;
            display: flex;
            align-items: center;
            justify-content: center;
            overflow: hidden;
            transition: all 0.3s ease;
        }

        .modern-camera.active {
            border-color: #10b981;
            background: #f0fdf4;
        }

        .camera-placeholder {
            text-align: center;
            color: #64748b;
            cursor: pointer;
            transition: all 0.3s ease;
        }
        
        .camera-placeholder:hover {
            color: #667eea;
            transform: scale(1.05);
        }

        .placeholder-icon {
            font-size: 3rem;
            margin-bottom: 1rem;
            display: block;
        }

        .placeholder-text {
            font-size: 1rem;
            font-weight: 500;
            margin: 0;
        }

        .camera-video {
            width: 100%;
            height: 100%;
            object-fit: cover;
            border-radius: 12px;
        }

        .id-card-frame {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            width: 280px;
            height: 180px;
            pointer-events: none;
            z-index: 10;
        }

        .frame-corners {
            position: relative;
            width: 100%;
            height: 100%;
        }

        .corner {
            position: absolute;
            width: 30px;
            height: 30px;
            border: 3px solid #10b981;
        }
        #take_photo .id-card-frame .corner {
            border-color: #6366f1;
        }
        #take_photo .id-card-frame.detected .corner {
            border-color: #10b981;
        }

        .corner.top-left {
            top: 0;
            left: 0;
            border-right: none;
            border-bottom: none;
        }

        .corner.top-right {
            top: 0;
            right: 0;
            border-left: none;
            border-bottom: none;
        }

        .corner.bottom-left {
            bottom: 0;
            left: 0;
            border-right: none;
            border-top: none;
        }

        .corner.bottom-right {
            bottom: 0;
            right: 0;
            border-left: none;
            border-top: none;
        }
        /* IC modal：打开时会被 JS 移到 body 末尾，与 backdrop 同级，z-index 需高于 backdrop 才能点击 */
        #take_photo.modal {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            display: none;
            align-items: center;
            justify-content: center;
            padding: max(0.5rem, env(safe-area-inset-top)) max(0.5rem, env(safe-area-inset-right)) max(0.5rem, env(safe-area-inset-bottom)) max(0.5rem, env(safe-area-inset-left));
            overflow-y: auto;
            overflow-x: hidden;
            z-index: 1000100 !important;
        }
        #take_photo.modal.show {
            display: flex !important;
        }
        #take_photo.modal .modal-dialog.ic-modal-dialog {
            margin-left: auto !important;
            margin-right: auto !important;
            margin-top: auto;
            margin-bottom: auto;
            flex-shrink: 0;
            transform: none !important;
            width: calc(100vw - 1rem) !important;
            max-width: min(1100px, calc(100vw - 1rem)) !important;
        }
        @media (min-width: 576px) {
            #take_photo.modal {
                padding: 1.75rem;
            }
            #take_photo.modal .modal-dialog.ic-modal-dialog {
                width: 100% !important;
                max-width: min(1100px, 94vw) !important;
            }
        }
        /* IC modal：手机占满可用宽度并水平居中，避免往左偏 */
        #take_photo .ic-modal-dialog {
            max-height: min(92vh, 100dvh - 1rem);
            min-height: 0;
        }
        @media (min-width: 576px) {
            #take_photo .ic-modal-dialog {
                min-height: 480px;
            }
        }
        #take_photo .modal-content {
            position: relative;
            z-index: 1000105 !important;
            min-height: 0;
            border-radius: 20px;
            border: none;
            box-shadow: 0 25px 80px rgba(15, 23, 42, 0.18);
            overflow: hidden;
        }
        body.ic-modal-open.modal-open {
            padding-right: 0 !important;
        }
        /* 三步统一布局 */
        .ic-verify-body {
            padding: 1rem 1.1rem 1.25rem !important;
        }
        @media (min-width: 576px) {
            .ic-verify-body {
                padding: 1.25rem 1.5rem 1.5rem !important;
            }
        }
        .ic-cam-panel {
            background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
            border: 1px solid #e2e8f0;
            border-radius: 16px;
            padding: 0.75rem;
            margin-bottom: 1rem;
        }
        .ic-cam-panel--in-viewport {
            margin-bottom: 0;
            padding-left: 0.5rem;
            padding-right: 0.5rem;
        }
        @media (min-width: 576px) {
            .ic-cam-panel {
                padding: 1rem;
            }
            .ic-cam-panel--in-viewport {
                padding-left: 0.65rem;
                padding-right: 0.65rem;
            }
        }
        .ic-viewport-row {
            display: flex;
            flex-direction: row;
            align-items: stretch;
            gap: 0.35rem;
            margin-top: 0.2rem;
        }
        .ic-flank {
            flex: 0 0 auto;
            width: 3.85rem;
            min-width: 3.5rem;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
        }
        @media (min-width: 400px) {
            .ic-flank {
                width: 4.35rem;
                min-width: 4rem;
            }
        }
        .ic-viewport-main {
            flex: 1 1 auto;
            min-width: 0;
            display: flex;
            flex-direction: column;
            gap: 0.55rem;
        }
        .ic-flank-spacer {
            width: 100%;
            min-height: 2.5rem;
        }
        .ic-flank-step-btn {
            width: 100%;
            padding: 0.5rem 0.3rem;
            font-size: 0.7rem;
            font-weight: 700;
            line-height: 1.2;
            white-space: normal;
            text-align: center;
            border-radius: 12px;
            hyphens: auto;
        }
        .ic-photo-actions {
            display: none;
            grid-template-columns: 1fr 1fr;
            gap: 0.55rem;
            padding: 0 0.1rem;
        }
        .ic-photo-actions.ic-photo-actions--visible {
            display: grid;
        }
        .ic-action-btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 0.45rem;
            padding: 0.7rem 0.65rem;
            border-radius: 14px;
            font-weight: 700;
            font-size: 0.8125rem;
            border: none;
            cursor: pointer;
            transition: transform 0.12s ease, filter 0.12s ease, box-shadow 0.12s ease;
        }
        .ic-action-btn:active {
            transform: scale(0.98);
        }
        .ic-action-secondary {
            background: #fff;
            color: #475569;
            border: 2px solid #e2e8f0;
            box-shadow: 0 2px 10px rgba(15, 23, 42, 0.06);
        }
        .ic-action-secondary:hover {
            background: #f8fafc;
            color: #1e293b;
        }
        .ic-action-primary {
            background: linear-gradient(135deg, #059669 0%, #10b981 100%);
            color: #fff;
            box-shadow: 0 4px 18px rgba(16, 185, 129, 0.35);
        }
        .ic-action-primary:hover {
            filter: brightness(1.06);
            color: #fff;
        }
        .ic-btn-submit-green {
            background: linear-gradient(135deg, #059669 0%, #10b981 100%) !important;
            box-shadow: 0 4px 16px rgba(16, 185, 129, 0.35) !important;
        }
        .ic-btn-submit-green:disabled {
            opacity: 0.45;
            box-shadow: none !important;
        }
        #take_photo .ic-cam-stage .preview-image.ic-preview-ic {
            position: absolute;
            left: 50%;
            top: 50%;
            transform: translate(-50%, -50%);
            width: auto !important;
            height: auto !important;
            max-width: 100% !important;
            max-height: 100% !important;
            object-fit: contain;
            border-radius: 12px;
            box-shadow: 0 12px 40px rgba(15, 23, 42, 0.18);
            z-index: 12;
        }
        #take_photo .ic-selfie-stage .preview-image.ic-preview-selfie {
            position: absolute;
            left: 0;
            top: 0;
            width: 100% !important;
            height: 100% !important;
            object-fit: cover;
            border-radius: 12px;
            z-index: 12;
        }
        #take_photo .ic-cam-stage {
            cursor: pointer;
        }
        #take_photo .ic-cam-stage.active {
            cursor: default;
        }
        .ic-btn-primary {
            border-radius: 12px;
            font-weight: 600;
            padding: 0.6rem 1.1rem;
            border: none;
            background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
            color: #fff;
            box-shadow: 0 4px 14px rgba(79, 70, 229, 0.35);
        }
        .ic-btn-primary:hover {
            filter: brightness(1.05);
            color: #fff;
        }
        .ic-step-footer:not(.ic-step-footer-triple) {
            display: flex;
            justify-content: center;
            gap: 0.5rem;
            flex-wrap: wrap;
            padding-top: 0.25rem;
        }
        .ic-btn-next {
            min-width: 0;
            border-radius: 12px;
            font-weight: 700;
            padding: 0.55rem 1rem;
            border: none;
            background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
            color: #fff;
            box-shadow: 0 4px 14px rgba(79, 70, 229, 0.28);
        }
        .ic-btn-next:disabled {
            opacity: 0.45;
            box-shadow: none;
        }
        .ic-btn-outline {
            border-radius: 14px;
            font-weight: 600;
            padding: 0.65rem 1.25rem;
            border: 2px solid #e2e8f0;
            background: #fff;
            color: #64748b;
        }
        /* width:100% 避免 aspect-ratio + max-height 把块算窄后靠左留白 */
        #take_photo .ic-cam-stage.modern-camera {
            width: 100%;
            max-width: 100%;
            box-sizing: border-box;
            min-height: min(56vw, 300px);
            aspect-ratio: 4 / 3;
            max-height: min(54vh, 520px);
        }
        @media (min-width: 576px) {
            #take_photo .ic-cam-stage.modern-camera {
                min-height: 400px;
                max-height: min(56vh, 560px);
            }
        }
        #take_photo .ic-selfie-stage.modern-camera {
            width: 100%;
            max-width: 100%;
            box-sizing: border-box;
            min-height: min(72vw, 400px);
            aspect-ratio: 3 / 4;
            max-height: min(58vh, 580px);
        }
        #take_photo .id-card-frame {
            width: min(88%, 420px);
            height: auto;
            aspect-ratio: 1.586 / 1;
            max-height: 78%;
        }
        #take_photo .ic-cam-stage,
        #take_photo .ic-selfie-stage {
            position: relative;
        }
        #take_photo .ic-cam-stage .camera-video,
        #take_photo .ic-selfie-stage .camera-video {
            position: absolute;
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
            object-fit: cover;
            z-index: 2;
            border-radius: 12px;
        }
        #take_photo .ic-cam-stage .camera-placeholder,
        #take_photo .ic-selfie-stage .camera-placeholder {
            position: relative;
            z-index: 5;
        }
        #take_photo .ic-cam-stage .id-card-frame {
            z-index: 10;
        }
        #take_photo .ic-selfie-stage .selfie-face-guide {
            z-index: 8;
        }
        #take_photo .ic-cam-stage .countdown-overlay,
        #take_photo .ic-selfie-stage .countdown-overlay {
            z-index: 20;
            border-radius: 12px;
        }
        #take_photo .ic-modal-header {
            border-bottom: 1px solid #e2e8f0;
            padding: 0.85rem 1rem;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 0.75rem;
            background: linear-gradient(180deg, #fafbff 0%, #fff 100%);
        }
        @media (min-width: 576px) {
            #take_photo .ic-modal-header {
                padding: 1rem 1.5rem;
            }
        }
        #take_photo .ic-modal-header .modal-title {
            font-size: 1.05rem;
            font-weight: 700;
            color: #0f172a;
            margin: 0;
            letter-spacing: -0.02em;
        }
        @media (min-width: 576px) {
            #take_photo .ic-modal-header .modal-title {
                font-size: 1.2rem;
            }
        }
        .ic-header-badge {
            width: 40px;
            height: 40px;
            border-radius: 12px;
            background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
            color: #4338ca;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.1rem;
            flex-shrink: 0;
        }
        .selfie-face-guide {
            position: absolute;
            left: 50%;
            top: 46%;
            transform: translate(-50%, -50%);
            width: min(72%, 280px);
            aspect-ratio: 1 / 1.15;
            border: 3px solid rgba(99, 102, 241, 0.55);
            border-radius: 50%;
            pointer-events: none;
            z-index: 8;
            box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.35) inset;
        }
        /* IC modal body：与 header 明确分界，进度条在 body 内 */
        #take_photo .ic-modal-body {
            border-top: 1px solid #e2e8f0;
            padding-top: 1.25rem !important;
        }
        /* IC 简洁进度条（在 modal body 内第一块，不是 header） */
        #take_photo .ic-progress-bar {
            padding: 0.75rem 0;
            margin-bottom: 1.5rem;
            border-bottom: 1px solid #e2e8f0;
            display: flex;
            align-items: center;
            justify-content: space-between;
            flex-wrap: wrap;
            gap: 0.75rem;
        }
        .ic-progress-dots {
            display: flex;
            align-items: center;
            gap: 0;
        }
        .ic-dot {
            width: 28px;
            height: 28px;
            border-radius: 50%;
            background: #e2e8f0;
            color: #64748b;
            font-size: 0.8rem;
            font-weight: 600;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s ease;
        }
        .ic-dot.active {
            background: #6366f1;
            color: #fff;
            box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.3);
        }
        .ic-dot.completed {
            background: #10b981;
            color: #fff;
        }
        .ic-dot-line {
            width: 32px;
            height: 2px;
            background: #e2e8f0;
            flex-shrink: 0;
        }
        .ic-dot.completed + .ic-dot-line,
        .ic-dot.active + .ic-dot-line {
            background: #c7d2fe;
        }
        .ic-progress-text {
            font-size: 0.875rem;
            color: #64748b;
            font-weight: 500;
        }

        .step-item.completed + .step-connector {
            background: #10b981;
        }

        /* 倒计时覆盖层 */
        .countdown-overlay {
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.7);
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            z-index: 20;
            border-radius: 16px;
        }

        .countdown-number {
            font-size: 5rem;
            font-weight: 700;
            color: white;
            text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
            animation: pulse 1s ease-in-out infinite;
        }

        .countdown-text {
            color: white;
            font-size: 1.2rem;
            margin-top: 1rem;
            text-align: center;
        }

        @keyframes pulse {
            0%, 100% { transform: scale(1); }
            50% { transform: scale(1.1); }
        }

        /* 验证状态样式 */
        .verification-status {
            max-width: 600px;
            margin: 0 auto;
        }

        .verification-item {
            display: flex;
            align-items: center;
            padding: 1.5rem;
            margin-bottom: 1rem;
            background: #f8fafc;
            border-radius: 12px;
            border-left: 4px solid #cbd5e1;
            transition: all 0.3s ease;
        }

        .verification-item.active {
            background: #f0f4ff;
            border-left-color: #667eea;
        }

        .verification-item.completed {
            background: #f0fdf4;
            border-left-color: #10b981;
        }

        .verify-icon {
            font-size: 2rem;
            margin-right: 1rem;
            color: #cbd5e1;
        }

        .verification-item.active .verify-icon {
            color: #667eea;
            animation: spin 1s linear infinite;
        }

        .verification-item.completed .verify-icon {
            color: #10b981;
        }

        .verify-text {
            font-size: 1.1rem;
            font-weight: 500;
            color: #64748b;
        }

        .verification-item.active .verify-text {
            color: #667eea;
        }

        .verification-item.completed .verify-text {
            color: #10b981;
        }

        @keyframes spin {
            from { transform: rotate(0deg); }
            to { transform: rotate(360deg); }
        }

        /* 步骤内容 */
        .step-content {
            animation: fadeIn 0.3s ease;
        }

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

        /* IC 检测状态样式 */
        .ic-detection-status {
            padding: 0.75rem;
            border-radius: 8px;
            background: #f8fafc;
            border: 1px solid #e2e8f0;
        }

        .detection-message {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.5rem;
            font-size: 0.9rem;
            color: #64748b;
        }

        .detection-message.detecting {
            color: #667eea;
        }

        .detection-message.good {
            color: #10b981;
            font-weight: 600;
        }

        .detection-message.warning {
            color: #f59e0b;
        }

        .detection-message.error {
            color: #ef4444;
        }

        /* ID 框架增强样式 */
        .id-card-frame {
            border: 3px solid rgba(102, 126, 234, 0.3);
            transition: all 0.3s ease;
        }

        .id-card-frame.detected {
            border-color: #10b981;
            box-shadow: 0 0 20px rgba(16, 185, 129, 0.5);
            animation: pulse-border 1s ease-in-out infinite;
        }

        .id-card-frame.too-far {
            border-color: #f59e0b;
        }

        .id-card-frame.too-close {
            border-color: #ef4444;
        }

        .id-card-frame.off-center {
            border-color: #f59e0b;
        }

        @keyframes pulse-border {
            0%, 100% { box-shadow: 0 0 20px rgba(16, 185, 129, 0.5); }
            50% { box-shadow: 0 0 30px rgba(16, 185, 129, 0.8); }
        }

        .modern-footer {
            background: white;
            border: none;
            padding: 1.5rem 2rem;
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 1rem;
        }

        #take_photo .ic-review-form {
            display: flex;
            flex-direction: column;
            gap: 12px;
            text-align: left;
        }
        #take_photo .ic-review-field label {
            display: block;
            font-size: 0.85rem;
            font-weight: 600;
            color: #334155;
            margin-bottom: 6px;
        }
        #take_photo .ic-review-field .form-control {
            border-radius: 10px;
            border: 1px solid #e2e8f0;
            font-size: 0.95rem;
            background-color: #fff;
            pointer-events: auto;
            -webkit-user-select: text;
            user-select: text;
        }
        #take_photo #step3ReviewSection {
            position: relative;
            z-index: 20;
        }
        #take_photo #step3ReviewSection .ic-review-form input:not([type="hidden"]),
        #take_photo #step3ReviewSection .ic-review-form textarea,
        #take_photo #step3ReviewSection .ic-review-form select {
            pointer-events: auto !important;
            touch-action: manipulation;
        }
        #take_photo .ic-review-row {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 12px;
        }
        @media (max-width: 576px) {
            #take_photo .ic-review-row {
                grid-template-columns: 1fr;
            }
        }
        #take_photo .ic-review-actions {
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
            justify-content: center;
        }
        #take_photo .ic-review-intro h5 {
            font-weight: 700;
            color: #1e293b;
        }

/* ========== Fullscreen capture + review modal flow ========== */
#take_photo.ic-flow-capture {
    padding: 0 !important;
    background: #0f172a;
}
#take_photo.ic-flow-capture .modal-dialog.ic-modal-dialog {
    margin: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
    max-height: 100% !important;
    min-height: 100dvh !important;
}
#take_photo.ic-flow-capture .modal-content {
    height: 100%;
    min-height: 100dvh;
    border-radius: 0;
    background: #0f172a;
    box-shadow: none;
    display: flex;
    flex-direction: column;
}
#take_photo.ic-flow-capture .ic-modal-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 30;
    border: none;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.92) 0%, rgba(15, 23, 42, 0.35) 70%, transparent 100%);
    padding: max(0.75rem, env(safe-area-inset-top)) 1rem 2.5rem;
}
#take_photo.ic-flow-capture .ic-modal-header .modal-title,
#take_photo.ic-flow-capture .ic-header-badge {
    color: #fff;
}
#take_photo.ic-flow-capture .ic-header-badge {
    background: rgba(255, 255, 255, 0.15);
}
#take_photo.ic-flow-capture .btn-close {
    filter: invert(1);
    opacity: 0.85;
}
#take_photo.ic-flow-capture .ic-modal-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 0 !important;
    border: none !important;
    overflow: hidden;
    min-height: 0;
    background: #0f172a !important;
}
#take_photo.ic-flow-capture .ic-progress-bar {
    position: absolute;
    top: calc(max(0.75rem, env(safe-area-inset-top)) + 3rem);
    left: 1rem;
    right: 1rem;
    z-index: 28;
    margin: 0;
    padding: 0.65rem 0.85rem;
    border: none;
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.12);
}
#take_photo.ic-flow-capture .ic-progress-text {
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.8rem;
}
#take_photo.ic-flow-capture .step-content {
    display: none !important;
    flex: 1;
    flex-direction: column;
    min-height: 0;
    margin: 0;
}
#take_photo.ic-flow-capture .step-content.ic-step-active {
    display: flex !important;
}
#take_photo.ic-flow-capture #step3SelfieSection {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}
#take_photo.ic-flow-capture .ic-viewport-row {
    flex: 1;
    flex-direction: column;
    margin: 0;
    gap: 0;
    min-height: 0;
}
#take_photo.ic-flow-capture .ic-viewport-main {
    flex: 1;
    min-height: 0;
    gap: 0;
}
#take_photo.ic-flow-capture .ic-cam-panel {
    flex: 1;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 0;
    background: #000;
    display: flex;
    flex-direction: column;
    min-height: 0;
}
#take_photo.ic-flow-capture .ic-cam-stage.modern-camera,
#take_photo.ic-flow-capture .ic-selfie-stage.modern-camera {
    flex: 1 1 0;
    width: 100% !important;
    max-width: 100% !important;
    min-height: 0 !important;
    max-height: none !important;
    aspect-ratio: unset !important;
    height: 100% !important;
    border-radius: 0;
    border: none;
    display: block;
    background: #000;
}
#take_photo.ic-flow-capture .ic-cam-stage.active .camera-placeholder,
#take_photo.ic-flow-capture .ic-selfie-stage.active .camera-placeholder {
    display: none !important;
}
#take_photo.ic-flow-capture .ic-cam-stage .camera-video,
#take_photo.ic-flow-capture .ic-selfie-stage .camera-video {
    border-radius: 0;
    object-fit: cover;
}
#take_photo.ic-flow-capture .ic-cam-stage .camera-placeholder,
#take_photo.ic-flow-capture .ic-selfie-stage .camera-placeholder {
    color: rgba(255, 255, 255, 0.85);
}
#take_photo.ic-flow-capture .id-card-frame {
    width: min(92vw, 560px);
    max-height: 42vh;
    aspect-ratio: 1.586 / 1;
}
#take_photo.ic-flow-capture .selfie-face-guide {
    width: min(72vw, 320px);
    height: min(72vw, 320px);
    max-height: 50vh;
}
#take_photo.ic-flow-capture .ic-detection-status {
    display: none !important;
}
#take_photo.ic-flow-capture .ic-detection-status .detection-message {
    background: rgba(15, 23, 42, 0.72);
    color: #e2e8f0;
    border-radius: 12px;
    padding: 0.65rem 0.85rem;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}
#take_photo.ic-flow-capture .ic-flank {
    position: fixed;
    bottom: calc(1.35rem + env(safe-area-inset-bottom));
    z-index: 30;
    width: 7.5rem;
    min-width: 7.5rem;
    max-width: 7.5rem;
    display: none;
}
#take_photo.ic-flow-capture .ic-step-active .ic-flank {
    display: flex;
}
#take_photo.ic-flow-capture .ic-flank-left {
    left: max(0.75rem, calc(50% - 7.5rem - 3.1rem));
}
#take_photo.ic-flow-capture .ic-flank-right {
    right: max(0.75rem, calc(50% - 7.5rem - 3.1rem));
}
#take_photo.ic-flow-capture .ic-flank-spacer {
    display: none;
}
#take_photo.ic-flow-capture .ic-flank-step-btn {
    width: 100%;
    min-width: 0;
    max-width: 7.5rem;
    padding: 0.85rem 0.65rem;
    font-size: 0.9rem;
    border-radius: 999px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
    border: none;
}
#take_photo.ic-flow-capture .ic-btn-outline.ic-flank-step-btn {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(8px);
}
#take_photo.ic-flow-capture .ic-btn-next.ic-flank-step-btn {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
}
#take_photo.ic-flow-capture .ic-btn-submit-green.ic-flank-step-btn {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
}
#take_photo.ic-flow-capture .ic-photo-actions {
    position: fixed;
    left: max(0.75rem, calc(50% - 7.5rem - 3.1rem));
    transform: none;
    width: 7.5rem;
    right: auto;
    bottom: calc(1.35rem + env(safe-area-inset-bottom));
    z-index: 55;
    padding: 0;
    display: none;
}
#take_photo.ic-flow-capture .ic-photo-actions.ic-photo-actions--visible {
    display: flex;
    justify-content: stretch;
}
/* Keep side gaps equal: hide left flank while retake occupies the left slot */
#take_photo.ic-flow-capture .ic-step-active:has(.ic-photo-actions--visible) .ic-flank-left {
    visibility: hidden;
    pointer-events: none;
}
#take_photo.ic-flow-capture .ic-photo-actions .ic-action-primary {
    display: none !important;
}
#take_photo.ic-flow-capture .ic-photo-actions .ic-action-btn {
    width: 100%;
    min-width: 0;
    padding: 0.85rem 0.65rem;
    font-size: 0.9rem;
    border-radius: 999px;
}
#take_photo.ic-flow-capture .ic-action-btn {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}
#take_photo.ic-flow-capture .preview-image {
    object-fit: contain;
    background: #000;
}

#take_photo.ic-flow-review .modal-dialog.ic-modal-dialog {
    max-width: min(520px, calc(100vw - 1.25rem)) !important;
    margin: auto !important;
}
#take_photo.ic-flow-review .modal-content {
    border-radius: 20px;
    max-height: min(92vh, 100dvh - 1rem);
    overflow: hidden;
}
#take_photo.ic-flow-review .ic-modal-header {
    background: #fff !important;
    border-bottom: 1px solid #f1f3f4 !important;
    padding: 20px 24px !important;
    color: #0f172a;
}
#take_photo.ic-flow-review .ic-modal-header .modal-title {
    color: #0f172a !important;
    font-size: 1.05rem;
    font-weight: 700;
}
#take_photo.ic-flow-review .ic-header-badge {
    background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
    color: #4338ca;
}
#take_photo.ic-flow-review .btn-close {
    filter: none !important;
    opacity: 0.65;
}
#take_photo.ic-flow-review .modal-content {
    border-radius: 16px;
    max-height: min(92vh, 100dvh - 1rem);
    overflow: hidden;
    box-shadow: 0 25px 80px rgba(15, 23, 42, 0.18);
}
#take_photo.ic-flow-review .ic-modal-body {
    overflow-y: auto;
    padding: 1.25rem 1.35rem 1.5rem !important;
    background: #fff !important;
}
#take_photo.ic-flow-review .ic-progress-bar {
    display: none;
}

.ic-review-photo-strip {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.65rem;
    margin-bottom: 1rem;
}
.ic-review-photo-tile {
    background: #fff;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
}
.ic-review-photo-tile img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    display: block;
    background: #e2e8f0;
}
.ic-review-photo-tile span {
    display: block;
    text-align: center;
    font-size: 0.72rem;
    font-weight: 600;
    color: #64748b;
    padding: 0.35rem 0.25rem;
}

/* Manual capture (shutter) button for IC front/back */
.ic-manual-capture-btn {
    position: absolute;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 25;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    border: 5px solid rgba(255, 255, 255, 0.9);
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35), inset 0 0 0 3px rgba(255, 255, 255, 0.3);
    padding: 0;
}
.ic-manual-capture-btn::after {
    content: '';
    display: block;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #fff;
    transition: transform 0.1s ease, background 0.1s ease;
}
.ic-manual-capture-btn:active::after {
    transform: scale(0.85);
    background: #e2e8f0;
}
.ic-manual-capture-btn i {
    display: none;
}
.ic-manual-capture-btn.is-hidden {
    display: none !important;
}
#take_photo.ic-flow-capture .ic-manual-capture-btn {
    position: fixed !important;
    bottom: calc(1.15rem + env(safe-area-inset-bottom)) !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    z-index: 50 !important;
    width: 76px !important;
    height: 76px !important;
    display: flex !important;
    border: 5px solid #fff !important;
    background: transparent !important;
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.5), inset 0 0 0 3px rgba(255, 255, 255, 0.4) !important;
}
#take_photo.ic-flow-capture .ic-manual-capture-btn.is-hidden {
    display: none !important;
}
#take_photo.ic-flow-capture .ic-manual-capture-btn::after {
    width: 56px;
    height: 56px;
    background: #fff;
}

