:root {
  --login-ink: #173936;
  --login-green: #1f5a50;
  --login-green-dark: #123b37;
  --login-paper: #f6f3ec;
  --login-line: #d7dfda;
  --login-coral: #c65f45;
}

.login-page {
  min-height: 100dvh;
  margin: 0;
  color: var(--login-ink);
  background: var(--login-paper);
}

.login-shell {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(360px, 0.9fr) minmax(520px, 1.1fr);
}

.login-intro {
  position: relative;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(2rem, 5vw, 5rem);
  overflow: hidden;
  color: white;
  background:
    radial-gradient(circle at 80% 8%, rgba(255,255,255,.11) 0 16%, transparent 17%),
    var(--login-green-dark);
}

.login-intro::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.16;
  background-image:
    linear-gradient(45deg, transparent 46%, white 46% 51%, transparent 51%),
    linear-gradient(-45deg, transparent 46%, white 46% 51%, transparent 51%);
  background-size: 34px 34px;
  mask-image: linear-gradient(to top, black, transparent 72%);
}

.login-brand {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  align-self: flex-start;
  color: white;
  font-size: 1.35rem;
  font-weight: 900;
}

.login-brand img {
  width: 42px;
  height: 42px;
  padding: 5px;
  border-radius: 10px;
  background: white;
}

.login-intro-copy {
  position: relative;
  z-index: 1;
  max-width: 560px;
  margin-block: auto;
}

.login-intro-copy > p {
  color: #d5a36a;
  font-size: 0.86rem;
  font-weight: 800;
}

.login-intro h1 {
  margin: 0;
  font-size: clamp(2.3rem, 4.5vw, 4.8rem);
  line-height: 1.25;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.login-intro ul {
  display: grid;
  gap: 0.85rem;
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
  color: rgba(255,255,255,.68);
}

.login-intro li {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.login-intro li::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #d5a36a;
}

.login-motif {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  gap: 7px;
}

.login-motif span {
  width: 45px;
  height: 7px;
  background: rgba(255,255,255,.18);
}

.login-motif span:nth-child(2) {
  width: 70px;
  background: #d5a36a;
}

.login-motif span:nth-child(3) {
  width: 25px;
}

.login-motif span:nth-child(4) {
  width: 12px;
  background: var(--login-coral);
}

.login-panel {
  display: grid;
  place-items: center;
  padding: 2rem;
}

.login-card {
  width: min(100%, 440px);
}

.login-card-header {
  margin-bottom: 2rem;
}

.login-card-header p {
  margin: 0 0 0.55rem;
  color: var(--login-coral);
  font-size: 0.83rem;
  font-weight: 800;
}

.login-card-header h2 {
  margin: 0;
  color: var(--login-green-dark);
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -0.025em;
}

.login-card-header span {
  display: block;
  margin-top: 0.6rem;
  color: #6b7c77;
}

.login-error {
  display: grid;
  gap: 0.2rem;
  margin-bottom: 1.25rem;
  padding: 0.9rem 1rem;
  border-right: 4px solid #b94333;
  border-radius: 7px;
  color: #7f2c22;
  background: #fae8e4;
}

.login-error strong {
  font-size: 0.85rem;
}

.login-error span {
  font-size: 0.78rem;
}

.login-form {
  display: grid;
  gap: 1.25rem;
}

.login-field label {
  display: block;
  margin-bottom: 0.5rem;
  color: #405954;
  font-size: 0.82rem;
  font-weight: 800;
}

.login-field input {
  width: 100%;
  min-height: 52px;
  padding: 0 0.95rem;
  border: 1px solid var(--login-line);
  border-radius: 8px;
  color: var(--login-ink);
  background: rgba(255,255,255,.52);
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.login-field input::placeholder {
  color: #99a49f;
}

.login-field input:hover {
  border-color: #aebdb7;
  background: white;
}

.login-field input:focus {
  outline: none;
  border-color: var(--login-green);
  background: white;
  box-shadow: 0 0 0 4px rgba(31,90,80,.12);
}

.password-field {
  position: relative;
}

.password-field input {
  padding-left: 4.6rem;
}

.password-field button {
  position: absolute;
  top: 50%;
  left: 9px;
  min-height: 34px;
  padding: 0 0.65rem;
  border: 0;
  border-radius: 6px;
  color: var(--login-green);
  background: #e8efeb;
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 800;
  transform: translateY(-50%);
  cursor: pointer;
}

.remember-field {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: #5f726d;
  font-size: 0.82rem;
  cursor: pointer;
}

.remember-field input {
  width: 18px;
  height: 18px;
  accent-color: var(--login-green);
}

.login-submit {
  min-height: 54px;
  border: 0;
  border-radius: 8px;
  color: white;
  background: var(--login-green-dark);
  box-shadow: 0 12px 25px rgba(18,59,55,.18);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 900;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.login-submit:hover {
  background: var(--login-green);
  box-shadow: 0 15px 30px rgba(18,59,55,.22);
  transform: translateY(-2px);
}

.login-submit:active {
  transform: translateY(0);
}

.login-support {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--login-line);
  color: #71827e;
  font-size: 0.76rem;
}

.login-support a {
  white-space: nowrap;
  color: var(--login-coral);
  font-weight: 800;
}

.login-back {
  display: inline-block;
  margin-top: 1.5rem;
  color: #60746f;
  font-size: 0.8rem;
  font-weight: 700;
}

.login-back::before {
  content: "→";
  margin-left: 0.4rem;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 3px solid rgba(198,95,69,.45);
  outline-offset: 3px;
}

@media (max-width: 900px) {
  .login-shell {
    grid-template-columns: 1fr;
  }

  .login-intro {
    min-height: 340px;
    padding: 2rem;
  }

  .login-intro h1 {
    max-width: 650px;
    font-size: clamp(2.1rem, 8vw, 3.7rem);
  }

  .login-intro ul,
  .login-motif {
    display: none;
  }

  .login-panel {
    padding-block: 3.5rem;
  }
}

@media (max-width: 520px) {
  .login-intro {
    min-height: 280px;
    padding: 1.4rem;
  }

  .login-intro-copy {
    margin-top: 3rem;
  }

  .login-panel {
    padding: 2.5rem 1.25rem;
  }

  .login-support {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
