/* ============================================================
   MFF Platform — shared design system
   Ported from the MyForexFunds Elementor plugins:
   - #020923 page tone, rgba(255,255,255,0.05) glass surfaces
   - Poppins typography
   - blue accent (#2189FF), green CTA gradient (#78D724 -> #458D07)
   Used by the public form, the case tracker and the admin app.
   ============================================================ */

:root {
  --mff-bg-page:        #020923;
  --mff-bg-page-2:      #05123a;
  --mff-bg-glass:       rgba(255, 255, 255, 0.05);
  --mff-bg-glass-soft:  rgba(255, 255, 255, 0.03);
  --mff-bg-glass-hover: rgba(255, 255, 255, 0.08);

  --mff-text:         #ffffff;
  --mff-text-muted:   rgba(255, 255, 255, 0.6);
  --mff-text-faint:   rgba(255, 255, 255, 0.4);

  --mff-border:        rgba(255, 255, 255, 0.15);
  --mff-border-soft:   rgba(255, 255, 255, 0.1);
  --mff-border-strong: rgba(255, 255, 255, 0.3);

  --mff-accent:      #2189FF;
  --mff-accent-soft: rgba(33, 137, 255, 0.18);

  --mff-success:      #78D724;
  --mff-success-dark: #458D07;

  --mff-warn:      #FFB020;
  --mff-warn-soft: rgba(255, 176, 32, 0.14);

  --mff-danger:      #FF4D4D;
  --mff-danger-soft: rgba(255, 77, 77, 0.1);

  --mff-radius:    12px;
  --mff-radius-lg: 20px;

  --mff-step-line:     rgba(255, 255, 255, 0.1);
  --mff-step-upcoming: rgba(255, 255, 255, 0.2);

  --mff-font: 'Poppins', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mff-mono: 'Courier New', ui-monospace, SFMono-Regular, Menlo, monospace;
}

* , *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  font-family: var(--mff-font);
  color: var(--mff-text);
  line-height: 1.5;
  background: var(--mff-bg-page);
  -webkit-font-smoothing: antialiased;
}

/* Full-viewport background image — fixed, centred, cover. Robust across
   browsers (no iOS background-attachment:fixed bug). Drop your image at
   /assets/img/background.jpg (see assets/img/README.txt). */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(1400px 800px at 50% -10%, rgba(5, 18, 58, 0.25) 0%, rgba(2, 9, 35, 0.10) 55%),
    url('/assets/img/background.jpg') center center / cover no-repeat,
    var(--mff-bg-page);
}

a { color: var(--mff-accent); text-decoration: none; }
a:hover { text-decoration: underline; }

img, svg, video, canvas { max-width: 100%; }

[hidden] { display: none !important; }

/* ---------------- layout ---------------- */
.mff-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;
}
.mff-stack { width: 100%; max-width: 560px; margin: 0 auto; }

.mff-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
  margin-bottom: 22px;
  color: var(--mff-text);
  font-weight: 600;
  letter-spacing: -0.2px;
  text-decoration: none;
}
.mff-brand:hover { text-decoration: none; }

/* Logo — drop your file at /assets/img/logo.png */
.mff-logo { display: block; width: 100%; max-width: 190px; height: auto; }
.mff-logo--sm { max-width: 130px; }
.mff-brand__dot {
  width: 12px; height: 12px; border-radius: 50%;
  background: linear-gradient(135deg, var(--mff-success), var(--mff-success-dark));
  box-shadow: 0 0 0 4px var(--mff-success-dark, rgba(120,215,36,.15));
  box-shadow: 0 0 14px rgba(120, 215, 36, 0.6);
}

/* ---------------- glass card ---------------- */
.mff-card {
  background: var(--mff-bg-glass);
  border: 1px solid var(--mff-border);
  border-radius: var(--mff-radius-lg);
  padding: 32px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.mff-heading {
  font-size: 24px;
  font-weight: 600;
  margin: 0 0 8px;
  letter-spacing: -0.3px;
}
.mff-intro {
  margin: 0 0 22px;
  color: var(--mff-text-muted);
  font-size: 14px;
  line-height: 1.55;
}
.mff-section-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mff-text-faint);
  margin: 0 0 14px;
}
.mff-divider {
  border: 0;
  border-top: 1px solid var(--mff-border-soft);
  margin: 22px 0;
}

/* ---------------- buttons ---------------- */
.mff-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(90deg, #78D724 0%, #458D07 100%);
  color: #fff;
  border: 0;
  padding: 14px 22px;
  border-radius: var(--mff-radius);
  font: inherit;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(120, 215, 36, 0.25);
  transition: opacity .2s, transform .15s, box-shadow .2s;
}
.mff-btn:hover {
  opacity: 0.92;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(120, 215, 36, 0.35);
  text-decoration: none;
}
.mff-btn:active { transform: translateY(0); }
.mff-btn:disabled, .mff-btn.is-disabled {
  opacity: .4; cursor: not-allowed; transform: none; box-shadow: none;
}
.mff-btn--block { width: 100%; }

.mff-btn--blue {
  background: var(--mff-accent);
  box-shadow: 0 4px 14px rgba(33, 137, 255, 0.25);
}
.mff-btn--blue:hover { box-shadow: 0 6px 18px rgba(33, 137, 255, 0.35); }

.mff-btn--outline {
  background: var(--mff-bg-glass-soft);
  border: 1px solid var(--mff-border);
  color: var(--mff-text);
  box-shadow: none;
}
.mff-btn--outline:hover {
  background: var(--mff-bg-glass-hover);
  border-color: var(--mff-border-strong);
  box-shadow: none;
}

.mff-btn--danger {
  background: var(--mff-danger-soft);
  border: 1px solid rgba(255, 77, 77, 0.3);
  color: #ff8a8a;
  box-shadow: none;
}
.mff-btn--danger:hover { background: rgba(255, 77, 77, 0.2); box-shadow: none; }

.mff-btn--ghost {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: none;
  border: 0;
  color: var(--mff-text-faint);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  padding: 0;
  box-shadow: none;
  transition: color .2s;
}
.mff-btn--ghost:hover { color: var(--mff-text); }

.mff-btn--sm { padding: 9px 14px; font-size: 13px; }

/* ---------------- fields ---------------- */
.mff-field { display: block; margin-bottom: 15px; }
.mff-label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--mff-text-muted);
  margin-bottom: 6px;
}
.mff-input,
input[type="text"].mff-input,
input[type="email"].mff-input,
input[type="tel"].mff-input,
input[type="password"].mff-input,
input[type="search"].mff-input,
textarea.mff-input,
select.mff-input {
  width: 100%;
  border: 1px solid var(--mff-border);
  border-radius: var(--mff-radius);
  padding: 11px 13px;
  font: inherit;
  font-size: 14px;
  color: var(--mff-text);
  background: var(--mff-bg-glass);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  transition: border-color .2s, background .2s, box-shadow .2s;
}
textarea.mff-input { resize: vertical; min-height: 96px; }
select.mff-input { appearance: none; -webkit-appearance: none; cursor: pointer; }
.mff-input::placeholder { color: var(--mff-text-faint); }
.mff-input:focus {
  outline: none;
  border-color: var(--mff-accent);
  background-color: var(--mff-bg-glass-hover);
  box-shadow: 0 0 0 3px var(--mff-accent-soft);
}
.mff-input.is-invalid {
  border-color: var(--mff-danger);
  box-shadow: 0 0 0 3px rgba(255, 77, 77, .15);
  animation: mff-shake .35s ease;
}
.mff-field__error {
  display: none;
  margin-top: 5px;
  color: #ff8a8a;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.4;
}
.mff-field__error.is-shown { display: block; }

@keyframes mff-shake {
  0%, 100% { transform: translateX(0); }
  25%      { transform: translateX(-4px); }
  75%      { transform: translateX(4px); }
}
@keyframes mff-fade {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------------- notices ---------------- */
.mff-notice {
  margin-top: 16px;
  padding: 13px 16px;
  border-radius: var(--mff-radius);
  font-size: 13px;
  line-height: 1.5;
  border: 1px solid transparent;
}
.mff-notice--error { background: var(--mff-danger-soft); color: #ff8a8a; border-color: rgba(255, 77, 77, .3); }
.mff-notice--ok    { background: rgba(120, 215, 36, .12); color: #b9e98a; border-color: rgba(120, 215, 36, .3); }
.mff-notice--info  { background: var(--mff-accent-soft); color: #bcd9ff; border-color: rgba(33, 137, 255, .3); }
.mff-notice--warn  { background: var(--mff-warn-soft); color: #ffd98a; border-color: rgba(255, 176, 32, .3); }

/* ---------------- badges / pills ---------------- */
.mff-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--mff-border-soft);
  color: var(--mff-text-muted);
  background: var(--mff-bg-glass);
}
.mff-pill--review    { color: #bcd9ff; border-color: rgba(33,137,255,.35); background: var(--mff-accent-soft); }
.mff-pill--progress  { color: #ffd98a; border-color: rgba(255,176,32,.35); background: var(--mff-warn-soft); }
.mff-pill--action    { color: #ffb0b0; border-color: rgba(255,77,77,.35);  background: var(--mff-danger-soft); }
.mff-pill--done      { color: #b9e98a; border-color: rgba(120,215,36,.4);  background: rgba(120,215,36,.12); }

/* ---------------- spinner ---------------- */
.mff-spinner {
  width: 16px; height: 16px;
  border: 2px solid rgba(255, 255, 255, .35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: mff-spin .8s linear infinite;
  display: inline-block;
}
.mff-spinner--lg { width: 30px; height: 30px; border-width: 3px; }
@keyframes mff-spin { to { transform: rotate(360deg); } }

/* ---------------- horizontal step indicator ---------------- */
.mff-steps {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: 6px;
  list-style: none;
  padding: 0;
  margin: 0 0 28px;
  position: relative;
}
.mff-steps::before {
  content: "";
  position: absolute;
  top: 14px; left: 8.33%; right: 8.33%;
  height: 2px;
  background: var(--mff-step-line);
  z-index: 0;
}
.mff-steps__item {
  flex: 1 1 0;
  min-width: 0;
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  color: var(--mff-text-faint);
  font-size: 11px;
  font-weight: 500;
  gap: 8px;
  line-height: 1.3;
}
.mff-steps__num {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--mff-bg-glass);
  border: 2px solid var(--mff-step-upcoming);
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 13px;
  color: var(--mff-text-faint);
  transition: background .2s, border-color .2s, color .2s;
  flex-shrink: 0;
}
.mff-steps__label { overflow-wrap: break-word; }
.mff-steps__item.is-active { color: var(--mff-text); }
.mff-steps__item.is-active .mff-steps__num {
  background: var(--mff-accent);
  border-color: var(--mff-accent);
  color: #fff;
  box-shadow: 0 0 0 4px var(--mff-accent-soft);
}
.mff-steps__item.is-done { color: var(--mff-success); }
.mff-steps__item.is-done .mff-steps__num {
  background: var(--mff-success);
  border-color: var(--mff-success);
  color: #fff;
  font-size: 0;
}
.mff-steps__item.is-done .mff-steps__num::after { content: "✓"; font-size: 16px; line-height: 1; }

/* ---------------- terminal cards (success / ineligible) ---------------- */
.mff-terminal { text-align: center; padding: 8px 0; animation: mff-fade .35s ease; }
.mff-terminal__icon {
  width: 72px; height: 72px;
  margin: 0 auto 16px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
}
.mff-terminal__icon--ok {
  background: linear-gradient(135deg, #78D724 0%, #458D07 100%);
  box-shadow: 0 10px 28px rgba(120, 215, 36, 0.35);
}
.mff-terminal__icon--lock {
  background: var(--mff-bg-glass);
  border: 1px solid var(--mff-border);
  color: var(--mff-text-muted);
}
.mff-terminal__title { font-size: 22px; font-weight: 600; margin: 0 0 10px; letter-spacing: -0.3px; }
.mff-terminal__body { color: var(--mff-text-muted); font-size: 14px; line-height: 1.65; margin: 0 auto; max-width: 440px; }

.mff-ref {
  background: var(--mff-bg-glass);
  border: 1px solid var(--mff-border);
  border-radius: var(--mff-radius);
  padding: 16px 20px;
  margin: 18px auto;
  max-width: 380px;
  text-align: center;
}
.mff-ref__label {
  font-size: 10px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--mff-text-faint); margin: 0 0 8px;
}
.mff-ref__num {
  font-size: 22px; font-weight: 700; color: var(--mff-accent);
  letter-spacing: 0.1em; font-family: var(--mff-mono);
  word-break: break-all;
}
.mff-ref__hint { font-size: 11px; color: var(--mff-text-faint); margin: 8px 0 0; line-height: 1.5; }

.mff-terminal__note {
  background: var(--mff-accent-soft);
  border: 1px solid rgba(33, 137, 255, 0.3);
  border-radius: var(--mff-radius);
  padding: 12px 15px;
  font-size: 12px;
  color: var(--mff-text-muted);
  line-height: 1.65;
  text-align: left;
  margin: 16px 0;
}
.mff-terminal__foot { font-size: 12px; color: var(--mff-text-faint); line-height: 1.7; margin: 4px 0 0; }
.mff-terminal__foot strong { color: var(--mff-text-muted); }

/* ---------------- helpers ---------------- */
.mff-center { text-align: center; }
.mff-muted { color: var(--mff-text-muted); }
.mff-faint { color: var(--mff-text-faint); }
.mff-mt-0 { margin-top: 0; }
.mff-row { display: flex; gap: 12px; align-items: center; }
.mff-row--wrap { flex-wrap: wrap; }
.mff-grow { flex: 1 1 auto; min-width: 0; }
.mff-hp { position: absolute !important; left: -10000px !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }

@media (max-width: 600px) {
  .mff-card { padding: 22px 16px; border-radius: 16px; }
  .mff-heading { font-size: 20px; }
  .mff-steps { gap: 4px; }
  .mff-terminal__icon { width: 60px; height: 60px; }
}
@media (max-width: 380px) {
  .mff-card { padding: 18px 12px; }
  .mff-steps__label { display: none; }
}
