:root {
  color-scheme: light;
}

body {
  margin: 0;
  background: #ecfdf5;
}

.auth-page {
  --auth-ink: #172033;
  --auth-muted: #596579;
  --auth-surface: #ffffff;
  --auth-border: rgb(23 32 51 / 18%);
  --auth-focus: #155eef;
  --auth-error: #b42318;
  --auth-brand: #3f7600;
  --auth-brand-hover: #305c00;
  box-sizing: border-box;
  display: flex;
  min-height: 100vh;
  min-height: 100dvh;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  color: var(--auth-ink);
  background: linear-gradient(to right, #ecfdf5, #7ccf00);
  font-family: Poppins, 'Segoe UI', sans-serif;
}

.auth-page *,
.auth-page *::before,
.auth-page *::after {
  box-sizing: inherit;
}

.auth-card {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 100%;
  max-width: 48rem;
  min-height: 30rem;
  overflow: hidden;
  border: 1px solid var(--auth-border);
  border-radius: 30px;
  background: var(--auth-surface);
  box-shadow: 0 8px 24px rgb(23 32 51 / 18%);
}

.auth-content {
  display: flex;
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  padding: 2.5rem;
}

.auth-brand-panel {
  display: flex;
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: linear-gradient(288deg, #7ccf00, #5aa400);
}

.auth-header {
  margin-bottom: 2.25rem;
  text-align: center;
}

.auth-logo {
  display: block;
  width: 14rem;
  max-width: 100%;
  height: auto;
  object-fit: contain;
}

.auth-header h1 {
  margin: 0;
  font-family: Montserrat, Poppins, sans-serif;
  font-size: clamp(1.5rem, 4vw, 1.875rem);
  font-weight: 600;
  line-height: 1.25;
  color: var(--auth-brand);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.auth-form[hidden] {
  display: none;
}

.auth-field label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.4;
}

.auth-field input {
  display: block;
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--auth-border);
  border-radius: 6px;
  padding: 0.65rem 0.75rem;
  color: var(--auth-ink);
  background: var(--auth-surface);
  font:
    400 0.875rem/1.4 Poppins,
    'Segoe UI',
    sans-serif;
}

.auth-field input::placeholder {
  color: var(--auth-muted);
  opacity: 0.8;
}

.auth-field input:hover {
  border-color: var(--auth-muted);
}

.auth-field input[aria-invalid='true'] {
  border-color: var(--auth-error);
}

.auth-error {
  margin: 0.4rem 0 0;
  color: var(--auth-error);
  font-size: 0.75rem;
  line-height: 1.45;
}

.auth-remember {
  display: flex;
  min-height: 24px;
  align-items: center;
  gap: 0.625rem;
}

.auth-remember input {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--auth-brand);
  cursor: pointer;
}

.auth-remember label {
  color: var(--auth-ink);
  font-size: 0.8125rem;
  line-height: 1.4;
  cursor: pointer;
}

.auth-submit {
  width: min(100%, 10rem);
  min-height: 44px;
  align-self: center;
  border: 1px solid var(--auth-brand);
  border-radius: 6px;
  padding: 0.625rem 1rem;
  color: #ffffff;
  background: var(--auth-brand);
  font:
    600 0.875rem/1.25 Poppins,
    'Segoe UI',
    sans-serif;
  cursor: pointer;
}

.auth-submit:hover {
  border-color: var(--auth-brand-hover);
  background: var(--auth-brand-hover);
}

.auth-page input:focus-visible,
.auth-page button:focus-visible {
  outline: 3px solid var(--auth-focus);
  outline-offset: 2px;
}

@media (max-width: 680px) {
  .auth-page {
    padding: 1rem;
  }

  .auth-card {
    display: flex;
    max-width: 27rem;
    min-height: 0;
    flex-direction: column;
    border-radius: 20px;
  }

  .auth-brand-panel {
    min-height: 10rem;
    padding: 1rem;
  }

  .auth-logo {
    width: 8rem;
  }

  .auth-content {
    padding: 1.75rem;
  }

  .auth-header {
    margin-bottom: 1.5rem;
  }
}

@media (max-width: 480px) {
  .auth-content {
    padding: 1.5rem;
  }

  .auth-submit {
    width: 100%;
  }
}
