/* ============================================================
   SpinMafia – Login Styles (namespaced, flex-centered, responsive)
   File: static/css/login_style.css
   Version: v=login6-flex
   ============================================================ */

/* ---------- Tokens / Defaults ---------- */
:root{
  --auth-bg: #0b0c10;
  --auth-text: #e8ebf1;
  --auth-muted: #a8adb5;

  --card-bg: rgba(255,255,255,.05);
  --card-stroke: rgba(255,255,255,.14);

  --input-bg: rgba(255,255,255,.08);
  --input-bg-focus: rgba(255,255,255,.10);
  --input-border: rgba(255,255,255,.22);
  --input-border-focus: rgba(255,183,3,.65);
  --input-shadow-inset: inset 0 1px 0 rgba(255,255,255,.06), inset 0 0 0 1px rgba(255,255,255,.02);

  --focus-ring: rgba(255,183,3,.18);

  /* Optional: falls du feste Header/Footer-Höhen kennst, hier überschreiben */
  --header-h: 0px;
  --footer-h: 0px;
}

/* ---------- Layout (Flex-Centering + Guards) ---------- */
.sm-auth{
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1 0 auto;
  min-height: calc(100svh - var(--header-h, 0px) - var(--footer-h, 0px));
  padding: clamp(20px, 3vh, 36px) 16px;
  background: var(--auth-bg);
  overscroll-behavior: contain;
}

/* Border-box nur im Namespace, damit nichts global beeinflusst wird */
.sm-auth *, .sm-auth *::before, .sm-auth *::after { box-sizing: border-box; }

.sm-auth__card{
  width: min(560px, 92vw);
  max-width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--card-bg);
  border: 1px solid var(--card-stroke);
  border-radius: 18px;
  padding: 24px 22px;
  color: var(--auth-text);
  backdrop-filter: blur(8px);
  box-shadow: 0 16px 40px rgba(0,0,0,.35);
  min-width: 0; /* verhindert Flex-Überlauf */
}

/* ---------- Typography ---------- */
.sm-auth__title{
  margin: 0 0 6px;
  font-family: "Bebas Neue", system-ui, sans-serif;
  font-size: clamp(30px, 4vw, 42px);
  letter-spacing: .4px;
  color: #fff;
}
.sm-auth__sub{
  margin: 0 0 14px;
  font-family: "Manrope", system-ui, sans-serif;
  color: var(--auth-muted);
}

/* ---------- Form Controls ---------- */
.sm-auth__form{
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0; /* wichtig gegen Overflow */
}

.sm-label{
  display: block;
  margin: 12px 0 6px;
  font: 700 14px/1 "Manrope", system-ui, sans-serif;
  color: var(--auth-text);
}

.sm-input{
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: 46px;
  border-radius: 12px;
  border: 1px solid var(--input-border);
  background: var(--input-bg);
  color: #fff;
  padding: 0 14px;
  outline: 0;
  box-shadow: var(--input-shadow-inset);
  transition: all .18s ease;
}
.sm-input::placeholder{ color: rgba(255,255,255,.55); }
.sm-input:focus{
  background: var(--input-bg-focus);
  border-color: var(--input-border-focus);
  box-shadow: var(--input-shadow-inset), 0 0 0 4px var(--focus-ring);
}

/* Autofill-Darstellung angleichen (Chrome/Safari/Edge) */
.sm-input:-webkit-autofill,
.sm-input:-webkit-autofill:hover,
.sm-input:-webkit-autofill:focus{
  -webkit-text-fill-color: #fff;
  transition: background-color 5000s ease-in-out 0s;
  box-shadow: var(--input-shadow-inset), 0 0 0 30px var(--input-bg) inset !important;
}

/* ---------- Button ---------- */
.sm-btn{
  margin-top: 14px;
  width: 100%;
  border: 0;
  border-radius: 999px;
  padding: 14px 16px;
  font-weight: 800;
  letter-spacing: .2px;
  color: #111;
  background: linear-gradient(90deg, #ff3b2f, #ffb703);
  box-shadow: 0 10px 22px rgba(255,82,0,.25), 0 1px 0 rgba(255,255,255,.15) inset;
  transition: transform .12s ease, filter .12s ease;
}
.sm-btn:hover{ filter: brightness(1.04); transform: translateY(-1px); }
.sm-btn:active{ transform: translateY(0); }
.sm-btn:focus-visible{ outline: 2px solid #fff; outline-offset: 2px; }

/* ---------- Meta / Links / Alerts ---------- */
.sm-auth__meta{
  text-align: center;
  margin-top: 14px;
  color: var(--auth-muted);
}
.sm-auth__meta a{
  color: #ffb703;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.sm-auth__alert{
  border-radius: 12px;
  background: rgba(255,56,56,.12);
  border: 1px solid rgba(255,56,56,.38);
  color: #ffdede;
  padding: 10px 12px;
  margin-bottom: 12px;
}

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: no-preference){
  .sm-auth__card, .sm-input, .sm-btn { transition: all .18s ease; }
}

/* ---------- Responsive ---------- */
@media (max-width: 576px){
  .sm-auth__card{ border-radius: 16px; padding: 20px 16px; }
  .sm-input{ height: 48px; }
  .sm-btn{ padding: 14px 18px; }
}
