/* Login / register / language screens.
   Card surface, borders, radii, type and button colours follow the in-app
   tokens (--surface / --brand / --line / --radius) so the entry screens and
   the member area read as one product. */
.auth-screen {
  position: relative;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 40px 20px 64px;
  background: #2a1410 url('/ui/assets/auth/login-bg.jpg') center / cover no-repeat;
  isolation: isolate;
  overflow-x: hidden;
}
.auth-screen::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(28, 10, 8, 0.28) 0%, rgba(28, 10, 8, 0.46) 55%, rgba(28, 10, 8, 0.62) 100%);
}
.auth-lang,
.auth-back {
  position: fixed;
  top: 18px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.34);
  backdrop-filter: blur(6px);
}
.auth-lang { right: 18px; }
.auth-back { left: 18px; }
.auth-lang svg,
.auth-back svg { width: 20px; height: 20px; }
.auth-lang:hover,
.auth-back:hover { background: rgba(255, 255, 255, 0.3); }

.auth-card {
  width: min(430px, 100%);
  padding: 34px 30px 26px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 24px 50px rgba(38, 12, 26, 0.3);
  text-align: center;
}
.auth-brand {
  margin: 0;
  font-size: clamp(30px, 8vw, 36px);
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1;
  color: var(--brand);
}
.auth-tagline {
  margin: 10px auto 24px;
  max-width: 30ch;
  color: #6f5f64;
  font-size: 14px;
  line-height: 1.5;
}
.auth-form { display: grid; gap: 12px; text-align: left; }
.auth-field { position: relative; display: block; }
.auth-field > svg {
  position: absolute;
  left: 15px;
  top: 50%;
  width: 18px;
  height: 18px;
  transform: translateY(-50%);
  color: #a08a92;
  pointer-events: none;
}
.auth-field input {
  width: 100%;
  height: 52px;
  padding: 0 46px 0 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.auth-field input::placeholder { color: #ad9aa2; }
.auth-field input:focus {
  outline: none;
  border-color: rgba(80, 37, 54, 0.55);
  box-shadow: 0 0 0 3px rgba(80, 37, 54, 0.12);
}
.auth-field .icon-button {
  position: absolute;
  right: 7px;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  padding: 0;
  color: #a08a92;
  background: transparent;
  border: 0;
  font-size: 0; /* label stays for screen readers, the icon carries the visual */
  overflow: hidden;
}
.auth-field .icon-button svg { width: 19px; height: 19px; }
.auth-card .form-error {
  margin: 0 0 4px;
  padding: 10px 12px;
  border: 1px solid #f0cdd9;
  border-radius: var(--radius);
  background: #fdf2f6;
  color: #8c1c46;
  font-size: 13px;
  text-align: left;
}
.auth-cta {
  width: 100%;
  height: 52px;
  margin-top: 4px;
  border: 1px solid var(--brand);
  border-radius: var(--radius);
  color: #fff;
  font: inherit;
  font-weight: 700;
  font-size: 16px;
  background: var(--brand);
  box-shadow: 0 10px 20px rgba(80, 37, 54, 0.22);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
}
.auth-cta:hover { background: var(--brand-hover, #3f1b2a); }
.auth-cta svg { width: 18px; height: 18px; }
.auth-cta:disabled { opacity: 0.6; cursor: progress; }
.auth-switch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 50px;
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--brand);
  font-weight: 600;
  font-size: 15px;
}
.auth-switch:hover { background: #faf4f1; }

.auth-card--lang { width: min(560px, 100%); padding: 30px 26px 26px; text-align: left; }
.auth-card--lang .auth-brand { text-align: center; }
.auth-lang-title {
  margin: 14px 0 18px;
  color: var(--brand);
  font-size: 20px;
  font-weight: 700;
  text-align: center;
}
.auth-card--lang .language-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.auth-card--lang .language-choice { width: 100%; }

.auth-foot {
  margin: 4px 0 0;
  color: rgba(255, 244, 236, 0.86);
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  text-align: center;
}
@media (max-width: 640px) {
  .auth-screen {
    background-image: url('/ui/assets/auth/login-bg-mobile.jpg');
    padding: 28px 16px 52px;
    justify-content: flex-end;
  }
  .auth-card { padding: 26px 20px 22px; border-radius: 16px; }
  .auth-card--lang { padding: 24px 18px 20px; }
  .auth-card--lang .language-grid { grid-template-columns: minmax(0, 1fr); }
  .auth-tagline { margin-bottom: 18px; }
}
