/* Kolory w zmiennych (issue #30): jasne w :root, ciemne pod [data-bs-theme="dark"]
   (ustawia go static/js/theme.js). Lewa część ze zdjęciem jest ciemna w obu trybach. */
:root {
  --auth-ink: #171719;
  --auth-muted: #77716e;
  --auth-soft-text: #9a9490;
  --auth-label: #302d2c;
  --auth-paper: #f4f2ee;
  --auth-line: #ded9d3;
  --auth-input-bg: #fff;
  --auth-input-line: #d9d4d0;
  --auth-pink: #e07db3;
  --auth-pink-hover: #f19bc8;
  --auth-on-pink: #171719;
  --auth-pink-text: #a85b87;
  --auth-pink-ring: rgba(224, 125, 179, .14);
  --auth-error: #b63d63;
  --auth-notice-bg: #f1f7f3;
  --auth-notice-line: #d8e4dc;
  --auth-notice-text: #356148;
  color-scheme: light;
  font-family: Inter, "Helvetica Neue", Arial, sans-serif;
}
[data-bs-theme="dark"] {
  --auth-ink: #f4f3f6;
  --auth-muted: #a8a3ad;
  --auth-soft-text: #8d8892;
  --auth-label: #d9d5dd;
  --auth-paper: #131215;
  --auth-line: #36333b;
  --auth-input-bg: #1c1b1f;
  --auth-input-line: #4a4650;
  /* Akcent fioletowy jak w panelu (club.css). */
  --auth-pink: #c07de8;
  --auth-pink-hover: #cf98ef;
  --auth-pink-text: #d6a8f2;
  --auth-pink-ring: rgba(192, 125, 232, .3);
  --auth-error: #ff8f9e;
  --auth-notice-bg: #172b20;
  --auth-notice-line: #2f5a3e;
  --auth-notice-text: #86d6a1;
  color-scheme: dark;
}
/* Akcent z Ustawień klubu, zakładka „Wygląd” (opis w club.css). */
:root[data-accent-light="purple"]:not([data-bs-theme="dark"]) {
  --auth-pink: #c07de8;
  --auth-pink-hover: #cf98ef;
  --auth-pink-text: #8450ad;
  --auth-pink-ring: rgba(192, 125, 232, .14);
}
:root[data-bs-theme="dark"][data-accent-dark="pink"] {
  --auth-pink: #e07db3;
  --auth-pink-hover: #f19bc8;
  --auth-pink-text: #f0a3cb;
  --auth-pink-ring: rgba(224, 125, 179, .3);
}

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

body.auth-page {
  min-height: 100svh;
  margin: 0;
  color: var(--auth-ink);
  background: var(--auth-paper);
}

.auth-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(440px, .95fr);
  min-height: 100svh;
}

.auth-visual {
  position: relative;
  isolation: isolate;
  min-height: 100svh;
  overflow: hidden;
  color: #fff;
  background: #262626;
}

.auth-visual__image,
.auth-visual__shade {
  position: absolute;
  inset: 0;
}

.auth-visual__image {
  z-index: -2;
  background-image: url("../img/home/popraw-explainer-detail.png");
  background-position: center;
  background-size: cover;
  filter: grayscale(1);
  transform: scale(1.02);
}

.auth-visual__shade {
  z-index: -1;
  background: linear-gradient(180deg, rgba(0, 0, 0, .18), rgba(0, 0, 0, .72));
}

.auth-visual__content {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100svh;
  padding: clamp(24px, 4vw, 56px);
}

.auth-visual__copy { max-width: 520px; padding-bottom: clamp(30px, 8vh, 100px); }
.auth-visual__copy > p {
  margin: 0 0 20px;
  color: var(--auth-pink);
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .2em;
  text-transform: uppercase;
}

.auth-visual__copy h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(3.5rem, 7vw, 7.2rem);
  font-weight: 900;
  letter-spacing: -.08em;
  line-height: .9;
}

.auth-visual__copy h1 span {
  position: relative;
  z-index: 0;
  color: #fff;
}

.auth-visual__copy h1 span::after {
  position: absolute;
  z-index: -1;
  right: 0;
  bottom: .02em;
  left: -.02em;
  height: .12em;
  content: "";
  background: var(--auth-pink);
}

.auth-visual__copy small {
  display: block;
  max-width: 340px;
  margin-top: 26px;
  color: rgba(255, 255, 255, .75);
  font-size: .92rem;
  line-height: 1.55;
}

.auth-panel {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: clamp(24px, 4vw, 58px);
  background: var(--auth-paper);
}

.auth-panel__top {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
}

.auth-panel__back {
  color: var(--auth-muted);
  font-size: .75rem;
  font-weight: 800;
  text-decoration: none;
}

.auth-panel__back:hover { color: var(--auth-ink); }

.auth-card {
  width: min(100%, 500px);
  margin: auto;
  padding: clamp(28px, 5vw, 52px) 0;
}

.auth-card__heading { margin-bottom: 32px; }
.auth-eyebrow {
  margin: 0 0 14px;
  color: var(--auth-pink-text);
  font-size: .7rem;
  font-weight: 900;
  letter-spacing: .2em;
  text-transform: uppercase;
}

.auth-card h2 {
  margin: 0 0 12px;
  font-size: clamp(2.4rem, 5vw, 4.4rem);
  font-weight: 900;
  letter-spacing: -.075em;
  line-height: .92;
}

.auth-card__heading > p:last-child {
  margin: 0;
  color: var(--auth-muted);
  font-size: .92rem;
  line-height: 1.55;
}

.auth-form__field { margin-bottom: 18px; }
.auth-form__field label,
.auth-card .form-label {
  display: block;
  margin-bottom: 7px;
  color: var(--auth-label);
  font-size: .74rem;
  font-weight: 900;
}

.auth-input,
.auth-card .form-control {
  display: block;
  width: 100%;
  min-height: 47px;
  padding: 11px 12px;
  border: 1px solid var(--auth-input-line);
  border-radius: 0;
  outline: 0;
  color: var(--auth-ink);
  background: var(--auth-input-bg);
  font: inherit;
  font-size: .86rem;
}

.auth-input:focus,
.auth-card .form-control:focus {
  border-color: var(--auth-pink);
  box-shadow: 0 0 0 3px var(--auth-pink-ring);
}

.auth-submit,
.auth-card .btn-primary-brand {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: 100%;
  min-height: 48px;
  margin-top: 5px;
  padding: 12px 16px 12px 19px;
  border: 0;
  border-radius: 0;
  color: var(--auth-on-pink);
  background: var(--auth-pink);
  font: inherit;
  font-size: .82rem;
  font-weight: 900;
  cursor: pointer;
  transition: background .18s ease, transform .18s ease;
}

a.auth-submit { text-decoration: none; }
.auth-submit:hover,
.auth-card .btn-primary-brand:hover { color: var(--auth-on-pink); background: var(--auth-pink-hover); transform: translateY(-2px); }
.auth-submit span,
.auth-join-link span {
  color: inherit;
  font-family: Inter, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.1rem;
  font-variant-emoji: text;
}
.auth-error,
.auth-error-list { color: var(--auth-error); font-size: .75rem; }
.auth-error { margin-bottom: 18px; }
.auth-error-list { margin: 5px 0 0; padding-left: 17px; }
.auth-notice {
  margin-bottom: 18px;
  padding: 10px 12px;
  border: 1px solid var(--auth-notice-line);
  background: var(--auth-notice-bg);
  color: var(--auth-notice-text);
  font-size: .75rem;
  line-height: 1.45;
}
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px 0 19px;
  color: var(--auth-soft-text);
  font-size: .72rem;
  text-transform: uppercase;
}

.auth-divider::before,
.auth-divider::after { flex: 1; height: 1px; content: ""; background: var(--auth-line); }
.auth-footer-text { margin: 0; color: var(--auth-muted); font-size: .8rem; }
.auth-form + .auth-footer-text,
.auth-submit + .auth-footer-text { margin-top: 18px; }
.auth-footer-text + .auth-footer-text { margin-top: 8px; }
.auth-footer-text a,
.auth-join-link { color: var(--auth-pink-text); font-weight: 900; text-decoration: none; }
.auth-footer-text a:hover,
.auth-join-link:hover { color: var(--auth-ink); }
.auth-join-link { display: inline-flex; align-items: center; gap: 7px; margin-top: 22px; font-size: .76rem; }

@media (max-width: 820px) {
  .auth-layout { display: block; }
  .auth-visual { display: none; }
  .auth-panel { min-height: 100svh; padding: 20px 18px 35px; }
  .auth-card { margin: 70px auto 0; padding: 0; }
}

@media (max-width: 480px) {
  .auth-panel__back { max-width: 120px; text-align: right; }
  .auth-card h2 { font-size: clamp(2.6rem, 13vw, 3.8rem); }
}
