/* Persona-style flow: document capture buttons and camera overlay */
.doc-actions { display: flex; flex-direction: column; gap: 0.5rem; margin-top: 0.9rem; }
.btn-capture, .btn-upload { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; padding: 0.75rem 1rem; border-radius: 10px; font-weight: 700; font-size: 0.9rem; cursor: pointer; transition: background 0.2s, color 0.2s; }
.btn-capture { background: var(--primary); color: #fff; border: none; }
.btn-capture:hover { background: var(--primary-hover); }
.btn-upload { background: transparent; color: var(--primary); border: 1.5px solid var(--primary); }
.btn-upload:hover { background: var(--hover-bg); }

.dc-overlay { position: fixed; inset: 0; z-index: 1000; background: rgba(15, 23, 42, 0.55); display: flex; align-items: center; justify-content: center; padding: 1rem; }
.dc-sheet { background: var(--card-bg, #fff); color: var(--text, #1f2937); width: 100%; max-width: 460px; border-radius: 16px; padding: 1.1rem; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25); }
.dc-top { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.8rem; }
.dc-close { background: transparent; border: none; color: var(--text-muted, #6b7280); font-size: 1.1rem; cursor: pointer; padding: 0.3rem 0.5rem; border-radius: 8px; }
.dc-close:hover { background: var(--hover-bg, #e6edf6); }
.dc-title { font-weight: 700; font-size: 1.05rem; }
.dc-stage { position: relative; margin: 0 auto; background: #000; border-radius: 12px; overflow: hidden; min-height: 120px; }
.dc-video { width: 100%; height: 100%; display: block; object-fit: cover; transform: none; }
.dc-guide { position: absolute; border: 3px solid #fff; border-radius: 10px; box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.45); transition: border-color 0.2s; pointer-events: none; }
.dc-guide.ok { border-color: var(--success, #10b981); }
.dc-msg { text-align: center; font-size: 0.92rem; font-weight: 600; margin: 0.8rem 0 0.5rem; min-height: 1.3em; }
.dc-bar { height: 6px; border-radius: 6px; background: var(--field-bg, #f1f4f8); overflow: hidden; }
.dc-bar-fill { height: 100%; width: 0%; background: var(--success, #10b981); transition: width 0.2s; }
.dc-manual { display: flex; margin: 0.9rem auto 0; align-items: center; gap: 0.5rem; background: transparent; color: var(--primary); border: 1.5px solid var(--primary); border-radius: 10px; padding: 0.6rem 1.1rem; font-weight: 700; cursor: pointer; }
.dc-manual:hover { background: var(--hover-bg, #e6edf6); }

/* No selfie preview and no Confirm button: the form is submitted automatically after the face check passes. */
#selfie-preview-img { display: none !important; }
#btn-submit-selfie { display: none !important; }

/* Documents screen as a swipe flow */
#pane-docs .pane-header { background: linear-gradient(135deg, var(--primary), var(--primary-hover, var(--primary))); border-radius: 16px; padding: 1.25rem 1.5rem; margin-bottom: 1rem; border: none; }
#pane-docs .pane-header h1, #pane-docs .pane-header p { color: #fff; }
.doc-step { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 0.9rem; }
.doc-step-label { font-weight: 700; font-size: 0.95rem; }
.doc-dots { display: inline-flex; gap: 6px; }
.doc-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--field-bg, #dfe5ee); transition: background 0.3s, width 0.3s; }
.doc-dots i.on { background: var(--primary); width: 22px; border-radius: 6px; }
.doc-step-links { display: inline-flex; gap: 0.75rem; }
.doc-step-link { background: transparent; border: none; color: var(--primary); font-weight: 600; font-size: 0.85rem; cursor: pointer; padding: 0.2rem 0; }
.doc-step-link:hover { text-decoration: underline; }
.doc-swipe { overflow: hidden; padding: 6px 0 14px; margin-bottom: 0.5rem; }
#pane-docs .upload-zone { display: flex; gap: 0; width: 200%; margin: 0; transform: translateX(0); transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1); }
#pane-docs .upload-box { flex: 0 0 calc(50% - 16px); margin: 0 8px; box-sizing: border-box; background: var(--card-bg, #fff); border: none; border-radius: 16px; box-shadow: 0 6px 24px rgba(15, 23, 42, 0.1); padding: 1.25rem; cursor: default; transform: none; }
#pane-docs .upload-box:hover { transform: none; background: var(--card-bg, #fff); }
#pane-docs .upload-box > i { display: flex; align-items: center; justify-content: center; width: 100%; height: 150px; font-size: 3.6rem; border-radius: 12px; background: var(--hover-bg, #eef2ff); color: var(--primary); margin: 0 0 0.9rem; }
#pane-docs[data-step="back"] .upload-zone, #pane-docs[data-step="done"] .upload-zone { transform: translateX(-50%); }
#pane-docs[data-noback] .upload-zone { width: 100%; transform: none; }
#pane-docs[data-noback] #box-back { display: none; }
#pane-docs[data-noback] .upload-box { flex-basis: calc(100% - 16px); }
#pane-docs:not([data-step="done"]) [data-action="validateDocStep"] { display: none; }
#pane-docs .btn-upload { order: 1; border-style: dashed; padding: 0.95rem 1rem; }
#pane-docs .btn-capture { order: 2; background: linear-gradient(135deg, var(--primary), var(--primary-hover, var(--primary))); padding: 0.95rem 1rem; }
.doc-note { text-align: center; font-size: 0.78rem; color: var(--text-muted, #6b7280); margin-top: 0.6rem; }
@media (max-width: 768px) { #pane-docs .upload-box > i { height: 120px; } }

/* Documents: no preview, cinematic hand-over, automatic move to the face check */
#pane-docs .preview-thumb { display: none !important; }
#pane-docs .upload-box.doc-done { opacity: 0 !important; transform: scale(0.94) !important; filter: blur(3px); transition: opacity 0.5s ease, transform 0.5s ease, filter 0.5s ease; }
#pane-docs.doc-leaving { opacity: 0; transform: translateY(-10px); transition: opacity 0.4s ease, transform 0.4s ease; }

/* Documents: compact ID-card box (tap to upload) with a capture strip below it */
#pane-docs .pane-header { padding: 0.75rem 1.1rem !important; margin-bottom: 0.75rem !important; }
#pane-docs .pane-header h1 { font-size: 1.1rem !important; margin: 0 !important; }
#pane-docs .pane-header p { font-size: 0.82rem !important; margin-top: 0.2rem !important; }
#pane-docs .upload-box, #pane-docs .upload-box:hover { background: transparent !important; box-shadow: none !important; padding: 0 !important; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; }
.id-card { position: relative; width: min(100%, 360px); aspect-ratio: 1.586 / 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.35rem; padding: 0.75rem; text-align: center; background: var(--field-bg); border: 2px dashed rgba(108, 71, 232, 0.45); border-radius: 16px; cursor: pointer; transition: background 0.2s, border-color 0.2s; }
.id-card:hover { background: var(--hover-bg); border-color: var(--primary); }
#pane-docs .id-card > i { font-size: 2.4rem; color: var(--primary); margin: 0; height: auto; width: auto; background: none; display: block; }
.id-card h4 { font-size: 0.95rem; font-weight: 700; color: var(--text); word-break: break-word; }
.id-card-sub { font-size: 0.78rem; color: var(--text-muted); }
.id-card input { display: none; }
#pane-docs .upload-box.error-box .id-card { border-color: var(--danger); background: rgba(239, 68, 68, 0.08); }
#pane-docs .capture-strip { width: min(100%, 360px); min-height: 44px; margin-top: 0.6rem; padding: 0.6rem 1rem !important; border-radius: 12px; font-size: 0.95rem; order: 0; }
#pane-docs .capture-strip i { font-size: 1rem; color: #fff; margin: 0; }

/* Card window only: everything outside the frame is hidden */
.dc-guide { box-shadow: 0 0 0 9999px #0b0b14; }

/* Documents: no step bar; back side shows only Upload when the front was uploaded */
#pane-docs .doc-step { display: none !important; }
#pane-docs[data-mode="upload"] #box-back .capture-strip { display: none !important; }

/* Country search */
.cs-wrap { position: relative; }
.cs-list { display: none; position: absolute; left: 0; right: 0; top: 100%; z-index: 50; margin-top: 4px; max-height: 240px; overflow-y: auto; background: var(--card-bg, #fff); border-radius: 12px; box-shadow: 0 8px 28px rgba(76, 48, 160, 0.18); }
.cs-item, .cs-none { padding: 0.7rem 1rem; font-size: 0.95rem; cursor: pointer; }
.cs-item:hover { background: var(--hover-bg); }
.cs-none { color: var(--text-muted); cursor: default; }

/* ID scan camera: box is exactly the card frame, no black area */
.dc-stage { background: transparent; }

/* ID scan camera replaces the dashed card box in place */
#pane-docs .upload-box.cam-open .id-card, #pane-docs .upload-box.cam-open .capture-strip { display: none !important; }
.dc-overlay.dc-inline { position: static; inset: auto; z-index: auto; background: transparent; padding: 0; display: block; width: min(100%, 360px); }
.dc-overlay.dc-inline .dc-sheet { width: 100%; max-width: none; box-shadow: none; padding: 0; background: transparent; }
.dc-overlay.dc-inline .dc-title { display: none; }
.dc-overlay.dc-inline .dc-top { margin-bottom: 0.4rem; }

/* Face check: no box, only the oval is visible */
.cam-viewport { border: none !important; background: transparent !important; border-radius: 0 !important; }

/* ID scan camera stage: size comes from CSS, video fills it */
.dc-overlay.dc-inline .dc-stage { position: relative !important; display: block !important; width: 100%; max-width: 360px; aspect-ratio: 1.586 / 1; min-height: 120px; background: #000 !important; overflow: hidden; border-radius: 12px; margin: 0 auto; }
.dc-overlay.dc-inline .dc-stage .dc-video { position: absolute !important; inset: 0; width: 100% !important; height: 100% !important; max-width: none !important; object-fit: cover !important; transform: none !important; display: block !important; }
.dc-overlay.dc-inline .dc-stage .dc-guide { position: absolute !important; inset: 0; }
.dc-overlay.dc-inline, .dc-overlay.dc-inline .dc-sheet { display: block !important; }

/* ID scan: no progress bar */
.dc-overlay .dc-bar { display: none; }
