/* =========================================================
   BFA Tasks — sign-in page. Dark only, on purpose.
   Hyper-responsive, modern glassmorphic styling.
   ========================================================= */

[x-cloak] { display: none !important; }

/* ---------- ambient background ---------- */

.bfa-grid {
  background-image:
    linear-gradient(rgba(255, 255, 255, .025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .025) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 85% 65% at 50% 40%, #000 35%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 85% 65% at 50% 40%, #000 35%, transparent 100%);
}

@media (max-width: 480px) {
  .bfa-grid {
    background-size: 32px 32px;
  }
}

/* ---------- fields ---------- */

.fld-l {
  display: block;
  margin-bottom: 6px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: -.005em;
  color: #C6CBD2;
}

.fld-wrap { position: relative; display: block; }

.fld {
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid #262A31;
  background: #101318;
  color: #F3F5F7;
  font: inherit;
  font-size: 16px; /* 16px on mobile prevents iOS viewport auto-zoom */
  font-weight: 500;
  outline: none;
  transition: border-color .16s ease, box-shadow .16s ease, background-color .16s ease;
}

@media (min-width: 640px) {
  .fld {
    font-size: 13.5px;
    padding: 11px 13px;
  }
}

.fld::placeholder { color: #6B7280; font-weight: 500; }

/* solid primary stroke on focus — crisp feedback */
.fld:focus {
  border-color: var(--brand, #F0532B);
  box-shadow: inset 0 0 0 1px var(--brand, #F0532B), 0 0 0 3px rgba(var(--brand-rgb, 240 83 43) / .12);
  background: #0D1015;
}

.fld-i {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: #6B7280;
  pointer-events: none;
  transition: color .16s ease;
}
.fld-ico { padding-left: 38px; }
.fld-wrap:focus-within .fld-i { color: var(--brand, #F0532B); }

.fld-eye {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  color: #6B7280;
  transition: color .16s ease, background-color .16s ease;
}
.fld-eye:hover { color: #F3F5F7; background: #1D2026; }

/* ---------- one-time code (ultra-responsive 6-box) ---------- */

.otp-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  width: 100%;
}

.otp-box {
  flex: 1 1 0%;
  min-width: 32px;
  max-width: 50px;
  height: 52px;
  border-radius: 12px;
  border: 1.5px solid #262A31;
  background: #101318;
  text-align: center;
  font-size: 20px;
  font-weight: 800;
  color: #F3F5F7;
  outline: none;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

@media (min-width: 380px) {
  .otp-container { gap: 8px; }
  .otp-box { height: 56px; font-size: 22px; border-radius: 14px; }
}

.otp-box:focus {
  border-color: var(--brand, #F0532B);
  box-shadow: inset 0 0 0 1px var(--brand, #F0532B), 0 0 0 4px rgba(var(--brand-rgb, 240 83 43) / .14);
  transform: translateY(-1px);
}

/* ---------- buttons ---------- */

.btn-primary {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 46px;
  height: 48px;
  border-radius: 14px;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: -.005em;
  color: #fff;
  background: linear-gradient(97deg, #FF8A4B 0%, #F4602F 52%, #EE4720 100%);
  box-shadow: 0 6px 22px rgba(var(--brand-rgb, 240 83 43) / .35);
  transition: filter .16s ease, transform .1s ease, opacity .16s ease, box-shadow .16s ease;
  touch-action: manipulation;
}
.btn-primary:hover:not(:disabled) { filter: brightness(1.08); box-shadow: 0 8px 26px rgba(var(--brand-rgb, 240 83 43) / .42); }
.btn-primary:active:not(:disabled) { transform: translateY(1px); }
.btn-primary:disabled { opacity: .45; box-shadow: none; cursor: not-allowed; }

.btn-ghost {
  display: grid;
  place-items: center;
  min-height: 44px;
  height: 46px;
  border-radius: 14px;
  border: 1px solid #262A31;
  font-size: 13px;
  font-weight: 700;
  color: #C6CBD2;
  transition: background-color .16s ease, color .16s ease, transform .1s ease;
  touch-action: manipulation;
}
.btn-ghost:hover { background: #1D2026; color: #F3F5F7; }
.btn-ghost:active { transform: translateY(1px); }

.spinner {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .35);
  border-top-color: #fff;
  animation: bfa-spin .6s linear infinite;
}
@keyframes bfa-spin { to { transform: rotate(360deg); } }

/* ---------- entrance & keyframes ---------- */

@keyframes bfa-rise {
  from { opacity: 0; transform: translateY(14px) scale(.985); }
  to   { opacity: 1; transform: none; }
}
.rise {
  animation: bfa-rise .55s cubic-bezier(.22, .68, .28, 1) both;
  animation-delay: var(--d, 0ms);
}

.bfa-pulse::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 9999px;
  border: 2px solid rgba(245, 158, 11, .5);
  animation: bfa-pulse 1.9s cubic-bezier(.22, .72, .24, 1) infinite;
}
@keyframes bfa-pulse {
  0%   { transform: scale(1);   opacity: .8; }
  70%  { transform: scale(1.4); opacity: 0; }
  100% { transform: scale(1.4); opacity: 0; }
}

.bfa-pulse-info::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 9999px;
  border: 2px solid rgba(46, 125, 246, .5);
  animation: bfa-pulse 1.9s cubic-bezier(.22, .72, .24, 1) infinite;
}

@media (prefers-reduced-motion: reduce) {
  .rise, .spinner, .bfa-pulse::after, .bfa-pulse-info::after { animation: none; }
}
