:root {
  --page-bg: #e3e6f2;
  --field-bg: #e4ebfd;
  --field-inner-bg: #e4ebfd;
  --text-main: #1f2a36;
  --text-muted: #8b9099;
  --label-color: #6b8df1;
  --accent: #2d43a7;
  --accent-hover: #243993;
  --accent-soft: #a9b7f7;
  --shadow-soft: 0 4px 14px rgba(34, 54, 140, 0.18);

  --radius-field: 24px;
  --radius-btn: 24px;
}

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

html,
body {
  margin: 0;
  min-height: 100%;
  overflow-y: hidden;
  font-family: "JetBrains Sans", Arial, Helvetica, sans-serif;
  background: var(--page-bg);
  color: var(--text-main);
}

body {
  display: flex;
  justify-content: center;
}

/* Главная мобильная колонка */
.login-page {
  width: 100%;
  max-width: 390px;
  min-height: 100vh;
  margin: 0 auto;
  background: var(--page-bg);
}

.login-card {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 18px 0 12px;
}

.login-title {
  margin: 0 0 21px;
  padding: 0 1rem;
  font-family: "JetBrains Sans", sans-serif;
  font-size: 36px;
  line-height: 21px;
  font-weight: 400;
  letter-spacing: -0.32px;
  color: #1B2632;
  gap: 10px;
  display: flex;
}

.messages-wrap {
  padding: 0 14px;
  margin-bottom: 8px;
}

.login-form {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* .input-fields {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 0;
  background: transparent;
} */


.input-fields {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem;
  background: white;
  border-radius: 2rem;
  
}

/* Поле как на макете */
/* .input-group {
  margin: 0 14px;
  background: #E4EBFD;
  border-radius: 24px;
  padding: 24px;
   18px 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
} */

.input-group {
  margin: -1px 4px;
  background: #E4EBFD;
  border-radius: 24px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  border: 2px solid transparent;
  outline: none;
  transition: border-color 0ms, box-shadow 0ms;
}

.input-group:focus-within {
  border: 2px solid #263A99;
  box-shadow: 0px 0px 0px 4px #3261EC52;
}

.input-group.error,
.input-group:focus-within.error {
  border: 2px solid #E14000;
  box-shadow: 0px 0px 0px 4px #E1400052;
}

.input-field:not(:placeholder-shown) {
  color: #1B2632;
}


.input-body {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.input-label {
  font-family: 'JetBrains Sans' , sans-serif;
  font-weight: 500;
  font-size: 14px;
  color: #6B8DF1;
  margin: 0;
  letter-spacing: -0.32px;
  font-style: normal;
  line-height: 21px;
}

.input-field {
  width: 100%;
  height: auto;
  padding: 0;
  border: none;
  background: transparent;
  outline: none;
  letter-spacing: -0.32px;
  font-family: 'JetBrains Sans', sans-serif;
  font-weight: 500;
  font-size: 20px;
  color: #767D84;
  text-align: left;
}

.input-field::placeholder {
  color: #7d848c;
  font-size: 20px;
}

.password-wrap {
  position: relative;
  /* width: 100%; */
}

.password-input {
  padding-right: 60px;
}

.toggle-password {
  position: absolute;
  top: 7%;
  right: 0;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #ADC0F7;
  border: none;
  color: #263A99;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}


.toggle-password:hover {
  transform: translateY(-50%) scale(1.04);
}

.toggle-password:active {
  transform: translateY(-50%) scale(0.98);
  background: #263A99;
  color: #fff;
}

.eye-icon {
  width: 20px;
  height: 20px;
  top: 3.33px;
  left: 0.83px;
  display: block;
  stroke: currentColor;
}


.input-field:-webkit-autofill,
.input-field:-webkit-autofill:hover,
.input-field:-webkit-autofill:focus,
.input-field:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 1000px #e4ebfd inset !important;
  -webkit-text-fill-color: #000 !important;
}

.login-links {
  display: flex;
  justify-content: flex-end;
  padding: 0 18px;
  margin-top: 10px;
  stroke: currentColor;
}

.forgot-link {
  color: #2f5eff;
  text-decoration: none;
  font-family: "JetBrains Sans", Arial, sans-serif;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.2;
}

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

.form-message {
  min-height: 20px;
  padding: 0 14px;
  margin-top: 10px;
  font-size: 14px;
  color: #c63b3b;
}

.form-action {
  margin-top: auto;
  padding: 0 14px 20px;
  gap: 10px;
  display: flex;
}

.submit-btn {
  width: 100%;
  height: 69px;
  border: none;
  border-radius: 24px;
  background: #051C8AEB;
  color: #F0F0EE;
  font-family: "JetBrains Sans", sans-serif;
  font-size: 20px;
  font-weight: 500;
  cursor: pointer;
  padding-left: 1rem;
  padding-right: 1rem;
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
  box-shadow: -2px 2px 8px 0px #00000052;
  transition: background 0.2s ease, transform 0.15s ease;
  line-height: 21px;
  letter-spacing: -0.32px;
}


.submit-btn:active {
  transform: translateY(1px);
}

.submit-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.input-field.error {
  box-shadow:
    inset 0 0 0 1px rgba(214, 53, 53, 0.45),
    0 0 0 3px rgba(214, 53, 53, 0.08);
}

/* На широких экранах не растягиваем форму */
@media (min-width: 391px) {
  .login-page {
    max-width: 390px;
  }
}