/* Logowanie — pełnoekranowa karta, poza układem tablicy.
   Styl przeniesiony 1:1 z projektu dcodemanagement (static/features/css/auth.css).
   Celowo NIE korzysta z palety :root ze styles.css — to samodzielna strona;
   styles.css nie jest tu w ogóle ładowany. */

/* --- minimalny reset (odpowiednik base.css z dcodemanagement) --- */
* {
  box-sizing: border-box;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

/* --- logowanie --- */
.auth-body {
  height: 100%;
  margin: 0;
  padding: 0;
  font-family: "IBM Plex Sans", sans-serif;
}

.auth-body a {
  color: oklch(0.52 0.10 180);
  text-decoration: none;
}

.auth-body a:hover {
  color: oklch(0.42 0.10 185);
}

.auth-body input::placeholder {
  color: oklch(0.65 0.02 185);
}

.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: oklch(0.24 0.045 195);
}

.auth-card {
  width: 400px;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 40px 36px;
  border-radius: 20px;
  background: oklch(0.98 0.005 180);
  box-shadow: 0 24px 60px oklch(0.12 0.03 195 / 0.5);
}

.auth-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
}

/* Odstępstwo od oryginału: w kwadracie jest logo (limonkowa strzałka) zamiast litery "D".
   Ciemne tło zostaje — karta logowania jest jasna, więc limonka potrzebuje kontrastu. */
.auth-mark {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: oklch(0.40 0.08 185);
  padding: 8px;
}

.auth-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.auth-titles {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.auth-titles strong {
  color: oklch(0.25 0.04 195);
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 22px;
}

.auth-titles span {
  color: oklch(0.52 0.03 190);
  font-size: 14px;
}

.auth-fields {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.auth-fields label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: oklch(0.40 0.03 190);
  font-size: 13px;
  font-weight: 500;
}

.auth-fields input {
  padding: 12px 14px;
  border: 1px solid oklch(0.85 0.02 185);
  border-radius: 10px;
  background: oklch(1 0 0);
  color: oklch(0.25 0.03 195);
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 15px;
  /* reset wyżej ustawia `font: inherit`, więc bez tego input dziedziczy 500 z etykiety. */
  font-weight: 400;
  outline: none;
}

.auth-fields input:focus {
  border-color: oklch(0.55 0.09 180);
  box-shadow: 0 0 0 3px oklch(0.85 0.06 175 / 0.4);
}

.auth-actions {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.auth-submit {
  padding: 14px;
  border: none;
  border-radius: 999px;
  background: oklch(0.40 0.08 185);
  color: oklch(0.97 0.01 180);
  font-family: "Space Grotesk", sans-serif;
  font-weight: 500;
  font-size: 16px;
  cursor: pointer;
}

.auth-submit:hover {
  background: oklch(0.35 0.08 188);
}

/* Błędy logowania — dopasowane do palety karty. */
.auth-errors {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 14px;
  border: 1px solid oklch(0.80 0.07 25);
  border-radius: 10px;
  background: oklch(0.96 0.02 25);
  color: oklch(0.45 0.14 25);
  font-size: 13px;
  line-height: 1.45;
}

/* Zagnieżdżone pod .auth-body, żeby wygrać z ogólną regułą `.auth-body a`
   — link leży na ciemnym tle, więc musi zostać jasny. */
.auth-body .auth-back {
  position: fixed;
  top: 28px;
  left: 48px;
  color: oklch(0.75 0.04 180);
  font-size: 14px;
  white-space: nowrap;
}

.auth-body .auth-back:hover {
  color: oklch(0.90 0.06 172);
}

@media (max-width: 640px) {
  .auth-body .auth-back {
    top: 18px;
    left: 22px;
  }

  .auth-page {
    padding: 72px 20px 24px;
  }

  /* poniżej 16 px Safari na iOS przybliża stronę przy wejściu w pole */
  .auth-fields input {
    font-size: 16px;
  }

  .auth-card {
    padding: 26px 22px 28px;
  }
}
