.biometric-flow-screen {
  position: relative;
  padding: 18px 16px 16px;
  background:
    linear-gradient(rgba(116, 147, 171, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(116, 147, 171, 0.045) 1px, transparent 1px),
    radial-gradient(circle at 50% 38%, #18334c, #081522 64%);
  background-size: 22px 22px, 22px 22px, auto;
}

.bio-flow-header,
.bio-flow-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  text-transform: uppercase;
}

.bio-flow-header {
  min-height: 24px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(116, 147, 171, 0.2);
}

.bio-flow-kicker {
  color: var(--orange-500);
  font-size: 0.48rem;
  font-weight: 850;
  letter-spacing: 0.12em;
}

.bio-flow-step {
  color: #698197;
  font-size: 0.47rem;
  font-weight: 760;
  letter-spacing: 0.08em;
}

.bio-flow-stage {
  display: grid;
  place-items: center;
  height: 420px;
}

.bio-flow-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  min-height: 330px;
  padding: 24px 16px 20px;
  background: rgba(5, 19, 31, 0.78);
  border: 1px solid rgba(95, 126, 151, 0.28);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.015);
}

.bio-flow-panel::before,
.bio-flow-panel::after {
  position: absolute;
  width: 14px;
  height: 14px;
  content: "";
  pointer-events: none;
}

.bio-flow-panel::before {
  top: -1px;
  left: -1px;
  border-top: 1px solid var(--orange-500);
  border-left: 1px solid var(--orange-500);
}

.bio-flow-panel::after {
  right: -1px;
  bottom: -1px;
  border-right: 1px solid rgba(105, 132, 154, 0.62);
  border-bottom: 1px solid rgba(105, 132, 154, 0.62);
}

.bio-flow-panel.is-success {
  border-color: rgba(77, 211, 145, 0.38);
  box-shadow: inset 0 0 24px rgba(77, 211, 145, 0.035);
}

.bio-flow-panel.is-success::before {
  border-color: #4dd391;
}

.bio-panel-index {
  position: absolute;
  top: 9px;
  right: 10px;
  color: #496176;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.48rem;
  font-weight: 850;
  letter-spacing: 0.08em;
}

.bio-panel-heading {
  display: grid;
  gap: 6px;
  margin-bottom: 26px;
}

.bio-panel-heading small {
  color: #667e92;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.48rem;
  font-weight: 820;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.bio-panel-heading strong {
  color: #edf4f8;
  font-size: 0.94rem;
  font-weight: 720;
  line-height: 1.2;
}

.bio-field {
  display: grid;
  gap: 7px;
}

.bio-field > span {
  color: #71879a;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.48rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.bio-field-value {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 11px;
  color: #dce6ed;
  background: rgba(9, 30, 47, 0.82);
  border: 1px solid #2d4b62;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.74rem;
  font-weight: 720;
  letter-spacing: 0.04em;
}

.bio-field-value.is-typing::after {
  width: 1px;
  height: 16px;
  margin-left: 3px;
  background: var(--orange-500);
  content: "";
  animation: bioCaret 720ms steps(1) infinite;
}

.bio-flow-button {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 41px;
  width: 100%;
  margin-top: 16px;
  padding: 0 12px;
  color: #fff1e7;
  background: rgba(255, 100, 0, 0.1);
  border: 1px solid rgba(255, 100, 0, 0.65);
  border-radius: 0 !important;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.48rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  pointer-events: none;
}

.bio-flow-button > span:not(.bio-click-target) {
  color: var(--orange-500);
  font-size: 0.72rem;
}

.bio-flow-loader {
  display: grid;
  gap: 10px;
  margin-top: 22px;
}

.bio-flow-loader strong {
  color: #a9bac7;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.5rem;
  font-weight: 720;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.bio-loader-bars {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
}

.bio-loader-bars i {
  height: 6px;
  background: #27465f;
  animation: bioLoadBar 900ms ease-in-out infinite;
}

.bio-loader-bars i:nth-child(2) { animation-delay: 100ms; }
.bio-loader-bars i:nth-child(3) { animation-delay: 200ms; }
.bio-loader-bars i:nth-child(4) { animation-delay: 300ms; }

.bio-flow-confirm {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  margin-top: 18px;
  padding: 0 10px;
  color: #86e5b3;
  background: rgba(77, 211, 145, 0.07);
  border-left: 2px solid #4dd391;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  text-transform: uppercase;
}

.bio-flow-confirm > span {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1px solid rgba(77, 211, 145, 0.48);
}

.bio-flow-confirm svg,
.bio-complete-icon svg,
.bio-face-status span svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.bio-flow-confirm strong {
  font-size: 0.48rem;
  font-weight: 820;
  letter-spacing: 0.07em;
}

.bio-location-panel .bio-panel-heading {
  margin-bottom: 18px;
}

.bio-location-icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 74px;
  height: 74px;
  margin: 2px auto 14px;
  color: var(--orange-500);
  background: rgba(255, 100, 0, 0.045);
  border: 1px solid rgba(255, 100, 0, 0.4);
}

.bio-location-icon::before,
.bio-location-icon::after {
  position: absolute;
  background: rgba(255, 100, 0, 0.55);
  content: "";
}

.bio-location-icon::before {
  width: 92px;
  height: 1px;
}

.bio-location-icon::after {
  width: 1px;
  height: 92px;
}

.bio-location-icon svg {
  position: relative;
  z-index: 2;
  width: 31px;
  height: 31px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.45;
}

.bio-location-icon > i {
  position: absolute;
  inset: -10px;
  border: 1px solid rgba(255, 100, 0, 0.2);
  opacity: 0;
}

.bio-location-icon > i:nth-of-type(2) {
  inset: -20px;
}

.bio-location-icon.is-loading > i {
  animation: bioRadar 1.35s ease-out infinite;
}

.bio-location-icon.is-loading > i:nth-of-type(2) {
  animation-delay: 430ms;
}

.bio-location-icon.is-success {
  color: #6fe1a5;
  background: rgba(77, 211, 145, 0.07);
  border-color: rgba(77, 211, 145, 0.52);
}

.bio-location-icon.is-success::before,
.bio-location-icon.is-success::after {
  background: rgba(77, 211, 145, 0.42);
}

.bio-location-button {
  justify-content: center;
  overflow: visible;
}

.bio-click-target {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 16px;
  border: 1px solid #f6d1b8;
  border-radius: 50%;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.45);
}

.bio-location-button.is-clicking {
  color: #fff;
  background: rgba(255, 100, 0, 0.19);
  box-shadow: 0 0 18px rgba(255, 100, 0, 0.13);
}

.bio-location-button.is-clicking .bio-click-target {
  animation: bioClick 820ms ease-out both;
}

.bio-face-panel .bio-panel-heading {
  margin-bottom: 13px;
  text-align: center;
}

.bio-face-oval {
  position: relative;
  display: grid;
  place-items: center;
  width: 128px;
  height: 176px;
  margin: 0 auto 15px;
  overflow: hidden;
  color: #9fb0bd;
  background:
    linear-gradient(rgba(113, 144, 168, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(113, 144, 168, 0.055) 1px, transparent 1px),
    rgba(7, 24, 38, 0.9);
  background-size: 16px 16px;
  border: 1px solid rgba(118, 151, 176, 0.45);
  border-radius: 48% 48% 45% 45% / 42% 42% 58% 58%;
}

.bio-face-icon svg {
  width: 72px;
  height: 72px;
  fill: none;
  stroke: currentColor;
  stroke-width: 0.9;
}

.bio-face-scan {
  position: absolute;
  left: 12px;
  right: 12px;
  top: 18px;
  height: 1px;
  background: var(--orange-500);
  box-shadow: 0 0 10px rgba(255, 100, 0, 0.82);
  opacity: 0;
}

.bio-face-panel.is-scanning .bio-face-oval {
  color: #d2dde5;
  border-color: rgba(255, 100, 0, 0.58);
  box-shadow: inset 0 0 28px rgba(255, 100, 0, 0.045), 0 0 18px rgba(255, 100, 0, 0.06);
}

.bio-face-panel.is-scanning .bio-face-scan {
  opacity: 1;
  animation: bioFaceScan 2.4s ease-in-out infinite;
}

.bio-face-panel.is-success .bio-face-oval {
  color: #75dca6;
  border-color: rgba(77, 211, 145, 0.62);
  box-shadow: inset 0 0 28px rgba(77, 211, 145, 0.045), 0 0 20px rgba(77, 211, 145, 0.07);
}

.bio-face-mark {
  position: absolute;
  width: 12px;
  height: 12px;
  border-color: rgba(255, 100, 0, 0.68);
  border-style: solid;
}

.bio-face-mark-a { top: 11px; left: 13px; border-width: 1px 0 0 1px; }
.bio-face-mark-b { top: 11px; right: 13px; border-width: 1px 1px 0 0; }
.bio-face-mark-c { bottom: 11px; left: 13px; border-width: 0 0 1px 1px; }
.bio-face-mark-d { right: 13px; bottom: 11px; border-width: 0 1px 1px 0; }

.bio-face-panel.is-success .bio-face-mark {
  border-color: rgba(77, 211, 145, 0.7);
}

.bio-face-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #8da0af;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  text-transform: uppercase;
}

.bio-face-status > i {
  width: 6px;
  height: 6px;
  background: var(--orange-500);
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(255, 100, 0, 0.6);
  animation: bioStatusPulse 1s ease-in-out infinite;
}

.bio-face-status strong {
  font-size: 0.47rem;
  font-weight: 780;
  letter-spacing: 0.06em;
}

.bio-face-status.is-success {
  color: #74dca6;
}

.bio-face-status.is-success > span {
  display: grid;
  place-items: center;
  width: 21px;
  height: 21px;
  border: 1px solid rgba(77, 211, 145, 0.52);
}

.bio-complete-panel {
  align-items: center;
  text-align: center;
}

.bio-complete-icon {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  margin-bottom: 18px;
  color: #07131f;
  background: #4dd391;
  border: 1px solid #77e7ad;
  box-shadow: 0 0 28px rgba(77, 211, 145, 0.18);
}

.bio-complete-icon svg {
  width: 30px;
  height: 30px;
  stroke-width: 1.8;
}

.bio-complete-panel > small {
  margin-bottom: 7px;
  color: #6f9f86;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.48rem;
  font-weight: 850;
  letter-spacing: 0.09em;
}

.bio-complete-panel > strong {
  color: #e9fff3;
  font-size: 0.95rem;
}

.bio-complete-panel > p {
  max-width: 170px;
  margin: 8px auto 16px;
  color: #779188;
  font-size: 0.58rem;
  line-height: 1.45;
}

.bio-complete-code {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #668273;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.46rem;
  letter-spacing: 0.07em;
}

.bio-complete-code > span {
  width: 6px;
  height: 6px;
  background: #4dd391;
  box-shadow: 0 0 8px rgba(77, 211, 145, 0.7);
}

.bio-flow-progress {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
  padding-top: 10px;
  border-top: 1px solid rgba(116, 147, 171, 0.18);
}

.bio-flow-progress i {
  height: 3px;
  background: #203b51;
  transition: background 220ms ease, box-shadow 220ms ease;
}

.bio-flow-progress i.is-active {
  background: var(--orange-500);
  box-shadow: 0 0 8px rgba(255, 100, 0, 0.35);
}

.bio-flow-progress i.is-complete {
  background: #4dd391;
  box-shadow: 0 0 8px rgba(77, 211, 145, 0.2);
}

.bio-flow-footer {
  min-height: 21px;
  padding-top: 9px;
  color: #526b80;
  font-size: 0.41rem;
  font-weight: 760;
  letter-spacing: 0.08em;
}

.bio-flow-footer span:last-child {
  color: #708ba0;
}

@keyframes bioCaret {
  0%, 48% { opacity: 1; }
  49%, 100% { opacity: 0; }
}

@keyframes bioLoadBar {
  0%, 100% { background: #27465f; transform: scaleY(0.65); }
  50% { background: var(--orange-500); transform: scaleY(1); }
}

@keyframes bioRadar {
  0% { opacity: 0.55; transform: scale(0.76); }
  100% { opacity: 0; transform: scale(1.2); }
}

@keyframes bioClick {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.35); }
  28% { opacity: 1; transform: translate(-50%, -50%) scale(0.7); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(2.8); }
}

@keyframes bioFaceScan {
  0%, 100% { transform: translateY(0); opacity: 0.35; }
  50% { transform: translateY(138px); opacity: 1; }
}

@keyframes bioStatusPulse {
  0%, 100% { opacity: 0.4; transform: scale(0.78); }
  50% { opacity: 1; transform: scale(1.16); }
}

@media (max-width: 430px) {
  .bio-flow-panel {
    padding-inline: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bio-field-value.is-typing::after,
  .bio-loader-bars i,
  .bio-location-icon.is-loading > i,
  .bio-location-button.is-clicking .bio-click-target,
  .bio-face-panel.is-scanning .bio-face-scan,
  .bio-face-status > i {
    animation: none !important;
  }
}
