:root {
  color-scheme: dark;
  --bg: #0c0f16;
  --panel: #151a24;
  --line: #2b3445;
  --text: #f4f7fb;
  --muted: #9ca8bb;
  --blue: #4c7dff;
}

* { box-sizing: border-box; }

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.45 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select { font: inherit; }

button { cursor: pointer; }

.fpm-login {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: max(20px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) max(20px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
  background: radial-gradient(circle at 50% 10%, #1d2940, #0c0f16 58%);
}

.fpm-login-card {
  width: min(420px, 100%);
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--panel);
  box-shadow: 0 28px 90px #0009;
}

.fpm-login-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.fpm-logo img {
  display: block;
  width: 48px;
  height: 48px;
  border-radius: 10px;
}

.fpm-language-compact {
  width: auto;
  min-width: 92px;
  margin: 0;
}

.fpm-login-brand small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.fpm-login-card h1 {
  margin: 12px 0 4px;
  font-size: 30px;
}

.fpm-login-card p { color: var(--muted); }

.fpm-login-card label {
  display: grid;
  gap: 7px;
  margin: 12px 0;
  color: #c4ccda;
}

.fpm-login-card label span { font-weight: 800; }

.fpm-login-card input,
.fpm-login-card select {
  width: 100%;
  min-height: 54px;
  padding: 12px 13px;
  border: 1px solid #344056;
  border-radius: 11px;
  outline: none;
  background: #0d121c;
  color: var(--text);
  font-size: 17px;
}

.fpm-login-card select {
  min-height: 44px;
  font-size: 15px;
}

.fpm-login-card .fpm-language-compact {
  width: auto;
  min-width: 112px;
}

.fpm-login-card input:focus,
.fpm-login-card select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px #4c7dff26;
}

.fpm-login-card button[type="submit"] {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 56px;
  margin-top: 8px;
  padding: 14px 18px;
  border: 0;
  border-radius: 12px;
  background: var(--blue);
  color: #fff;
  font-size: 17px;
  font-weight: 800;
}

.fpm-login-card button[type="submit"] i::before {
  content: "\2192";
  font-style: normal;
}

.fpm-login-card button:focus-visible,
.fpm-login-card input:focus-visible,
.fpm-login-card select:focus-visible {
  outline: 3px solid #8eabff;
  outline-offset: 2px;
}

.fpm-login-card button:disabled {
  cursor: wait;
  opacity: .62;
}

.fpm-error {
  min-height: 1.45em;
  color: #ff8fa0 !important;
}

.fpm-recovery-link {
  display: block;
  width: 100%;
  min-height: 44px;
  margin-top: 10px;
  padding: 10px 4px;
  border: 0;
  background: transparent;
  color: #a9c2ff;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.fpm-recovery {
  color: var(--text);
  max-height: calc(100dvh - 32px);
  max-width: calc(100vw - 24px);
  overflow-y: auto;
}
.fpm-recovery::backdrop { background: #000b; }
.fpm-recovery h2 { margin: 0; font-size: 24px; }
.fpm-recovery fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.fpm-recovery p { overflow-wrap: anywhere; }
.fpm-login-card .fpm-error:empty { display: none; }
.fpm-recovery [hidden] { display: none !important; }

@media (max-width: 480px) {
  .fpm-login { padding: 12px; }
  .fpm-login-card { padding: 22px 18px; }
  .fpm-login-card h1 { font-size: 27px; }
}
