/* Mapfix — Uklon-inspired shell: light grey / black / turquoise / white */
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@500;600;700;800&display=swap');

:root {
  --mf-bg: #eceef2;
  --mf-surface: #ffffff;
  --mf-ink: #0b0d10;
  --mf-muted: #6b7280;
  --mf-line: #e4e6eb;
  --mf-input: #f3f4f6;
  --mf-accent: #12c4b5;
  --mf-accent-hover: #0eaaa0;
  --mf-accent-soft: #e6faf8;
  --mf-danger-bg: #fde8e8;
  --mf-danger: #b42318;
  --mf-ok-bg: #e6f7ef;
  --mf-ok: #0f6b45;
  --mf-radius-card: 28px;
  --mf-radius-pill: 999px;
  --mf-radius-field: 18px;
  --mf-shadow: 0 12px 40px rgba(15, 23, 42, 0.08);
  --mf-font: 'Manrope', 'Segoe UI', sans-serif;
}

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

.mf-auth-body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--mf-font);
  background:
    radial-gradient(ellipse 80% 50% at 10% -10%, rgba(18, 196, 181, 0.14), transparent 55%),
    radial-gradient(ellipse 70% 45% at 100% 0%, rgba(11, 13, 16, 0.05), transparent 50%),
    var(--mf-bg);
  color: var(--mf-ink);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 16px 32px;
}

.mf-auth-wrap {
  width: 100%;
  max-width: 420px;
}

.mf-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 14px;
  color: var(--mf-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
}
.mf-back:hover { color: var(--mf-ink); }

.mf-card {
  background: var(--mf-surface);
  border-radius: var(--mf-radius-card);
  padding: 28px 22px 24px;
  box-shadow: var(--mf-shadow);
  border: 1px solid rgba(255, 255, 255, 0.7);
}

.mf-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
}
.mf-brand-mark,
.mf-brand-logo {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--mf-ink);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}
.mf-brand-logo {
  object-fit: cover;
  background: #fff;
  border: 1px solid var(--mf-line);
}
a.mf-brand {
  text-decoration: none;
  color: inherit;
}
.mf-brand-name {
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.03em;
}

.mf-title {
  margin: 0 0 6px;
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.15;
}
.mf-sub {
  margin: 0 0 20px;
  color: var(--mf-muted);
  font-size: 0.95rem;
  line-height: 1.45;
  font-weight: 500;
}

.mf-seg {
  display: flex;
  padding: 4px;
  background: var(--mf-input);
  border-radius: var(--mf-radius-pill);
  margin-bottom: 20px;
  gap: 4px;
}
.mf-seg a,
.mf-seg button {
  flex: 1;
  text-align: center;
  text-decoration: none;
  border: none;
  background: transparent;
  color: var(--mf-ink);
  font-family: inherit;
  font-weight: 700;
  font-size: 0.92rem;
  padding: 12px 10px;
  border-radius: var(--mf-radius-pill);
  cursor: pointer;
  min-height: 44px;
}
.mf-seg a.active,
.mf-seg button.active {
  background: var(--mf-ink);
  color: #fff;
}

.mf-label {
  display: block;
  font-weight: 700;
  font-size: 0.82rem;
  margin-bottom: 8px;
  color: var(--mf-ink);
}
.mf-hint {
  font-size: 0.8rem;
  color: var(--mf-muted);
  margin: -6px 0 14px;
  line-height: 1.4;
  font-weight: 500;
}

.mf-input,
.mf-auth-body input:not([type="checkbox"]):not([type="radio"]),
.mf-auth-body select,
.mf-auth-body textarea {
  width: 100%;
  padding: 14px 18px;
  border: 1px solid transparent;
  border-radius: var(--mf-radius-pill);
  font-size: 1rem;
  font-family: inherit;
  font-weight: 600;
  margin-bottom: 14px;
  background: var(--mf-input);
  color: var(--mf-ink);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
.mf-auth-body input::placeholder,
.mf-auth-body textarea::placeholder {
  color: #9ca3af;
  font-weight: 500;
}
.mf-auth-body input:focus,
.mf-auth-body select:focus,
.mf-auth-body textarea:focus {
  border-color: var(--mf-accent);
  box-shadow: 0 0 0 3px rgba(18, 196, 181, 0.2);
  background: #fff;
}

.mf-password {
  display: flex;
  align-items: stretch;
  gap: 8px;
  margin-bottom: 14px;
}
.mf-password input { flex: 1; min-width: 0; margin-bottom: 0; }
.mf-password input::-ms-reveal,
.mf-password input::-ms-clear { display: none; }

.mf-btn {
  width: 100%;
  padding: 15px 18px;
  border: none;
  border-radius: var(--mf-radius-pill);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  transition: background 0.15s, transform 0.12s, opacity 0.15s;
}
.mf-btn:active:not(:disabled) { transform: scale(0.985); }
.mf-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.mf-btn-primary {
  background: var(--mf-accent);
  color: var(--mf-ink);
}
.mf-btn-primary:hover:not(:disabled) { background: var(--mf-accent-hover); }
.mf-btn-dark {
  background: var(--mf-ink);
  color: #fff;
}
.mf-btn-dark:hover:not(:disabled) { background: #22262c; }
.mf-btn-ghost {
  background: #fff;
  color: var(--mf-ink);
  border: 1.5px solid var(--mf-line);
  margin-top: 10px;
}
.mf-btn-ghost:hover:not(:disabled) { background: var(--mf-input); }
.mf-btn-link {
  width: auto;
  min-height: auto;
  padding: 0;
  background: none;
  color: var(--mf-muted);
  font-size: 0.9rem;
  font-weight: 600;
  margin-top: 12px;
}
.mf-btn-link:hover:not(:disabled) {
  color: var(--mf-ink);
  text-decoration: underline;
  background: none;
}

.mf-toggle-eye {
  width: auto;
  min-width: 52px;
  min-height: 52px;
  padding: 0 14px;
  margin: 0;
  flex-shrink: 0;
  background: var(--mf-input);
  color: var(--mf-ink);
  border: 1px solid transparent;
  border-radius: var(--mf-radius-pill);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}
.mf-toggle-eye:hover { background: #e5e7eb; }

.mf-role {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}
.mf-role button {
  min-height: 48px;
  border-radius: var(--mf-radius-pill);
  border: 1.5px solid var(--mf-line);
  background: #fff;
  color: var(--mf-ink);
  font-family: inherit;
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  padding: 12px;
}
.mf-role button.active {
  background: var(--mf-ink);
  color: #fff;
  border-color: var(--mf-ink);
}

.mf-msg {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 0.9rem;
  display: none;
  line-height: 1.45;
  font-weight: 600;
}
.mf-msg.err,
.mf-msg.ok { display: block; }
.mf-msg.err { background: var(--mf-danger-bg); color: var(--mf-danger); }
.mf-msg.ok { background: var(--mf-ok-bg); color: var(--mf-ok); }
.mf-msg a { color: inherit; font-weight: 800; }

.mf-foot {
  margin-top: 18px;
  text-align: center;
  font-size: 0.85rem;
  color: var(--mf-muted);
  line-height: 1.5;
  font-weight: 500;
}
.mf-foot a {
  color: var(--mf-ink);
  font-weight: 700;
  text-underline-offset: 3px;
}
.mf-links {
  margin-top: 16px;
  text-align: center;
  font-size: 0.88rem;
  font-weight: 600;
}
.mf-links a {
  color: var(--mf-muted);
  text-decoration: none;
  margin: 0 6px;
}
.mf-links a:hover { color: var(--mf-ink); text-decoration: underline; }

.mf-hidden,
.hidden { display: none !important; }

/* Back-compat aliases used by existing register/forgot scripts */
.msg {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 0.9rem;
  display: none;
  line-height: 1.45;
  font-weight: 600;
}
.msg.err,
.msg.ok { display: block; }
.msg.err { background: var(--mf-danger-bg); color: var(--mf-danger); }
.msg.ok { background: var(--mf-ok-bg); color: var(--mf-ok); }

.mf-step-chip {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--mf-ink);
  background: var(--mf-accent-soft);
  padding: 5px 10px;
  border-radius: var(--mf-radius-pill);
  margin-bottom: 12px;
}

.mf-phone-sent {
  font-size: 0.9rem;
  color: var(--mf-muted);
  margin-bottom: 14px;
  padding: 12px 14px;
  background: var(--mf-input);
  border-radius: 16px;
  font-weight: 500;
}
.mf-phone-sent strong { color: var(--mf-ink); }

.mf-divider {
  margin: 20px 0 16px;
  border: none;
  border-top: 1px solid var(--mf-line);
}

.mf-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(11, 13, 16, 0.2);
  border-top-color: var(--mf-ink);
  border-radius: 50%;
  animation: mf-spin 0.7s linear infinite;
}
@keyframes mf-spin { to { transform: rotate(360deg); } }

.mf-otp-input {
  text-align: center;
  letter-spacing: 0.35em;
  font-size: 1.35rem !important;
  font-weight: 700 !important;
  padding-left: 22px !important;
}

.mf-resend { margin-top: 8px; text-align: center; }

/* Provider extras on register */
.mf-auth-body .services-tree {
  margin-bottom: 14px;
  max-height: 320px;
  overflow-y: auto;
  padding: 10px;
  border-radius: 16px;
  background: var(--mf-input);
  border: 1px solid var(--mf-line);
}
.mf-auth-body .cat-block {
  background: #fff;
  border: 1px solid var(--mf-line);
  border-radius: 14px;
  margin-bottom: 10px;
  overflow: hidden;
}
.mf-auth-body .cat-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: #f8f9fb;
  border-bottom: 1px solid var(--mf-line);
  cursor: pointer;
  font-weight: 800;
  font-size: 0.9rem;
  margin: 0;
}
.mf-auth-body .cat-head input,
.mf-auth-body .check-row input {
  width: auto;
  margin: 0;
  accent-color: var(--mf-accent);
}
.mf-auth-body .sub-block { padding: 8px 12px 10px; border-bottom: 1px dashed var(--mf-line); }
.mf-auth-body .sub-block:last-child { border-bottom: none; }
.mf-auth-body .sub-title {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--mf-muted);
  margin: 0 0 6px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.mf-auth-body .check-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 10px;
  cursor: pointer;
  user-select: none;
  margin-bottom: 4px;
}
.mf-auth-body .check-row:hover { background: var(--mf-accent-soft); }
.mf-auth-body .check-row span {
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.35;
}
.mf-auth-body .check-row.sub-pick {
  background: var(--mf-accent-soft);
  border: 1px solid #9ee8e0;
  font-weight: 700;
  margin-bottom: 8px;
}
.mf-auth-body .check-row.sub-all {
  background: #f3f4f6;
  border: 1px solid var(--mf-line);
  font-weight: 700;
}
.mf-auth-body .check-row.service-row span {
  font-weight: 500;
  color: #374151;
  padding-left: 8px;
}
.mf-auth-body .custom-subs {
  margin-bottom: 14px;
  padding: 12px;
  border: 1px dashed var(--mf-line);
  border-radius: 16px;
  background: #fafafa;
}
.mf-auth-body .custom-subs h3 { margin: 0 0 6px; font-size: 0.92rem; }
.mf-auth-body .custom-row {
  background: #fff;
  border: 1px solid var(--mf-line);
  border-radius: 14px;
  padding: 10px;
  margin-bottom: 10px;
}
.mf-auth-body .btn-secondary {
  width: auto;
  padding: 10px 16px;
  background: #fff;
  color: var(--mf-ink);
  border: 1.5px solid var(--mf-line);
  border-radius: var(--mf-radius-pill);
  font-size: 0.88rem;
  font-weight: 700;
  margin-top: 4px;
  cursor: pointer;
  font-family: inherit;
}
.mf-auth-body .btn-secondary:hover { background: var(--mf-input); }
.mf-auth-body .btn-remove {
  width: auto;
  padding: 8px 12px;
  background: var(--mf-danger-bg);
  color: var(--mf-danger);
  border: none;
  border-radius: var(--mf-radius-pill);
  font-size: 0.82rem;
  font-weight: 700;
  margin: 4px 0 0;
  cursor: pointer;
  font-family: inherit;
}
.mf-auth-body .loading-cats {
  font-size: 0.85rem;
  color: var(--mf-muted);
  margin-bottom: 14px;
}

.mf-auth-body .tabs {
  display: flex;
  padding: 4px;
  background: var(--mf-input);
  border-radius: var(--mf-radius-pill);
  margin-bottom: 20px;
  gap: 4px;
}
.mf-auth-body .tabs button {
  flex: 1;
  background: transparent;
  color: var(--mf-ink);
  border: none;
  border-radius: var(--mf-radius-pill);
  min-height: 44px;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  padding: 12px 10px;
}
.mf-auth-body .tabs button.active {
  background: var(--mf-ink);
  color: #fff;
}
.mf-auth-body .password-field {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  align-items: stretch;
}
.mf-auth-body .password-field input { margin-bottom: 0; flex: 1; }
.mf-auth-body .password-toggle,
.mf-auth-body button.password-toggle {
  width: auto;
  min-width: 52px;
  min-height: 52px;
  background: var(--mf-input);
  color: var(--mf-ink);
  border: none;
  border-radius: var(--mf-radius-pill);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0 12px;
  cursor: pointer;
  font-family: inherit;
}
.mf-auth-body .field-hint { font-size: 0.8rem; color: var(--mf-muted); margin: -6px 0 14px; }
.mf-auth-body .links { margin-top: 16px; text-align: center; font-size: 0.88rem; font-weight: 600; }
.mf-auth-body .links a { color: var(--mf-muted); text-decoration: none; margin: 0 6px; }
.mf-auth-body .links a:hover { color: var(--mf-ink); }
.mf-auth-body button:not(.mf-toggle-eye):not(.password-toggle):not(.mf-btn-link):not(.btn-secondary):not(.btn-remove):not(.tabs button):not(.mf-role button) {
  width: 100%;
  padding: 15px 18px;
  border: none;
  border-radius: var(--mf-radius-pill);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  min-height: 52px;
  background: var(--mf-accent);
  color: var(--mf-ink);
}
.mf-auth-body .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 15px 18px;
  background: var(--mf-accent);
  color: var(--mf-ink);
  border: none;
  border-radius: var(--mf-radius-pill);
  font-size: 1rem;
  font-weight: 800;
  text-decoration: none;
  min-height: 52px;
  font-family: inherit;
}
.mf-auth-body .steps {
  margin: 0 0 18px;
  padding-left: 18px;
  color: var(--mf-muted);
  font-size: 0.92rem;
  line-height: 1.55;
  font-weight: 500;
}
.mf-auth-body .spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(11, 13, 16, 0.2);
  border-top-color: var(--mf-ink);
  border-radius: 50%;
  animation: mf-spin 0.7s linear infinite;
  margin-right: 8px;
  display: inline-block;
}

.mf-oauth { display: flex; flex-direction: column; gap: 10px; margin: 0 0 16px; }
.mf-oauth-btn {
  width: 100%; min-height: 48px; border-radius: var(--mf-radius-pill);
  border: 1.5px solid var(--mf-line); background: #fff; color: var(--mf-ink);
  font-family: inherit; font-weight: 700; font-size: 0.95rem; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
}
.mf-oauth-btn:hover { background: var(--mf-input); }
.mf-oauth-btn:disabled { opacity: 0.55; cursor: not-allowed; }
.mf-google-btn-slot {
  width: 100%;
  min-height: 44px;
  display: flex;
  justify-content: center;
}
.mf-google-btn-slot iframe { margin: 0 auto; }
.mf-auth-notice {
  margin: 0 0 16px;
  padding: 10px 12px;
  border-radius: 14px;
  background: var(--mf-accent-soft);
  color: var(--mf-ink);
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.45;
}
.mf-or {
  display: flex; align-items: center; gap: 12px; margin: 4px 0 16px;
  color: var(--mf-muted); font-size: 0.82rem; font-weight: 600;
}
.mf-or::before, .mf-or::after { content: ''; flex: 1; height: 1px; background: var(--mf-line); }
.mf-telegram-box {
  margin-top: 14px; padding: 14px; border-radius: 16px;
  background: var(--mf-accent-soft); border: 1px solid #9ee8e0;
}
.mf-telegram-box p { margin: 0 0 12px; font-size: 0.9rem; font-weight: 600; line-height: 1.45; }
