/* БЛОК: Экран входа */
.login-screen {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--yd-bg, #f5f5f6);
  box-sizing: border-box;
}
.login-screen[hidden] {
  display: none !important;
}
.login-card {
  width: 100%;
  max-width: 360px;
  padding: 28px 24px 24px;
  background: #fff;
  border-radius: 12px;
  border: 1px solid var(--yd-border, #e5e5e5);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  box-sizing: border-box;
}
.login-card h1 {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 600;
}
.login-card p {
  margin: 0 0 20px;
  font-size: 14px;
  color: var(--yd-text-muted, #888);
  line-height: 1.4;
}
.login-field {
  margin-bottom: 14px;
}
.login-field label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--yd-text, #333);
}
.login-field input {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--yd-border, #e5e5e5);
  border-radius: 8px;
  font: inherit;
  font-size: 15px;
  box-sizing: border-box;
}
.login-field input:focus {
  outline: none;
  border-color: var(--yd-red, #fc3f1d);
}
.login-error {
  margin: 0 0 12px;
  font-size: 13px;
  color: #d32f2f;
  line-height: 1.35;
}
.login-error[hidden] {
  display: none;
}
.login-submit {
  width: 100%;
  margin-top: 6px;
  padding: 12px 16px;
  border: none;
  border-radius: 8px;
  background: var(--yd-red, #fc3f1d);
  color: #fff;
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
}
.login-submit:hover {
  filter: brightness(1.05);
}
.login-submit:active {
  filter: brightness(0.95);
}

/* Телефон: iOS не открывает клавиатуру при font-size < 16px */
@media (max-width: 768px) {
  .login-screen {
    touch-action: manipulation;
    align-items: flex-start;
    padding-top: max(20px, env(safe-area-inset-top, 0px));
    padding-bottom: max(20px, env(safe-area-inset-bottom, 0px));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .login-card {
    margin: auto 0;
  }
  .login-field input {
    font-size: 16px;
    min-height: 48px;
    line-height: 1.25;
    -webkit-appearance: none;
    appearance: none;
    touch-action: manipulation;
  }
  .login-field label {
    cursor: pointer;
  }
  .login-submit {
    min-height: 48px;
    font-size: 16px;
    touch-action: manipulation;
  }
}
