/* Strona logowania — układ flow, grid 2 kolumny (treść + grafika). */

.page-login {
  background: linear-gradient(180deg, var(--c-teal) 0%, var(--c-teal-darker) 100%);
  min-height: 100vh;
  color: #FFFFFF;
}

.login {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 600px;
  max-width: 1440px;
  margin: 0 auto;
  min-height: 100vh;
}

.login__content {
  padding: 80px 80px 60px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.login__title {
  margin: 0;
  font-family: 'Livvic', 'Lato', sans-serif;
  font-weight: 700;
  font-size: 80px;
  line-height: 1;
  letter-spacing: -0.01em;
}

.login__subtitle {
  margin: 0;
  font-family: 'Livvic', 'Lato', sans-serif;
  font-weight: 600;
  font-size: 44px;
  line-height: 1.1;
  color: var(--c-yellow);
}

.login__sub {
  margin: 0;
  font-family: 'Lato', sans-serif;
  font-size: 18px;
  line-height: 1.4;
}

.login__graphics-wrap {
  display: block;
}
.login__graphics {
  width: 100%;
  height: 100%;
  max-height: 100vh;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* Formularz */

.login__form {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 648px;
}

.login__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.login__field {
  position: relative;
  display: block;
}

.login__label {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

.login__field input,
.login__field select {
  width: 100%;
  height: 64px;
  background: #FFFFFF;
  border: 0;
  border-radius: 4px;
  padding: 0 24px;
  font-family: 'Lato', sans-serif;
  font-size: 18px;
  font-weight: 400;
  color: var(--c-text-muted);
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  letter-spacing: 0.01em;
}
.login__field input::placeholder { color: #7A8A8E; opacity: 1; }
.login__field input:focus,
.login__field select:focus { box-shadow: 0 0 0 2px var(--c-yellow); }

.login__field.is-invalid input,
.login__field.is-invalid select { box-shadow: 0 0 0 2px #E0463C; }

.login__pwz-status {
  position: absolute;
  right: 16px; top: 50%;
  width: 22px; height: 22px;
  transform: translateY(-50%);
  pointer-events: none;
}
.login__field.is-valid .login__pwz-status::after {
  content: ''; position: absolute; inset: 0;
  background: var(--c-teal);
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='black' d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4L9 16.2z'/></svg>") center/20px no-repeat;
          mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='black' d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4L9 16.2z'/></svg>") center/20px no-repeat;
}

.login__field--select select { padding-right: 48px; }
.login__select-arrow {
  position: absolute;
  right: 20px; top: 50%;
  transform: translateY(-50%);
  width: 14px; height: 8px;
  background: var(--c-text-muted);
  -webkit-clip-path: polygon(0 0, 100% 0, 50% 100%);
          clip-path: polygon(0 0, 100% 0, 50% 100%);
  pointer-events: none;
}

.login__consent {
  margin: 0;
  font-family: 'Lato', sans-serif;
  font-size: 13px;
  line-height: 18px;
}

.login__check {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  cursor: pointer;
  user-select: none;
}
.login__check input[type='checkbox'] {
  position: absolute;
  width: 22px; height: 22px;
  margin: 0; opacity: 0; cursor: pointer;
}
.login__check-box {
  position: relative;
  flex: 0 0 22px;
  width: 22px; height: 22px;
  background: #FFFFFF;
  border-radius: 3px;
  margin-top: 2px;
}
.login__check input[type='checkbox']:checked + .login__check-box {
  background: var(--c-yellow);
}
.login__check input[type='checkbox']:checked + .login__check-box::after {
  content: '';
  position: absolute; inset: 0;
  background: var(--c-text-muted);
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='black' d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4L9 16.2z'/></svg>") center/16px no-repeat;
          mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='black' d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4L9 16.2z'/></svg>") center/16px no-repeat;
}
.login__check-text {
  font-family: 'Lato', sans-serif;
  font-size: 14px;
  line-height: 20px;
}
.login__link {
  color: var(--c-yellow);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.login__link:hover { text-decoration-thickness: 2px; }

.login__submit {
  width: 312px;
  max-width: 100%;
  height: 60px;
  background: var(--c-yellow);
  color: var(--c-text-muted);
  font-family: 'Lato', sans-serif;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.02em;
  border: 0;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  cursor: pointer;
  transition: background 120ms ease, transform 120ms ease;
}
.login__submit:hover { background: #FFD400; }
.login__submit:active { transform: translateY(1px); }
.login__submit[disabled] { opacity: 0.7; cursor: progress; }

.login__submit-loader {
  display: none;
  width: 18px; height: 18px;
  border: 2px solid var(--c-text-muted);
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}
.login__submit.is-loading .login__submit-loader { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

.login__error {
  position: relative;
  padding: 12px 16px 12px 44px;
  background: #FFE5E2;
  border: 1px solid #E0463C;
  border-left: 4px solid #E0463C;
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  font-family: 'Lato', sans-serif;
  font-size: 14px;
  line-height: 18px;
  color: #8A1F18;
  font-weight: 600;
  animation: loginErrorIn 180ms ease-out;
}
.login__error::before {
  content: '!';
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px; height: 20px;
  background: #E0463C;
  color: #FFFFFF;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 14px;
  line-height: 1;
}
.login__error:empty { display: none; }
@keyframes loginErrorIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.login__dev {
  font-size: 11px;
  color: rgba(255,255,255,0.4);
  text-decoration: underline;
  align-self: flex-start;
}

/* Responsywność */
@media (max-width: 1100px) {
  .login { grid-template-columns: 1fr; }
  .login__graphics-wrap { display: none; }
  .login__content { padding: 48px 32px; }
  .login__title { font-size: 56px; }
  .login__subtitle { font-size: 32px; }
}
@media (max-width: 600px) {
  .login__row { grid-template-columns: 1fr; }
  .login__title { font-size: 40px; }
  .login__subtitle { font-size: 24px; }
  .login__submit { width: 100%; }
}
