.face-capture-dialog {
  width: min(92vw, 520px);
  max-height: 94vh;
  margin: auto;
  padding: 0;
  overflow: auto;
  border: 0;
  border-radius: 18px;
  background: #fff;
  color: #17213a;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .3);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.face-capture-dialog::backdrop { background: rgba(10, 18, 31, .76); }
.face-capture-card { margin: 0; padding: 20px; background: #fff; }
.face-capture-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.face-capture-head h2 { margin: 0 0 4px; color: #17213a; font-size: 20px; }
.face-capture-head p { margin: 0; color: #758197; font-size: 14px; line-height: 1.45; }
.fcp-close { width: 38px; height: 38px; display: grid; flex: 0 0 auto; place-items: center; padding: 0; border: 1px solid #d9e1ec; border-radius: 12px; background: #fff; color: #17213a; font-size: 24px; line-height: 1; cursor: pointer; }
.camera-frame { position: relative; overflow: hidden; aspect-ratio: 1 / 1; background: #101214; border-radius: 14px; }
.camera-frame[hidden] { display: none; }
.camera-frame video { width: 100%; height: 100%; display: block; object-fit: cover; transform: scaleX(-1); }
.face-guide { position: absolute; inset: 14% 21%; border: 3px solid rgba(255, 183, 3, .95); border-radius: 50%; box-shadow: 0 0 0 999px rgba(0, 0, 0, .22); transition: border-color .3s, box-shadow .3s; }
.face-guide.face-detected { border-color: #16a34a; box-shadow: 0 0 0 999px rgba(0, 0, 0, .22), 0 0 0 4px rgba(22, 163, 74, .35); }
.face-guide.liveness-confirmed { border-color: #22c55e; box-shadow: 0 0 0 999px rgba(0, 0, 0, .18), 0 0 0 6px rgba(34, 197, 94, .42); }
.capture-status-label { position: absolute; right: 16px; bottom: 22px; left: 16px; padding: 9px 12px; border-radius: 8px; background: rgba(0, 0, 0, .72); color: #fff; font-size: 13px; text-align: center; }
.fcp-hold-bar { position: absolute; bottom: 0; left: 0; width: 0; height: 5px; background: #16a34a; transition: width .1s linear; }
.phone-camera-btn, .fcp-alternative-clockin, .capture-button { width: 100%; min-height: 46px; margin-top: 10px; padding: 10px 14px; border-radius: 12px; font: inherit; font-size: 13px; font-weight: 800; cursor: pointer; }
.phone-camera-btn { border: 1.5px dashed #c9d3e2; background: #fff; color: #41516b; }
.phone-camera-btn:hover { border-color: #f59e0b; color: #9a6200; background: #fffbeb; }
.phone-camera-btn:disabled, .fcp-alternative-clockin:disabled { opacity: .6; cursor: wait; }
.phone-camera-btn[hidden], .fcp-alternative-clockin[hidden] { display: none; }
.fcp-alternative-clockin { border: 1px solid #f59e0b; background: #fffbeb; color: #92400e; }
.phone-panel { display: flex; flex-direction: column; align-items: center; gap: 10px; width: 100%; padding: 4px 0 8px; }
.phone-panel[hidden], .fcp-verify-phase[hidden], .fcp-result-phase[hidden] { display: none; }
.phone-panel-title { margin: 0; color: #17213a; font-size: 14px; font-weight: 800; text-align: center; }
.phone-qr-block { display: inline-flex; padding: 10px; border-radius: 12px; background: #fff; box-shadow: 0 2px 12px rgba(0, 0, 0, .12); }
.phone-qr-img { width: 180px; height: 180px; display: block; }
.phone-panel-url { max-width: 100%; margin: 0; padding: 4px 7px; overflow-wrap: anywhere; border-radius: 5px; background: #fff8e5; color: #9a6200; font-size: 11px; text-align: center; cursor: pointer; }
.phone-panel-status { display: flex; align-items: center; gap: 8px; color: #758197; font-size: 13px; }
.phone-spinner { width: 14px; height: 14px; display: inline-block; flex: 0 0 auto; border: 2px solid #d9e1ec; border-top-color: #f59e0b; border-radius: 50%; animation: staffy-phone-spin .8s linear infinite; }
@keyframes staffy-phone-spin { to { transform: rotate(360deg); } }
.phone-timer { color: #758197; font-size: 12px; }
.phone-back-btn, .fcp-time-correction-link { padding: 4px 8px; border: 0; background: none; color: #234c78; font: inherit; font-size: 12px; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.fcp-verify-phase, .fcp-result-phase { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 20px 4px 4px; text-align: center; }
.fcp-selfie-thumb { width: 80px; height: 80px; flex: 0 0 auto; object-fit: cover; border: 3px solid #e3e9f1; border-radius: 50%; }
.fcp-verify-label, .fcp-result-msg { margin: 0; color: #41516b; font-size: 15px; text-align: center; }
.fcp-progress-bar { width: 100%; height: 8px; overflow: hidden; border-radius: 4px; background: #e3e9f1; }
.fcp-progress-fill { width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #16a34a, #22c55e); transition: width .2s ease; }
.fcp-result-icon { font-size: 56px; font-weight: 900; line-height: 1; }
.fcp-icon-success { color: #16a34a; }
.fcp-icon-error { color: #dc2626; }
.capture-button { border: 0; background: #173f6b; color: #fff; }
.fcp-time-correction-link { margin-top: 2px; }

@media (max-width: 640px) {
  .face-capture-dialog { width: 100vw; max-width: none; max-height: 96vh; margin: auto 0 0; border-radius: 20px 20px 0 0; }
  .face-capture-card { padding: 16px; }
  .face-capture-head h2 { font-size: 18px; }
}
