@font-face {
  font-family: "X5 Sans UI";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/theme/fonts/X5-Sans-UI_Regular-82EXduaw.woff2") format("woff2");
}
@font-face {
  font-family: "X5 Sans UI";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/theme/fonts/X5-Sans-UI_Medium-yx0siZAO.woff2") format("woff2");
}
@font-face {
  font-family: "X5 Sans UI";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/theme/fonts/X5-Sans-UI_Bold-zpm_KJx7.woff2") format("woff2");
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  min-height: 100vh;
  font-family: "X5 Sans UI", Roboto, Arial, Helvetica, sans-serif;
  color: #1a1a1a;
  background-color: #437c34;
  background-image: url("/theme/img/background.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

.page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

.card {
  width: 100%;
  max-width: 520px;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.14);
  padding: 28px 40px 28px;
}

.head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 32px;
}

.brand,
.meta {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #6c737d;
  white-space: nowrap;
}

.brand span {
  font-size: 16px;
  font-weight: 400;
  line-height: 1.2;
}

.meta span {
  font-size: 13px;
  font-weight: 400;
  line-height: 1.2;
}

.mark {
  width: 36px;
  height: 25px;
  display: block;
  flex: 0 0 auto;
}

.mark.sm {
  width: 24px;
  height: 17px;
}

.bar {
  width: 1px;
  height: 22px;
  background: #97a4b0;
  display: inline-block;
  flex: 0 0 auto;
}

.bar.sm {
  height: 14px;
}

h1 {
  margin: 0 0 10px;
  font-size: 30px;
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.2px;
  color: #1a1a1a;
}

.sub {
  margin: 0 0 28px;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.45;
  color: #1a1a1a;
}

/* ---- outlined fields with label on border ---- */

.field {
  position: relative;
  margin: 0 0 0;
}

.field + .field {
  margin-top: 18px;
}

.field .box {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 56px;
  border: 1px solid #c4c4c4;
  border-radius: 4px;
  background: #ffffff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field:hover .box {
  border-color: #9e9e9e;
}

.field.is-focused .box {
  border-color: #5faf2d;
  box-shadow: inset 0 0 0 1px #5faf2d;
}

.field.is-error .box {
  border-color: #d32f2f;
}

/* Подпись всегда на верхней границе рамки (как в оригинале) */
.field label {
  position: absolute;
  left: 10px;
  top: 0;
  transform: translateY(-50%);
  padding: 0 5px;
  margin: 0;
  font-size: 12px;
  line-height: 1;
  font-weight: 400;
  color: #6c737d;
  background: #ffffff;
  pointer-events: none;
  z-index: 2;
  white-space: nowrap;
}

.field.is-focused label {
  color: #5faf2d;
}

.field.is-error label {
  color: #d32f2f;
}

.field input {
  flex: 1 1 auto;
  width: 100%;
  border: 0;
  outline: none;
  background: transparent;
  padding: 18px 14px 14px;
  font-size: 16px;
  line-height: 1.4;
  color: #1a1a1a;
  font-family: inherit;
  border-radius: 4px;
  caret-color: #5faf2d;
}

.field.password input {
  padding-right: 48px;
}

.field .eye {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border: 0;
  background: transparent;
  color: rgba(0, 0, 0, 0.54);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 50%;
  z-index: 1;
}

.field .eye:hover {
  background: rgba(0, 0, 0, 0.04);
}

.hint {
  margin: 8px 0 22px;
  padding: 0 2px;
  font-size: 12px;
  line-height: 1.35;
  color: #6c737d;
}

.error {
  margin: 12px 0 0;
  font-size: 13px;
  line-height: 1.4;
  color: #d32f2f;
}

.error[hidden] {
  display: none;
}

.actions {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 28px;
}

.submit {
  min-width: 148px;
  min-height: 40px;
  padding: 8px 28px;
  border: 0;
  border-radius: 4px;
  background: #5faf2d;
  color: #ffffff;
  font-size: 15px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
}

.submit:hover:not(:disabled) {
  background: #4d9727;
}

.submit:disabled {
  background: #e3e8e8;
  color: #c0cbcb;
  cursor: default;
}

.actions .link {
  display: inline-flex;
  align-items: center;
  height: 40px;
  line-height: 40px;
}

.link {
  color: #1565c0;
  font-size: 14px;
  line-height: 1.4;
  text-decoration: none;
}

.link:hover {
  text-decoration: underline;
}

.foot {
  margin-top: 32px;
  text-align: center;
}

@media (max-width: 600px) {
  .card {
    padding: 22px 20px 24px;
    border-radius: 12px;
  }
  h1 {
    font-size: 24px;
  }
  .head {
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    margin-bottom: 24px;
  }
  .meta {
    display: none !important;
  }
  .actions {
    flex-wrap: wrap;
    gap: 16px;
  }
}
