:root {
  --ff-blue: #0071e3;
  --ff-blue-hover: #005bbf;
  --ff-white: #f5f5f7;
  --ff-muted: rgba(245, 245, 247, 0.62);
  --ff-border: rgba(255, 255, 255, 0.11);
  --ff-panel: rgba(0, 0, 0, 0.72);
}

.ff-shell-header,
.ff-shell-footer,
.ff-flow-progress {
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

.ff-shell-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 1000;
  border-bottom: 1px solid var(--ff-border);
  background: rgba(0, 0, 0, 0.76);
  backdrop-filter: blur(22px);
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.32);
}

.ff-shell-header-inner {
  position: relative;
  width: min(100% - 32px, 1440px);
  min-height: 74px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.ff-shell-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  flex: none;
  text-decoration: none;
}

.ff-shell-logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 0 18px rgba(0, 113, 227, 0.42));
}

.ff-shell-nav {
  display: flex;
  align-items: center;
  gap: clamp(18px, 3vw, 42px);
}

.ff-shell-nav a {
  color: rgba(245, 245, 247, 0.62);
  font-size: 0.94rem;
  font-weight: 800;
  text-decoration: none;
  transition: color 0.24s ease, transform 0.24s ease;
}

.ff-shell-nav a:hover,
.ff-shell-nav a.is-active {
  color: #fff;
  transform: translateY(-1px);
}

.ff-shell-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
}

.ff-language-control {
  display: inline-flex !important;
  align-items: center;
  gap: 0.34rem;
  min-height: 2.22rem;
  padding: 0.18rem 0.32rem 0.18rem 0.62rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 9999px;
  color: rgba(245, 245, 247, 0.82);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(16px);
  white-space: nowrap;
  flex: none;
}

.ff-language-control span {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1;
}

.ff-language-control select {
  height: 1.78rem;
  min-width: 9.2rem;
  max-width: 10.8rem;
  border: 0;
  outline: 0;
  border-radius: 9999px;
  padding: 0 1.35rem 0 0.62rem;
  color: #fff;
  background: linear-gradient(180deg, rgba(0, 113, 227, 0.95), rgba(0, 91, 191, 0.95));
  font-weight: 700;
  font-size: 0.72rem;
  line-height: 1;
  cursor: pointer;
  appearance: auto;
}

.ff-language-control select option {
  color: #111;
  background: #fff;
}

.ff-shell-login {
  color: rgba(245, 245, 247, 0.54);
  font-size: 0.9rem;
  font-weight: 850;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.24s ease;
}

.ff-shell-login:hover {
  color: #fff;
}

.ff-shell-menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  cursor: pointer;
}

.ff-shell-menu-toggle span {
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: var(--ff-blue);
  box-shadow: 0 0 14px rgba(0, 113, 227, 0.45);
  transition: transform 0.24s ease, opacity 0.24s ease;
}

.ff-shell-menu-toggle.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.ff-shell-menu-toggle.is-open span:nth-child(2) {
  opacity: 0;
}

.ff-shell-menu-toggle.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.ff-shell-mobile-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(280px, calc(100vw - 32px));
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  background: rgba(4, 8, 17, 0.96);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.52), 0 0 36px rgba(0, 113, 227, 0.12);
  backdrop-filter: blur(22px);
}

.ff-shell-mobile-menu[hidden] {
  display: none !important;
}

.ff-shell-mobile-menu a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 12px;
  color: rgba(245, 245, 247, 0.72);
  font-size: 0.92rem;
  font-weight: 850;
  text-decoration: none;
}

.ff-shell-mobile-menu a:hover,
.ff-shell-mobile-menu a.is-active {
  color: #fff;
  background: rgba(0, 113, 227, 0.14);
}

.ff-shell-button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.68rem 1.18rem;
  border: 1px solid rgba(0, 113, 227, 0.9);
  border-radius: 999px;
  color: #fff;
  background: var(--ff-blue);
  font-weight: 850;
  text-decoration: none;
  box-shadow: 0 18px 38px rgba(0, 113, 227, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.22);
  transition: transform 0.24s ease, background 0.24s ease, box-shadow 0.24s ease;
}

.ff-shell-button:hover {
  background: var(--ff-blue-hover);
  transform: translateY(-2px);
  box-shadow: 0 22px 46px rgba(0, 113, 227, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.ff-shell-footer {
  position: relative;
  z-index: 20;
  border-top: 1px solid var(--ff-border);
  background: rgba(0, 0, 0, 0.86);
  backdrop-filter: blur(18px);
}

.ff-shell-footer-inner {
  width: min(100% - 32px, 1440px);
  margin: 0 auto;
  padding: 64px 0 34px;
  display: grid;
  grid-template-columns: minmax(280px, 1.45fr) minmax(180px, 0.6fr) minmax(220px, 0.8fr);
  gap: 44px;
}

.ff-shell-footer-copy {
  max-width: 430px;
  margin: 22px 0 28px;
  color: var(--ff-muted);
  font-size: 1rem;
  font-weight: 650;
  line-height: 1.7;
}

.ff-shell-socials {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.ff-shell-socials a {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(120, 160, 255, 0.24);
  border-radius: 999px;
  color: rgba(245, 245, 247, 0.78);
  background: rgba(0, 113, 227, 0.1);
  text-decoration: none;
  transition: transform 0.24s ease, border-color 0.24s ease, color 0.24s ease;
}

.ff-shell-socials a:hover {
  color: #fff;
  border-color: rgba(0, 113, 227, 0.72);
  transform: translateY(-2px);
}

.ff-shell-footer h4 {
  margin: 0 0 24px;
  color: #fff;
  font-size: 0.92rem;
  font-weight: 820;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 0.62rem;
}

.ff-shell-footer h4::before,
.ff-shell-footer li a::before {
  content: "";
  flex: none;
  border-radius: 999px;
  background: linear-gradient(135deg, #0a84ff 0%, #5e5ce6 28%, #bf5af2 54%, #ff375f 76%, #ff6a00 100%);
  box-shadow: 0 0 16px rgba(10, 132, 255, 0.28), 0 0 22px rgba(191, 90, 242, 0.18);
}

.ff-shell-footer h4::before {
  width: 0.58rem;
  height: 0.58rem;
}

.ff-shell-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 15px;
}

.ff-shell-footer li a {
  display: flex;
  align-items: center;
  gap: 0.64rem;
  color: rgba(245, 245, 247, 0.58);
  font-size: 0.94rem;
  font-weight: 560;
  text-decoration: none;
  transition: color 0.24s ease, transform 0.24s ease;
}

.ff-shell-footer li a::before {
  width: 0.46rem;
  height: 0.46rem;
  opacity: 0.95;
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.ff-shell-footer li a:hover {
  color: #fff;
  transform: translateX(2px);
}

.ff-shell-footer li a:hover::before {
  transform: scale(1.35);
  box-shadow: 0 0 18px rgba(10, 132, 255, 0.44), 0 0 30px rgba(255, 55, 95, 0.22);
}

.ff-shell-footer-bottom {
  width: min(100% - 32px, 1440px);
  margin: 0 auto;
  padding: 28px 0 38px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.ff-shell-footer-bottom p {
  margin: 0;
  color: rgba(245, 245, 247, 0.5);
  font-size: 0.9rem;
  font-weight: 560;
}

.ff-shell-status {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--ff-blue);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.75rem;
  font-weight: 850;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.ff-shell-status::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--ff-blue);
  box-shadow: 0 0 18px rgba(0, 113, 227, 0.8);
}

.ff-flow-progress {
  position: relative;
  z-index: 9;
  width: min(100% - 32px, 1320px);
  margin: 0 auto;
  padding: 116px 0 22px;
}

.ff-flow-progress.is-compact {
  padding-bottom: 8px;
}

.ff-flow-heading {
  display: none;
}

.ff-flow-heading span {
  color: rgba(245, 245, 247, 0.58);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.ff-flow-heading strong {
  color: #fff;
  font-size: 0.9rem;
  font-weight: 850;
}

.ff-flow-steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(16px, 4vw, 64px);
  align-items: start;
}

.ff-flow-steps::before {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  top: 48px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.12), transparent);
}

.ff-flow-step {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 18px;
  text-align: center;
}

.ff-flow-step-icon {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  width: clamp(76px, 7vw, 96px);
  height: clamp(76px, 7vw, 96px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(126, 145, 220, 0.26);
  border-radius: clamp(22px, 2vw, 28px);
  color: #fff;
  background:
    radial-gradient(circle at 26% 16%, rgba(255, 255, 255, 0.12), transparent 28%),
    linear-gradient(145deg, rgba(31, 42, 80, 0.88), rgba(8, 12, 31, 0.96));
  font-size: clamp(2rem, 3vw, 2.8rem);
  font-weight: 900;
  box-shadow:
    0 24px 56px rgba(0, 0, 0, 0.42),
    0 18px 46px rgba(0, 113, 227, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.ff-flow-step-icon > span {
  position: relative;
  z-index: 2;
}

.ff-flow-step-icon::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
  padding: 2px;
  background: conic-gradient(from 0deg, transparent 0 74%, #0a84ff 78%, #bf5af2 84%, #ff375f 90%, #ff6a00 96%, transparent 100%);
  opacity: 0;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: ffFlowBorderSpin 2.4s linear infinite;
}

.ff-flow-step.is-active .ff-flow-step-icon {
  background: linear-gradient(180deg, #1688f6, #0071e3);
  border-color: rgba(10, 132, 255, 0.66);
  box-shadow:
    0 26px 58px rgba(0, 113, 227, 0.32),
    0 18px 46px rgba(0, 0, 0, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.ff-flow-step.is-active .ff-flow-step-icon::after {
  opacity: 1;
}

.ff-flow-step.is-done .ff-flow-step-icon {
  color: #fff;
  background:
    radial-gradient(circle at 26% 16%, rgba(255, 255, 255, 0.12), transparent 28%),
    linear-gradient(145deg, rgba(31, 42, 80, 0.88), rgba(8, 12, 31, 0.96));
}

.ff-flow-step:last-child .ff-flow-step-icon {
  border-color: rgba(10, 132, 255, 0.48);
  background: linear-gradient(180deg, #1688f6, #0071e3);
  box-shadow:
    0 26px 58px rgba(0, 113, 227, 0.32),
    0 18px 46px rgba(0, 0, 0, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.ff-flow-step small {
  max-width: 190px;
  color: #f5f5f7;
  font-size: clamp(1rem, 1.3vw, 1.22rem);
  font-weight: 900;
  line-height: 1.25;
}

.ff-flow-step.is-active small {
  color: #fff;
}

.payment-flow-card.is-active {
  color: #fff !important;
  background: radial-gradient(circle at 24% 14%, rgba(255,255,255,.13), transparent 27%), linear-gradient(145deg, rgba(28,38,74,.82), rgba(6,10,28,.97)) !important;
  border-color: rgba(111, 134, 224, 0.48) !important;
  box-shadow: 0 28px 64px rgba(0, 0, 0, 0.5), 0 20px 52px rgba(0, 113, 227, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.14) !important;
}

.payment-flow-card.is-done {
  color: #fff !important;
  background: radial-gradient(circle at 24% 14%, rgba(255,255,255,.13), transparent 27%), linear-gradient(145deg, rgba(28,38,74,.82), rgba(6,10,28,.97)) !important;
  border-color: rgba(139, 155, 255, 0.24) !important;
}

.payment-flow-card.is-active p {
  color: #fff !important;
}

.payment-flow-grid {
  position: relative !important;
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: clamp(1rem, 2vw, 2rem) !important;
  align-items: start !important;
}

.payment-flow-grid::before {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  top: clamp(2.5rem, 3.5vw, 3rem);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.12), transparent);
}

.payment-flow-card {
  min-height: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  text-align: center !important;
}

.payment-flow-card > .payment-border-runner {
  display: none !important;
}

.payment-flow-card b {
  position: relative !important;
  overflow: hidden !important;
  isolation: isolate !important;
  width: clamp(5rem, 7vw, 6rem) !important;
  height: clamp(5rem, 7vw, 6rem) !important;
  display: grid !important;
  place-items: center !important;
  margin: 0 0 1.35rem !important;
  border-radius: clamp(1.45rem, 2vw, 1.75rem) !important;
  color: #fff !important;
  background: radial-gradient(circle at 24% 14%, rgba(255,255,255,.13), transparent 27%), linear-gradient(145deg, rgba(28,38,74,.82), rgba(6,10,28,.97)) !important;
  border: 1px solid rgba(139,155,255,.24) !important;
  box-shadow: 0 24px 54px rgba(0,0,0,.48), 0 18px 46px rgba(0,113,227,.08), inset 0 1px 0 rgba(255,255,255,.12) !important;
  font-size: clamp(2rem, 3vw, 2.7rem) !important;
  font-weight: 900 !important;
  line-height: 1 !important;
}

.payment-flow-card b::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
  padding: 2px;
  background: conic-gradient(from 0deg, transparent 0 74%, #0a84ff 78%, #bf5af2 84%, #ff375f 90%, #ff6a00 96%, transparent 100%);
  opacity: 0;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: ffFlowBorderSpin 2.4s linear infinite;
}

.payment-flow-card b > * {
  position: relative;
  z-index: 2;
}

.payment-flow-card.is-active b,
.payment-flow-card.is-rocket-active b {
  background: linear-gradient(180deg, #1688f6, #0071e3) !important;
  border-color: rgba(10,132,255,.66) !important;
  box-shadow: 0 26px 58px rgba(0,113,227,.32), 0 18px 46px rgba(0,0,0,.38), inset 0 1px 0 rgba(255,255,255,.28) !important;
}

.payment-flow-card.is-active b::after,
.payment-flow-card.is-rocket-active b::after {
  opacity: 1;
}

.payment-flow-card p {
  max-width: 190px !important;
  color: #f5f5f7 !important;
  font-size: clamp(1rem, 1.3vw, 1.22rem) !important;
  font-weight: 900 !important;
  line-height: 1.25 !important;
}

@keyframes ffFlowBorderSpin {
  to { transform: rotate(360deg); }
}

.ff-shell-has-flow > main {
  padding-top: 2rem !important;
}

body.ff-auth-shell-layout {
  display: block !important;
  min-height: 100vh;
  padding: 98px 16px 0 !important;
}

body.ff-auth-shell-layout > main {
  margin: 0 auto 56px !important;
}

@media (max-width: 900px) {
  .ff-shell-header-inner {
    min-height: 66px;
    width: min(100% - 24px, 1440px);
  }

  .ff-shell-header .ff-shell-logo {
    width: 45px;
    height: 45px;
    margin-left: 0;
    margin-right: 0;
  }

  .ff-shell-nav {
    display: none;
  }

  .ff-shell-login {
    display: none;
  }

  .ff-language-control {
    min-height: 2rem;
    padding: 0.14rem 0.25rem 0.14rem 0.48rem;
    gap: 0.25rem;
  }

  .ff-language-control span {
    font-size: 0.62rem;
  }

  .ff-language-control select {
    height: 1.62rem;
    min-width: 6.2rem;
    max-width: 7.2rem;
    padding-left: 0.48rem;
    padding-right: 1rem;
    font-size: 0.66rem;
  }

  .ff-shell-menu-toggle {
    display: inline-flex;
  }

  .ff-shell-footer-inner {
    width: min(100% - 28px, 1440px);
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 34px 18px;
    text-align: left;
    padding-top: 48px;
    padding-bottom: 28px;
  }

  .ff-shell-footer-brand {
    grid-column: 1 / -1;
    text-align: center;
  }

  .ff-shell-footer .ff-shell-logo,
  .ff-shell-socials {
    margin-left: auto;
    margin-right: auto;
    justify-content: center;
  }

  .ff-shell-footer-copy {
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 24px;
  }

  .ff-shell-footer-column h4 {
    justify-content: flex-start;
    margin-bottom: 18px;
    font-size: 0.78rem;
    font-weight: 760;
    letter-spacing: 0.11em;
  }

  .ff-shell-footer-column ul {
    gap: 11px;
  }

  .ff-shell-footer li a {
    gap: 0.5rem;
    font-size: 0.82rem;
    font-weight: 560;
    line-height: 1.25;
  }

  .ff-shell-footer li a::before {
    width: 0.36rem;
    height: 0.36rem;
  }

  .ff-shell-footer-bottom {
    width: min(100% - 28px, 1440px);
    flex-direction: column;
    text-align: center;
    padding-top: 22px;
    padding-bottom: 30px;
  }

  .ff-flow-progress {
    padding-top: 84px;
    padding-bottom: 12px;
  }

  .ff-flow-heading {
    justify-content: center;
    text-align: center;
    flex-direction: column;
  }

  .ff-flow-steps {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.34rem;
  }

  .ff-flow-steps::before {
    display: block;
    top: 1.35rem;
    left: 2.35rem;
    right: 2.35rem;
    opacity: 0.55;
  }

  .ff-flow-step {
    gap: 0.42rem;
  }

  .ff-flow-step-icon {
    width: clamp(2.35rem, 10.6vw, 2.8rem);
    height: clamp(2.35rem, 10.6vw, 2.8rem);
    border-radius: 0.82rem;
    font-size: clamp(1rem, 4.2vw, 1.22rem);
    box-shadow: 0 11px 24px rgba(0,0,0,.4), 0 9px 22px rgba(0,113,227,.08), inset 0 1px 0 rgba(255,255,255,.12);
  }

  .ff-flow-step small {
    max-width: 4.55rem;
    font-size: clamp(.56rem, 2.5vw, .68rem);
    line-height: 1.12;
    letter-spacing: -.01em;
  }

  .payment-flow-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    gap: 0.34rem !important;
  }

  .payment-flow-grid::before {
    top: 1.35rem;
    left: 2.35rem;
    right: 2.35rem;
    opacity: 0.55;
  }

  .payment-flow-card b {
    width: clamp(2.35rem, 10.6vw, 2.8rem) !important;
    height: clamp(2.35rem, 10.6vw, 2.8rem) !important;
    margin-bottom: 0.42rem !important;
    border-radius: 0.82rem !important;
    font-size: clamp(1rem, 4.2vw, 1.22rem) !important;
    box-shadow: 0 11px 24px rgba(0,0,0,.4), 0 9px 22px rgba(0,113,227,.08), inset 0 1px 0 rgba(255,255,255,.12) !important;
  }

  .payment-flow-card p {
    max-width: 4.55rem !important;
    font-size: clamp(.56rem, 2.5vw, .68rem) !important;
    line-height: 1.12 !important;
    letter-spacing: -.01em !important;
  }
}

@media (max-width: 560px) {
  .ff-language-control span {
    display: none;
  }

  .ff-language-control {
    padding: 0.12rem 0.18rem;
  }
}

@media (max-width: 560px) {
  .ff-shell-actions {
    gap: 8px;
  }

  .ff-shell-button {
    padding-left: 0.72rem;
    padding-right: 0.72rem;
  }

  .ff-flow-steps,
  .payment-flow-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  }
}
