@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@600;700;800&display=swap");

:root {
  --green: #2b6749;
  --green-dark: #1d4c36;
  --page: #eff2e7;
  --field: #f0f3e9;
  --text: #172a20;
  --muted: #748279;
  --border: #d8dfd3;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--text);
  background-color: var(--page);
  background-image:
    linear-gradient(rgba(44, 83, 59, .065) 1px, transparent 1px),
    linear-gradient(90deg, rgba(44, 83, 59, .065) 1px, transparent 1px);
  background-size: 40px 40px;
  font-family: "DM Sans", Arial, sans-serif;
}

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 38px 20px;
}

.login-container { width: min(100%, 390px); text-align: center; }

.login-header { margin-bottom: 27px; }
.login-logo {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  overflow: hidden;
  margin: 0 auto 16px;
  background: var(--green);
  border: 4px solid var(--green);
  border-radius: 16px;
  box-shadow: 0 9px 20px rgba(31, 79, 55, .2);
}
.login-logo img { width: 100%; height: 100%; display: block; object-fit: contain; padding: 1px; background: #fff; border-radius: 11px; }
.login-header h1 { margin: 0; font: 800 25px/1.2 "Manrope", sans-serif; letter-spacing: -.025em; }
.login-header p { margin: 6px 0 0; color: var(--muted); font-size: 12px; }

.login-card {
  padding: 27px 27px 29px;
  text-align: left;
  background: #fff;
  border: 1px solid rgba(213, 222, 209, .9);
  border-radius: 16px;
  box-shadow: 0 18px 45px rgba(42, 71, 53, .14);
}

.login-error { display: flex; align-items: center; gap: 10px; margin-bottom: 17px; padding: 11px 12px; color: #9f2f2b; background: #fff0ed; border: 1px solid #f1cbc5; border-radius: 9px; }
.login-error[hidden] { display: none; }
.login-error > span { width: 24px; height: 24px; display: grid; place-items: center; flex: 0 0 auto; color: #fff; background: #c64a41; border-radius: 50%; font-weight: 800; }
.login-error p, .login-error strong, .login-error small { display: block; margin: 0; }
.login-error strong { font-size: 11px; }.login-error small { margin-top: 2px; font-size: 9px; font-weight: 400; }

.login-form > label { display: block; margin: 0 0 7px; color: #52675a; font-size: 11px; font-weight: 600; }
.login-form .input-wrap + label { margin-top: 17px; }
.login-form[hidden], #recovery[hidden] { display: none; }
#recovery h2 { margin: 0 0 6px; font: 700 18px "Manrope", sans-serif; }
#recovery-help { margin: 0 0 20px; color: var(--muted); font-size: 12px; line-height: 1.5; }
#recovery-message { margin: 0 0 16px; padding: 10px; border-radius: 6px; background: #e8f3eb; color: #1d4c36; font-size: 12px; line-height: 1.4; }
#recovery-message.error { background: #fff0ed; color: #9f2f2b; }
.text-button { display: block; margin: 15px auto 0; padding: 5px; border: 0; background: none; color: var(--green); font: 600 12px "DM Sans", sans-serif; cursor: pointer; }
.text-button:hover { text-decoration: underline; }
.input-wrap {
  height: 46px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  background: var(--field);
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: border-color .2s, box-shadow .2s;
}
.input-wrap:focus-within { border-color: #769880; box-shadow: 0 0 0 4px rgba(43, 103, 73, .09); }
.input-wrap > svg { width: 17px; height: 17px; flex: 0 0 auto; fill: none; stroke: #7c8e82; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.input-wrap input { width: 100%; height: 100%; padding: 0; color: var(--text); background: transparent; border: 0; outline: 0; font: 12px "DM Sans", sans-serif; }
.input-wrap input::placeholder { color: #8f9b93; }
.password-toggle { width: 30px; height: 30px; display: grid; place-items: center; padding: 0; color: #788a7e; background: transparent; border: 0; border-radius: 6px; cursor: pointer; }
.password-toggle:hover { background: #e4e9df; }
.password-toggle svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.login-form .remember-choice { display: inline-flex; align-items: center; gap: 8px; margin: 16px 0 0; color: #52675a; font-size: 12px; font-weight: 600; cursor: pointer; }
.remember-choice input { width: 16px; height: 16px; margin: 0; accent-color: var(--green); cursor: pointer; }
.remember-choice input:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.remember-choice + .login-button { margin-top: 16px; }

.login-button {
  width: 100%;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin-top: 22px;
  color: #fff;
  background: linear-gradient(135deg, var(--green), var(--green-dark));
  border: 0;
  border-radius: 9px;
  box-shadow: 0 8px 18px rgba(31, 79, 55, .16);
  cursor: pointer;
  font: 700 12px "DM Sans", sans-serif;
  transition: transform .2s, box-shadow .2s;
}
.login-button:hover { transform: translateY(-1px); box-shadow: 0 11px 23px rgba(31, 79, 55, .22); }
.login-button span { font-size: 17px; }

footer { margin-top: 25px; color: #7f8c84; font-size: 10px; }

@media (max-width: 430px) {
  .login-page { place-items: start center; padding-top: 28px; }
  .login-card { padding: 23px 20px 25px; }
}

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
