:root {
  --mff-navy: #020923;
  --mff-lime: #78d724;
  --mff-lime-d: #458d07;
  --mff-cyan: #00a8e8;
  --mff-ink: #fff;
  --mff-text: rgba(255, 255, 255, 0.82);
  --mff-muted: rgba(255, 255, 255, 0.58);
  --mff-line: rgba(255, 255, 255, 0.16);
  --mff-err: #ff9e9e;
  --mff-ok: #b7f27a;
  --mff-panel: linear-gradient(165deg, rgba(4, 43, 82, 0.45), rgba(2, 9, 35, 0.97) 55%);
  --mff-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--mff-navy);
  color: var(--mff-ink);
  font-family: Poppins, system-ui, -apple-system, Segoe UI, sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

a {
  color: var(--mff-cyan);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.mffap-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.mffap-top {
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.mffap-logo img {
  display: block;
  height: 34px;
  width: auto;
}

.mffap-back {
  font-size: 0.88rem;
  color: var(--mff-muted);
}

.mffap-main {
  flex: 1;
  display: flex;
  align-items: stretch;
  justify-content: center;
  padding: 8px 20px 40px;
}

.mffap-layout {
  width: min(1080px, 100%);
  display: grid;
  gap: 28px;
  align-items: start;
}

.mffap-layout--split {
  grid-template-columns: 1fr 1.05fr;
}

.mffap-brand {
  border-radius: 24px;
  padding: 36px 32px;
  background: radial-gradient(120% 80% at 0% 0%, rgba(120, 215, 36, 0.12), transparent 55%),
    var(--mff-panel);
  border: 1px solid rgba(142, 209, 252, 0.14);
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.35);
}

.mffap-brand h1 {
  margin: 20px 0 12px;
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.mffap-brand p {
  margin: 0;
  color: var(--mff-text);
  font-size: 0.95rem;
  max-width: 38ch;
}

.mffap-bullets {
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.mffap-bullets li {
  position: relative;
  padding-left: 1.4em;
  margin: 0 0 10px;
  color: var(--mff-muted);
  font-size: 0.9rem;
}

.mffap-bullets li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--mff-lime);
}

.mffap-card {
  border-radius: 24px;
  padding: 32px 28px 28px;
  background: var(--mff-panel);
  border: 1px solid rgba(142, 209, 252, 0.18);
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.42);
}

.mffap-card h2 {
  margin: 0 0 6px;
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.mffap-lead {
  margin: 0 0 22px;
  color: var(--mff-text);
  font-size: 0.94rem;
}

.mffap-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
}

.mffap-tab {
  flex: 1;
  border: 1px solid var(--mff-line);
  background: transparent;
  color: var(--mff-muted);
  border-radius: 999px;
  padding: 10px 12px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.mffap-tab.is-on {
  color: #041018;
  background: var(--mff-lime);
  border-color: transparent;
}

.mffap-field {
  margin: 0 0 14px;
}

.mffap-field label {
  display: block;
  margin: 0 0 6px;
  font-size: 0.82rem;
  color: var(--mff-muted);
  font-weight: 500;
}

.mffap-field input,
.mffap-field select {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--mff-line);
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  padding: 12px 14px;
  font: inherit;
  outline: none;
}

.mffap-field input:focus,
.mffap-field select:focus {
  border-color: rgba(0, 168, 232, 0.7);
  box-shadow: 0 0 0 3px rgba(0, 168, 232, 0.18);
}

.mffap-pw {
  position: relative;
  display: flex;
  align-items: center;
}

.mffap-pw input {
  padding-right: 72px;
}

.mffap-pw-toggle {
  position: absolute;
  right: 10px;
  border: 0;
  background: transparent;
  color: var(--mff-cyan);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  padding: 6px 8px;
}

.mffap-hint {
  margin: 6px 0 0;
  font-size: 0.78rem;
  color: var(--mff-muted);
}

.mffap-phone {
  display: grid;
  grid-template-columns: 118px 1fr;
  gap: 8px;
}

.mffap-phone select,
.mffap-phone input {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--mff-line);
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  padding: 12px 12px;
  font: inherit;
  outline: none;
}

.mffap-phone select:focus,
.mffap-phone input:focus {
  border-color: rgba(0, 168, 232, 0.7);
  box-shadow: 0 0 0 3px rgba(0, 168, 232, 0.18);
}

.mffap-strength {
  margin-top: 8px;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.mffap-strength span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: #ff9e9e;
  transition: width 0.25s var(--mff-ease), background 0.25s var(--mff-ease);
}

.mffap-strength span[data-level="1"] {
  background: #ff9e9e;
}

.mffap-strength span[data-level="2"] {
  background: #ffc86b;
}

.mffap-strength span[data-level="3"] {
  background: #b7f27a;
}

.mffap-strength span[data-level="4"] {
  background: var(--mff-lime);
}

.mffap-field input[aria-invalid="true"],
.mffap-field select[aria-invalid="true"] {
  border-color: rgba(255, 158, 158, 0.7);
}

.mffap-grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.mffap-check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 0 0 12px;
  font-size: 0.86rem;
  color: var(--mff-text);
}

.mffap-check input {
  margin-top: 4px;
  accent-color: var(--mff-lime);
}

.mffap-submit {
  width: 100%;
  margin-top: 8px;
  border: 0;
  border-radius: 999px;
  padding: 14px 18px;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  color: #041018;
  background: linear-gradient(180deg, var(--mff-lime), var(--mff-lime-d));
  box-shadow: 0 10px 28px rgba(120, 215, 36, 0.28);
}

.mffap-submit:disabled {
  opacity: 0.55;
  cursor: wait;
}

.mffap-msg {
  min-height: 1.3em;
  margin: 12px 0 0;
  font-size: 0.9rem;
  color: var(--mff-err);
}

.mffap-msg.is-ok {
  color: var(--mff-ok);
}

.mffap-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.mffap-link {
  background: none;
  border: 0;
  color: var(--mff-cyan);
  cursor: pointer;
  font: inherit;
  font-size: 0.88rem;
  padding: 0;
}

.mffap-link:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.mffap-otp {
  display: flex;
  gap: 8px;
  justify-content: space-between;
  margin: 12px 0 4px;
}

.mffap-otp input {
  width: 100%;
  max-width: 52px;
  aspect-ratio: 1;
  text-align: center;
  font-size: 1.25rem;
  font-weight: 700;
  border-radius: 12px;
  border: 1px solid var(--mff-line);
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  outline: none;
  /* Visually one digit; maxlength=6 allows full-code paste into any cell. */
  caret-color: var(--mff-cyan, #00a8e8);
}

.mffap-hint {
  margin: 0 0 12px;
  font-size: 0.8rem;
  color: var(--mff-muted);
  line-height: 1.4;
}

.mffap-otp input:focus {
  border-color: rgba(0, 168, 232, 0.7);
}

.mffap-foot {
  text-align: center;
  margin-top: 18px;
  font-size: 0.88rem;
  color: var(--mff-muted);
}

.mffap-view[hidden] {
  display: none !important;
}

@media (max-width: 880px) {
  .mffap-layout--split {
    grid-template-columns: 1fr;
  }

  .mffap-brand {
    display: none;
  }
}

@media (max-width: 520px) {
  .mffap-grid2 {
    grid-template-columns: 1fr;
  }

  .mffap-phone {
    grid-template-columns: 108px 1fr;
  }

  .mffap-card {
    padding: 24px 18px 20px;
  }

  .mffap-otp {
    gap: 6px;
  }

  .mffap-otp input {
    max-width: 46px;
    font-size: 1.1rem;
  }
}