:root {
  color-scheme: light;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  color: #101828;
  background: #f8fafc;
  font-synthesis: none;
  --green: #08754a;
  --green-dark: #075d3e;
  --muted: #667085;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(ellipse at 50% 0%, #edf8f3, #f8fafc 62%);
}

.login-layout {
  width: min(100%, 472px);
  margin-inline: auto;
  padding: 36px 16px;
}

.login-brand { margin-bottom: 28px; }

.wordmark {
  display: inline-block;
  color: inherit;
  text-decoration: none;
  font-size: 44px;
  font-weight: 800;
  letter-spacing: -.065em;
  line-height: 1;
}

.wordmark span { color: var(--green); }

.login-brand p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 15px;
}

.product { display: none; }

.login-card {
  padding: 24px 18px;
  border: 1px solid #fff;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 12px 32px #18364910;
}

.login-card h1 {
  margin: 0 0 26px;
  font-size: clamp(26px, 5vw, 36px);
  line-height: 1.13;
  letter-spacing: -.035em;
}

.login-card form { display: grid; gap: 18px; }

.field label {
  display: block;
  margin-bottom: 7px;
  font-size: 14px;
  font-weight: 600;
}

.input-wrap {
  display: flex;
  align-items: center;
  border: 1px solid #8592a5;
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 2px 5px #1018280a;
}

.input-wrap > svg {
  flex: none;
  margin-left: 13px;
  color: var(--muted);
  pointer-events: none;
}

.input-wrap input {
  width: 100%;
  min-width: 0;
  min-height: 50px;
  padding: 10px 12px;
  border: 0;
  border-radius: inherit;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 16px;
}

.input-wrap:focus-within {
  border-color: var(--green);
  outline: 2px solid var(--green);
  outline-offset: 1px;
}

.input-wrap input:focus-visible { outline: none; }

button {
  font: inherit;
  cursor: pointer;
}

.password-toggle {
  display: grid;
  place-items: center;
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
}

.password-toggle[hidden], .eye-slash { display: none; }
.password-toggle[aria-label="Скрыть пароль"] .eye-slash { display: initial; }
.password-toggle:hover { color: var(--green-dark); }

.recovery {
  justify-self: end;
  display: flex;
  align-items: center;
  min-height: 24px;
  color: var(--green-dark);
  font-size: 14px;
  font-weight: 600;
  text-underline-offset: 3px;
}

.submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 52px;
  padding: 10px 16px;
  border: 0;
  border-radius: 13px;
  background: linear-gradient(145deg, #08754a, #075d3e 72%);
  color: #fff;
  box-shadow: 0 8px 18px #075d3e24;
  font-weight: 700;
}

.submit:hover { background: linear-gradient(145deg, #076844, #064b34); }
.submit:active { background: #064b34; }
.submit:disabled { background: #48645a; box-shadow: none; cursor: wait; }

:where(a, button):focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
}

.login-error {
  margin: -8px 0 20px;
  padding: 10px 12px;
  border: 1px solid #f2cdc9;
  border-radius: 10px;
  color: #912018;
  background: #fff4f2;
  overflow-wrap: anywhere;
}

@media (min-width: 768px) {
  .login-layout { width: min(100%, 480px); padding: 64px 20px; }
  .login-card { padding: 36px; }
}

@media (min-width: 1024px) {
  body {
    background:
      radial-gradient(ellipse at 100% 0%, #c0e7e1, transparent 48%),
      radial-gradient(ellipse at 0% 85%, #e4f4ee, transparent 50%),
      linear-gradient(135deg, #edf2fc, #f8fafc 55%, #e0ecf5);
  }

  .login-layout {
    position: relative;
    isolation: isolate;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 480px);
    grid-template-rows: auto 1fr;
    column-gap: clamp(40px, 6vw, 100px);
    align-items: start;
    width: 100%;
    min-height: 100vh;
    overflow: clip;
    padding: clamp(38px, 5vw, 76px) max(48px, calc((100% - 1240px) / 2)) 0;
  }

  .login-layout::before, .login-layout::after {
    position: absolute;
    z-index: -1;
    border: 1px solid #fff;
    border-radius: 50%;
    content: "";
    pointer-events: none;
  }

  .login-layout::before {
    width: 660px;
    height: 300px;
    top: -165px;
    right: -110px;
    transform: rotate(-18deg);
    background: linear-gradient(115deg, #c7f2e4, #58bb9e 60%, #278b91);
  }

  .login-layout::after {
    width: 1100px;
    height: 330px;
    right: -345px;
    bottom: -220px;
    transform: rotate(-28deg);
    background: linear-gradient(180deg, #e1faf4, #57c1ad);
  }

  .login-brand { margin: 0 0 42px; }
  .login-brand p { display: none; }
  .wordmark { font-size: 54px; }

  .product {
    display: block;
    grid-column: 1;
    grid-row: 2;
  }

  .product h2 {
    margin: 0;
    font-size: clamp(37px, 4vw, 60px);
    line-height: 1.06;
    letter-spacing: -.047em;
  }

  .product h2 span {
    display: block;
    color: var(--green);
  }

  .product p {
    max-width: 440px;
    margin: 22px 0 26px;
    color: #475467;
    font-size: 18px;
    line-height: 1.55;
  }

  .product ul {
    display: grid;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .product li {
    display: flex;
    align-items: center;
    gap: 14px;
    font-weight: 600;
  }

  .product li span {
    display: grid;
    place-items: center;
    flex: 0 0 46px;
    height: 46px;
    border: 1px solid #fff;
    border-radius: 14px;
    background: linear-gradient(135deg, #fff, #def2e9);
    color: var(--green-dark);
    box-shadow: 0 4px 12px #175d4010;
  }

  .product-phone {
    width: min(100%, 360px);
    height: 226px;
    margin-top: 22px;
    background: url('/static/login-phone.svg') center top / 100% auto no-repeat;
  }

  .login-card {
    grid-column: 2;
    grid-row: 2;
    margin: clamp(0px, 4vh, 42px) 0 48px;
    padding: 42px 36px;
    border-radius: 28px;
    background: linear-gradient(145deg, #fff, #f3f8fc);
    box-shadow: 0 22px 64px #18364918;
  }
}
