body, html {
  background: #faf9f7 !important;
  font-family: 'Montserrat', Arial, sans-serif;
  min-height: 100vh;
  height: 100%;
  position: relative;
}

.login-bg {
  background: url('/public/bg.jpg') center center/cover no-repeat;
  position: fixed;
  top: 0; left: 0; width: 100vw; height: 100vh;
  z-index: 1;
  filter: grayscale(0.1) brightness(0.93);
}
.login-bg::after {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  width: 100vw; height: 100vh;
  background: linear-gradient(
    to bottom,
    rgba(255,255,255,0.87) 0%,
    rgba(255,255,255,0.7) 40%,
    rgba(255,255,255,0.35) 88%
  );
  z-index: 2;
  pointer-events: none;
}

.center-container {
  min-height: 100vh;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 3;
}

.login-card {
  display: flex;
  flex-direction: row;
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  overflow: hidden;
  max-width: 760px;
  width: 94vw;
  min-height: 410px;
  align-items: stretch;
  height: fit-content;
}

.login-form-panel,
.login-welcome-panel {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-sizing: border-box;
  padding: 45px 35px 35px 35px;
  min-height: 410px;
  height: auto;
}

.login-form-panel {
  background: #fff;
  border-radius: 4px 0 0 4px;
  align-items: center;
}

.login-welcome-panel {
  background: transparent;
  border-radius: 0 4px 4px 0;
  align-items: stretch;
  justify-content: stretch;
  text-align: left;
  padding: 0;
}

.button.is-dark {
  background-color: #2F2F2F !important;
  border-color: #2F2F2F !important;
  color: #fff !important;
  font-family: 'Montserrat', Arial, sans-serif !important;
  border-radius: 4px!important;
}

.login-welcome-inner {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: start;
  align-items: flex-start;
  background: #f8f6f2;
  border-radius: 0 4px 4px 0;
  padding: 90px 35px 35px 35px;
  min-height: 100%;
  height: 100%;
  width: 100%;
  box-sizing: border-box;
}

.brand-logo {
  font-size: 2.05rem;
  font-weight: 700;
  color: #232323;
  letter-spacing: 0.02em;
  margin-bottom: 12px;
  line-height: 1;
  font-family: 'Georgia', serif;
}
.brand-logo span {
  font-size: 1.08rem;
  font-weight: 500;
  color: #6a625b;
  margin-left: 4px;
  font-family: 'Montserrat', Arial, sans-serif;
}
.welcome {
  font-size: 32px;
  color: #4b4640;
  font-weight: 400;
  margin-bottom: 1vh;
}
.login-form {
  width: 100%;
  max-width: 350px;
  margin: 0 auto;
}
.login-form .field:not(:last-child) {
  margin-bottom: 16px;
}
.policy label {
  font-size: 0.98rem;
  color: #5e5e5e;
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}
.policy a {
  color: #4978b2;
  text-decoration: underline;
  white-space: nowrap;
}

/* ========== MOBILE ========== */
@media (max-width: 900px) {
  .login-card {
    flex-direction: column;
    max-width: 97vw;
    min-height: unset;
    height: auto;
  }
  .login-form-panel { 
    order: 2;
    padding: 26px 7vw 16px 7vw;
    border-radius: 0;
    width: 100%;
    min-width: 0;
    max-width: 100vw;
    min-height: unset;
    height: auto;
  }
  .login-welcome-panel {
    order: 1;
    /* Сбросить любые выравнивания! */
    align-items: center;
    justify-content: flex-start;
    height: auto;
    min-height: unset;
    flex: 0 0 auto;
    display: block;
  }
  .login-welcome-inner {
    /* Сбросить все растяжения! */
    height: auto !important;
    min-height: unset !important;
    flex: 0 0 auto !important;
    align-items: center;
    justify-content: center;
    padding: 16px 7vw 12px 7vw;
    border-radius: 0;
    width: 100%;
    max-width: 100vw;
  }
  .brand-logo { font-size: 1.04rem; }
  .welcome { font-size: 24px; }
}
@media (max-width: 600px) {
  .login-card {
    max-width: 99vw;
    width: 99vw;
    border-radius: 4px;
    min-height: unset;
  }
  .login-form-panel {
    padding: 8vw 5vw 8vw 5vw;
  }
  .login-welcome-inner {
    padding: 7px 5vw 7px 5vw;
    min-height: unset;
    height: auto;
    align-items: center;
    justify-content: center;
  }
  .brand-logo { font-size: 0.94rem; }
  .welcome { font-size: 18px; }
}
@media (max-width: 430px) {
  .login-form-panel, .login-welcome-inner {
    padding: 6vw 2vw 4vw 2vw;
  }
}
.logo-wrapper {
  margin-top: 2.5vw;
  margin-bottom: 1.2vw;
}

@media (min-width: 240px) and (max-width: 900px) {
  .logo-wrapper {
    margin-top: 8vw!important; /* увеличиваем отступ на средних экранах */
  }
}

.custom-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.98rem;
  color: #5e5e5e;
  user-select: none;
  font-family: 'Montserrat', Arial, sans-serif;
  flex-wrap: wrap;
  position: relative;
  cursor: pointer;
}
.custom-checkbox input[type="checkbox"] {
  opacity: 0;
  position: absolute;
  width: 18px;
  height: 18px;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  margin: 0;
  cursor: pointer;
  z-index: 2;
}
.custom-checkbox .checkmark {
  display: inline-block;
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 1.5px solid #232323;
  background: #232323;
  position: relative;
  flex-shrink: 0;
  margin-right: 8px;
  margin-left: 0;
}
.custom-checkbox input:checked ~ p .checkmark::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 0px;
  width: 6px;
  height: 11px;
  border: solid #fff;
  border-width: 0 2.3px 2.3px 0;
  transform: rotate(45deg);
  display: block;
}
.policy a {
  color: #4978b2;
  text-decoration: underline;
  white-space: nowrap;
}

input,
textarea,
select {
    background-color: #fff !important; /* белый фон */
    color: #000 !important; /* чёрный текст */
    -webkit-appearance: none; /* убрать автостилизацию iOS */
    color-scheme: light; /* сказать браузеру, что форма для светлой темы */
}

input::placeholder,
textarea::placeholder {
    color: #888 !important; /* серый, чтобы видно было на белом */
    opacity: 1; /* на iOS плейсхолдер иногда полупрозрачный */
}
