/* FM27 R27.90b · Auth pages: compact, centered, responsive, navy visual language.
   Scope ONLY .fm27-auth-screen so dashboard, sidebar login, games and admin keep their styles. */
body.fm27-midnight .fm27-auth-screen {
  box-sizing: border-box;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  width: 100%;
  max-width: 100%;
  padding: clamp(18px, 4vh, 44px) 10px 56px;
}
body.fm27-midnight .fm27-auth-screen .fm27-auth-card {
  box-sizing: border-box;
  flex: 0 1 470px;
  width: 100%;
  max-width: 470px;
  min-width: 0;
  padding: clamp(22px, 3.2vw, 36px);
  color: #e8f0fc;
  border: 1px solid #405775;
  border-radius: 13px;
  background: linear-gradient(145deg, #1b2c46 0%, #17243a 100%);
  box-shadow: 0 16px 40px rgba(0, 0, 0, .22);
}
body.fm27-midnight .fm27-auth-screen--register .fm27-auth-card {
  flex-basis: 550px;
  max-width: 550px;
}
body.fm27-midnight .fm27-auth-screen .fm27-auth-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 25px;
  padding: 0 0 18px;
  border-bottom: 1px solid #374d69;
}
body.fm27-midnight .fm27-auth-screen .fm27-auth-mark {
  display: grid;
  place-items: center;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  border-radius: 11px;
  border: 1px solid #416b79;
  background: #214155;
  color: #87e1c2;
  font-size: 1.2rem;
}
body.fm27-midnight .fm27-auth-screen .fm27-auth-title {
  margin: 0;
  color: #f0f5ff!important;
  font-size: clamp(1.23rem, 2vw, 1.5rem);
  line-height: 1.3;
  font-weight: 760;
  letter-spacing: -.025em;
}
body.fm27-midnight .fm27-auth-screen .fm27-auth-form {
  display: block;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0;
}
body.fm27-midnight .fm27-auth-screen .fm27-auth-form .mb-3 {
  width: 100%;
  max-width: 100%;
  margin-bottom: 16px!important;
}
body.fm27-midnight .fm27-auth-screen .fm27-auth-form .form-label,
body.fm27-midnight .fm27-auth-screen .fm27-auth-form label {
  display: inline-block;
  margin-bottom: 7px;
  font-size: .85rem;
  line-height: 1.35;
  font-weight: 600;
  color: #dbe6f6;
}
body.fm27-midnight .fm27-auth-screen .fm27-auth-form .form-control {
  display: block;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 43px;
  padding: 10px 12px;
  border: 1px solid #465d79;
  border-radius: 8px;
  background: #101b30;
  color: #f1f6ff;
  font-size: .92rem;
}
body.fm27-midnight .fm27-auth-screen .fm27-auth-form .form-control:focus {
  border-color: #72cbb1;
  box-shadow: 0 0 0 3px rgba(93, 193, 163, .2);
  outline: none;
}
body.fm27-midnight .fm27-auth-screen .fm27-auth-form .form-control.is-invalid {
  border-color: #f27d90;
}
body.fm27-midnight .fm27-auth-screen .fm27-auth-form .form-check {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  min-width: 0;
  padding-left: 0;
}
body.fm27-midnight .fm27-auth-screen .fm27-auth-form .form-check-input {
  position: static;
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  margin: 2px 0 0;
}
body.fm27-midnight .fm27-auth-screen .fm27-auth-form .form-check-label {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  line-height: 1.48;
  font-size: .83rem;
  overflow-wrap: anywhere;
}
body.fm27-midnight .fm27-auth-screen .fm27-auth-actions {
  display: flex;
  width: 100%;
  padding: 4px 0 0;
  margin: 5px 0 0;
}
body.fm27-midnight .fm27-auth-screen .fm27-auth-submit {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid #369980;
  border-radius: 8px;
  background: #267e69;
  color: #fff;
  font-size: .9rem;
  font-weight: 740;
  transition: background .15s ease, border-color .15s ease;
}
body.fm27-midnight .fm27-auth-screen .fm27-auth-submit:hover,
body.fm27-midnight .fm27-auth-screen .fm27-auth-submit:focus-visible {
  background: #30977e;
  border-color: #64c5a9;
  color: #fff;
}
body.fm27-midnight .fm27-auth-screen .fm27-auth-links {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 9px 18px;
  margin-top: 21px;
  padding-top: 18px;
  border-top: 1px solid #374d69;
  font-size: .83rem;
  text-align: center;
}
body.fm27-midnight .fm27-auth-screen .fm27-auth-links a {
  color: #a9d9cd;
  text-decoration: none;
}
body.fm27-midnight .fm27-auth-screen .fm27-auth-links a:hover,
body.fm27-midnight .fm27-auth-screen .fm27-auth-links a:focus-visible {
  color: #e5fff6;
  text-decoration: underline;
}
body.fm27-midnight .fm27-auth-screen .fm27-auth-info {
  margin: 0;
  color: #cbd8ee;
  font-size: .91rem;
  line-height: 1.6;
}
body.fm27-midnight .fm27-auth-screen .fm27-auth-form .invalid-feedback,
body.fm27-midnight .fm27-auth-screen .fm27-auth-form .form-text {
  max-width: 100%;
  overflow-wrap: anywhere;
}
/* Captcha widgets can be wider than narrow cards; contain them without distorting inputs. */
body.fm27-midnight .fm27-auth-screen .fm27-auth-captcha {
  max-width: 100%;
  overflow-x: auto;
  margin: 4px 0 15px;
}
@media (max-width: 575.98px) {
  body.fm27-midnight .fm27-auth-screen { padding: 16px 0 34px; }
  body.fm27-midnight .fm27-auth-screen .fm27-auth-card {
    flex-basis: 100%;
    padding: 20px 17px;
    border-radius: 10px;
  }
  body.fm27-midnight .fm27-auth-screen .fm27-auth-heading { margin-bottom: 19px; }
}
