:root {
  --burgundy-950: #3d0d12;
  --burgundy-900: #581017;
  --burgundy-800: #72161e;
  --burgundy-700: #8f1d25;
  --burgundy-600: #a8242d;
  --burgundy-500: #c62b34;

  --gray-950: #17191c;
  --gray-900: #202328;
  --gray-800: #30343a;
  --gray-700: #4d525a;
  --gray-600: #686e77;
  --gray-500: #858b93;
  --gray-400: #aeb2b8;
  --gray-300: #d2d5d9;
  --gray-200: #e8e9eb;
  --gray-100: #f3f4f5;
  --gray-50: #f8f8f9;

  --white: #ffffff;
  --green: #27835b;
  --red: #b4232d;

  --shadow:
    0 30px 80px rgb(23 25 28 / 12%);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  min-height: 100%;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;

  color: var(--gray-900);
  background: var(--gray-50);

  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;

  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body,
button,
input {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  border: 0;
}

button {
  cursor: pointer;
}

img,
svg {
  display: block;
}

.login-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns:
    minmax(470px, 0.95fr)
    minmax(520px, 1.05fr);
}

/* Lewa część */

.login-presentation {
  position: relative;
  min-height: 100vh;
  padding: 46px 58px;

  display: flex;
  flex-direction: column;
  overflow: hidden;

  color: var(--white);

  background:
    linear-gradient(
      135deg,
      rgb(16 18 22 / 96%),
      rgb(35 26 31 / 94%)
    ),
    url("/image/banergfim.png") center / cover no-repeat;
}

.login-presentation::before {
  content: "";
  position: absolute;
  top: -180px;
  right: -160px;

  width: 520px;
  height: 520px;

  background:
    radial-gradient(
      circle,
      rgb(198 43 52 / 34%),
      transparent 68%
    );

  border-radius: 50%;
  pointer-events: none;
}

.login-presentation::after {
  content: "";
  position: absolute;
  inset: 0;

  opacity: 0.14;

  background-image:
    linear-gradient(
      rgb(255 255 255 / 8%) 1px,
      transparent 1px
    ),
    linear-gradient(
      90deg,
      rgb(255 255 255 / 8%) 1px,
      transparent 1px
    );

  background-size: 52px 52px;
  mask-image:
    linear-gradient(to bottom, #000, transparent 92%);

  pointer-events: none;
}

.login-presentation-overlay {
  position: absolute;
  inset: 0;

  background:
    linear-gradient(
      90deg,
      rgb(20 21 24 / 98%) 0%,
      rgb(29 25 29 / 92%) 55%,
      rgb(61 13 18 / 66%) 100%
    );

  pointer-events: none;
}

.presentation-header,
.presentation-content,
.presentation-footer {
  position: relative;
  z-index: 2;
}

.presentation-brand {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.presentation-brand img {
  width: 58px;
  height: 58px;
  object-fit: cover;
  background: #686c72;
  border-radius: 15px;
  box-shadow: 0 12px 28px rgb(0 0 0 / 26%);
}

.presentation-brand > span,
.mobile-brand a > span {
  display: flex;
  flex-direction: column;
  line-height: 1.12;
}

.presentation-brand strong,
.mobile-brand strong {
  color: var(--white);
  font-size: 1.18rem;
  font-weight: 850;
  letter-spacing: 0.09em;
}

.presentation-brand small,
.mobile-brand small {
  margin-top: 5px;

  color: rgb(255 255 255 / 62%);
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.05em;
}

.presentation-content {
  width: min(100%, 680px);
  margin-block: auto;
  padding-block: 70px;
}

.presentation-label {
  display: inline-block;
  margin-bottom: 23px;

  color: #ee9fa5;

  font-size: 0.76rem;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.presentation-content h1 {
  margin: 0;

  color: var(--white);

  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3rem, 5vw, 5.25rem);
  font-weight: 700;
  line-height: 1.03;
  letter-spacing: -0.045em;
}

.presentation-content h1 span {
  display: block;
  color: #dc525b;
}

.presentation-content > p {
  max-width: 620px;
  margin: 28px 0 0;

  color: rgb(255 255 255 / 68%);
  font-size: 1rem;
  line-height: 1.75;
}

.presentation-benefits {
  margin: 35px 0 0;
  padding: 0;

  display: grid;
  gap: 15px;

  list-style: none;
}

.presentation-benefits li {
  display: flex;
  align-items: center;
  gap: 12px;

  color: rgb(255 255 255 / 84%);
  font-size: 0.89rem;
}

.benefit-icon {
  width: 25px;
  height: 25px;

  display: grid;
  place-items: center;
  flex-shrink: 0;

  color: var(--white);
  background:
    linear-gradient(
      135deg,
      var(--burgundy-500),
      var(--burgundy-700)
    );

  border-radius: 50%;

  font-size: 0.75rem;
  font-weight: 900;
}

.presentation-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 25px;

  color: rgb(255 255 255 / 48%);
  font-size: 0.75rem;
}

.presentation-footer a {
  display: inline-flex;
  align-items: center;
  gap: 8px;

  color: rgb(255 255 255 / 78%);
  font-weight: 750;
}

.presentation-footer a:hover {
  color: var(--white);
}

/* Formularz */

.login-form-section {
  min-height: 100vh;
  padding: 50px;

  display: grid;
  place-items: center;

  background:
    radial-gradient(
      circle at 90% 10%,
      rgb(143 29 37 / 7%),
      transparent 32%
    ),
    var(--gray-50);
}

.login-form-wrapper {
  width: min(100%, 470px);
  padding: 46px;

  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 26px;

  box-shadow: var(--shadow);
}

.mobile-brand {
  display: none;
}

.login-eyebrow {
  color: var(--burgundy-700);

  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.login-heading h2 {
  margin: 12px 0 0;

  color: var(--gray-950);
  font-size: 2.35rem;
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.login-heading p {
  margin: 13px 0 0;

  color: var(--gray-600);
  font-size: 0.9rem;
}

.form-alert {
  margin-top: 25px;
  padding: 13px 15px;

  display: flex;
  align-items: center;
  gap: 11px;

  border-radius: 11px;

  font-size: 0.82rem;
  font-weight: 600;
}

.form-alert-error {
  color: #801921;
  background: #fff0f1;
  border: 1px solid #f2c5c9;
}

.form-alert-success {
  color: #176342;
  background: #eefaf4;
  border: 1px solid #bfe4d1;
}

.alert-icon {
  width: 23px;
  height: 23px;

  display: grid;
  place-items: center;
  flex-shrink: 0;

  color: var(--white);
  background: currentColor;
  border-radius: 50%;

  font-size: 0.72rem;
  font-weight: 900;
}

.form-alert-error .alert-icon {
  background: var(--red);
}

.form-alert-success .alert-icon {
  background: var(--green);
}

.login-form {
  margin-top: 30px;
  display: grid;
  gap: 20px;
}

.form-field {
  display: grid;
  gap: 8px;
}

.form-field label,
.field-heading label {
  color: var(--gray-800);
  font-size: 0.8rem;
  font-weight: 750;
}

.field-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}

.field-heading a {
  color: var(--burgundy-700);
  font-size: 0.72rem;
  font-weight: 700;
}

.field-heading a:hover {
  text-decoration: underline;
}

.input-wrapper {
  position: relative;
}

.input-wrapper input {
  width: 100%;
  height: 54px;
  padding: 0 48px;

  color: var(--gray-900);
  background: var(--gray-50);
  border: 1px solid var(--gray-300);
  border-radius: 12px;

  font-size: 0.9rem;
  outline: none;

  transition:
    border-color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease;
}

.input-wrapper input::placeholder {
  color: var(--gray-400);
}

.input-wrapper input:hover {
  border-color: var(--gray-400);
}

.input-wrapper input:focus {
  background: var(--white);
  border-color: var(--burgundy-600);

  box-shadow:
    0 0 0 4px rgb(168 36 45 / 10%);
}

.input-icon {
  position: absolute;
  top: 50%;
  left: 16px;
  z-index: 2;

  color: var(--gray-500);
  transform: translateY(-50%);

  pointer-events: none;
}

.input-icon svg {
  width: 20px;
  height: 20px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 12px;

  width: 35px;
  height: 35px;

  display: grid;
  place-items: center;

  color: var(--gray-500);
  background: transparent;
  border-radius: 8px;

  transform: translateY(-50%);
}

.password-toggle:hover {
  color: var(--burgundy-700);
  background: rgb(143 29 37 / 7%);
}

.password-toggle svg {
  width: 20px;
  height: 20px;
}

.remember-field {
  width: fit-content;

  display: flex;
  align-items: center;
  gap: 10px;

  color: var(--gray-600);
  font-size: 0.76rem;
  cursor: pointer;
}

.remember-field input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.custom-checkbox {
  width: 20px;
  height: 20px;

  display: grid;
  place-items: center;
  flex-shrink: 0;

  color: transparent;
  background: var(--white);
  border: 1px solid var(--gray-300);
  border-radius: 6px;

  transition:
    color 150ms ease,
    background 150ms ease,
    border-color 150ms ease;
}

.custom-checkbox svg {
  width: 14px;
  height: 14px;
}

.remember-field input:checked + .custom-checkbox {
  color: var(--white);
  background: var(--burgundy-700);
  border-color: var(--burgundy-700);
}

.remember-field input:focus-visible + .custom-checkbox {
  outline: 3px solid rgb(168 36 45 / 18%);
  outline-offset: 2px;
}

.login-button {
  width: 100%;
  min-height: 54px;
  padding: 0 20px;

  display: flex;
  align-items: center;
  justify-content: center;
  gap: 11px;

  color: var(--white);

  background:
    linear-gradient(
      135deg,
      var(--burgundy-700),
      var(--burgundy-500)
    );

  border-radius: 12px;

  font-weight: 800;

  box-shadow:
    0 16px 35px rgb(143 29 37 / 24%);

  transition:
    transform 160ms ease,
    box-shadow 160ms ease;
}

.login-button:hover {
  transform: translateY(-2px);

  box-shadow:
    0 20px 44px rgb(143 29 37 / 34%);
}

.login-button:active {
  transform: translateY(0);
}

.login-button svg {
  width: 19px;
  height: 19px;
}

.login-security {
  margin-top: 28px;
  padding: 15px;

  display: flex;
  align-items: flex-start;
  gap: 11px;

  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: 11px;
}

.login-security svg {
  width: 21px;
  height: 21px;
  flex-shrink: 0;

  color: var(--green);
}

.login-security p {
  margin: 0;

  color: var(--gray-500);
  font-size: 0.7rem;
  line-height: 1.55;
}

.login-support {
  margin-top: 25px;

  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 5px;

  color: var(--gray-500);
  font-size: 0.75rem;
  text-align: center;
}

.login-support a {
  color: var(--burgundy-700);
  font-weight: 750;
}

.login-support a:hover {
  text-decoration: underline;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid rgb(168 36 45 / 25%);
  outline-offset: 3px;
}

@media (max-width: 980px) {
  .login-page {
    grid-template-columns: 1fr;
  }

  .login-presentation {
    display: none;
  }

  .login-form-section {
    padding: 28px;
  }

  .mobile-brand {
    margin-bottom: 40px;
    display: block;
  }

  .mobile-brand a {
    display: inline-flex;
    align-items: center;
    gap: 12px;
  }

  .mobile-brand img {
    width: 52px;
    height: 52px;
    object-fit: cover;
    background: #686c72;
    border-radius: 13px;
  }

  .mobile-brand strong {
    color: var(--gray-950);
  }

  .mobile-brand small {
    color: var(--gray-500);
  }
}

@media (max-width: 560px) {
  .login-form-section {
    min-height: 100svh;
    padding: 20px 14px;
    align-items: start;
  }

  .login-form-wrapper {
    margin-top: 10px;
    padding: 31px 22px;

    border-radius: 20px;
  }

  .mobile-brand {
    margin-bottom: 31px;
  }

  .login-heading h2 {
    font-size: 2rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}